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

Querying Instance Specifications

Function

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

URI

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

Name

Mandatory

Type

Description

project_id

Yes

String

Explanation:

Project ID of a tenant in a region.

For details about how to obtain the project ID, see Obtaining a Project ID.

Restrictions:

None

Value range:

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

Default value:

None

version

No

String

Explanation:

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

Restrictions:

None

Value range:

None

Default value:

None

spec_code

No

String

Explanation:

Specification code.

Restrictions:

None

Value range:

None

Default value:

None

ha_mode

No

String

Explanation:

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

Restrictions:

None

Value range:

  • Primary/standby: centralization_standard
  • Distributed (independent deployment): enterprise

Default value:

None

limit

No

Integer

Explanation:

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

Restrictions:

None

Value range:

[1, 100]

Default value:

100

offset

No

Integer

Explanation:

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.

Restrictions:

None

Value range:

[0, 2^31-1]

Default value:

0 (indicating that the query starts from the first data record.)

Request Parameters

None

Response Parameters

Table 2 Parameter description

Name

Type

Description

flavors

Array of objects

Explanation:

Specification details.

For details, see Table 3.

total

Integer

Explanation:

Total number of records.

Value range:

[0, 2^31-1]

Table 3 flavors description

Name

Type

Description

vcpus

String

Explanation:

Number of vCPUs.

Value range:

None

ram

String

Explanation:

Memory size in GB.

Value range:

None

spec_code

String

Explanation:

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

Value range:

None

availability_zone

Array of strings

Explanation:

AZ supported by the specifications.

az_status

Map<String,String>

Explanation:

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

Value range:

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

version

String

Explanation:

DB engine version supported by the specifications.

Value range:

None

name

String

Explanation:

DB engine.

Value range:

None

group_type

String

Explanation:

Performance specifications.

Value range:

  • normal: dedicated (1:8)
  • normal2: dedicated (1:4)
  • armFlavors: Kunpeng dedicated (1:8)
  • exclusive: Dedicated (1:4) It is only suitable for primary/standby instances of the basic edition.
  • armExclusive: Kunpeng dedicated (1:4) It is only suitable for primary/standby 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 primary/standby 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 Code

Error Code

For details, see Error Codes.