doc-exports/docs/vpn/api-ref/vpn_api_1019.html
Hongwei, King Wang 32c06a10a2 vpn_api
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>
2024-08-15 14:18:28 +00:00

90 lines
11 KiB
HTML

<a name="EN-US_TOPIC_0000001807530352"></a><a name="EN-US_TOPIC_0000001807530352"></a>
<h1 class="topictitle1">Querying VPN Tags</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_section5346624101819"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_p3422824111814">This API is used to query tags of a specified VPN.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_section7346122401818"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p12802122618">GET /v2.0/{project_id}/ipsec-site-connections/{resource_id}/tags</p>
<div class="note" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_note84751754104310"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p1847515412435">In the URI, <strong id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_b1146951976">project_id</strong> indicates the project ID, and <strong id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_b1447185120717">resource_id</strong> indicates the ID of the target resource.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_section113551624161816"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_p6424624151811">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_section1635502415182"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p8787101474414"><a href="#EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_table1135702419184">Table 1</a> describes the response parameter.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_table1135702419184"></a><a name="en-us_topic_0000001591736537_en-us_topic_0103470567_table1135702419184"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_table1135702419184" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Response parameter</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_row7424152414187"><th align="left" class="cellrowborder" valign="top" width="22.097790220977902%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_p14424202481810"><strong id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_b842352706172115">Parameter</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="28.7971202879712%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_p1442492451817"><strong id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_b84235270610412">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.1050894910509%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_p18424202481819"><strong id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_b842352706151625">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_row14424192461816"><td class="cellrowborder" valign="top" width="22.097790220977902%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_p1942472411816">tags</p>
</td>
<td class="cellrowborder" valign="top" width="28.7971202879712%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_p10424324181820">List&lt;resource_tag&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="49.1050894910509%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_p742482418183">Specifies the list of tags.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_table13242848193719" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Description of field <strong id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_b1788144013125">resource_tag</strong></caption><thead align="left"><tr id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_row13343144812379"><th align="left" class="cellrowborder" valign="top" width="25.82%" id="mcps1.3.4.4.2.4.1.1"><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p15343174853715"><strong id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_b84235270617246">Name</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.28%" id="mcps1.3.4.4.2.4.1.2"><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p15643121154020"><strong id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_b1302472013">Type</strong></p>
</th>
<th align="left" class="cellrowborder" valign="top" width="48.9%" id="mcps1.3.4.4.2.4.1.3"><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p11344748183719"><strong id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_b1912116075">Description</strong></p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_row103449487379"><td class="cellrowborder" valign="top" width="25.82%" headers="mcps1.3.4.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p183469482373">key</p>
</td>
<td class="cellrowborder" valign="top" width="25.28%" headers="mcps1.3.4.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p18712165919401">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.4.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p11346184819376">Specifies the tag key.</p>
<p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p166179282045">The key</p>
<ul id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_ul1419712461348"><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li241518499415">Must be unique for a resource.</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li400332623222">Cannot be left blank.</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li583414621171">Can contain a maximum of 36 characters.</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li420364612412">Can contain only the following character types:<ul id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_ul14203124611419"><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li17531722105252">Uppercase letters</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li11960040105258">Lowercase letters</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li674166910530">Digits</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li15118101315543">Hyphens (-) and underscores (_)</li></ul>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_row2346548163714"><td class="cellrowborder" valign="top" width="25.82%" headers="mcps1.3.4.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p1134624816377">value</p>
</td>
<td class="cellrowborder" valign="top" width="25.28%" headers="mcps1.3.4.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p81671306414">String</p>
</td>
<td class="cellrowborder" valign="top" width="48.9%" headers="mcps1.3.4.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p534634813374">Specifies the tag value.</p>
<p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p9993105613416">The value</p>
<ul id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_ul1692049519"><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li13912413519">Can contain a maximum of 43 characters.</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li4954158">Can contain only the following character types:<ul id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_ul5918412520"><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li391444515">Uppercase letters</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li18171746514">Lowercase letters</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li161744858">Digits</li><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li120255110562">Hyphens (-) and underscores (_)</li></ul>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_en-us_topic_0103470567_section1836772481820"><h4 class="sectiontitle">Example</h4><ul id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_ul22751646104411"><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li1227512462441">Example request<pre class="screen" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_screen1070173514328">GET /v2.0/{project_id}/ipsec-site-connections/{resource_id}/tags</pre>
</li></ul>
</div>
<ul id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_ul5136353194414"><li id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_li413613539449">Example response<pre class="screen" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_screen750172134510">{
"tags": [
{
"key": "key1",
"value": "value1"
},
{
"key": "key2",
"value": "value3"
}
]
}</pre>
</li></ul>
<div class="section" id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_section14121248103610"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0000001807530352__en-us_topic_0000001591736537_p2590175117365">For details, see <a href="vpn_api_1054.html#EN-US_TOPIC_0000001854089293">Common Returned Values</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="vpn_api_1015.html">Tag Management</a></div>
</div>
</div>