forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: guoyanyan <guoyanyan3@huawei.com> Co-committed-by: guoyanyan <guoyanyan3@huawei.com>
194 lines
18 KiB
HTML
194 lines
18 KiB
HTML
<a name="EN-US_TOPIC_0053158695"></a><a name="EN-US_TOPIC_0053158695"></a>
|
|
|
|
<h1 class="topictitle1">Modifying Specified <span id="text68606276113">BMS</span><span id="text697718436191"></span><span id="text1460215386362"></span> Metadata (Native OpenStack API)</h1>
|
|
<div id="body1456137814029"><div class="section" id="EN-US_TOPIC_0053158695__section19950704192629"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0053158695__p5394350192629">This API is used to modify specified <span id="EN-US_TOPIC_0053158695__text11223145051913">BMS</span><span id="EN-US_TOPIC_0053158695__text822312503191"></span><span id="EN-US_TOPIC_0053158695__text9209104493611"></span> metadata.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0053158695__section48821040143631"><h4 class="sectiontitle">Constraints</h4><p id="EN-US_TOPIC_0053158695__p166802525919">The <span id="EN-US_TOPIC_0053158695__text268211185242">BMS</span><span id="EN-US_TOPIC_0053158695__text16682201812243"></span><span id="EN-US_TOPIC_0053158695__text5682161812243"></span> <strong id="EN-US_TOPIC_0053158695__b10682181832419">OS-EXT-STS:vm_state</strong> attribute (<span id="EN-US_TOPIC_0053158695__text568291872413">BMS</span><span id="EN-US_TOPIC_0053158695__text1682131811240"></span><span id="EN-US_TOPIC_0053158695__text146827189243"></span> status) must be <strong id="EN-US_TOPIC_0053158695__b46821188247">active</strong>, <strong id="EN-US_TOPIC_0053158695__b3682101892414">stopped</strong>, or <strong id="EN-US_TOPIC_0053158695__b468320181246">paused</strong>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0053158695__section48549151192629"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0053158695__p32314870192629">PUT /v2.1/{project_id}/servers/{server_id}/metadata/{key}</p>
|
|
<p id="EN-US_TOPIC_0053158695__p0377155693410"><a href="#EN-US_TOPIC_0053158695__table1370626163519">Table 1</a> lists the parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0053158695__table1370626163519"></a><a name="table1370626163519"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158695__table1370626163519" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0053158695__row1708361352"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.4.2.4.1.1"><p id="EN-US_TOPIC_0053158695__p11130554192629">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.4.2.4.1.2"><p id="EN-US_TOPIC_0053158695__p29159654192629">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.3.4.2.4.1.3"><p id="EN-US_TOPIC_0053158695__p13121799192629">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0053158695__row17708565350"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0053158695__p58565959192629">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0053158695__p46222262192629">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0053158695__p53015737192629">Specifies the project ID.</p>
|
|
<p id="EN-US_TOPIC_0053158695__p9141450142010">For how to obtain the project ID, see <a href="https://docs.otc.t-systems.com/en-us/api/apiug/apig-en-api-180328009.html" target="_blank" rel="noopener noreferrer">Obtaining Required Information</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0053158695__row137081065353"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0053158695__p60875907192629">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0053158695__p32001416192629">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0053158695__p41977918192629">Specifies the <span id="EN-US_TOPIC_0053158695__text35661922132411">BMS</span><span id="EN-US_TOPIC_0053158695__text1756617225243"></span><span id="EN-US_TOPIC_0053158695__text75661722162414"></span> ID.</p>
|
|
<p id="EN-US_TOPIC_0053158695__p29791113277">You can obtain the BMS ID from the <span id="EN-US_TOPIC_0053158695__en-us_topic_0113746489_text013014803615">BMS</span><span id="EN-US_TOPIC_0053158695__en-us_topic_0113746489_text10131448133612"></span> console or by calling the <a href="en-us_topic_0053158693.html">Querying BMSs (Native OpenStack API)</a>.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0053158695__row570816103517"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.1 "><p id="EN-US_TOPIC_0053158695__p2044590819279">key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.2 "><p id="EN-US_TOPIC_0053158695__p4550582719279">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.3.4.2.4.1.3 "><p id="EN-US_TOPIC_0053158695__p6209335919279">Specifies the <span id="EN-US_TOPIC_0053158695__text1279921102018">BMS</span><span id="EN-US_TOPIC_0053158695__text11799017207"></span><span id="EN-US_TOPIC_0053158695__text116831012375"></span> metadata key value to be modified.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0053158695__section42256947192629"><h4 class="sectiontitle">Request</h4><ul id="EN-US_TOPIC_0053158695__ul260660192629"><li id="EN-US_TOPIC_0053158695__li2345947192629">Request parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158695__table21113531192629" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0053158695__row12974012192629"><th align="left" class="cellrowborder" valign="top" width="17.2%" id="mcps1.3.4.2.1.1.1.5.1.1"><p id="EN-US_TOPIC_0053158695__p59978491115233">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="19.27%" id="mcps1.3.4.2.1.1.1.5.1.2"><p id="EN-US_TOPIC_0053158695__p87612353016">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="22.28%" id="mcps1.3.4.2.1.1.1.5.1.3"><p id="EN-US_TOPIC_0053158695__p26419641115233">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="41.25%" id="mcps1.3.4.2.1.1.1.5.1.4"><p id="EN-US_TOPIC_0053158695__p64181866115233">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0053158695__row8613312192629"><td class="cellrowborder" valign="top" width="17.2%" headers="mcps1.3.4.2.1.1.1.5.1.1 "><p id="EN-US_TOPIC_0053158695__p26589676192629">meta</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="19.27%" headers="mcps1.3.4.2.1.1.1.5.1.2 "><p id="EN-US_TOPIC_0053158695__p57785097181826">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="22.28%" headers="mcps1.3.4.2.1.1.1.5.1.3 "><p id="EN-US_TOPIC_0053158695__p38929685192629">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="41.25%" headers="mcps1.3.4.2.1.1.1.5.1.4 "><p id="EN-US_TOPIC_0053158695__p59800316192629">Specifies the user-defined metadata key and value pair. For details, see <a href="#EN-US_TOPIC_0053158695__table40778039192629">Table 2</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0053158695__table40778039192629"></a><a name="table40778039192629"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158695__table40778039192629" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="EN-US_TOPIC_0053158695__b5549826114416">meta</strong> field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0053158695__row63796811192629"><th align="left" class="cellrowborder" valign="top" width="17.810000000000002%" id="mcps1.3.4.2.1.2.2.5.1.1"><p id="EN-US_TOPIC_0053158695__p16744351100">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="18.759999999999998%" id="mcps1.3.4.2.1.2.2.5.1.2"><p id="EN-US_TOPIC_0053158695__p6539153311416">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.630000000000003%" id="mcps1.3.4.2.1.2.2.5.1.3"><p id="EN-US_TOPIC_0053158695__p14755351010">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.800000000000004%" id="mcps1.3.4.2.1.2.2.5.1.4"><p id="EN-US_TOPIC_0053158695__p47711354019">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0053158695__row30326018192629"><td class="cellrowborder" valign="top" width="17.810000000000002%" headers="mcps1.3.4.2.1.2.2.5.1.1 "><p id="EN-US_TOPIC_0053158695__p40488404192629">User-defined field key and value pair</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="18.759999999999998%" headers="mcps1.3.4.2.1.2.2.5.1.2 "><p id="EN-US_TOPIC_0053158695__p14539633743">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.630000000000003%" headers="mcps1.3.4.2.1.2.2.5.1.3 "><p id="EN-US_TOPIC_0053158695__p27540070192629">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.800000000000004%" headers="mcps1.3.4.2.1.2.2.5.1.4 "><p id="EN-US_TOPIC_0053158695__p11161128192629">Specifies the user-defined metadata key and value pair.</p>
|
|
<ul id="EN-US_TOPIC_0053158695__ul687584551016"><li id="EN-US_TOPIC_0053158695__en-us_topic_0053158712_li869142020243">Each key or value contains a maximum of 255 characters.</li><li id="EN-US_TOPIC_0053158695__en-us_topic_0053158712_li1628764312318">The key does not support the following special characters:<p id="EN-US_TOPIC_0053158695__en-us_topic_0053158712_p104281244172319"><a name="EN-US_TOPIC_0053158695__en-us_topic_0053158712_li1628764312318"></a><a name="en-us_topic_0053158712_li1628764312318"></a>:`~!@#$%^&*()=+<,>?/'";{[]}|\</p>
|
|
</li><li id="EN-US_TOPIC_0053158695__en-us_topic_0053158712_li12882162717238">The value does not support the following special characters:<p id="EN-US_TOPIC_0053158695__en-us_topic_0053158712_p15830162842312"><a name="EN-US_TOPIC_0053158695__en-us_topic_0053158712_li12882162717238"></a><a name="en-us_topic_0053158712_li12882162717238"></a>\"</p>
|
|
</li></ul>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li></ul>
|
|
<ul id="EN-US_TOPIC_0053158695__ul42673734212835"><li id="EN-US_TOPIC_0053158695__li33341290192629">Example request<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0053158695__screen653514319373"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span></pre></div></td><td class="code"><div><pre><span></span><span class="n">PUT</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{ECS Endpoint}/v2.1/c685484a8cc2416b97260938705deb65/servers/95bf2490-5428-432c-ad9b-5e3406f869dd/metadata/{key}</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0053158695__screen29782980195122"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"meta"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"key"</span><span class="p">:</span><span class="w"> </span><span class="s">"value"</span>
|
|
<span class="w"> </span><span class="p">}</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0053158695__section12391939192629"><h4 class="sectiontitle">Response</h4><ul id="EN-US_TOPIC_0053158695__ul64223009192629"><li id="EN-US_TOPIC_0053158695__li41136177192629">Response parameters
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158695__table34681280192629" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0053158695__row7754416192629"><th align="left" class="cellrowborder" valign="top" width="23.912391239123913%" id="mcps1.3.5.2.1.1.1.4.1.1"><p id="EN-US_TOPIC_0053158695__p053124814019">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.7023702370237%" id="mcps1.3.5.2.1.1.1.4.1.2"><p id="EN-US_TOPIC_0053158695__p165594820018">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.38523852385239%" id="mcps1.3.5.2.1.1.1.4.1.3"><p id="EN-US_TOPIC_0053158695__p958124812019">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0053158695__row34495047192629"><td class="cellrowborder" valign="top" width="23.912391239123913%" headers="mcps1.3.5.2.1.1.1.4.1.1 "><p id="EN-US_TOPIC_0053158695__p42635402192629">meta</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.7023702370237%" headers="mcps1.3.5.2.1.1.1.4.1.2 "><p id="EN-US_TOPIC_0053158695__p30915509192629">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.38523852385239%" headers="mcps1.3.5.2.1.1.1.4.1.3 "><p id="EN-US_TOPIC_0053158695__p55937021192629">Specifies the user-defined metadata key and value pair. For details, see <a href="#EN-US_TOPIC_0053158695__table34604820192629">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0053158695__table34604820192629"></a><a name="table34604820192629"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158695__table34604820192629" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0053158695__b083214418447">meta</strong> field data structure description</caption><thead align="left"><tr id="EN-US_TOPIC_0053158695__row41672406192629"><th align="left" class="cellrowborder" valign="top" width="24.26%" id="mcps1.3.5.2.1.2.2.4.1.1"><p id="EN-US_TOPIC_0053158695__p168451154608">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.26%" id="mcps1.3.5.2.1.2.2.4.1.2"><p id="EN-US_TOPIC_0053158695__p158471654902">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="52.480000000000004%" id="mcps1.3.5.2.1.2.2.4.1.3"><p id="EN-US_TOPIC_0053158695__p6848125412010">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0053158695__row64139640192629"><td class="cellrowborder" valign="top" width="24.26%" headers="mcps1.3.5.2.1.2.2.4.1.1 "><p id="EN-US_TOPIC_0053158695__p27928340192629">User-defined field key and value pair</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.26%" headers="mcps1.3.5.2.1.2.2.4.1.2 "><p id="EN-US_TOPIC_0053158695__p47603028192629">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="52.480000000000004%" headers="mcps1.3.5.2.1.2.2.4.1.3 "><p id="EN-US_TOPIC_0053158695__p30640032192629">Specifies the user-defined metadata key and value pair.</p>
|
|
<p id="EN-US_TOPIC_0053158695__p16870474174442">Each key or value contains a maximum of 255 characters.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</li><li id="EN-US_TOPIC_0053158695__li117114446347">Example response<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0053158695__screen817111441349"><div class="highlight"><table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><span class="normal">1</span>
|
|
<span class="normal">2</span>
|
|
<span class="normal">3</span>
|
|
<span class="normal">4</span>
|
|
<span class="normal">5</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"meta"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"key"</span><span class="p">:</span><span class="w"> </span><span class="s">"value"</span>
|
|
<span class="w"> </span><span class="p">}</span>
|
|
<span class="p">}</span><span class="w"> </span>
|
|
</pre></div></td></tr></table></div>
|
|
|
|
</div>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0053158695__section7610951"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_p193201622141412">Normal values
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.6.2.1.1.3.1.1"><p id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_p19735204616177">Returned Values</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.6.2.1.1.3.1.2"><p id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_p207355465176">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.6.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_p13735144611178">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.6.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_p207351246161711">The request has been successfully processed.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_p47633965">For details about other returned values, see <a href="en-us_topic_0053158690.html">Status Codes</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0053158695__section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0053158695__en-us_topic_0106040941_p10243161417491">See <a href="en-us_topic_0107541808.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0173933989.html">BMS Metadata Management</a></div>
|
|
</div>
|
|
</div>
|
|
|