doc-exports/docs/vpn/api-ref/vpn_api_1021.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

96 lines
11 KiB
HTML

<a name="EN-US_TOPIC_0000001854169205"></a><a name="EN-US_TOPIC_0000001854169205"></a>
<h1 class="topictitle1">Querying VPN Tags in a Specified Project</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_section159501022015"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p11593172017">This API is used to query all tags of a VPN in a specified project.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_section13950150202019"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_p232016260277">GET /v2.0/{project_id}/ipsec-site-connections/tags</p>
<div class="note" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_note864225924818"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_p16642125904812">In the URI, <strong id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_b842352706195037">project_id</strong> indicates the project ID.</p>
</div></div>
</div>
<div class="section" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_section159561804206"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p1861181102012">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_section4956302200"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_p16215417508"><a href="#EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_table18958160152014">Table 1</a> describes the response parameter.</p>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_table18958160152014"></a><a name="en-us_topic_0000001591736541_en-us_topic_0103470571_table18958160152014"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_table18958160152014" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Response parameter</caption><thead align="left"><tr id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_row106121102012"><th align="left" class="cellrowborder" valign="top" width="25.369999999999997%" id="mcps1.3.4.3.2.4.1.1"><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p14611716203">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="24.66%" id="mcps1.3.4.3.2.4.1.2"><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p8613112202">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.97%" id="mcps1.3.4.3.2.4.1.3"><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p062121192014">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_row96219162018"><td class="cellrowborder" valign="top" width="25.369999999999997%" headers="mcps1.3.4.3.2.4.1.1 "><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p16624112203">tags</p>
</td>
<td class="cellrowborder" valign="top" width="24.66%" headers="mcps1.3.4.3.2.4.1.2 "><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p146212172016">List&lt;tag&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="49.97%" headers="mcps1.3.4.3.2.4.1.3 "><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p46214112203">Specifies the list of tags.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_table1696410062019" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Description of field <strong id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_b475517234331">tag</strong></caption><thead align="left"><tr id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_row16625112015"><th align="left" class="cellrowborder" valign="top" width="25.332533253325334%" id="mcps1.3.4.4.2.4.1.1"><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p156216117208">Name</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="25.332533253325334%" id="mcps1.3.4.4.2.4.1.2"><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p8622172014">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.33493349334934%" id="mcps1.3.4.4.2.4.1.3"><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p1262101182018">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_row166216192017"><td class="cellrowborder" valign="top" width="25.332533253325334%" headers="mcps1.3.4.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p562013203">key</p>
</td>
<td class="cellrowborder" valign="top" width="25.332533253325334%" headers="mcps1.3.4.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p4621132014">String</p>
</td>
<td class="cellrowborder" valign="top" width="49.33493349334934%" headers="mcps1.3.4.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_p3622162019">Specifies the tag key.</p>
<p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_p10244191781016">The key</p>
<ul id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_ul2321196023222"><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li400332623222">Cannot be left blank.</li><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_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_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li852157223233">Can contain only the following character types:<ul id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_ul11049850105418"><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li17531722105252">Uppercase letters</li><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li11960040105258">Lowercase letters</li><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li674166910530">Digits</li><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_li15118101315543">Hyphens (-) and underscores (_)</li></ul>
</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_row862171152012"><td class="cellrowborder" valign="top" width="25.332533253325334%" headers="mcps1.3.4.4.2.4.1.1 "><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p2062312201">values</p>
</td>
<td class="cellrowborder" valign="top" width="25.332533253325334%" headers="mcps1.3.4.4.2.4.1.2 "><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_p10628182012">List&lt;String&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="49.33493349334934%" headers="mcps1.3.4.4.2.4.1.3 "><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_p166210162014">Specifies the list of tag values.</p>
<p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_p12611163291010">The value</p>
<ul id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_ul6706750105539"><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li3646980211638">Can contain a maximum of 43 characters.</li><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li544437591169">Can contain only the following character types:<ul id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_ul4359364711615"><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li31940902105539">Uppercase letters</li><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li230085105546">Lowercase letters</li><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0013935842_en-us_topic_0067805752_en-us_topic_0013859511_li41841846105549">Digits</li><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_li11217594561">Hyphens (-) and underscores (_)</li></ul>
</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_en-us_topic_0103470571_section1897413016206"><h4 class="sectiontitle">Example</h4><ul id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_ul1992012452509"><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_li129202450500">Example request<pre class="screen" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_screen19627162013">GET /v2.0/{project_id}/ipsec-site-connections/tags</pre>
</li></ul>
</div>
<ul id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_ul51954549501"><li id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_li181958542508">Example response<pre class="screen" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_screen1766714214518">{
"tags": [
{
"key": "key1",
"values": [
"value1",
"value2"
]
},
{
"key": "key2",
"values": [
"value1",
"value2"
]
}
]
}</pre>
</li></ul>
<div class="section" id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_section14121248103610"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0000001854169205__en-us_topic_0000001591736541_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>