File Coverage

blib/lib/Paws/ApplicationAutoScaling.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             package Paws::ApplicationAutoScaling;
2 1     1   5513 use Moose;
  1         5  
  1         15  
3             sub service { 'autoscaling' }
4             sub version { '2016-02-06' }
5             sub target_prefix { 'AnyScaleFrontendService' }
6             sub json_version { "1.1" }
7             has max_attempts => (is => 'ro', isa => 'Int', default => 5);
8             has retry => (is => 'ro', isa => 'HashRef', default => sub {
9             { base => 'rand', type => 'exponential', growth_factor => 2 }
10             });
11             has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
12             ] });
13              
14             with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller', 'Paws::Net::JsonResponse';
15              
16            
17             sub DeleteScalingPolicy {
18             my $self = shift;
19             my $call_object = $self->new_with_coercions('Paws::ApplicationAutoScaling::DeleteScalingPolicy', @_);
20             return $self->caller->do_call($self, $call_object);
21             }
22             sub DeregisterScalableTarget {
23             my $self = shift;
24             my $call_object = $self->new_with_coercions('Paws::ApplicationAutoScaling::DeregisterScalableTarget', @_);
25             return $self->caller->do_call($self, $call_object);
26             }
27             sub DescribeScalableTargets {
28             my $self = shift;
29             my $call_object = $self->new_with_coercions('Paws::ApplicationAutoScaling::DescribeScalableTargets', @_);
30             return $self->caller->do_call($self, $call_object);
31             }
32             sub DescribeScalingActivities {
33             my $self = shift;
34             my $call_object = $self->new_with_coercions('Paws::ApplicationAutoScaling::DescribeScalingActivities', @_);
35             return $self->caller->do_call($self, $call_object);
36             }
37             sub DescribeScalingPolicies {
38             my $self = shift;
39             my $call_object = $self->new_with_coercions('Paws::ApplicationAutoScaling::DescribeScalingPolicies', @_);
40             return $self->caller->do_call($self, $call_object);
41             }
42             sub PutScalingPolicy {
43             my $self = shift;
44             my $call_object = $self->new_with_coercions('Paws::ApplicationAutoScaling::PutScalingPolicy', @_);
45             return $self->caller->do_call($self, $call_object);
46             }
47             sub RegisterScalableTarget {
48             my $self = shift;
49             my $call_object = $self->new_with_coercions('Paws::ApplicationAutoScaling::RegisterScalableTarget', @_);
50             return $self->caller->do_call($self, $call_object);
51             }
52            
53             sub DescribeAllScalableTargets {
54             my $self = shift;
55              
56             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
57             my $result = $self->DescribeScalableTargets(@_);
58             my $next_result = $result;
59              
60             if (not defined $callback) {
61             while ($next_result->NextToken) {
62             $next_result = $self->DescribeScalableTargets(@_, NextToken => $next_result->NextToken);
63             push @{ $result->ScalableTargets }, @{ $next_result->ScalableTargets };
64             }
65             return $result;
66             } else {
67             while ($result->NextToken) {
68             $callback->($_ => 'ScalableTargets') foreach (@{ $result->ScalableTargets });
69             $result = $self->DescribeScalableTargets(@_, NextToken => $result->NextToken);
70             }
71             $callback->($_ => 'ScalableTargets') foreach (@{ $result->ScalableTargets });
72             }
73              
74             return undef
75             }
76             sub DescribeAllScalingActivities {
77             my $self = shift;
78              
79             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
80             my $result = $self->DescribeScalingActivities(@_);
81             my $next_result = $result;
82              
83             if (not defined $callback) {
84             while ($next_result->NextToken) {
85             $next_result = $self->DescribeScalingActivities(@_, NextToken => $next_result->NextToken);
86             push @{ $result->ScalingActivities }, @{ $next_result->ScalingActivities };
87             }
88             return $result;
89             } else {
90             while ($result->NextToken) {
91             $callback->($_ => 'ScalingActivities') foreach (@{ $result->ScalingActivities });
92             $result = $self->DescribeScalingActivities(@_, NextToken => $result->NextToken);
93             }
94             $callback->($_ => 'ScalingActivities') foreach (@{ $result->ScalingActivities });
95             }
96              
97             return undef
98             }
99             sub DescribeAllScalingPolicies {
100             my $self = shift;
101              
102             my $callback = shift @_ if (ref($_[0]) eq 'CODE');
103             my $result = $self->DescribeScalingPolicies(@_);
104             my $next_result = $result;
105              
106             if (not defined $callback) {
107             while ($next_result->NextToken) {
108             $next_result = $self->DescribeScalingPolicies(@_, NextToken => $next_result->NextToken);
109             push @{ $result->ScalingPolicies }, @{ $next_result->ScalingPolicies };
110             }
111             return $result;
112             } else {
113             while ($result->NextToken) {
114             $callback->($_ => 'ScalingPolicies') foreach (@{ $result->ScalingPolicies });
115             $result = $self->DescribeScalingPolicies(@_, NextToken => $result->NextToken);
116             }
117             $callback->($_ => 'ScalingPolicies') foreach (@{ $result->ScalingPolicies });
118             }
119              
120             return undef
121             }
122              
123              
124             sub operations { qw/DeleteScalingPolicy DeregisterScalableTarget DescribeScalableTargets DescribeScalingActivities DescribeScalingPolicies PutScalingPolicy RegisterScalableTarget / }
125              
126             1;
127              
128             ### main pod documentation begin ###
129              
130             =head1 NAME
131              
132             Paws::ApplicationAutoScaling - Perl Interface to AWS Application Auto Scaling
133              
134             =head1 SYNOPSIS
135              
136             use Paws;
137              
138             my $obj = Paws->service('ApplicationAutoScaling');
139             my $res = $obj->Method(
140             Arg1 => $val1,
141             Arg2 => [ 'V1', 'V2' ],
142             # if Arg3 is an object, the HashRef will be used as arguments to the constructor
143             # of the arguments type
144             Arg3 => { Att1 => 'Val1' },
145             # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
146             # the constructor of the arguments type
147             Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
148             );
149              
150             =head1 DESCRIPTION
151              
152             With Application Auto Scaling, you can automatically scale your AWS
153             resources. The experience similar to that of Auto Scaling. You can use
154             Application Auto Scaling to accomplish the following tasks:
155              
156             =over
157              
158             =item *
159              
160             Define scaling policies to automatically scale your AWS resources
161              
162             =item *
163              
164             Scale your resources in response to CloudWatch alarms
165              
166             =item *
167              
168             View the history of your scaling events
169              
170             =back
171              
172             Application Auto Scaling can scale the following AWS resources:
173              
174             =over
175              
176             =item *
177              
178             Amazon ECS services. For more information, see Service Auto Scaling in
179             the I<Amazon EC2 Container Service Developer Guide>.
180              
181             =item *
182              
183             Amazon EC2 Spot fleets. For more information, see Automatic Scaling for
184             Spot Fleet in the I<Amazon EC2 User Guide>.
185              
186             =item *
187              
188             Amazon EMR clusters. For more information, see Using Automatic Scaling
189             in Amazon EMR in the I<Amazon EMR Management Guide>.
190              
191             =item *
192              
193             AppStream 2.0 fleets. For more information, see Fleet Auto Scaling for
194             Amazon AppStream 2.0 in the I<Amazon AppStream 2.0 Developer Guide>.
195              
196             =item *
197              
198             Provisioned read and write capacity for Amazon DynamoDB tables and
199             global secondary indexes. For more information, see Auto Scaling for
200             DynamoDB in the I<Amazon DynamoDB Developer Guide>.
201              
202             =back
203              
204             For a list of supported regions, see AWS Regions and Endpoints:
205             Application Auto Scaling in the I<AWS General Reference>.
206              
207             =head1 METHODS
208              
209             =head2 DeleteScalingPolicy(PolicyName => Str, ResourceId => Str, ScalableDimension => Str, ServiceNamespace => Str)
210              
211             Each argument is described in detail in: L<Paws::ApplicationAutoScaling::DeleteScalingPolicy>
212              
213             Returns: a L<Paws::ApplicationAutoScaling::DeleteScalingPolicyResponse> instance
214              
215             Deletes the specified Application Auto Scaling scaling policy.
216              
217             Deleting a policy deletes the underlying alarm action, but does not
218             delete the CloudWatch alarm associated with the scaling policy, even if
219             it no longer has an associated action.
220              
221             To create a scaling policy or update an existing one, see
222             PutScalingPolicy.
223              
224              
225             =head2 DeregisterScalableTarget(ResourceId => Str, ScalableDimension => Str, ServiceNamespace => Str)
226              
227             Each argument is described in detail in: L<Paws::ApplicationAutoScaling::DeregisterScalableTarget>
228              
229             Returns: a L<Paws::ApplicationAutoScaling::DeregisterScalableTargetResponse> instance
230              
231             Deregisters a scalable target.
232              
233             Deregistering a scalable target deletes the scaling policies that are
234             associated with it.
235              
236             To create a scalable target or update an existing one, see
237             RegisterScalableTarget.
238              
239              
240             =head2 DescribeScalableTargets(ServiceNamespace => Str, [MaxResults => Int, NextToken => Str, ResourceIds => ArrayRef[Str|Undef], ScalableDimension => Str])
241              
242             Each argument is described in detail in: L<Paws::ApplicationAutoScaling::DescribeScalableTargets>
243              
244             Returns: a L<Paws::ApplicationAutoScaling::DescribeScalableTargetsResponse> instance
245              
246             Provides descriptive information about the scalable targets in the
247             specified namespace.
248              
249             You can filter the results using the C<ResourceIds> and
250             C<ScalableDimension> parameters.
251              
252             To create a scalable target or update an existing one, see
253             RegisterScalableTarget. If you are no longer using a scalable target,
254             you can deregister it using DeregisterScalableTarget.
255              
256              
257             =head2 DescribeScalingActivities(ServiceNamespace => Str, [MaxResults => Int, NextToken => Str, ResourceId => Str, ScalableDimension => Str])
258              
259             Each argument is described in detail in: L<Paws::ApplicationAutoScaling::DescribeScalingActivities>
260              
261             Returns: a L<Paws::ApplicationAutoScaling::DescribeScalingActivitiesResponse> instance
262              
263             Provides descriptive information about the scaling activities in the
264             specified namespace from the previous six weeks.
265              
266             You can filter the results using the C<ResourceId> and
267             C<ScalableDimension> parameters.
268              
269             Scaling activities are triggered by CloudWatch alarms that are
270             associated with scaling policies. To view the scaling policies for a
271             service namespace, see DescribeScalingPolicies. To create a scaling
272             policy or update an existing one, see PutScalingPolicy.
273              
274              
275             =head2 DescribeScalingPolicies(ServiceNamespace => Str, [MaxResults => Int, NextToken => Str, PolicyNames => ArrayRef[Str|Undef], ResourceId => Str, ScalableDimension => Str])
276              
277             Each argument is described in detail in: L<Paws::ApplicationAutoScaling::DescribeScalingPolicies>
278              
279             Returns: a L<Paws::ApplicationAutoScaling::DescribeScalingPoliciesResponse> instance
280              
281             Provides descriptive information about the scaling policies in the
282             specified namespace.
283              
284             You can filter the results using the C<ResourceId>,
285             C<ScalableDimension>, and C<PolicyNames> parameters.
286              
287             To create a scaling policy or update an existing one, see
288             PutScalingPolicy. If you are no longer using a scaling policy, you can
289             delete it using DeleteScalingPolicy.
290              
291              
292             =head2 PutScalingPolicy(PolicyName => Str, ResourceId => Str, ScalableDimension => Str, ServiceNamespace => Str, [PolicyType => Str, StepScalingPolicyConfiguration => L<Paws::ApplicationAutoScaling::StepScalingPolicyConfiguration>, TargetTrackingScalingPolicyConfiguration => L<Paws::ApplicationAutoScaling::TargetTrackingScalingPolicyConfiguration>])
293              
294             Each argument is described in detail in: L<Paws::ApplicationAutoScaling::PutScalingPolicy>
295              
296             Returns: a L<Paws::ApplicationAutoScaling::PutScalingPolicyResponse> instance
297              
298             Creates or updates a policy for an Application Auto Scaling scalable
299             target.
300              
301             Each scalable target is identified by a service namespace, resource ID,
302             and scalable dimension. A scaling policy applies to the scalable target
303             identified by those three attributes. You cannot create a scaling
304             policy without first registering a scalable target using
305             RegisterScalableTarget.
306              
307             To update a policy, specify its policy name and the parameters that you
308             want to change. Any parameters that you don't specify are not changed
309             by this update request.
310              
311             You can view the scaling policies for a service namespace using
312             DescribeScalingPolicies. If you are no longer using a scaling policy,
313             you can delete it using DeleteScalingPolicy.
314              
315              
316             =head2 RegisterScalableTarget(ResourceId => Str, ScalableDimension => Str, ServiceNamespace => Str, [MaxCapacity => Int, MinCapacity => Int, RoleARN => Str])
317              
318             Each argument is described in detail in: L<Paws::ApplicationAutoScaling::RegisterScalableTarget>
319              
320             Returns: a L<Paws::ApplicationAutoScaling::RegisterScalableTargetResponse> instance
321              
322             Registers or updates a scalable target. A scalable target is a resource
323             that Application Auto Scaling can scale out or scale in. After you have
324             registered a scalable target, you can use this operation to update the
325             minimum and maximum values for your scalable dimension.
326              
327             After you register a scalable target, you can create and apply scaling
328             policies using PutScalingPolicy. You can view the scaling policies for
329             a service namespace using DescribeScalableTargets. If you are no longer
330             using a scalable target, you can deregister it using
331             DeregisterScalableTarget.
332              
333              
334              
335              
336             =head1 PAGINATORS
337              
338             Paginator methods are helpers that repetively call methods that return partial results
339              
340             =head2 DescribeAllScalableTargets(sub { },ServiceNamespace => Str, [MaxResults => Int, NextToken => Str, ResourceIds => ArrayRef[Str|Undef], ScalableDimension => Str])
341              
342             =head2 DescribeAllScalableTargets(ServiceNamespace => Str, [MaxResults => Int, NextToken => Str, ResourceIds => ArrayRef[Str|Undef], ScalableDimension => Str])
343              
344              
345             If passed a sub as first parameter, it will call the sub for each element found in :
346              
347             - ScalableTargets, passing the object as the first parameter, and the string 'ScalableTargets' as the second parameter
348              
349             If not, it will return a a L<Paws::ApplicationAutoScaling::DescribeScalableTargetsResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
350              
351              
352             =head2 DescribeAllScalingActivities(sub { },ServiceNamespace => Str, [MaxResults => Int, NextToken => Str, ResourceId => Str, ScalableDimension => Str])
353              
354             =head2 DescribeAllScalingActivities(ServiceNamespace => Str, [MaxResults => Int, NextToken => Str, ResourceId => Str, ScalableDimension => Str])
355              
356              
357             If passed a sub as first parameter, it will call the sub for each element found in :
358              
359             - ScalingActivities, passing the object as the first parameter, and the string 'ScalingActivities' as the second parameter
360              
361             If not, it will return a a L<Paws::ApplicationAutoScaling::DescribeScalingActivitiesResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
362              
363              
364             =head2 DescribeAllScalingPolicies(sub { },ServiceNamespace => Str, [MaxResults => Int, NextToken => Str, PolicyNames => ArrayRef[Str|Undef], ResourceId => Str, ScalableDimension => Str])
365              
366             =head2 DescribeAllScalingPolicies(ServiceNamespace => Str, [MaxResults => Int, NextToken => Str, PolicyNames => ArrayRef[Str|Undef], ResourceId => Str, ScalableDimension => Str])
367              
368              
369             If passed a sub as first parameter, it will call the sub for each element found in :
370              
371             - ScalingPolicies, passing the object as the first parameter, and the string 'ScalingPolicies' as the second parameter
372              
373             If not, it will return a a L<Paws::ApplicationAutoScaling::DescribeScalingPoliciesResponse> instance with all the C<param>s; from all the responses. Please take into account that this mode can potentially consume vasts ammounts of memory.
374              
375              
376              
377              
378              
379             =head1 SEE ALSO
380              
381             This service class forms part of L<Paws>
382              
383             =head1 BUGS and CONTRIBUTIONS
384              
385             The source code is located here: https://github.com/pplu/aws-sdk-perl
386              
387             Please report bugs to: https://github.com/pplu/aws-sdk-perl/issues
388              
389             =cut
390