Queries whether the cluster is authorized to use KMS.

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

ParameterTypeRequiredExampleDescription
ActionStringYesCheckKMSAuthorized

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

RegionIdStringNocn-hangzhou

The region ID of the cluster.

Note You can call the DescribeRegions operation to query the information of all regions that are available within your account, such as the region IDs.
DBClusterIdStringYespc-************

The ID of the cluster.

Note You can call the DescribeDBClusters operation to query the information of all PolarDB clusters that are deployed within a specified region, such as the cluster IDs.
TDERegionStringNocn-beijing

The region where the TDE key resides.

Response parameters

ParameterTypeExampleMessage
AuthorizationStateInteger0

Indicates whether the cluster is authorized to use KMS. Valid values:

  • 0: yes.
  • 1: no.
RequestIdStringA7E6A8FD-C50B-46B2-BA85-D8B8D3******

The ID of the request.

RoleArnStringacs:ram::1406926*****:role/aliyunrdsinstanceencryptiondefaultrole

The Alibaba Cloud Resource Name (ARN) of the RAM role. A RAM role is a virtual identity that you can create within your Alibaba Cloud account. For more information, see RAM role overview.

DBClusterIdStringpc-************

The ID of the cluster.

Examples

Sample requests

Sample success responses

XML format

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

<CheckKMSAuthorizedResponse>
    <AuthorizationState>0</AuthorizationState>
    <RequestId>A7E6A8FD-C50B-46B2-BA85-D8B8D3******</RequestId>
    <RoleArn>acs:ram::1406926*****:role/aliyunrdsinstanceencryptiondefaultrole</RoleArn>
    <DBClusterId>pc-************</DBClusterId>
</CheckKMSAuthorizedResponse>
http(s)://polardb.aliyuncs.com/?Action=CheckKMSAuthorized
&RegionId=cn-hangzhou
&DBClusterId=pc-************
&TDERegion=cn-beijing
&<Common request parameters>

JSON format

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

{
  "AuthorizationState" : 0,
  "RequestId" : "A7E6A8FD-C50B-46B2-BA85-D8B8D3******",
  "RoleArn" : "acs:ram::1406926*****:role/aliyunrdsinstanceencryptiondefaultrole",
  "DBClusterId" : "pc-************"
}

Error codes

HTTP status codeError codeError messageDescription
403UnsupportedKmsService.NotEnabledKMS service is not enabled.The error message returned because KMS is not activated.
404InvalidDBCluster.NotFoundThe DBClusterId provided does not exist in our records.The error message returned because the specified cluster ID does not exist in the current record.

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