查询数据库规格-QueryingDatabaseSpecifications
功能介绍
查询指定条件下的实例规格信息。
调试
您可以在API Explorer中调试该接口。
授权信息
账号具备所有API的调用权限,如果使用账号下的IAM用户调用当前API,该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权,具体权限要求请参见权限和授权项。
- 如果使用身份策略授权,需具备如下身份策略权限。
授权项
访问级别
资源类型(*为必须)
条件键
别名
依赖的授权项
dds:instance:listFlavors
read
-
-
-
-
URI
请求参数
名称 | 类型 | IN | 必选 | 描述 |
|---|---|---|---|---|
x-auth-token | string | header | 是 | 从IAM服务获取的用户Token。请参考认证鉴权。 |
project_id | string | path | 是 | 租户在某一Region下的项目ID。请参考获取项目ID章节获取项目编号。 |
engine_name | string | query | 否 | 数据库版本类型。取值为“DDS-Community”。获取方法请参见查询数据库版本信息-QueryingDatabaseVersionInformation。 |
engine_version | string | query | 否 | 数据库版本号。 |
offset | Integer | query | 否 | 索引位置,偏移量。
|
limit | Integer | query | 否 | 查询规格信息上限值。
|
响应参数
名称 | 参数类型 | 是否必选 | 描述 |
|---|---|---|---|
flavors | Array of objects | 是 | 实例规格信息列表。详情请参见表3。 |
total_count | Integer | 是 | 总记录数。 |
名称 | 参数类型 | 是否必选 | 描述 |
|---|---|---|---|
engine_name | String | 是 | 引擎名称。 |
type | String | 是 | 节点类型。文档数据库包含以下几种节点类型:
|
vcpus | String | 是 | CPU核数。 |
ram | String | 是 | 内存大小,单位为GB。 |
spec_code | String | 是 | 资源规格编码。 示例:dds.mongodb.c6.xlarge.2.shard |
az_status | Map<String,String> | 是 | 其中key是可用区编号,value是规格所在az的状态,包含以下状态:
|
engine_versions | Array of strings | 是 | 数据库版本号列表。 针对DDS引擎的mongos节点,例如:{"3.4", "4.0"} |
请求示例
无。
响应示例

响应示例中“az_status”字段下可用区的值为示例值。
- 响应示例
{ "total_count":5, "flavors": [ { "engine_name": "DDS-Community", "type": "mongos", "vcpus": "1", "ram": "4", "spec_code": "dds.mongodb.c6.medium.4.mongos", "engine_versions":["3.4","4.0"], "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.c6.xlarge.2.shard", "engine_versions":["3.4","4.0"], "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.c6.large.2.config", "engine_versions":["3.4"], "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.c6.medium.4.repset", "engine_versions":["3.4","4.0"], "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.c6.4xlarge.4.single", "engine_versions":["3.4","4.0"], "az_status": { "cn-north-1a": "normal", "cn-north-1b": "normal", "cn-north-1c": "normal", "cn-north-1a,cn-north-1b,cn-north-1c": "normal" } } ] }
SDK
单击文档数据库服务 DDS SDK,下载SDK或查看SDK文档。SDK的安装、认证方式等在SDK文档中对应语言类型的【使用】目录下。
状态码
详情请参见状态码。
错误码
详情请参见错误码。

