NAME

Paws::AutoScaling::PutScalingPolicy - Arguments for method PutScalingPolicy on Paws::AutoScaling

DESCRIPTION

This class represents the parameters used for calling the method PutScalingPolicy on the Auto Scaling service. Use the attributes of this class as arguments to method PutScalingPolicy.

You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutScalingPolicy.

SYNOPSIS

 my $autoscaling = Paws->service('AutoScaling');
# To add a scaling policy to an Auto Scaling group
# This example adds the specified policy to the specified Auto Scaling group.
 my $PolicyARNType = $autoscaling->PutScalingPolicy(
   'AdjustmentType'       => 'ChangeInCapacity',
   'AutoScalingGroupName' => 'my-auto-scaling-group',
   'PolicyName'           => 'ScaleIn',
   'ScalingAdjustment'    => -1
 );

 # Results:
 my $PolicyARN = $PolicyARNType->PolicyARN;

 # Returns a L<Paws::AutoScaling::PolicyARNType> object.

Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object. For the AWS API documentation, see https://docs.aws.amazon.com/goto/WebAPI/autoscaling/PutScalingPolicy

ATTRIBUTES

AdjustmentType => Str

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

Valid only if the policy type is StepScaling or SimpleScaling. For more information, see Scaling Adjustment Types (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-scaling-simple-step.html#as-scaling-adjustment) in the Amazon EC2 Auto Scaling User Guide.

REQUIRED AutoScalingGroupName => Str

The name of the Auto Scaling group.

Cooldown => Int

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

Valid only if the policy type is SimpleScaling. For more information, see Scaling Cooldowns (https://docs.aws.amazon.com/autoscaling/ec2/userguide/Cooldown.html) in the Amazon EC2 Auto Scaling User Guide.

Enabled => Bool

Indicates whether the scaling policy is enabled or disabled. The default is enabled. For more information, see Disabling a Scaling Policy for an Auto Scaling Group (https://docs.aws.amazon.com/autoscaling/ec2/userguide/as-enable-disable-scaling-policy.html) in the Amazon EC2 Auto Scaling User Guide.

EstimatedInstanceWarmup => Int

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.

Valid only if the policy type is StepScaling or TargetTrackingScaling.

MetricAggregationType => Str

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

Valid only if the policy type is StepScaling.

MinAdjustmentMagnitude => Int

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.

This property replaces the MinAdjustmentStep property. For example, suppose that you create a step scaling policy to scale out an Auto Scaling group by 25 percent and you specify a MinAdjustmentMagnitude of 2. If the group has 4 instances and the scaling policy is performed, 25 percent of 4 is 1. However, because you specified a MinAdjustmentMagnitude of 2, Amazon EC2 Auto Scaling scales out the group by 2 instances.

Valid only if the policy type is SimpleScaling or StepScaling.

MinAdjustmentStep => Int

Available for backward compatibility. Use MinAdjustmentMagnitude instead.

REQUIRED PolicyName => Str

The name of the policy.

PolicyType => Str

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

ScalingAdjustment => Int

The amount by which a simple scaling policy scales the Auto Scaling group in response to an alarm breach. The adjustment is based on the value that you specified in the AdjustmentType parameter (either an absolute number or a percentage). A positive value adds to the current capacity and a negative value subtracts from the current capacity. For exact capacity, you must specify a positive value.

Conditional: If you specify SimpleScaling for the policy type, you must specify this parameter. (Not used with any other policy type.)

StepAdjustments => ArrayRef[Paws::AutoScaling::StepAdjustment]

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

Conditional: If you specify StepScaling for the policy type, you must specify this parameter. (Not used with any other policy type.)

TargetTrackingConfiguration => Paws::AutoScaling::TargetTrackingConfiguration

A target tracking scaling policy. Includes support for predefined or customized metrics.

For more information, see TargetTrackingConfiguration (https://docs.aws.amazon.com/autoscaling/ec2/APIReference/API_TargetTrackingConfiguration.html) in the Amazon EC2 Auto Scaling API Reference.

Conditional: If you specify TargetTrackingScaling for the policy type, you must specify this parameter. (Not used with any other policy type.)

SEE ALSO

This class forms part of Paws, documenting arguments for method PutScalingPolicy in Paws::AutoScaling

BUGS and CONTRIBUTIONS

The source code is located here: https://github.com/pplu/aws-sdk-perl

Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues