Overview
You can call this API to enable transparent data encryption (TDE) for a tenant in an OceanBase cluster. After TDE is enabled, the data of the tenant is automatically encrypted when stored, thereby improving data security.
API details
Constraints
The caller must have an AccessKey for accessing APIs. 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
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| instanceId | String | Yes | The ID of the OceanBase cluster. | obcluster-***** |
| tenantId | String | Yes | The ID of the tenant. | t4louaeei**** |
Query
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| requestId | String | Yes | The ID of the request, which is used for tracing. | dc302d76-66b5-48d8-ab53-a035******** |
Body
| Parameter | Type | Required | Description | Example value |
|---|---|---|---|---|
| encryptionType | String | Yes | The encryption type. Valid values:
|
INTERNAL |
| encryptionKeyId | String | No | The ID of the key.
|
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 request was successful. | true |
Examples
Request example
curl --digest -u '<Your ak:sk>' \
--request POST \
'https://api-cloud.oceanbase.com/api/v2/instances/{instanceId}/tenants/{tenantId}/security/tde?requestId={requestId}' \
--header 'Content-Type: application/json' \
--data '{
"encryptionType": "INTERNAL"
}'
Response example
JSON format
{
"data":{
"instanceId":"obcluster-*****",
"tenantId":"t4louaeei****",
"encryptionType":"INTERNAL"
},
"requestId":"dc302d76-66b5-48d8-ab53-a035********",
"success":true
}
