Files
doc-exports/docs/lts/api-ref/CreateLogGroup.html
liusiying77 fdbbe7547a LTS API 20240130 version.
Reviewed-by: Bobkova, Natalia <natalia.bobkova@t-systems.com>
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: liusiying77 <liusiying@huawei.com>
Co-committed-by: liusiying77 <liusiying@huawei.com>
2025-03-12 12:37:01 +00:00

408 lines
28 KiB
HTML

<a name="CreateLogGroup"></a><a name="CreateLogGroup"></a>
<h1 class="topictitle1">Creating a Log Group</h1>
<div id="body1708331107508"><div class="section" id="CreateLogGroup__section20647185515313"><h4 class="sectiontitle">Function</h4><p id="CreateLogGroup__p1664712554319">This API is used to create a log group.</p>
</div>
<div class="section" id="CreateLogGroup__section8647055143118"><h4 class="sectiontitle">URI</h4><p id="CreateLogGroup__p1664715558316">POST /v2/{project_id}/groups</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__table15647855143112" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path Parameters</caption><thead align="left"><tr id="CreateLogGroup__row1164716557312"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.1"><p id="CreateLogGroup__p164715518318">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="CreateLogGroup__p16647205512312">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.3"><p id="CreateLogGroup__p1364810550318">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.2.3.2.5.1.4"><p id="CreateLogGroup__p10648145511312">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row16474558312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.1 "><p id="CreateLogGroup__p15648135515319">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="CreateLogGroup__p1364895503114">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.3 "><p id="CreateLogGroup__p1764815515319">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.2.3.2.5.1.4 "><p id="CreateLogGroup__p164811554311">Project ID. For details about how to obtain a project ID, see <a href="lts_api_0006.html">Obtaining the Project ID, Account ID, Log Group ID, and Log Stream ID</a>.</p>
<p id="CreateLogGroup__p464813559313">Minimum: <strong id="CreateLogGroup__b116481155143117">32</strong></p>
<p id="CreateLogGroup__p186481555203111">Maximum: <strong id="CreateLogGroup__b864875523111">32</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateLogGroup__section18648135513317"><h4 class="sectiontitle">Request Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="CreateLogGroup__row136481655123110"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.1"><p id="CreateLogGroup__p19648355103111">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.2"><p id="CreateLogGroup__p1564825513315">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.2.5.1.3"><p id="CreateLogGroup__p56488556311">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.2.5.1.4"><p id="CreateLogGroup__p264865519313">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row1164816557312"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateLogGroup__p76481552314">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateLogGroup__p464814552310">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateLogGroup__p9649555163116">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateLogGroup__p10649135512311">User token obtained from IAM. For details about how to obtain a user token, see <a href="lts_api_0004.html">Obtaining a User Token</a>.</p>
<p id="CreateLogGroup__p206499554314">Minimum: <strong id="CreateLogGroup__b364955553112">1000</strong></p>
<p id="CreateLogGroup__p564914558316">Maximum: <strong id="CreateLogGroup__b1464985573116">2000</strong></p>
</td>
</tr>
<tr id="CreateLogGroup__row5648165517318"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.1 "><p id="CreateLogGroup__p16491255183117">Content-Type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.2 "><p id="CreateLogGroup__p10649135533111">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.2.5.1.3 "><p id="CreateLogGroup__p3649205513119">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.2.5.1.4 "><p id="CreateLogGroup__p116491755173114">Set this parameter to application/json;charset=UTF-8.</p>
<p id="CreateLogGroup__p16649755173118">Minimum: <strong id="CreateLogGroup__b116491557311">30</strong></p>
<p id="CreateLogGroup__p864915518310">Maximum: <strong id="CreateLogGroup__b1764917556311">30</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__request_CreateLogGroupParams" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="CreateLogGroup__row106491455153118"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="CreateLogGroup__p1864945512311">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="CreateLogGroup__p864975513118">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="CreateLogGroup__p1864975513116">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="CreateLogGroup__p7649185523114">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row464945543119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateLogGroup__p146491558315">log_group_name</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateLogGroup__p1964965514317">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateLogGroup__p196491555153110">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateLogGroup__p265018552313">Name of the log group to be created.</p>
<p id="CreateLogGroup__p14650125515318">The configuration rules are as follows:</p>
<p id="CreateLogGroup__p365015514316">A name can contain 1 to 64 characters,</p>
<p id="CreateLogGroup__p20650355113114">including only letters, digits, underscores (_), hyphens (-), and periods (.). It cannot start with a period or underscore or end with a period.</p>
<p id="CreateLogGroup__p20650125553116">Minimum: <strong id="CreateLogGroup__b3650135512316">1</strong></p>
<p id="CreateLogGroup__p165016556316">Maximum: <strong id="CreateLogGroup__b11650145519313">64</strong></p>
</td>
</tr>
<tr id="CreateLogGroup__row364912559315"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateLogGroup__p265055543112">ttl_in_days</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateLogGroup__p865015518311">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateLogGroup__p17650195518315">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateLogGroup__p165013556310">Log retention duration. (Default: 30 days)</p>
<p id="CreateLogGroup__p9650145503114">Minimum: <strong id="CreateLogGroup__b15650145510311">1</strong></p>
<p id="CreateLogGroup__p146501955113117">Maximum: <strong id="CreateLogGroup__b18650755143119">365</strong></p>
</td>
</tr>
<tr id="CreateLogGroup__row6649155553119"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateLogGroup__p86507558311">tags</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateLogGroup__p465018551314">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateLogGroup__p196502558316">Array of <a href="#CreateLogGroup__request_tagsBody">tagsBody</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateLogGroup__p116501455133118">Tag field information.</p>
</td>
</tr>
<tr id="CreateLogGroup__row6649195514315"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="CreateLogGroup__p06506553316">log_group_name_alias</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="CreateLogGroup__p196502555312">No</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="CreateLogGroup__p365025563120">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="CreateLogGroup__p12650755103116">Log group alias.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="CreateLogGroup__request_tagsBody"></a><a name="request_tagsBody"></a><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__request_tagsBody" frame="border" border="1" rules="all"><caption><b>Table 4 </b>tagsBody</caption><thead align="left"><tr id="CreateLogGroup__row365035543119"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.1"><p id="CreateLogGroup__p1165117556313">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.2"><p id="CreateLogGroup__p1565114559311">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.4.2.5.1.3"><p id="CreateLogGroup__p17651155543117">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.4.2.5.1.4"><p id="CreateLogGroup__p7651105543115">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row12650175543114"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreateLogGroup__p1065195583117">key</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreateLogGroup__p1565135573115">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreateLogGroup__p765120556318">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreateLogGroup__p1365185520312">Tag key. Use only UTF-8 letters, digits, spaces, and the following characters: .:=+-@. Do not start with an underscore (). Max 128 characters are allowed.</p>
</td>
</tr>
<tr id="CreateLogGroup__row12650155514315"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.1 "><p id="CreateLogGroup__p1765119558315">value</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.2 "><p id="CreateLogGroup__p17651855143112">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.4.2.5.1.3 "><p id="CreateLogGroup__p20651205593114">String</p>
</td>
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.4.2.5.1.4 "><p id="CreateLogGroup__p196511255143117">Tag value. Use only UTF-8 letters, digits, spaces, and the following characters: _.:/=+-@. Max 255 characters are allowed.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateLogGroup__section565175553110"><h4 class="sectiontitle">Response Parameters</h4><p id="CreateLogGroup__p126519552313"><strong id="CreateLogGroup__b365165543113">Status code: 201</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__response_CreateLogGroupResponseBody" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response body parameters</caption><thead align="left"><tr id="CreateLogGroup__row1765117558319"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.1"><p id="CreateLogGroup__p565255533113">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.3.2.4.1.2"><p id="CreateLogGroup__p06521255183116">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.3.2.4.1.3"><p id="CreateLogGroup__p665265523119">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row20652555163111"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.1 "><p id="CreateLogGroup__p065219558316">log_group_id</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.3.2.4.1.2 "><p id="CreateLogGroup__p156527556313">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.3.2.4.1.3 "><p id="CreateLogGroup__p166527553313">ID of the created log group.</p>
<p id="CreateLogGroup__p14652125519316">Minimum: <strong id="CreateLogGroup__b365265510313">36</strong></p>
<p id="CreateLogGroup__p15652955103111">Maximum: <strong id="CreateLogGroup__b1765295514316">36</strong></p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateLogGroup__p16526559311"><strong id="CreateLogGroup__b1765212557314">Status code: 400</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__response_LogGroupErrorResultInfo400" frame="border" border="1" rules="all"><caption><b>Table 6 </b>Response body parameters</caption><thead align="left"><tr id="CreateLogGroup__row265215553110"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.1"><p id="CreateLogGroup__p20652155514317">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.5.2.4.1.2"><p id="CreateLogGroup__p15652455143120">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.5.2.4.1.3"><p id="CreateLogGroup__p865214553316">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row18652125523120"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateLogGroup__p1465214559314">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateLogGroup__p1165218552311">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateLogGroup__p9652105515316">Error code.</p>
</td>
</tr>
<tr id="CreateLogGroup__row12652135513315"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.1 "><p id="CreateLogGroup__p1565310553313">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.5.2.4.1.2 "><p id="CreateLogGroup__p6653455173111">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.5.2.4.1.3 "><p id="CreateLogGroup__p12653105520319">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateLogGroup__p1865365513319"><strong id="CreateLogGroup__b15653115510311">Status code: 401</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__table136535558316" frame="border" border="1" rules="all"><caption><b>Table 7 </b>Response body parameters</caption><thead align="left"><tr id="CreateLogGroup__row7653655123111"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.1"><p id="CreateLogGroup__p8653185573120">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.7.2.4.1.2"><p id="CreateLogGroup__p965335553117">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.7.2.4.1.3"><p id="CreateLogGroup__p8653255133119">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row14653105563117"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreateLogGroup__p86532055123111">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreateLogGroup__p1653145512318">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreateLogGroup__p1965315512318">Error code.</p>
</td>
</tr>
<tr id="CreateLogGroup__row186539555310"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.1 "><p id="CreateLogGroup__p1365311553319">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.7.2.4.1.2 "><p id="CreateLogGroup__p13653455173116">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.7.2.4.1.3 "><p id="CreateLogGroup__p465355512312">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateLogGroup__p365395510312"><strong id="CreateLogGroup__b1265325583118">Status code: 403</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__table76531755133110" frame="border" border="1" rules="all"><caption><b>Table 8 </b>Response body parameters</caption><thead align="left"><tr id="CreateLogGroup__row9653175593118"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.1"><p id="CreateLogGroup__p19654195583114">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.9.2.4.1.2"><p id="CreateLogGroup__p15654195511314">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.9.2.4.1.3"><p id="CreateLogGroup__p9654145523116">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row1965310558313"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="CreateLogGroup__p1465475513313">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="CreateLogGroup__p1565425516319">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="CreateLogGroup__p106545550316">Error code.</p>
</td>
</tr>
<tr id="CreateLogGroup__row9653155517311"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.1 "><p id="CreateLogGroup__p965485563117">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.9.2.4.1.2 "><p id="CreateLogGroup__p1165415523113">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.9.2.4.1.3 "><p id="CreateLogGroup__p16547551313">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateLogGroup__p1654555113113"><strong id="CreateLogGroup__b5654135516319">Status code: 500</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__table136542559310" frame="border" border="1" rules="all"><caption><b>Table 9 </b>Response body parameters</caption><thead align="left"><tr id="CreateLogGroup__row18654855153114"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.11.2.4.1.1"><p id="CreateLogGroup__p76549559314">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.11.2.4.1.2"><p id="CreateLogGroup__p8654655133117">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.11.2.4.1.3"><p id="CreateLogGroup__p1165405533114">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row12654195513116"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.1 "><p id="CreateLogGroup__p1865425519319">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.2 "><p id="CreateLogGroup__p3654755203119">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.11.2.4.1.3 "><p id="CreateLogGroup__p156547554311">Error code.</p>
</td>
</tr>
<tr id="CreateLogGroup__row1065425583116"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.1 "><p id="CreateLogGroup__p365575519312">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.11.2.4.1.2 "><p id="CreateLogGroup__p19655855133112">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.11.2.4.1.3 "><p id="CreateLogGroup__p0655125583112">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
<p id="CreateLogGroup__p1565519553314"><strong id="CreateLogGroup__b17655655113117">Status code: 503</strong></p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__table6655175519315" frame="border" border="1" rules="all"><caption><b>Table 10 </b>Response body parameters</caption><thead align="left"><tr id="CreateLogGroup__row18655115514311"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.13.2.4.1.1"><p id="CreateLogGroup__p16655105517318">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.4.13.2.4.1.2"><p id="CreateLogGroup__p1655125593116">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.4.13.2.4.1.3"><p id="CreateLogGroup__p36551155123111">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row156551455193113"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.1 "><p id="CreateLogGroup__p565545512311">error_code</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.2 "><p id="CreateLogGroup__p13655105563118">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.13.2.4.1.3 "><p id="CreateLogGroup__p2065545515313">Error code.</p>
</td>
</tr>
<tr id="CreateLogGroup__row13655255143115"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.1 "><p id="CreateLogGroup__p9655185514316">error_msg</p>
</td>
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.4.13.2.4.1.2 "><p id="CreateLogGroup__p9655155516313">String</p>
</td>
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.4.13.2.4.1.3 "><p id="CreateLogGroup__p136552556315">Error message.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateLogGroup__section1165518554316"><h4 class="sectiontitle">Example Requests</h4><p id="CreateLogGroup__p965565553115">Creating a log group</p>
<pre class="screen" id="CreateLogGroup__screen17655555103111">POST https://{endpoint}/v2/{project_id}/groups
{
"log_group_name" : "lts-group-01nh",
"ttl_in_days" : 7
}</pre>
</div>
<div class="section" id="CreateLogGroup__section765615520312"><h4 class="sectiontitle">Example Responses</h4><p id="CreateLogGroup__p165612554318"><strong id="CreateLogGroup__b16656165517316">Status code: 201</strong></p>
<p id="CreateLogGroup__p665615551311">The request is successful and the log group has been created.</p>
<pre class="screen" id="CreateLogGroup__screen19656135553117">{
"log_group_id" : "b6b9332b-091f-4b22-b810-264318d2d664"
}</pre>
<p id="CreateLogGroup__p065610556311"><strong id="CreateLogGroup__b1665612555317">Status code: 400</strong></p>
<p id="CreateLogGroup__p2656655183116">BadRequest. The request is invalid. Modify the request based on the description in <strong id="CreateLogGroup__b565685553117">error_msg</strong> before a retry.</p>
<pre class="screen" id="CreateLogGroup__screen12656175543114">{
"error_code" : "LTS.0009",
"error_msg" : "Failed to validate the request body"
}</pre>
<p id="CreateLogGroup__p565616554317"><strong id="CreateLogGroup__b1656655103118">Status code: 401</strong></p>
<p id="CreateLogGroup__p12656175553119">AuthFailed. Authentication failed. Check the token and try again.</p>
<pre class="screen" id="CreateLogGroup__screen465610559313">{
"error_code" : "LTS.0003",
"error_msg" : "Invalid token"
}</pre>
<p id="CreateLogGroup__p136561255143112"><strong id="CreateLogGroup__b5656165514314">Status code: 403</strong></p>
<p id="CreateLogGroup__p7656135523111">Forbidden.The request has been rejected.The server has received the request and understood it, but refuses to respond to it. The client should not repeat the request without modifications.</p>
<pre class="screen" id="CreateLogGroup__screen26561455203110">{
"error_code" : "LTS.0001",
"error_msg" : "Invalid projectId"
}</pre>
<p id="CreateLogGroup__p116561855113113"><strong id="CreateLogGroup__b196561655113110">Status code: 500</strong></p>
<p id="CreateLogGroup__p465618559315">InternalServerError.</p>
<p id="CreateLogGroup__p46562055133113">The server has received the request but encountered an internal error.</p>
<pre class="screen" id="CreateLogGroup__screen565720554315">{
"error_code" : "LTS.0102",
"error_msg" : "Failed to create log group"
}</pre>
</div>
<div class="section" id="CreateLogGroup__section176575551316"><h4 class="sectiontitle">Status Codes</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="CreateLogGroup__status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="CreateLogGroup__row1365755512319"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.7.2.1.3.1.1"><p id="CreateLogGroup__p136571655113119">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.7.2.1.3.1.2"><p id="CreateLogGroup__p17657205563111">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="CreateLogGroup__row4657105516315"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateLogGroup__p46571559318">201</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateLogGroup__p96571255143113">The request is successful and the log group has been created.</p>
</td>
</tr>
<tr id="CreateLogGroup__row126571955173111"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateLogGroup__p1665712551318">400</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateLogGroup__p183135503112">BadRequest. The request is invalid. Modify the request based on the description in <strong id="CreateLogGroup__b198313553312">error_msg</strong> before a retry.</p>
</td>
</tr>
<tr id="CreateLogGroup__row10657115593112"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateLogGroup__p188311455183113">401</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateLogGroup__p138314552314">AuthFailed. Authentication failed. Check the token and try again.</p>
</td>
</tr>
<tr id="CreateLogGroup__row8657175583115"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateLogGroup__p18831195518315">403</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateLogGroup__p7831145519319">Forbidden.The request has been rejected.The server has received the request and understood it, but refuses to respond to it. The client should not repeat the request without modifications.</p>
</td>
</tr>
<tr id="CreateLogGroup__row1265710551315"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateLogGroup__p4831155511315">500</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateLogGroup__p783117556312">InternalServerError.</p>
<p id="CreateLogGroup__p178311755143111">The server has received the request but encountered an internal error.</p>
</td>
</tr>
<tr id="CreateLogGroup__row26579552315"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.7.2.1.3.1.1 "><p id="CreateLogGroup__p3831955133111">503</p>
</td>
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.7.2.1.3.1.2 "><p id="CreateLogGroup__p15831355113118">ServiceUnavailable.</p>
<p id="CreateLogGroup__p7831195514315">The requested service is unavailable.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="CreateLogGroup__section1083175513316"><h4 class="sectiontitle">Error Codes</h4><p id="CreateLogGroup__p083111554312">See <a href="ErrorCode.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="lts_api_0011.html">Log Group Management</a></div>
</div>
</div>