blib/lib/Paws/AutoScalingPlans.pm untested

filter: Statementstmt 0.0% 0 / 73 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 15 Podpod 0.0% 0 / 14 totaltotal 0.0% 0 / 110 CC 5 SCAR 16.4
CC
5
Cov
0%
DescribeAllScalingPlanResources
12.0
DescribeAllScalingPlans
12.0
service
2.0
CRAP 5.2
1 package Paws::AutoScalingPlans;
2 use Moose;
3 sub service { 'autoscaling-plans' }
4 sub signing_name { 'autoscaling-plans' }
5 sub version { '2018-01-06' }
6 sub target_prefix { 'AnyScaleScalingPlannerFrontendService' }
7 sub json_version { "1.1" }
8 has max_attempts => (is => 'ro', isa => 'Int', default => 5);
9 has retry => (is => 'ro', isa => 'HashRef', default => sub {
10 { base => 'rand', type => 'exponential', growth_factor => 2 }
11 });
12 has retriables => (is => 'ro', isa => 'ArrayRef', default => sub { [
13 ] });
14  
15 with 'Paws::API::Caller', 'Paws::API::EndpointResolver', 'Paws::Net::V4Signature', 'Paws::Net::JsonCaller';
16  
17
18 sub CreateScalingPlan {
19 my $self = shift;
20 my $call_object = $self->new_with_coercions('Paws::AutoScalingPlans::CreateScalingPlan', @_);
21 return $self->caller->do_call($self, $call_object);
22 }
23 sub DeleteScalingPlan {
24 my $self = shift;
25 my $call_object = $self->new_with_coercions('Paws::AutoScalingPlans::DeleteScalingPlan', @_);
26 return $self->caller->do_call($self, $call_object);
27 }
28 sub DescribeScalingPlanResources {
29 my $self = shift;
30 my $call_object = $self->new_with_coercions('Paws::AutoScalingPlans::DescribeScalingPlanResources', @_);
31 return $self->caller->do_call($self, $call_object);
32 }
33 sub DescribeScalingPlans {
34 my $self = shift;
35 my $call_object = $self->new_with_coercions('Paws::AutoScalingPlans::DescribeScalingPlans', @_);
36 return $self->caller->do_call($self, $call_object);
37 }
38 sub GetScalingPlanResourceForecastData {
39 my $self = shift;
40 my $call_object = $self->new_with_coercions('Paws::AutoScalingPlans::GetScalingPlanResourceForecastData', @_);
41 return $self->caller->do_call($self, $call_object);
42 }
43 sub UpdateScalingPlan {
44 my $self = shift;
45 my $call_object = $self->new_with_coercions('Paws::AutoScalingPlans::UpdateScalingPlan', @_);
46 return $self->caller->do_call($self, $call_object);
47 }
48
49 sub DescribeAllScalingPlanResources {
50 my $self = shift;
51  
52 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
53 my $result = $self->DescribeScalingPlanResources(@_);
54 my $next_result = $result;
55  
56 if (not defined $callback) {
57 while ($next_result->NextToken) {
58 $next_result = $self->DescribeScalingPlanResources(@_, NextToken => $next_result->NextToken);
59 push @{ $result->ScalingPlanResources }, @{ $next_result->ScalingPlanResources };
60 }
61 return $result;
62 } else {
63 while ($result->NextToken) {
64 $callback->($_ => 'ScalingPlanResources') foreach (@{ $result->ScalingPlanResources });
65 $result = $self->DescribeScalingPlanResources(@_, NextToken => $result->NextToken);
66 }
67 $callback->($_ => 'ScalingPlanResources') foreach (@{ $result->ScalingPlanResources });
68 }
69  
70 return undef
71 }
72 sub DescribeAllScalingPlans {
73 my $self = shift;
74  
75 my $callback = shift @_ if (ref($_[0]) eq 'CODE');
76 my $result = $self->DescribeScalingPlans(@_);
77 my $next_result = $result;
78  
79 if (not defined $callback) {
80 while ($next_result->NextToken) {
81 $next_result = $self->DescribeScalingPlans(@_, NextToken => $next_result->NextToken);
82 push @{ $result->ScalingPlans }, @{ $next_result->ScalingPlans };
83 }
84 return $result;
85 } else {
86 while ($result->NextToken) {
87 $callback->($_ => 'ScalingPlans') foreach (@{ $result->ScalingPlans });
88 $result = $self->DescribeScalingPlans(@_, NextToken => $result->NextToken);
89 }
90 $callback->($_ => 'ScalingPlans') foreach (@{ $result->ScalingPlans });
91 }
92  
93 return undef
94 }
95  
96  
97 sub operations { qw/CreateScalingPlan DeleteScalingPlan DescribeScalingPlanResources DescribeScalingPlans GetScalingPlanResourceForecastData UpdateScalingPlan / }
98  
99 1;
100  
101 ### main pod documentation begin ###
102  
103 =head1 NAME
104  
105 Paws::AutoScalingPlans - Perl Interface to AWS AWS Auto Scaling Plans
106  
107 =head1 SYNOPSIS
108  
109 use Paws;
110  
111 my $obj = Paws->service('AutoScalingPlans');
112 my $res = $obj->Method(
113 Arg1 => $val1,
114 Arg2 => [ 'V1', 'V2' ],
115 # if Arg3 is an object, the HashRef will be used as arguments to the constructor
116 # of the arguments type
117 Arg3 => { Att1 => 'Val1' },
118 # if Arg4 is an array of objects, the HashRefs will be passed as arguments to
119 # the constructor of the arguments type
120 Arg4 => [ { Att1 => 'Val1' }, { Att1 => 'Val2' } ],
121 );
122  
123 =head1 DESCRIPTION
124  
125 AWS Auto Scaling
126  
127 Use AWS Auto Scaling to create scaling plans for your applications to
128 automatically scale your scalable AWS resources.
129  
130 B<API Summary>
131  
132 You can use the AWS Auto Scaling service API to accomplish the
133 following tasks:
134  
135 =over
136  
137 =item *
138  
139 Create and manage scaling plans
140  
141 =item *
142  
143 Define target tracking scaling policies to dynamically scale your
144 resources based on utilization
145  
146 =item *
147  
148 Scale Amazon EC2 Auto Scaling groups using predictive scaling and
149 dynamic scaling to scale your Amazon EC2 capacity faster
150  
151 =item *
152  
153 Set minimum and maximum capacity limits
154  
155 =item *
156  
157 Retrieve information on existing scaling plans
158  
159 =item *
160  
161 Access current forecast data and historical forecast data for up to 56
162 days previous
163  
164 =back
165  
166 To learn more about AWS Auto Scaling, including information about
167 granting IAM users required permissions for AWS Auto Scaling actions,
168 see the AWS Auto Scaling User Guide
169 (https://docs.aws.amazon.com/autoscaling/plans/userguide/what-is-aws-auto-scaling.html).
170  
171 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/autoscaling-plans-2018-01-06>
172  
173  
174 =head1 METHODS
175  
176 =head2 CreateScalingPlan
177  
178 =over
179  
180 =item ApplicationSource => L<Paws::AutoScalingPlans::ApplicationSource>
181  
182 =item ScalingInstructions => ArrayRef[L<Paws::AutoScalingPlans::ScalingInstruction>]
183  
184 =item ScalingPlanName => Str
185  
186  
187 =back
188  
189 Each argument is described in detail in: L<Paws::AutoScalingPlans::CreateScalingPlan>
190  
191 Returns: a L<Paws::AutoScalingPlans::CreateScalingPlanResponse> instance
192  
193 Creates a scaling plan.
194  
195  
196 =head2 DeleteScalingPlan
197  
198 =over
199  
200 =item ScalingPlanName => Str
201  
202 =item ScalingPlanVersion => Int
203  
204  
205 =back
206  
207 Each argument is described in detail in: L<Paws::AutoScalingPlans::DeleteScalingPlan>
208  
209 Returns: a L<Paws::AutoScalingPlans::DeleteScalingPlanResponse> instance
210  
211 Deletes the specified scaling plan.
212  
213 Deleting a scaling plan deletes the underlying ScalingInstruction for
214 all of the scalable resources that are covered by the plan.
215  
216 If the plan has launched resources or has scaling activities in
217 progress, you must delete those resources separately.
218  
219  
220 =head2 DescribeScalingPlanResources
221  
222 =over
223  
224 =item ScalingPlanName => Str
225  
226 =item ScalingPlanVersion => Int
227  
228 =item [MaxResults => Int]
229  
230 =item [NextToken => Str]
231  
232  
233 =back
234  
235 Each argument is described in detail in: L<Paws::AutoScalingPlans::DescribeScalingPlanResources>
236  
237 Returns: a L<Paws::AutoScalingPlans::DescribeScalingPlanResourcesResponse> instance
238  
239 Describes the scalable resources in the specified scaling plan.
240  
241  
242 =head2 DescribeScalingPlans
243  
244 =over
245  
246 =item [ApplicationSources => ArrayRef[L<Paws::AutoScalingPlans::ApplicationSource>]]
247  
248 =item [MaxResults => Int]
249  
250 =item [NextToken => Str]
251  
252 =item [ScalingPlanNames => ArrayRef[Str|Undef]]
253  
254 =item [ScalingPlanVersion => Int]
255  
256  
257 =back
258  
259 Each argument is described in detail in: L<Paws::AutoScalingPlans::DescribeScalingPlans>
260  
261 Returns: a L<Paws::AutoScalingPlans::DescribeScalingPlansResponse> instance
262  
263 Describes one or more of your scaling plans.
264  
265  
266 =head2 GetScalingPlanResourceForecastData
267  
268 =over
269  
270 =item EndTime => Str
271  
272 =item ForecastDataType => Str
273  
274 =item ResourceId => Str
275  
276 =item ScalableDimension => Str
277  
278 =item ScalingPlanName => Str
279  
280 =item ScalingPlanVersion => Int
281  
282 =item ServiceNamespace => Str
283  
284 =item StartTime => Str
285  
286  
287 =back
288  
289 Each argument is described in detail in: L<Paws::AutoScalingPlans::GetScalingPlanResourceForecastData>
290  
291 Returns: a L<Paws::AutoScalingPlans::GetScalingPlanResourceForecastDataResponse> instance
292  
293 Retrieves the forecast data for a scalable resource.
294  
295 Capacity forecasts are represented as predicted values, or data points,
296 that are calculated using historical data points from a specified
297 CloudWatch load metric. Data points are available for up to 56 days.
298  
299  
300 =head2 UpdateScalingPlan
301  
302 =over
303  
304 =item ScalingPlanName => Str
305  
306 =item ScalingPlanVersion => Int
307  
308 =item [ApplicationSource => L<Paws::AutoScalingPlans::ApplicationSource>]
309  
310 =item [ScalingInstructions => ArrayRef[L<Paws::AutoScalingPlans::ScalingInstruction>]]
311  
312  
313 =back
314  
315 Each argument is described in detail in: L<Paws::AutoScalingPlans::UpdateScalingPlan>
316  
317 Returns: a L<Paws::AutoScalingPlans::UpdateScalingPlanResponse> instance
318  
319 Updates the specified scaling plan.
320  
321 You cannot update a scaling plan if it is in the process of being
322 created, updated, or deleted.
323  
324  
325  
326  
327 =head1 PAGINATORS
328  
329 Paginator methods are helpers that repetively call methods that return partial results
330  
331 =head2 DescribeAllScalingPlanResources(sub { },ScalingPlanName => Str, ScalingPlanVersion => Int, [MaxResults => Int, NextToken => Str])
332  
333 =head2 DescribeAllScalingPlanResources(ScalingPlanName => Str, ScalingPlanVersion => Int, [MaxResults => Int, NextToken => Str])
334  
335  
336 If passed a sub as first parameter, it will call the sub for each element found in :
337  
338 - ScalingPlanResources, passing the object as the first parameter, and the string 'ScalingPlanResources' as the second parameter
339  
340 If not, it will return a a L<Paws::AutoScalingPlans::DescribeScalingPlanResourcesResponse> 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.
341  
342  
343 =head2 DescribeAllScalingPlans(sub { },[ApplicationSources => ArrayRef[L<Paws::AutoScalingPlans::ApplicationSource>], MaxResults => Int, NextToken => Str, ScalingPlanNames => ArrayRef[Str|Undef], ScalingPlanVersion => Int])
344  
345 =head2 DescribeAllScalingPlans([ApplicationSources => ArrayRef[L<Paws::AutoScalingPlans::ApplicationSource>], MaxResults => Int, NextToken => Str, ScalingPlanNames => ArrayRef[Str|Undef], ScalingPlanVersion => Int])
346  
347  
348 If passed a sub as first parameter, it will call the sub for each element found in :
349  
350 - ScalingPlans, passing the object as the first parameter, and the string 'ScalingPlans' as the second parameter
351  
352 If not, it will return a a L<Paws::AutoScalingPlans::DescribeScalingPlansResponse> 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.
353  
354  
355  
356  
357  
358 =head1 SEE ALSO
359  
360 This service class forms part of L<Paws>
361  
362 =head1 BUGS and CONTRIBUTIONS
363  
364 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
365  
366 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
367  
368 =cut
369