Updated on 2025-08-20 GMT+08:00

Shrinking Database Logs

Function

This API is used to shrink database logs of an RDS for SQL Server instance.

URI

  • URI format

    POST /v3.1/{project_id}/instances/{instance_id}/db-shrink

  • Parameter description
    Table 1 Parameters

    Parameter

    Mandatory

    Description

    project_id

    Yes

    Definition

    Project ID of a tenant in a region.

    To obtain the value, see Obtaining a Project ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

    instance_id

    Yes

    Definition

    Instance ID.

    Constraints

    N/A

    Range

    N/A

    Default Value

    N/A

Request

Table 2 Parameters

Parameter

Mandatory

Type

Description

db_name

Yes

String

Definition

Database name.

Constraints

N/A

Range

N/A

Default Value

N/A

Example Request

Shrinking database logs

POST https://{endpoint}/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/161e33e453954e21acfff65bfa3dbfebin04/db-shrink
{
    "db_name": "test1"
}

Response

  • Normal response
    Table 3 Parameters

    Parameter

    Type

    Description

    resp

    String

    Definition

    Calling result.

    Range

    • successful: The API is successfully called.
    • failed: The API failed to be called.

Status Code

Error Code

For details, see Error Codes.