edit-icon download-icon

ListKeys

Last Updated: Apr 02, 2018

Description

Returns a list of all CMKs in the caller’s account and region.

Request parameters

Name Type Required Description
PageNumber Integer No The current page number. It must be an integer greater than 0. The default value is 1.
PageSize Integer No The number of items on each page. It must be an integer greater than 0 and no more than 101. The default value is 10.

Response parameters

Name Type Description
KeyId String Globally unique identifier of the key.
TotalCount Integer The total number of keys.
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=ListKeys
  2. &PageNumber=1
  3. &PageSize=10
  4. &<Common Request Parameters>

Response example

JSON format

  1. //json response
  2. {
  3. "Keys": {
  4. "Key": [
  5. {
  6. "KeyId": "08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4fb73"
  7. },
  8. {
  9. "KeyId": "0e478b7a-4262-4802-b8cb-00d3fb408265"
  10. },
  11. {
  12. "KeyId": "1abf9b4e-d3dd-4d4b-b9b2-2829043ab8db"
  13. }
  14. ]
  15. },
  16. "TotalCount": 3,
  17. "PageNumber": 1,
  18. "PageSize": 10,
  19. "RequestId": "1fbcd12a-1b7f-468f-84a3-1ff3444dfd8b"
  20. }

XML format

  1. //xml response
  2. <KMS>
  3. <Keys>
  4. <Key>
  5. <KeyId>08c33a6f-4e0a-4a1b-a3fa-7ddfa1d4fb73</KeyId>
  6. </Key>
  7. <Key>
  8. <KeyId>0e478b7a-4262-4802-b8cb-00d3fb408265</KeyId>
  9. </Key>
  10. <Key>
  11. <KeyId>1abf9b4e-d3dd-4d4b-b9b2-2829043ab8db</KeyId>
  12. </Key>
  13. </Keys>
  14. <TotalCount>3</TotalCount>
  15. <PageNumber>1</PageNumber>
  16. <PageSize>10</PageSize>
  17. <RequestId>1fbcd12a-1b7f-468f-84a3-1ff3444dfd8b</RequestId>
  18. </KMS>
Thank you! We've received your feedback.