amazonka-autoscaling-1.2.0: Amazon Auto Scaling SDK.

Copyright(c) 2013-2015 Brendan Hay
LicenseMozilla Public License, v. 2.0.
MaintainerBrendan Hay <brendan.g.hay@gmail.com>
Stabilityauto-generated
Portabilitynon-portable (GHC extensions)
Safe HaskellNone
LanguageHaskell2010

Network.AWS.AutoScaling.PutScalingPolicy

Contents

Description

Creates or updates a policy for an Auto Scaling group. To update an existing policy, use the existing policy name and set the parameters you want to change. Any existing parameter not changed in an update to an existing policy is not changed in this update request.

If you exceed your maximum limit of step adjustments, which by default is 20 per region, the call fails. For information about updating this limit, see AWS Service Limits in the Amazon Web Services General Reference.

See: AWS API Reference for PutScalingPolicy.

Synopsis

Creating a Request

Request Lenses

pspEstimatedInstanceWarmup :: Lens' PutScalingPolicy (Maybe Int) Source

The estimated time, in seconds, until a newly launched instance can contribute to the CloudWatch metrics. The default is to use the value specified for the default cooldown period for the group.

This parameter is not supported if the policy type is SimpleScaling.

pspMinAdjustmentStep :: Lens' PutScalingPolicy (Maybe Int) Source

Available for backward compatibility. Use MinAdjustmentMagnitude instead.

pspPolicyType :: Lens' PutScalingPolicy (Maybe Text) Source

The policy type. Valid values are SimpleScaling and StepScaling. If the policy type is null, the value is treated as SimpleScaling.

pspStepAdjustments :: Lens' PutScalingPolicy [StepAdjustment] Source

A set of adjustments that enable you to scale based on the size of the alarm breach.

This parameter is required if the policy type is StepScaling and not supported otherwise.

pspScalingAdjustment :: Lens' PutScalingPolicy (Maybe Int) Source

The amount by which to scale, based on the specified adjustment type. A positive value adds to the current capacity while a negative number removes from the current capacity.

This parameter is required if the policy type is SimpleScaling and not supported otherwise.

pspCooldown :: Lens' PutScalingPolicy (Maybe Int) Source

The amount of time, in seconds, after a scaling activity completes and before the next scaling activity can start. If this parameter is not specified, the default cooldown period for the group applies.

This parameter is not supported unless the policy type is SimpleScaling.

For more information, see Understanding Auto Scaling Cooldowns in the Auto Scaling Developer Guide.

pspMetricAggregationType :: Lens' PutScalingPolicy (Maybe Text) Source

The aggregation type for the CloudWatch metrics. Valid values are Minimum, Maximum, and Average. If the aggregation type is null, the value is treated as Average.

This parameter is not supported if the policy type is SimpleScaling.

pspMinAdjustmentMagnitude :: Lens' PutScalingPolicy (Maybe Int) Source

The minimum number of instances to scale. If the value of AdjustmentType is PercentChangeInCapacity, the scaling policy changes the DesiredCapacity of the Auto Scaling group by at least this many instances. Otherwise, the error is ValidationError.

pspAutoScalingGroupName :: Lens' PutScalingPolicy Text Source

The name or ARN of the group.

pspPolicyName :: Lens' PutScalingPolicy Text Source

The name of the policy.

pspAdjustmentType :: Lens' PutScalingPolicy Text Source

The adjustment type. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

For more information, see Dynamic Scaling in the Auto Scaling Developer Guide.

Destructuring the Response

putScalingPolicyResponse Source

Creates a value of PutScalingPolicyResponse with the minimum fields required to make a request.

Use one of the following lenses to modify other fields as desired:

Response Lenses

psprsPolicyARN :: Lens' PutScalingPolicyResponse (Maybe Text) Source

The Amazon Resource Name (ARN) of the policy.