Help Center> Document Database Service> 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.

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. The value is DDS-Community.

Requests

  • Request header

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

    GET https://DDS endpoint/v3/375d8d8fad1f43039e23d3b6c0f60a19/flavors?region=aaa&engine_name=DDS-Community
  • Request body

    N/A

Responses

  • Parameter description
    Table 2 Parameter description

    Name

    Type

    Description

    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.

    type

    String

    Indicates the node type. DDS contains the following types of nodes:

    • mongos
    • shard
    • config
    • replica
    • single

    vcpus

    String

    Indicates the number of vCPUs.

    ram

    String

    Indicates the memory size in gigabyte (GB).

    spec_code

    String

    Indicates the resource specification code.

    Example: dds.c3.xlarge.2.shard

    NOTE:
    • dds: indicates the DDS service.
    • c3.xlarge.2: indicates the performance specification, which is high memory.
    • shard: indicates the node type.
    • When querying the specifications, check whether the specifications are of the same series. The specification series includes general-purpose (s6), enhanced (c3), and enhanced II (c6).
      Example:
      • dds.mongodb.s6.large.4.mongos and dds.mongodb.s6.large.4.config have the same specifications.
      • dds.mongodb.s6.large.4.mongos and dds.mongodb.c3.large.4.config are not of the same specifications.

    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: indicates that the DB instance specifications are not supported.
    • sellout: indicates the specifications are sold out.

The value of az_status is used as an example.

  • Response example
    {
        "flavors": [
            {
                "engine_name": "DDS-Community",
                "type": "mongos",
                "vcpus": "1",
                "ram": "4",
                "spec_code": "dds.c3.medium.4.mongos",
                "az_status": {
                    "cn-north-1a": "unsupported",
                    "cn-north-1b": "normal",
                    "cn-north-1c": "normal",
                    "cn-north-1a,cn-north-1b,cn-north-1c": "unsupported"
                }
            },
    {
                "engine_name": "DDS-Community",
                "type": "shard",
                "vcpus": "4",
                "ram": "8",
                "spec_code": "dds.c3.xlarge.2.shard",
                "az_status": {
                    "cn-north-1a": "sellout",
                    "cn-north-1b": "normal",
                    "cn-north-1c": "normal",
                    "cn-north-1a,cn-north-1b,cn-north-1c": "unsupported"
                }
            },
      {
                "engine_name": "DDS-Community",
                "type": "config",
                "vcpus": "2",
                "ram": "4",
                "spec_code": "dds.c3.large.2.config",
                "az_status": {
                    "cn-north-1a": "normal",
                    "cn-north-1b": "normal",
                    "cn-north-1c": "normal",
                    "cn-north-1a,cn-north-1b,cn-north-1c": "normal"
                }
            },
    {
                "engine_name": "DDS-Community",
                "type": "replica",
                "vcpus": "1",
                "ram": "4",
                "spec_code": "dds.c3.medium.4.repset",
                "az_status": {
                    "cn-north-1a": "normal",
                    "cn-north-1b": "normal",
                    "cn-north-1c": "normal",
                    "cn-north-1a,cn-north-1b,cn-north-1c": "normal"
                }
            },
    {
                "engine_name": "DDS-Community",
                "type": "single",
                "vcpus": "16",
                "ram": "64",
                "spec_code": "dds.c3.4xlarge.4.single",
                "az_status": {
                    "cn-north-1a": "normal",
                    "cn-north-1b": "normal",
                    "cn-north-1c": "normal",
                    "cn-north-1a,cn-north-1b,cn-north-1c": "normal"
                }
            }
        ]
    }

Status Code

For more information, see Status Code.

Error Code

For more information, see Error Code.