Updated on 2024-02-06 GMT+08:00

Shrinking Database Logs

Function

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

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

URI

  • URI format

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

  • Parameter description
    Table 1 Parameter description

    Name

    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

Table 2 Parameter description

Name

Mandatory

Type

Description

db_name

Yes

String

Database name.

Example Request

Shrinking database logs

POST https://rds.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/instances/161e33e453954e21acfff65bfa3dbfebin04/db-shrink
{
    "db_name": "test1"
}

Response

  • Normal response
    Table 3 Parameter description

    Parameter

    Type

    Description

    resp

    String

    Returns successful if the invoking is successful, or returns failed if the invoking fails.

Status Code

Error Code

For details, see Error Codes.