forked from docs/doc-exports
move doc sources to other location Reviewed-by: OpenTelekomCloud Bot <None>
169 lines
13 KiB
HTML
169 lines
13 KiB
HTML
<a name="EN-US_TOPIC_0020212677"></a><a name="EN-US_TOPIC_0020212677"></a>
|
|
|
|
<h1 class="topictitle1">Querying a Specified SSH Key Pair</h1>
|
|
<div id="body10749578"><div class="section" id="EN-US_TOPIC_0020212677__section62942996"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0020212677__p65409451">This API is used to query a specified SSH key pair based on the SSH key pair name.</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212677__section29616056"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0020212677__p37505617357">GET /v2.1/{project_id}/os-keypairs/{keypair_name}</p>
|
|
<p id="EN-US_TOPIC_0020212677__p35981717141313">GET /v2/{project_id}/os-keypairs/{keypair_name}</p>
|
|
<div class="p" id="EN-US_TOPIC_0020212677__p4646038569"><a href="#EN-US_TOPIC_0020212677__table51931981">Table 1</a> describes the parameters in the URI.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212677__table51931981"></a><a name="table51931981"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212677__table51931981" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212677__row62634432"><th align="left" class="cellrowborder" valign="top" width="19.191919191919194%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0020212677__p5187119">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="15.151515151515152%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0020212677__p17503500">Mandatory</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="65.65656565656566%" id="mcps1.3.2.4.2.2.4.1.3"><p id="EN-US_TOPIC_0020212677__p8497414">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212677__row22724462"><td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p28742116">project_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.151515151515152%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p46410096">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.65656565656566%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p37593705">Specifies the project ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row10092597"><td class="cellrowborder" valign="top" width="19.191919191919194%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p12194051">keypair_name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="15.151515151515152%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p48194049">Yes</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="65.65656565656566%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p11403863">Specifies the key pair name.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212677__section65217919"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0020212677__p59026209">None</p>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212677__section50090360"><h4 class="sectiontitle">Response</h4><div class="p" id="EN-US_TOPIC_0020212677__p1776976104"><a href="#EN-US_TOPIC_0020212677__table49096623">Table 2</a> describes the response parameters.
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212677__table49096623"></a><a name="table49096623"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212677__table49096623" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0020212677__row20553506"><th align="left" class="cellrowborder" valign="top" width="16.161616161616163%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0020212677__p52863116">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12.121212121212121%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0020212677__p16299242">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="71.71717171717171%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0020212677__p45170224">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212677__row31470474"><td class="cellrowborder" valign="top" width="16.161616161616163%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p66080459">keypair</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12.121212121212121%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p30630481">Object</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71.71717171717171%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p49478440">Specifies the SSH key pair. For details, see <a href="#EN-US_TOPIC_0020212677__table32323009">Table 3</a>.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212677__table32323009"></a><a name="table32323009"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212677__table32323009" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0020212677__b6699296094725">keypair</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212677__row56122340"><th align="left" class="cellrowborder" valign="top" width="17%" id="mcps1.3.4.2.3.2.4.1.1"><p id="EN-US_TOPIC_0020212677__p3579112043319">Parameter</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="12%" id="mcps1.3.4.2.3.2.4.1.2"><p id="EN-US_TOPIC_0020212677__p1457914201333">Type</p>
|
|
</th>
|
|
<th align="left" class="cellrowborder" valign="top" width="71%" id="mcps1.3.4.2.3.2.4.1.3"><p id="EN-US_TOPIC_0020212677__p8579112033320">Description</p>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody><tr id="EN-US_TOPIC_0020212677__row1091845"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p21330650">public_key</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p28418246">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p47371280">Specifies information about the public key.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row23688339"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p39707298">name</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p2977371">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p23019892">Specifies the key pair name.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row19588278171758"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p3411854217180">fingerprint</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p1213855517180">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p5774567417180">Specifies fingerprint information about the key pair.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row5852437"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p4285383">created_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p64894876">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p63724816">Specifies the time when the key pair was created.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row36652435"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p16057296">deleted</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p58113810">Boolean</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p19274797">Specifies whether a key pair has been deleted.</p>
|
|
<ul id="EN-US_TOPIC_0020212677__ul1594190135612"><li id="EN-US_TOPIC_0020212677__li1259416085613"><strong id="EN-US_TOPIC_0020212677__b842352706154437">true</strong>: indicates that the key has been deleted.</li><li id="EN-US_TOPIC_0020212677__li05941019563"><strong id="EN-US_TOPIC_0020212677__b842352706154455">false</strong>: indicates that the key is not deleted.</li></ul>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row39255446"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p25574597">deleted_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p22776773">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p28378258">Specifies the time when the key pair was deleted.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row54077734"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p18220335">id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p22737212">Integer</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p66647176">Specifies the key pair ID.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row62953674"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p66082838">updated_at</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p46241663">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p21523158">Specifies the time when the key pair was updated.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row59490699"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p54017281">user_id</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p5473047">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p30428869">Specifies information about the user to which the key pair belongs.</p>
|
|
</td>
|
|
</tr>
|
|
<tr id="EN-US_TOPIC_0020212677__row462920453538"><td class="cellrowborder" valign="top" width="17%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212677__p199751011803">type</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="12%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212677__p139751111204">String</p>
|
|
</td>
|
|
<td class="cellrowborder" valign="top" width="71%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212677__p1097512112013">Specifies the key type, which is <strong id="EN-US_TOPIC_0020212677__b84235270619443">ssh</strong> by default.</p>
|
|
<p id="EN-US_TOPIC_0020212677__p144811212011">This parameter is supported in microversion 2.2 and later.</p>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212677__section4978145455016"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0020212677__screen1367001719271">GET https://{endpoint}/v2/{project_id}/os-keypairs/{keypair_name}
|
|
GET https://{endpoint}/v2.1/{project_id}/os-keypairs/{keypair_name}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212677__section13613112651113"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0020212677__screen18723192615115">{
|
|
"keypair": {
|
|
"created_at": "2014-05-07T12:06:13.681238",
|
|
"deleted": false,
|
|
"deleted_at": null,
|
|
"fingerprint": "9d:00:f4:d7:26:6e:52:06:4c:c1:d3:1d:fd:06:66:01",
|
|
"id": 1,
|
|
"name": "keypair-3582d8b7-e588-4aad-b7f7-f4e76f0e4314",
|
|
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDYJrTVpcMwFqQy/oMvtUSRofZdSRHEwrsX8AYkRvn2ZnCXM+b6+GZ2NQuuWj+ocznlnwiGFQDsL/yeE+/kurqcPJFKKp60mToXIMyzioFxW88fJtwEWawHKAclbHWpR1t4fQ4DS+/sIbX/Yd9btlVQ2tpQjodGDbM9Tr9/+/3i6rcR+EoLqmbgCgAiGiVV6VbM2Zx79yUwd+GnQejHX8BlYZoOjCnt3NREsITcmWE9FVFy6TnLmahs3FkEO/QGgWGkaohAJlsgaVvSWGgDn2AujKYwyDokK3dXyeX3m2Vmc3ejiqPa/C4nRrCOlko5nSgV/9IXRx1ERImsqZnE9usB Generated-by-Nova\n",
|
|
"updated_at": null,
|
|
"user_id": "fake"
|
|
}
|
|
}</pre>
|
|
</div>
|
|
<div class="section" id="EN-US_TOPIC_0020212677__section48160062"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0020212677__p36720633">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>
|
|
|