doc-exports/docs/ecs/api-ref/en-us_topic_0020212676.html
Artem Goncharov 3196b64bfc
move doc sources to other location (#3)
move doc sources to other location

Reviewed-by: OpenTelekomCloud Bot <None>
2022-04-27 16:24:25 +00:00

137 lines
10 KiB
HTML

<a name="EN-US_TOPIC_0020212676"></a><a name="EN-US_TOPIC_0020212676"></a>
<h1 class="topictitle1">Querying SSH Key Pairs</h1>
<div id="body17557027"><div class="section" id="EN-US_TOPIC_0020212676__section66325402"><h4 class="sectiontitle">Function</h4><p id="EN-US_TOPIC_0020212676__p12833084">This API is used to query SSH key pairs.</p>
</div>
<div class="section" id="EN-US_TOPIC_0020212676__section60057706"><h4 class="sectiontitle">URI</h4><p id="EN-US_TOPIC_0020212676__p4575185710346">GET /v2.1/{project_id}/os-keypairs</p>
<p id="EN-US_TOPIC_0020212676__p74371494121">GET /v2/{project_id}/os-keypairs</p>
<div class="p" id="EN-US_TOPIC_0020212676__p42971678422"><a href="#EN-US_TOPIC_0020212676__table38623499">Table 1</a> describes the parameters in the URI.
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212676__table38623499"></a><a name="table38623499"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212676__table38623499" frame="border" border="1" rules="all"><caption><b>Table 1 </b>Parameter description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212676__row59671974"><th align="left" class="cellrowborder" valign="top" width="16.79%" id="mcps1.3.2.4.2.2.4.1.1"><p id="EN-US_TOPIC_0020212676__p5187119">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="17.169999999999998%" id="mcps1.3.2.4.2.2.4.1.2"><p id="EN-US_TOPIC_0020212676__p17503500">Mandatory</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="66.03999999999999%" id="mcps1.3.2.4.2.2.4.1.3"><p id="EN-US_TOPIC_0020212676__p8497414">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020212676__row53887795"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.2.4.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212676__p2835298">project_id</p>
</td>
<td class="cellrowborder" valign="top" width="17.169999999999998%" headers="mcps1.3.2.4.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212676__p28332581">Yes</p>
</td>
<td class="cellrowborder" valign="top" width="66.03999999999999%" headers="mcps1.3.2.4.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212676__p37593705">Specifies the project ID.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0020212676__section3648444"><h4 class="sectiontitle">Request</h4><p id="EN-US_TOPIC_0020212676__p53739988">None</p>
</div>
<div class="section" id="EN-US_TOPIC_0020212676__section32836002"><h4 class="sectiontitle">Response</h4><div class="p" id="EN-US_TOPIC_0020212676__p12182192117436"><a href="#EN-US_TOPIC_0020212676__table46959463">Table 2</a> describes the response parameters.
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212676__table46959463"></a><a name="table46959463"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212676__table46959463" frame="border" border="1" rules="all"><caption><b>Table 2 </b>Response parameters</caption><thead align="left"><tr id="EN-US_TOPIC_0020212676__row9766180"><th align="left" class="cellrowborder" valign="top" width="16.79%" id="mcps1.3.4.2.2.2.4.1.1"><p id="EN-US_TOPIC_0020212676__p52863116">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.23%" id="mcps1.3.4.2.2.2.4.1.2"><p id="EN-US_TOPIC_0020212676__p16299242">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="66.97999999999999%" id="mcps1.3.4.2.2.2.4.1.3"><p id="EN-US_TOPIC_0020212676__p45170224">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020212676__row34909498"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.4.2.2.2.4.1.1 "><p id="EN-US_TOPIC_0020212676__p9097072">keypairs</p>
</td>
<td class="cellrowborder" valign="top" width="16.23%" headers="mcps1.3.4.2.2.2.4.1.2 "><p id="EN-US_TOPIC_0020212676__p26115459">Array of objects</p>
</td>
<td class="cellrowborder" valign="top" width="66.97999999999999%" headers="mcps1.3.4.2.2.2.4.1.3 "><p id="EN-US_TOPIC_0020212676__p46361647">Specifies key pairs. For details, see <a href="#EN-US_TOPIC_0020212676__table41882197">Table 3</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212676__table41882197"></a><a name="table41882197"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212676__table41882197" frame="border" border="1" rules="all"><caption><b>Table 3 </b><strong id="EN-US_TOPIC_0020212676__b6699296094725">keypairs</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212676__row19241577"><th align="left" class="cellrowborder" valign="top" width="16.79%" id="mcps1.3.4.2.3.2.4.1.1"><p id="EN-US_TOPIC_0020212676__p564410811336">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.05%" id="mcps1.3.4.2.3.2.4.1.2"><p id="EN-US_TOPIC_0020212676__p2064412853319">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67.16%" id="mcps1.3.4.2.3.2.4.1.3"><p id="EN-US_TOPIC_0020212676__p166444810334">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020212676__row34772456"><td class="cellrowborder" valign="top" width="16.79%" headers="mcps1.3.4.2.3.2.4.1.1 "><p id="EN-US_TOPIC_0020212676__p65105571">keypair</p>
</td>
<td class="cellrowborder" valign="top" width="16.05%" headers="mcps1.3.4.2.3.2.4.1.2 "><p id="EN-US_TOPIC_0020212676__p9736186">Object</p>
</td>
<td class="cellrowborder" valign="top" width="67.16%" headers="mcps1.3.4.2.3.2.4.1.3 "><p id="EN-US_TOPIC_0020212676__p51249570">Specifies details about a key pair. For details, see <a href="#EN-US_TOPIC_0020212676__table48408329">Table 4</a>.</p>
</td>
</tr>
</tbody>
</table>
</div>
<div class="tablenoborder"><a name="EN-US_TOPIC_0020212676__table48408329"></a><a name="table48408329"></a><table cellpadding="4" cellspacing="0" summary="" id="EN-US_TOPIC_0020212676__table48408329" frame="border" border="1" rules="all"><caption><b>Table 4 </b><strong id="EN-US_TOPIC_0020212676__b124271693">keypair</strong> field description</caption><thead align="left"><tr id="EN-US_TOPIC_0020212676__row27259828"><th align="left" class="cellrowborder" valign="top" width="16.78%" id="mcps1.3.4.2.4.2.4.1.1"><p id="EN-US_TOPIC_0020212676__p956121163317">Parameter</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="16.04%" id="mcps1.3.4.2.4.2.4.1.2"><p id="EN-US_TOPIC_0020212676__p656110113337">Type</p>
</th>
<th align="left" class="cellrowborder" valign="top" width="67.17999999999999%" id="mcps1.3.4.2.4.2.4.1.3"><p id="EN-US_TOPIC_0020212676__p1256131103312">Description</p>
</th>
</tr>
</thead>
<tbody><tr id="EN-US_TOPIC_0020212676__row37982174"><td class="cellrowborder" valign="top" width="16.78%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0020212676__p56657239">fingerprint</p>
</td>
<td class="cellrowborder" valign="top" width="16.04%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0020212676__p12150471">String</p>
</td>
<td class="cellrowborder" valign="top" width="67.17999999999999%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0020212676__p66432381">Specifies fingerprint information about the key pair.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212676__row61020521"><td class="cellrowborder" valign="top" width="16.78%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0020212676__p43715136">name</p>
</td>
<td class="cellrowborder" valign="top" width="16.04%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0020212676__p58836357">String</p>
</td>
<td class="cellrowborder" valign="top" width="67.17999999999999%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0020212676__p9140568">Specifies the key pair name.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212676__row199744112018"><td class="cellrowborder" valign="top" width="16.78%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0020212676__p199751011803">type</p>
</td>
<td class="cellrowborder" valign="top" width="16.04%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0020212676__p139751111204">String</p>
</td>
<td class="cellrowborder" valign="top" width="67.17999999999999%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0020212676__p1097512112013">Specifies the key type, which is <strong id="EN-US_TOPIC_0020212676__b84235270619443">ssh</strong> by default.</p>
<p id="EN-US_TOPIC_0020212676__p144811212011">This parameter is supported in microversion 2.2 and later.</p>
</td>
</tr>
<tr id="EN-US_TOPIC_0020212676__row15156252"><td class="cellrowborder" valign="top" width="16.78%" headers="mcps1.3.4.2.4.2.4.1.1 "><p id="EN-US_TOPIC_0020212676__p19696890">public_key</p>
</td>
<td class="cellrowborder" valign="top" width="16.04%" headers="mcps1.3.4.2.4.2.4.1.2 "><p id="EN-US_TOPIC_0020212676__p46735588">String</p>
</td>
<td class="cellrowborder" valign="top" width="67.17999999999999%" headers="mcps1.3.4.2.4.2.4.1.3 "><p id="EN-US_TOPIC_0020212676__p46049856">Specifies information about the public key.</p>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="section" id="EN-US_TOPIC_0020212676__section13755153085015"><h4 class="sectiontitle">Example Request</h4><pre class="screen" id="EN-US_TOPIC_0020212676__screen13201257112619">GET https://{endpoint}/v2/{project_id}/os-keypairs
GET https://{endpoint}/v2.1/{project_id}/os-keypairs</pre>
</div>
<div class="section" id="EN-US_TOPIC_0020212676__section4713102134415"><h4 class="sectiontitle">Example Response</h4><pre class="screen" id="EN-US_TOPIC_0020212676__screen29185566203128">{
"keypairs": [
{
"keypair": {
"fingerprint": "15:b0:f8:b3:f9:48:63:71:cf:7b:5b:38:6d:44:2d:4a",
"name": "keypair-601a2305-4f25-41ed-89c6-2a966fc8027a",
"type": "ssh",
"public_key": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAAAgQC+Eo/RZRngaGTkFs7I62ZjsIlO79KklKbMXi8F+KITD4bVQHHn+kV+4gRgkgCRbdoDqoGfpaDFs877DYX9n4z6FrAIZ4PES8TNKhatifpn9NdQYWA+IkU8CuvlEKGuFpKRi/k7JLos/gHi2hy7QUwgtRvcefvD/vgQZOVw/mGR9Q== Generated-by-Nova\n"
}
}
]
}</pre>
</div>
<div class="section" id="EN-US_TOPIC_0020212676__section27088563"><h4 class="sectiontitle">Returned Values</h4><p id="EN-US_TOPIC_0020212676__p15913036">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>