doc-exports/docs/dds/api-ref/dds_api_0034.html
Wang , Deng Ke 60010eb9d0 dds api 2.0.38sp24 version
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Wang , Deng Ke <wangdengke2@huawei.com>
Co-committed-by: Wang , Deng Ke <wangdengke2@huawei.com>
2023-01-13 08:55:41 +00:00

124 lines
9.0 KiB
HTML

<a name="dds_api_0034"></a><a name="dds_api_0034"></a>
<h1 class="topictitle1">Querying Resource Tags</h1>
<div id="body1547809338881"><div class="section" id="dds_api_0034__section1559134316558"><h4 class="sectiontitle">Function</h4><p id="dds_api_0034__p983874311551">This API is used to query tags of a specified resource.</p>
</div>
<div class="section" id="dds_api_0034__section1239972118494"><h4 class="sectiontitle">Constraints</h4><p id="dds_api_0034__p677683901412">A maximum of 20 tags can be added to a DB instance. The tag key must be unique.</p>
</div>
<div class="section" id="dds_api_0034__section115922043135519"><h4 class="sectiontitle">URI</h4><ul id="dds_api_0034__ul483817436558"><li id="dds_api_0034__li15838134316551">URI format<p id="dds_api_0034__p13838184317558"><a name="dds_api_0034__li15838134316551"></a><a name="li15838134316551"></a>GET https://{Endpoint}/v3/{project_id}/instances/{instance_id}/tags</p>
</li><li id="dds_api_0034__li9839184319552">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0034__table56221343185511" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0034__row18411743175514"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.3.2.2.1.2.4.1.1"><p id="dds_api_0034__p14841143135511">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.16%" id="mcps1.3.3.2.2.1.2.4.1.2"><p id="dds_api_0034__p18421743135518">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="61.62%" id="mcps1.3.3.2.2.1.2.4.1.3"><p id="dds_api_0034__p2775334615440">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0034__row78423438556"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.3.2.2.1.2.4.1.1 "><p id="dds_api_0034__p18422043175515">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.16%" headers="mcps1.3.3.2.2.1.2.4.1.2 "><p id="dds_api_0034__p11842943155517">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="61.62%" headers="mcps1.3.3.2.2.1.2.4.1.3 "><p id="dds_api_0034__p1184234385515">Specifies the project ID of a tenant in a region.</p>
</td>
</tr>
<tr id="dds_api_0034__row10842194317555"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.3.2.2.1.2.4.1.1 "><p id="dds_api_0034__p178422430559">instance_id</p>
</td>
<td class="cellrowborder" valign="top" width="16.16%" headers="mcps1.3.3.2.2.1.2.4.1.2 "><p id="dds_api_0034__p1584212434557">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="61.62%" headers="mcps1.3.3.2.2.1.2.4.1.3 "><p id="dds_api_0034__p184274318553">Specifies the instance ID, which can be obtained by calling the API for querying instances. If you do not have an instance, you can call the API used for creating an instance.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="dds_api_0034__section26368437555"><h4 class="sectiontitle">Requests</h4><ul id="dds_api_0034__ul1285619333011"><li id="dds_api_0034__li2856203203014">Example request<p id="dds_api_0034__p14886141642015"><a name="dds_api_0034__li2856203203014"></a><a name="li2856203203014"></a>GET https://dds.eu-de.otc.t-systems.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/instances/cc6345c64cec47499182467ea0dd432ain02/tags</p>
</li></ul>
</div>
<div class="section" id="dds_api_0034__section664084385511"><h4 class="sectiontitle">Responses</h4><ul id="dds_api_0034__ul1584454385515"><li id="dds_api_0034__li484411430555">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0034__table96532433558" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="dds_api_0034__row28441543155513"><th align="left" class="cellrowborder" valign="top" width="20.62206220622062%" id="mcps1.3.5.2.1.1.2.5.1.1"><p id="dds_api_0034__p13844134311555">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.46154615461546%" id="mcps1.3.5.2.1.1.2.5.1.2"><p id="dds_api_0034__p1184414313558">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.77257725772577%" id="mcps1.3.5.2.1.1.2.5.1.3"><p id="dds_api_0034__p1844124305517">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.14381438143815%" id="mcps1.3.5.2.1.1.2.5.1.4"><p id="dds_api_0034__p986815159613">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0034__row284404395518"><td class="cellrowborder" valign="top" width="20.62206220622062%" headers="mcps1.3.5.2.1.1.2.5.1.1 "><p id="dds_api_0034__p18844114319553">tags</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.5.2.1.1.2.5.1.2 "><p id="dds_api_0034__p1884434314554">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25.77257725772577%" headers="mcps1.3.5.2.1.1.2.5.1.3 "><p id="dds_api_0034__p1696111110016">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="38.14381438143815%" headers="mcps1.3.5.2.1.1.2.5.1.4 "><p id="dds_api_0034__p584415431552">Indicates the tag list. For more information, see <a href="#dds_api_0034__table066514318552">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="dds_api_0034__table066514318552"></a><a name="table066514318552"></a><table cellpadding="4" cellspacing="0" summary="" id="dds_api_0034__table066514318552" frame="border" border="1" rules="all"><caption><b>Table 3 </b>tags field data structure description</caption><thead align="left"><tr id="dds_api_0034__row3844124313554"><th align="left" class="cellrowborder" valign="top" width="20.62206220622062%" id="mcps1.3.5.2.1.2.2.5.1.1"><p id="dds_api_0034__p1584484312554">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.46154615461546%" id="mcps1.3.5.2.1.2.2.5.1.2"><p id="dds_api_0034__p684424320554">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.77257725772577%" id="mcps1.3.5.2.1.2.2.5.1.3"><p id="dds_api_0034__p1684434314554">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="38.14381438143815%" id="mcps1.3.5.2.1.2.2.5.1.4"><p id="dds_api_0034__p142431719262">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="dds_api_0034__row15844743115518"><td class="cellrowborder" valign="top" width="20.62206220622062%" headers="mcps1.3.5.2.1.2.2.5.1.1 "><p id="dds_api_0034__p68441843165514">key</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.5.2.1.2.2.5.1.2 "><p id="dds_api_0034__p0844194385515">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25.77257725772577%" headers="mcps1.3.5.2.1.2.2.5.1.3 "><p id="dds_api_0034__p4844154315552">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.14381438143815%" headers="mcps1.3.5.2.1.2.2.5.1.4 "><p id="dds_api_0034__p1584415435553">Indicates the tag key. The value contains 36 Unicode characters and cannot be blank.</p>
<p id="dds_api_0034__p28901137142810">Character set: 0-9, A-Z, a-z, "_", "-", and "@".</p>
</td>
</tr>
<tr id="dds_api_0034__row284444345516"><td class="cellrowborder" valign="top" width="20.62206220622062%" headers="mcps1.3.5.2.1.2.2.5.1.1 "><p id="dds_api_0034__p19844643105514">value</p>
</td>
<td class="cellrowborder" valign="top" width="15.46154615461546%" headers="mcps1.3.5.2.1.2.2.5.1.2 "><p id="dds_api_0034__p148441943135514">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25.77257725772577%" headers="mcps1.3.5.2.1.2.2.5.1.3 "><p id="dds_api_0034__p88444437551">String</p>
</td>
<td class="cellrowborder" valign="top" width="38.14381438143815%" headers="mcps1.3.5.2.1.2.2.5.1.4 "><p id="dds_api_0034__p148192818257">Indicates the tag value. The value contains a maximum of 43 Unicode characters and can also be an empty string.</p>
<p id="dds_api_0034__p144961912132510">Character set: 0-9, A-Z, a-z, "_", "-", and "@".</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="dds_api_0034__ul6844164320558"><li id="dds_api_0034__li1584424312554">Response example<pre class="codeblock" id="dds_api_0034__codeblock14386234182814">{
"tags": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value2"
}
]
}</pre>
</li></ul>
</div>
<div class="section" id="dds_api_0034__section5382712154838"><h4 class="sectiontitle">Status Code</h4><p id="dds_api_0034__dds_api_0018_p16131712193312">Status Code:200.</p>
<p id="dds_api_0034__dds_api_0018_p480617135329">For more information, see <a href="dds_status_code.html">Status Code</a>.</p>
</div>
<div class="section" id="dds_api_0034__section6522193710339"><h4 class="sectiontitle">Error Code</h4><p id="dds_api_0034__dds_api_0018_p20466124120334">For more information, 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_tag_mgmt.html">Tag Management</a></div>
</div>
</div>