forked from docs/doc-exports
Reviewed-by: Muller, Martin <martin.muller@t-systems.com> Reviewed-by: Sabelnikov, Dmitriy <dmitriy.sabelnikov@t-systems.com> Co-authored-by: zhangyue <zhangyue164@huawei.com> Co-committed-by: zhangyue <zhangyue164@huawei.com>
177 lines
12 KiB
HTML
177 lines
12 KiB
HTML
<a name="evs_04_2074"></a><a name="evs_04_2074"></a>
|
|
|
|
<h1 class="topictitle1">Adding the Metadata for an EVS Disk</h1>
|
|
<div id="body1494051692105"><div class="section" id="evs_04_2074__section60214390"><h4 class="sectiontitle">Function</h4><p id="evs_04_2074__p43967757">This API is used to add or update the metadata of an EVS disk.</p>
|
|
</div>
|
|
<div class="section" id="evs_04_2074__section5058598"><h4 class="sectiontitle">URI</h4><ul id="evs_04_2074__ul4618564"><li id="evs_04_2074__li41567079">URI format<p id="evs_04_2074__p11490242"><a name="evs_04_2074__li41567079"></a><a name="li41567079"></a>POST /v2/{project_id}/volumes/{volume_id}/metadata</p>
|
|
</li><li id="evs_04_2074__li36303315">Parameter description
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2074__table58294385" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2074__row24683273"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.2.2.1.1.4.1.1"><p id="evs_04_2074__p53188122">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="evs_04_2074__p13270664">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="evs_04_2074__p1182010">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_2074__row28634009"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.1 "><p id="evs_04_2074__p37653388">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="evs_04_2074__p30025596">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.3 "><p id="evs_04_2074__p16154192">The project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_2074__row11170003"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.1 "><p id="evs_04_2074__p32355065">volume_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.2 "><p id="evs_04_2074__p3514615">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.2.2.1.1.4.1.3 "><p id="evs_04_2074__p16248438">The disk ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_2074__section45527389"><h4 class="sectiontitle">Request</h4><ul id="evs_04_2074__ul772326021175"><li id="evs_04_2074__li240048321175">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2074__table31588048" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2074__row57330849"><th align="left" class="cellrowborder" valign="top" width="17.491749174917494%" id="mcps1.3.3.2.1.1.1.5.1.1"><p id="evs_04_2074__p13287175">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.96129612961296%" id="mcps1.3.3.2.1.1.1.5.1.2"><p id="evs_04_2074__p2519427">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.481748174817483%" id="mcps1.3.3.2.1.1.1.5.1.3"><p id="evs_04_2074__p2747002">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.06520652065206%" id="mcps1.3.3.2.1.1.1.5.1.4"><p id="evs_04_2074__p21180630">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_2074__row53167494153413"><td class="cellrowborder" valign="top" width="17.491749174917494%" headers="mcps1.3.3.2.1.1.1.5.1.1 "><p id="evs_04_2074__p11599783153413">metadata</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.96129612961296%" headers="mcps1.3.3.2.1.1.1.5.1.2 "><p id="evs_04_2074__p845014073313">Map<String,String></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.481748174817483%" headers="mcps1.3.3.2.1.1.1.5.1.3 "><p id="evs_04_2074__p4730855153413">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.06520652065206%" headers="mcps1.3.3.2.1.1.1.5.1.4 "><p id="evs_04_2074__p203071547124818">The metadata to be updated. For details, see <a href="#evs_04_2074__li54973602211845">Parameter in the metadata field</a>.</p>
|
|
<p id="evs_04_2074__p47654998153413">The length of <strong id="evs_04_2074__b1673753321116">key</strong> and <strong id="evs_04_2074__b73070375119">value</strong> under <strong id="evs_04_2074__b5987839201118">metadata</strong> can contain no more than 255 bytes.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="evs_04_2074__li54973602211845"><a name="evs_04_2074__li54973602211845"></a><a name="li54973602211845"></a>Parameter in the <strong id="evs_04_2074__b1609125682412">metadata</strong> field
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2074__table32717123212358" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2074__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_2074__p50481723212358">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.959999999999999%" id="mcps1.3.3.2.2.2.1.5.1.2"><p id="evs_04_2074__p62487767212358">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.299999999999997%" id="mcps1.3.3.2.2.2.1.5.1.3"><p id="evs_04_2074__p28344363212358">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.25%" id="mcps1.3.3.2.2.2.1.5.1.4"><p id="evs_04_2074__p14192096212358">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_2074__row8709150212358"><td class="cellrowborder" valign="top" width="17.49%" headers="mcps1.3.3.2.2.2.1.5.1.1 "><p id="evs_04_2074__p34352524212358">key_val</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.959999999999999%" headers="mcps1.3.3.2.2.2.1.5.1.2 "><p id="evs_04_2074__p31091026212358">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.299999999999997%" headers="mcps1.3.3.2.2.2.1.5.1.3 "><p id="evs_04_2074__p35345177212358">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.25%" headers="mcps1.3.3.2.2.2.1.5.1.4 "><p id="evs_04_2074__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_2074__li47272903212140">Example request<pre class="screen" id="evs_04_2074__screen60313732162519">{
|
|
"metadata": {
|
|
"key1": "value1",
|
|
"key2": "value2"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_2074__section7093323"><h4 class="sectiontitle">Response</h4><ul id="evs_04_2074__ul45240216"><li id="evs_04_2074__li8787321201856">Response parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2074__table11977025201856" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2074__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_2074__p11709178184818">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_2074__p67131989483">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_2074__p87153824811">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_2074__row60683035201856"><td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="evs_04_2074__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_2074__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_2074__p20205612201856">The disk metadata, which is made up of key-value pairs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_2074__row11511747165814"><td class="cellrowborder" valign="top" width="21.43%" headers="mcps1.3.4.2.1.1.1.4.1.1 "><p id="evs_04_2074__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_2074__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_2074__p109527215417">The error message returned if an error occurs. For details, see <a href="#evs_04_2074__li0419202382514">Parameters in the error field</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="evs_04_2074__li0419202382514"><a name="evs_04_2074__li0419202382514"></a><a name="li0419202382514"></a>Parameters in the <strong id="evs_04_2074__b20716105414129">error</strong> field
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="evs_04_2074__evs_04_2013_table15441099103019" frame="border" border="1" rules="all"><thead align="left"><tr id="evs_04_2074__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_2074__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_2074__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_2074__evs_04_2013_p38578950103019">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="evs_04_2074__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_2074__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_2074__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_2074__evs_04_2013_p21623243103019">The error message returned if an error occurs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="evs_04_2074__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_2074__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_2074__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_2074__evs_04_2013_p6087468103019">The error code returned if an error occurs.</p>
|
|
<p id="evs_04_2074__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_2074__li4508766">Example response<pre class="screen" id="evs_04_2074__screen2509839515450">{
|
|
"metadata": {
|
|
"key1": "value1",
|
|
"key2": "value2"
|
|
}
|
|
}</pre>
|
|
<p id="evs_04_2074__p8355436185729">or</p>
|
|
<pre class="screen" id="evs_04_2074__screen12542185145916">{
|
|
"error": {
|
|
"message": "XXXX",
|
|
"code": "XXX"
|
|
}
|
|
}</pre>
|
|
<p id="evs_04_2074__p5655715720175">In the preceding example, <strong id="evs_04_2074__b842352706143959">error</strong> indicates a general error, for example, <strong id="evs_04_2074__b842352706144438">badrequest</strong> or <strong id="evs_04_2074__b842352706144454">itemNotFound</strong>. An example is provided as follows:</p>
|
|
<pre class="screen" id="evs_04_2074__screen220037145934">{
|
|
"badrequest": {
|
|
"message": "XXXX",
|
|
"code": "XXX"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_2074__section63839913"><h4 class="sectiontitle">Status Codes</h4><ul id="evs_04_2074__ul9862716"><li id="evs_04_2074__li21655584">Normal<p id="evs_04_2074__p60682533"><a name="evs_04_2074__li21655584"></a><a name="li21655584"></a>200</p>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="evs_04_2074__section431317151242"><h4 class="sectiontitle">Error Codes</h4><p id="evs_04_2074__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_4005.html">Disk Metadata Management</a></div>
|
|
</div>
|
|
</div>
|
|
|