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 | 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 |
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 |
|---|---|---|
| aliases | Array of AliasEntity objects | Definition All aliases associated with the key Range N/A |
| page_info | PageInfo object | Definition Pagination information Range N/A |
| Parameter | Type | Description |
|---|---|---|
| domain_id | String | Definition Tenant domain ID Range N/A |
| key_id | String | Definition Key ID Range N/A |
| alias | String | Definition Alias Range N/A |
| alias_urn | String | Definition Alias resource locator Range N/A |
| create_time | String | Definition Creation time Range N/A |
| update_time | String | Definition Update time Range N/A |
Example Requests
None
Example Responses
Status code: 200
Request succeeded.
{
"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 | Request succeeded. |
Error Codes
See Error Codes.