Checks whether KMS keys are authorized to ApsaraDB for MongoDB instances.
Before you enable Transparent Data Encryption (TDE) by calling the ModifyDBInstanceTDE operation, you can call this operation to check whether KMS keys are authorized to ApsaraDB for MongoDB instances.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CheckCloudResourceAuthorized |
The operation that you want to perform. Set the value to CheckCloudResourceAuthorized. |
DBInstanceId | String | Yes | dds-bp18f7d6b6a7**** |
The ID of the instance. |
TargetRegionId | String | Yes | cn-hangzhou |
The region ID of the instance. You can call the DescribeDBInstanceAttribute operation to query the region ID of the instance. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
AuthorizationState | Integer | 1 |
Indicates whether KMS keys are authorized to ApsaraDB for MongoDB instances. Valid values:
|
RequestId | String | A0181AC4-F186-46ED-87CA-100C70B86729 |
The ID of the request. |
RoleArn | String | acs:ram::140****:role/aliyunrdsinstanceencryptiondefaultrole |
The role information of the authorized Alibaba Resource Name (ARN). Note This parameter is returned only when the value of the AuthorizationState parameter is 1.
|
Examples
Sample requests
http(s)://mongodb.aliyuncs.com/?Action=CheckCloudResourceAuthorized
&DBInstanceId=dds-bp18f7d6b6a7****
&TargetRegionId=cn-hangzhou
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CheckCloudResourceAuthorizedResponse>
<AuthorizationState>1</AuthorizationState>
<RequestId>A0181AC4-F186-46ED-87CA-100C70B86729</RequestId>
<RoleArn>acs:ram::140****:role/aliyunrdsinstanceencryptiondefaultrole</RoleArn>
</CheckCloudResourceAuthorizedResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"AuthorizationState" : 1,
"RequestId" : "A0181AC4-F186-46ED-87CA-100C70B86729",
"RoleArn" : "acs:ram::140****:role/aliyunrdsinstanceencryptiondefaultrole"
}
Error codes
For a list of error codes, see Service error codes.