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

127 lines
14 KiB
HTML

<a name="EN-US_TOPIC_0000001854169165"></a><a name="EN-US_TOPIC_0000001854169165"></a>
<h1 class="topictitle1">Deleting Resource Tags in Batches</h1>
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_section20114008"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p1487610174615">This API is used to delete tags from a specified instance in batches.</p>
</div>
<div class="section" id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_section18104173342818"><h4 class="sectiontitle">Calling Method</h4><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p746204214324">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_0000001854169165__en-us_topic_0000001806394645_section46808346"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p13331432202014">POST /v5/{project_id}/{resource_type}/{resource_id}/tags/delete</p>
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_table92218" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_row18318257283"><th align="left" class="cellrowborder" valign="top" width="19.607843137254903%" id="mcps1.3.3.3.2.5.1.1"><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p1183122515280">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_0000001854169165__en-us_topic_0000001806394645_p383162513282">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_0000001854169165__en-us_topic_0000001806394645_p08321425102812">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_0000001854169165__en-us_topic_0000001806394645_p8832162510286">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_row11831172515283"><td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p16832202514282">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_0000001854169165__en-us_topic_0000001806394645_p15832192572819">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_0000001854169165__en-us_topic_0000001806394645_p17832192510287">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_0000001854169165__en-us_topic_0000001806394645_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_0000001854169165__en-us_topic_0000001806394645_row12831162522818"><td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p62311347192716">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_0000001854169165__en-us_topic_0000001806394645_p16232194752719">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_0000001854169165__en-us_topic_0000001806394645_p102321473274">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_0000001854169165__en-us_topic_0000001806394645_ul93453614117"><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li43451661818">Specifies the resource type.</li><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li16527151316115">The value can be <strong id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_b113916599964759">vpn-gateway</strong>, <strong id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_b857003364759">customer-gateway</strong>, or <strong id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_b190462204964759">vpn-connection</strong>.</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_row19378143055110"><td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p1523294792720">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_0000001854169165__en-us_topic_0000001806394645_p13232124710277">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_0000001854169165__en-us_topic_0000001806394645_p6233124712716">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_0000001854169165__en-us_topic_0000001806394645_p523313479279">Indicates a resource ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_section18621933"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_ul5992193374713"><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li6664412111315">Request parameters
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_table65426" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_row888119174611"><th align="left" class="cellrowborder" valign="top" width="19.607843137254903%" id="mcps1.3.4.2.1.1.2.5.1.1"><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p128826144612">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.607843137254903%" id="mcps1.3.4.2.1.1.2.5.1.2"><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p888213111469">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.76470588235294%" id="mcps1.3.4.2.1.1.2.5.1.3"><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p888251154619">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.01960784313725%" id="mcps1.3.4.2.1.1.2.5.1.4"><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p788261194616">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_row19881515468"><td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.4.2.1.1.2.5.1.1 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p68821314463">tags</p>
</td>
<td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.4.2.1.1.2.5.1.2 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p14304745451">Array of <a href="#EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_table92196">ResourceTag</a> objects</p>
</td>
<td class="cellrowborder" valign="top" width="11.76470588235294%" headers="mcps1.3.4.2.1.1.2.5.1.3 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p088212115465">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.01960784313725%" headers="mcps1.3.4.2.1.1.2.5.1.4 "><ul id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_ul124531254455"><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li84543256453">Specifies a tag list.</li><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li145412253459">A maximum of 20 tags can be specified.</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_table92196"></a><a name="en-us_topic_0000001806394645_table92196"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_table92196" frame="border" border="1" rules="all"><caption><b>Table 3 </b>ResourceTag</caption><thead align="left"><tr id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_row17982141112440"><th align="left" class="cellrowborder" valign="top" width="19.607843137254903%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p11982511184419">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="19.607843137254903%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p1498231116442">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="11.76470588235294%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p2098381112443">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="49.01960784313725%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p20983151154419">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_row498231134419"><td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p162441478276">key</p>
</td>
<td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p524594715274">String</p>
</td>
<td class="cellrowborder" valign="top" width="11.76470588235294%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p9245547152712">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="49.01960784313725%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><ul id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_ul65231833153920"><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li1303152053315">Specifies a tag key.</li><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li152316335391">The value is a string of 1 to 128 characters that can contain digits, letters, Spanish characters, Portuguese characters, spaces, and special characters (_ . : = + - @).</li></ul>
</td>
</tr>
<tr id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_row860610253715"><td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p22461847122715">value</p>
</td>
<td class="cellrowborder" valign="top" width="19.607843137254903%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p424612477273">String</p>
</td>
<td class="cellrowborder" valign="top" width="11.76470588235294%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p9246144718276">No</p>
</td>
<td class="cellrowborder" valign="top" width="49.01960784313725%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><ul id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_ul961219349376"><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li5601175311451">Specifies a tag value.</li><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li186123345379">The value is a string of 0 to 255 characters that can contain digits, letters, Spanish characters, Portuguese characters, spaces, and special characters (_ . : = + - @).</li></ul>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li1831710152221">Example request<pre class="screen" id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_screen1778465375316">DELETE https://{Endpoint}/v5/{project_id}/{resource_type}/{resource_id}/tags/delete
{
"tags": [{
"key": "key1",
"value": "value1"
}]
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_section33379675"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_ul1314793119379"><li id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li6147153183715">Response parameters<p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_p161472031173718"><a name="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_li6147153183715"></a><a name="en-us_topic_0000001806394645_li6147153183715"></a>Returned status code 204: Tags are successfully deleted.</p>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_section31981619"><h4 class="sectiontitle">Status Codes</h4><p id="EN-US_TOPIC_0000001854169165__en-us_topic_0000001806394645_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>