ModifyCapacityReservation - 修改资源预留

创建和修改资源预留。

接口说明

ModifyCapacityReservation 接口属于异步接口,即系统返回一个请求 ID,但该资源预留尚未完成,系统后台的预留任务仍在进行。您可以调用 DescribeCapacityReservation 查询资源预留的状态:

  • 当资源预留处于 Pending 状态时,表示资源预留正在进行中。

  • 当资源预留处于 Provisioned 状态时,表示资源预留已经完成。

  • 当资源预留处于 Rebalancing 状态时,表示资源预留正在在可用区间重新分配。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

调试

授权信息

当前API暂无授权信息透出。

请求语法

POST  HTTP/1.1

请求参数

名称

类型

必填

描述

示例值

LoadBalancerId

string

应用型负载均衡实例 ID。

alb-iv9gj3spak6fbj****

ResetCapacityReservation

boolean

是否取消资源预留。取值:

  • true:取消资源预留。

  • false(默认值):不取消资源预留。创建、修改资源预留时可不填写此属性。

false

MinimumLoadBalancerCapacity

object

预留的最小负载均衡器容量。

CapacityUnits

integer

每小时预留 LCU 数量。

100

DryRun

boolean

是否只预检此次请求,取值:

  • true:发送检查请求,不会预留资源。检查项包括是否填写了必需参数、请求格式、业务限制。如果检查不通过,则返回对应错误。如果检查通过,则返回错误码DryRunOperation

  • false(默认值):发送正常请求,通过检查后返回 HTTP 2xx 状态码并直接进行操作。

false

ClientToken

string

保证请求的幂等性。从您的客户端生成一个参数值,确保不同请求间该参数值唯一。ClientToken 只支持 ASCII 字符,且不能超过 64 个字符。

说明

若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。

5A2CFF0E-5718-45B5-9D4D-70B3FF3898

返回参数

名称

类型

描述

示例值

object

Schema of Response

RequestId

string

请求 ID。

593B0448-D13E-4C56-AC0D-FDF0F******

示例

正常返回示例

JSON格式

{
  "RequestId": "593B0448-D13E-4C56-AC0D-FDF0F******"
}

错误码

HTTP status code

错误码

错误信息

描述

400 OperationDenied.ListenerNotFound The operation is not allowed because of ListenerNotFound.
400 OperationDenied.CapacityReservationNotSupport Resource reservation is not supported.
400 OperationDenied.CapacityUnitsBelowMinimum The operation is not allowed because of CapacityUnitsBelowMinimum.
400 OperationDenied.CapacityDecreaseRequestLimitExceeded The operation is not allowed because of CapacityDecreaseRequestLimitExceeded.
400 OperationDenied.PriorRequestNotComplete The operation is not allowed because of PriorRequestNotComplete.
400 OperationDenied.DeploymentSetExists The operation is not allowed because of OperationDenied.DeploymentSetExists.
400 OperationDenied.DeploymentSetIsEmpty The operation is not allowed because of OperationDenied.DeploymentSetIsEmpty.
400 OperationDenied.DeploymentSetsConflicts The operation is not allowed because of OperationDenied.DeploymentSetsConflicts.
400 OperationDenied.DeploymentSetsNotSupport The operation is not allowed because of OperationDenied.DeploymentSetsNotSupport.
400 OperationDenied.DeploymentSetsStrategyNotMatch The operation is not allowed because of DeploymentSetsStrategyNotMatch.
400 QuotaExceeded.ReservationMaxLcuPerLb The quota of %s is exceeded, usage %s/%s.
400 QuotaExceeded.ReservationMaxLcuPerRegion The quota of %s is exceeded, usage %s/%s.
400 QuotaExceeded.DeploymentSetsNum The quota of %s is exceeded, usage %s/%s.
404 ResourceNotFound.LoadBalancer The specified resource of %s is not found. 资源%s不存在。

访问错误中心查看更多错误码。

变更历史

更多信息,参考变更详情