forked from docs/doc-exports
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
177 lines
13 KiB
HTML
177 lines
13 KiB
HTML
<a name="evs_04_3040"></a><a name="evs_04_3040"></a>
|
|
|
|
<h1 class="topictitle1">Updating Metadata of an EVS Disk</h1>
|
|
<div id="body1521534330938"><div class="section" id="evs_04_3040__section19390540"><h4 class="sectiontitle">Function</h4><p id="evs_04_3040__p50301879">This API is used to update the metadata of an EVS disk.</p>
|
|
</div>
|
|
<div class="section" id="evs_04_3040__section40297137"><h4 class="sectiontitle">URI</h4><ul id="evs_04_3040__ul47920438"><li id="evs_04_3040__li28630766">URI format<p id="evs_04_3040__p196861247172719"><a name="evs_04_3040__li28630766"></a><a name="li28630766"></a>PUT /v3/{project_id}/volumes/{volume_id}/metadata</p>
|
|
</li><li id="evs_04_3040__li971734">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_3040__table8745607" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_3040__row15985080"><th align="left" class="cellrowborder" valign="top" width="30.509999999999998%" id="mcps1.3.2.2.2.1.1.4.1.1"><p id="evs_04_3040__p19723089">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.48%" id="mcps1.3.2.2.2.1.1.4.1.2"><p id="evs_04_3040__p54066375">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="51.01%" id="mcps1.3.2.2.2.1.1.4.1.3"><p id="evs_04_3040__p17300225">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_3040__row59140967"><td class="cellrowborder" valign="top" width="30.509999999999998%" headers="mcps1.3.2.2.2.1.1.4.1.1 "><p id="evs_04_3040__p25689059">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.48%" headers="mcps1.3.2.2.2.1.1.4.1.2 "><p id="evs_04_3040__p439002">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.01%" headers="mcps1.3.2.2.2.1.1.4.1.3 "><p id="evs_04_3040__p35559222">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_3040__row51597550"><td class="cellrowborder" valign="top" width="30.509999999999998%" headers="mcps1.3.2.2.2.1.1.4.1.1 "><p id="evs_04_3040__p18651996">volume_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.48%" headers="mcps1.3.2.2.2.1.1.4.1.2 "><p id="evs_04_3040__p34416674">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="51.01%" headers="mcps1.3.2.2.2.1.1.4.1.3 "><p id="evs_04_3040__p36287209">Specifies the disk ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_3040__section27129916"><h4 class="sectiontitle">Request</h4><ul id="evs_04_3040__evs_04_2076_ul772326021175"><li id="evs_04_3040__evs_04_2076_li240048321175">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_3040__evs_04_2076_table31588048" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_3040__evs_04_2076_row57330849"><th align="left" class="cellrowborder" valign="top" width="17.49%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="evs_04_3040__evs_04_2076_p13287175">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.22%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="evs_04_3040__evs_04_2076_p2519427">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.42%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="evs_04_3040__evs_04_2076_p2747002">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="48.870000000000005%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="evs_04_3040__evs_04_2076_p21180630">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_3040__evs_04_2076_row53167494153413"><td class="cellrowborder" valign="top" width="17.49%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="evs_04_3040__evs_04_2076_p11599783153413">metadata</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.22%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="evs_04_3040__evs_04_2076_p1963918543488">Map<String,String></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.42%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="evs_04_3040__evs_04_2076_p4730855153413">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="48.870000000000005%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="evs_04_3040__evs_04_2076_p47654998153413">The metadata to be updated. For details, see <a href="#evs_04_3040__evs_04_2076_li54973602211845">Parameter in the metadata field</a>.</p>
|
|
<p id="evs_04_3040__evs_04_2076_p16564956142512">The length of <strong id="evs_04_3040__evs_04_2076_b251890171417">key</strong> and <strong id="evs_04_3040__evs_04_2076_b051918016142">value</strong> under <strong id="evs_04_3040__evs_04_2076_b1752110141418">metadata</strong> can contain no more than 255 bytes.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="evs_04_3040__evs_04_2076_li54973602211845"><a name="evs_04_3040__evs_04_2076_li54973602211845"></a><a name="evs_04_2076_li54973602211845"></a>Parameter in the <strong id="evs_04_3040__evs_04_2076_b11870142742614">metadata</strong> field
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_3040__evs_04_2076_table32717123212358" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_3040__evs_04_2076_row2280240212358"><th align="left" class="cellrowborder" valign="top" width="17.49%" id="mcps1.3.3.2.2.2.1.5.1.1"><p id="evs_04_3040__evs_04_2076_p1603155994915">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.22%" id="mcps1.3.3.2.2.2.1.5.1.2"><p id="evs_04_3040__evs_04_2076_p62487767212358">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.05%" id="mcps1.3.3.2.2.2.1.5.1.3"><p id="evs_04_3040__evs_04_2076_p28344363212358">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="49.24%" id="mcps1.3.3.2.2.2.1.5.1.4"><p id="evs_04_3040__evs_04_2076_p14192096212358">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_3040__evs_04_2076_row8709150212358"><td class="cellrowborder" valign="top" width="17.49%" headers="mcps1.3.3.2.2.2.1.5.1.1 "><p id="evs_04_3040__evs_04_2076_p34352524212358">key_val</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.22%" headers="mcps1.3.3.2.2.2.1.5.1.2 "><p id="evs_04_3040__evs_04_2076_p31091026212358">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.05%" headers="mcps1.3.3.2.2.2.1.5.1.3 "><p id="evs_04_3040__evs_04_2076_p35345177212358">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="49.24%" headers="mcps1.3.3.2.2.2.1.5.1.4 "><p id="evs_04_3040__evs_04_2076_p44387080212358">The metadata information, which is made up of one or multiple key-value pairs.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="evs_04_3040__evs_04_2076_li47272903212140">Example request<pre class="screen" id="evs_04_3040__evs_04_2076_screen13669475162630">{
|
|
"metadata": {
|
|
"key1": "value1",
|
|
"key2": "value2"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_3040__section42842654"><h4 class="sectiontitle">Response</h4><ul id="evs_04_3040__evs_04_2076_ul45240216"><li id="evs_04_3040__evs_04_2076_li8787321201856">Response parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_3040__evs_04_2076_table11977025201856" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_3040__evs_04_2076_row8102228201856"><th align="left" class="cellrowborder" valign="top" width="21.43%" id="mcps1.3.4.2.1.1.1.4.1.1"><p id="evs_04_3040__evs_04_2076_p52300707201856">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.43%" id="mcps1.3.4.2.1.1.1.4.1.2"><p id="evs_04_3040__evs_04_2076_p3642697315541">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.14%" id="mcps1.3.4.2.1.1.1.4.1.3"><p id="evs_04_3040__evs_04_2076_p17319263201856">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_3040__evs_04_2076_row60683035201856"><td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="evs_04_3040__evs_04_2076_p16378828201856">metadata</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="evs_04_3040__evs_04_2076_p6490369115541">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.14%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="evs_04_3040__evs_04_2076_p20205612201856">The disk metadata, which is made up of key-value pairs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_3040__evs_04_2076_row1896317141164"><td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="evs_04_3040__evs_04_2076_p129522216412">error</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.4.2.1.1.1.4.1.2 "><p id="evs_04_3040__evs_04_2076_p1595262111415">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.14%" headers="mcps1.3.4.2.1.1.1.4.1.3 "><p id="evs_04_3040__evs_04_2076_p109527215417">The error message returned if an error occurs. For details, see <a href="#evs_04_3040__evs_04_2076_li0419202382514">Parameters in the error field</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="evs_04_3040__evs_04_2076_li0419202382514"><a name="evs_04_3040__evs_04_2076_li0419202382514"></a><a name="evs_04_2076_li0419202382514"></a>Parameters in the <strong id="evs_04_3040__evs_04_2076_b11782443191417">error</strong> field
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_3040__evs_04_2076_evs_04_2013_table15441099103019" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_3040__evs_04_2076_evs_04_2013_row54094047103019"><th align="left" class="cellrowborder" valign="top" width="21.17788221177882%" id="mcps1.3.4.2.2.2.1.4.1.1"><p id="evs_04_3040__evs_04_2076_evs_04_2013_p19541716103019">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="21.17788221177882%" id="mcps1.3.4.2.2.2.1.4.1.2"><p id="evs_04_3040__evs_04_2076_evs_04_2013_p39375186103019">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.64423557644236%" id="mcps1.3.4.2.2.2.1.4.1.3"><p id="evs_04_3040__evs_04_2076_evs_04_2013_p38578950103019">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_3040__evs_04_2076_evs_04_2013_row59401790103019"><td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.4.2.2.2.1.4.1.1 "><p id="evs_04_3040__evs_04_2076_evs_04_2013_p46815658103019">message</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.4.2.2.2.1.4.1.2 "><p id="evs_04_3040__evs_04_2076_evs_04_2013_p33971979103019">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.64423557644236%" headers="mcps1.3.4.2.2.2.1.4.1.3 "><p id="evs_04_3040__evs_04_2076_evs_04_2013_p21623243103019">The error message returned if an error occurs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_3040__evs_04_2076_evs_04_2013_row60391466103019"><td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.4.2.2.2.1.4.1.1 "><p id="evs_04_3040__evs_04_2076_evs_04_2013_p59870541103019">code</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="21.17788221177882%" headers="mcps1.3.4.2.2.2.1.4.1.2 "><p id="evs_04_3040__evs_04_2076_evs_04_2013_p17675690103019">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.64423557644236%" headers="mcps1.3.4.2.2.2.1.4.1.3 "><p id="evs_04_3040__evs_04_2076_evs_04_2013_p6087468103019">The error code returned if an error occurs.</p>
|
|
<p id="evs_04_3040__evs_04_2076_evs_04_2013_p54787218103019">For details about the error code, see <a href="evs_04_0038.html">Error Codes</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="evs_04_3040__evs_04_2076_li4508766">Example response<pre class="screen" id="evs_04_3040__evs_04_2076_screen2022106215941">{
|
|
"metadata": {
|
|
"key1": "value1",
|
|
"key2": "value2"
|
|
}
|
|
}</pre>
|
|
<p id="evs_04_3040__evs_04_2076_p8355436185729">or</p>
|
|
<pre class="screen" id="evs_04_3040__evs_04_2076_screen885399815104">{
|
|
"error": {
|
|
"message": "XXXX",
|
|
"code": "XXX"
|
|
}
|
|
}</pre>
|
|
<p id="evs_04_3040__evs_04_2076_p5655715720175">In the preceding example, <strong id="evs_04_3040__evs_04_2076_b842352706143959">error</strong> indicates a general error, for example, <strong id="evs_04_3040__evs_04_2076_b842352706144438">badrequest</strong> or <strong id="evs_04_3040__evs_04_2076_b842352706144454">itemNotFound</strong>. An example is provided as follows:</p>
|
|
<pre class="screen" id="evs_04_3040__evs_04_2076_screen44983568151026">{
|
|
"badrequest": {
|
|
"message": "XXXX",
|
|
"code": "XXX"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_3040__section50039568"><h4 class="sectiontitle">Status Codes</h4><ul id="evs_04_3040__evs_04_2076_ul5136981"><li id="evs_04_3040__evs_04_2076_li46232835">Normal<p id="evs_04_3040__evs_04_2076_p13442339"><a name="evs_04_3040__evs_04_2076_li46232835"></a><a name="evs_04_2076_li46232835"></a>200</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_3040__section431317151242"><h4 class="sectiontitle">Error Codes</h4><p id="evs_04_3040__evs_04_2013_p783819215242">For details, see <a href="evs_04_0038.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="evs_04_3028.html">EVS Disk</a></div>
|
|
</div>
|
|
</div>
|
|
|