Queries all aliases bound to a CMK.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ListAliasesByKeyId

The operation that you want to perform.

Valid values: ListAliasesByKeyId

KeyId String Yes 1234abcd-12ab-34cd-56ef-12345678****

The globally unique ID of the CMK.

PageNumber Integer Optional 1

The number of the page to return.

Value range: integers greater than 0.

Default value: 1.

PageSize  Integer Optional 10

The number of entries to return on each page.

Valid values: 0 to 101.

Default value: 10.

Response parameters

Prameter Type Sample response Description
TotalCount Integer   1

The total number of returned cmks.

PageNumber Integer   1

The number of the page to return.

PageSize  Integer 10

The number of entries returned per page.

RequestId String 1 b57992 c-834b-4811-a889-f8bac1ba0353

The ID of the request.

Aliases Array

The alias of the field.

KeyId String 08 c33a6 f-4e0a-4a1b-a3fa-7ddfa1d4 function compute instance *

The CMK to which the alias belongs.

AliasName String alias/ExampleAlias1

The unique identifier of the alias.

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

The ARN of the alias.

Examples

Sample requests

https://kms.cn-hangzhou.aliyuncs.com/? Action=ListAliasesByKeyId
&PageNumber=1
&PageSize=10
&KeyId=<cmkid>
&<Common request parameters>

Sample success responses

XML format

//xml response
<KMS>
        <Aliases>
                <Alias>
                        <AliasName>alias/ExampleAlias1</AliasName>
                        <KeyId>08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4****</KeyId>
                        <AliasArn>acs:kms:cn-hangzhou:123456:alias/ExampleAlias1</AliasArn>
                </Alias>
        </Aliases>
        <TotalCount>1</TotalCount>
        <PageNumber>1</PageNumber>
        <PageSize>10</PageSize>
        <RequestId>1b57992c-834b-4811-a889-f8bac1ba0353</RequestId>
</KMS>

JSON format

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

Error codes

HTTP status code Error code Error message Description 
400 Throttling Request was denied due to request throttling. This message returned because your traffic in this period has exceeded the limit. If your business requirements are not met, submit a ticket.

For a list of error codes, visit the API Error Center.