All Products
Search
Document Center

Server Load Balancer:ModifyCapacityReservation

Last Updated:Dec 03, 2025

Creates and updates a Load Balancer Capacity Unit (LCU) reservation.

Operation description

ModifyCapacityReservation is an asynchronous operation. After you send a request, the system returns a request ID and runs the task in the background. The LCU reservation is not immediately updated. You can call the DescribeCapacityReservation operation to query the status of an LCU reservation:

  • If an LCU reservation is in the Pending state, it is being created.

  • If an LCU reservation is in the Provisioned state, it is created.

  • If an LCU reservation is in the Rebalancing state, it is being rebalanced 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 ID of the Application Load Balancer (ALB) instance.

alb-iv9gj3spak6fbj****

ResetCapacityReservation

boolean

No

Specifies whether to cancel the LCU reservation. Valid values:

  • true: Cancels the LCU reservation.

  • false (default): Does not cancel the LCU reservation. You do not need to specify this parameter when creating or updating an LCU reservation.

false

MinimumLoadBalancerCapacity

object

No

The minimum LCU value to reserve.

CapacityUnits

integer

No

The number of LCUs to reserve per hour.

100

DryRun

boolean

No

Specifies whether to perform a dry run. Valid values:

  • true: Sends a check request but does not reserve any resources. The system checks the request for required parameters, format, and service limits. If the check fails, an error is returned. If the check passes, the DryRunOperation error code is returned.

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

Valid values:

  • true :

    true

  • false :

    false

false

ClientToken

string

No

A client token to ensure the idempotence of the request. Generate a token from your client and 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 this parameter is not specified, the system uses the RequestId as the ClientToken. The RequestId of each API request is different.

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

Response elements

Element

Type

Description

Example

object

The schema of the 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.

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.

The specified resource of %s is not found.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.