Updated on 2025-09-04 GMT+08:00

Querying Database Specifications

Function

This API is used to query the database specifications of a specified DB engine version. Before calling this API:

URI

GET /v3/{project_id}/flavors/{database_name}

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region.

To obtain this value, see Obtaining a Project ID.

Constraints

N/A

Range

The value contains 32 characters. Only letters and digits are allowed.

Default Value

N/A

database_name

Yes

String

Definition

DB engine name.

Constraints

N/A

Range

gaussdb-mysql

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

availability_zone_mode

Yes

String

Definition

AZ type.

Constraints

N/A

Range

  • single: single AZ
  • multi: multiple AZs

Default Value

single

version_name

No

String

Definition

DB version number.

Constraints

Currently, only MySQL 8.0 is supported.

Range

8.0

Default Value

8.0

spec_code

No

String

Definition

Resource specification code. Example: gaussdb.mysql.xlarge.x86.4

  • gaussdb.mysql indicates the product.
  • xlarge indicates the specifications (4 vCPUs).
  • x86 indicates the x86 architecture.
  • 4 indicates the ratio of vCPUs to memory is 1:4.

For more information, see Instance Specifications.

Constraints

N/A

Range

N/A

Default Value

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token.

To obtain this value, call the IAM API for obtaining a user token.

The value of X-Subject-Token in the response header is the token value.

Constraints

N/A

Range

N/A

Default Value

N/A

X-Language

No

String

Definition

Request language type.

Constraints

N/A

Range

  • en-us
  • zh-cn

Default Value

en-us

Response Parameters

Status code: 202

Table 4 Response body parameter

Parameter

Type

Description

flavors

Array of MysqlFlavorsInfo objects

Definition

Instance specifications.

Table 5 MysqlFlavorsInfo

Parameter

Type

Description

vcpus

String

Definition

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

Range

N/A

ram

String

Definition

Memory size in GB.

Range

N/A

type

String

Definition

CPU architecture.

Range

  • arm: exclusive Arm
  • x86: exclusive x86
  • generalX86: general-purpose x86

id

String

Definition

Specification ID, which uniquely identifies a specification.

Range

N/A

spec_code

String

Definition

Resource specification code. Its value is same as the value of spec_code. Example: gaussdb.mysql.xlarge.x86.4

  • gaussdb.mysql indicates the product.
  • xlarge indicates the specifications (4 vCPUs).
  • x86 indicates the x86 architecture.
  • 4 indicates the ratio of vCPUs to memory is 1:4.

For more information, see Instance Specifications.

Range

N/A

version_name

String

Definition

DB version number.

Range

8.0

instance_mode

String

Definition

Instance type. Currently, only the cluster type is supported.

Range

Cluster

az_status

Map<String,String>

Definition

Status of the specification in the AZ.

Range

  • normal: The specification is available in the AZ.
  • unsupported: The specification is not supported.
  • sellout: The specification is sold out.

Status code: 400

Table 6 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Status code: 500

Table 7 Response body parameters

Parameter

Type

Description

error_code

String

Error code.

error_msg

String

Error message.

Example Request

Querying specific specifications of a TaurusDB instance

GET https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/flavors/gaussdb-mysql?version_name=8.0&spec_code=gaussdb.mysql.xlarge.x86.4&availability_zone_mode=single

Example Response

Status code: 202

Success.

{
  "flavors" : [ {
    "vcpus" : "4",
    "ram" : "16",
    "type" : "x86",
    "id" : "3169caaf-6c2f-41d5-aadd-c8fc3d83597e",
    "spec_code" : "gaussdb.mysql.xlarge.x86.4",
    "instance_mode" : "Cluster",
    "version_name" : "8.0",
    "az_status" : {
      "az1" : "normal",
      "az2" : "normal"
    }
  } ]
}

Status Code

For details, see Status Codes.

Error Code

For details, see Error Codes.