All Products
Search
Document Center

ApsaraDB RDS:DescribeDBInstanceEncryptionKey

Last Updated:Jul 05, 2024

You can call the DescribeDBInstanceEncryptionKey operation to check whether disk encryption is enabled for an instance. You can also query details about the keys that are used for disk encryption. This operation is supported for instances that run MySQL, SQL Server, or PostgreSQL.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringNo

The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list.

cn-hangzhou
DBInstanceIdstringYes

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

rm-uf6wjk5xxxxxxx
EncryptionKeystringNo

The ID of the custom key.

749c1df7-xxxx-xxxx-xxxx-xxxxxxxxxxxx
TargetRegionIdstringNo

The ID of the destination region. You can call the DescribeRegions operation to query the most recent region list.

cn-qingdao

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

DeleteDatestring

The scheduled time at which the key is deleted. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-05-08T08:14:16Z
RequestIdstring

The ID of the request.

3BC2768E-DEDA-40FC-BBE9-6B884F3626AF
Descriptionstring

The description of the key.

Description of the key
Originstring

The source of the key.

Aliyun_KMS
MaterialExpireTimestring

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

2021-10-18T08:14:16Z
EncryptionKeyStatusstring

The status of the key. Valid values:

  • Enabled
  • Disabled
Enabled
KeyUsagestring

The purpose of the key.

ENCRYPT/DECRYPT
EncryptionKeystring

The ID of the key.

5306d1b6-7fd3-42d9-9511-xxxxxxx
Creatorstring

The user who created the key.

1443*****9604
EncryptionKeyListarray<object>

The details about the key.

object

The list of keys.

KeyTypestring

The type of the key. Valid values:

  • CMK
  • ServiceKey
ServiceKey
EncryptionKeystring

The ID of the key.

5306d1b6-7fd3-42d9-9511-xxxxxxx
Descriptionstring

The description of the key.

Description of the key
KeyUsagestring

The purpose of the key.

ENCRYPT/DECRYPT
DeleteDatestring

The scheduled time at which the key is deleted. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

2022-05-08T08:14:16Z
Creatorstring

The user who created the key.

1443*****9604
EncryptionKeyStatusstring

The status of the key. Valid values:

  • Enabled
  • Disabled
Enabled
Originstring

The source of the key.

Aliyun_KMS
MaterialExpireTimestring

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

2021-10-18T08:14:16Z
AliasNamestring

The alias of the key.

alias/xxx
UsedBystring

The role of the instance. Valid values:

  • Master: primary instance
  • slave: read-only instance
Master

Examples

Sample success responses

JSONformat

{
  "DeleteDate": "2022-05-08T08:14:16Z",
  "RequestId": "3BC2768E-DEDA-40FC-BBE9-6B884F3626AF",
  "Description": "Description of the key",
  "Origin": "Aliyun_KMS",
  "MaterialExpireTime": "2021-10-18T08:14:16Z",
  "EncryptionKeyStatus": "Enabled",
  "KeyUsage": "ENCRYPT/DECRYPT",
  "EncryptionKey": "5306d1b6-7fd3-42d9-9511-xxxxxxx",
  "Creator": "1443*****9604",
  "EncryptionKeyList": [
    {
      "KeyType": "ServiceKey",
      "EncryptionKey": "5306d1b6-7fd3-42d9-9511-xxxxxxx",
      "Description": "Description of the key",
      "KeyUsage": "ENCRYPT/DECRYPT",
      "DeleteDate": "2022-05-08T08:14:16Z",
      "Creator": "1443*****9604",
      "EncryptionKeyStatus": "Enabled",
      "Origin": "Aliyun_KMS",
      "MaterialExpireTime": "2021-10-18T08:14:16Z",
      "AliasName": "alias/xxx",
      "UsedBy": "Master"
    }
  ]
}

Error codes

HTTP status codeError codeError messageDescription
403NoActiveBYOKThis custins no active byok.The disk encryption feature has not been enabled for the instance.
403ByokInsnameAndRegionAllEmptyThe insName and targetRegionId can't be all empty.-

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

Change history

Change timeSummary of changesOperation
2024-05-11The Error code has changedView Change Details
2023-07-12The Error code has changedView Change Details