PutWarmPool

Updated at:

Configures a warm pool for a scaling group. If the scaling group does not have a warm pool, this operation creates one. If the scaling group already has a warm pool, this operation modifies the configuration of the warm pool.

Operation description

  • Warm pools are supported only for ECS scaling groups.

  • Warm pools are supported only when the reclaim mode of the scaling group is set to release or forcerelease.

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

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

ess:PutWarmPool

update

*ScalingGroup

acs:ess:{#regionId}:{#accountId}:scalinggroup/{#ScalingGroupId}

None None

Request parameters

Parameter

Type

Required

Description

Example

ScalingGroupId

string

Yes

The ID of the scaling group.

asg-bp1fo0dbtsbmqa9h****

ClientToken

string

No

Ensures the idempotence of the request. You can generate the parameter value on your client to ensure that the value is unique across different requests.

The value can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.

123e4567-e89b-12d3-a456-42665544****

RegionId

string

Yes

The region ID of the scaling group.

cn-hangzhou

CapacityOptions

object

No

The capacity options for the warm pool.

0

MinCapacity

integer

No

The minimum number of instances in the warm pool. The system always keeps at least this number of prepared instances in the warm pool to ensure that instances can be quickly added from the warm pool during scale-out.

Default value: 0.

Note

The value of MinCapacity must be less than or equal to the value of DesiredGroupPreparedCapacity.

0

DesiredGroupPreparedCapacity

integer

No

The expected number of instances covered by the warm pool. The system maintains the sum of the current number of instances in the scaling group and the number of instances in the warm pool at this value. The portion that exceeds the current number of instances in the scaling group is scaled out into the warm pool in advance. This allows quick scale-out from the warm pool when traffic peaks arrive, avoiding the wait time caused by creating instances on the fly.

Default value: the maximum number of instances in the scaling group, which is specified by MaxSize.

Note

The value of DesiredGroupPreparedCapacity must be less than or equal to the maximum number of instances in the scaling group, which is specified by MaxSize.

20

PoolState

string

No

The state of instances in the warm pool. Valid values:

  • Running: The instances are in the running state. This state allows faster scale-out, but you are charged for the full cost of the instances.

  • Stopped: The instances are in the stopped state (economical mode). You are charged only for resources such as cloud disks, elastic IP addresses (EIPs), and snapshots. However, instance startup may fail during scale-out due to insufficient inventory.

Default value: Stopped.

Running

InstanceReusePolicy

object

No

The instance reclaim policy.

ReuseOnScaleIn

boolean

No

Specifies whether instances are reclaimed to the warm pool when the scaling group scales in. Valid values:

  • true: Instances are reclaimed to the warm pool.

  • false: Instances are not reclaimed to the warm pool.

Default value: false.

true

Response elements

Element

Type

Description

Example

object

RequestId

string

The ID of the request.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3****

Examples

Success response

JSON format

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3****"
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.