doc-exports/docs/dws/api-ref/dws_02_0050.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

159 lines
12 KiB
HTML

<a name="EN-US_TOPIC_0000001185991708"></a><a name="EN-US_TOPIC_0000001185991708"></a>
<h1 class="topictitle1">Querying Tags in a Specified Project</h1>
<div id="body1524298666228"><div class="section" id="EN-US_TOPIC_0000001185991708__section35368561349"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001185991708__p3653115611349">This API is used to query all tags of a tenant for a specified resource type in a specified project.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001185991708__section1653755613348"><h4 class="sectiontitle">URI</h4><pre class="screen" id="EN-US_TOPIC_0000001185991708__screen19987721027">GET /v1.0/{project_id}/clusters/tags</pre>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185991708__table8916749192716" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001185991708__row1291614499272"><th align="left" class="cellrowborder" valign="top" width="16.24%" id="mcps1.3.2.3.2.5.1.1"><p id="EN-US_TOPIC_0000001185991708__p19915124992719"><strong id="EN-US_TOPIC_0000001185991708__b1458317359442">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="10.059999999999999%" id="mcps1.3.2.3.2.5.1.2"><p id="EN-US_TOPIC_0000001185991708__p3915549152711"><strong id="EN-US_TOPIC_0000001185991708__b84235270684256">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.76%" id="mcps1.3.2.3.2.5.1.3"><p id="EN-US_TOPIC_0000001185991708__p4915124913278"><strong id="EN-US_TOPIC_0000001185991708__b180916188911374">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="59.940000000000005%" id="mcps1.3.2.3.2.5.1.4"><p id="EN-US_TOPIC_0000001185991708__p2916174916279"><strong id="EN-US_TOPIC_0000001185991708__b17892438164419">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185991708__row4916849102712"><td class="cellrowborder" valign="top" width="16.24%" headers="mcps1.3.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001185991708__p1491614992711">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="10.059999999999999%" headers="mcps1.3.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001185991708__p11916449152716">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.76%" headers="mcps1.3.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001185991708__p991634911277">String</p>
</td>
<td class="cellrowborder" valign="top" width="59.940000000000005%" headers="mcps1.3.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001185991708__p4916174919272">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>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001185991708__section1866710221282"><h4 class="sectiontitle">Request Parameters</h4><p id="EN-US_TOPIC_0000001185991708__p138202712288">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001185991708__section17548153142814"><h4 class="sectiontitle">Response Parameters</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185991708__table78206436288" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response body parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001185991708__row13821194310280"><th align="left" class="cellrowborder" valign="top" width="16%" id="mcps1.3.4.2.2.5.1.1"><p id="EN-US_TOPIC_0000001185991708__p118215438287"><strong id="EN-US_TOPIC_0000001185991708__b757636979">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_0000001185991708__p48213438288"><strong id="EN-US_TOPIC_0000001185991708__b1774339206">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.94%" id="mcps1.3.4.2.2.5.1.3"><p id="EN-US_TOPIC_0000001185991708__p7821184312812"><strong id="EN-US_TOPIC_0000001185991708__b153124564011374">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60.12%" id="mcps1.3.4.2.2.5.1.4"><p id="EN-US_TOPIC_0000001185991708__p1082144311285"><strong id="EN-US_TOPIC_0000001185991708__b92931949114413">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185991708__row1482117430280"><td class="cellrowborder" valign="top" width="16%" headers="mcps1.3.4.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001185991708__p178221443182815">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_0000001185991708__p19822164318281">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.94%" headers="mcps1.3.4.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001185991708__p882234302811">List&lt;<a href="#EN-US_TOPIC_0000001185991708__table1682218436286">tag</a>&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="60.12%" headers="mcps1.3.4.2.2.5.1.4 "><p id="EN-US_TOPIC_0000001185991708__p1882284311289">Tag list.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001185991708__table1682218436286"></a><a name="table1682218436286"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185991708__table1682218436286" frame="border" border="1" rules="all"><caption><b>Table 3 </b>tag</caption><thead align="left"><tr id="EN-US_TOPIC_0000001185991708__row1822143152815"><th align="left" class="cellrowborder" valign="top" width="16.35836416358364%" id="mcps1.3.4.3.2.5.1.1"><p id="EN-US_TOPIC_0000001185991708__p38221843182817"><strong id="EN-US_TOPIC_0000001185991708__b1116520441">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="9.939006099390062%" id="mcps1.3.4.3.2.5.1.2"><p id="EN-US_TOPIC_0000001185991708__p188237434287"><strong id="EN-US_TOPIC_0000001185991708__b64123783">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.448655134486554%" id="mcps1.3.4.3.2.5.1.3"><p id="EN-US_TOPIC_0000001185991708__p5823643122817"><strong id="EN-US_TOPIC_0000001185991708__b162972253811374">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="60.25397460253975%" id="mcps1.3.4.3.2.5.1.4"><p id="EN-US_TOPIC_0000001185991708__p08232043182811"><strong id="EN-US_TOPIC_0000001185991708__b104051254134415">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185991708__row282324322816"><td class="cellrowborder" valign="top" width="16.35836416358364%" headers="mcps1.3.4.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001185991708__p98231443102815">key</p>
</td>
<td class="cellrowborder" valign="top" width="9.939006099390062%" headers="mcps1.3.4.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001185991708__p3823194332812">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.448655134486554%" headers="mcps1.3.4.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001185991708__p19823194312282">String</p>
</td>
<td class="cellrowborder" valign="top" width="60.25397460253975%" headers="mcps1.3.4.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001185991708__p12823164313287">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_0000001185991708__p158237435281">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_0000001185991708__row1682312436284"><td class="cellrowborder" valign="top" width="16.35836416358364%" headers="mcps1.3.4.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001185991708__p158231943142812">values</p>
</td>
<td class="cellrowborder" valign="top" width="9.939006099390062%" headers="mcps1.3.4.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001185991708__p082310435288">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="13.448655134486554%" headers="mcps1.3.4.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001185991708__p14824164316281">List&lt;String&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="60.25397460253975%" headers="mcps1.3.4.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001185991708__p178246431287">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_0000001185991708__section1551856163419"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0000001185991708__screen46710426504">GET /v1.0/89cd04f168b84af6be287f71730fdb4b/clusters/tags</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001185991708__section355385618347"><h4 class="sectiontitle">Example Responses</h4><pre class="screen" id="EN-US_TOPIC_0000001185991708__screen3579018512">{
"tags": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
},
{
"key": "key2",
"values": [
"value1",
"value2"
]
}
]
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0000001185991708__section15576145612346"><h4 class="sectiontitle">Status Code</h4>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001185991708__table2581125633415" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000001185991708__row9656556123414"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.7.2.1.3.1.1"><p id="EN-US_TOPIC_0000001185991708__p16561556183411"><strong id="EN-US_TOPIC_0000001185991708__b842352706153338">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_0000001185991708__p3656956123419"><strong id="EN-US_TOPIC_0000001185991708__b18615180124511">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001185991708__row5107161112295"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185991708__p101071113297">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_0000001185991708__p201071211122919">Query succeeded.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185991708__row265605653411"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185991708__p186565568344">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_0000001185991708__p18656145614343">Invalid parameter.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185991708__row20656556143418"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185991708__p116562565344">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_0000001185991708__p5656195633411">Authentication failed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185991708__row1865620565340"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185991708__p465620561347">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_0000001185991708__p1765665633412">Insufficient permission.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185991708__row1565695618344"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185991708__p265625683414">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_0000001185991708__p1965615567341">No resources found.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001185991708__row146561556163420"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.3.1.1 "><p id="EN-US_TOPIC_0000001185991708__p106561256133418">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_0000001185991708__p1465615610349">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>