Updated on 2025-02-28 GMT+08:00

Querying Instance Specifications

Function

This API is used to query all instance specifications under a specified condition.

Constraints

This API supports the following instance types:

  • GeminiDB Cassandra
  • GeminiDB Mongo
  • GeminiDB Influx
  • GeminiDB Redis

URI

GET https://{Endpoint}/v3.1/{project_id}/flavors

Table 1 URI parameter

Parameter

Mandatory

Type

Description

project_id

Yes

String

Explanation:

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

Constraints:

N/A

Values:

N/A

Default value:

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

engine_name

No

String

Explanation:

Database type

Constraints:

N/A

Values:

  • cassandra: GeminiDB Cassandra instance specifications are queried.
  • mongodb: GeminiDB Mongo instance specifications are queried.
  • influxdb: GeminiDB Influx instance specifications are queried.
  • redis: GeminiDB Redis instance specifications are queried.

Default value:

cassandra

mode

No

String

Explanation:

Instance type

Constraints:

N/A

Values:

CloudNativeCluster: Specifications of instances with cloud native storage are queried.

Default value:

If this parameter is not transferred, the specifications of all instances with classic storage are queried.

product_type

No

String

Explanation:

Product type

Constraints:

This parameter is mandatory when you create a GeminiDB Redis instance with cloud native storage.

Values:

  • Standard
  • Capacity

Default value:

N/A

offset

No

Integer

Explanation:

Index offset

Constraints:

N/A

Values:

The value must be a positive integer.

Default value:

If offset is set to N, the resource query starts from the N+1 piece of data. If action is set to filter, offset is 0 by default, the query starts from the first record.

limit

No

Integer

Explanation:

Maximum of specifications that can be queried

Constraints:

N/A

Values:

1 to 100

Default value:

If this parameter is not transferred, the first 100 pieces of specification information can be queried by default.

Request Parameters

Table 3 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Explanation:

User token

You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication.

Constraints:

N/A

Values:

N/A

Default value:

N/A

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

total_count

Integer

Explanation:

Total number of records

Values:

N/A

flavors

Array of Flavors objects

Explanation:

Instance specifications

Table 5 Flavors

Parameter

Type

Description

engine_name

String

Explanation:

API name

Values:

  • cassandra: specifications supported by a GeminiDB Cassandra instance
  • mongodb: specifications supported by a GeminiDB Mongo instance
  • influxdb: specifications supported by a GeminiDB Influx instance
  • redis: specifications supported by a GeminiDB Redis instance

engine_version

String

Explanation:

API version.

Values:

N/A

Default value:

N/A

vcpus

String

Explanation:

Number of CPU cores

Values:

N/A

Default value:

N/A

ram

String

Explanation:

Memory size, in MB

Values:

N/A

Default value:

N/A

spec_code

String

Explanation:

Resource specification code.

Example: geminidb.cassandra.8xlarge.4

NOTE:
  • geminidb.cassandra indicates the instance is a GeminiDB Cassandra instance.
  • 8xlarge.4 indicates node specifications.

Values:

N/A

availability_zone

Array of strings

Explanation:

ID of the AZ that supports the specifications

NOTE:

This parameter has been discarded. Do not use it.

Values:

N/A

az_status

Object

Explanation:

Status of specifications in an AZ

Values:

  • normal: The product is on sale.
  • unsupported: The specifications are not supported.
  • sellout: The product is sold out.

Example Requests

URI example
GET https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3.1/375d8d8fad1f43039e23d3b6c0f60a19/flavors?engine_name=cassandra&offset=0&limit=10

Example Responses

Status code: 200

Success

{
  "total_count" : 4,
  "flavors" : [ {
    "engine_name" : "cassandra",
    "engine_version" : "3.11",
    "vcpus" : "4",
    "ram" : "16",
    "spec_code" : "geminidb.cassandra.xlarge.4",
    "availability_zone" : [ "az1", "az2" ],
    "az_status" : {
      "az1" : "normal",
      "az2" : "unsupported"
    }
  }, {
    "engine_name" : "cassandra",
    "engine_version" : "3.11",
    "vcpus" : "8",
    "ram" : "32",
    "spec_code" : "geminidb.cassandra.2xlarge.4",
    "availability_zone" : [ "az1", "az2" ],
    "az_status" : {
      "az1" : "unsupported",
      "az2" : "normal"
    }
  }, {
    "engine_name" : "cassandra",
    "engine_version" : "3.11",
    "vcpus" : "16",
    "ram" : "64",
    "spec_code" : "geminidb.cassandra.4xlarge.4",
    "availability_zone" : [ "az1", "az2" ],
    "az_status" : {
      "az1" : "normal",
      "az2" : "sellout"
    }
  }, {
    "engine_name" : "cassandra",
    "engine_version" : "3.11",
    "vcpus" : "32",
    "ram" : "128",
    "spec_code" : "geminidb.cassandra.8xlarge.4",
    "availability_zone" : [ "az1", "az2" ],
    "az_status" : {
      "az1" : "normal",
      "az2" : "normal"
    }
  } ]
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.