Help Center/ GaussDB/ API Reference/ APIs/ DB Engine Versions and Specifications/ Querying Specifications that a DB Instance Can Be Changed To
Updated on 2026-08-18 GMT+08:00

Querying Specifications that a DB Instance Can Be Changed To

Function

This API is used to query specifications that a DB instance can be changed to. Before calling this API:

Debugging

You can debug this API in API Explorer.

URI

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

Table 1 Parameter description

Name

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain the value, see Obtaining a Project ID.

Constraints

N/A

Range

The value can contain 32 characters. Only letters and digits are allowed.

Default Value

N/A

instance_id

Yes

String

Definition

Instance ID, which uniquely identifies an instance. For details about how to obtain the instance ID, see Querying DB Instances.

Constraints

N/A

Range

The value can contain 36 characters. Only letters and digits are allowed.

Default Value

N/A

limit

No

Integer

Definition

Number of records returned by a query. For example, if this parameter is set to 10, a maximum of 10 records can be displayed.

Constraints

The value cannot be a negative number.

Range

[1, 100]

Default Value

100

offset

No

Integer

Definition

Index offset. For example, if this parameter is set to 1 and limit is set to 10, only the 2nd to 11th records are displayed.

Constraints

The value cannot be negative.

Range

N/A

Default Value

0: The query starts from the first data record.

Request Parameters

Table 2 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

You can obtain the token by calling the IAM API used to obtain a user token.

After a response is returned, the value of X-Subject-Token in the response header is the token.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Language of the information returned by the API.

Constraints

N/A

Range

  • zh-cn: Chinese
  • en-us: English

Default Value

en-us

Response Parameters

Table 3 Parameter description

Name

Type

Description

flavors

Array of objects

Definition

Specification details.

For details, see Table 4.

total_count

integer

Definition

Total number of flavors that can be changed for an instance.

Range

N/A

Table 4 flavors description

Name

Type

Description

vcpus

string

Definition

Number of vCPUs, in cores.

Range

N/A

ram

string

Definition

Memory size in GB.

Range

N/A

spec_code

string

Definition

Resource specification code, for example, gaussdb.opengauss.ee.dn.m6.4xlarge.8.in

Range

N/A

az_status

Map<String,String>

Definition

key indicates the AZ ID, and value indicates the specification status in the AZ. Its value can be any of the following:

  • normal: available.
  • unsupported: not supported.
  • sellout: sold out.

Example Request

Querying specifications that a DB instance can be changed to (The number of query records is 10, and the offset is 0.)
GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0483b6b16e954cb88930a360d2c4e663/instances/dd93e98e103b4fc4b5a978a6bd6f03a9in14/available-flavors

Example Response

Instance specifications queried.
{
    "flavors": [
        {
            "spec_code": "gaussdb.opengauss.ee.m6.2xlarge.x868.ha",
            "vcpus": "8",
            "ram": "64",
            "az_status": {
                "az2xahz": "normal"
            }
        }
    ],
    "total_count": 1
}

Status Codes

Error Codes

For details, see Error Codes.