File Coverage

blib/lib/Paws/AutoScaling/PutScalingPolicy.pm
Criterion Covered Total %
statement 6 6 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod n/a
total 8 8 100.0


line stmt bran cond sub pod time code
1              
2             package Paws::AutoScaling::PutScalingPolicy;
3 1     1   482 use Moose;
  1         3  
  1         7  
4             has AdjustmentType => (is => 'ro', isa => 'Str', required => 1);
5             has AutoScalingGroupName => (is => 'ro', isa => 'Str', required => 1);
6             has Cooldown => (is => 'ro', isa => 'Int');
7             has EstimatedInstanceWarmup => (is => 'ro', isa => 'Int');
8             has MetricAggregationType => (is => 'ro', isa => 'Str');
9             has MinAdjustmentMagnitude => (is => 'ro', isa => 'Int');
10             has MinAdjustmentStep => (is => 'ro', isa => 'Int');
11             has PolicyName => (is => 'ro', isa => 'Str', required => 1);
12             has PolicyType => (is => 'ro', isa => 'Str');
13             has ScalingAdjustment => (is => 'ro', isa => 'Int');
14             has StepAdjustments => (is => 'ro', isa => 'ArrayRef[Paws::AutoScaling::StepAdjustment]');
15              
16 1     1   6117 use MooseX::ClassAttribute;
  1         3  
  1         9  
17              
18             class_has _api_call => (isa => 'Str', is => 'ro', default => 'PutScalingPolicy');
19             class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::AutoScaling::PolicyARNType');
20             class_has _result_key => (isa => 'Str', is => 'ro', default => 'PutScalingPolicyResult');
21             1;
22              
23             ### main pod documentation begin ###
24              
25             =head1 NAME
26              
27             Paws::AutoScaling::PutScalingPolicy - Arguments for method PutScalingPolicy on Paws::AutoScaling
28              
29             =head1 DESCRIPTION
30              
31             This class represents the parameters used for calling the method PutScalingPolicy on the
32             Auto Scaling service. Use the attributes of this class
33             as arguments to method PutScalingPolicy.
34              
35             You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to PutScalingPolicy.
36              
37             As an example:
38              
39             $service_obj->PutScalingPolicy(Att1 => $value1, Att2 => $value2, ...);
40              
41             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.
42              
43             =head1 ATTRIBUTES
44              
45              
46             =head2 B<REQUIRED> AdjustmentType => Str
47              
48             The adjustment type. Valid values are C<ChangeInCapacity>,
49             C<ExactCapacity>, and C<PercentChangeInCapacity>.
50              
51             For more information, see Dynamic Scaling in the I<Auto Scaling User
52             Guide>.
53              
54              
55              
56             =head2 B<REQUIRED> AutoScalingGroupName => Str
57              
58             The name or ARN of the group.
59              
60              
61              
62             =head2 Cooldown => Int
63              
64             The amount of time, in seconds, after a scaling activity completes and
65             before the next scaling activity can start. If this parameter is not
66             specified, the default cooldown period for the group applies.
67              
68             This parameter is not supported unless the policy type is
69             C<SimpleScaling>.
70              
71             For more information, see Auto Scaling Cooldowns in the I<Auto Scaling
72             User Guide>.
73              
74              
75              
76             =head2 EstimatedInstanceWarmup => Int
77              
78             The estimated time, in seconds, until a newly launched instance can
79             contribute to the CloudWatch metrics. The default is to use the value
80             specified for the default cooldown period for the group.
81              
82             This parameter is not supported if the policy type is C<SimpleScaling>.
83              
84              
85              
86             =head2 MetricAggregationType => Str
87              
88             The aggregation type for the CloudWatch metrics. Valid values are
89             C<Minimum>, C<Maximum>, and C<Average>. If the aggregation type is
90             null, the value is treated as C<Average>.
91              
92             This parameter is not supported if the policy type is C<SimpleScaling>.
93              
94              
95              
96             =head2 MinAdjustmentMagnitude => Int
97              
98             The minimum number of instances to scale. If the value of
99             C<AdjustmentType> is C<PercentChangeInCapacity>, the scaling policy
100             changes the C<DesiredCapacity> of the Auto Scaling group by at least
101             this many instances. Otherwise, the error is C<ValidationError>.
102              
103              
104              
105             =head2 MinAdjustmentStep => Int
106              
107             Available for backward compatibility. Use C<MinAdjustmentMagnitude>
108             instead.
109              
110              
111              
112             =head2 B<REQUIRED> PolicyName => Str
113              
114             The name of the policy.
115              
116              
117              
118             =head2 PolicyType => Str
119              
120             The policy type. Valid values are C<SimpleScaling> and C<StepScaling>.
121             If the policy type is null, the value is treated as C<SimpleScaling>.
122              
123              
124              
125             =head2 ScalingAdjustment => Int
126              
127             The amount by which to scale, based on the specified adjustment type. A
128             positive value adds to the current capacity while a negative number
129             removes from the current capacity.
130              
131             This parameter is required if the policy type is C<SimpleScaling> and
132             not supported otherwise.
133              
134              
135              
136             =head2 StepAdjustments => ArrayRef[L<Paws::AutoScaling::StepAdjustment>]
137              
138             A set of adjustments that enable you to scale based on the size of the
139             alarm breach.
140              
141             This parameter is required if the policy type is C<StepScaling> and not
142             supported otherwise.
143              
144              
145              
146              
147             =head1 SEE ALSO
148              
149             This class forms part of L<Paws>, documenting arguments for method PutScalingPolicy in L<Paws::AutoScaling>
150              
151             =head1 BUGS and CONTRIBUTIONS
152              
153             The source code is located here: https://github.com/pplu/aws-sdk-perl
154              
155             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
156              
157             =cut
158