All Products
Search
Document Center

Key Management Service:ListKmsInstances

Last Updated:Oct 11, 2023

Queries a list of Key Management Service (KMS) instances.

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

ListKmsInstances

The operation that you want to perform. Set the value to ListKmsInstances.

PageNumber

Integer

No

1

The page number. Default value: 1.

PageSize

Integer

No

10

The number of entries per page. Valid values: 1 to 100. Default value: 20.

Response parameters

Parameter

Type

Example

Description

RequestId

String

d3eca5c8-a856-4347-8eb6-e1898c3fda2e

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

KmsInstances

Array of KmsInstance

A list of KMS instances.

KmsInstance

KmsInstanceArn

String

acs:kms:pre-hangzhou:120708975881****:keystore/kst-phzz64c9f84eo32dbs****

The ARN of the KMS instance.

KmsInstanceId

String

kst-phzz64c9f84eo32dbs****

The ID of the KMS instance.

TotalCount

Long

1

The total number of KMS instances.

PageNumber

Long

1

The page number.

PageSize

Long

10

The number of entries per page.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ListKmsInstances
&PageNumber=1
&PageSize=10
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ListKmsInstancesResponse>
    <RequestId>d3eca5c8-a856-4347-8eb6-e1898c3fda2e</RequestId>
    <KmsInstances>
        <KmsInstanceArn>acs:kms:pre-hangzhou:120708975881****:keystore/kst-phzz64c9f84eo32dbs****</KmsInstanceArn>
        <KmsInstanceId>kst-phzz64c9f84eo32dbs****</KmsInstanceId>
    </KmsInstances>
    <TotalCount>1</TotalCount>
    <PageNumber>1</PageNumber>
    <PageSize>10</PageSize>
</ListKmsInstancesResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "d3eca5c8-a856-4347-8eb6-e1898c3fda2e",
  "KmsInstances" : [ {
    "KmsInstanceArn" : "acs:kms:pre-hangzhou:120708975881****:keystore/kst-phzz64c9f84eo32dbs****",
    "KmsInstanceId" : "kst-phzz64c9f84eo32dbs****"
  } ],
  "TotalCount" : 1,
  "PageNumber" : 1,
  "PageSize" : 10
}

Error codes

HTTP status code

Error code

Error message

Description

400

IllegalTimestamp

The input parameter Timestamp that is mandatory for processing this request is not supplied.

The input parameter timestamp indicates that the request is outside the processing time range.

For a list of error codes, see Service error codes.