Queries whether an ApsaraDB for Redis instance is authorized to use Key Management Service (KMS).

  • For more information about TDE and the usage notes of TDE, see Enable TDE.
  • If the ApsaraDB for Redis instance is authorized to use KMS, you can call the ModifyInstanceTDE operation to enable TDE.


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 CheckCloudResourceAuthorized

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

InstanceId String Yes r-bp1zxszhcgatnx****

The ID of the ApsaraDB for Redis instance. You can call the DescribeInstances operation to query instance IDs.

RoleArn String Yes acs:ram::123456789012****:role/AliyunRdsInstanceEncryptionDefaultRole

The Alibaba Cloud Resource Name (ARN) of the RAM role that you want to attach to your ApsaraDB for Redis instance. The ARN must be in the format of acs:ram::$accountID:role/$roleName. After the role is attached, your ApsaraDB for Redis instance can use KMS.

  • $accountID: the ID of the Alibaba Cloud account. To view the account ID, log on to the Alibaba Cloud console, move the pointer over your profile picture in the upper-right corner of the page, and then click Security Settings.
  • $roleName: the name of the RAM role. Replace $roleName with AliyunRdsInstanceEncryptionDefaultRole.
RegionId String No cn-hangzhou

The region ID of the instance. You can call the DescribeInstances operation to query the region IDs of instances.

Response parameters

Parameter Type Example Description
AuthorizationState Integer 1

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

  • 0: The instance is authorized to use KMS.
  • 1: The instance is not authorized to use KMS.
  • 2: KMS is not activated. For more information, see Activate KMS.
RequestId String A501A191-BD70-5E50-98A9-C2A486A82****

The ID of the request.


Sample requests

&<Common request parameters>

Sample success responses

XML format


JSON format

    "AuthorizationState": 1,
    "RequestId": "A501A191-BD70-5E50-98A9-C2A486A82****"

Error codes

For a list of error codes, visit the API Error Center.