Updated on 2024-05-21 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

Project ID of a tenant in a region.

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

version

No

String

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

spec_code

No

String

Specification code.

ha_mode

No

String

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

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

limit

No

Integer

Number of records to be queried. The default value is 100. The value cannot be a negative number. The minimum value is 1 and the maximum value is 100. For example, if this parameter is set to 10, a maximum of 10 records can be displayed.

offset

No

Integer

Index offset. If offset is set to N, the resource query starts from the N+1 piece of data. The value is 0 by default, indicating that the query starts from the first piece of data. The value cannot be a negative number. For example, if this parameter is set to 1 and limit is set to 10, only the 2nd to 11th records are displayed.

Request Parameters

None

Response Parameters

Table 2 Parameter description

Name

Type

Description

flavors

Array of objects

Specification details.

For details, see Table 3.

total

Integer

Total number of records.

Table 3 flavors description

Name

Type

Description

vcpus

String

Number of vCPUs.

ram

String

Memory size in GB.

spec_code

String

Resource specification code.

availability_zone

Array of strings

AZ supported by the specifications.

az_status

Map<String,String>

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.

version

String

DB engine version supported by the specifications.

name

String

DB engine.

group_type

String

Performance specifications. Its value can be any of the following:

  • normal: general-enhanced
  • normal2: general-enhanced II
  • armFlavors: Kunpeng general-enhanced
  • dedicicatenormal: exclusive x86
  • armlocalssd: general-purpose Kunpeng
  • normallocalssd: general-purpose x86
  • general: general-purpose
  • dedicated: dedicated, which is only suitable for cloud SSDs
  • rapid: dedicated, which is only suitable for extreme SSDs

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.