華為云計算 云知識 修改智能購買組UpdateAutoLaunchGroup
修改智能購買組UpdateAutoLaunchGroup

 

接口說明

更新指定智能購買組信息

約束說明

URL
PUT  https://cms.myhuaweicloud.com/v2/{domain_id}/auto-launch-groups/{auto_launch_group_id} 
請求參數(shù)
名稱 類型 IN 必選 描述
X-Auth-Token
 
string header

用戶Token。

通過調(diào)用 IAM 服務(wù)獲取用戶Token接口獲取(響應(yīng)消息頭中X-Subject-Token的值)

auto_launch_group_id
 
string path

智能購買組ID

domain_id
 
string path

租戶域ID

Body參數(shù)
名稱 類型 必選 描述
name
 
string

智能購買組名稱。 取值范圍:1-64個字符,只能包含中文、字母、數(shù)字、下劃線和中劃線

guarantee_plan_id
 
string

算力保障計劃ID

target_capacity
 
integer

智能購買組目標(biāo)容量。 實例數(shù)量或者CPU個數(shù),目標(biāo)容量大于等于stable_capacity。競價實例的容量為滿配容量減去stable_capacity。

stable_capacity
 
integer

按需實例目標(biāo)容量。 目標(biāo)容量指實例數(shù)量或CPU個數(shù),必須小于等于target_capacity,智能購買組中可以沒有按需實例。

excess_fulfilled_capacity_behavior
 
string

超過目標(biāo)容量或目標(biāo)容量減少時的實例中斷行為,枚舉值 terminate:釋放 noTermination:不釋放 默認(rèn)值:terminate

instances_behavior_with_expiration
 
string

請求到期時正在運行實例的中斷行為,枚舉值 terminate:釋放 noTermination:不釋放 默認(rèn)值:terminate

spot_price
 
double

用戶愿意為競價實例每小時支付的最高價格。如果overrides中沒有提供價格,可以使用該價格

返回參數(shù)
返回碼: 200

OK

名稱 類型 必選 描述
error_code
 
integer

錯誤碼 請求失敗時,響應(yīng)體中包含錯誤碼 請求成功時,不在響應(yīng)消息體中包含錯誤碼

error_msg
 
string

錯誤描述 請求失敗時,響應(yīng)體中包含錯誤描述 請求成功時,不在響應(yīng)消息體中包含錯誤描述

請求示例
示例 1

修改智能購買組請求

 
"PUT https://{endpoint}/v2/{domain_id}/auto_launch_groups/{auto_launch_group_id}"
 
{ "name": "autoLaunchGroup1", "guarantee_plan_id": "plan_id", "target_capacity": 10, "stable_capacity": 5, "excess_fulfilled_capacity_behavior": "terminate", "instances_behavior_with_expiration": "terminate", "spot_price": 0.5 }
SDK
點擊 容量管理服務(wù) (CMS) SDK, 下載SDK或查看SDK文檔。SDK的安裝、認(rèn)證方式等在SDK文檔中對應(yīng)語言類型的【使用】目錄下。
錯誤碼
請參考 錯誤碼說明