forked from docs/doc-exports
Reviewed-by: Gladkov, Maksim <mgladkov@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: wangdengke2 <wangdengke2@huawei.com> Co-committed-by: wangdengke2 <wangdengke2@huawei.com>
177 lines
14 KiB
HTML
177 lines
14 KiB
HTML
<a name="dds_api_024"></a><a name="dds_api_024"></a>
|
|
|
|
<h1 class="topictitle1">Associating an Instance with an LTS Log Stream</h1>
|
|
<div id="body0000002107112644"><div class="section" id="dds_api_024__section4894192115617"><h4 class="sectiontitle">API Description</h4><p id="dds_api_024__p822013246134">After you have associated an instance with a Log Tank Service (LTS) log stream, logs of the instance are automatically uploaded to the associated LTS log stream. You will be billed for log reporting. For details, see LTS pricing details. After a specific log stream is selected, the system creates a structuring rule of the required log type for it.</p>
|
|
</div>
|
|
<div class="section" id="dds_api_024__section19948737115417"><h4 class="sectiontitle">Restrictions</h4><ul id="dds_api_024__ul16955109148"><li id="dds_api_024__li189501015144">This operation cannot be performed on instances in the creating, deleted, or frozen state.</li><li id="dds_api_024__li149514102143">A maximum of 100 data records are supported.</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_024__section1389616295612"><h4 class="sectiontitle">URI</h4><ul id="dds_api_024__ul791121595"><li id="dds_api_024__li591812155912">URI format<p id="dds_api_024__p128004751418"><a name="dds_api_024__li591812155912"></a><a name="li591812155912"></a>POST https://{Endpoint}/v3/{project_id}/instances/logs/lts-configs</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_024__table1438681574215" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="dds_api_024__row153861315124219"><th align="left" class="cellrowborder" valign="top" width="19.900000000000002%" id="mcps1.3.3.2.1.2.2.5.1.1"><p id="dds_api_024__p88294471429"><strong id="dds_api_024__b1182984754216">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.96%" id="mcps1.3.3.2.1.2.2.5.1.2"><p id="dds_api_024__p10829114704218"><strong id="dds_api_024__b1882974794214">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.900000000000002%" id="mcps1.3.3.2.1.2.2.5.1.3"><p id="dds_api_024__p482924794219"><strong id="dds_api_024__b138296479423">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40.239999999999995%" id="mcps1.3.3.2.1.2.2.5.1.4"><p id="dds_api_024__p2082994714425">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_024__row133871415174214"><td class="cellrowborder" valign="top" width="19.900000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.1 "><p id="dds_api_024__p639832517565">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.96%" headers="mcps1.3.3.2.1.2.2.5.1.2 "><p id="dds_api_024__p239862515562">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.900000000000002%" headers="mcps1.3.3.2.1.2.2.5.1.3 "><p id="dds_api_024__p439822513563">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40.239999999999995%" headers="mcps1.3.3.2.1.2.2.5.1.4 "><p id="dds_api_024__p77587571027">Project ID of a tenant in a region. To obtain the project ID, see <a href="dds_projectid.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_024__table23896261404" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="dds_api_024__row93889261102"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.3.2.5.1.1"><p id="dds_api_024__p1538710261103"><strong id="dds_api_024__b1860418723011">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.3.2.5.1.2"><p id="dds_api_024__p133871026302"><strong id="dds_api_024__b159153810309">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.2.1.3.2.5.1.3"><p id="dds_api_024__p143880261108"><strong id="dds_api_024__b182010107301">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.2.1.3.2.5.1.4"><p id="dds_api_024__p6388112615015">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_024__row6388326307"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.3.2.5.1.1 "><p id="dds_api_024__p1838813261804">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.3.2.5.1.2 "><p id="dds_api_024__p1938814261015">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.2.1.3.2.5.1.3 "><p id="dds_api_024__p338820261201">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.2.1.3.2.5.1.4 "><p id="dds_api_024__p1873515157396">User token obtained from IAM.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_024__section187659393189"><h4 class="sectiontitle">Requests</h4><ul id="dds_api_024__ul169379231585"><li id="dds_api_024__li10937162315588">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_024__table228903751753" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Request body parameters</caption><thead align="left"><tr id="dds_api_024__row70524471753"><th align="left" class="cellrowborder" valign="top" width="19.98%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="dds_api_024__p343772981753">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.22%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="dds_api_024__p636754041753"><strong id="dds_api_024__b10556430103020">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.119999999999997%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="dds_api_024__p330977911753"><strong id="dds_api_024__b159881231133011">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.68%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="dds_api_024__p574120414014">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_024__row1084181052117"><td class="cellrowborder" valign="top" width="19.98%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="dds_api_024__p132475114219">lts_configs</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.22%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="dds_api_024__p524713116213">Array of <a href="#dds_api_024__table134061651112112">Table 4</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.119999999999997%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="dds_api_024__p19247911102118">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.68%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="dds_api_024__p1224701113213">Each item indicates an LTS configuration for the instance.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="dds_api_024__table134061651112112"></a><a name="table134061651112112"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_api_024__table134061651112112" frame="border" border="1" rules="all"><caption><b>Table 4 </b>lts_configs</caption><thead align="left"><tr id="dds_api_024__row44088517216"><th align="left" class="cellrowborder" valign="top" width="20.04%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="dds_api_024__p3776454132111">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20.09%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="dds_api_024__p777614542217"><strong id="dds_api_024__b2125953071">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.58%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="dds_api_024__p16776854122120"><strong id="dds_api_024__b1893371781">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="44.29%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="dds_api_024__p277615462115">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_024__row0408185132112"><td class="cellrowborder" valign="top" width="20.04%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="dds_api_024__p0482101218234">instance_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.09%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="dds_api_024__p1967892192311">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.58%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="dds_api_024__p1574672815231">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.29%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="dds_api_024__p048361211234">DDS Instance ID, which can be obtained by calling the API for querying instances and details. If there are no instances available, create one by calling the API used for creating an instance.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_024__row240845102114"><td class="cellrowborder" valign="top" width="20.04%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="dds_api_024__p048314128233">log_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.09%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="dds_api_024__p767882132317">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.58%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="dds_api_024__p374613284238">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.29%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="dds_api_024__p695443319328">LTS log type. This parameter cannot be left empty. The only supported option is <strong id="dds_api_024__b546311264174">audit_log</strong>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_024__row11408115122118"><td class="cellrowborder" valign="top" width="20.04%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="dds_api_024__p3484171219239">lts_group_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.09%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="dds_api_024__p1067882111237">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.58%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="dds_api_024__p8746122862310">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.29%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="dds_api_024__p18484111219235">LTS log group ID. You can obtain the value using the LTS API for querying all log groups under an account.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_024__row1040811517215"><td class="cellrowborder" valign="top" width="20.04%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="dds_api_024__p1148521215233">lts_stream_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20.09%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="dds_api_024__p146782216235">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.58%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="dds_api_024__p107461328152317">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="44.29%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="dds_api_024__p4485312152313">LTS log stream ID. You can obtain the value using the LTS API for querying all log streams in a specified log group.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="dds_api_024__li73231939125810">Example request<p id="dds_api_024__p67615443584"><a name="dds_api_024__li73231939125810"></a><a name="li73231939125810"></a>Enabling audit log reporting to LTS for a DB instance</p>
|
|
<p id="dds_api_024__p2253559102417">POST https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/logs/lts-configs</p>
|
|
<pre class="screen" id="dds_api_024__screen21831119122613">{
|
|
"lts_configs" : [ {
|
|
"instance_id" : "520c58ba00a3497e97ce0b9604874dd6in02",
|
|
"log_type" : "audit_log",
|
|
"lts_group_id" : "ec6dc499-1a63-4229-a0c2-a2afa8bcfc95",
|
|
"lts_stream_id" : "cae69d2e-378b-41dd-b3c9-3ca1cd5335bc"
|
|
} ]
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_024__section15939152205612"><h4 class="sectiontitle">Responses</h4><ul id="dds_api_024__ul18539131631517"><li id="dds_api_024__li15539916121519">Parameter description<p id="dds_api_024__p1872542342713"><a name="dds_api_024__li15539916121519"></a><a name="li15539916121519"></a>None</p>
|
|
</li></ul>
|
|
<ul id="dds_api_024__ul16464105314172"><li id="dds_api_024__li124649532175">Example response<p id="dds_api_024__p123858310275"><a name="dds_api_024__li124649532175"></a><a name="li124649532175"></a>None</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="dds_api_024__section10950024562"><h4 class="sectiontitle">Status Code</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_024__table346mcpsimp" frame="border" border="1" rules="all"><thead align="left"><tr id="dds_api_024__row351mcpsimp"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.6.2.1.3.1.1"><p id="dds_api_024__p353mcpsimp">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.6.2.1.3.1.2"><p id="dds_api_024__p355mcpsimp">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="dds_api_024__row357mcpsimp"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.6.2.1.3.1.1 "><p id="dds_api_024__p359mcpsimp">202</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.6.2.1.3.1.2 "><p id="dds_api_024__p361mcpsimp">Accepted.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="dds_api_024__row362mcpsimp"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.6.2.1.3.1.1 "><p id="dds_api_024__p364mcpsimp">default</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.6.2.1.3.1.2 "><p id="dds_api_024__p157499514151">Client or server error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="dds_api_024__section8954192115620"><h4 class="sectiontitle">Error Code</h4><p id="dds_api_024__en-us_topic_0122053819_p20466124120334">For details, see <a href="dds_error_code.html">Error Code</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="dds_instance_mgmt.html">DB Instance Management</a></div>
|
|
</div>
|
|
</div>
|
|
|