All Products
Search
Document Center

ApsaraDB RDS:DescribeDBInstanceEncryptionKey

Last Updated:Apr 25, 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

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 keyAssociated operation
rds:DescribeDBInstanceEncryptionKeyRead
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
  • rds:ResourceTag
none

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
EncryptionKeyListobject []

The details about the key.

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
2023-07-12The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 403 change