查询集群中的节点
更新时间:2024-09-25
接口描述
查询集群中全部节点。
请求结构
GET /v{version}/cluster/{clusterId}/instances HTTP/1.1
Host: chpc.bj.baidubce.com
Authorization: authorization string
请求头域
除公共头域外,无其他特殊头域。
请求参数
参数名称 | 类型 | 是否必需 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API版本号。 |
clusterId | String | 是 | URL参数 | 集群id |
pageNo | Integer | 否 | Query参数 | 当前页,默认1 |
pageSize | Integer | 否 | Query参数 | 页大小,默认10,最大100 |
响应头域
除公共头域,无其他特殊头域。
响应参数
参数名称 | 类型 | 描述 |
---|---|---|
requestId | String | 请求ID |
pageNo | Integer | 当前页码 |
pageSize | Integer | 当前页大小 |
totalCount | Integer | 总数 |
instances | List | 集群节点 |
错误码
错误码 | 错误描述 | HTTP状态码 | 中文解释 |
---|---|---|---|
NoSuchObject | The specified object is not found or resource do not exist. | 404 | 资源不存在 |
请求示例
GET /v1/cluster/c-arPHgRIb/instances
Host: chpc.bj.baidubce.com
Authorization: bce-auth-v1/ALTAKfdDegfDEgedgyhted54dg/2023-08-22T11:35:34Z/1800/host/99a18198dfd91ecaf821207a93ba04176b19afab948c001a5c11beffc7a5ff6b
响应示例
{
"requestId": "3c523a44-0944-45db-a06e-9c7a8f4413ae",
"pageNo": 1,
"pageSize": 2,
"totalCount": 2,
"instances": [
{
"clusterId": "c-arPHgRIb",
"instanceId": "i-eGxm28x3",
"instanceUuid": "744f8e28-4fc9-4749-b6e2-c8b35c3ced2d",
"queueName": "default_queue",
"nodeType": "master",
"subnetId": "sbn-vcagauncd1qz",
"eipNetworkCapacity": 0,
"cosStackId": "st-zypQJc2K",
"createdTime": "2023-08-22T11:28:45Z",
"hostName": "instance-0eto3vs9",
"status": "started",
"oosExecutionId": "d-SOOkbZPGgG1u",
"publicIp": "",
"privateIp": "192.168.100.7",
"spec": "bcc.g5.c2m8",
"chargeType": "Postpaid"
},
{
"clusterId": "c-arPHgRIb",
"instanceId": "i-tH9Uk3tz",
"instanceUuid": "9362b7c7-8696-4e26-8ae5-fce9445bdac7",
"queueName": "default_queue",
"nodeType": "compute",
"subnetId": "sbn-vcagauncd1qz",
"eipNetworkCapacity": 0,
"cosStackId": "st-zypQJc2K",
"createdTime": "2023-08-22T11:28:45Z",
"hostName": "instance-nl9loqrv",
"status": "started",
"oosExecutionId": "d-IWpqPgZ9qVlW",
"publicIp": "",
"privateIp": "192.168.100.8",
"spec": "bcc.g5.c2m8",
"chargeType": "Postpaid"
}
]
}