doc-exports/docs/rds/api-ref/rds_log_0002.html
Ru, Li Yi 48f239743a rds_api
Reviewed-by: Boka, Ladislav <ladislav.boka@t-systems.com>
Co-authored-by: Ru, Li Yi <liyiru7@huawei.com>
Co-committed-by: Ru, Li Yi <liyiru7@huawei.com>
2024-02-05 10:08:10 +00:00

84 lines
7.6 KiB
HTML

<a name="rds_log_0002"></a><a name="rds_log_0002"></a>
<h1 class="topictitle1">Querying the Policy for SQL Audit Logs</h1>
<div id="body1569294095034"><div class="section" id="rds_log_0002__section61759636"><h4 class="sectiontitle">Function</h4><p id="rds_log_0002__p33831530">This API is used to query the policy for SQL audit logs.</p>
<ul id="rds_log_0002__ul12259155218373"><li id="rds_log_0002__en-us_topic_0240111818_li836513175363">Before calling an API, you need to understand the API in <a href="rds_03_0001.html">Authentication</a>.</li><li id="rds_log_0002__en-us_topic_0240111818_li1991981933613">Before calling this API, obtain the required <a href="https://docs.otc.t-systems.com/en-us/endpoint/index.html" target="_blank" rel="noopener noreferrer">region and endpoint</a>.</li></ul>
</div>
<div class="section" id="rds_log_0002__section13341536702"><h4 class="sectiontitle">Constraints</h4><p id="rds_log_0002__en-us_topic_0000001496953953_p121571021134413">This API is available only to RDS for MySQL.</p>
</div>
<div class="section" id="rds_log_0002__section18965813"><h4 class="sectiontitle">URI</h4><ul id="rds_log_0002__ul13194498"><li id="rds_log_0002__li41603465301">URI format<p id="rds_log_0002__p11160246123012"><a name="rds_log_0002__li41603465301"></a><a name="li41603465301"></a>GET https://{<em id="rds_log_0002__i11252164981618">Endpoint</em>}/v3/{project_id}/instances/{instance_id}/auditlog-policy</p>
</li></ul>
<ul id="rds_log_0002__ul55999443"><li id="rds_log_0002__li21405046">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_log_0002__table65777232" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_log_0002__row46529701"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.3.1.1.2.4.1.1"><p id="rds_log_0002__p10809459"><strong id="rds_log_0002__b182142815319">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.3.1.1.2.4.1.2"><p id="rds_log_0002__p3150961"><strong id="rds_log_0002__b1113402913312">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.3.1.1.2.4.1.3"><p id="rds_log_0002__p53901255"><strong id="rds_log_0002__b3581430193117">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_log_0002__row3925534"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_log_0002__p49532829">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_log_0002__p52736237">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_log_0002__p43776822">Specifies the project ID of a tenant in a region.</p>
<p id="rds_log_0002__p75911521266">For details about how to obtain the project ID, see <a href="rds_03_0002.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="rds_log_0002__row5911165722911"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.3.1.1.2.4.1.1 "><p id="rds_log_0002__p41557789155220">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.3.1.1.2.4.1.2 "><p id="rds_log_0002__p10737742155220">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.3.1.1.2.4.1.3 "><p id="rds_log_0002__p64450739155220">Specifies the DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_log_0002__section36474591"><h4 class="sectiontitle">Request</h4><ul id="rds_log_0002__ul1183180183717"><li id="rds_log_0002__li1283110163719">Request parameters<p id="rds_log_0002__p848415163614"><a name="rds_log_0002__li1283110163719"></a><a name="li1283110163719"></a>None</p>
</li></ul>
<ul id="rds_log_0002__ul1479415561582"><li id="rds_log_0002__li4411135064210">Example<p id="rds_log_0002__p1454414211213"><a name="rds_log_0002__li4411135064210"></a><a name="li4411135064210"></a>GET https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/auditlog-policy</p>
</li></ul>
</div>
<div class="section" id="rds_log_0002__section59835867"><h4 class="sectiontitle">Response</h4><ul id="rds_log_0002__ul66273227"><li id="rds_log_0002__li59588135">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_log_0002__table29752153" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="rds_log_0002__row62070345"><th align="left" class="cellrowborder" valign="top" width="23.880000000000003%" id="mcps1.3.5.2.1.1.2.4.1.1"><p id="rds_log_0002__p61642077"><strong id="rds_log_0002__b1958174616315">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="31.119999999999997%" id="mcps1.3.5.2.1.1.2.4.1.2"><p id="rds_log_0002__p26952341"><strong id="rds_log_0002__b832447193116">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.5.2.1.1.2.4.1.3"><p id="rds_log_0002__p35656026"><strong id="rds_log_0002__b1780274733117">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_log_0002__row49943891183823"><td class="cellrowborder" valign="top" width="23.880000000000003%" headers="mcps1.3.5.2.1.1.2.4.1.1 "><p id="rds_log_0002__p186111553257">keep_days</p>
</td>
<td class="cellrowborder" valign="top" width="31.119999999999997%" headers="mcps1.3.5.2.1.1.2.4.1.2 "><p id="rds_log_0002__p28299952183823">Integer</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.5.2.1.1.2.4.1.3 "><p id="rds_log_0002__p9886152615558">Specifies the number of days for storing audit logs. The value is <strong id="rds_log_0002__b125769251473">0</strong> when SQL audit is disabled.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="rds_log_0002__ul26818564"><li id="rds_log_0002__li40040492">Example normal response<pre class="codeblock" id="rds_log_0002__codeblock1246522131615">{
"keep_days":7
}</pre>
</li><li id="rds_log_0002__li1953636143515">Abnormal response<p id="rds_log_0002__p46896054"><a name="rds_log_0002__li1953636143515"></a><a name="li1953636143515"></a>For details, see <a href="en-us_topic_0032488197.html">Abnormal Request Results</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_log_0002__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_log_0002__en-us_topic_0032347778_ul7858132212142"><li id="rds_log_0002__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_log_0002__en-us_topic_0032347778_p1040982941020"><a name="rds_log_0002__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
</li><li id="rds_log_0002__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_log_0002__en-us_topic_0032347778_p0723374409"><a name="rds_log_0002__en-us_topic_0032347778_li11583183218149"></a><a name="en-us_topic_0032347778_li11583183218149"></a>For details, see <a href="en-us_topic_0032488240.html">Status Codes</a>.</p>
</li></ul>
</div>
<div class="section" id="rds_log_0002__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_log_0002__en-us_topic_0032347778_p19357163913406">For details, see <a href="en-us_topic_0032488241.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0056887472.html">Log Information Queries</a></div>
</div>
</div>