doc-exports/docs/vpcep/api-ref/vpcep_06_0503.html
Qin Ying, Fan ef5d2cd3cf VPCEP API 20230307 version
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com>
Co-authored-by: Qin Ying, Fan <fanqinying@huawei.com>
Co-committed-by: Qin Ying, Fan <fanqinying@huawei.com>
2023-06-14 11:56:35 +00:00

124 lines
9.4 KiB
HTML

<a name="vpcep_06_0503"></a><a name="vpcep_06_0503"></a>
<h1 class="topictitle1">Querying Tags of a Tenant's Resource</h1>
<div id="body1568971488963"><div class="section" id="vpcep_06_0503__section20272125217516"><h4 class="sectiontitle">Function</h4><p id="vpcep_06_0503__p1674610521656">This API is used to obtain tags of resources of a tenant based on the tenant ID and resource type.</p>
</div>
<div class="section" id="vpcep_06_0503__section11275852457"><h4 class="sectiontitle">URI</h4><p id="vpcep_06_0503__p452414016475">GET /v1/{project_id}/{resource_type}/tags</p>
<p id="vpcep_06_0503__p183972416471"><a href="#vpcep_06_0503__table943516221477">Table 1</a> describes parameters in this URI.</p>
<div class="tablenoborder"><a name="vpcep_06_0503__table943516221477"></a><a name="table943516221477"></a><table cellpadding="4" cellspacing="0" summary="" id="vpcep_06_0503__table943516221477" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameters</caption><thead align="left"><tr id="vpcep_06_0503__row1343613226474"><th align="left" class="cellrowborder" valign="top" width="21.43%" id="mcps1.3.2.4.2.5.1.1"><p id="vpcep_06_0503__p9436922104719"><strong id="vpcep_06_0503__b1980532918211">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.509999999999998%" id="mcps1.3.2.4.2.5.1.2"><p id="vpcep_06_0503__p194362228474"><strong id="vpcep_06_0503__b1460393016218">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.2.4.2.5.1.3"><p id="vpcep_06_0503__p1243612224474"><strong id="vpcep_06_0503__b176571932132113">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="35.709999999999994%" id="mcps1.3.2.4.2.5.1.4"><p id="vpcep_06_0503__p1343632294715"><strong id="vpcep_06_0503__b676223316215">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpcep_06_0503__row1143672204713"><td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.2.4.2.5.1.1 "><p id="vpcep_06_0503__p114361222479">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.2.4.2.5.1.2 "><p id="vpcep_06_0503__p11436222134717">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.2.4.2.5.1.3 "><p id="vpcep_06_0503__p11436022124715">String</p>
</td>
<td class="cellrowborder" valign="top" width="35.709999999999994%" headers="mcps1.3.2.4.2.5.1.4 "><p id="vpcep_06_0503__p204361922164712">Specifies the project ID. For details about how to obtain the project ID, see <a href="vpcep_08_0003.html">Obtaining a Project ID</a>.</p>
</td>
</tr>
<tr id="vpcep_06_0503__row12436162264715"><td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.2.4.2.5.1.1 "><p id="vpcep_06_0503__p2436202244718">resource_type</p>
</td>
<td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.2.4.2.5.1.2 "><p id="vpcep_06_0503__p7436162254718">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.2.4.2.5.1.3 "><p id="vpcep_06_0503__p3437152214478">String</p>
</td>
<td class="cellrowborder" valign="top" width="35.709999999999994%" headers="mcps1.3.2.4.2.5.1.4 "><p id="vpcep_06_0503__p143713224476">Specifies the resource type, which can be <strong id="vpcep_06_0503__b1917416104214">endpoint_service</strong> or <strong id="vpcep_06_0503__b16174146124212">endpoint</strong>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="vpcep_06_0503__section5371135214516"><h4 class="sectiontitle">Request</h4><ul id="vpcep_06_0503__ul1474711521356"><li id="vpcep_06_0503__li474718526511">Parameter description<p id="vpcep_06_0503__p134811041638"><a name="vpcep_06_0503__li474718526511"></a><a name="li474718526511"></a>None</p>
</li><li id="vpcep_06_0503__li1874735215517"><a name="vpcep_06_0503__li1874735215517"></a><a name="li1874735215517"></a>Example request<pre class="screen" id="vpcep_06_0503__screen18869617216">GET https://{endpoint}/v1/{project_id}/endpoint_service/tags</pre>
<p id="vpcep_06_0503__p14620155562118">or</p>
<pre class="screen" id="vpcep_06_0503__screen1910335817210">GET https://{endpoint}/v1/{project_id}/endpoint/tags</pre>
</li></ul>
</div>
<div class="section" id="vpcep_06_0503__section1743165217514"><h4 class="sectiontitle">Response</h4><ul id="vpcep_06_0503__ul197481352656"><li id="vpcep_06_0503__li274812521955">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpcep_06_0503__table124997528515" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameter</caption><thead align="left"><tr id="vpcep_06_0503__row1374816521452"><th align="left" class="cellrowborder" valign="top" width="25.509999999999998%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="vpcep_06_0503__p12748115220515"><strong id="vpcep_06_0503__b511165414238">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="vpcep_06_0503__p574816523510"><strong id="vpcep_06_0503__b2411755142315">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.509999999999998%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="vpcep_06_0503__p47482520515"><strong id="vpcep_06_0503__b148145672313">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="31.630000000000003%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="vpcep_06_0503__p97481352054"><strong id="vpcep_06_0503__b635614576239">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpcep_06_0503__row107488520520"><td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="vpcep_06_0503__p1474817529515">tags</p>
</td>
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="vpcep_06_0503__p1274865214513">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="25.509999999999998%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="vpcep_06_0503__p774810524514">List&lt;resource_tag&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="31.630000000000003%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><p id="vpcep_06_0503__p1774811521655">Lists the tags.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="vpcep_06_0503__table144649521456" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Data structure of field <strong id="vpcep_06_0503__b869121119247">resource_tag</strong></caption><thead align="left"><tr id="vpcep_06_0503__row1974875215510"><th align="left" class="cellrowborder" valign="top" width="24.490000000000002%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="vpcep_06_0503__p57487522519"><strong id="vpcep_06_0503__b3852101922414">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="18.37%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="vpcep_06_0503__p97488522056"><strong id="vpcep_06_0503__b4444821102411">Mandatory</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.490000000000002%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="vpcep_06_0503__p177481352457"><strong id="vpcep_06_0503__b73104233246">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="32.65%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="vpcep_06_0503__p1174810524515"><strong id="vpcep_06_0503__b19310192418245">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="vpcep_06_0503__row4748952551"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="vpcep_06_0503__p4748552253">key</p>
</td>
<td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="vpcep_06_0503__p1574825213511">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="vpcep_06_0503__p107481452555">String</p>
</td>
<td class="cellrowborder" valign="top" width="32.65%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="vpcep_06_0503__p3748852459">Specifies the tag key.</p>
</td>
</tr>
<tr id="vpcep_06_0503__row177481152358"><td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="vpcep_06_0503__p77481952952">values</p>
</td>
<td class="cellrowborder" valign="top" width="18.37%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="vpcep_06_0503__p107499521154">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="24.490000000000002%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="vpcep_06_0503__p1874910523511">List&lt;String&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="32.65%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="vpcep_06_0503__p1674965220511">Specifies the tag value list.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="vpcep_06_0503__li57498529517">Example response<pre class="screen" id="vpcep_06_0503__screen883317515523">{
"tags": [
{
"key": "key1",
"values": [
"*value1",
"value2"
]
}
]
}</pre>
</li></ul>
</div>
<div class="section" id="vpcep_06_0503__section652619523510"><h4 class="sectiontitle">Status Codes</h4><p id="vpcep_06_0503__p37491521152">See <a href="vpcep_08_0001.html">Status Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpcep_06_0500.html">Tag Function</a></div>
</div>
</div>