doc-exports/docs/dws/api-ref/dws_02_0049.html
Lu, Huayi 3d88b677fd DWS API 830.201 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-05-10 13:18:08 +00:00

159 lines
14 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><ul id="EN-US_TOPIC_0000001231631325__ul16711733183412"><li id="EN-US_TOPIC_0000001231631325__li571133373419">URI format<pre class="screen" id="EN-US_TOPIC_0000001231631325__screen374515464115">GET /v1.0/{project_id}/clusters/{resource_id}/tags</pre>
</li><li id="EN-US_TOPIC_0000001231631325__li971314335341">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001231631325__table12608933133410" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001231631325__row97131335343"><th align="left" class="cellrowborder" valign="top" width="19.801980198019802%" id="mcps1.3.2.2.2.1.2.5.1.1"><p id="EN-US_TOPIC_0000001231631325__p17135334341"><strong id="EN-US_TOPIC_0000001231631325__b193550114310">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.861386138613863%" id="mcps1.3.2.2.2.1.2.5.1.2"><p id="EN-US_TOPIC_0000001231631325__p5713733113415"><strong id="EN-US_TOPIC_0000001231631325__b84235270684256">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.841584158415841%" id="mcps1.3.2.2.2.1.2.5.1.3"><p id="EN-US_TOPIC_0000001231631325__p1771333323411"><strong>Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="50.495049504950494%" id="mcps1.3.2.2.2.1.2.5.1.4"><p id="EN-US_TOPIC_0000001231631325__p2713153317341"><strong id="EN-US_TOPIC_0000001231631325__b1440065894315">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001231631325__row1271313333417"><td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p137131033183420">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="13.861386138613863%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p12713033153410">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p1471423363419">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.495049504950494%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p14202648155510">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__row127146339346"><td class="cellrowborder" valign="top" width="19.801980198019802%" headers="mcps1.3.2.2.2.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p571416333342">resource_id</p>
</td>
<td class="cellrowborder" valign="top" width="13.861386138613863%" headers="mcps1.3.2.2.2.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p1171413353414">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="15.841584158415841%" headers="mcps1.3.2.2.2.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p16714113312342">String</p>
</td>
<td class="cellrowborder" valign="top" width="50.495049504950494%" headers="mcps1.3.2.2.2.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p97144339347">Resource ID, for example, <strong id="EN-US_TOPIC_0000001231631325__b84235270614114">7d85f602-a948-4a30-afd4-e84f47471c15</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001231631325__section4615033123413"><h4 class="sectiontitle">Request Message</h4><ul id="EN-US_TOPIC_0000001231631325__ul1071483383417"><li id="EN-US_TOPIC_0000001231631325__li345423711497">Request example<pre class="screen" id="EN-US_TOPIC_0000001231631325__screen106151142164916">GET /v1.0/89cd04f168b84af6be287f71730fdb4b/clusters/7d85f602-a948-4a30-afd4-e84f47471c15/tags</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001231631325__section10616123373417"><h4 class="sectiontitle">Response Message</h4><ul id="EN-US_TOPIC_0000001231631325__ul12714183303413"><li id="EN-US_TOPIC_0000001231631325__li175664720500">Example response<pre class="screen" id="EN-US_TOPIC_0000001231631325__screen128485935015">{
"tags": [
{
"key": "Flower",
"value": "rose"
},
{
"key": "Food",
"value": "pie"
}
]
}</pre>
</li><li id="EN-US_TOPIC_0000001231631325__li07141133103414">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001231631325__table126191433193417" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001231631325__row371483310346"><th align="left" class="cellrowborder" valign="top" width="18.181818181818183%" id="mcps1.3.4.2.2.1.2.5.1.1"><p id="EN-US_TOPIC_0000001231631325__p1971419336342"><strong id="EN-US_TOPIC_0000001231631325__b93688816446">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="15.151515151515152%" id="mcps1.3.4.2.2.1.2.5.1.2"><p id="EN-US_TOPIC_0000001231631325__p1971443313349"><strong id="EN-US_TOPIC_0000001231631325__b1750189443">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.181818181818183%" id="mcps1.3.4.2.2.1.2.5.1.3"><p id="EN-US_TOPIC_0000001231631325__p13714633143415"><strong>Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.484848484848484%" id="mcps1.3.4.2.2.1.2.5.1.4"><p id="EN-US_TOPIC_0000001231631325__p1171413383414"><strong id="EN-US_TOPIC_0000001231631325__b1694121019445">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001231631325__row1571483393414"><td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.4.2.2.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p1171473316347">tags</p>
</td>
<td class="cellrowborder" valign="top" width="15.151515151515152%" headers="mcps1.3.4.2.2.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p17714153383417">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="18.181818181818183%" headers="mcps1.3.4.2.2.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p117143333347">List&lt;<a href="#EN-US_TOPIC_0000001231631325__table120412164200">resource_tag</a>&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="48.484848484848484%" headers="mcps1.3.4.2.2.1.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p2714033193419">Tag list.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001231631325__table120412164200"></a><a name="table120412164200"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001231631325__table120412164200" 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__row521271642012"><th align="left" class="cellrowborder" valign="top" width="18.81188118811881%" id="mcps1.3.4.2.2.2.2.5.1.1"><p id="EN-US_TOPIC_0000001231631325__p82131816182015"><strong id="EN-US_TOPIC_0000001231631325__b0564151318442">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.85148514851485%" id="mcps1.3.4.2.2.2.2.5.1.2"><p id="EN-US_TOPIC_0000001231631325__p1921511619208"><strong id="EN-US_TOPIC_0000001231631325__b196509101">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.82178217821782%" id="mcps1.3.4.2.2.2.2.5.1.3"><p id="EN-US_TOPIC_0000001231631325__p12161816182020"><strong>Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.51485148514851%" id="mcps1.3.4.2.2.2.2.5.1.4"><p id="EN-US_TOPIC_0000001231631325__p19217191662015"><strong id="EN-US_TOPIC_0000001231631325__b16901151554410">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001231631325__row112192016112015"><td class="cellrowborder" valign="top" width="18.81188118811881%" headers="mcps1.3.4.2.2.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p15220101682019">key</p>
</td>
<td class="cellrowborder" valign="top" width="14.85148514851485%" headers="mcps1.3.4.2.2.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p522291615208">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.82178217821782%" headers="mcps1.3.4.2.2.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p2022431620202">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.51485148514851%" headers="mcps1.3.4.2.2.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p922511632019">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__p119639141303">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__row13227716142013"><td class="cellrowborder" valign="top" width="18.81188118811881%" headers="mcps1.3.4.2.2.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001231631325__p4229191682012">value</p>
</td>
<td class="cellrowborder" valign="top" width="14.85148514851485%" headers="mcps1.3.4.2.2.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001231631325__p1823071662017">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.82178217821782%" headers="mcps1.3.4.2.2.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001231631325__p423241618204">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.51485148514851%" headers="mcps1.3.4.2.2.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001231631325__p523361692014">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>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001231631325__section263463323410"><h4 class="sectiontitle">Status Code</h4><ul id="EN-US_TOPIC_0000001231631325__ul11715183318342"><li id="EN-US_TOPIC_0000001231631325__li14715183313417">Normal<p id="EN-US_TOPIC_0000001231631325__p1478416620513"><a name="EN-US_TOPIC_0000001231631325__li14715183313417"></a><a name="li14715183313417"></a>200</p>
</li><li id="EN-US_TOPIC_0000001231631325__li67151338348">Exception
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001231631325__table3639133318349" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Returned value for failed requests</caption><thead align="left"><tr id="EN-US_TOPIC_0000001231631325__row571512332344"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.5.2.2.1.2.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.5.2.2.1.2.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__row2715123333416"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.2.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p6715433113411">400</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.2.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p87151233203417">Invalid parameters.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row1271563353412"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.2.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p4715163317341">401</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.2.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.5.2.2.1.2.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p117151533173418">403</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.2.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p197151733133413">You do not have the permission to perform the operation.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row5715193311349"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.2.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p1571523383414">404</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.2.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p671533311340">The requested resource was not found.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001231631325__row3715203317345"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.5.2.2.1.2.3.1.1 "><p id="EN-US_TOPIC_0000001231631325__p1715163373410">500</p>
</td>
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.5.2.2.1.2.3.1.2 "><p id="EN-US_TOPIC_0000001231631325__p117154336340">Internal service error.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</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>