edit-icon download-icon

ListALiasesByKeyId

Last Updated: Apr 02, 2018

Description

Lists all aliases associated with the CMK.

Request parameters

Name Type Required Description
PageNumber Integer No The current page number.
Valid value: An integer greater than 0. The default value is 1.
PageSize Integer No The number of items on each page.
Valid value: An integer between 0 and 101. The default value is 10.
KeyId string Yes Globally unique identifier of the CMK.

Response parameters

Name Type Description
AliasName String The unique identifier of an alias.
AliasArn String The ARN of the alias.
KeyId String The CMK queried.
TotalCount Integer The total number of items returned.
PageNumber Integer The current page number.
PageSize Integer The number of items on each page.

Examples

Request example

  1. https://kms.cn-hangzhou.aliyuncs.com/?Action=ListAliasesByKeyId
  2. &PageNumber=1
  3. &PageSize=10
  4. &KeyId=<cmkid>
  5. &<Common Request Parameters>

Response example

JSON format

  1. //json response
  2. {
  3. "Aliases": {
  4. "Alias": [
  5. {
  6. "AliasName": "alias/ExampleAlias1",
  7. "KeyId": "08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4fb73",
  8. "AliasArn": "acs:kms:cn-hangzhou:123456:alias/ExampleAlias1"
  9. }
  10. ]
  11. },
  12. "TotalCount": 1,
  13. "PageNumber": 1,
  14. "PageSize": 10,
  15. "RequestId": "1b57992c-834b-4811-a889-f8bac1ba0353"
  16. }

XML format

  1. //xml response
  2. <KMS>
  3. <Aliases>
  4. <Alias>
  5. <AliasName>alias/ExampleAlias1</AliasName>
  6. <KeyId>08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4fb73</KeyId>
  7. <AliasArn>acs:kms:cn-hangzhou:123456:alias/ExampleAlias1</AliasArn>
  8. </Alias>
  9. </Aliases>
  10. <TotalCount>1</TotalCount>
  11. <PageNumber>1</PageNumber>
  12. <PageSize>10</PageSize>
  13. <RequestId>1b57992c-834b-4811-a889-f8bac1ba0353</RequestId>
  14. </KMS>
Thank you! We've received your feedback.