Help Center> Relational Database Service> API Reference> API v3 (Recommended)> DB Instance Management> Enabling TDE for a DB Instance (RDS for SQL Server)
Updated on 2024-06-07 GMT+08:00

Enabling TDE for a DB Instance (RDS for SQL Server)

Function

This API is used to enable TDE for a DB instance.

  • Before calling an API, you need to understand the API in Authentication.

Constraints

  • This API supports only RDS for SQL Server instances.
  • TDE cannot be disabled after being enabled, and it cannot be enabled again.
  • The DB engine of the target instance must be of the Enterprise Edition or 2019 Standard Edition.

URI

  • URI format

    PUT /v3/{project_id}/instances/{instance_id}/tde

  • Parameters
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Project ID of a tenant in a region.

    To obtain it, refer to Obtaining a Project ID.

    instance_id

    Yes

    Instance ID.

Request

The following parameters are required for TDE rotation. To use this function, contact customer service first.

Table 2 Parameters

Parameter

Mandatory

Type

Description

rotate_day

No

Integer

Days of rotation. Value range: 1-100000.

secret_id

No

String

Key ID.

secret_name

No

String

Key name.

secret_version

No

String

Key version.

Example Request

  • Enable TDE for a DB instance (with TDE rotation not used).
    PUT https://{Endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/3d39c18788b54a919bab633874c159dfin04/tde
    {}
  • Enable TDE for a DB instance (with TDE rotation used).
    {
    "rotate_day": 365,
    "secret_id":"d0964270-2716-405b-bc3a-12a942451716",
    "secret_name":"test",
    "secret_version":"v10"
    }

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    job_id

    String

    Taskflow ID

  • Example normal response
    {
    "job_id":"2b414788a6004883a02390e2eb0ea227"
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.