All Products
Search
Document Center

Tair:DescribeEncryptionKey

Last Updated:Mar 20, 2023

Queries the details of a custom key for an ApsaraDB for Redis instance to use Transparent Data Encryption (TDE).

Operation Description

Before you call this operation, TDE must be enabled for the ApsaraDB for Redis instance by using a custom key. For more information, see ModifyInstanceTDE.

NoteFor more information about TDE and the usage notes of TDE, see Enable TDE.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociation operation
kvstore:DescribeEncryptionKeyRead
  • Redis
    acs:kvstore:{#regionId}:{#accountId}:dbinstance/{#DBInstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

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

r-bp1zxszhcgatnx****
EncryptionKeystringNo

The ID of the custom key. You can call the DescribeEncryptionKeyList operation to query the ID of the key.

ad463061-992d-4195-8a94-ed63********

Response parameters

ParameterTypeDescriptionExample
object
DeleteDatestring

The time when the custom key is expected to be deleted. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

NoteIf the return value is an empty string, the custom key cannot be automatically deleted.
2021-09-24T18:22:03Z
RequestIdstring

The ID of the request.

9A931CE5-C926-5E09-B0EC-6299C4A6****
Descriptionstring

The description of the custom key. By default, an empty string is returned.

testkey
Originstring

The source of the custom key. A value of Aliyun_KMS indicates Key Management Service (KMS) of Alibaba Cloud.

Aliyun_KMS
MaterialExpireTimestring

The time when the custom key expires. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

NoteIf the return value is an empty string, the custom key does not expire.
2021-09-24T18:22:03Z
EncryptionKeyStatusstring

The state of the custom key used by the instance. Valid values:

  • Enabled: The custom key is available.
  • Disabled: The custom key is unavailable.
Enabled
KeyUsagestring

The purpose of the custom key used by the instance. A value of ENCRYPT/DECRYPT indicates encryption and decryption.

ENCRYPT/DECRYPT
EncryptionKeystring

The ID of the custom key used by the instance.

ad463061-992d-4195-8a94-ed63********
Creatorstring

The ID of the Alibaba Cloud account that is used to create the custom key.

17649847********

Examples

Sample success responses

JSONformat

{
    "Origin": "Aliyun_KMS",
    "Description": "testkey",
    "EncryptionKeyStatus": "Enabled",
    "RequestId": "9A931CE5-C926-5E09-B0EC-6299C4A6****",
    "MaterialExpireTime": "2021-09-24T18:22:03Z",
    "KeyUsage": "ENCRYPT/DECRYPT",
    "EncryptionKey": "ad463061-992d-4195-8a94-ed63********",
    "Creator": "17649847********",
    "DeleteDate": "2021-09-24T18:22:03Z"
}

XMLformat

<DescribeEncryptionKeyResponse>
    <Origin>Aliyun_KMS</Origin>
    <Description>testkey</Description>
    <EncryptionKeyStatus>Enabled</EncryptionKeyStatus>
    <RequestId>9A931CE5-C926-5E09-B0EC-6299C4A6****</RequestId>
    <MaterialExpireTime>2021-09-24T18:22:03Z</MaterialExpireTime>
    <KeyUsage>ENCRYPT/DECRYPT</KeyUsage>
    <EncryptionKey>ad463061-992d-4195-8a94-ed63********</EncryptionKey>
    <Creator>17649847********</Creator>
    <DeleteDate>2021-09-24T18:22:03Z</DeleteDate>
</DescribeEncryptionKeyResponse>

Error codes

For a list of error codes, visit the Service error codes.