變更云電腦規格v3
更新時間 2025-08-07 16:49:12
最近更新時間: 2025-08-07 16:49:12
分享文章
接口功能介紹
- 適用于創建單獨付費云電腦詢價。- 新舊規格適用的系統類型、規格類型、處理器類型(XC型)必須相同。- 每次最多同時變更1個。
接口約束
無
URI
POST /v3/desktop/batch/modifySpec
路徑參數
無
Query參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| regionId | 是 | String | 資源池ID。 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx |
請求參數
請求頭header參數
無
請求體body參數
| 參數 | 是否必填 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|---|
| desktopOidList | 是 | Array of Strings | 云電腦ID列表,僅可設置一個。 | ||
| templateOid | 是 | String | 規格模板ID |
響應參數
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| statusCode | Integer | 狀態碼。可能值: - 800:請求成功。 - 900:請求失敗。 |
800 | |
| error | String | 錯誤碼。 | ECPC_1000 | |
| message | String | 提示信息。 | OK. | |
| returnObj | Object | 返回數據對象 | returnObj |
表 returnObj
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| finalPrice | String | 最終價格。 | ||
| totalPrice | String | 總價格。 | ||
| subOrderPrices | Array of Objects | 價格子項。 | subOrderPrices |
表 subOrderPrices
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| totalPrice | String | 總價格 | ||
| finalPrice | String | 最終價格 | ||
| cycleCount | String | 周期數 | ||
| serviceTag | String | 產品類別 | ||
| orderItemPrices | Array of Objects | 價格子項。 | orderItemPrices | |
| orderSumItemPrices | Array of Objects | 匯總價格子項。 | orderSumItemPrices |
表 orderItemPrices
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| totalPrice | String | 總價格 | ||
| finalPrice | String | 最終價格 | ||
| itemId | String | 項id | ||
| instanceCnt | String | 實例數量 | ||
| ctyunName | String | 產品名稱 | ||
| resourceType | String | 資源類別 |
表 orderSumItemPrices
| 參數 | 參數類型 | 說明 | 示例 | 下級對象 |
|---|---|---|---|---|
| totalPrice | String | 總價格 | ||
| finalPrice | String | 最終價格 | ||
| itemId | String | 項id | ||
| instanceCnt | String | 實例數量 | ||
| ctyunName | String | 產品名稱 | ||
| resourceType | String | 資源類別 |
枚舉參數
無
請求示例
請求url
無
請求頭header
無
請求體body
{
"desktopOidList":["XXXXXXXXXXXXX6925"],
"templateOid":"dft-xxx"
}
響應示例
{
"statusCode":800,
"message":"OK.",
"returnObj":{
"totalPrice":95.1,
"finalPrice":95.1,
"orderItemPrices":[{
"totalPrice":95.1,
"finalPrice":95.1,
"serviceTag":"BUSINESS_CPC",
"cycleCount":1,
"orderItemPrices":[{
"itemId":"cfacabd2189348488c5d5dd70cd73c82",
"ctyunName":"云電腦(政企版)",
"instanceCnt":1.0,
"totalPrice":1.0,
"finalPrice":91.0,
"resourceType":"BUSINESS_CPC_VM"
}]
}],
"orderSumItemPrices":[{
"totalPrice":95.1,
"finalPrice":95.1,
"serviceTag":"BUSINESS_CPC",
"cycleCount":1,
"orderItemPrices":[{
"itemId":"cfacabd2189348488c5d5dd70cd73c82",
"ctyunName":"云電腦(政企版)",
"instanceCnt":1.0,
"totalPrice":1.0,
"finalPrice":91.0,
"resourceType":"BUSINESS_CPC_VM"
}]
}]
}
}
狀態碼
請參考
錯誤碼
請參考