All Products
Search
Document Center

Key Management Service:GetKmsInstance

更新時間:Jan 22, 2024

Queries the details of a Key Management Service (KMS) instance.

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

GetKmsInstance

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

KmsInstanceId

String

Yes

kst-bjj62f5ba3dnpb6v8****

The ID of the KMS instance that you want to query.

Response parameters

Parameter

Type

Example

Description

RequestId

String

46b4a94a-57d2-44b4-9810-1e87d31abb33

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

KmsInstance

Object

The details of the KMS instance.

InstanceId

String

kst-bjj62f5ba3dnpb6v8****

The ID of the KMS instance.

InstanceName

String

kst-bjj62f5ba3dnpb6v8****

The name of the KMS instance.

Status

String

Connected

The status of the KMS instance. Valid values:

  • Uninitialized: disabled

  • Connecting: connecting

  • Connected: enabled

  • Disconnected: disconnected

  • Error: abnormal

CreateTime

String

2023-09-05T12:44:20Z

The time when the KMS instance was created.

Spec

Long

1000

The computing performance of the KMS instance.

KeyNum

Long

1000

The number of keys that can be created for the KMS instance.

SecretNum

String

10

The number of secrets that can be created for the KMS instance.

VpcNum

Long

5

The access management quota for the KMS instance.

VpcId

String

vpc-bp19z7cwmltad5dff****

The virtual private cloud (VPC) with which the KMS instance is associated.

ZoneIds

String

"cn-hangzhou-k", "cn-hangzhou-j"

The zone with which the KMS instance is associated.

VswitchIds

String

vsw-bp1i512amda6d10a0****

The vSwitch in the VPC.

EndDate

String

2023-10-05T16:00:00Z

The expiration time of the KMS instance.

StartDate

String

2023-09-05T12:44:19Z

The time when the KMS instance was enabled.

CaCertificateChainPem

String

-----BEGIN CERTIFICATE-----\r\nMIIDuzCCAqOgAwIBAgIJALTKwWAjvbMiMA0GCSqGSIb3DQEBCwUAMHQxCzAJBgNV****-----END CERTIFICATE-----

The content of the certificate authority (CA) certificate of the KMS instance.

BindVpcs

Array of BindVpc

A list of configured VPCs.

Note

If your own applications are deployed in multiple VPCs in the same region, you can associate the VPCs except the VPC in which the KMS instance resides with the KMS instance. The VPCs can belong to the same Alibaba Cloud account or different Alibaba Cloud accounts. After the configuration is complete, the applications in these VPCs can access the KMS instance.

BindVpc

RegionId

String

cn-hangzhou

The region where the VPC is deployed.

VpcId

String

vpc-bp19z7djuhtad5dff****

The ID of the VPC.

VpcOwnerId

String

190325303126****

The Alibaba Cloud account to which the VPC belongs.

VSwitchId

String

vsw-bp1i512amhdje10f1****

The vSwitch in the VPC.

Examples

Sample requests

http(s)://[Endpoint]/?Action=GetKmsInstance
&KmsInstanceId=kst-bjj62f5ba3dnpb6v8****
&Common request parameters

Sample success responses

XML format

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

<GetKmsInstanceResponse>
    <RequestId>46b4a94a-57d2-44b4-9810-1e87d31abb33</RequestId>
    <KmsInstance>
        <InstanceId>kst-bjj62f5ba3dnpb6v8****</InstanceId>
        <InstanceName>kst-bjj62f5ba3dnpb6v8****</InstanceName>
        <Status>Connected</Status>
        <CreateTime>2023-09-05T12:44:20Z</CreateTime>
        <Spec>1000</Spec>
        <KeyNum>1000</KeyNum>
        <SecretNum>10</SecretNum>
        <VpcNum>5</VpcNum>
        <VpcId>vpc-bp19z7cwmltad5dff****</VpcId>
        <ZoneIds>"cn-hangzhou-k",       "cn-hangzhou-j"</ZoneIds>
        <VswitchIds>vsw-bp1i512amda6d10a0****</VswitchIds>
        <EndDate>2023-10-05T16:00:00Z</EndDate>
        <StartDate>2023-09-05T12:44:19Z</StartDate>
        <CaCertificateChainPem>-----BEGIN CERTIFICATE-----\r\nMIIDuzCCAqOgAwIBAgIJALTKwWAjvbMiMA0GCSqGSIb3DQEBCwUAMHQxCzAJBgNV****-----END CERTIFICATE-----</CaCertificateChainPem>
        <BindVpcs>
            <RegionId>cn-hangzhou</RegionId>
            <VpcId>vpc-bp19z7djuhtad5dff****</VpcId>
            <VpcOwnerId>190325303126****</VpcOwnerId>
            <VSwitchId>vsw-bp1i512amhdje10f1****</VSwitchId>
        </BindVpcs>
    </KmsInstance>
</GetKmsInstanceResponse>

JSON format

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

{
  "RequestId" : "46b4a94a-57d2-44b4-9810-1e87d31abb33",
  "KmsInstance" : {
    "InstanceId" : "kst-bjj62f5ba3dnpb6v8****",
    "InstanceName" : "kst-bjj62f5ba3dnpb6v8****",
    "Status" : "Connected",
    "CreateTime" : "2023-09-05T12:44:20Z",
    "Spec" : 1000,
    "KeyNum" : 1000,
    "SecretNum" : "10",
    "VpcNum" : 5,
    "VpcId" : "vpc-bp19z7cwmltad5dff****",
    "ZoneIds" : "\"cn-hangzhou-k\",       \"cn-hangzhou-j\"",
    "VswitchIds" : "vsw-bp1i512amda6d10a0****",
    "EndDate" : "2023-10-05T16:00:00Z",
    "StartDate" : "2023-09-05T12:44:19Z",
    "CaCertificateChainPem" : "-----BEGIN CERTIFICATE-----\\r\\nMIIDuzCCAqOgAwIBAgIJALTKwWAjvbMiMA0GCSqGSIb3DQEBCwUAMHQxCzAJBgNV****-----END CERTIFICATE-----",
    "BindVpcs" : [ {
      "RegionId" : "cn-hangzhou",
      "VpcId" : "vpc-bp19z7djuhtad5dff****",
      "VpcOwnerId" : "190325303126****",
      "VSwitchId" : "vsw-bp1i512amhdje10f1****"
    } ]
  }
}

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.