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
Authorization information
There is currently no authorization information disclosed in the API.
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | No | The region ID of the instance. You can call the DescribeRegions operation to query the most recent region list. | cn-hangzhou |
DBInstanceId | string | Yes | The ID of the instance You can call the DescribeDBInstances operation to query the IDs of instances. | rm-uf6wjk5xxxxxxx |
EncryptionKey | string | No | The ID of the custom key. | 749c1df7-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
TargetRegionId | string | No | The ID of the destination region. You can call the DescribeRegions operation to query the most recent region list. | cn-qingdao |
Response parameters
Examples
Sample success responses
JSON
format
{
"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 code | Error code | Error message | Description |
---|---|---|---|
403 | NoActiveBYOK | This custins no active byok. | The disk encryption feature has not been enabled for the instance. |
403 | ByokInsnameAndRegionAllEmpty | The insName and targetRegionId can't be all empty. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-05-11 | The Error code has changed | View Change Details |
2023-07-12 | The Error code has changed | View Change Details |