Copyright | (c) 2013-2016 Brendan Hay |
---|---|
License | Mozilla Public License, v. 2.0. |
Maintainer | Brendan Hay <brendan.g.hay@gmail.com> |
Stability | auto-generated |
Portability | non-portable (GHC extensions) |
Safe Haskell | None |
Language | Haskell2010 |
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.
- putScalingPolicy :: Text -> Text -> Text -> PutScalingPolicy
- data PutScalingPolicy
- pspMinAdjustmentStep :: Lens' PutScalingPolicy (Maybe Int)
- pspEstimatedInstanceWarmup :: Lens' PutScalingPolicy (Maybe Int)
- pspPolicyType :: Lens' PutScalingPolicy (Maybe Text)
- pspStepAdjustments :: Lens' PutScalingPolicy [StepAdjustment]
- pspScalingAdjustment :: Lens' PutScalingPolicy (Maybe Int)
- pspCooldown :: Lens' PutScalingPolicy (Maybe Int)
- pspMetricAggregationType :: Lens' PutScalingPolicy (Maybe Text)
- pspMinAdjustmentMagnitude :: Lens' PutScalingPolicy (Maybe Int)
- pspAutoScalingGroupName :: Lens' PutScalingPolicy Text
- pspPolicyName :: Lens' PutScalingPolicy Text
- pspAdjustmentType :: Lens' PutScalingPolicy Text
- putScalingPolicyResponse :: Int -> PutScalingPolicyResponse
- data PutScalingPolicyResponse
- psprsPolicyARN :: Lens' PutScalingPolicyResponse (Maybe Text)
- psprsResponseStatus :: Lens' PutScalingPolicyResponse Int
Creating a Request
Creates a value of PutScalingPolicy
with the minimum fields required to make a request.
Use one of the following lenses to modify other fields as desired:
data PutScalingPolicy Source #
Contains the parameters for PutScalingPolicy.
See: putScalingPolicy
smart constructor.
Request Lenses
pspMinAdjustmentStep :: Lens' PutScalingPolicy (Maybe Int) Source #
Available for backward compatibility. Use MinAdjustmentMagnitude
instead.
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
.
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 Auto Scaling Cooldowns in the Auto Scaling User 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 User 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:
data PutScalingPolicyResponse Source #
Contains the output of PutScalingPolicy.
See: putScalingPolicyResponse
smart constructor.
Response Lenses
psprsPolicyARN :: Lens' PutScalingPolicyResponse (Maybe Text) Source #
The Amazon Resource Name (ARN) of the policy.
psprsResponseStatus :: Lens' PutScalingPolicyResponse Int Source #
The response status code.