ModifyTenantEncryption

2026-01-21 09:18:31  Updated

Overview

You can call this API to enable transparent encryption for a tenant.

API details

Constraints

The caller must have an AccessKey for accessing APIs of multiple clouds. For information about how to obtain the AccessKey ID and AccessKey secret, see Manage AccessKeys.

Request path

POST /api/v2/instances/{instanceId}/tenants/{tenantId}/security/tde

Request parameters

Path

Parameter Type Required Description Example value
instanceId String Yes The ID of the instance. obxxx
tenantId String Yes The ID of the tenant. txxx

Body

Parameter Type Required Description Example value
encryptionType String Yes The encryption type. Valid values:
  • INTERNAL: the service key (automatically generated by Alibaba Cloud).
  • USER_KMS: the custom key (the key from Alibaba Cloud Key Management Service).
INTERNAL
encryptionKeyId String No The ID of the key.
  • If the encryption type is the service key (INTERNAL), this parameter is not required.
  • If the encryption type is the custom key (USER_KMS), this parameter is required and the value must be the ID of the key from the cloud service provider.
xxx

Response parameters

Parameter Type Description Example value
data object The returned result. -
instanceId string The ID of the instance. obxxx
tenantId string The ID of the tenant. txxx
encryptionType string The encryption type. INTERNAL
requestId string The ID of the request. xxx
success bool Indicates whether the operation succeeded. true

Examples

Request example

curl --digest -u 'ak:sk' \
  --request POST \
  https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/security/tde \
  --data '{
    "encryptionType": "xxx",
    "encryptionKeyId": "xxx"
  }'

Response example

JSON format

{
    "data":{
        "instanceId":"obxxx",
        "tenantId":"all",
        "encryptionType":"INTERNAL"
    },
    "requestId":"5955b710-cb29-4056-e0c4-0832b04881b4",
    "success":true
}

Contact Us