Queries all public keys of a user.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
yundun-bastionhost:ListUserPublicKeys |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the Bastionhost instance where the user whose public keys you want to query resides. Note
You can call the describeinstances operation to obtain this parameter. |
bastionhost-cn-st220aw**** |
| RegionId |
string |
No |
The region ID of the Bastionhost instance where the user resides. Note
For the mapping between region IDs and region names, see Regions and zones. |
cn-shanghai |
| PageNumber |
string |
No |
The page number of the paged query. Default value: 1. |
1 |
| PageSize |
string |
No |
The maximum number of entries to return on each page for a paged query. Note
We recommend that you do not leave the PageSize parameter empty. |
50 |
| UserId |
string |
No |
The ID of the user whose public keys you want to query. |
2 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response data. |
||
| PublicKeys |
array<object> |
The list of public keys of the user. |
|
|
object |
The list of public keys of the user. |
||
| FingerPrint |
string |
The fingerprint of the public key. |
d8:7d:b6:27:70:2d:07:fb:c6:b6:66:0a:86:7b:0f:9a |
| PublicKeyId |
string |
The ID of the public key. |
1 |
| PublicKeyName |
string |
The name of the public key. |
Keyname |
| UserId |
string |
The ID of the user to whom the public key belongs. |
1 |
| Comment |
string |
The comment on the public key. |
comment |
| RequestId |
string |
The ID of the request, which is a unique identifier generated by Alibaba Cloud for the request. You can use this ID to troubleshoot and locate issues. |
EC9BF0F4-8983-491A-BC8C-1B4DD94976DE |
| TotalCount |
integer |
The total number of public keys. |
5 |
Examples
Success response
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. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.