forked from docs/doc-exports
Reviewed-by: Pristromskaia, Margarita <margarita.pristromskaia@t-systems.com> Co-authored-by: Zaoxu, Li <lizaoxu@huawei.com> Co-committed-by: Zaoxu, Li <lizaoxu@huawei.com>
78 lines
6.6 KiB
HTML
78 lines
6.6 KiB
HTML
<a name="EN-US_TOPIC_0031176553"></a><a name="EN-US_TOPIC_0031176553"></a>
|
|
|
|
<h1 class="topictitle1">Obtaining the Password for Logging In to an ECS</h1>
|
|
<div id="body1464594869794"><div class="section" id="EN-US_TOPIC_0031176553__section57769674"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0031176553__p6915811">This API is used to obtain the random password generated during initial Windows <span id="EN-US_TOPIC_0031176553__text1174114813916">ECS</span> installation for user <strong id="EN-US_TOPIC_0031176553__b137574818394">Administrator</strong> or the configured <strong id="EN-US_TOPIC_0031176553__b275648133916">Cloudbase-init</strong> user when you use an image that supports Cloudbase-Init to create a Windows <span id="EN-US_TOPIC_0031176553__text97513482399">ECS</span>.</p>
|
|
<p id="EN-US_TOPIC_0031176553__p17363111311142">After starting an <span id="EN-US_TOPIC_0031176553__text1516374645312">ECS</span>, wait for 5 to 10 minutes and ensure that the password is injected. Then, you can use this API to query the password.</p>
|
|
<p id="EN-US_TOPIC_0031176553__p1494615391595">Linux ECSs do not use this API to obtain a password.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031176553__section50165025"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0031176553__p11699188102512">GET /v2.1/{project_id}/servers/{server_id}/os-server-password</p>
|
|
<p id="EN-US_TOPIC_0031176553__p1676621941515">GET /v2/{project_id}/servers/{server_id}/os-server-password</p>
|
|
<div class="p" id="EN-US_TOPIC_0031176553__p173881547185415"><a href="#EN-US_TOPIC_0031176553__table46110007">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0031176553__table46110007"></a><a name="table46110007"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0031176553__table46110007" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0031176553__row14148614"><th align="left" class="cellrowborder" valign="top" width="16.98%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0031176553__p5187119">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.36%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0031176553__p17503500">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.66%" id="mcps1.3.2.4.2.2.4.1.3"><p id="EN-US_TOPIC_0031176553__p8497414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0031176553__row17201924"><td class="cellrowborder" valign="top" width="16.98%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0031176553__p51178607">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.36%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0031176553__p51826478">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.66%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0031176553__p37593705">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0031176553__row615338831654"><td class="cellrowborder" valign="top" width="16.98%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0031176553__p519996316521">server_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.36%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0031176553__p5588153816521">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.66%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0031176553__p1719074216521">Specifies the <span id="EN-US_TOPIC_0031176553__text7628185110573">ECS</span> ID.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031176553__section48832041"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0031176553__p3303707">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031176553__section36835188"><h4 class="sectiontitle">Response</h4><div class="p" id="EN-US_TOPIC_0031176553__p696612812554"><a href="#EN-US_TOPIC_0031176553__table23477058">Table 2</a> describes the response parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0031176553__table23477058"></a><a name="table23477058"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0031176553__table23477058" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0031176553__row2792905"><th align="left" class="cellrowborder" valign="top" width="16.98%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0031176553__p24898733">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.349999999999998%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0031176553__p17614915">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.67%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0031176553__p17521988">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0031176553__row9994955"><td class="cellrowborder" valign="top" width="16.98%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0031176553__p4284989">password</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.349999999999998%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0031176553__p62312200">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.67%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0031176553__p60002101">Specifies the password in ciphertext.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031176553__section10960125004315"><h4 class="sectiontitle">Example Request</h4><p id="EN-US_TOPIC_0031176553__p11375141902514">Obtain a random password of the administrator account (administrator or the account configured in Cloudbase-Init) generated by the system during the initial installation of a specified Windows ECS.</p>
|
|
<pre class="screen" id="EN-US_TOPIC_0031176553__screen3678182819281">GET https://{endpoint}/v2/{project_id}/servers/{server_id}/os-server-password
|
|
GET https://{endpoint}/v2.1/{project_id}/servers/{server_id}/os-server-password</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031176553__section15240205325510"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0031176553__screen9255853115517">{
|
|
"password": "UHC9+YW1xDC1Yu8Mg*************************"
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0031176553__section63081244"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0031176553__p13886058">See <a href="en-us_topic_0022067716.html">Returned Values for General Requests</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="en-us_topic_0020212675.html">Key and Password Management</a></div>
|
|
</div>
|
|
</div>
|
|
|