Updated on 2024-09-11 GMT+08:00

Changing a DB Instance Name

Function

This API is used to change a DB instance name. Before calling this API:

This API will be unavailable on March 31, 2025. You are advised to switch workloads to the new API (Changing a DB Instance Name) before then.

URI

  • URI format

    PUT https://{endpoint}/mysql/v3/{project_id}/instances/{instance_id}/name

  • Example

    PUT https://{endpoint}/mysql/v3/97b026aa9cc4417888c14c84a1ad9860/instances/c3ec2c6148ad4d71b1a8411a62df0d3cin07/name

  • Parameter description
    Table 1 Parameter description

    Name

    Type

    Mandatory

    Description

    project_id

    String

    Yes

    Project ID of a tenant in a region.

    To obtain this value, see Obtaining a Project ID.

    instance_id

    String

    Yes

    DB instance ID.

Request

Table 2 Parameter description

Name

Type

Mandatory

Description

name

String

Yes

DB instance name.

Instances of the same type can have same names under the same tenant.

The value consists of 4 to 64 characters and starts with a letter. It is case-sensitive and contains only letters, digits, hyphens (-), and underscores (_).

  • Request example
    {
      "name": "gaussdb-name"
    }

Response

  • Normal response
    Table 3 Parameter description

    Name

    Type

    Description

    job_id

    String

    Task ID for changing an instance name.

  • Example normal response
    {
    "job_id": "0f6b6a9e-bd39-4e95-9374-e4d134e5a3d1"
    }

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.