doc-exports/docs/vbs/api-ref/en-us_topic_0098527676.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

212 lines
16 KiB
HTML

<a name="EN-US_TOPIC_0098527676"></a><a name="EN-US_TOPIC_0098527676"></a>
<h1 class="topictitle1">Adding a Tag to a Backup Policy</h1>
<div id="body1519715598295"><div class="section" id="EN-US_TOPIC_0098527676__section63962185"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0098527676__p23236933">This API is used to add a tag to a backup policy.</p>
</div>
<div class="section" id="EN-US_TOPIC_0098527676__section20183144811183"><h4 class="sectiontitle">URI</h4><ul id="EN-US_TOPIC_0098527676__ul1118474861812"><li id="EN-US_TOPIC_0098527676__li818614891814">URI format<p id="EN-US_TOPIC_0098527676__p19187134817188"><a name="EN-US_TOPIC_0098527676__li818614891814"></a><a name="li818614891814"></a>POST /v2/{project_id}/backuppolicy/{policy_id}/tags</p>
</li><li id="EN-US_TOPIC_0098527676__li718784881820">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0098527676__table14190134812183" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0098527676__row919494861812"><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_0098527676__p1519410487188">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_0098527676__p19196144831810">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_0098527676__p21981348181815">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0098527676__row21989482185"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.1 "><p id="EN-US_TOPIC_0098527676__p18202134820189">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_0098527676__p92045489189">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_0098527676__p17206248171815">Project ID</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__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_0098527676__p5147694142544">Backup policy ID</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0098527676__section18213184812181"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0098527676__ul6945631184017"><li id="EN-US_TOPIC_0098527676__li62510682184017">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0098527676__table62260077183541" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__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_0098527676__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_0098527676__p29622330">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0098527676__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_0098527676__p5568910183541">tag</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_0098527676__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_0098527676__p30401735183541">dict</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_0098527676__p18240257183541">Tag to be added</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__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_0098527676__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_0098527676__p39198449112438">Tag key. It contains 1 to 36 characters, chosen from letters, digits, hyphens (-), and underscores (_).</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p25198977183541">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_0098527676__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_0098527676__p37312662112438">Tag value. A tag value consists of 0 to 43 characters, chosen from letters, digits, hyphens (-), and underscores (_).</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
<ul id="EN-US_TOPIC_0098527676__ul22483156"><li id="EN-US_TOPIC_0098527676__li1021814">Example request<pre class="screen" id="EN-US_TOPIC_0098527676__screen2723943213570">{
"tag":{
"key":"0f187b65-8d0e-4fc0-9096-3b55d330531e",
"value":"volume"
}
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0098527676__section8277104817184"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0098527676__ul1827954812187"><li id="EN-US_TOPIC_0098527676__li9279154821819">Parameter description
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0098527676__table112811848161817" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0098527676__row1128594817182"><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_0098527676__p132281925105219">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_0098527676__p13228182517525">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_0098527676__p12228152565215">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0098527676__row22921348151817"><td class="cellrowborder" valign="top" width="24.72%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0098527676__p4295248131816">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_0098527676__p122991448181818">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_0098527676__p2300204817183">Error message returned after an error occurs</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__row13301114816189"><td class="cellrowborder" valign="top" width="24.72%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0098527676__p130215483188">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_0098527676__p17305144813183">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_0098527676__p173061448101814">Error code returned after an error occurs</p>
<p id="EN-US_TOPIC_0098527676__p730816482184">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_0098527676__li1310848151819">Example response<pre class="screen" id="EN-US_TOPIC_0098527676__screen931394871818">{
"error": {
"message": "XXXX",
"code": "XXX"
}
}</pre>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0098527676__section24171358"><h4 class="sectiontitle">Status Code</h4><ul id="EN-US_TOPIC_0098527676__ul59834015"><li id="EN-US_TOPIC_0098527676__li1635228">Normal<p id="EN-US_TOPIC_0098527676__p14717055"><a name="EN-US_TOPIC_0098527676__li1635228"></a><a name="li1635228"></a>204</p>
</li><li id="EN-US_TOPIC_0098527676__li65344633">Abnormal
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0098527676__table51230787" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p12164329">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p26457778">The server failed to process the request.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p11009764">You must enter the username and password to access the requested page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p32016662">You are forbidden to access the requested page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p3802708716376">The server could not find the requested page.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p23586373163725">You are not allowed to use the method specified in the request.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p39357967163758">The response generated by the server could not be accepted by the client.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p20492948163754">You must use the proxy server for authentication so that the request can be processed.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p1281119163738">The request timed out.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p59021712164354">The request could not be processed due to a conflict.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p28099101">Failed to complete the request because of an internal service error.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p58071768164938">Failed to complete the request because the server does not support the requested function.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p38622347164943">Failed to complete the request because the request is invalid.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p11401882164956">Failed to complete the request because the service is unavailable.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0098527676__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_0098527676__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_0098527676__p24305815">A gateway timeout error occurred.</p>
</td>
</tr>
</tbody>
</table>
</div>
</li></ul>
</div>
<div class="section" id="EN-US_TOPIC_0098527676__section1362310255432"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0098527676__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>