修改实例的私有池匹配模式。
接口说明
私有池是弹性保障服务或容量预定服务在创建后生成的,关联了与私有池匹配的实例信息。您可以在创建实例时设置是否使用私有池启动,实例将会与弹性保障服务或容量预定服务进行匹配。
调用该接口修改实例的私有池的属性后,实例不需要重启。
- 当您调用以下接口时,系统会重新匹配实例的私有池。如果实例已匹配了指定的私有池,可能因私有池容量已用完或私有池失效等原因造成调用失败的问题。如果出现调用失败的问题,请先调用 ModifyInstanceAttachmentAttributes 接口将私有池的匹配模式修改为
Open。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:ModifyInstanceAttachmentAttributes |
update |
*Instance
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
私有池所属的地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| InstanceId |
string |
是 |
需要修改私有池匹配属性的实例 ID。 |
i-bp67acfmxazb4**** |
| PrivatePoolOptions.MatchCriteria |
string |
是 |
修改实例的私有池匹配模式。取值范围:
|
Open |
| PrivatePoolOptions.Id |
string |
否 |
私有池 ID,即弹性保障服务 ID 或者容量预定服务 ID。
|
eap-bp67acfmxazb4**** |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
示例
正常返回示例
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | MissingParameter.RegionId | The specified RegionId should not be null. | RegionId是必选参数。 |
| 400 | MissingParameter.InstanceId | The specified InstanceId should not be null. | |
| 400 | InvalidResourcePackage.BizStatus | The resource package business status is not supported. | |
| 400 | InvalidInstanceId.MalFormed | The specified InstanceId is not valid. | |
| 400 | DedicatedHostNotSupported | DedicatedHost is not supported for PrivatePool. | 私有池不支持专有宿主机。 |
| 400 | SpotNotSupported | Spot is not supported for PrivatePool. | 私有池不支持抢占式实例。 |
| 400 | ClassicNetworkNotSupported | Classic network is not supported for PrivatePool. | 私有池不支持经典网络类型实例。 |
| 400 | Invalid.InstanceId | Instance does not exist. | 实例不存在。 |
| 400 | Invalid.PrivatePoolOptions.MatchCriteria | Target mode does not support this operation. | Target模式不支持本次操作。 |
| 400 | MissingParameter.PrivatePoolOptions.Id | The specified PrivatePoolOptions.Id should not be null. | PrivatePoolOptions.Id 参数不能为空。 |
| 400 | Invalid.PrivatePoolOptions.Id | The PrivatePool does not exist. | 私有池不存在。 |
| 400 | Invalid.InstanceType | The InstanceType does not match the PrivatePool. | 实例类型与私有池不匹配。 |
| 400 | Invalid.InstanceChargeType | The InstanceChargeType does not match the PrivatePool. | 实例计费类型与私有池不匹配。 |
| 400 | Invalid.ZoneId | The ZoneId does not match the PrivatePool. | 可用区与私有池不匹配。 |
| 400 | Invalid.PrivatePoolOptions.NoStock | The PrivatePool has been used up. | 指定的私有池(弹性保障、资源预定)容量已经使用完。 |
| 400 | InvalidPlatform.ValueNotSupported | The Platform does not match the PrivatePool. | 指定的Platform参数与私有池不匹配。 |
| 400 | Invalid.PrivatePoolOptions.status | The PrivatePool is expired or inactive. | 该私有池已过期或未激活。 |
| 400 | InvalidAliUid | The PrivatePool does not belong to the user of the Instance. | 私有池不属于创建实例的用户。 |
| 400 | MissingParameter.PackageType | The specified parameter "PackageType" can not be empty. | 指定的参数PackageType不能为空。 |
| 400 | MissingParameter.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" can not be empty. | 指定参数“PrivatePoolOptions.ids”不能为空。 |
| 400 | MissingParameter.InstanceCpuCoreCount | The specified parameter "InstanceCpuCoreCount" can not be empty. | 指定的参数 'InstanceCpuCocount'不能为空。 |
| 400 | MissingParameter.InstanceAmount | The specified parameter "InstanceAmount" can not be empty. | 指定的参数InstanceAmount不能为空。 |
| 400 | MissingParameter.InstanceCpuCoreCountOrInstanceAmount | The specified parameter "InstanceCpuCoreCount" and "InstanceAmount" must not be empty at the same time. | 指定的参数InstanceCpuCoreCount和InstanceAmount不能同时为空。 |
| 400 | Invalid.TooManyPrivatePoolOptions.Ids | Too many PrivatePoolOptions.Ids in this request. | PrivatePoolOptions.Ids参数超过上限。 |
| 400 | Invalid.TooManyZoneIds | Too many ZoneIds in the request. | ZoneIds参数超过上限。 |
| 400 | Invalid.TooManyInstanceTypes | Too many InstanceTypes in the request. | InstanceTypes参数超过上限。 |
| 400 | Invalid.TooManyUnpaidPrivatePool | Too many PrivatePools create but still unpaid. | 多个私有池未支付。 |
| 400 | Invalid.InstanceCpuCoreCountOrInstanceAmount | Both InstanceCpuCoreCount and InstanceAmount are provided. | InstanceCpuCoreCount和InstanceAmount两个参数不需要同时提供。 |
| 400 | Invalid.PrivatePoolOptions.Ids | The specified parameter "PrivatePoolOptions.Ids" exist invalid element Id. | 指定的私有池ID不存在。 |
| 400 | Invalid.PackageType | The specified parameter "PackageType" is invalid. | 指定的参数“PackageType”无效。 |
| 400 | Invalid.PrivatePool.Purchase | The PrivatePool has already paid. | 私有池已经支付。 |
| 400 | Invalid.AssuranceTimes.NotSupported | The value of AssuranceTimes is not supported. | AssuranceTimes参数值不支持。 |
| 400 | RepeatStartPrivatePool | PrivatePool has already been started. | 私有池已经启动。 |
| 500 | InternalError | The request processing has failed due to some unknown error, exception or failure. | 内部错误,请重试。 |
| 500 | InvalidRegionId.NotFound | The specified RegionId does not exist. | |
| 403 | InvalidOperation.PrePaidInstanceUnsupported | Not support to modify the private pool options of prepay instances. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。