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>
127 lines
14 KiB
HTML
127 lines
14 KiB
HTML
<a name="EN-US_TOPIC_0000001807370488"></a><a name="EN-US_TOPIC_0000001807370488"></a>
|
|
|
|
<h1 class="topictitle1">Adding Resource Tags in Batches</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_section20114008"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p1487610174615">This API is used to add tags to a specified instance in batches.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_section18104173342818"><h4 class="sectiontitle">Calling Method</h4><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_section46808346"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p162426363498">POST /v5/{project_id}/{resource_type}/{resource_id}/tags/create</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_table3672032" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_row10026740"><th align="left" class="cellrowborder" valign="top" width="20.61793820617938%" id="mcps1.3.3.3.2.5.1.1"><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p6859639">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.02809719028097%" id="mcps1.3.3.3.2.5.1.2"><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p179611479215">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="11.798820117988202%" id="mcps1.3.3.3.2.5.1.3"><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p18759866">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="48.555144485551445%" id="mcps1.3.3.3.2.5.1.4"><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p43154149">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_row5825185"><td class="cellrowborder" valign="top" width="20.61793820617938%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p2077973">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.02809719028097%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p177965479212">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.798820117988202%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p34098154">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.555144485551445%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_row6805413154310"><td class="cellrowborder" valign="top" width="20.61793820617938%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p62311347192716">resource_type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.02809719028097%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p16232194752719">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.798820117988202%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p102321473274">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.555144485551445%" headers="mcps1.3.3.3.2.5.1.4 "><ul id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_ul93453614117"><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_li43451661818">Specifies the resource type.</li><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_li16527151316115">The value can be <strong id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_b200241386664759">vpn-gateway</strong>, <strong id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_b48149636264759">customer-gateway</strong>, or <strong id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_b198448538164759">vpn-connection</strong>.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_row3375101516434"><td class="cellrowborder" valign="top" width="20.61793820617938%" headers="mcps1.3.3.3.2.5.1.1 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p1523294792720">resource_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.02809719028097%" headers="mcps1.3.3.3.2.5.1.2 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p13232124710277">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="11.798820117988202%" headers="mcps1.3.3.3.2.5.1.3 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p6233124712716">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.555144485551445%" headers="mcps1.3.3.3.2.5.1.4 "><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p523313479279">Indicates a resource ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_section18621933"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_ul5992193374713"><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_li59922337473">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_table65426" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_p788261194616">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_p14304745451">Array of <a href="#EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_ul124531254455"><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_li84543256453">Specifies a tag list.</li><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_li145412253459">A maximum of 20 tags can be specified.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_table92196"></a><a name="en-us_topic_0000001759555098_table92196"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_table92196" frame="border" border="1" rules="all"><caption><b>Table 3 </b>ResourceTag</caption><thead align="left"><tr id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_p20983151154419">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_ul65231833153920"><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_li1303152053315">Specifies a tag key.</li><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_ul961219349376"><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_li5601175311451">Specifies a tag value.</li><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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_0000001807370488__en-us_topic_0000001759555098_li17651349172117">Example request<pre class="screen" id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_screen1778465375316">POST https://{Endpoint}/v5/{project_id}/{resource_type}/{resource_id}/tags/create
|
|
{
|
|
"tags": [{
|
|
"key": "key1",
|
|
"value": "value1"
|
|
}]
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_section33379675"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_ul2144514204819"><li id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_li61441714114816">Response parameters<p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_p1623112417119"><a name="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_li61441714114816"></a><a name="en-us_topic_0000001759555098_li61441714114816"></a>Returned status code 204: Tags are successfully added.</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_section31981619"><h4 class="sectiontitle">Status Codes</h4><p id="EN-US_TOPIC_0000001807370488__en-us_topic_0000001759555098_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>
|
|
|