doc-exports/docs/vbs/api-ref/en-us_topic_0067142132.html
Wei, Hongmin 63123ef1be VBS API initial version
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Wei, Hongmin <weihongmin1@huawei.com>
Co-committed-by: Wei, Hongmin <weihongmin1@huawei.com>
2022-10-25 07:47:39 +00:00

228 lines
19 KiB
HTML

<a name="EN-US_TOPIC_0067142132"></a><a name="EN-US_TOPIC_0067142132"></a>
<h1 class="topictitle1">Batch Updating or Removing Tags of a Backup Policy</h1>
<div id="body1500448542447"><div class="section" id="EN-US_TOPIC_0067142132__section63962185"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0067142132__p23236933">This API is used to update or remove the tags of a backup policy.</p>
</div>
<div class="section" id="EN-US_TOPIC_0067142132__section38788755"><h4 class="sectiontitle">URI</h4><ul id="EN-US_TOPIC_0067142132__ul3143429"><li id="EN-US_TOPIC_0067142132__li28290863">URI format<p id="EN-US_TOPIC_0067142132__p9858548"><a name="EN-US_TOPIC_0067142132__li28290863"></a><a name="li28290863"></a>POST /v2/{project_id}/backuppolicy/{policy_id}/tags/action</p>
</li><li id="EN-US_TOPIC_0067142132__li21618074">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0067142132__table60344938" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0067142132__row59011071"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.1.4.1.1"><p id="EN-US_TOPIC_0067142132__p15167431">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.1.4.1.2"><p id="EN-US_TOPIC_0067142132__p20602375">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.1.4.1.3"><p id="EN-US_TOPIC_0067142132__p58179688">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0067142132__row14934289"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.1 "><p id="EN-US_TOPIC_0067142132__p1717931">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.2 "><p id="EN-US_TOPIC_0067142132__p4934750">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.3 "><p id="EN-US_TOPIC_0067142132__p64170449">Project ID</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row49177768142544"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.1 "><p id="EN-US_TOPIC_0067142132__p23976272142544">policy_id</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.2 "><p id="EN-US_TOPIC_0067142132__p63029893142544">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.3 "><p id="EN-US_TOPIC_0067142132__p5147694142544">Backup policy ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0067142132__section13554483"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0067142132__ul6945631184017"><li id="EN-US_TOPIC_0067142132__li62510682184017">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0067142132__table62260077183541" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0067142132__row18137457183541"><th align="left" class="cellrowborder" valign="top" width="21.42%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="EN-US_TOPIC_0067142132__p1431817452527">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="13.34%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="EN-US_TOPIC_0067142132__p40133923">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.49%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="EN-US_TOPIC_0067142132__p14225104112">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="47.75%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="EN-US_TOPIC_0067142132__p29622330">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0067142132__row12496319183541"><td class="cellrowborder" valign="top" width="21.42%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0067142132__p5568910183541">action</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0067142132__p48428590183541">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.49%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0067142132__p30401735183541">string</p>
</td>
<td class="cellrowborder" valign="top" width="47.75%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0067142132__p46621440183541">Operator (case-sensitive). Possible values are:</p>
<p id="EN-US_TOPIC_0067142132__p35549830192731"><strong id="EN-US_TOPIC_0067142132__b842352706113353">create</strong>: indicates creating tags. A tag will be created when no tag with the same key exists.</p>
<p id="EN-US_TOPIC_0067142132__p4070115192755"><strong id="EN-US_TOPIC_0067142132__b842352706113449">update</strong>: indicates updating tags. A tag will be created when no tag with the same key exists.</p>
<p id="EN-US_TOPIC_0067142132__p18240257183541"><strong id="EN-US_TOPIC_0067142132__b842352706154310">delete</strong>: indicates deleting tags.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row29944588183541"><td class="cellrowborder" valign="top" width="21.42%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0067142132__p9592589183541">tags</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0067142132__p38802283183541">No</p>
</td>
<td class="cellrowborder" valign="top" width="17.49%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0067142132__p55977229183541">list&lt;dict&gt;</p>
</td>
<td class="cellrowborder" valign="top" width="47.75%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0067142132__p37861724183541">List of tags you want to operate</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row5211199183541"><td class="cellrowborder" valign="top" width="21.42%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0067142132__p19454012183541">key</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0067142132__p32271129183541">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="17.49%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0067142132__p63824638183541">string</p>
</td>
<td class="cellrowborder" valign="top" width="47.75%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0067142132__p2413204183541">Tag key. It cannot be left null. When <strong id="EN-US_TOPIC_0067142132__b842352706172029">action</strong> is <strong id="EN-US_TOPIC_0067142132__b842352706172035">create</strong> or <strong id="EN-US_TOPIC_0067142132__b842352706191216">update</strong>, the maximum length of a tag key is 36 characters; when <strong id="EN-US_TOPIC_0067142132__b842352706172051">action</strong> is <strong id="EN-US_TOPIC_0067142132__b842352706172056">delete</strong>, that is 127 characters. A tag key cannot contain non-printable ASCII characters (0-31) and the following special characters: =*&lt;&gt;\,|/</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row21718841183541"><td class="cellrowborder" valign="top" width="21.42%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0067142132__p14395674183541">value</p>
</td>
<td class="cellrowborder" valign="top" width="13.34%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0067142132__p25198977183541">No (mandatory when <strong id="EN-US_TOPIC_0067142132__b842352706211644">action</strong> is set to <strong id="EN-US_TOPIC_0067142132__b84235270616530">create</strong> and optional when <strong id="EN-US_TOPIC_0067142132__b663094146">action</strong> is set to <strong id="EN-US_TOPIC_0067142132__b842352706211650">delete</strong>)</p>
</td>
<td class="cellrowborder" valign="top" width="17.49%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0067142132__p27851219183541">string</p>
</td>
<td class="cellrowborder" valign="top" width="47.75%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0067142132__p41356282183541">Tag value. When <strong id="EN-US_TOPIC_0067142132__b1355389951">action</strong> is <strong id="EN-US_TOPIC_0067142132__b1720861864">create</strong> or <strong id="EN-US_TOPIC_0067142132__b84235270619134">update</strong>, the maximum length of a tag value is 43 characters; when <strong id="EN-US_TOPIC_0067142132__b241696916">action</strong> is <strong id="EN-US_TOPIC_0067142132__b429515768">delete</strong>, that is 255 characters. A tag value can contain only letters, digits, hyphens (-), and underscores (_).</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0067142132__ul22483156"><li id="EN-US_TOPIC_0067142132__li1021814">Example request<pre class="screen" id="EN-US_TOPIC_0067142132__screen2723943213570">{
"action":"delete",
"tags":[{
"key":"0f187b65-8d0e-4fc0-9096-3b55d330531e",
"value":"volume"
},{
"key":"0f187b65-8d0e-4fc0-9096-3b55d330531d",
"value":"volume"
}]
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0067142132__section54881489"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0067142132__ul20896204"><li id="EN-US_TOPIC_0067142132__li2520711120254">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0067142132__table2553741120254" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0067142132__row84520220254"><th align="left" class="cellrowborder" valign="top" width="24.72%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0067142132__p2604058769">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="20.18%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0067142132__p560416581616">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="55.1%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0067142132__p96041581567">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0067142132__row4113847020254"><td class="cellrowborder" valign="top" width="24.72%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0067142132__p4388173520254">message</p>
</td>
<td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0067142132__p534483917131">string</p>
</td>
<td class="cellrowborder" valign="top" width="55.1%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0067142132__p1103955520254">Error message returned after an error occurs</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row3224713720254"><td class="cellrowborder" valign="top" width="24.72%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0067142132__p6188131520254">code</p>
</td>
<td class="cellrowborder" valign="top" width="20.18%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0067142132__p3027879417131">string</p>
</td>
<td class="cellrowborder" valign="top" width="55.1%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0067142132__p6179451720254">Error code returned after an error occurs</p>
<p id="EN-US_TOPIC_0067142132__p1927974620254">For details about error codes, see <a href="en-us_topic_0022472083.html">Error Codes</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li><li id="EN-US_TOPIC_0067142132__li53848109">Example response<pre class="screen" id="EN-US_TOPIC_0067142132__screen20692691101149">{
"error": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0067142132__section24171358"><h4 class="sectiontitle">Status Codes</h4><ul id="EN-US_TOPIC_0067142132__ul59834015"><li id="EN-US_TOPIC_0067142132__li1635228">Normal<p id="EN-US_TOPIC_0067142132__p14717055"><a name="EN-US_TOPIC_0067142132__li1635228"></a><a name="li1635228"></a>204</p>
</li><li id="EN-US_TOPIC_0067142132__li65344633">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0067142132__table51230787" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0067142132__row60503138"><th align="left" class="cellrowborder" valign="top" width="43.419999999999995%" id="mcps1.3.5.2.2.1.1.3.1.1"><p id="EN-US_TOPIC_0067142132__p1807185">Status Code</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="56.58%" id="mcps1.3.5.2.2.1.1.3.1.2"><p id="EN-US_TOPIC_0067142132__p12164329">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0067142132__row45786577"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p17725233">400 Bad Request</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p26457778">The server failed to process the request.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row36793414"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p27476571">401 Unauthorized</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p11009764">You must enter the username and password to access the requested page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row31979016"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p40163483">403 Forbidden</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p32016662">You are forbidden to access the requested page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row4499052116376"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p2035357816376">404 Not Found</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p3802708716376">The server could not find the requested page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row8462523163725"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p14375766163725">405 Method Not Allowed</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p23586373163725">You are not allowed to use the method specified in the request.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row60343628163758"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p55995701163758">406 Not Acceptable</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p39357967163758">The response generated by the server could not be accepted by the client.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row32079544163754"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p48306260163754">407 Proxy Authentication Required</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p20492948163754">You must use the proxy server for authentication so that the request can be processed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row28680770163738"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p41441040163738">408 Request Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p1281119163738">The request timed out.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row65552906164354"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p8185203164354">409 Conflict</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p59021712164354">The request could not be processed due to a conflict.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row19714506"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p53371190">500 Internal Server Error</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p28099101">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row32688750164938"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p30543097164938">501 Not Implemented</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p58071768164938">Failed to complete the request because the server does not support the requested function.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row11809518164943"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p17046908164943">502 Bad Gateway</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p38622347164943">Failed to complete the request because the request is invalid.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row38399341164956"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p23338889164956">503 Service Unavailable</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p11401882164956">Failed to complete the request because the service is unavailable.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0067142132__row51565323"><td class="cellrowborder" valign="top" width="43.419999999999995%" headers="mcps1.3.5.2.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0067142132__p16041657">504 Gateway Timeout</p>
</td>
<td class="cellrowborder" valign="top" width="56.58%" headers="mcps1.3.5.2.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0067142132__p24305815">A gateway timeout error occurred.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0067142132__section1362310255432"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0067142132__p129821455154315">For details, see <a href="en-us_topic_0022472083.html">Error Codes</a>.</p>
</div>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0043410516.html">Backup Policies</a></div>
</div>
</div>