调用ModifyCapacityReservation修改一个容量预定服务的部分信息,包括容量预定服务的名称、描述信息、失效方式以及预留的实例总数量。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
ecs:ModifyCapacityReservation |
update |
*CapacityReservation
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
容量预定服务所属地域 ID。您可以调用 DescribeRegions 查看最新的阿里云地域列表。 |
cn-hangzhou |
| PrivatePoolOptions.Id |
string |
是 |
容量预定服务 ID。 |
crp-bp67acfmxazb4**** |
| PrivatePoolOptions.Name |
string |
否 |
容量预定服务的名称。长度为 2~128 个英文或中文字符。必须以大小写字母或中文开头,不能以 |
eapTestName |
| Description |
string |
否 |
容量预定服务的描述信息。长度为 2~256 个英文或中文字符,不能以 |
This is description. |
| StartTime |
string |
否 |
容量预定服务的生效方式。目前仅支持设置为立即生效,且参数无需传值。 说明
该参数不传值即表示设置为立即生效。 |
Now |
| EndTime |
string |
否 |
容量预定服务的失效时间,仅 |
2021-10-30T06:32:00Z |
| EndTimeType |
string |
否 |
容量预定服务的失效方式。取值范围:
|
Unlimited |
| Platform |
string |
否 |
实例使用的镜像的操作系统类型。取值范围:
说明
该参数暂未开放使用。 |
Linux |
| InstanceAmount |
integer |
否 |
容量预定服务需要预留的实例总数量。取值范围:已使用的实例数量~1000 说明
扩充实例总数量时,可能因库存不足导致扩充失败。 |
100 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| RequestId |
string |
请求 ID。 |
8455DD10-84F8-43C9-8365-5F448EB169B6 |
示例
正常返回示例
JSON格式
{
"RequestId": "8455DD10-84F8-43C9-8365-5F448EB169B6"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | InvalidInstanceAmount.ValueNotSupported | The specified parameter InstanceAmount is not valid. | |
| 400 | InvalidDescription.ValueNotSupported | The specified Description is invalid. | |
| 400 | InvalidEndTime.ValueNotSupported | The specified EndTime is invalid. | |
| 400 | InvalidStartTime.ValueNotSupported | The specified StartTime is invalid. | |
| 401 | InvalidUser.Unauthorized | The user is not authorized. | 您当前使用的账号无权限。 |
| 500 | InternalError | The request processing has failed due to some unknown error. | |
| 403 | IncorrectPrivatePoolStatus | The current status of the private pool does not support this operation. | 参数中指定的私有池状态不支持当前操作 |
| 403 | OperationDenied.NoStock | The requested resource is sold out in the specified zone; try other types of resources or other regions and zones. | 库存不足。 |
| 403 | InvalidPrivatePoolOptionsName.ValueNotSupported | The specified PrivatePoolOptions.Name is invalid. | |
| 403 | InvalidPlatform.ValueNotSupported | The specified Platform is invalid. | |
| 403 | OperationDenied.PlatformNotSupported | The specified private pool does not support this operation. | |
| 403 | OperationDenied.EndTimeTypeNotSupported | The specified private pool does not support this operation. | |
| 403 | OperationDenied.StartTimeNotSupported | The specified private pool does not support this operation. | |
| 403 | OperationDenied.InstanceAmountNotSupported | The specified private pool does not support this operation. | |
| 403 | InvalidInstanceAmount.ValueNotSupported | The specified InstanceAmount is invalid. | |
| 403 | InvalidPrivatePoolOptions.Id | The specified private pool does not support this operation. | |
| 403 | OperationDenied.InstanceTypeNotAuthorized | The specified InstanceType is not available or not authorized. | 指定的实例规格不可用或未被授权。 |
| 404 | InvalidPrivatePoolId.NotFound | The specified private pool does not exist. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。