forked from docs/doc-exports
Reviewed-by: Sarda, Priya <prsarda@noreply.gitea.eco.tsi-dev.otc-service.com> Co-authored-by: Hongwei, King Wang <king.wanghongwei@huawei.com> Co-committed-by: Hongwei, King Wang <king.wanghongwei@huawei.com>
120 lines
12 KiB
HTML
120 lines
12 KiB
HTML
<a name="EN-US_TOPIC_0000001854089213"></a><a name="EN-US_TOPIC_0000001854089213"></a>
|
|
|
|
<h1 class="topictitle1">Querying Resource Tags</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_section20114008"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p156141423912">This API is used to query tags of a specified instance.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_section18104173342818"><h4 class="sectiontitle">Calling Method</h4><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p19989133162813">For details, see <a href="vpn_api_0008.html#EN-US_TOPIC_0000001807530276">Calling APIs</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_section46808346"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p832123135010">GET /v5/{project_id}/{resource_type}/{resource_id}/tags</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_table92238" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_row12907152516281"><th align="left" class="cellrowborder" valign="top" width="19.607843137254903%" id="mcps1.3.3.3.2.5.1.1"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p1790862522818">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.607843137254903%" id="mcps1.3.3.3.2.5.1.2"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p1590862511281">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.76470588235294%" id="mcps1.3.3.3.2.5.1.3"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p190822518281">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="49.01960784313725%" id="mcps1.3.3.3.2.5.1.4"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p11908132532819">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_row19907325142817"><td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p69098254284">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p090912572820">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.76470588235294%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p79091425122815">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.01960784313725%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p199639252285">Specifies a project ID. You can obtain the project ID by referring to <a href="vpn_api_0051.html#EN-US_TOPIC_0000001807530332">Obtaining the Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_row129071625122816"><td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p623155842816">resource_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p223105819284">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.76470588235294%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p152315585286">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.01960784313725%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_ul93453614117"><li id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_li43451661818">Specifies the resource type.</li><li id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_li16527151316115">The value can be <strong id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_b19133614866480">vpn-gateway</strong>, <strong id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_b7585377226480">customer-gateway</strong>, or <strong id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_b13102283726480">vpn-connection</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_row14542151704819"><td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p154212171486">resource_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p15542141754813">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.76470588235294%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p125421517134814">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.01960784313725%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p1854321734814">Indicates a resource ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_section18621933"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_ul5992193374713"><li id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_li6680921111317">Request parameters<p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p0944102114137"><a name="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_li6680921111317"></a><a name="en-us_topic_0000001759396190_li6680921111317"></a>None</p>
|
|
</li><li id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_li497953013223">Example request<pre class="screen" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_screen1778465375316">GET https://{Endpoint}/v5/{project_id}/{resource_type}/{resource_id}/tags</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_section19175102812410"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_ul2144514204819"><li id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_li61441714114816">Response parameters<p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p76201023211"><a name="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_li61441714114816"></a><a name="en-us_topic_0000001759396190_li61441714114816"></a>Returned status code 200: successful query</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_table1877709" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameters in the response body</caption><thead align="left"><tr id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_row135121628161013"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p151362812105">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p145138284106">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p105135287107">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_row16512202861010"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p175131328161011">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p175141128101016">Array of <a href="#EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_table1877710">ResourceTag</a> objects</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p1351482821011">Specifies the list of resource tags.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_table1877710"></a><a name="en-us_topic_0000001759396190_table1877710"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_table1877710" frame="border" border="1" rules="all"><caption><b>Table 3 </b>ResourceTag</caption><thead align="left"><tr id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_row151517285103"><th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.3.2.4.1.1"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p1551612812109">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.220000000000002%" id="mcps1.3.5.2.1.3.2.4.1.2"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p18516828161012">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="55.559999999999995%" id="mcps1.3.5.2.1.3.2.4.1.3"><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p155161228131016">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_row14515182820109"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p1751752810102">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p3517102810103">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p1128123294012">Specifies a tag key.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_row65151128111014"><td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p1051812810103">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.220000000000002%" headers="mcps1.3.5.2.1.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p10518182817102">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="55.559999999999995%" headers="mcps1.3.5.2.1.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p14157172813400">Specifies a tag value.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_li12416453222">Example response<pre class="screen" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_screen141751028144114">{
|
|
"tags":[
|
|
{
|
|
"key":"key1",
|
|
"value":"value1"
|
|
}
|
|
]
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_section31981619"><h4 class="sectiontitle">Status Codes</h4><p id="EN-US_TOPIC_0000001854089213__en-us_topic_0000001759396190_p18112112662914">For details, see <a href="vpn_api_0052.html#EN-US_TOPIC_0000001807370508">Status Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpn_api_0060.html">Tags</a></div>
|
|
</div>
|
|
</div>
|
|
|