Updated on 2026-02-04 GMT+08:00

Changing DB Instance Specifications

Function

This API is used to change DB instance specifications.

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:modifySpec

write

-

-

-

-

Constraints

  • For details about the time required for changing the specifications of an RDS for MySQL instance and the impact on workloads, see Changing a DB Instance Class.
  • For details about the time required for changing the specifications of an RDS for PostgreSQL instance and the impact on workloads, see Changing a DB Instance Class.
  • For details about the time required for changing the specifications of an RDS for SQL Server instance and the impact on workloads, see Changing a DB Instance Class.
  • The new DB instance specifications must be different from the original DB instance specifications.
  • The instance specifications can be modified only for DB instances in the Available status.
  • The specifications of a DB instance can be changed only to the specifications of the same DB instance type. (For example, the specifications of a single DB instance cannot be changed to those of primary/standby DB instances.)

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/action

  • 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

resize_flavor

Yes

Object

Definition

For details, see Table 3.

Constraints

N/A

Table 3 resize_flavor field data structure description

Parameter

Mandatory

Type

Description

spec_code

Yes

String

Definition

Specifies the resource specification code. Use rds.mysql.m1.xlarge as an example. rds indicates the RDS product, mysql indicates the DB engine, and m1.xlarge indicates the high memory performance specifications. The parameter containing rr indicates the read replica specifications. The parameter not containing rr indicates the single or primary/standby DB instance specifications.

Constraints

N/A

Range

N/A

Default Value

N/A

is_auto_pay

No

Boolean

Definition

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

Constraints

N/A

Range

  • true: indicates the order will be automatically paid.
  • false: indicates the order will be manually paid. The default value is false.

Default Value

false

Example Request

  • Change the specifications of an RDS for MySQL DB instance to rds.mysql.m1.xlarge.
    POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/dsfae23fsfdsae3435in01/action
    
    {
    	"resize_flavor": {
    		"spec_code": "rds.mysql.m1.xlarge",
                    "is_auto_pay": true
    	}
    }
  • Change the specifications of an RDS for PostgreSQL DB instance to rds.pg.c2.medium.ha.
    {
    	"resize_flavor": {
    		"spec_code": "rds.pg.c2.medium.ha",
                    "is_auto_pay": true
    	}
    }
  • Change the specifications of an RDS for SQL Server DB instance to rds.mssql.2014.se.s3.large.2.
    {
    	"resize_flavor": {
    		"spec_code": "rds.mssql.2014.se.s3.large.2",
                    "is_auto_pay": true
    	}
    }

Response

  • Pay-per-use
    • Normal response
      Table 4 Parameters

      Parameter

      Type

      Description

      job_id

      String

      Definition

      Task ID.

      Range

      N/A

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

      For details, see Abnormal Request Results.

  • Yearly/Monthly
    • Normal response
      Table 5 Parameters

      Parameter

      Type

      Description

      order_id

      String

      Definition

      Indicates the order ID.

      Range

      N/A

    • Example normal response
      {
      	"order_id": "CS2009151216NO2U1"
      }
    • Abnormal response

      For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.