Queries whether the cluster is authorized to use KMS.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CheckKMSAuthorized | The operation that you want to perform. Set the value to CheckKMSAuthorized. |
RegionId | String | No | cn-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. |
DBClusterId | String | Yes | pc-************ | 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. |
TDERegion | String | No | cn-beijing | The region where the TDE key resides. |
Response parameters
Parameter | Type | Example | Message |
---|---|---|---|
AuthorizationState | Integer | 0 | Indicates whether the cluster is authorized to use KMS. Valid values:
|
RequestId | String | A7E6A8FD-C50B-46B2-BA85-D8B8D3****** | The ID of the request. |
RoleArn | String | acs: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. |
DBClusterId | String | pc-************ | 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 code | Error code | Error message | Description |
---|---|---|---|
403 | UnsupportedKmsService.NotEnabled | KMS service is not enabled. | The error message returned because KMS is not activated. |
404 | InvalidDBCluster.NotFound | The 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.