Updated on 2025-08-11 GMT+08:00

Querying Instance Specifications (v3.1)

Function

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

URI

GET /v3.1/{project_id}/flavors?limit={limit}&offset={offset}&ha_mode={ha_mode}&version={version}&spec_code={spec_code}
Table 1 Parameter description

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

For details about how 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

version

No

String

Definition

DB version number. You can query the specifications supported by a specified DB version, for example, 1.4.

Constraints

N/A

Range

N/A

Default Value

N/A

spec_code

No

String

Definition

Specification code.

Constraints

N/A

Range

N/A

Default Value

N/A

ha_mode

No

String

Definition

Instance type. You can query the specifications supported by a specified instance type.

Constraints

N/A

Range

  • Centralized: centralization_standard
  • Distributed (independent deployment): enterprise

Default Value

N/A

limit

No

Integer

Definition

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

Constraints

N/A

Range

[1, 100]

Default Value

100

offset

No

Integer

Definition

Index offset. The query starts from the next piece of data indexed by this parameter. For example, if this parameter is set to 1 and limit is set to 10, only the 2nd to 11th records are displayed.

Constraints

N/A

Range

[0,2^31-1]

Default Value

0: The query starts from the first data record.

Request Parameters

None

Response Parameters

Table 2 Parameter description

Parameter

Type

Description

flavors

Array of objects

Definition

Specification details.

For details, see Table 3.

total

Integer

Definition

Total number of records.

Range

[0, 2^31-1]

Table 3 flavors description

Parameter

Type

Description

vcpus

String

Definition

Number of vCPUs.

Range

N/A

ram

String

Definition

Memory size in GB.

Range

N/A

spec_code

String

Definition

Resource specification code. For details, see DB Instance Specifications.

Range

N/A

availability_zone

Array of strings

Definition

AZ supported by the specifications.

az_status

Map<String,String>

Definition

key indicates the AZ ID, and value indicates the specification status in the AZ.

Range

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

version

String

Definition

DB engine version supported by the specifications.

Range

N/A

name

String

Definition

DB engine.

Range

N/A

group_type

String

Definition

Performance specifications.

Range

  • normal: dedicated (1:8)
  • normal2: dedicated (1:4)
  • armFlavors: Kunpeng dedicated (1:8)
  • exclusive: dedicated (1:4). It is only suitable for centralized instances of the basic edition.
  • armExclusive: Kunpeng dedicated (1:4). It is only suitable for centralized instances of the basic edition.
  • economical: favored (1:4)
  • economical2: favored (1:8)
  • armFlavors2: Kunpeng dedicated (1:4)
  • general: general-purpose (1:4)

Example Request

  • Querying specifications of a centralized instance
    GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/flavors?offset=0&limit=10&ha_mode=centralization_standard&version=3.100&spec_code=gaussdb.opengauss.ee.km1.2xlarge.arm8.ha
  • Querying specifications of a distributed instance
    GET https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3.1/0483b6b16e954cb88930a360d2c4e663/flavors?offset=0&limit=10&ha_mode=enterprise&version=3.100&spec_code=gaussdb.opengauss.ee.dn.m4.2xlarge.8.in

Example Response

Instance specifications queried.
{
  "flavors": [
    {
      "vcpus": "2",
      "ram": "16",
      "availability_zone": [
        "az2xahz",
        "az1xahz",
        "az3xahz"
      ],
      "version": "1.4",
      "name": "GaussDB",
      "spec_code": "gaussdb.opengauss.ee.dn.m6.large.8.in",
      "az_status": {
        "az2xahz": "normal",
        "az1xahz": "normal",
        "az3xahz": "normal"
      },
      "group_type": "normal2"
    }
  ],
  "total": 1
}

Status Codes

Error Codes

For details, see Error Codes.