獲取資源組使用信息
更新時間 2025-01-10 10:51:06
最近更新時間: 2025-01-10 10:51:06
分享文章
接口功能介紹
獲取資源組使用信息
接口約束
華北2
URI
GET /v4/cwai/central/task-service/queue/get-resource-usage-info
路徑參數
無
Query參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| id | 是 | String | 區域的唯一ID | 81f7728662dd11ec810800155d307d5b | |
| resourceGroupID | 否 | String | 資源組ID |
請求參數
請求頭header參數
無
請求體body參數
無
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| errorCode | String | 錯誤代碼 | Cwai.Api.xxxx | |
| message | String | 錯誤信息描述 | 檢測任務Id不合法 | |
| returnObj | String | 返回資源組使用信息 | returnObj | |
| statusCode | Integer | 請求成功(800)或者失敗(900) | 800 |
表 returnObj
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| allocatedCpu | Integer | 已使用:cpu | ||
| allocatedCpuRatio | Float | 已使用:cpu | ||
| allocatedGpu | Integer | 已使用:gpu | ||
| allocatedGpuRatio | Float | 已使用:gpu | ||
| allocatedMemory | Integer | 已使用:內存 | ||
| allocatedMemoryRatio | Float | 已使用:內存 | ||
| cpu | Integer | 總規格:cpu | ||
| deviceList | Array of Strings | 規格列表 | ||
| gpu | Integer | 總規格:gpu | ||
| memory | Integer | 總規格:內存 |
枚舉參數
無
請求示例
請求url
GET //cwai-global.ctapi.daliqc.cn/v4/cwai/central/task-service/queue/get-resource-usage-info?id=200000001852&resourceGroupID=49f62db9-810c-4a11-a731-702dc29c9790
請求頭header
User-Agent : "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/110.0"
請求體body
無
響應示例
{
"statusCode": 800,
"message": "成功",
"returnObj": {
"cpu": 192,
"memory": 1536,
"gpu": 8,
"allocatedCpu": 96,
"allocatedMemory": 768,
"allocatedGpu": 4,
"allocatedCpuRatio": 0.5,
"allocatedMemoryRatio": 0.5,
"allocatedGpuRatio": 0.5,
"deviceList": ["huawei-Ascend910"]
}
}
狀態碼
請參考
錯誤碼
請參考