forked from docs/doc-exports
Reviewed-by: gtema <artem.goncharov@gmail.com> Co-authored-by: Yang, Tong <yangtong2@huawei.com> Co-committed-by: Yang, Tong <yangtong2@huawei.com>
150 lines
12 KiB
HTML
150 lines
12 KiB
HTML
<a name="mrs_02_0074"></a><a name="mrs_02_0074"></a>
|
|
|
|
<h1 class="topictitle1">Adding or Deleting Cluster Tags in Batches</h1>
|
|
<div id="body8662426"><div class="section" id="mrs_02_0074__s4969c1be9a19479d9af7069822fdb764"><h4 class="sectiontitle">Function</h4><p id="mrs_02_0074__a89402284242943ec81528f70b265430e">This API is used to add or delete tags to or from a specified cluster in batches.</p>
|
|
<p id="mrs_02_0074__en-us_topic_0110707084_p25683217447">You can add a maximum of 10 tags to a cluster.</p>
|
|
<p id="mrs_02_0074__en-us_topic_0110707084_p15682216442">This API is idempotent.</p>
|
|
<ul id="mrs_02_0074__ul16982111262819"><li id="mrs_02_0074__li15982812172815">If a tag to be created has the same key as an existing tag in a cluster, the tag will overwrite the existing one.</li><li id="mrs_02_0074__li13452191815289">When tags are being deleted and some tags do not exist, the operation is considered successful by default. The character set of the tags will not be checked. A key and a value can respectively contain up to 36 and 43 Unicode characters. When tags are deleted, the tag structure body cannot be missing, and the key cannot be left blank or set to an empty string.</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_02_0074__s7e1e6a97191e4347941ecfc96abd3c77"><h4 class="sectiontitle">URI</h4><ul id="mrs_02_0074__ul3299804811311"><li id="mrs_02_0074__li3701617811311">Format<p id="mrs_02_0074__p92471313155614"><a name="mrs_02_0074__li3701617811311"></a><a name="li3701617811311"></a>POST /v1.1/{project_id}/clusters/{cluster_id}/tags/action</p>
|
|
</li><li id="mrs_02_0074__li29511803172648">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0074__tf3254cc0bddd4ce1a9b92cb40f6de853" frame="border" border="1" rules="all"><caption><b>Table 1 </b>URI parameter description</caption><thead align="left"><tr id="mrs_02_0074__r2e84186059434d99b8c742382b0fee81"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.1"><p id="mrs_02_0074__ade38f74c59ce41faa66bfe43bc20a96a"><strong id="mrs_02_0074__b1446111496168">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.2.2.1.2.4.1.2"><p id="mrs_02_0074__en-us_topic_0110707084_p388412816227"><strong id="mrs_02_0074__b19942165271618">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.2.2.2.1.2.4.1.3"><p id="mrs_02_0074__a032b43d71d3246f3991872e84aaadb53"><strong id="mrs_02_0074__b1169245617167">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0074__ree613defae51403cb54596766e6645ce"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0074__a881b5bd84a2f4a0d9afdeb545ba6eef9">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0074__aa916f1d130ea49498084b3ba255cfd9c">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0074__aea751a56ac34435ca4eafc4850a8e492">Project ID. For details on how to obtain the project ID, see <a href="mrs_02_0011.html">Obtaining a Project ID</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0074__rb0e1b8eddea44717be151f0638fbdeed"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.1 "><p id="mrs_02_0074__en-us_topic_0110707084_p288462815221">cluster_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.2.2.1.2.4.1.2 "><p id="mrs_02_0074__abdbf690e3661474bbb1052629f8f6f1e">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.2.2.2.1.2.4.1.3 "><p id="mrs_02_0074__en-us_topic_0110707084_p78845285227">Cluster ID</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="mrs_02_0074__s6d1b0cc8a05a4f2aba89dbb8a107a8c6"><h4 class="sectiontitle">Request</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0074__table14432239181616" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameter description</caption><thead align="left"><tr id="mrs_02_0074__r77cc1fcfa9db457da93d35e4eb787815"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.2.2.5.1.1"><p id="mrs_02_0074__a21974b0943aa4cb6a12f14d29817a199"><strong id="mrs_02_0074__b6289731687">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.2.2.5.1.2"><p id="mrs_02_0074__a89bdd7658a454789ba35ec57206f51df"><strong id="mrs_02_0074__b14395575811">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.2.2.5.1.3"><p id="mrs_02_0074__a4c90654eaeb84e0fb1f95bcd07c315ca"><strong id="mrs_02_0074__b753844833016">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.3.2.2.5.1.4"><p id="mrs_02_0074__a4a95222fe65145f5a74573043ef0929f"><strong id="mrs_02_0074__b27056107814">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0074__row74701412153511"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0074__en-us_topic_0110707084_p511118336479">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0074__en-us_topic_0110707084_p91125331476">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0074__abc04c3b98e384b05a9b5c16cb5760b14">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0074__p2803193053319">Operation to be performed. The value can be set to <strong id="mrs_02_0074__b842352706101829">create</strong> or <strong id="mrs_02_0074__b842352706101833">delete</strong> only.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0074__row1928473143317"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.2.2.5.1.1 "><p id="mrs_02_0074__a53353f8c43234b49bebf1528691aadd3">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.2 "><p id="mrs_02_0074__a1da3b045858d4d998d6f3bf94bbeef19">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.2.2.5.1.3 "><p id="mrs_02_0074__a8de69057efac4661aa74d763f46fe772">List<resource_tag></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.2.2.5.1.4 "><p id="mrs_02_0074__p828412312331">Tag list. For details about the parameter, see <a href="#mrs_02_0074__table102451749203418">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0074__table102451749203418"></a><a name="table102451749203418"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0074__table102451749203418" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="mrs_02_0074__b15148191443118">tags</strong> parameter description</caption><thead align="left"><tr id="mrs_02_0074__row11245134983416"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.3.2.5.1.1"><p id="mrs_02_0074__p11245549153412">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.3.2.5.1.2"><p id="mrs_02_0074__p15245164911342"><strong id="mrs_02_0074__b1012615358">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.3.3.2.5.1.3"><p id="mrs_02_0074__p02452491347"><strong id="mrs_02_0074__b1180027363">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="45%" id="mcps1.3.3.3.2.5.1.4"><p id="mrs_02_0074__p4245104914346"><strong id="mrs_02_0074__b1011673983">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0074__row624504943418"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_02_0074__p4245114911345">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_02_0074__p2024534963413">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_02_0074__p12245164933414">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_02_0074__p182451949113418">Key. A tag key can contain only uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_).</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="mrs_02_0074__row9245164914346"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.1 "><p id="mrs_02_0074__p17246104915345">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.2 "><p id="mrs_02_0074__p122465497341">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.3.3.2.5.1.3 "><p id="mrs_02_0074__p52469499349">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="45%" headers="mcps1.3.3.3.2.5.1.4 "><p id="mrs_02_0074__p3246174915343">Tag value. A tag value can contain only uppercase letters, lowercase letters, digits, hyphens (-), and underscores (_).</p>
|
|
<p id="mrs_02_0074__p20457145933916">Note:</p>
|
|
<ul id="mrs_02_0074__ul1592490114013"><li id="mrs_02_0074__li16237644400">This parameter is mandatory for adding a tag.</li><li id="mrs_02_0074__li209247084010">This parameter is optional for deleting a tag.</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="mrs_02_0074__s7889c008f458454892786e0168d76047"><h4 class="sectiontitle">Response</h4><p id="mrs_02_0074__a91195d5348444358ad629b1b7312d7b6"><strong id="mrs_02_0074__a916b9d77fc144201af275d605991678d">Response parameters</strong></p>
|
|
<p id="mrs_02_0074__en-us_topic_0110707084_p24307517438">None.</p>
|
|
</div>
|
|
<div class="section" id="mrs_02_0074__s49ceead68c9642a59eb5d3ddc20f81c2"><h4 class="sectiontitle">Example</h4><ul id="mrs_02_0074__u7eab433989214db5b0435c16ecd2c6b7"><li id="mrs_02_0074__l5536f317f63d403fa08b2a4ec11aa179">Example request</li></ul>
|
|
<pre class="screen" id="mrs_02_0074__s6e07ba6f0e4f424f8b6baced9f5948bc">{
|
|
"action": "create",
|
|
"tags": [
|
|
{
|
|
"key": "key1",
|
|
"value": "value1"
|
|
},
|
|
{
|
|
"key": "key",
|
|
"value": "value3"
|
|
}
|
|
]
|
|
} </pre>
|
|
<ul id="mrs_02_0074__u3893294f072f4aac8aa2e1947c5e74a2"><li id="mrs_02_0074__lbd8b34f3361c4a05b67ee1755810f03f">Example response<p id="mrs_02_0074__aa05885fe5df34abf9d9f1b6a7cbe5aa4"><a name="mrs_02_0074__lbd8b34f3361c4a05b67ee1755810f03f"></a><a name="lbd8b34f3361c4a05b67ee1755810f03f"></a>None.</p>
|
|
</li></ul>
|
|
<p id="mrs_02_0074__a3d4d0ce299014a18a97ce6077ce96f5e"></p>
|
|
</div>
|
|
<div class="section" id="mrs_02_0074__se40bddf775334160bff30d5c6259c3f3"><h4 class="sectiontitle">Status Code</h4><p id="mrs_02_0074__afb0d690e1fc7428c8f0fe4796f1cb9e1"><a href="#mrs_02_0074__t8387a0fadf974df1925645625284999c">Table 4</a> describes the status code of this API.</p>
|
|
|
|
<div class="tablenoborder"><a name="mrs_02_0074__t8387a0fadf974df1925645625284999c"></a><a name="t8387a0fadf974df1925645625284999c"></a><table cellpadding="4" cellspacing="0" summary="" id="mrs_02_0074__t8387a0fadf974df1925645625284999c" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status code</caption><thead align="left"><tr id="mrs_02_0074__r940e742a18ba4bb1b68472e1d18a01d1"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.6.3.2.3.1.1"><p id="mrs_02_0074__a7e168e3e863f4836be71177c7b7865f8"><strong id="mrs_02_0074__b1359719161283">Status Code</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="70%" id="mcps1.3.6.3.2.3.1.2"><p id="mrs_02_0074__adb382a0290854ac191b3766fa8589fd8"><strong id="mrs_02_0074__b8950181816815">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="mrs_02_0074__rfdbdcd9448224fc7859434ea27e4fa60"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.6.3.2.3.1.1 "><p id="mrs_02_0074__ab74c60350a4644c0843fb5f83c2f8a2c">204</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="70%" headers="mcps1.3.6.3.2.3.1.2 "><p id="mrs_02_0074__en-us_topic_0110707084_p39771881331">The operation is successful.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="mrs_02_0070.html">Tag Management APIs</a></div>
|
|
</div>
|
|
</div>
|
|
|