All Products
Search
Document Center

Key Management Service:ListAliasesByKeyId

Last Updated:Jul 29, 2025

Queries all aliases that are bound to a key.

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
KeyIdstringYes

The globally unique ID of the CMK.

1234abcd-12ab-34cd-56ef-12345678****
PageNumberintegerNo

The number of the page to return.

Valid values: an integer that is greater than 0.

Default value: 1.

1
PageSizeintegerNo

The number of entries to return on each page.

Valid values: 0 to 101.

Default value: 10

10

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request, which is used to locate and troubleshoot issues.

1b57992c-834b-4811-a889-f8bac1ba0353
PageNumberinteger

The page number of the returned page.

1
PageSizeinteger

The number of entries returned per page.

10
TotalCountinteger

The total number of returned CMKs.

1
Aliasesarray<object>

An array that consists of aliases.

Aliasobject
KeyIdstring

The CMK to which an alias is bound.

08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4****
AliasArnstring

The Alibaba Cloud Resource Name (ARN) of the alias.

acs:kms:cn-hangzhou:123456:alias/ExampleAlias1
AliasNamestring

The ID of the alias.

alias/ExampleAlias1

Examples

Sample success responses

JSONformat

{
  "RequestId": "1b57992c-834b-4811-a889-f8bac1ba0353",
  "PageNumber": 1,
  "PageSize": 10,
  "TotalCount": 1,
  "Aliases": {
    "Alias": [
      {
        "KeyId": "08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4****",
        "AliasArn": "acs:kms:cn-hangzhou:123456:alias/ExampleAlias1",
        "AliasName": "alias/ExampleAlias1"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
400InvalidParameterThe specified parameter is not valid.An invalid value is specified for the parameter.
404InvalidAccessKeyId.NotFoundThe Access Key ID provided does not exist in our records.-

For a list of error codes, visit the Service error codes.