Queries the IDs of the caller's master keys in the current region.
Operation description
For more information about the access policy required by a RAM user or RAM role to call this API, see Resource Access Management.
Try it now
Test
RAM authorization
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| PageNumber |
integer |
No |
The page number. |
1 |
| PageSize |
integer |
No |
The number of entries to return on each page. |
10 |
| Filters |
string |
No |
A filter for master keys. The filter consists of 0 to 10 key-value pairs.
Valid values:
The logical relationship between different keys in `Filters` is `AND`. The logical relationship between multiple values for the same key is `OR`. For example, if you enter
|
[{"Key":"KeyState", "Values":["Enabled","Disabled"]}] |
Response elements
|
Parameter |
Type |
Description |
Example |
|
object |
|||
| PageNumber |
integer |
The page number. |
1 |
| PageSize |
integer |
The number of entries returned per page. |
10 |
| RequestId |
string |
The ID of the request. It is a globally unique identifier (GUID) generated by Alibaba Cloud. You can use the request ID to troubleshoot issues. |
8252db58-2036-408c-a3d5-56e656dc2551 |
| TotalCount |
integer |
The total number of master keys. |
3 |
| Keys |
object |
||
| Key |
array<object> |
The master keys. |
|
|
object |
The master key. |
||
| KeyId |
string |
The globally unique identifier of the master key. |
08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4**** |
| KeyArn |
string |
The Alibaba Cloud Resource Name (ARN) of the master key. |
acs:kms:cn-hangzhou:123456:key/80e9409f-78fa-42ab-84bd-83f40c81**** |
Examples
Success response
JSON format
{
"PageNumber": 1,
"PageSize": 10,
"RequestId": "8252db58-2036-408c-a3d5-56e656dc2551",
"TotalCount": 3,
"Keys": {
"Key": [
{
"KeyId": "08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4****",
"KeyArn": "acs:kms:cn-hangzhou:123456:key/80e9409f-78fa-42ab-84bd-83f40c81****"
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.