查询资源池列表
更新时间:2025-05-23
描述
获取指定资源池的详细信息,包括资源池元数据、状态、节点总数、空闲节点数、GPU总数、空闲卡数等
请求结构
Bash
1GET /api/v1/resourcepools
2Host:aihc.bj.baidubce.com
3Authorization:authorization string
4ContentType: application/json
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必须 | 参数位置 | 说明 |
---|---|---|---|---|
orderBy | String | 否 | Query 参数 | 集群查询排序字段,可选 [clusterName, clusterID, createdAt],默认值为 clusterAt |
order | String | 否 | Query 参数 | 排序方式,可选 [asc, desc],asc 为升序,desc 为降序,默认值为 desc |
pageNo | Integer | 否 | Query 参数 | 页码,默认值为1 |
pageSize | Integer | 否 | Query 参数 | 单页结果数,默认值为10 |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 是否必须 | 说明 |
---|---|---|---|
requestId | String | 是 | 请求ID |
result | ResourcePoolListResult | 是 | 请求成功时的响应结果 |
返回示例
JSON
1{
2 "requestId": "120007d6-d64a-4056-be3b-e675527ea1f2",
3 "result": {
4 "resourcePools": [
5 {
6 "metadata": {
7 "createdAt": "2024-01-24T10:51:44+08:00",
8 "name": "demo",
9 "id": "cce-xxxxx",
10 "updatedAt": "2024-04-18T15:41:21+08:00"
11 },
12 "spec": {
13 "k8sVersion": "1.20.8",
14 "associatedCpromIDs": [
15 "cprom-u02v1w7bj3j0b"
16 ],
17 "associatedPfsID": "pfs-pxE6jz",
18 "createdBy": "weibingcheng",
19 "description": "",
20 "forbidDelete": true,
21 "region": "bj"
22 },
23 "status": {
24 "gpuCount": {
25 "total": 1,
26 "used": 0
27 },
28 "nodeCount": {
29 "total": 6,
30 "used": 5
31 },
32 "phase": "running"
33 }
34 },
35 {
36 "metadata": {
37 "createdAt": "2023-05-27T17:06:38+08:00",
38 "name": "aihc-test",
39 "uid": "cce-6zwnp4zf",
40 "updatedAt": "2024-05-15T19:59:18+08:00"
41 },
42 "spec": {
43 "k8sVersion": "1.22.5",
44 "associatedCpromIDs": null,
45 "associatedPfsID": "pfs-pxE6jz",
46 "createdBy": "",
47 "description": "百舸灰度测试集群-don't delete",
48 "forbidDelete": true,
49 "region": "bj"
50 },
51 "status": {
52 "gpuCount": {
53 "total": 4,
54 "used": 0
55 },
56 "nodeCount": {
57 "total": 6,
58 "used": 5
59 },
60 "phase": "running"
61 }
62 }
63 ],
64 "totalCount": 9
65 }
66}