Querying the SSH Key Pair List
Function
Querying the SSH Key Pair List
Calling Method
For details, see Calling APIs.
Authorization Information
Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
- If you are using role/policy-based authorization, see Permissions Policies and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
Action
Access Level
Resource Type (*: required)
Condition Key
Alias
Dependencies
kps:SSHKeyPair:list
List
SSHKeyPair *
-
kps:domainKeypairs:list
-
URI
GET /v3/{project_id}/keypairs
| 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 |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| limit | No | String | Definition Number of secrets returned on each page Constraints N/A Range 1-1000 Default Value 1000 |
| marker | No | String | Definition Name of the last key pair on each page is used as a pagination tag. If this parameter is left blank, the first page is queried. Constraints Parameters marker and limit must be used together. If the number of records returned on the last page is less than the value of limit, the query ends. 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 |
|---|---|---|
| keypairs | Array of Keypairs objects | Definition SSH key pair list Default Value N/A |
| page_info | PageInfo object | Definition Pagination information Range N/A |
| Parameter | Type | Description |
|---|---|---|
| keypair | Keypair object | Definition SSH key pair information Default Value N/A |
| Parameter | Type | Description |
|---|---|---|
| next_marker | String | Definition Query tag of the next page during pagination query Range N/A |
| previous_marker | String | Definition Query tag of the previous page during pagination query Range N/A |
| current_count | Integer | Definition Number of records on the current page Range N/A |
Example Requests
None
Example Responses
Status code: 200
Request succeeded.
{
"keypairs" : [ {
"keypair" : {
"name" : "1hprr3TI",
"type" : "ssh",
"scope" : "user",
"public_key" : "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABjV8GvwpSs.....",
"fingerprint" : "65:ca:87:0a:16:86:59:ea:57:ea:18:37:58:e2:04:b0",
"is_key_protection" : false,
"frozen_state" : 0
}
} ],
"page_info" : {
"next_marker" : "KeyPair-dxxx",
"previous_marker" : "KeyPair-xxxx",
"current_count" : 49
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Request succeeded. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot