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 2026-02-04 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.

Authorization Information

Each account has all the permissions required to call all APIs, but IAM users must be assigned the required permissions.
  • If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

Action

Access Level

Resource Type (*: required)

Condition Key

Alias

Dependencies

rds:instance:tde

permission_management

-

g:EnterpriseProjectId g:ResourceTag/<tag-key>

-

-

Constraints

  • This API supports only RDS for SQL Server instances.
  • TDE cannot be disabled after being enabled, and it cannot be enabled again.
  • All enterprise editions, 2019 Standard Edition, and 2022 Standard Edition are supported.

URI

  • URI format

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

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    Constraints

    The value cannot be empty.

    Range

    To obtain the value, see Obtaining a Project ID.

    Default Value

    N/A

    instance_id

    Yes

    Definition

    Instance ID.

    Constraints

    The value cannot be empty.

    Range

    You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances.

    Default Value

    N/A

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

rotate_day

No

Integer

Definition

Days of rotation.

Constraints

This parameter is supported with the SQL Server DB engine only. To use TDE rotation, you need to configure this parameter. Submit a service ticket to apply for this function.

Range

An integer ranging from 1 to 100000

Default Value

The value is left blank by default, indicating that TDE rotation is not used.

secret_id

No

String

Definition

Key ID.

Constraints

This parameter is supported with the SQL Server DB engine only. To use TDE rotation, you need to configure this parameter. Submit a service ticket to apply for this function.

Range

N/A

Default Value

The value is left blank by default, indicating that TDE rotation is not used.

secret_name

No

String

Definition

Key name.

Constraints

This parameter is supported with the SQL Server DB engine only. To use TDE rotation, you need to configure this parameter. Submit a service ticket to apply for this function.

Range

N/A

Default Value

The value is left blank by default, indicating that TDE rotation is not used.

secret_version

No

String

Definition

Key version.

Constraints

This parameter is supported with the SQL Server DB engine only. To use TDE rotation, you need to configure this parameter. Submit a service ticket to apply for this function.

Range

N/A

Default Value

The value is left blank by default, indicating that TDE rotation is not used.

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

    Definition

    Task flow ID.

    Range

    N/A

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

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.