AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Creates or updates a warm pool for the specified Auto Scaling group. A warm pool is a pool of pre-initialized EC2 instances that sits alongside the Auto Scaling group. Whenever your application needs to scale out, the Auto Scaling group can draw on the warm pool to meet its new desired capacity. For more information and example configurations, see Warm pools for Amazon EC2 Auto Scaling in the Amazon EC2 Auto Scaling User Guide.

This operation must be called from the Region in which the Auto Scaling group was created. This operation cannot be called on an Auto Scaling group that has a mixed instances policy or a launch template or launch configuration that requests Spot Instances.

You can view the instances in the warm pool using the DescribeWarmPool API call. If you are no longer using a warm pool, you can delete it by calling the DeleteWarmPool API.

Note:

For .NET Core this operation is only available in asynchronous form. Please refer to PutWarmPoolAsync.

Namespace: Amazon.AutoScaling
Assembly: AWSSDK.AutoScaling.dll
Version: 3.x.y.z

Syntax

C#
public virtual PutWarmPoolResponse PutWarmPool(
         PutWarmPoolRequest request
)

Parameters

request
Type: Amazon.AutoScaling.Model.PutWarmPoolRequest

Container for the necessary parameters to execute the PutWarmPool service method.

Return Value


The response from the PutWarmPool service method, as returned by AutoScaling.

Exceptions

ExceptionCondition
LimitExceededException You have already reached a limit for your Amazon EC2 Auto Scaling resources (for example, Auto Scaling groups, launch configurations, or lifecycle hooks). For more information, see DescribeAccountLimits in the Amazon EC2 Auto Scaling API Reference.
ResourceContentionException You already have a pending update to an Amazon EC2 Auto Scaling resource (for example, an Auto Scaling group, instance, or load balancer).

Examples

This example creates a warm pool for the specified Auto Scaling group.

To create a warm pool for an Auto Scaling group


var client = new AmazonAutoScalingClient();
var response = client.PutWarmPool(new PutWarmPoolRequest 
{
    AutoScalingGroupName = "my-auto-scaling-group",
    InstanceReusePolicy = new InstanceReusePolicy { ReuseOnScaleIn = true },
    MinSize = 30,
    PoolState = "Hibernated"
});


            

Version Information

.NET Framework:
Supported in: 4.5, 4.0, 3.5

See Also