Queries all public keys of the specified user.
Debugging
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The ID of the bastion host on which you want to query all public keys of the user. Note
You can call the DescribeInstances operation to query the ID of the bastion host.
| bastionhost-cn-st220aw**** |
RegionId | string | No | The region ID of the bastion host on which you want to query all public keys of the user. Note
For more information about the mapping between region IDs and region names, see Regions and zones.
| cn-shanghai |
PageNumber | string | No | The number of the page to return. Default value: 1. | 1 |
PageSize | string | No | The number of entries to return on each page. Note
We recommend that you do not leave this parameter empty.
| 50 |
UserId | string | No | The ID of the user whose public keys you want to query. | 2 |
Response parameters
Examples
Sample success responses
JSON
format
{
"PublicKeys": [
{
"FingerPrint": "d8:7d:b6:27:70:2d:07:fb:c6:b6:66:0a:86:7b:0f:9a",
"PublicKeyId": "1",
"PublicKeyName": "Keyname",
"UserId": "1",
"Comment": "comment"
}
],
"RequestId": "EC9BF0F4-8983-491A-BC8C-1B4DD94976DE",
"TotalCount": 5
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParameter | The argument is invalid. | The argument is invalid. |
500 | InternalError | An unknown error occurred. | An unknown error occurred. |
For a list of error codes, visit the Service error codes.