doc-exports/docs/as/api-ref/as_06_1001.html
guoyanyan 31704f0318 as_api_0325
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com>
Co-authored-by: guoyanyan <guoyanyan3@huawei.com>
Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
2023-04-13 08:59:32 +00:00

220 lines
15 KiB
HTML

<a name="as_06_1001"></a><a name="as_06_1001"></a>
<h1 class="topictitle1">Querying Tags</h1>
<div id="body1500262816659"><div class="section" id="as_06_1001__section35616396114129"><h4 class="sectiontitle">Function</h4><p id="as_06_1001__p66355832114129">This API is used to query tags of a specific type of resource in a project.</p>
</div>
<div class="section" id="as_06_1001__section60331580114129"><h4 class="sectiontitle">URI</h4><p id="as_06_1001__p27417135114129">GET /autoscaling-api/v1/{project_id}/{resource_type}/tags</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_1001__table6195496114129" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="as_06_1001__row9584089114129"><th align="left" class="cellrowborder" valign="top" width="19%" id="mcps1.3.2.3.2.5.1.1"><p id="as_06_1001__p38113769114129"><strong id="as_06_1001__b463111614417">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.2.3.2.5.1.2"><p id="as_06_1001__p207602114129"><strong id="as_06_1001__b842352706141528">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.3.2.3.2.5.1.3"><p id="as_06_1001__p16815771114129"><strong id="as_06_1001__b84235270693914">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="47%" id="mcps1.3.2.3.2.5.1.4"><p id="as_06_1001__p19900172114129"><strong id="as_06_1001__b7997138164415">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_1001__row1301230114129"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_1001__p09771712145519">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_1001__p159771212125512">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_1001__p297761225514">String</p>
</td>
<td class="cellrowborder" valign="top" width="47%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_1001__p36520930">Specifies the project ID.</p>
</td>
</tr>
<tr id="as_06_1001__row28017490114129"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.3.2.3.2.5.1.1 "><p id="as_06_1001__p297711225519">resource_type</p>
</td>
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.2.3.2.5.1.2 "><p id="as_06_1001__p1797713126559">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.3.2.3.2.5.1.3 "><p id="as_06_1001__p10977712195517">String</p>
</td>
<td class="cellrowborder" valign="top" width="47%" headers="mcps1.3.2.3.2.5.1.4 "><p id="as_06_1001__p79351742201718">Specifies the resource type. The option is as follows:</p>
<p id="as_06_1001__p197701245516"><strong id="as_06_1001__b84235270620951">scaling_group_tag</strong>: indicates that the resource type is AS groups.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="as_06_1001__section45408733114129"><h4 class="sectiontitle">Request Message</h4><ul id="as_06_1001__ul9007507"><li id="as_06_1001__li56913160">Request parameters<p id="as_06_1001__p60400126203515"><a name="as_06_1001__li56913160"></a><a name="li56913160"></a>None</p>
</li><li id="as_06_1001__li3640858994017">Example request<p id="as_06_1001__p15614505203519"><a name="as_06_1001__li3640858994017"></a><a name="li3640858994017"></a>This example shows how to query tags of AS groups in a project.</p>
<pre class="screen" id="as_06_1001__screen1336510226380">GET https://{Endpoint}/autoscaling-api/v1/{project_id}/scaling_group_tag/tags</pre>
</li></ul>
</div>
<div class="section" id="as_06_1001__section18297044114129"><h4 class="sectiontitle">Response Message</h4><ul id="as_06_1001__ul5665580114129"><li id="as_06_1001__li50990221114129">Response parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_1001__table56258812114129" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="as_06_1001__row32761424114129"><th align="left" class="cellrowborder" valign="top" width="24.07%" id="mcps1.3.4.2.1.1.2.4.1.1"><p id="as_06_1001__p36429715114129"><strong id="as_06_1001__b810581220440">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.38%" id="mcps1.3.4.2.1.1.2.4.1.2"><p id="as_06_1001__p65125782114129"><strong id="as_06_1001__b1298227358">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.55%" id="mcps1.3.4.2.1.1.2.4.1.3"><p id="as_06_1001__p40696961114129"><strong id="as_06_1001__b4642813114413">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_1001__row8119549114129"><td class="cellrowborder" valign="top" width="24.07%" headers="mcps1.3.4.2.1.1.2.4.1.1 "><p id="as_06_1001__p53703729114129">tags</p>
</td>
<td class="cellrowborder" valign="top" width="21.38%" headers="mcps1.3.4.2.1.1.2.4.1.2 "><p id="as_06_1001__p6339193387">Array of <a href="#as_06_1001__table40593624114129">tags</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="54.55%" headers="mcps1.3.4.2.1.1.2.4.1.3 "><p id="as_06_1001__p28635620114129">Specifies the tags.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="as_06_1001__table40593624114129"></a><a name="table40593624114129"></a><table cellpadding="4" cellspacing="0" summary="" id="as_06_1001__table40593624114129" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="as_06_1001__b6699296094725">tags</strong> field description</caption><thead align="left"><tr id="as_06_1001__row32533742114129"><th align="left" class="cellrowborder" valign="top" width="24.07%" id="mcps1.3.4.2.1.2.2.4.1.1"><p id="as_06_1001__p17987463114129">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="21.38%" id="mcps1.3.4.2.1.2.2.4.1.2"><p id="as_06_1001__p47698368114129">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="54.55%" id="mcps1.3.4.2.1.2.2.4.1.3"><p id="as_06_1001__p38362561114129">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_1001__row20359731114129"><td class="cellrowborder" valign="top" width="24.07%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="as_06_1001__p123961037115511">key</p>
</td>
<td class="cellrowborder" valign="top" width="21.38%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="as_06_1001__p123961371557">String</p>
</td>
<td class="cellrowborder" valign="top" width="54.55%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="as_06_1001__p173961537205510">Specifies the tag key.</p>
</td>
</tr>
<tr id="as_06_1001__row36080156114129"><td class="cellrowborder" valign="top" width="24.07%" headers="mcps1.3.4.2.1.2.2.4.1.1 "><p id="as_06_1001__p1396103711552">values</p>
</td>
<td class="cellrowborder" valign="top" width="21.38%" headers="mcps1.3.4.2.1.2.2.4.1.2 "><p id="as_06_1001__p1233617371524">Array of strings</p>
</td>
<td class="cellrowborder" valign="top" width="54.55%" headers="mcps1.3.4.2.1.2.2.4.1.3 "><p id="as_06_1001__p1339619370557">Specifies the tag values.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="as_06_1001__ul44514228114129"><li id="as_06_1001__li65083732114129">Example response<pre class="screen" id="as_06_1001__screen24882354114257"> {
"tags": [
{
"key": "ENV15",
"values": [
"ENV15"
]
},
{
"key": "111",
"values": [
""
]
},
{
"key": "environment",
"values": [
"DEV"
]
},
{
"key": "ENV151",
"values": [
"ENV151"
]
},
{
"key": "ENV152",
"values": [
"ENV152"
]
}
]
}</pre>
</li></ul>
</div>
<div class="section" id="as_06_1001__section16422356114129"><h4 class="sectiontitle">Returned Values</h4><ul id="as_06_1001__ul55142442114129"><li id="as_06_1001__li26519938114129">Normal<p id="as_06_1001__p37352854114129"><a name="as_06_1001__li26519938114129"></a><a name="li26519938114129"></a>200</p>
</li><li id="as_06_1001__li631366114129">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="as_06_1001__table5682301114129" frame="border" border="1" rules="all"><thead align="left"><tr id="as_06_1001__row57025015114129"><th align="left" class="cellrowborder" valign="top" width="44.440000000000005%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="as_06_1001__p55623469114129"><strong id="as_06_1001__b842352706175024">Returned Value</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="as_06_1001__p9207140114129"><strong id="as_06_1001__b84235270616929">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="as_06_1001__row7580867114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p10070515114129">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p10405404114129">The server failed to process the request.</p>
</td>
</tr>
<tr id="as_06_1001__row26539773114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p2237965114129">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p47057449114129">You must enter the username and password to access the requested page.</p>
</td>
</tr>
<tr id="as_06_1001__row20863864114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p12251410114129">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p52840173114129">You are forbidden to access the requested page.</p>
</td>
</tr>
<tr id="as_06_1001__row5799514114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p67107513114129">404 Not Found</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p66999468114129">The server could not find the requested page.</p>
</td>
</tr>
<tr id="as_06_1001__row66124305114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p54468478114129">405 Method Not Allowed</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p49870579114129">You are not allowed to use the method specified in the request.</p>
</td>
</tr>
<tr id="as_06_1001__row46182033114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p49757158114129">406 Not Acceptable</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p3797975114129">The response generated by the server could not be accepted by the client.</p>
</td>
</tr>
<tr id="as_06_1001__row34181782114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p17260990114129">407 Proxy Authentication Required</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p55962934114129">You must use the proxy server for authentication to process the request.</p>
</td>
</tr>
<tr id="as_06_1001__row33904359114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p61898587114129">408 Request Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p47729651114129">The request timed out.</p>
</td>
</tr>
<tr id="as_06_1001__row26913680114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p32524506114129">409 Conflict</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p17239357114129">The request could not be processed due to a conflict.</p>
</td>
</tr>
<tr id="as_06_1001__row20936487114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p18133857114129">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p59556295114129">Failed to complete the request because an internal service error occurred.</p>
</td>
</tr>
<tr id="as_06_1001__row66244615114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p64213595114129">501 Not Implemented</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p33918736114129">Failed to complete the request because the server does not support the requested function.</p>
</td>
</tr>
<tr id="as_06_1001__row36833174114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p30697151114129">502 Bad Gateway</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p3441308114129">Failed to complete the request because the server has received an invalid response.</p>
</td>
</tr>
<tr id="as_06_1001__row30971778114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p25686089114129">503 Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p198456114129">Failed to complete the request because the system is currently unavailable.</p>
</td>
</tr>
<tr id="as_06_1001__row1786111114129"><td class="cellrowborder" valign="top" width="44.440000000000005%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="as_06_1001__p10457278114129">504 Gateway Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="as_06_1001__p41733178114129">A gateway timeout error occurred.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="as_06_1001__section17669131616110"><h4 class="sectiontitle">Error Codes</h4><p id="as_06_1001__p172692548116">See <a href="as_07_0102.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="as_06_1000.html">Tags</a></div>
</div>
</div>