更新时间:2022-04-12 GMT+08:00
分享

查询所有实例规格信息

功能介绍

查询指定条件下的所有实例规格信息。

调试

您可以在API Explorer中调试该接口。

URI

  • URI格式

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

  • URI样例

    https://dds.cn-north-1.myhuaweicloud.com/v3/0549b4a43100d4f32f51c01c2fe4acdb/flavors?region=cn-north-1&engine_name=DDS-Community

  • 参数说明
    表1 参数说明

    名称

    是否必选

    描述

    project_id

    租户在某一region下的project ID。

    region

    实例所在区域。

    取值:

    非空,请参见地区和终端节点

    engine_name

    数据库版本类型。取值为“DDS-Community”。

请求消息

无。

响应消息

  • 要素说明
    表2 要素说明

    名称

    参数类型

    描述

    flavors

    Array of objects

    实例规格信息列表。详情请参见表3

    表3 flavors字段数据结构说明

    名称

    参数类型

    描述

    engine_name

    String

    引擎名称。

    type

    String

    节点类型。文档数据库包含以下几种节点类型:

    • mongos
    • shard
    • config
    • replica
    • single

    vcpus

    String

    CPU核数。

    ram

    String

    内存大小,单位为GB。

    spec_code

    String

    资源规格编码。

    示例:dds.mongodb.c3.xlarge.2.shard

    说明:
    • “dds”表示文档数据库服务产品。
    • “dds.mongodb”表示文档数据库服务产品。
    • “c3.xlarge.2”表示节点性能规格,为高内存类型。
    • “shard”表示节点类型。
    • 查询规格时,注意区分是否为同系列的规格。规格系列包括:通用型(s6)、增强型(c3)、增强Ⅱ型(c6)。
      示例:
      • dds.mongodb.s6.large.4.mongos和dds.mongodb.s6.large.4.config是同一规格系列。
      • dds.mongodb.s6.large.4.mongos和dds.mongodb.c3.large.4.config不是同一规格系列。

    az_status

    Object

    规格在可用区内的状态,包含以下状态:

    • normal,在售。
    • unsupported,暂不支持该规格。
    • sellout,售罄。

响应样例中“az_status”字段下可用区的值为示例值。

  • 响应样例
    {
        "flavors": [
            {
                "engine_name": "DDS-Community",
                "type": "mongos",
                "vcpus": "1",
                "ram": "4",
                "spec_code": "dds.mongodb.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.mongodb.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.mongodb.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.mongodb.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.mongodb.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"
                }
            }
        ]
    }

状态码

详情请参见状态码

错误码

详情请参见错误码

分享:

    相关文档

    相关产品

close