Querying the Alias Associated with a Key
Function
This API is used to query all aliases associated with a key.
Calling Method
For details, see Calling APIs.
URI
GET /v1.0/{project_id}/kms/aliases
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| key_id | No | String | Key ID |
| limit | No | String | Specify the number of returned records. |
| marker | No | String | Start position of pagination query |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | No | String | 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. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| [items] | Array of ListAliasResponseBody objects | Response body for querying an alias |
| Parameter | Type | Description |
|---|---|---|
| aliases | Array of AliasEntity objects | All aliases associated with the key |
| page_info | PageInfo object | Pagination information |
Example Requests
None
Example Responses
Status code: 200
Response body for querying an alias
{
"aliases" : [ {
"domain_id" : "3bab8e245e854f68af5967c00dd43127",
"key_id" : "bb6a3d22-dc93-47ac-b5bd-88df7ad35f1e",
"alias" : "kms-1234",
"alias_urn" : "kms:cn-north-7:3bab8e245e854f68af5967c00dd43127:alias:kms-1234",
"create_time" : "2024-04-01T00:00:00Z",
"update_time" : "2024-04-01T00:00:00Z"
} ],
"page_info" : {
"next_marker" : "",
"current_count" : 1
}
} Status Codes
| Status Code | Description |
|---|---|
| 200 | Response body for querying an alias |
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.