forked from docs/doc-exports
Reviewed-by: Eotvos, Oliver <oliver.eotvos@t-systems.com> Co-authored-by: qiujiandong1 <qiujiandong1@huawei.com> Co-committed-by: qiujiandong1 <qiujiandong1@huawei.com>
181 lines
16 KiB
HTML
181 lines
16 KiB
HTML
<a name="swr_02_0052"></a><a name="swr_02_0052"></a>
|
|
|
|
<h1 class="topictitle1">Generating a Temporary Login Command</h1>
|
|
<div id="body8662426"><div class="section" id="swr_02_0052__en-us_topic_0000001185755810_section15318194173414"><h4 class="sectiontitle">Description</h4><p id="swr_02_0052__en-us_topic_0000001185755810_p1931964113344">Generate a temporary login command using the value of <strong id="swr_02_0052__en-us_topic_0000001185755810_b1842442954104317">X-Swr-Dockerlogin</strong> in the response header and the value of <strong id="swr_02_0052__en-us_topic_0000001185755810_b985459615104317">host</strong> in the response body.</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0052__en-us_topic_0000001185755810_section19323134115345"><h4 class="sectiontitle">Constraints</h4><p id="swr_02_0052__en-us_topic_0000001185755810_p163241341183420">None</p>
|
|
</div>
|
|
<div class="section" id="swr_02_0052__en-us_topic_0000001185755810_section193271641113416"><h4 class="sectiontitle">URI</h4><p id="swr_02_0052__en-us_topic_0000001185755810_p732824114341">POST /v2/manage/utils/secret</p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0052__en-us_topic_0000001185755810_table433115416347" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Query parameter</caption><thead align="left"><tr id="swr_02_0052__en-us_topic_0000001185755810_row14329174123419"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.1"><p id="swr_02_0052__en-us_topic_0000001185755810_p233214114342">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.2"><p id="swr_02_0052__en-us_topic_0000001185755810_p15333134116344">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.3.3.2.5.1.3"><p id="swr_02_0052__en-us_topic_0000001185755810_p1337184123419">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.3.3.2.5.1.4"><p id="swr_02_0052__en-us_topic_0000001185755810_p103381641113416">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0052__en-us_topic_0000001185755810_row1133019417345"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p15339541123417">projectname</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p1334118414348">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.3.3.2.5.1.3 "><p id="swr_02_0052__en-us_topic_0000001185755810_p4341104113349">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.3.3.2.5.1.4 "><p id="swr_02_0052__en-us_topic_0000001185755810_p4342741163413">Project name. The default value is the region name.</p>
|
|
<p id="swr_02_0052__en-us_topic_0000001185755810_p1658514381137">Example: <strong id="swr_02_0052__en-us_topic_0000001185755810_b7299201581316"></strong><strong id="swr_02_0052__en-us_topic_0000001185755810_b1299191515138"></strong><strong id="swr_02_0052__en-us_topic_0000001185755810_b5299171513131"></strong><strong id="swr_02_0052__en-us_topic_0000001185755810_b529916151139"></strong><strong id="swr_02_0052__en-us_topic_0000001185755810_b15299191518132"></strong><strong id="swr_02_0052__en-us_topic_0000001185755810_b72991715131316"></strong><strong id="swr_02_0052__en-us_topic_0000001185755810_b1529919158133"></strong><strong id="swr_02_0052__en-us_topic_0000001185755810_b12299201512136">eu-de</strong></p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0052__en-us_topic_0000001185755810_section123431441183413"><h4 class="sectiontitle">Request Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0052__en-us_topic_0000001185755810_HeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Request header parameters</caption><thead align="left"><tr id="swr_02_0052__en-us_topic_0000001185755810_row1134564193413"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.1"><p id="swr_02_0052__en-us_topic_0000001185755810_p1234712415341">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.2"><p id="swr_02_0052__en-us_topic_0000001185755810_p134814417348">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.4.2.2.5.1.3"><p id="swr_02_0052__en-us_topic_0000001185755810_p9349164183416">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="40%" id="mcps1.3.4.2.2.5.1.4"><p id="swr_02_0052__en-us_topic_0000001185755810_p9354154183414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0052__en-us_topic_0000001185755810_row183456411349"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p17356154120347">Content-Type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p235712414344">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0052__en-us_topic_0000001185755810_p1635894163420">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0052__en-us_topic_0000001185755810_p1935914112341">Message body type (format). The value can be <strong id="swr_02_0052__en-us_topic_0000001185755810_b1358861619312">application/json</strong> or <strong id="swr_02_0052__en-us_topic_0000001185755810_b358910161131">charset=utf-8 application/json</strong>.</p>
|
|
<p id="swr_02_0052__en-us_topic_0000001185755810_p12360154110348">Default value: <strong id="swr_02_0052__en-us_topic_0000001185755810_b1606518034">application/json</strong></p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0052__en-us_topic_0000001185755810_row1734510411344"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p15361194133410">X-Auth-Token</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p136374110341">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.4.2.2.5.1.3 "><p id="swr_02_0052__en-us_topic_0000001185755810_p193648414341">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="40%" headers="mcps1.3.4.2.2.5.1.4 "><p id="swr_02_0052__en-us_topic_0000001185755810_p536474110348">User token.</p>
|
|
<p id="swr_02_0052__en-us_topic_0000001185755810_p836514183411">The token can be obtained by calling the IAM API used to obtain a user token. The value of <strong id="swr_02_0052__en-us_topic_0000001185755810_b60946886111936">X-Subject-Token</strong> in the response header is the user token.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0052__en-us_topic_0000001185755810_section7366194123413"><h4 class="sectiontitle">Response Parameters</h4><p id="swr_02_0052__en-us_topic_0000001185755810_p153691641123414"><strong id="swr_02_0052__en-us_topic_0000001185755810_b2079144600111046">Status code: 200</strong></p>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0052__en-us_topic_0000001185755810_ResponseHeaderParameter" frame="border" border="1" rules="all"><caption><b>Table 3 </b>Response header parameter</caption><thead align="left"><tr id="swr_02_0052__en-us_topic_0000001185755810_row3371154118343"><th align="left" class="cellrowborder" valign="top" width="30%" id="mcps1.3.5.3.2.4.1.1"><p id="swr_02_0052__en-us_topic_0000001185755810_p937394111341">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.3.2.4.1.2"><p id="swr_02_0052__en-us_topic_0000001185755810_p1374141183411">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="50%" id="mcps1.3.5.3.2.4.1.3"><p id="swr_02_0052__en-us_topic_0000001185755810_p1637604117349">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0052__en-us_topic_0000001185755810_row12371184118345"><td class="cellrowborder" valign="top" width="30%" headers="mcps1.3.5.3.2.4.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p337710411345">X-Swr-Dockerlogin</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.3.2.4.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p3378441113419">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="50%" headers="mcps1.3.5.3.2.4.1.3 "><p id="swr_02_0052__en-us_topic_0000001185755810_p11379194173411">Docker login command, for example:</p>
|
|
<p id="swr_02_0052__en-us_topic_0000001185755810_p5919154515287">docker login -u ********@OW******FPUKBXI -p 6f0779072******863d1ae3ccef921b7f33</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0052__en-us_topic_0000001185755810_response_CreateSecretResp" frame="border" border="1" rules="all"><caption><b>Table 4 </b>Response body parameter</caption><thead align="left"><tr id="swr_02_0052__en-us_topic_0000001185755810_row7380104183416"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.1"><p id="swr_02_0052__en-us_topic_0000001185755810_p9384104111345">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.4.2.4.1.2"><p id="swr_02_0052__en-us_topic_0000001185755810_p123852417345">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.4.2.4.1.3"><p id="swr_02_0052__en-us_topic_0000001185755810_p1838717411342">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0052__en-us_topic_0000001185755810_row83812412341"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p1388241103415">auths</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.4.2.4.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p163891941103419">Map<String,<a href="#swr_02_0052__en-us_topic_0000001185755810_response_AuthInfo">AuthInfo</a>></p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.4.2.4.1.3 "><p id="swr_02_0052__en-us_topic_0000001185755810_p18391174123412">Authentication information.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="swr_02_0052__en-us_topic_0000001185755810_response_AuthInfo"></a><a name="en-us_topic_0000001185755810_response_AuthInfo"></a><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0052__en-us_topic_0000001185755810_response_AuthInfo" frame="border" border="1" rules="all"><caption><b>Table 5 </b>AuthInfo</caption><thead align="left"><tr id="swr_02_0052__en-us_topic_0000001185755810_row203922041203419"><th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.1"><p id="swr_02_0052__en-us_topic_0000001185755810_p93941741193416">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="20%" id="mcps1.3.5.5.2.4.1.2"><p id="swr_02_0052__en-us_topic_0000001185755810_p9395941123418">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="60%" id="mcps1.3.5.5.2.4.1.3"><p id="swr_02_0052__en-us_topic_0000001185755810_p13971541203417">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0052__en-us_topic_0000001185755810_row163928411348"><td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p123981041103410">auth</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="20%" headers="mcps1.3.5.5.2.4.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p1539916415348">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="60%" headers="mcps1.3.5.5.2.4.1.3 "><p id="swr_02_0052__en-us_topic_0000001185755810_p204001541173415">Base64-encoded authentication information.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0052__en-us_topic_0000001185755810_section174015418348"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="swr_02_0052__en-us_topic_0000001185755810_screen134036418343">POST https://{endpoint}/v2/manage/utils/secret</pre>
|
|
</div>
|
|
<div class="section" id="swr_02_0052__en-us_topic_0000001185755810_section4404164114342"><h4 class="sectiontitle">Example Response</h4><p id="swr_02_0052__en-us_topic_0000001185755810_p24056415346"><strong id="swr_02_0052__en-us_topic_0000001185755810_b1126232765111046">Status code: 200</strong></p>
|
|
<p id="swr_02_0052__en-us_topic_0000001185755810_p4406154113411">Creation succeeded.</p>
|
|
<pre class="screen" id="swr_02_0052__en-us_topic_0000001185755810_screen440754119342">{
|
|
"auths" : {
|
|
"swr.xxx" : {
|
|
"auth" : "Y24tbm9ydGg******hhMTgzMGVmN2RhZjJm"
|
|
}
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="swr_02_0052__en-us_topic_0000001185755810_section05198418348"><h4 class="sectiontitle">Status Codes</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="swr_02_0052__en-us_topic_0000001185755810_status_code" frame="border" border="1" rules="all"><thead align="left"><tr id="swr_02_0052__en-us_topic_0000001185755810_row6521144120342"><th align="left" class="cellrowborder" valign="top" width="15%" id="mcps1.3.8.2.1.3.1.1"><p id="swr_02_0052__en-us_topic_0000001185755810_p3522441173411">Status Code</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="85%" id="mcps1.3.8.2.1.3.1.2"><p id="swr_02_0052__en-us_topic_0000001185755810_p8523841203412">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="swr_02_0052__en-us_topic_0000001185755810_row752134143419"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p63294223416">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p183344233418">Creation succeeded.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0052__en-us_topic_0000001185755810_row1952110419342"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p833194223419">400</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p4331442193415">Request error.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0052__en-us_topic_0000001185755810_row135211441183411"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p1341842123413">401</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p534164212343">Authentication failed.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="swr_02_0052__en-us_topic_0000001185755810_row4521104111343"><td class="cellrowborder" valign="top" width="15%" headers="mcps1.3.8.2.1.3.1.1 "><p id="swr_02_0052__en-us_topic_0000001185755810_p834144213415">500</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="85%" headers="mcps1.3.8.2.1.3.1.2 "><p id="swr_02_0052__en-us_topic_0000001185755810_p7352426343">Internal error.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="swr_02_0052__en-us_topic_0000001185755810_section1435154211349"><h4 class="sectiontitle">Error Codes</h4><p id="swr_02_0052__en-us_topic_0000001185755810_p1935142103414">For details, see <a href="ErrorCode.html">Error Codes</a>.</p>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div class="familylinks">
|
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="swr_02_0095.html">Temporary Login Command</a></div>
|
|
</div>
|
|
</div>
|
|
|