修改MongoDB实例的透明数据加密TDE(Transparent Data Encryption)状态。
接口说明
透明数据加密 TDE(Transparent Data Encryption)可对数据文件执行实时 I/O 加密和解密,数据在写入磁盘之前进行加密,从磁盘读入内存时进行解密,更多详情请参见设置透明数据加密 TDE。
TDE 功能开通后无法关闭。
调用本接口时,实例必须满足以下条件:
实例为副本集实例或分片集群实例。
实例的存储引擎为 WiredTiger。
实例的存储类型为本地盘版。
实例的数据库版本为 4.0 或 4.2 版本,如果实例数据库版本过低,您可以调用 UpgradeDBInstanceEngineVersion 接口升级数据库版本。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
dds:ModifyDBInstanceTDE |
update |
*Instance
|
无 | 无 |
请求参数
名称 |
类型 |
必填 |
描述 |
示例值 |
DBInstanceId |
string |
是 |
实例 ID。 |
dds-bpxxxxxxxx |
TDEStatus |
string |
是 |
TDE 状态,取值: enabled,即开启 TDE 功能。 说明
TDE 功能开启后不支持关闭,请谨慎开启。 |
enabled |
EncryptorName |
string |
否 |
加密方式,取值:aes-256-cbc。 说明
当 TEDStatus 参数取值为 enabled 时,本参数才可用。 |
aes-256-cbc |
EncryptionKey |
string |
否 |
自定义密钥 ID。 只有如下地域支持自定义密钥,其余地域会使用默认密钥加密。
|
749c1df7-xxxx-xxxx-xxxx-xxxxxxxxxxxx |
RoleARN |
string |
否 |
指定角色的 ARN。格式: 说明
|
acs:ram::123456789012****:role/adminrole |
SwitchMode |
string |
否 |
返回参数
名称 |
类型 |
描述 |
示例值 |
object |
|||
RequestId |
string |
请求 ID。 |
434D7127-6229-4355-BA50-7A3685A725DF |
示例
正常返回示例
JSON
格式
{
"RequestId": "434D7127-6229-4355-BA50-7A3685A725DF"
}
错误码
HTTP status code |
错误码 |
错误信息 |
描述 |
---|---|---|---|
400 | UnsupportedDBTdeStatus | Specified DB TDEStatus does not support this operation. | |
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. | 当前数据库实例状态不支持此操作。 |
403 | IncorrectDBInstanceLockMode | Current DB instance lock mode does not support this operation. | 当前的数据库实例锁定模式不支持此操作。 |
404 | InvalidClusterKms | this cluster not kms service. | |
404 | InvalidParam | Specified parameters is not valid. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。