查询DDM实例列表
功能介绍
查询DDM实例列表。
接口约束
无
调试
您可以在API Explorer中调试该接口,支持自动认证鉴权。API Explorer可以自动生成SDK代码示例,并提供SDK代码示例调试功能。
URI
GET /v1/{project_id}/instances?offset={offset}&limit={limit}
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
project_id | 是 | String | 租户在某一region下的project ID。 获取方法请参见获取项目ID。 |
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
offset | 否 | Integer | 索引位置,偏移量。 从第一条数据偏移offset条数据后开始查询,默认为0。 取值必须为数字,且不能为负数。 |
limit | 否 | Integer | 查询个数上限值。 取值范围:1~128。 不传该参数时,默认值为10。 |
请求参数
参数 | 是否必选 | 参数类型 | 描述 |
|---|---|---|---|
X-Auth-Token | 是 | String | 用户Token。 通过调用IAM服务的“获取用户Token”接口来获取。 |
响应参数
状态码: 200
参数 | 参数类型 | 描述 |
|---|---|---|
instances | Array of ShowInstanceBeanResponse objects | DDM实例的信息。 |
instance_num | Integer | 租户下的DDM实例个数。 |
page_no | Integer | 当前页码。 |
page_size | Integer | 当前页码的数据条数。 |
total_record | Integer | 总条数。 |
total_page | Integer | 总页数。 |
参数 | 参数类型 | 描述 |
|---|---|---|
id | String | DDM实例ID。 |
status | String | DDM实例状态。具体取值请参见相关状态说明。 |
name | String | 创建的实例名称。 |
created | String | 创建时间,格式为“yyyy-mm-dd Thh:mm:ssZ”。 其中,T指定某个时间的开始;Z指示 UTC 时间。 |
updated | String | 更新时间,格式与“created”完全相同。 |
available_zone | String | 可用区名称。 |
vpc_id | String | 虚拟私有云的ID。 |
subnet_id | String | 子网ID。 |
security_group_id | String | 安全组ID。 |
node_count | Integer | 节点数量。 |
access_ip | String | DDM实例访问地址。 |
access_port | String | DDM实例访问端口。 |
core_count | String | CPU个数。 |
ram_capacity | String | 内存大小,单位为GB。 |
error_msg | String | 响应信息,若无异常信息则不返回该参数。 |
node_status | String | 节点状态。 |
enterprise_project_id | String | 企业项目ID。 |
project_id | String | 租户在某一region下的project ID。 |
engine_version | String | 引擎版本号。 |
order_id | String | 包周期的实例,有订单ID。 |
enable_ssl | Boolean | 实例开启SSL标志。
|
flavor_ref | String | 规格码。 |
状态码: 400
参数 | 参数类型 | 描述 |
|---|---|---|
errCode | String | 业务错误码。 |
externalMessage | String | 错误信息。 |
状态码: 500
参数 | 参数类型 | 描述 |
|---|---|---|
errCode | String | 业务错误码。 |
externalMessage | String | 错误信息。 |
请求示例
查询实例列表。
GET https://{endpoint}/v1/{project_id}/instances?offset={offset}&limit={limit} 响应示例
状态码: 200
OK
{
"instance_num" : 26,
"instances" : [ {
"id" : "73f27bb0b26d4a79a9b0c58a4c700c4fin09",
"status" : "RUNNING",
"name" : "ddm-36c7",
"created" : "2021-12-14T07:46:22+0000",
"updated" : "2021-12-14T10:11:22+0000",
"available_zone" : "az1",
"vpc_id" : "1d9441c5-1a4b-431d-9edb-bf3564a83e74",
"subnet_id" : "20c2d83c-755b-42a2-846a-4688eb35d1a7",
"security_group_id" : "fbdff89d-32fe-45a4-832b-115ac4bfaac9",
"node_count" : 1,
"access_ip" : "192.168.23.143",
"access_port" : "5066",
"core_count" : "2",
"ram_capacity" : "4",
"node_status" : "RUNNING",
"enterprise_project_id" : "0",
"project_id" : "055d9f4ee780d4d42f96c01c1bc3c50c",
"engine_version" : "3.0.8",
"enable_ssl" : false,
"flavor_ref" : "ddm.c6.large.2"
} ],
"page_size" : 1,
"total_record" : 26,
"total_page" : 26,
"page_no" : 3
} 状态码: 400
bad request
{
"externalMessage" : "Parameter error.",
"errCode" : "DBS.280001"
} 状态码: 500
server error
{
"externalMessage" : "Server failure.",
"errCode" : "DBS.200412"
} 状态码
状态码 | 描述 |
|---|---|
200 | OK |
400 | bad request |
500 | server error |
错误码
请参见错误码。

