forked from docs/doc-exports
364 lines
30 KiB
HTML
364 lines
30 KiB
HTML
<a name="lts_api_0016"></a><a name="lts_api_0016"></a>
|
|
|
|
<h1 class="topictitle1">Creating a Log Stream</h1>
|
|
<div id="body32001227"><div class="section" id="lts_api_0016__en-us_topic_0160681589_section52011532102811"><h4 class="sectiontitle">Function</h4><p id="lts_api_0016__en-us_topic_0160681589_p420153242820">This API is used to create a log stream in a specified log group.</p>
|
|
</div>
|
|
<div class="section" id="lts_api_0016__en-us_topic_0160681589_section1720117320280"><h4 class="sectiontitle">URI</h4><p id="lts_api_0016__en-us_topic_0160681589_p16201123213288">POST /v2/{project_id}/groups/{log_group_id}/streams</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_table82042328282" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row5203103220289"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p202051329281">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.2.3.2.5.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p2205133262811">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="lts_api_0016__en-us_topic_0160681589_p16206113232812">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.3.2.5.1.4"><p id="lts_api_0016__en-us_topic_0160681589_p102061232162811">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row2204193214289"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p72066322285">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.2.5.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p1220614327286">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p52079322284">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.2.5.1.4 "><p id="lts_api_0016__en-us_topic_0160681589_p14207832102818">Project ID. For details about how to obtain the ID, see <a href="lts_api_0006.html#lts_api_0006">Obtaining the AccountID, Project ID, Log Group ID, and Log Stream ID</a>. Default value: None</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p920753262810">Value length: 32 characters</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row122047324289"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p15207832192813">log_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.2.3.2.5.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p12207132142811">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p1520733292817">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.3.2.5.1.4 "><p id="lts_api_0016__en-us_topic_0160681589_p92081632172817">ID of the log group to which the log stream to be created will belong.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p820823252817">Default value: None</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p3208103214284">Value length: 36 characters</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="lts_api_0016__en-us_topic_0160681589_section102085323280"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row220883217288"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p192091132102814">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.2.2.5.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p142091032202812">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="lts_api_0016__en-us_topic_0160681589_p1720933292810">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.2.2.5.1.4"><p id="lts_api_0016__en-us_topic_0160681589_p821013282818">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row4209153232811"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p92101320284">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.5.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p7210143219286">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p5210193282812">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="lts_api_0016__en-us_topic_0160681589_p10210173217288">User token obtained from IAM.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p14210123252814">Default value: None</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p18210632102820">Minimum length: 1000 characters</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p221083210288">Maximum length: 2000 characters</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row13209163222810"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p172101332172812">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.2.2.5.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p6211113216284">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p1221123215286">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.2.2.5.1.4 "><p id="lts_api_0016__en-us_topic_0160681589_p9788183218282">Set this parameter to <strong id="lts_api_0016__en-us_topic_0160681589_b280291464612">application/json;charset=UTF-8</strong>.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p1078803220288">Default value: None</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p57889324284">Minimum length: 30 characters</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p87881032112819">Maximum length: 30 characters</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_requestParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameter</caption><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row122110323289"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p121217325289">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="10%" id="mcps1.3.3.3.2.5.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p9212193292818">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="lts_api_0016__en-us_topic_0160681589_p521283292816">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.3.3.2.5.1.4"><p id="lts_api_0016__en-us_topic_0160681589_p22121326284">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row19212732142812"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p162139329285">log_stream_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="10%" headers="mcps1.3.3.3.2.5.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p0213163219285">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p8213133215285">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.3.3.2.5.1.4 "><p id="lts_api_0016__en-us_topic_0160681589_p421343219282">Name of the log stream to be created.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p1970845032315">Minimum length: 1 character</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p15708450142315">Maximum length: 64 characters</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p221323214282">Enumerated value:</p>
|
|
<ul id="lts_api_0016__en-us_topic_0160681589_ul0213193212289"><li id="lts_api_0016__en-us_topic_0160681589_li112131332202819"><strong id="lts_api_0016__en-us_topic_0160681589_b1104131302615">lts-stream-13ci</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="lts_api_0016__en-us_topic_0160681589_section42131832142811"><h4 class="sectiontitle">Response Parameters</h4><p id="lts_api_0016__en-us_topic_0160681589_p1214632102810"><strong id="lts_api_0016__en-us_topic_0160681589_b2094881884515">Status code: 201</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_responseParameter" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameter</caption><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row2214183216286"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p82141232102812">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.3.2.4.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p3214173242813">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.3.2.4.1.3"><p id="lts_api_0016__en-us_topic_0160681589_p721523215282">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row021416324287"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p22154324281">log_stream_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.3.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p62151232152818">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.3.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p3215153282818">ID of the created log stream.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p1121523210286">Value length: 36 characters</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p10215163220283"><strong id="lts_api_0016__en-us_topic_0160681589_b111171522134519">Status code: 400</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_table521513323286" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row182164328280"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p1321643216286">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.5.2.4.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p621613252812">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.5.2.4.1.3"><p id="lts_api_0016__en-us_topic_0160681589_p8216193272818">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row6216173262819"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p1121723222810">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p1121720322283">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p821712322283">Error code.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p1921763272811">Enumerated value:</p>
|
|
<ul id="lts_api_0016__en-us_topic_0160681589_ul1621763211282"><li id="lts_api_0016__en-us_topic_0160681589_li19217132202810"><strong id="lts_api_0016__en-us_topic_0160681589_b1532012202615">LTS.0403</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row02161632172819"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p15217113213282">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.5.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p142171032102810">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.5.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p821816321284">Error message.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p1021883292811">Enumerated value:</p>
|
|
<ul id="lts_api_0016__en-us_topic_0160681589_ul621863242816"><li id="lts_api_0016__en-us_topic_0160681589_li142181032152814"><strong id="lts_api_0016__en-us_topic_0160681589_b103831931142612">Invalid projectId</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p19218193211289"><strong id="lts_api_0016__en-us_topic_0160681589_b18798226104512">Status code: 401</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_table1721893242815" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row0218532182818"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p15219143216283">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.7.2.4.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p421963212810">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.7.2.4.1.3"><p id="lts_api_0016__en-us_topic_0160681589_p19219932182814">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row132181324284"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p152197323285">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p92191032142818">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p82197324285">Error code.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p14219232202818">Enumerated value:</p>
|
|
<ul id="lts_api_0016__en-us_topic_0160681589_ul62192320280"><li id="lts_api_0016__en-us_topic_0160681589_li922013325283"><strong id="lts_api_0016__en-us_topic_0160681589_b12319153612261">LTS.0403</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row11218103222816"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p182201532202818">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.7.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p172203320288">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.7.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p82207326288">Error message.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p52201032152819">Enumerated value:</p>
|
|
<ul id="lts_api_0016__en-us_topic_0160681589_ul4220163282814"><li id="lts_api_0016__en-us_topic_0160681589_li12220832102810"><strong id="lts_api_0016__en-us_topic_0160681589_b014333917265">Invalid projectId</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p3220532132810"><strong id="lts_api_0016__en-us_topic_0160681589_b250913304457">Status code: 403</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_table522023272817" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row18221123252815"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.9.2.4.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p622113215282">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.9.2.4.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p32212324287">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.9.2.4.1.3"><p id="lts_api_0016__en-us_topic_0160681589_p20221632112811">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row18221163212818"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p10222123282814">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p3222183292813">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.9.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p112221132102819">Error code.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p12222123211284">Enumerated value:</p>
|
|
<ul id="lts_api_0016__en-us_topic_0160681589_ul142221232202816"><li id="lts_api_0016__en-us_topic_0160681589_li922219325284"><strong id="lts_api_0016__en-us_topic_0160681589_b1076713441269">LTS.0403</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row72212322283"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p1922213219286">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.9.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p3222163282819">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.9.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p20222232152815">Error message.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p2223103292817">Enumerated value:</p>
|
|
<ul id="lts_api_0016__en-us_topic_0160681589_ul4223133262818"><li id="lts_api_0016__en-us_topic_0160681589_li722393213284"><strong id="lts_api_0016__en-us_topic_0160681589_b1927994732617">Invalid projectId</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p9223832162817"><strong id="lts_api_0016__en-us_topic_0160681589_b146915347451">Status code: 500</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_table22231532132812" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row19223123262815"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.11.2.4.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p2224133211283">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.11.2.4.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p18224183242810">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.11.2.4.1.3"><p id="lts_api_0016__en-us_topic_0160681589_p0224183232819">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row1622373217282"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.11.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p622483214281">error_code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.11.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p32246325285">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.11.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p722573211285">Error code.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p32257327285">Enumerated value:</p>
|
|
<ul id="lts_api_0016__en-us_topic_0160681589_ul182251323287"><li id="lts_api_0016__en-us_topic_0160681589_li3225193202813"><strong id="lts_api_0016__en-us_topic_0160681589_b8632165652614">LTS.0403</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row1822317326288"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.11.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p62255328288">error_msg</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.11.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p2225532132817">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.11.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p7225193217284">Error message.</p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p3225183215281">Enumerated value:</p>
|
|
<ul id="lts_api_0016__en-us_topic_0160681589_ul202251132132811"><li id="lts_api_0016__en-us_topic_0160681589_li0225103212287"><strong id="lts_api_0016__en-us_topic_0160681589_b125193113278">Invalid projectId</strong></li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p1822563272811"><strong id="lts_api_0016__en-us_topic_0160681589_b435103912454">Status code: 503</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_table1922663202815" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameter</caption><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row162261632172814"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.13.2.4.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p1622663218289">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.13.2.4.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p72267321282">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.4.13.2.4.1.3"><p id="lts_api_0016__en-us_topic_0160681589_p15226632132814">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row7226123212285"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.13.2.4.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p222710327285">-</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.13.2.4.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p92272325284">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.4.13.2.4.1.3 "><p id="lts_api_0016__en-us_topic_0160681589_p222733212814">The requested service is unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="lts_api_0016__en-us_topic_0160681589_section622713325288"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="lts_api_0016__en-us_topic_0160681589_screen18228163202820">POST https://{endpoint}/v2/{project_id}/groups/{log_group_id}/streams
|
|
|
|
/v2/{project_id}/groups/{log_group_id}/streams
|
|
{
|
|
"log_stream_name": "lts-stream-02kh",
|
|
"ttl_in_days": 7,
|
|
|
|
}
|
|
</pre>
|
|
</div>
|
|
<div class="section" id="lts_api_0016__en-us_topic_0160681589_section922863217287"><h4 class="sectiontitle">Example Response</h4><p id="lts_api_0016__en-us_topic_0160681589_p10228173212818"><strong id="lts_api_0016__en-us_topic_0160681589_b1570724212451">Status code: 201</strong></p>
|
|
<pre class="screen" id="lts_api_0016__en-us_topic_0160681589_screen122911324288">{
|
|
"log_stream_id":"c54dbc58-0fd8-48ed-b007-6d54981427a7"
|
|
}</pre>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p16229123210289"><strong id="lts_api_0016__en-us_topic_0160681589_b1636515442456">Status code: 400</strong></p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p1722933210289">The request is invalid. Modify the request based on the description in <strong id="lts_api_0016__en-us_topic_0160681589_b144751923152810">error_msg</strong> before a retry.</p>
|
|
<pre class="screen" id="lts_api_0016__en-us_topic_0160681589_screen15229153242811">{
|
|
"error_code" : "LTS.0009",
|
|
"error_msg" : "Failed to validate the request body"
|
|
}</pre>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p152299324282"><strong id="lts_api_0016__en-us_topic_0160681589_b79014474458">Status code: 401</strong></p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p14229183216283">Authentication failed. Check the token and try again.</p>
|
|
<pre class="screen" id="lts_api_0016__en-us_topic_0160681589_screen1623017321283">{
|
|
"error_code" : "LTS.0003",
|
|
"error_msg" : "Invalid token"
|
|
}</pre>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p152301832162814"><strong id="lts_api_0016__en-us_topic_0160681589_b1926125044518">Status code: 403</strong></p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p10230163212815">The server understood the request but refused to authorize it. The client should not repeat the request without modifications.</p>
|
|
<pre class="screen" id="lts_api_0016__en-us_topic_0160681589_screen5230232102812">{
|
|
"error_code" : "LTS.0001",
|
|
"error_msg" : "Invalid projectId"
|
|
}</pre>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p102311232142811"><strong id="lts_api_0016__en-us_topic_0160681589_b47545384517">Status code: 500</strong></p>
|
|
<p id="lts_api_0016__en-us_topic_0160681589_p1723133218286">The server has received the request but encountered an internal error.</p>
|
|
<pre class="screen" id="lts_api_0016__en-us_topic_0160681589_screen32311332122810">{
|
|
"error_code" : "LTS.0202",
|
|
"error_msg" : "Failed to create Log stream"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="lts_api_0016__en-us_topic_0160681589_section223116322287"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="lts_api_0016__en-us_topic_0160681589_table5774" frame="border" border="1" rules="all"><thead align="left"><tr id="lts_api_0016__en-us_topic_0160681589_row423233242820"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="lts_api_0016__en-us_topic_0160681589_p523203210280">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="lts_api_0016__en-us_topic_0160681589_p1823211323284">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="lts_api_0016__en-us_topic_0160681589_row1123212326287"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p152321532122811">201</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p823314322288">The request has succeeded and the log stream has been created.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row1323253210284"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p11233123242819">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p7233153215283">The request is invalid. Modify the request based on the description in <strong id="lts_api_0016__en-us_topic_0160681589_b9570121722812">error_msg</strong> before a retry.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row132321332162816"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p1723343217284">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p11233113214280">Authentication failed. Check the token and try again.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row923273212289"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p723311327289">403</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p323373212285">The server understood the request but refused to authorize it. The client should not repeat the request without modifications.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row72321632192815"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p5234193216284">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p8234133210288">The server has received the request but encountered an internal error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="lts_api_0016__en-us_topic_0160681589_row72327322282"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="lts_api_0016__en-us_topic_0160681589_p1723473219284">503</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="lts_api_0016__en-us_topic_0160681589_p20234173217287">The requested service is unavailable.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="lts_api_0016__en-us_topic_0160681589_section1723413218283"><h4 class="sectiontitle">Error Codes</h4><p id="lts_api_0016__en-us_topic_0160681589_p123420325284">For details, see <a href="lts_02_0021.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="lts_api_0015.html">Log Stream Management (New Version)</a></div>
|
|
</div>
|
|
</div>
|
|
|