修改智能购买组
功能介绍
更新指定智能购买组信息。
调试
您可以在API Explorer中调试该接口。
请求消息
请求参数如表2所示。
|
参数 |
是否必选 |
参数类型 |
描述 |
|---|---|---|---|
|
name |
否 |
String |
智能购买组名称。 取值范围:1-64个字符,只能包含中文、字母、数字、下划线和中划线。 |
|
guarantee_plan_id |
否 |
String |
算力保障计划ID。 |
|
target_capacity |
否 |
Integer |
智能购买组目标容量。 实例数量或者CPU个数目标容量大于等于stable_capacity。竞价实例的容量为满配容量减去stable_capacity。 |
|
stable_capacity |
否 |
Integer |
按需实例目标容量。 目标容量指实例数量或CPU个数,必须小于等于target_capacity,智能购买组中可以没有按需实例。 |
|
excess_fulfilled_capacity_behavior |
否 |
String |
超过目标容量或目标容量减少时的实例中断行为。
默认值:terminate |
|
instances_behavior_with_expiration |
否 |
String |
请求到期时正在运行实例的中断行为。
默认值:terminate |
|
spot_price |
否 |
Double |
用户愿意为竞价实例每小时支付的最高价格。如果overrides中没有提供价格,可以使用该价格。 |
响应消息
|
参数 |
参数类型 |
描述 |
|---|---|---|
|
error_code |
Integer |
错误码。
|
|
error_msg |
String |
错误描述。
|
请求示例
修改指定智能购买组信息,包括名称、算力保障计划ID、目标容量、按需实例目标容量等。
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
}
响应示例
无
返回值
请参考通用请求返回值。
错误码
请参考错误码。