獲取隊列信息列表
更新時間 2025-01-10 10:51:06
最近更新時間: 2025-01-10 10:51:06
分享文章
接口功能介紹
獲取隊列信息列表
接口約束
華北2
URI
POST /v4/cwai/central/task-service/queue/queue-info-list
路徑參數
無
Query參數
無
請求參數
請求頭header參數
無
請求體body參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| pageNo | 否 | Integer | 頁碼 | ||
| pageSize | 否 | Integer | 每頁的數目 | ||
| regionID | 是 | String | 資源池ID,regionID不能為空 | ||
| resourceGroupID | 否 | String | 資源組ID | ||
| status | 否 | String | 狀態篩選 | ||
| workspaceIDs | 否 | Array of Strings | 工作空間ID | ||
| isDesc | 否 | Boolean | 是否按創建時間倒序返回 | ||
| name | 否 | String | 隊列名 |
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| currentCount | Integer | 本次查詢返回的數據個數 | 10 | |
| result | Array of Objects | 返回的隊列配額信息詳情 | result | |
| totalCount | Integer | 符合條件的隊列配額信息總數 | 10 | |
| totalPage | Integer | 總頁數 | 1 |
表 result
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| name | String | 名稱 | ||
| queueID | String | 隊列ID | ||
| regionID | String | 區域的唯一ID | ||
| azName | String | azName | ||
| resourceGroupID | String | 資源組ID | ||
| resourceGroupName | String | 資源組名稱 | ||
| queueQuota | Array of Objects | 隊列規格使用詳情 | queueQuota | |
| createTime | String | 創建時間 | ||
| workspaceID | String | 工作空間ID | ||
| workspaceName | String | 工作空間名稱 | ||
| status | String | 狀態 |
表 queueQuota
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| queueDeviceName | String | 規格名稱 | ||
| queueDeviceID | String | 設備ID | ||
| statusMsg | String | 狀態 | ||
| gpuResourceName | String | GPU資源名稱 | ||
| cpu | Integer | 總規格:cpu | ||
| memory | Integer | 總規格:內存 | ||
| gpu | Integer | 總規格:gpu | ||
| allocatedCpu | Integer | 已使用:cpu | ||
| allocatedMemory | Integer | 已使用:內存 | ||
| allocatedGpu | Integer | 已使用:gpu | ||
| allocatedCpuRatio | Float | 已使用:cpu | ||
| allocatedMemoryRatio | Float | 已使用:內存 | ||
| allocatedGpuRatio | Float | 已使用:gpu | ||
| gpuName | Integer | GPU名稱 | ||
| count | Integer | 規格單位個數 | ||
| nodeKey | String | 節點鍵值 |
枚舉參數
無
請求示例
請求url
POST //cwai-global.ctapi.daliqc.cn/v4/cwai/queue/queue-info-list
Content-Type:application/json
請求頭header
User-Agent : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0"
請求體body
{
"isDesc": true,
"name": "xx",
"pageNo": 1,
"pageSize": 10,
"regionID": "200000001852",
"resourceGroupID": "49f62db9-810c-4a11-a731-702dc29c9790",
"status": "running",
"workspaceIDs": [
"29d1f124-dcb4-4fd7-a2c6-606db6827536"
]
}
響應示例
HTTP/1.1 200 OK
Content-Type:application/json
{
"statusCode": 800,
"message": "成功",
"returnObj": {
"currentCount": 1,
"totalCount": 1,
"totalPage": 1,
"result": [{
"name": "queue01",
"queueID": "5c512e73-953a-49ce-be88-fdf70dc5f5fd",
"creator": "秦煥煥",
"createUserID": "8bf87c66cc0b40f4afc54950e82c5b46",
"regionID": "200000001852",
"azName": "cn-huabei2-tj1A-public-ctcloud",
"resourceGroupID": "49f62db9-810c-4a11-a731-702dc29c9790",
"resourceGroupName": "wuchengcheng",
"workspaceID": "29d1f124-dcb4-4fd7-a2c6-606db6827536",
"workspaceName": "",
"queueQuota": [{
"queueDeviceID": "9b1eb5ea-bc98-41c7-a583-eb7bd10854bf",
"queueDeviceName": "huawei-Ascend910 2卡 48C 384G",
"cpu": 144,
"memory": 1152,
"gpu": 6,
"allocatedCpu": 144,
"allocatedMemory": 1152,
"allocatedGpu": 6,
"gpuName": "huawei-Ascend910",
"count": 3,
"allocatedCount": 3,
"statusMsg": "",
"gpuResourceName": "huawei.com/Ascend910",
"nodeKey": "accelerator",
"allocatedCpuRatio": 1,
"allocatedMemoryRatio": 1,
"allocatedGpuRatio": 1
}],
"status": "running"
}]
}
}
狀態碼
請參考
錯誤碼
請參考