forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: wanghuijuan738 <wanghuijuan738@huawei.com> Co-committed-by: wanghuijuan738 <wanghuijuan738@huawei.com>
317 lines
29 KiB
HTML
317 lines
29 KiB
HTML
<a name="EN-US_TOPIC_0067876971"></a><a name="EN-US_TOPIC_0067876971"></a>
|
|
|
|
<h1 class="topictitle1">Changing an <span id="text156030155485">ECS</span> OS (Using an Image with Cloud-Init Installed)</h1>
|
|
<div id="body1500949170917"><div class="section" id="EN-US_TOPIC_0067876971__section61372619"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0067876971__p30941473102128">This API is used to change an <span id="EN-US_TOPIC_0067876971__text4818516184815">ECS</span> OS. During the system disk reinstallation using a new image, the data disks of the <span id="EN-US_TOPIC_0067876971__text178251517164812">ECS</span> remain unchanged.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p15361105512521">This API is an asynchronous API. After the OS change request is successfully delivered, a job ID is returned. This does not mean the OS change is complete. You need to call the API by referring to <a href="en-us_topic_0022225398.html">Querying Job Execution Status</a> to query the job status. The SUCCESS status indicates that the OS change is successful.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p1710015228411">After this API is called, the system uninstalls the system disk, uses the new image to create a system disk, and attaches it to the <span id="EN-US_TOPIC_0067876971__text13746111844820">ECS</span>. In this way, the OS is changed.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0067876971__section2842257210401"><h4 class="sectiontitle">Constraints</h4><ul id="EN-US_TOPIC_0067876971__ul13146152104029"><li id="EN-US_TOPIC_0067876971__li199521844113213">This API only supports images with Cloud-Init or Cloudbase-Init installed. </li><li id="EN-US_TOPIC_0067876971__li1426222965916">OS changes are only supported on stopped <span id="EN-US_TOPIC_0067876971__text104426282485">ECS</span>s or on <span id="EN-US_TOPIC_0067876971__text148850357917">ECS</span>s where OS reinstallation or change has failed.</li><li id="EN-US_TOPIC_0067876971__li58205401104029"><span id="EN-US_TOPIC_0067876971__text149051343488">ECS</span>s without system disks do not support OS changes.</li><li id="EN-US_TOPIC_0067876971__li1469919567156">You are not allowed to perform other operations when changing the OS, or the OS change may fail.</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0067876971__section15482662"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0067876971__p66228246145352">POST /v2/{project_id}/cloudservers/{server_id}/changeos</p>
|
|
<div class="p" id="EN-US_TOPIC_0067876971__p32191530123219"><a href="#EN-US_TOPIC_0067876971__table55945983">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0067876971__table55945983"></a><a name="table55945983"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0067876971__table55945983" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0067876971__row11302482"><th align="left" class="cellrowborder" valign="top" width="16.831683168316832%" id="mcps1.3.3.3.2.2.4.1.1"><p id="EN-US_TOPIC_0067876971__p43085863">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="16.831683168316832%" id="mcps1.3.3.3.2.2.4.1.2"><p id="EN-US_TOPIC_0067876971__p294000">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="66.33663366336634%" id="mcps1.3.3.3.2.2.4.1.3"><p id="EN-US_TOPIC_0067876971__p23814038">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0067876971__row49888896"><td class="cellrowborder" valign="top" width="16.831683168316832%" headers="mcps1.3.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0067876971__p14468758">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.831683168316832%" headers="mcps1.3.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0067876971__p31118786">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="66.33663366336634%" headers="mcps1.3.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0067876971__p14668137174919">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0067876971__row613736410235"><td class="cellrowborder" valign="top" width="16.831683168316832%" headers="mcps1.3.3.3.2.2.4.1.1 "><p id="EN-US_TOPIC_0067876971__p2736446410235">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="16.831683168316832%" headers="mcps1.3.3.3.2.2.4.1.2 "><p id="EN-US_TOPIC_0067876971__p192907210235">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="66.33663366336634%" headers="mcps1.3.3.3.2.2.4.1.3 "><p id="EN-US_TOPIC_0067876971__p2203711610235">Specifies the <span id="EN-US_TOPIC_0067876971__text151515472816">ECS</span> ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0067876971__section5126234"><h4 class="sectiontitle">Request</h4><div class="p" id="EN-US_TOPIC_0067876971__p10360713193312"><a href="#EN-US_TOPIC_0067876971__table2840889">Table 2</a> describes the request parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0067876971__table2840889"></a><a name="table2840889"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0067876971__table2840889" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0067876971__row19854472"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.2.2.5.1.1"><p id="EN-US_TOPIC_0067876971__p5212090120624">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.2.2.5.1.2"><p id="EN-US_TOPIC_0067876971__p5568008920626">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.4.2.2.2.5.1.3"><p id="EN-US_TOPIC_0067876971__p4189246820628">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53%" id="mcps1.3.4.2.2.2.5.1.4"><p id="EN-US_TOPIC_0067876971__p2137802720629">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0067876971__row6277626"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.2.5.1.1 "><p id="EN-US_TOPIC_0067876971__p38725660">os-change</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.2.2.5.1.2 "><p id="EN-US_TOPIC_0067876971__p49770771">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.2.2.5.1.3 "><p id="EN-US_TOPIC_0067876971__p4900679">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.4.2.2.2.5.1.4 "><p id="EN-US_TOPIC_0067876971__p662045411286"><strong id="EN-US_TOPIC_0067876971__b10752665132428">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p61410719">Changes an <span id="EN-US_TOPIC_0067876971__text192332371481">ECS</span> OS. For details, see <a href="#EN-US_TOPIC_0067876971__table32200631">Table 3</a>.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p1885955711511"><strong id="EN-US_TOPIC_0067876971__b78023735532716">Constraints</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p98591577516">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p118594573513"><strong id="EN-US_TOPIC_0067876971__b195458158232218">Range</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p198599573510">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p48596578519"><strong id="EN-US_TOPIC_0067876971__b205876226632838">Default Value</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p14859115755116">N/A</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0067876971__table32200631"></a><a name="table32200631"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0067876971__table32200631" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0067876971__b84235270620940">os-change</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0067876971__row47660253"><th align="left" class="cellrowborder" valign="top" width="16.161616161616163%" id="mcps1.3.4.2.3.2.5.1.1"><p id="EN-US_TOPIC_0067876971__p121269618348">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.171717171717173%" id="mcps1.3.4.2.3.2.5.1.2"><p id="EN-US_TOPIC_0067876971__p1312613618346">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13.131313131313133%" id="mcps1.3.4.2.3.2.5.1.3"><p id="EN-US_TOPIC_0067876971__p51418673415">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53.535353535353536%" id="mcps1.3.4.2.3.2.5.1.4"><p id="EN-US_TOPIC_0067876971__p7141166143418">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0067876971__row45934497"><td class="cellrowborder" valign="top" width="16.161616161616163%" headers="mcps1.3.4.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0067876971__p29706771">keyname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.171717171717173%" headers="mcps1.3.4.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0067876971__p57438237">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.4.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0067876971__p21985640">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.535353535353536%" headers="mcps1.3.4.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0067876971__p3160852172910"><strong id="EN-US_TOPIC_0067876971__b114842338532428">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p36006428">Specifies the key name.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p3971123944416"><strong id="EN-US_TOPIC_0067876971__b210112510632716">Constraints</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p597173916447">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p7971183915442"><strong id="EN-US_TOPIC_0067876971__b140723771332218">Range</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p79714399447">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p139711439124411"><strong id="EN-US_TOPIC_0067876971__b32180521432838">Default Value</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p17971173915447">N/A</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0067876971__row2345411710289"><td class="cellrowborder" valign="top" width="16.161616161616163%" headers="mcps1.3.4.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0067876971__p2073531110289">userid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.171717171717173%" headers="mcps1.3.4.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0067876971__p183865010289">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.4.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0067876971__p1471297410289">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.535353535353536%" headers="mcps1.3.4.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0067876971__p18328155124420"><strong id="EN-US_TOPIC_0067876971__b74127596432428">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p17414953010">Specifies the user ID.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p11744113113452"><strong id="EN-US_TOPIC_0067876971__b82524540832716">Constraints</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p5090020910289">When the <strong id="EN-US_TOPIC_0067876971__b6663829121815">keyname</strong> parameter is being specified, the value of this parameter is used preferentially. If this parameter is left blank, the user ID in the token is used by default.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p189881452124510"><strong id="EN-US_TOPIC_0067876971__b131115505332218">Range</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p13988552134517">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p9988105284514"><strong id="EN-US_TOPIC_0067876971__b8798758232838">Default Value</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p20988152184513">N/A</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0067876971__row13463057104537"><td class="cellrowborder" valign="top" width="16.161616161616163%" headers="mcps1.3.4.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0067876971__p16765867104537">imageid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.171717171717173%" headers="mcps1.3.4.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0067876971__p15858014104537">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.4.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0067876971__p9430737104537">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.535353535353536%" headers="mcps1.3.4.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0067876971__p88291338113013"><strong id="EN-US_TOPIC_0067876971__b30625652332428">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p25692204104537">Specifies the ID of the new image in UUID format.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p280873817134">You can obtain the image ID from the console or by following the instructions provided in "Querying Images" in <em id="EN-US_TOPIC_0067876971__i168512108319">Image Management Service API Reference</em>.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p539182694614"><strong id="EN-US_TOPIC_0067876971__b186821317632716">Constraints</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p940112624618">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p1440826184614"><strong id="EN-US_TOPIC_0067876971__b46082393232218">Range</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p2401268461">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p740726134616"><strong id="EN-US_TOPIC_0067876971__b128280593932838">Default Value</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p16401126134614">N/A</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0067876971__row6144862102847"><td class="cellrowborder" valign="top" width="16.161616161616163%" headers="mcps1.3.4.2.3.2.5.1.1 "><p id="EN-US_TOPIC_0067876971__p27971812102847">metadata</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.171717171717173%" headers="mcps1.3.4.2.3.2.5.1.2 "><p id="EN-US_TOPIC_0067876971__p51124270102847">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13.131313131313133%" headers="mcps1.3.4.2.3.2.5.1.3 "><p id="EN-US_TOPIC_0067876971__p47425188102847">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53.535353535353536%" headers="mcps1.3.4.2.3.2.5.1.4 "><p id="EN-US_TOPIC_0067876971__p17893152510312"><strong id="EN-US_TOPIC_0067876971__b81720706032428">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p16235056102847">Specifies the metadata of the <span id="EN-US_TOPIC_0067876971__text1473216229249">ECS</span> for which the OS is to be changed.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p45467933113554">For more information, see <a href="#EN-US_TOPIC_0067876971__table9120223">Table 4</a>.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p1798631614919"><strong id="EN-US_TOPIC_0067876971__b203979935832716">Constraints</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p10986111611493">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p3986216184919"><strong id="EN-US_TOPIC_0067876971__b62601778632218">Range</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p198661615499">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p1498691664919"><strong id="EN-US_TOPIC_0067876971__b9724177932838">Default Value</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p198681613494">N/A</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0067876971__table9120223"></a><a name="table9120223"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0067876971__table9120223" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="EN-US_TOPIC_0067876971__b2068819594266">metadata</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0067876971__row45607220"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.4.2.5.1.1"><p id="EN-US_TOPIC_0067876971__p5260151013341">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.4.2.5.1.2"><p id="EN-US_TOPIC_0067876971__p1226017106348">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="13%" id="mcps1.3.4.2.4.2.5.1.3"><p id="EN-US_TOPIC_0067876971__p226013107341">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="53%" id="mcps1.3.4.2.4.2.5.1.4"><p id="EN-US_TOPIC_0067876971__p526021019349">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0067876971__row56761457"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0067876971__p36421405103024">BYOL</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0067876971__p24837051">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0067876971__p65644149">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.4.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0067876971__p9829559193117"><strong id="EN-US_TOPIC_0067876971__b180585631932428">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p15575880">Specifies whether a user has the license of an image.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p13625612324"><strong id="EN-US_TOPIC_0067876971__b68316565732716">Constraints</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p1336215616323">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p43624614322"><strong id="EN-US_TOPIC_0067876971__b154248896132218">Range</strong></p>
|
|
<ul id="EN-US_TOPIC_0067876971__ul7453134512326"><li id="EN-US_TOPIC_0067876971__li154538452325">If this parameter is set to <strong id="EN-US_TOPIC_0067876971__b842352706215655">true</strong>, the license file delivered with the image is used, indicating that BYOL is used.</li><li id="EN-US_TOPIC_0067876971__li1845354573212">If this parameter is set to a value other than <strong id="EN-US_TOPIC_0067876971__b1828124834915">true</strong>, BYOL is not used, and the license file provided by the cloud platform must be used.</li></ul>
|
|
<p id="EN-US_TOPIC_0067876971__p138731634113213"><strong id="EN-US_TOPIC_0067876971__b193503343832838">Default Value</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p1213811423217">The default value is not <strong id="EN-US_TOPIC_0067876971__b184625899215847">true</strong>, indicating that BYOL is not used.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0067876971__row11285618104313"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0067876971__p1737951110318">user_data</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0067876971__p39934810104313">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0067876971__p13494158104313">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.4.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0067876971__p1292412352517"><strong id="EN-US_TOPIC_0067876971__b137592095932428">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p124835165514">Specifies the user data to be injected to the ECS during the creation. Text and text files can be injected.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p1633783620117">Examples</p>
|
|
<p id="EN-US_TOPIC_0067876971__p12545313524">Before base64 encoding:</p>
|
|
<ul id="EN-US_TOPIC_0067876971__ul13541314520"><li id="EN-US_TOPIC_0067876971__li13546312528">Linux<pre class="screen" id="EN-US_TOPIC_0067876971__screen16541531125220">#!/bin/bash
|
|
echo user_test > /home/user.txt</pre>
|
|
</li><li id="EN-US_TOPIC_0067876971__li0541731105219">Windows<pre class="screen" id="EN-US_TOPIC_0067876971__screen35418316520">rem cmd
|
|
echo 111 > c:\aaa.txt</pre>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0067876971__p16762152318318">After base64 encoding:</p>
|
|
<ul id="EN-US_TOPIC_0067876971__ul2069415489311"><li id="EN-US_TOPIC_0067876971__li126941548163113">Linux<pre class="screen" id="EN-US_TOPIC_0067876971__screen1769415480317">IyEvYmluL2Jhc2gKZWNobyB1c2VyX3Rlc3QgPiAvaG9tZS91c2VyLnR4dA==</pre>
|
|
</li><li id="EN-US_TOPIC_0067876971__li06941485319">Windows<pre class="screen" id="EN-US_TOPIC_0067876971__screen1969444873114">cmVtIGNtZAplY2hvIDExMSA+IGM6XGFhYS50eHQ=</pre>
|
|
</li></ul>
|
|
<p id="EN-US_TOPIC_0067876971__p1911316217100">For more details, see "Injecting User Data into ECSs" in the <em id="EN-US_TOPIC_0067876971__en-us_topic_0067876349_i16685141017211">Elastic Cloud Server User Guide</em>.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p104321329163317"><strong id="EN-US_TOPIC_0067876971__b179669684032716">Constraints</strong></p>
|
|
<ul id="EN-US_TOPIC_0067876971__ul15206535123314"><li id="EN-US_TOPIC_0067876971__li1420613352339">The content of <strong id="EN-US_TOPIC_0067876971__b786519416310">user_data</strong> must be encoded with base64.</li><li id="EN-US_TOPIC_0067876971__li19206163513314">The maximum size of the content to be injected (before encoding) is 32 KB.</li></ul>
|
|
<p id="EN-US_TOPIC_0067876971__p1055117116529"><strong id="EN-US_TOPIC_0067876971__b51489093732218">Range</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p172810126520">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p2138191655219"><strong id="EN-US_TOPIC_0067876971__b195917475732838">Default Value</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p14772019175211">N/A</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0067876971__row836814432234"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0067876971__p1562408795622">__system__encrypted</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0067876971__p5759155095622">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0067876971__p3440400295622">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.4.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0067876971__p79675293314"><strong id="EN-US_TOPIC_0067876971__b67705533032428">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p165392163413">Specifies the encryption field in <strong id="EN-US_TOPIC_0067876971__b1135861015313">metadata</strong>.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p37001731341"><strong id="EN-US_TOPIC_0067876971__b214029496132716">Constraints</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p126481283344">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p8209412203417"><strong id="EN-US_TOPIC_0067876971__b163029928232218">Range</strong></p>
|
|
<ul id="EN-US_TOPIC_0067876971__ul634082311342"><li id="EN-US_TOPIC_0067876971__li134072317344"><strong id="EN-US_TOPIC_0067876971__b19699181110317">0</strong>: indicates a non-encrypted disk.</li><li id="EN-US_TOPIC_0067876971__li3340122317349"><strong id="EN-US_TOPIC_0067876971__b8113413236">1</strong>: indicates an encrypted disk.</li></ul>
|
|
<p id="EN-US_TOPIC_0067876971__p1277111618346"><strong id="EN-US_TOPIC_0067876971__b203812926232838">Default Value</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p3526077895622">If this parameter does not exist, the system disk will not be encrypted by default.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0067876971__row68291447246"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.4.2.5.1.1 "><p id="EN-US_TOPIC_0067876971__p241272995622">__system__cmkid</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.4.2.5.1.2 "><p id="EN-US_TOPIC_0067876971__p683657101711">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.3.4.2.4.2.5.1.3 "><p id="EN-US_TOPIC_0067876971__p5933737595622">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="53%" headers="mcps1.3.4.2.4.2.5.1.4 "><p id="EN-US_TOPIC_0067876971__p9919649113417"><strong id="EN-US_TOPIC_0067876971__b138961896032428">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p1466405116344">Specifies the CMK ID, which indicates encryption in <strong id="EN-US_TOPIC_0067876971__b1689192315318">metadata</strong>.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p75481955133419"><strong id="EN-US_TOPIC_0067876971__b107325487932716">Constraints</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p20670814113715">This parameter must be used with <strong id="EN-US_TOPIC_0067876971__b1037516162311">__system__encrypted</strong>.</p>
|
|
<div class="note" id="EN-US_TOPIC_0067876971__note153392271895"><span class="notetitle"> NOTE: </span><div class="notebody"><p id="EN-US_TOPIC_0067876971__p53605181811">For details about how to obtain the CMK ID through HTTPS requests, see "Querying the Key List" in <em id="EN-US_TOPIC_0067876971__i1742749172819"><span id="EN-US_TOPIC_0067876971__ph1542349182819">Key Management Service</span> API Reference</em>.</p>
|
|
</div></div>
|
|
<p id="EN-US_TOPIC_0067876971__p12246163617548"><strong id="EN-US_TOPIC_0067876971__b189662392832218">Range</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p8246636185419">N/A</p>
|
|
<p id="EN-US_TOPIC_0067876971__p11246103619544"><strong id="EN-US_TOPIC_0067876971__b103352125932838">Default Value</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p19246173675412">N/A</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0067876971__section46136113"><h4 class="sectiontitle">Response</h4><p id="EN-US_TOPIC_0067876971__p583313195412"><a href="#EN-US_TOPIC_0067876971__table2824153181913">Table 5</a> describes the response parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0067876971__table2824153181913"></a><a name="table2824153181913"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0067876971__table2824153181913" frame="border" border="1" rules="all"><caption><b>Table 5 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0067876971__row11825193111915"><th align="left" class="cellrowborder" valign="top" width="16.85%" id="mcps1.3.5.3.2.4.1.1"><p id="EN-US_TOPIC_0067876971__p135632102272">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.98%" id="mcps1.3.5.3.2.4.1.2"><p id="EN-US_TOPIC_0067876971__p55632010102714">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.16999999999999%" id="mcps1.3.5.3.2.4.1.3"><p id="EN-US_TOPIC_0067876971__p125631410152717">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0067876971__row382615381910"><td class="cellrowborder" valign="top" width="16.85%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0067876971__p1882713151914">job_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.98%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0067876971__p1182723161913">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.16999999999999%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0067876971__p79774531157"><strong id="EN-US_TOPIC_0067876971__b419517474220">Definition</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p12827133121914">Specifies the job ID returned after a job is delivered. The job ID can be used to query the job execution progress. For details about how to query the job execution status based on <strong id="EN-US_TOPIC_0067876971__b6429181518421">job_id</strong>, see <a href="en-us_topic_0022225397.html">Job Status Management</a>.</p>
|
|
<p id="EN-US_TOPIC_0067876971__p10609556134619"><strong id="EN-US_TOPIC_0067876971__b67601016174218">Range</strong></p>
|
|
<p id="EN-US_TOPIC_0067876971__p8453833853">N/A</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0067876971__p827131024410">For details about abnormal responses, see <a href="en-us_topic_0022067714.html">Responses (Jobs)</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0067876971__section6230163813416"><h4 class="sectiontitle">Example Request</h4><ul id="EN-US_TOPIC_0067876971__ul15101195714167"><li id="EN-US_TOPIC_0067876971__li610110573169">After the ECS OS is switched, use the password for login authentication. For security purposes, store the password in ciphertext in configuration files or environment variables.<pre class="screen" id="EN-US_TOPIC_0067876971__screen11102115716161">POST https://{endpoint}/v2/{project_id}/cloudservers/{server_id}/changeos
|
|
|
|
{
|
|
"os-change": {
|
|
"userid": "7e25b1da389f4697a79df3a0e5bd494e",
|
|
"imageid": "e215580f-73ad-429d-b6f2-5433947433b0"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
<ul id="EN-US_TOPIC_0067876971__ul176935256154"><li id="EN-US_TOPIC_0067876971__li14693172520157">Change the OS and use the key pair for login authentication after the OS change.<pre class="screen" id="EN-US_TOPIC_0067876971__screen969382518152">POST https://{endpoint}/v2/{project_id}/cloudservers/{server_id}/changeos
|
|
|
|
{
|
|
"os-change": {
|
|
"keyname": "KeyPair-350b",
|
|
"userid": "7e25b1da389f4697a79df3a0e5bd494e",
|
|
"imageid": "e215580f-73ad-429d-b6f2-5433947433b0"
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
<ul id="EN-US_TOPIC_0067876971__ul64373262102922"><li id="EN-US_TOPIC_0067876971__li42488453102922">If the ECS OS is switched using encrypted full-ECS images of the system disk, use the password for login authentication. For security purposes, store the password in ciphertext in configuration files or environment variables.<pre class="screen" id="EN-US_TOPIC_0067876971__screen40301619143023">POST https://{endpoint}/v2/{project_id}/cloudservers/{server_id}/changeos
|
|
|
|
{
|
|
"os-change": {
|
|
"userid": "7e25b1da389f4697a79df3a0e5bd494e",
|
|
"imageid": "e215580f-73ad-429d-b6f2-5433947433b0",
|
|
"metadata": {
|
|
"__system__encrypted": "1",
|
|
"__system__cmkid": "83cdb52d-9ebf-4469-9cfa-e7b5b80da846"
|
|
}
|
|
}
|
|
}</pre>
|
|
</li></ul>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0067876971__section449243013451"><h4 class="sectiontitle">Example Response</h4><p id="EN-US_TOPIC_0067876971__p13277162618519">See <a href="en-us_topic_0022067714.html">Responses (Jobs)</a>.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0067876971__screen13682169133010">{
|
|
"job_id": "ff80808288d41e1b018990260955686a"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0067876971__section27037160"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0067876971__p23224207">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0067876971__section85821649202813"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0067876971__p7233105282813">See <a href="en-us_topic_0022067717.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0020212691.html">Status Management</a></div>
|
|
</div>
|
|
</div>
|
|
|