Help Center/ Relational Database Service/ API Reference/ API v3 (Recommended)/ DB Instance Management/ Querying Available Instance Classes for a DB Instance
Updated on 2026-02-04 GMT+08:00

Querying Available Instance Classes for a DB Instance

Function

This API is used to query available instance classes for a DB instance.

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

read

-

-

rds:instance:list

-

Constraints

This API is available to RDS for MySQL and RDS for PostgreSQL only.

URI

  • URI format

    GET /v3/{project_id}/instances/{instance_id}/flavors-resize

  • 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

None

Example Request

Query available instance classes for a DB instance.

GET https://{Endpoint}/v3/054e292c9880d4992f02c0196d3ea468/instances/d674b54d5e0241c49eeb50c82ef3efe0in03/flavors-resize

Response

Table 2 Response body parameters

Parameter

Type

Description

flavor_groups

Array of objects

Definition

List of available instance classes. For details, see Table 3.

Table 3 Data structure description of field flavor_groups

Parameter

Type

Description

group_type

String

Definition

Instance specifications.

Range

  • normal: general-enhanced
  • normal2: general-enhanced II
  • armFlavors: Kunpeng general-enhanced
  • dedicicateNormal (dedicatedNormalLocalssd): exclusive x86
  • armLocalssd: standard Kunpeng
  • normalLocalssd: standard x86
  • general: general-purpose
  • dedicated: dedicated

compute_flavors

Array of objects

Definition

List of compute specifications. For details, see Table 4.

Table 4 Data structure description of field compute_flavors

Parameter

Type

Description

id

String

Definition

Specification ID, which is unique.

Range

N/A

code

String

Definition

Resource specification code. Example: rds.pg.m1.xlarge.rr

For more specifications, see Querying Database Specifications.

  • rds: indicates the RDS product.
  • pg: indicates the DB engine.
  • m1.xlarge: indicates the high memory specifications.
  • rr: indicates read replicas (.ha indicates primary/standby DB instances).

Range

N/A

vcpus

String

Definition

Number of vCPUs. For example, the value 1 indicates one vCPU.

Range

N/A

ram

String

Definition

Memory size in GB.

Range

N/A

az_status

Map<String,String>

Definition

Specification status in an AZ.

Range

  • normal: The specification is available in the AZ.
  • unsupported: The specification is not supported.
  • sellout: The specification is sold out.
  • Example normal response
    { 
      "flavor_groups" : [ { 
        "group_type" : "general", 
        "compute_flavors" : [ { 
          "id" : "400fd0df-0502-34f1-99be-ccf2a04241ae", 
          "code" : "rds.pg.n1.medium.2", 
          "vcpus" : "1", 
          "ram" : "2", 
          "az_status" : { 
            "cn-southwest-244b" : "normal" 
          } 
        }, { 
          "id" : "b7adc282-7efb-37d3-9e34-afb8279b5436", 
          "code" : "rds.pg.n1.large.2", 
          "vcpus" : "2", 
          "ram" : "4", 
          "az_status" : { 
            "cn-southwest-244b" : "normal" 
          } 
        }, { 
          "id" : "42a4a62c-5fa8-3cd8-9856-51ebcca6e2a8", 
          "code" : "rds.pg.n1.large.4", 
          "vcpus" : "2", 
          "ram" : "8", 
          "az_status" : { 
            "cn-southwest-244b" : "normal" 
          } 
        }, { 
          "id" : "9cbf4c9f-413b-3d07-bd4c-3b9432c0e662", 
          "code" : "rds.pg.n1.xlarge.2", 
          "vcpus" : "4", 
          "ram" : "8", 
          "az_status" : { 
            "cn-southwest-244b" : "normal" 
          } 
        }, { 
          "id" : "4937f920-ba42-37a8-a375-ab46ef030814", 
          "code" : "rds.pg.n1.xlarge.4", 
          "vcpus" : "4", 
          "ram" : "16", 
          "az_status" : { 
            "cn-southwest-244b" : "normal" 
          } 
        }, { 
          "id" : "32a8aa95-72cc-34c7-873b-827e23f3ccec", 
          "code" : "rds.pg.n1.2xlarge.2", 
          "vcpus" : "8", 
          "ram" : "16", 
          "az_status" : { 
            "cn-southwest-244b" : "normal" 
          } 
        }, { 
          "id" : "98c033ca-a0f2-34be-8b27-c5dda5e6bee1", 
          "code" : "rds.pg.n1.2xlarge.4", 
          "vcpus" : "8", 
          "ram" : "32", 
          "az_status" : { 
            "cn-southwest-244b" : "normal" 
          } 
        } ] 
      } ] 
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.