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>
221 lines
24 KiB
HTML
221 lines
24 KiB
HTML
<a name="EN-US_TOPIC_0000002340222820"></a><a name="EN-US_TOPIC_0000002340222820"></a>
|
|
|
|
<h1 class="topictitle1">Creating or Importing an SSH Key Pair (Native OpenStack API)</h1>
|
|
<div id="body8662426"><div class="section" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_section46928615105534"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p43121505105534">This API is used to create an SSH key pair or import a public key to generate a key pair.</p>
|
|
<p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p52549232105534">After an SSH key pair is generated, download the private key to a local directory. Then, you can use this private key to log in to the <span id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_text93761115448">BMS</span><span id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_text1947382572"></span><span id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_text1210110251553"></span>. For <span id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_text83631864406">BMS</span><span id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_text93631167407"></span><span id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_text496318348557"></span> security purposes, a private key can be downloaded only once. Keep it secure.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_section3181044105534"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p67083394105534">POST /v2.1/{project_id}/os-keypairs</p>
|
|
<p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p12664425115611"><a href="#EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table137043339568">Table 1</a> lists the parameters.</p>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table137043339568"></a><a name="en-us_topic_0060384660_table137043339568"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table137043339568" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row6707133385614"><th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.1"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p16860355105534">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.2"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p23511481105534">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="33.33333333333333%" id="mcps1.3.2.4.2.4.1.3"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p25381808105534">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row1170718332563"><td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p32953279105534">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p51969960105534">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="33.33333333333333%" headers="mcps1.3.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p48817201105534">Specifies the project ID.</p>
|
|
<p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_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>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_section61879170105534"><h4 class="sectiontitle">Request Parameters</h4><div class="note" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_note47718814105534"><img src="public_sys-resources/note_3.0-en-us.png"><span class="notetitle"> </span><div class="notebody"><p class="text" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p26816148105534">When creating an SSH key pair, you only need to configure <strong id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_b84235270618444">name</strong>. When importing a public SSH key, you must also configure <strong id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_b842352706184442">public_key</strong>.</p>
|
|
</div></div>
|
|
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table40018745105534" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row48164488105534"><th align="left" class="cellrowborder" valign="top" width="19.37%" id="mcps1.3.3.3.1.5.1.1"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p19987085">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="17.09%" id="mcps1.3.3.3.1.5.1.2"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p09341937982">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="23.93%" id="mcps1.3.3.3.1.5.1.3"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p4546697">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.61%" id="mcps1.3.3.3.1.5.1.4"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p32738149">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row6972410105534"><td class="cellrowborder" valign="top" width="19.37%" headers="mcps1.3.3.3.1.5.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p27894300105534">keypair</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="17.09%" headers="mcps1.3.3.3.1.5.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p993423719814">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="23.93%" headers="mcps1.3.3.3.1.5.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p8634695105534">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.61%" headers="mcps1.3.3.3.1.5.1.4 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p28321695105534">Specifies the created or imported SSH key pair. For details, see <a href="#EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table44094886105534">Table 2</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table44094886105534"></a><a name="en-us_topic_0060384660_table44094886105534"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table44094886105534" frame="border" border="1" rules="all"><caption><b>Table 2 </b><strong id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_b5971193018394">keypair</strong> data structure</caption><thead align="left"><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row40587827105534"><th align="left" class="cellrowborder" valign="top" width="20.59205920592059%" id="mcps1.3.3.4.2.5.1.1"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p16104135417242">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.601560156015601%" id="mcps1.3.3.4.2.5.1.2"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p14086419811">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="24.02240224022402%" id="mcps1.3.3.4.2.5.1.3"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p1110685412246">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="39.78397839783978%" id="mcps1.3.3.4.2.5.1.4"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p41093543243">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row49263560105534"><td class="cellrowborder" valign="top" width="20.59205920592059%" headers="mcps1.3.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p30925442105534">public_key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.601560156015601%" headers="mcps1.3.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p9407741984">No</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.02240224022402%" headers="mcps1.3.3.4.2.5.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p31731563105534">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.78397839783978%" headers="mcps1.3.3.4.2.5.1.4 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p20119786105534">Specifies the imported public key. The maximum size of the imported public key is 1024 bytes.</p>
|
|
<p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p46860349105534">Note: If the length of the public key to be imported exceeds 1024 bytes, the public key import to the <span id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_text10252131514405">BMS</span><span id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_text42529159407"></span><span id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_text678215345519"></span> will fail.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row19089958105534"><td class="cellrowborder" valign="top" width="20.59205920592059%" headers="mcps1.3.3.4.2.5.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p2782726105534">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.601560156015601%" headers="mcps1.3.3.4.2.5.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p040720411810">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="24.02240224022402%" headers="mcps1.3.3.4.2.5.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p3855315105534">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="39.78397839783978%" headers="mcps1.3.3.4.2.5.1.4 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p43845137105534">Specifies the key pair name.</p>
|
|
<p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p59061918105534">The new key pair name cannot be the same as an existing one.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_section13252115318249"><h4 class="sectiontitle">Example Request</h4><div class="p" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p19862193014318">Creating or importing an SSH key pair (name: keypair-7d7c3650-dabe-4eb0-b904-5c464453c043) with the public key <strong id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_b182788693414">ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9mC3WZN9UGLxgPBpP7H5jZMc6pKwOoSgre8yun6REFktn/Kz7DUt9jaR1UJyRzHxITfCfAIgSxPdGqB/oF1suMyWgu5i0625vavLB5z5kC8Hq3qZJ9zJO1poE1kyD+htiTtPWJ88e12xuH2XB/CZN9OpEiF98hAagiOE0EnOS5Q== Generated by Nova\n</strong><div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_screen1399881514397"><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">POST</span><span class="w"> </span><span class="n">https</span><span class="p">:</span><span class="c1">//{ECS Endpoint}/v2.1/bbf1946d374b44a0a2a95533562ba954/os-keypairs</span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
<div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_screen56523205162753"><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>
|
|
<span class="normal">6</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"keypair"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"name"</span><span class="p">:</span><span class="w"> </span><span class="s">"keypair-7d7c3650-dabe-4eb0-b904-5c464453c043"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"public_key"</span><span class="p">:</span><span class="w"> </span><span class="s">"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9mC3WZN9UGLxgPBpP7H5jZMc6pKwOoSgre8yun6REFktn/Kz7DUt9jaR1UJyRzHxITfCfAIgSxPdGqB/oF1suMyWgu5i0625vavLB5z5kC8Hq3qZJ9zJO1poE1kyD+htiTtPWJ88e12xuH2XB/CZN9OpEiF98hAagiOE0EnOS5Q== Generated by Nova\n"</span>
|
|
<span class="w"> </span><span class="p">}</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_section33789573105534"><h4 class="sectiontitle">Response Parameters</h4>
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table32814569105534" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row31072960105534"><th align="left" class="cellrowborder" valign="top" width="24.39%" id="mcps1.3.5.2.1.4.1.1"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p104001675252">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="29.270000000000003%" id="mcps1.3.5.2.1.4.1.2"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p840215762519">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="46.339999999999996%" id="mcps1.3.5.2.1.4.1.3"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p1040516718253">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row30545796105534"><td class="cellrowborder" valign="top" width="24.39%" headers="mcps1.3.5.2.1.4.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p58290412105534">keypair</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.270000000000003%" headers="mcps1.3.5.2.1.4.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p23902945105534">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.5.2.1.4.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p57090378105534">Specifies the SSH key pair. For details, see <a href="#EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table11390225105534">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table11390225105534"></a><a name="en-us_topic_0060384660_table11390225105534"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_table11390225105534" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_b634711372396">keypair</strong> data structure</caption><thead align="left"><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row13107196105534"><th align="left" class="cellrowborder" valign="top" width="24.39%" id="mcps1.3.5.3.2.4.1.1"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p4172201014255">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="29.270000000000003%" id="mcps1.3.5.3.2.4.1.2"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p10173141011254">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="46.339999999999996%" id="mcps1.3.5.3.2.4.1.3"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p817617100257">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row45769827105534"><td class="cellrowborder" valign="top" width="24.39%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p16368506105534">fingerprint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.270000000000003%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p50780601105534">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p19588041105534">Specifies fingerprint information about the key pair.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row42074647105534"><td class="cellrowborder" valign="top" width="24.39%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p52603235105534">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.270000000000003%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p33003603105534">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p56046159105534">Specifies the key pair name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row34653390105534"><td class="cellrowborder" valign="top" width="24.39%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p55461192105534">public_key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.270000000000003%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p63171587105534">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p16624935105534">Specifies the public key.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row15406687105534"><td class="cellrowborder" valign="top" width="24.39%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p39982130105534">private_key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.270000000000003%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p17327106105534">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p61318326105534">Specifies the private key.</p>
|
|
<ul id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_ul53408548183356"><li id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_li48601030183356">The information about the private key is contained in the response for creating an SSH key.</li><li id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_li19850370183359">The information about the private key is not contained in the response for importing an SSH key.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_row14994025105534"><td class="cellrowborder" valign="top" width="24.39%" headers="mcps1.3.5.3.2.4.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p6556527105534">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="29.270000000000003%" headers="mcps1.3.5.3.2.4.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p61316685105534">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="46.339999999999996%" headers="mcps1.3.5.3.2.4.1.3 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_p595628105534">Specifies the ID of the user owning the key pair.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_section9945201016258"><h4 class="sectiontitle">Example Response</h4><div class="codecoloring" codetype="Java" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_screen63264378162912"><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>
|
|
<span class="normal">6</span>
|
|
<span class="normal">7</span>
|
|
<span class="normal">8</span></pre></div></td><td class="code"><div><pre><span></span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"keypair"</span><span class="p">:</span><span class="w"> </span><span class="p">{</span>
|
|
<span class="w"> </span><span class="s">"public_key"</span><span class="p">:</span><span class="w"> </span><span class="s">"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC9mC3WZN9UGLxgPBpP7H5jZMc6pKwOoSgre8yun6REFktn/Kz7DUt9jaR1UJyRzHxITfCfAIgSxPdGqB/oF1suMyWgu5i0625vavLB5z5kC8Hq3qZJ9zJO1poE1kyD+htiTtPWJ88e12xuH2XB/CZN9OpEiF98hAagiOE0EnOS5Q== Generated by Nova\n"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"user_id"</span><span class="p">:</span><span class="w"> </span><span class="s">"f882feb345064e7d9392440a0f397c25"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"name"</span><span class="p">:</span><span class="w"> </span><span class="s">"keypair-7d7c3650-dabe-4eb0-b904-5c464453c043"</span><span class="p">,</span>
|
|
<span class="w"> </span><span class="s">"fingerprint"</span><span class="p">:</span><span class="w"> </span><span class="s">"35:9d:d0:c3:4a:80:d3:d8:86:f1:ca:f7:df:c4:f9:d8"</span>
|
|
<span class="w"> </span><span class="p">}</span>
|
|
<span class="p">}</span>
|
|
</pre></div></td></tr></table></div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_section7610951"><h4 class="sectiontitle">Returned Values</h4><div class="p" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_en-us_topic_0106040941_p193201622141412">Normal values
|
|
<div class="tablenoborder"><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_en-us_topic_0106040941_table753804619176" frame="border" border="1" rules="all"><thead align="left"><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_en-us_topic_0106040941_row10735134615172"><th align="left" class="cellrowborder" valign="top" width="42.42%" id="mcps1.3.7.2.1.1.3.1.1"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_en-us_topic_0106040941_p19735204616177">Returned Values</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="57.58%" id="mcps1.3.7.2.1.1.3.1.2"><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_en-us_topic_0106040941_p207355465176">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_en-us_topic_0106040941_row1473514621713"><td class="cellrowborder" valign="top" width="42.42%" headers="mcps1.3.7.2.1.1.3.1.1 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_en-us_topic_0106040941_p13735144611178">200</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="57.58%" headers="mcps1.3.7.2.1.1.3.1.2 "><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_en-us_topic_0106040941_p207351246161711">The request has been successfully processed.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_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_0000002340222820__en-us_topic_0060384660_section14752650154917"><h4 class="sectiontitle">Error Codes</h4><p id="EN-US_TOPIC_0000002340222820__en-us_topic_0060384660_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_0000002340063044.html">BMS SSH Key Management (Native OpenStack APIs)</a></div>
|
|
</div>
|
|
</div>
|
|
|