Querying SSH Key Pair Details
Function
Querying SSH Key Pair Details
Calling Method
For details, see Calling APIs.
URI
GET /v3/{project_id}/keypairs/{keypair_name}
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Definition Project ID. For details, see Obtaining a Project ID. Constraints N/A Range The value returned by the IAM API is used, which contains 32 characters. Default Value N/A |
| keypair_name | Yes | String | Definition Key pair name Constraints Key pair name. The value can contain at most 255 characters. Only letters, digits, underscores (_), and hyphens (-) are allowed. Range N/A Default Value N/A |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | Definition User token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. Constraints N/A Range Obtain the value by calling the IAM API for obtaining the user token. Default Value N/A |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| keypair | KeypairDetail object | Definition Key pair details Range N/A |
Example Requests
None
Example Responses
Status code: 200
Request succeeded.
{
"keypair" : {
"name" : "1hprr3TI",
"id" : 116248,
"type" : "ssh",
"scope" : "user",
"public_key" : "ssh-rsa AAAGenerated-by-Nova",
"fingerprint" : "65:ca:87:0a:16:86:59:ea:57:ea:18:37:58:e2:04:b0",
"is_key_protection" : false,
"deleted" : false,
"description" : "12345",
"user_id" : "6c2a33b1b8474d0dbac0a24297127525",
"create_time" : 1581507580000,
"delete_time" : null,
"update_time" : null,
"frozen_state" : 0
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
Error Codes
See Error Codes.