Help Center> GeminiDB> API Reference> API Description> Querying All DB Instance Specifications

Querying All DB Instance Specifications

Function

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

Constraints

This API supports the following DB instances:

  • GaussDB(for Cassandra)
  • GaussDB(for Mongo) cluster instance 3.4 and replica set instance 4.0

URI

  • URI format

    GET /v3/{project_id}/flavors?region={region}&engine_name={engine_name}

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Specifies the project ID of a tenant in a region.

    region

    Yes

    Specifies the region where the DB instance is deployed.

    Valid value:

    The value cannot be empty. For details about how to obtain this parameter value, see Regions and Endpoints.

    engine_name

    No

    Specifies the database type.

    • If the value is cassandra, the GaussDB(for Cassandra) instance specifications are queried,
    • If the value is mongodb, the GaussDB(for Mongo) instance specifications are queried.
    • If this parameter is not transferred, the default value is cassandra.

Requests

  • Request header

    The value of region in the following is used as an example.

    GET https://GaussDB_NoSQL_Endpoint/v3/375d8d8fad1f43039e23d3b6c0f60a19/flavors?region=aaa&engine_name=cassandra
  • Request body

    N/A

Responses

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Description

    total_count

    Integer

    Indicates the total number of records.

    flavors

    Array of objects

    Indicates the DB instance specifications information list. For more information, see Table 3.

    Table 3 flavors field data structure description

    Name

    Type

    Description

    engine_name

    String

    Indicates the engine name.

    engine_version

    String

    Indicates the engine version.

    vcpus

    String

    Indicates the number of vCPUs.

    ram

    String

    Indicates the memory size in megabytes (MB).

    spec_code

    String

    Indicates the resource specifications code.

    Example: geminidb.cassandra.8xlarge.4

    NOTE:
    • geminidb.cassandra indicates the GaussDB(for Cassandra) databases.
    • 8xlarge.4 indicates the single-node specifications.

    availability_zone

    Array of strings

    Indicates the ID of the AZ that supports this specification.

    NOTE:
    • This field has been discarded. Do not use it.

    az_status

    Object

    Indicates the status of specifications in an AZ. Its value can be any of the following:

    • normal: indicates that the specifications are on sale.
    • unsupported: not supported.
    • sellout: indicates that the DB instance specifications are sold out.

The value of az_status is used as an example.

  • Response example
    {  
        "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 Code

For more information, see Status Code.

Error Code

For more information, see Error Code.