All Products
Search
Document Center

Key Management Service:ListAliasesByKeyId

Last Updated:Aug 28, 2026

Queries all aliases bound to a specified CMK.

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

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request parameters

Parameter

Type

Required

Description

Example

KeyId

string

Yes

The globally unique ID of the CMK.

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

PageNumber

integer

No

The number of the page to return.

Valid values: any integer greater than 0.

Default value: 1.

1

PageSize

integer

No

The number of entries to return on each page.

Valid values: 0 to 101.

Default value: 10

10

Response elements

Element

Type

Description

Example

object

RequestId

string

The request ID.

1b57992c-834b-4811-a889-f8bac1ba0353

PageNumber

integer

The page number of the returned page.

1

PageSize

integer

The number of entries returned per page.

10

TotalCount

integer

The total number of returned CMKs.

1

Aliases

object

Alias

array<object>

An array of aliases.

object

KeyId

string

The CMK to which an alias is bound.

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

AliasArn

string

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

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

AliasName

string

The ID of the alias.

alias/ExampleAlias1

Examples

Success response

JSON format

{
  "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 code

Error code

Error message

Description

400 InvalidParameter The specified parameter is not valid. An invalid value is specified for the parameter.
404 InvalidAccessKeyId.NotFound The Access Key ID provided does not exist in our records.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.