stratosphere-0.2.1: EDSL for AWS CloudFormation

Safe HaskellNone
LanguageHaskell2010

Stratosphere.Resources.ScalingPolicy

Description

The AWS::AutoScaling::ScalingPolicy resource adds a scaling policy to an auto scaling group. A scaling policy specifies whether to scale the auto scaling group up or down, and by how much. For more information on scaling policies, see Scaling by Policy in the Auto Scaling Developer Guide. You can use a scaling policy together with an CloudWatch alarm. An CloudWatch alarm can automatically initiate actions on your behalf, based on parameters you specify. A scaling policy is one type of action that an alarm can initiate. For a snippet showing how to create an Auto Scaling policy that is triggered by an CloudWatch alarm, see Auto Scaling Policy Triggered by CloudWatch Alarm. This type supports updates. For more information about updating this resource, see PutScalingPolicy.

Synopsis

Documentation

data ScalingPolicy Source #

Full data type definition for ScalingPolicy. See scalingPolicy for a more convenient constructor.

Instances

Show ScalingPolicy Source # 
Generic ScalingPolicy Source # 

Associated Types

type Rep ScalingPolicy :: * -> * #

ToJSON ScalingPolicy Source # 
FromJSON ScalingPolicy Source # 
type Rep ScalingPolicy Source # 
type Rep ScalingPolicy = D1 (MetaData "ScalingPolicy" "Stratosphere.Resources.ScalingPolicy" "stratosphere-0.2.1-7UjeTxLOKRACY1vyFAxa7V" False) (C1 (MetaCons "ScalingPolicy" PrefixI True) ((:*:) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_scalingPolicyAdjustmentType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Val Text))) (S1 (MetaSel (Just Symbol "_scalingPolicyAutoScalingGroupName") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Val Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_scalingPolicyCooldown") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Text)))) (S1 (MetaSel (Just Symbol "_scalingPolicyEstimatedInstanceWarmup") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Integer')))))) ((:*:) ((:*:) (S1 (MetaSel (Just Symbol "_scalingPolicyMetricAggregationType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Text)))) (S1 (MetaSel (Just Symbol "_scalingPolicyMinAdjustmentMagnitude") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Integer'))))) ((:*:) (S1 (MetaSel (Just Symbol "_scalingPolicyPolicyType") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Text)))) ((:*:) (S1 (MetaSel (Just Symbol "_scalingPolicyScalingAdjustment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe (Val Integer')))) (S1 (MetaSel (Just Symbol "_scalingPolicyStepAdjustments") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe [StepAdjustments]))))))))

scalingPolicy Source #

Constructor for ScalingPolicy containing required fields as arguments.

spAdjustmentType :: Lens' ScalingPolicy (Val Text) Source #

Specifies whether the ScalingAdjustment is an absolute number or a percentage of the current capacity. Valid values are ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.

spAutoScalingGroupName :: Lens' ScalingPolicy (Val Text) Source #

The name or Amazon Resource Name (ARN) of the Auto Scaling Group that you want to attach the policy to.

spCooldown :: Lens' ScalingPolicy (Maybe (Val Text)) Source #

The amount of time, in seconds, after a scaling activity completes before any further trigger-related scaling activities can start. Do not specify this property if you are using the StepScaling policy type.

spEstimatedInstanceWarmup :: Lens' ScalingPolicy (Maybe (Val Integer')) Source #

The estimated time, in seconds, until a newly launched instance can send metrics to CloudWatch. By default, Auto Scaling uses the cooldown period, as specified in the Cooldown property. Do not specify this property if you are using the SimpleScaling policy type.

spMetricAggregationType :: Lens' ScalingPolicy (Maybe (Val Text)) Source #

The aggregation type for the CloudWatch metrics. You can specify Minimum, Maximum, or Average. By default, AWS CloudFormation specifies Average. Do not specify this property if you are using the SimpleScaling policy type.

spMinAdjustmentMagnitude :: Lens' ScalingPolicy (Maybe (Val Integer')) Source #

For the PercentChangeInCapacity adjustment type, the minimum number of instances to scale. The scaling policy changes the desired capacity of the Auto Scaling group by a minimum of this many instances. This property replaces the MinAdjustmentStep property.

spPolicyType :: Lens' ScalingPolicy (Maybe (Val Text)) Source #

An Auto Scaling policy type. You can specify SimpleScaling or StepScaling. By default, AWS CloudFormation specifies SimpleScaling. For more information, see Scaling Policy Types in the Auto Scaling User Guide.

spScalingAdjustment :: Lens' ScalingPolicy (Maybe (Val Integer')) Source #

The number of instances by which to scale. The AdjustmentType property determines whether AWS CloudFormation interprets this number as an absolute number (when the ExactCapacityvalue is specified) or as a percentage of the existing Auto Scaling group size (when the PercentChangeInCapacity value is specified). A positive value adds to the current capacity and a negative value subtracts from the current capacity.

spStepAdjustments :: Lens' ScalingPolicy (Maybe [StepAdjustments]) Source #

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