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

Modifying DB Instance Specifications

Function

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

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

URI

  • URI format

    POST https://{endpoint}/mysql/v3/{project_id}/instances/{instance_id}/action

  • Example

    POST https://{endpoint}/mysql/v3/97b026aa9cc4417888c14c84a1ad9860/instances/c3ec2c6148ad4d71b1a8411a62df0d3cin07/action

  • 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

    No

    DB instance ID.

Request

Table 2 Parameter description

Name

Type

Mandatory

Description

resize_flavor

Object

Yes

For details, see Table 3.

is_auto_pay

String

No

Whether the order will be automatically paid when the specifications of yearly/monthly instances are changed.

  • true: indicates the order will be automatically paid from your account. The default value is true.
  • false: indicates the order will be manually paid.
Table 3 resize_flavor field data structure description

Name

Type

Mandatory

Description

spec_code

String

Yes

Specification code.

  • Request example
    {
      "resize_flavor": {
         "spec_code":"gaussdb.large.4"
      }
    }

Response

  • Normal response
    Table 4 Parameter description

    Name

    Type

    Description

    job_id

    String

    Job ID for changing DB instance specifications. This parameter is returned only when you change the specifications of a pay-per-use DB instance.

    order_id

    String

    Order ID for changing DB instance specifications. This parameter is returned only when you change the specification of a yearly/monthly DB instance.

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

Example Request

Changing instance specifications

POST https://{endpoint}/mysql/v3/97b026aa9cc4417888c14c84a1ad9860/instances/ba62a0b83a1b42bfab275829d86ac0fdin07/action
{
  "resize_flavor" : {
    "spec_code" : "taurus.large.4"
  }
}

Example Response

None

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.