doc-exports/docs/dws/api-ref/dws_02_0049.html
Lu, Huayi 24f47208ec DWS API 831.100 version
Reviewed-by: Pruthi, Vineet <vineet.pruthi@t-systems.com>
Co-authored-by: Lu, Huayi <luhuayi@huawei.com>
Co-committed-by: Lu, Huayi <luhuayi@huawei.com>
2024-10-07 10:18:56 +00:00

162 lines
13 KiB
HTML

<a name="EN-US_TOPIC_0000001231631325"></a><a name="EN-US_TOPIC_0000001231631325"></a>
<h1 class="topictitle1">Querying Resource Tags</h1>
<div id="body1524298666228"><div class="section" id="EN-US_TOPIC_0000001231631325__section1760073373414"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001231631325__p6711533113419">This API is used to query tags of a specified resource.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001231631325__section16001333163417"><h4 class="sectiontitle">URI</h4><pre class="screen" id="EN-US_TOPIC_0000001231631325__screen374515464115">GET /v1.0/{project_id}/clusters/{resource_id}/tags</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001231631325__table49221933172520" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001231631325__row149211933182516"><th align="left" class="cellrowborder" valign="top" width="15.15%" id="mcps1.3.2.3.2.5.1.1"><p id="EN-US_TOPIC_0000001231631325__p49216337252"><strong id="EN-US_TOPIC_0000001231631325__b1254714994113656">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.82%" id="mcps1.3.2.3.2.5.1.2"><p id="EN-US_TOPIC_0000001231631325__p20921103310252"><strong id="EN-US_TOPIC_0000001231631325__b84235270684256">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="12.97%" id="mcps1.3.2.3.2.5.1.3"><p id="EN-US_TOPIC_0000001231631325__p14921233162519"><strong id="EN-US_TOPIC_0000001231631325__b2096466861113656">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="62.06%" id="mcps1.3.2.3.2.5.1.4"><p id="EN-US_TOPIC_0000001231631325__p1292111339256"><strong id="EN-US_TOPIC_0000001231631325__b1440065894315">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001231631325__row1592263362519"><td class="cellrowborder" valign="top" width="15.15%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p992133318259">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="9.82%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p4921153372518">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p1592193311251">String</p>
</td>
<td class="cellrowborder" valign="top" width="62.06%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p12921833152519">Project ID. For details about how to obtain the project ID, see <a href="dws_02_0011.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row492213382510"><td class="cellrowborder" valign="top" width="15.15%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p20922113342512">resource_id</p>
</td>
<td class="cellrowborder" valign="top" width="9.82%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p992213310258">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="12.97%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p169228332254">String</p>
</td>
<td class="cellrowborder" valign="top" width="62.06%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p592211332253">Resource ID, for example, <strong id="EN-US_TOPIC_0000001231631325__b248014545113656">7d85f602-a948-4a30-afd4-e84f47471c15</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001231631325__section12341555162518"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0000001231631325__p2327135822514">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001231631325__section19928809260"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001231631325__table150191719265" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response body parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001231631325__row55018177263"><th align="left" class="cellrowborder" valign="top" width="15.27%" id="mcps1.3.4.2.2.5.1.1"><p id="EN-US_TOPIC_0000001231631325__p11501201712620"><strong id="EN-US_TOPIC_0000001231631325__b66790889113656">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.94%" id="mcps1.3.4.2.2.5.1.2"><p id="EN-US_TOPIC_0000001231631325__p13502117102619"><strong id="EN-US_TOPIC_0000001231631325__b255190890">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.580000000000002%" id="mcps1.3.4.2.2.5.1.3"><p id="EN-US_TOPIC_0000001231631325__p25021917192616"><strong id="EN-US_TOPIC_0000001231631325__b19693371113656">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.21000000000001%" id="mcps1.3.4.2.2.5.1.4"><p id="EN-US_TOPIC_0000001231631325__p550271702616"><strong id="EN-US_TOPIC_0000001231631325__b1694121019445">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001231631325__row15502217112618"><td class="cellrowborder" valign="top" width="15.27%" headers="mcps1.3.4.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p175021517132618">tags</p>
</td>
<td class="cellrowborder" valign="top" width="9.94%" headers="mcps1.3.4.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p55021217162616">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.580000000000002%" headers="mcps1.3.4.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p350217172264">List&lt;<a href="#EN-US_TOPIC_0000001231631325__table1150361719261">resource_tag</a>&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="57.21000000000001%" headers="mcps1.3.4.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p12502191711261">Tag list.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001231631325__table1150361719261"></a><a name="table1150361719261"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001231631325__table1150361719261" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0000001231631325__b84235270695528">resource_tag</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001231631325__row95031217142612"><th align="left" class="cellrowborder" valign="top" width="15.391539153915392%" id="mcps1.3.4.3.2.5.1.1"><p id="EN-US_TOPIC_0000001231631325__p550310176267"><strong id="EN-US_TOPIC_0000001231631325__b0564151318442">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.700970097009701%" id="mcps1.3.4.3.2.5.1.2"><p id="EN-US_TOPIC_0000001231631325__p14503121742618"><strong id="EN-US_TOPIC_0000001231631325__b1869496516">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.04180418041804%" id="mcps1.3.4.3.2.5.1.3"><p id="EN-US_TOPIC_0000001231631325__p1450381722611"><strong id="EN-US_TOPIC_0000001231631325__b735753752113656">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.86568656865686%" id="mcps1.3.4.3.2.5.1.4"><p id="EN-US_TOPIC_0000001231631325__p1350415178269"><strong id="EN-US_TOPIC_0000001231631325__b16901151554410">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001231631325__row15504151782615"><td class="cellrowborder" valign="top" width="15.391539153915392%" headers="mcps1.3.4.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p2504121717265">key</p>
</td>
<td class="cellrowborder" valign="top" width="9.700970097009701%" headers="mcps1.3.4.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p1150417178265">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.04180418041804%" headers="mcps1.3.4.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p2504161722618">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.86568656865686%" headers="mcps1.3.4.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p950411722614">Key. A tag key can contain a maximum of 36 Unicode characters, which cannot be null. The first and last characters cannot be spaces. </p>
<p id="EN-US_TOPIC_0000001231631325__p20504417172612">It can contain uppercase letters (A to Z), lowercase letters (a to z), digits (0-9), hyphens (-), and underscores (_).</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row18504111713263"><td class="cellrowborder" valign="top" width="15.391539153915392%" headers="mcps1.3.4.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p165051117192611">value</p>
</td>
<td class="cellrowborder" valign="top" width="9.700970097009701%" headers="mcps1.3.4.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p17505131718267">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.04180418041804%" headers="mcps1.3.4.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p13505101712261">String</p>
</td>
<td class="cellrowborder" valign="top" width="56.86568656865686%" headers="mcps1.3.4.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p45051177262">Key value. A tag value can contain a maximum of 43 Unicode characters, which can be null. The first and last characters cannot be spaces. It can contain uppercase letters (A to Z), lowercase letters (a to z), digits (0-9), hyphens (-), and underscores (_).</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001231631325__section4615033123413"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0000001231631325__screen106151142164916">GET /v1.0/89cd04f168b84af6be287f71730fdb4b/clusters/7d85f602-a948-4a30-afd4-e84f47471c15/tags</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001231631325__section10616123373417"><h4 class="sectiontitle">Example Responses</h4><pre class="screen" id="EN-US_TOPIC_0000001231631325__screen128485935015">{
"tags": [
{
"key": "Flower",
"value": "rose"
},
{
"key": "Food",
"value": "pie"
}
]
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001231631325__section263463323410"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001231631325__table3639133318349" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001231631325__row571512332344"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.7.2.1.3.1.1"><p id="EN-US_TOPIC_0000001231631325__p167151633193412"><strong id="EN-US_TOPIC_0000001231631325__b84235270615197">Returned Value</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.7.2.1.3.1.2"><p id="EN-US_TOPIC_0000001231631325__p14715143353418"><strong id="EN-US_TOPIC_0000001231631325__b1167611211445">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001231631325__row12483161132713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p848371132719">200</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p114831713277">OK</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row2715123333416"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p6715433113411">400</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p87151233203417">Invalid parameter.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row1271563353412"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p4715163317341">401</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p3715173310345">Authentication failed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row16715123333418"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p117151533173418">403</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p197151733133413">Insufficient permission.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row5715193311349"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p1571523383414">404</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p671533311340">No resources found.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row3715203317345"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p1715163373410">500</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.7.2.1.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p117154336340">Internal service error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="dws_02_0045.html">Tag Management APIs</a></div>
</div>
</div>