Files
doc-exports/docs/rds/api-ref/rds_06_0040.html
wangdengke2 1ddaec1a62 rds_api
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>
2026-01-29 11:28:26 +00:00

144 lines
12 KiB
HTML

<a name="rds_06_0040"></a><a name="rds_06_0040"></a>
<h1 class="topictitle1">Querying Tags of a DB Instance</h1>
<div id="body0000002507104461"><div class="section" id="rds_06_0040__section61759636"><h4 class="sectiontitle">Function</h4><p id="rds_06_0040__en-us_topic_0000001866567452_p33831530">This API is used to query tags of a DB instance.</p>
<ul id="rds_06_0040__ul12259155218373"><li id="rds_06_0040__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_06_0040__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_06_0040__section18965813"><h4 class="sectiontitle">URI</h4><ul id="rds_06_0040__ul13194498"><li id="rds_06_0040__li41603465301">URI format<p id="rds_06_0040__p11160246123012"><a name="rds_06_0040__li41603465301"></a><a name="li41603465301"></a>GET https://{<em id="rds_06_0040__i11252164981618">Endpoint</em>}/v3/{project_id}/instances/{instance_id}/tags</p>
</li></ul>
<ul id="rds_06_0040__ul55999443"><li id="rds_06_0040__li21405046">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0040__table65777232" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="rds_06_0040__row46529701"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.3.1.1.2.4.1.1"><p id="rds_06_0040__p10809459"><strong id="rds_06_0040__b187019143305">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="26.27262726272627%" id="mcps1.3.2.3.1.1.2.4.1.2"><p id="rds_06_0040__p3150961"><strong id="rds_06_0040__b19488131511308">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="40.39403940394039%" id="mcps1.3.2.3.1.1.2.4.1.3"><p id="rds_06_0040__p53901255"><strong id="rds_06_0040__b1131015162308">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_06_0040__row3925534"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0040__p49532829">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.27262726272627%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0040__p52736237">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="40.39403940394039%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0040__p43776822">Specifies the project ID of a tenant in a region.</p>
<p id="rds_06_0040__p186761044260">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_06_0040__row115691109590"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.3.1.1.2.4.1.1 "><p id="rds_06_0040__en-us_topic_0000001866567452_p326819915179">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="26.27262726272627%" headers="mcps1.3.2.3.1.1.2.4.1.2 "><p id="rds_06_0040__en-us_topic_0000001866567452_p1726813931717">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="40.39403940394039%" headers="mcps1.3.2.3.1.1.2.4.1.3 "><p id="rds_06_0040__p64450739155220">Specifies the DB instance ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="rds_06_0040__section36474591"><h4 class="sectiontitle">Request</h4><ul id="rds_06_0040__en-us_topic_0000001866567452_ul1183180183717"><li id="rds_06_0040__en-us_topic_0000001866567452_li1283110163719">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0040__table12536623333" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="rds_06_0040__row153612211337"><th align="left" class="cellrowborder" valign="top" width="19.7%" id="mcps1.3.3.2.1.1.2.5.1.1"><p id="rds_06_0040__p95111733143318">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.780000000000001%" id="mcps1.3.3.2.1.1.2.5.1.2"><p id="rds_06_0040__p13511123373311">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.3.2.1.1.2.5.1.3"><p id="rds_06_0040__p125111433133312">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="53.559999999999995%" id="mcps1.3.3.2.1.1.2.5.1.4"><p id="rds_06_0040__p551110331335">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="rds_06_0040__row05378213331"><td class="cellrowborder" valign="top" width="19.7%" headers="mcps1.3.3.2.1.1.2.5.1.1 "><p id="rds_06_0040__p1163015550331">X-Auth-Token</p>
</td>
<td class="cellrowborder" valign="top" width="13.780000000000001%" headers="mcps1.3.3.2.1.1.2.5.1.2 "><p id="rds_06_0040__p1963035563316">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.3.2.1.1.2.5.1.3 "><p id="rds_06_0040__p1630105520331">String</p>
</td>
<td class="cellrowborder" valign="top" width="53.559999999999995%" headers="mcps1.3.3.2.1.1.2.5.1.4 "><p id="rds_06_0040__p1086851153317">Specifies the user token.</p>
<p id="rds_06_0040__p1057635831">The user token is a response to the API used to <a href="https://docs.otc.t-systems.com/en-us/api/iam/en-us_topic_0057845583.html" target="_blank" rel="noopener noreferrer">obtain a user token</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="rds_06_0040__en-us_topic_0000001866567452_li4411135064210">URI example<pre class="screen" id="rds_06_0040__screen438854619339">GET https://rds.eu-de.otc.t-systems.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/ab67f50938cb4d189cc2163ca0098fe7in03/tags</pre>
</li></ul>
</div>
<div class="section" id="rds_06_0040__section59835867"><h4 class="sectiontitle">Response</h4><ul id="rds_06_0040__ul66273227"><li id="rds_06_0040__li59588135">Normal response
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0040__table29752153" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Parameter description</caption><thead align="left"><tr id="rds_06_0040__row62070345"><th align="left" class="cellrowborder" valign="top" width="23.880000000000003%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="rds_06_0040__p61642077"><strong id="rds_06_0040__b1532763217309">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="31.119999999999997%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="rds_06_0040__p26952341"><strong id="rds_06_0040__b71301733193011">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="rds_06_0040__p35656026"><strong id="rds_06_0040__b1110513412301">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_06_0040__row49943891183823"><td class="cellrowborder" valign="top" width="23.880000000000003%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="rds_06_0040__p186111553257">tags</p>
</td>
<td class="cellrowborder" valign="top" width="31.119999999999997%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="rds_06_0040__p28299952183823">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="rds_06_0040__p9886152615558">Specifies the tag list. If there is no tag in the list, an empty array is returned.</p>
<p id="rds_06_0040__p135166102018">For details, see <a href="#rds_06_0040__table136451019132019">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="rds_06_0040__table136451019132019"></a><a name="table136451019132019"></a><table cellpadding="4" cellspacing="0" summary="" id="rds_06_0040__table136451019132019" frame="border" border="1" rules="all"><caption><b>Table 4 </b>tags field data structure description</caption><thead align="left"><tr id="rds_06_0040__row166461119162020"><th align="left" class="cellrowborder" valign="top" width="23.880000000000003%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="rds_06_0040__p1064681915209"><strong id="rds_06_0040__b493552118316">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="31.119999999999997%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="rds_06_0040__p19646171992011"><strong id="rds_06_0040__b165052220316">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="rds_06_0040__p16461119122018"><strong id="rds_06_0040__b1430310230314">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="rds_06_0040__row16465196207"><td class="cellrowborder" valign="top" width="23.880000000000003%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0040__p166464198203">key</p>
</td>
<td class="cellrowborder" valign="top" width="31.119999999999997%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0040__p1764691942013">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0040__p16646111922010">Specifies the tag key.</p>
</td>
</tr>
<tr id="rds_06_0040__row69991455218"><td class="cellrowborder" valign="top" width="23.880000000000003%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0040__p1401367212">values</p>
</td>
<td class="cellrowborder" valign="top" width="31.119999999999997%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0040__p120769211">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0040__p505632115">Specifies the lists the tag values.</p>
</td>
</tr>
<tr id="rds_06_0040__row11192182510120"><td class="cellrowborder" valign="top" width="23.880000000000003%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="rds_06_0040__en-us_topic_0000001866567452_p5918555192014">tag_type</p>
</td>
<td class="cellrowborder" valign="top" width="31.119999999999997%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="rds_06_0040__en-us_topic_0000001866567452_p1991875516201">String</p>
</td>
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="rds_06_0040__p9192132515111">Tag type.</p>
<p id="rds_06_0040__en-us_topic_0000001866567452_p1791805532014">Enumerated values: <strong id="rds_06_0040__b1633941222618">user</strong> and <strong id="rds_06_0040__b10344191572615">system</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="rds_06_0040__ul26818564"><li id="rds_06_0040__li40040492">Example normal response<pre class="screen" id="rds_06_0040__en-us_topic_0000001866567452_screen4493144652320">{
"tags": [{
"key": "keyName",
"value": "keyValue",
"tag_type": "user"
}]
}</pre>
</li><li id="rds_06_0040__li1953636143515">Abnormal Response<p id="rds_06_0040__p46896054"><a name="rds_06_0040__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_06_0040__section4778540915440"><h4 class="sectiontitle">Status Code</h4><ul id="rds_06_0040__en-us_topic_0032347778_ul7858132212142"><li id="rds_06_0040__en-us_topic_0032347778_li58581622171411">Normal<p id="rds_06_0040__en-us_topic_0032347778_p1040982941020"><a name="rds_06_0040__en-us_topic_0032347778_li58581622171411"></a><a name="en-us_topic_0032347778_li58581622171411"></a>200</p>
</li><li id="rds_06_0040__en-us_topic_0032347778_li11583183218149">Abnormal<p id="rds_06_0040__en-us_topic_0032347778_p0723374409"><a name="rds_06_0040__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_06_0040__section1183074220016"><h4 class="sectiontitle">Error Code</h4><p id="rds_06_0040__en-us_topic_0032347778_p19357163913406">For details, see <a href="en-us_topic_0032488241.html">Error Codes</a>.</p>
</div>
<p id="rds_06_0040__p8060118"></p>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="rds_06_0036.html">Tag Management</a></div>
</div>
</div>