Updated on 2025-09-15 GMT+08:00

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

Table 1 Path Parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query Parameters

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

Table 3 Request header 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

Table 4 Response body parameters

Parameter

Type

Description

[items]

Array of ListAliasResponseBody objects

Response body for querying an alias

Table 5 ListAliasResponseBody

Parameter

Type

Description

aliases

Array of AliasEntity objects

All aliases associated with the key

page_info

PageInfo object

Pagination information

Table 6 AliasEntity

Parameter

Type

Description

domain_id

String

Account ID

key_id

String

Key ID

alias

String

Alias

alias_urn

String

Alias resource locator

create_time

String

Creation time

update_time

String

Update time

Table 7 PageInfo

Parameter

Type

Description

next_marker

String

Marker for querying the next page

current_count

Integer

Number of items returned on this page

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.