查询主机列表
功能介绍
该接口用于查询输入集群的主机列表详情。
URI
请求消息
名称 |
是否必选 |
参数类型 |
说明 |
---|---|---|---|
pageSize |
否 |
Integer |
分页查询每页返回的最大集群数量。 取值范围:[1~2147483646],默认值为10。 |
currentPage |
否 |
Integer |
当前查询页码。默认值为1。 |
响应消息
参数名 |
参数类型 |
说明 |
---|---|---|
total |
Integer |
主机列表总数。 |
hosts |
Array |
主机参数,请参见表4。 |
参数名 |
参数类型 |
说明 |
---|---|---|
id |
String |
虚拟机ID |
ip |
String |
虚拟机IP地址 |
availability_zone_id |
String |
可用区域 |
tags |
Array of TagPlain objects |
标签列表信息,请参见表5 |
flavor |
String |
虚拟机规格ID |
type |
String |
虚拟机类型,当前支持MasterNode,CoreNode,TaskNode |
name |
String |
虚拟机名称 |
status |
String |
虚拟机当前状态 |
resource_id |
String |
节点资源ID |
mem |
String |
内存 |
cpu |
String |
CPU核数 |
root_volume_size |
String |
操作系统盘容量 |
data_volume_type |
String |
数据盘类型 |
data_volume_size |
Integer |
数据盘容量 |
data_volume_count |
Integer |
数据盘个数 |
参数 |
参数类型 |
描述 |
---|---|---|
key |
String |
键。标签的key值不能包含“=”,“*”,“<”,“>”,“\”,“,”,“|”,“/”,且首尾字符不能为空格。 |
value |
String |
值。标签的value值不能包含“=”,“*”,“<”,“>”,“\”,“,”,“|”,“/”,且首尾字符不能为空格。 |
请求示例
GET /v1.1/{project_id}/clusters/{cluster_id}/hosts
响应示例
状态码: 200
查询主机列表信息成功。
{ "total" : "5", "hosts" : [ { "id" : "063d1d47-ae91-4a48-840c-b3cfe4efbcf0", "name" : "a78e161c-d14f-4b68-8c2d-0219920ce844_node_core_IQhiC", "ip" : "192.168.0.169", "availability_zone_id" : null, "tags" : null, "status" : "ACTIVE", "resource_id" : "95c1eabc-ed1d-4037-97d1-62f0587790c7", "flavor" : "c2.2xlarge.linux.mrs", "type" : "Core", "mem" : "16384", "cpu" : "8", "root_volume_size" : "480", "data_volume_type" : "SATA", "data_volume_size" : "600", "data_volume_count" : "1" }, { "id" : "dc5c6208-faa2-4727-a65a-2b1ce235d350", "name" : "a78e161c-d14f-4b68-8c2d-0219920ce844_node_master1_ASzkl", "ip" : "192.168.0.156", "availability_zone_id" : null, "tags" : null, "status" : "ACTIVE", "resource_id" : "95c1eabc-ed1d-4037-97d1-62f0587790c7", "flavor" : "c2.4xlarge.linux.mrs", "type" : "Master", "mem" : "32768", "cpu" : "16", "root_volume_size" : "480", "data_volume_type" : "SATA", "data_volume_size" : "600", "data_volume_count" : "1" }, { "id" : "c0ce793d-848b-448a-835b-ea0cac534b09", "name" : "a78e161c-d14f-4b68-8c2d-0219920ce844_node_core_ANnRN", "ip" : "192.168.0.243", "availability_zone_id" : null, "tags" : null, "status" : "ACTIVE", "resource_id" : "95c1eabc-ed1d-4037-97d1-62f0587790c7", "flavor" : "c2.2xlarge.linux.mrs", "type" : "Core", "mem" : "16384", "cpu" : "8", "root_volume_size" : "480", "data_volume_type" : "SATA", "data_volume_size" : "600", "data_volume_count" : "1" }, { "id" : "95c23e43-ef6e-4732-b6ed-a5f1c7779fae", "name" : "a78e161c-d14f-4b68-8c2d-0219920ce844_node_core_uRRiA", "ip" : "192.168.0.126", "availability_zone_id" : null, "tags" : null, "status" : "ACTIVE", "resource_id" : "95c1eabc-ed1d-4037-97d1-62f0587790c7", "flavor" : "c2.2xlarge.linux.mrs", "type" : "Core", "mem" : "16384", "cpu" : "8", "root_volume_size" : "480", "data_volume_type" : "SATA", "data_volume_size" : "600", "data_volume_count" : "1" }, { "id" : "63bdbf75-1133-4a94-8c27-1fa12c8b9e70", "name" : "a78e161c-d14f-4b68-8c2d-0219920ce844_node_master2_StqFu", "ip" : "192.168.0.22", "availability_zone_id" : null, "tags" : null, "status" : "ACTIVE", "resource_id" : "95c1eabc-ed1d-4037-97d1-62f0587790c7", "flavor" : "c2.4xlarge.linux.mrs", "type" : "Master", "mem" : "32768", "cpu" : "16", "root_volume_size" : "480", "data_volume_type" : "SATA", "data_volume_size" : "600", "data_volume_count" : "1" } ] }
异常状态码请参见状态码。
错误码
请参见错误码。