forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: Li, Qiao <qiaoli@huawei.com> Co-committed-by: Li, Qiao <qiaoli@huawei.com>
172 lines
12 KiB
HTML
172 lines
12 KiB
HTML
<a name="waf_02_0093"></a><a name="waf_02_0093"></a>
|
|
|
|
<h1 class="topictitle1">Adding or Deleting Resource Tags in Batches</h1>
|
|
<div id="body1558942309611"><div class="section" id="waf_02_0093__section1062016503374"><h4 class="sectiontitle">Function Description</h4><p id="waf_02_0093__p7671452113719">This API is used to add or delete tags for a specified resource in batches.</p>
|
|
</div>
|
|
<div class="section" id="waf_02_0093__section821513114393"><h4 class="sectiontitle">URI</h4><ul id="waf_02_0093__ul94043159394"><li id="waf_02_0093__li17404171543916">URI format<p id="waf_02_0093__p1940421515398"><a name="waf_02_0093__li17404171543916"></a><a name="li17404171543916"></a>POST /v1/{project_id}/waf/{resource_id}/tags/action</p>
|
|
</li></ul>
|
|
<ul id="waf_02_0093__ul44041615103918"><li id="waf_02_0093__li12404131573914">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0093__table1934318153394" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Path parameters</caption><thead align="left"><tr id="waf_02_0093__row740411514391"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.1.1.2.5.1.1"><p id="waf_02_0093__p3404111553913"><strong id="waf_02_0093__b53521629104318">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.1.1.2.5.1.2"><p id="waf_02_0093__p17404151523914"><strong id="waf_02_0093__b1985143017434">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.1.1.2.5.1.3"><p id="waf_02_0093__p5404131517393"><strong id="waf_02_0093__b5278123164316">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.2.3.1.1.2.5.1.4"><p id="waf_02_0093__p340471553913"><strong id="waf_02_0093__b11247332134317">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0093__row17404131543918"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.1.1.2.5.1.1 "><p id="waf_02_0093__p2404815183910">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.1.1.2.5.1.2 "><p id="waf_02_0093__p940401515396">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.1.1.2.5.1.3 "><p id="waf_02_0093__p140481573915">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.1.1.2.5.1.4 "><p id="waf_02_0093__p140471543912">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0093__row440401513390"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.1.1.2.5.1.1 "><p id="waf_02_0093__p15404111512399">resource_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.1.1.2.5.1.2 "><p id="waf_02_0093__p1940491517397">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.1.1.2.5.1.3 "><p id="waf_02_0093__p1340441543917">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.2.3.1.1.2.5.1.4 "><p id="waf_02_0093__p134041015153916">Specifies the resource ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="waf_02_0093__section17708503492"><h4 class="sectiontitle">Request</h4><p id="waf_02_0093__p12670458174913">Request parameters</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0093__table14794155413502" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Parameter description</caption><thead align="left"><tr id="waf_02_0093__row208561054125012"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.3.2.5.1.1"><p id="waf_02_0093__p1985625485013"><strong id="waf_02_0093__b92003524431">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.3.2.5.1.2"><p id="waf_02_0093__p9856165416505"><strong id="waf_02_0093__b11235115317433">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.3.2.5.1.3"><p id="waf_02_0093__p9856145418503"><strong id="waf_02_0093__b1046865416439">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.3.2.5.1.4"><p id="waf_02_0093__p9856155405011"><strong id="waf_02_0093__b174401555174311">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0093__row1385625415500"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.1 "><p id="waf_02_0093__p985665465020">tags</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.2 "><p id="waf_02_0093__p885618545509">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.3 "><p id="waf_02_0093__p5856354195016"><a href="#waf_02_0093__table77071626145320">Table 3</a></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.4 "><p id="waf_02_0093__p188561554175017">Specifies the tag list.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0093__row085635410503"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.1 "><p id="waf_02_0093__p5856754155015">action</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.2 "><p id="waf_02_0093__p13856254115018">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.3 "><p id="waf_02_0093__p9856754185014">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.3.2.5.1.4 "><p id="waf_02_0093__p15856254175012">Specifies the operation to be performed. The value can be set to <strong id="waf_02_0093__b842352706101829">create</strong> or <strong id="waf_02_0093__b842352706101833">delete</strong> only.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="waf_02_0093__table77071626145320"></a><a name="table77071626145320"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0093__table77071626145320" frame="border" border="1" rules="all"><caption><b>Table 3 </b>tags</caption><thead align="left"><tr id="waf_02_0093__row16817162635310"><th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.4.2.5.1.1"><p id="waf_02_0093__p188171426105317"><strong id="waf_02_0093__b4279193111450">Parameter</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.4.2.5.1.2"><p id="waf_02_0093__p1781762619533"><strong id="waf_02_0093__b7937932154513">Mandatory</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.4.2.5.1.3"><p id="waf_02_0093__p381711268535"><strong id="waf_02_0093__b2273103404514">Type</strong></p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="25%" id="mcps1.3.3.4.2.5.1.4"><p id="waf_02_0093__p1817126185313"><strong id="waf_02_0093__b19334123515459">Description</strong></p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0093__row1681792675320"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.1 "><p id="waf_02_0093__p2817926135310">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.2 "><p id="waf_02_0093__p1817162695311">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.3 "><p id="waf_02_0093__p381762620530">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.4 "><p id="waf_02_0093__p1823311225473">Specifies the key.</p>
|
|
<p id="waf_02_0093__p208171526185320">It contains a maximum of 36 Unicode characters.</p>
|
|
<p id="waf_02_0093__p15817132615530">The key value must comply with <a href="waf_02_0086.html">Character Set Specifications</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="waf_02_0093__row198171926115312"><td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.1 "><p id="waf_02_0093__p9817526185318">value</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.2 "><p id="waf_02_0093__p7168163564713">Mandatory if <strong id="waf_02_0093__b1078511439313">action</strong> is <strong id="waf_02_0093__b17802164383116">create</strong> and optional if <strong id="waf_02_0093__b169841631163318">action</strong> is <strong id="waf_02_0093__b284912351333">delete</strong>.</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.3 "><p id="waf_02_0093__p168179268536">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="25%" headers="mcps1.3.3.4.2.5.1.4 "><p id="waf_02_0093__p15685162016479">Specifies the value.</p>
|
|
<p id="waf_02_0093__p8817162635316">Each value contains a maximum of 43 Unicode characters. When tags are being deleted and some tags do not exist, the operation is considered successful by default, and the character set of the tags will not be checked upon deletion. When tags are deleted, the tag structure body cannot be missing, and the key cannot be left blank or set to an empty string.</p>
|
|
<p id="waf_02_0093__p14817122615539">The value must comply with <a href="waf_02_0086.html">Character Set Specifications</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="waf_02_0093__section1559975641117"><h4 class="sectiontitle">Response</h4><p id="waf_02_0093__p47166791313">Response parameters</p>
|
|
<p id="waf_02_0093__p5647156135">None</p>
|
|
</div>
|
|
<div class="section" id="waf_02_0093__section13941943151411"><h4 class="sectiontitle">Example</h4><p id="waf_02_0093__p116131574153">The following examples describe how to create or delete a tag.</p>
|
|
<div class="p" id="waf_02_0093__p94881135143417">Request example<pre class="screen" id="waf_02_0093__screen166132073155">{
|
|
"action": "create",
|
|
"tags": [
|
|
{
|
|
"key": "key1",
|
|
"value": "value1"
|
|
},
|
|
{
|
|
"key": "key",
|
|
"value": "value3"
|
|
}
|
|
]
|
|
}</pre>
|
|
</div>
|
|
<p id="waf_02_0093__p19215134654813">or</p>
|
|
<pre class="screen" id="waf_02_0093__screen66231453488">{
|
|
"action": "delete",
|
|
"tags": [
|
|
{
|
|
"key": "key1"
|
|
},
|
|
{
|
|
"key": "key2",
|
|
"value": "value3"
|
|
}
|
|
]}</pre>
|
|
</div>
|
|
<div class="section" id="waf_02_0093__section1242792415233"><h4 class="sectiontitle">Status Code</h4><div class="p" id="waf_02_0093__waf_02_0012_a652d4922b7df48fca0a65bc1a38ea5f2"><a href="#waf_02_0093__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0">Table 4</a> describes the normal status code returned by the API.
|
|
<div class="tablenoborder"><a name="waf_02_0093__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><a name="waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0"></a><table cellpadding="4" cellspacing="0" summary="" id="waf_02_0093__waf_02_0012_t82c3440f3efb42a38b9d4dc4011a33d0" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Status code</caption><thead align="left"><tr id="waf_02_0093__waf_02_0012_r3d6e2f205c444705bdbb9daaac74e575"><th align="left" class="cellrowborder" valign="top" width="22%" id="mcps1.3.6.2.2.2.4.1.1"><p id="waf_02_0093__waf_02_0012_af3c4073076f24eca88d94e3fa1effdc6">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.41%" id="mcps1.3.6.2.2.2.4.1.2"><p id="waf_02_0093__waf_02_0012_en-us_topic_0144911667_p4531342288">Description</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="58.589999999999996%" id="mcps1.3.6.2.2.2.4.1.3"><p id="waf_02_0093__waf_02_0012_ada185614bba24140995b8123b3e9faa8">Meaning</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="waf_02_0093__waf_02_0012_rc7b2adc390904a1ba79e303017797786"><td class="cellrowborder" valign="top" width="22%" headers="mcps1.3.6.2.2.2.4.1.1 "><p id="waf_02_0093__waf_02_0012_a93f3895d44bb4226934cc626ac50e37b">204</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.41%" headers="mcps1.3.6.2.2.2.4.1.2 "><p id="waf_02_0093__waf_02_0012_en-us_topic_0144911667_p7538425819">No Content</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="58.589999999999996%" headers="mcps1.3.6.2.2.2.4.1.3 "><p id="waf_02_0093__waf_02_0012_en-us_topic_0144911667_p369874114414">The server successfully processed the request and is not returning any content.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="waf_02_0093__waf_02_0012_en-us_topic_0144911667_p482819399522">For details about error status codes, see <a href="waf_02_0085.html">Status Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="waf_02_0091.html">Interconnection with TMS</a></div>
|
|
</div>
|
|
</div>
|
|
|