Modifies the transparent data encryption (TDE) status of an ApsaraDB for MongoDB instance.
Operation description
TDE allows you to perform real-time I/O encryption and decryption on data files. Data is encrypted before it is written to a disk and is decrypted when it is read from the disk to the memory. For more information, see Configure TDE.
Before you call this operation, make sure that the ApsaraDB for MongoDB instance meets the following requirements:
- A replica set or sharded cluster instance is used.
- The storage engine of the instance is WiredTiger.
- The instance uses local disks to store data.
- The database engine version of the instance is 4.0 or 4.2. If the database engine version is earlier than 4.0, you can call the UpgradeDBInstanceEngineVersion operation to upgrade the database engine.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
dds:ModifyDBInstanceTDE | update |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The ID of the instance. | dds-bpxxxxxxxx |
TDEStatus | string | Yes | The TDE status. When the value of this parameter is set to Enabled, TDE is enabled. Note
You cannot disable TDE after it is enabled. Proceed with caution.
| enabled |
EncryptorName | string | No | The encryption method. Set the value to aes-256-cbc. Note
This parameter is valid only when the TEDStatus parameter is set to enabled.
| aes-256-cbc |
EncryptionKey | string | No | The ID of the custom key. | 749c1df7-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
RoleARN | string | No | The Alibaba Cloud Resource Name (ARN) of the specified Resource Access Management (RAM) role. The ARN is displayed in the Note
$accountID : specifies the ID of the Alibaba Cloud account. To view the account ID, log on to the Alibaba Cloud Management Console, move your pointer over your profile picture in the upper-right corner, and then click Security Settings.Note
$roleName : specifies the name of the RAM role. To view the RAM role name, log on to the RAM console. In the left-side navigation pane, choose Identities > Roles. On the Roles page, view the name of the RAM role. | acs:ram::123456789012****:role/adminrole |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "434D7127-6229-4355-BA50-7A3685A725DF"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | UnsupportedDBTdeStatus | Specified DB TDEStatus does not support this operation. | TDE already enabled for the specified instance. |
403 | UnsupportedEngine | Current DB Instance engine does not support this operation. | - |
403 | IncorrectCharacterType | Current DB instance CharacterType does not support this operation. | - |
403 | IncorrectEngineVersion | Current engine version does not support operations. | - |
403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | This operation is not supported while the instance is in the current state. Wait until the instance state changes to running and try again. |
403 | IncorrectDBInstanceLockMode | Current DB instance lock mode does not support this operation. | The specified instance is locked and no operations are allowed on this instance. Unlock this instance and try again. |
404 | InvalidClusterKms | this cluster not kms service. | - |
404 | InvalidParam | Specified parameters is not valid. | - |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|