All Products
Search
Document Center

Server Load Balancer:ModifyCapacityReservation

Last Updated:Sep 28, 2026

Creates or modifies a capacity reservation.

Operation description

ModifyCapacityReservation is an asynchronous operation. The system returns a request ID, but the capacity reservation is not yet complete and the reservation task continues to run in the background. You can call DescribeCapacityReservation to query the status of the capacity reservation:

  • Pending: The capacity reservation is in progress.

  • Provisioned: The capacity reservation is complete.

  • Rebalancing: The capacity reservation is being redistributed across zones.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

No authorization for this operation. If you encounter issues with this operation, contact technical support.

Request syntax

POST  HTTP/1.1

Request parameters

Parameter

Type

Required

Description

Example

LoadBalancerId

string

Yes

The instance ID of the Application Load Balancing instance. Before you configure a capacity reservation, the instance must have at least one listener in the Running state.

alb-iv9gj3spak6fbj****

ResetCapacityReservation

boolean

No

Specifies whether to cancel the capacity reservation. Valid values:

  • true: Cancels the capacity reservation.

  • false (default): Does not cancel the capacity reservation. You do not need to specify this parameter when you create or modify a capacity reservation.

false

MinimumLoadBalancerCapacity

object

No

The minimum reserved load balancing capacity.

CapacityUnits

integer

No

The number of LCUs reserved per hour.

100

DryRun

boolean

No

Specifies whether to perform a dry run. Valid values:

  • true: Sends a dry run request without reserving resources. The system checks required parameters, request format, and service limits. If the check fails, the corresponding error is returned. If the check succeeds, the DryRunOperation error code is returned.

  • false (default): Sends a normal request. After the check succeeds, an HTTP 2xx status code is returned and the operation is performed.

Valid values:

  • true :

    true

  • false :

    false

false

ClientToken

string

No

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Note

If you do not specify this parameter, the system uses the RequestId of the API request as the ClientToken. The RequestId may be different for each API request.

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

Response elements

Element

Type

Description

Example

object

Schema of Response

RequestId

string

The request ID.

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

Examples

Success response

JSON format

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

Error codes

HTTP status code

Error code

Error message

Description

400 OperationDenied.ListenerNotFound The operation is not allowed because of ListenerNotFound. No running listeners are found for the ALB instance.
400 OperationDenied.CapacityReservationNotSupport Resource reservation is not supported. LCU reservation is not supported.
400 OperationDenied.CapacityUnitsBelowMinimum The operation is not allowed because of CapacityUnitsBelowMinimum. The specified number of LCUs is below the minimum requirement.
400 OperationDenied.CapacityDecreaseRequestLimitExceeded The operation is not allowed because of CapacityDecreaseRequestLimitExceeded. The limit for decreasing or canceling this reservation has been exceeded.
400 OperationDenied.PriorRequestNotComplete The operation is not allowed because of PriorRequestNotComplete. The last resource reservation request was not completed
400 OperationDenied.DeploymentSetExists The operation is not allowed because of OperationDenied.DeploymentSetExists. LCU reservations associated with deployment sets cannot be modified.
400 OperationDenied.DeploymentSetIsEmpty The operation is not allowed because of OperationDenied.DeploymentSetIsEmpty. The deployment set contains no ECS instances.
400 OperationDenied.DeploymentSetsConflicts The operation is not allowed because of OperationDenied.DeploymentSetsConflicts. The zones of the ECS instances in the deployment set conflict with the zones of the ALB instance.
400 OperationDenied.DeploymentSetsNotSupport The operation is not allowed because of OperationDenied.DeploymentSetsNotSupport. Deployment sets are not supported.
400 OperationDenied.DeploymentSetsStrategyNotMatch The operation is not allowed because of DeploymentSetsStrategyNotMatch. Deployment sets using strategies other than the low latency strategy are not supported.
400 QuotaExceeded.ReservationMaxLcuPerLb The quota of %s is exceeded, usage %s/%s. Quota for %s has been exceeded. Usage: %s/%s.
400 QuotaExceeded.ReservationMaxLcuPerRegion The quota of %s is exceeded, usage %s/%s. Quota for %s has been exceeded. Usage: %s/%s.
400 QuotaExceeded.DeploymentSetsNum The quota of %s is exceeded, usage %s/%s. Quota for %s has been exceeded. Usage: %s/%s.
400 OperationDenied.DeploymentSetsNotSharedToAlb DeploymentSets are not shared to alb. These deployment sets are not shared to the ALB.
404 ResourceNotFound.LoadBalancer The specified resource of %s is not found. The specified resource of %s is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.