File Coverage

blib/lib/Cfn/Resource/AWS/ApplicationAutoScaling/ScalingPolicy.pm
Criterion Covered Total %
statement 50 50 100.0
branch n/a
condition n/a
subroutine 18 18 100.0
pod 0 2 0.0
total 68 70 97.1


line stmt bran cond sub pod time code
1             # AWS::ApplicationAutoScaling::ScalingPolicy generated from spec 18.4.0
2 2     2   1478 use Moose::Util::TypeConstraints;
  2         6  
  2         26  
3              
4             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::ApplicationAutoScaling::ScalingPolicy {
9 2     2   4756 use Moose;
  2         7  
  2         20  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 4 [ ]
15             }
16             sub supported_regions {
17 1     1 0 1188 [ 'af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-southeast-1','ap-southeast-2','ca-central-1','cn-north-1','cn-northwest-1','eu-central-1','eu-north-1','eu-south-1','eu-west-1','eu-west-2','eu-west-3','me-south-1','sa-east-1','us-east-1','us-east-2','us-gov-east-1','us-gov-west-1','us-west-1','us-west-2' ]
18             }
19             }
20              
21              
22             subtype 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimension',
23             as 'Cfn::Value',
24             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
25             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
26              
27             coerce 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimension',
28             from 'HashRef',
29             via {
30             if (my $f = Cfn::TypeLibrary::try_function($_)) {
31             return $f
32             } else {
33             die 'Only accepts functions';
34             }
35             },
36             from 'ArrayRef',
37             via {
38             Cfn::Value::Array->new(Value => [
39             map {
40             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimension')->coerce($_)
41             } @$_
42             ]);
43             };
44              
45             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimension',
46             as 'Cfn::Value';
47              
48             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimension',
49             from 'HashRef',
50             via {
51             if (my $f = Cfn::TypeLibrary::try_function($_)) {
52             return $f
53             } else {
54             return Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimension->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimension {
59 2     2   16161 use Moose;
  2         6  
  2         10  
60 2     2   13139 use MooseX::StrictConstructor;
  2         6  
  2         21  
61             extends 'Cfn::Value::TypedValue';
62            
63             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64             has Value => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
65             }
66             subtype 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustment',
67             as 'Cfn::Value',
68             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
69             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
70              
71             coerce 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustment',
72             from 'HashRef',
73             via {
74             if (my $f = Cfn::TypeLibrary::try_function($_)) {
75             return $f
76             } else {
77             die 'Only accepts functions';
78             }
79             },
80             from 'ArrayRef',
81             via {
82             Cfn::Value::Array->new(Value => [
83             map {
84             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustment')->coerce($_)
85             } @$_
86             ]);
87             };
88              
89             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustment',
90             as 'Cfn::Value';
91              
92             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustment',
93             from 'HashRef',
94             via {
95             if (my $f = Cfn::TypeLibrary::try_function($_)) {
96             return $f
97             } else {
98             return Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustment->new( %$_ );
99             }
100             };
101              
102             package Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustment {
103 2     2   7801 use Moose;
  2         6  
  2         11  
104 2     2   13413 use MooseX::StrictConstructor;
  2         5  
  2         11  
105             extends 'Cfn::Value::TypedValue';
106            
107             has MetricIntervalLowerBound => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
108             has MetricIntervalUpperBound => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109             has ScalingAdjustment => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
110             }
111              
112             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::PredefinedMetricSpecification',
113             as 'Cfn::Value';
114              
115             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::PredefinedMetricSpecification',
116             from 'HashRef',
117             via {
118             if (my $f = Cfn::TypeLibrary::try_function($_)) {
119             return $f
120             } else {
121             return Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::PredefinedMetricSpecification->new( %$_ );
122             }
123             };
124              
125             package Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::PredefinedMetricSpecification {
126 2     2   7258 use Moose;
  2         14  
  2         15  
127 2     2   13251 use MooseX::StrictConstructor;
  2         6  
  2         12  
128             extends 'Cfn::Value::TypedValue';
129            
130             has PredefinedMetricType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
131             has ResourceLabel => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
132             }
133              
134             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::CustomizedMetricSpecification',
135             as 'Cfn::Value';
136              
137             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::CustomizedMetricSpecification',
138             from 'HashRef',
139             via {
140             if (my $f = Cfn::TypeLibrary::try_function($_)) {
141             return $f
142             } else {
143             return Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::CustomizedMetricSpecification->new( %$_ );
144             }
145             };
146              
147             package Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::CustomizedMetricSpecification {
148 2     2   6851 use Moose;
  2         8  
  2         11  
149 2     2   13174 use MooseX::StrictConstructor;
  2         6  
  2         11  
150             extends 'Cfn::Value::TypedValue';
151            
152             has Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
153             has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
154             has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
155             has Statistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
156             has Unit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
157             }
158              
159             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::TargetTrackingScalingPolicyConfiguration',
160             as 'Cfn::Value';
161              
162             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::TargetTrackingScalingPolicyConfiguration',
163             from 'HashRef',
164             via {
165             if (my $f = Cfn::TypeLibrary::try_function($_)) {
166             return $f
167             } else {
168             return Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::TargetTrackingScalingPolicyConfiguration->new( %$_ );
169             }
170             };
171              
172             package Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::TargetTrackingScalingPolicyConfiguration {
173 2     2   6937 use Moose;
  2         7  
  2         14  
174 2     2   13272 use MooseX::StrictConstructor;
  2         8  
  2         11  
175             extends 'Cfn::Value::TypedValue';
176            
177             has CustomizedMetricSpecification => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::CustomizedMetricSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
178             has DisableScaleIn => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
179             has PredefinedMetricSpecification => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::PredefinedMetricSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
180             has ScaleInCooldown => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
181             has ScaleOutCooldown => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
182             has TargetValue => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
183             }
184              
185             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepScalingPolicyConfiguration',
186             as 'Cfn::Value';
187              
188             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepScalingPolicyConfiguration',
189             from 'HashRef',
190             via {
191             if (my $f = Cfn::TypeLibrary::try_function($_)) {
192             return $f
193             } else {
194             return Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::StepScalingPolicyConfiguration->new( %$_ );
195             }
196             };
197              
198             package Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalingPolicy::StepScalingPolicyConfiguration {
199 2     2   6903 use Moose;
  2         9  
  2         16  
200 2     2   13149 use MooseX::StrictConstructor;
  2         11  
  2         12  
201             extends 'Cfn::Value::TypedValue';
202            
203             has AdjustmentType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
204             has Cooldown => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
205             has MetricAggregationType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
206             has MinAdjustmentMagnitude => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
207             has StepAdjustments => (isa => 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustment', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
208             }
209              
210             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy {
211 2     2   6605 use Moose;
  2         8  
  2         10  
212 2     2   13513 use MooseX::StrictConstructor;
  2         6  
  2         12  
213             extends 'Cfn::Resource::Properties';
214            
215             has PolicyName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
216             has PolicyType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
217             has ResourceId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
218             has ScalableDimension => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
219             has ScalingTargetId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
220             has ServiceNamespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
221             has StepScalingPolicyConfiguration => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepScalingPolicyConfiguration', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
222             has TargetTrackingScalingPolicyConfiguration => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::TargetTrackingScalingPolicyConfiguration', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
223             }
224              
225             1;
226             ### main pod documentation begin ###
227              
228             =encoding UTF-8
229              
230             =head1 NAME
231              
232             Cfn::Resource::AWS::ApplicationAutoScaling::ScalingPolicy - Cfn resource for AWS::ApplicationAutoScaling::ScalingPolicy
233              
234             =head1 DESCRIPTION
235              
236             This module implements a Perl module that represents the CloudFormation object AWS::ApplicationAutoScaling::ScalingPolicy.
237              
238             See L<Cfn> for more information on how to use it.
239              
240             =head1 AUTHOR
241              
242             Jose Luis Martinez
243             CAPSiDE
244             jlmartinez@capside.com
245              
246             =head1 COPYRIGHT and LICENSE
247              
248             Copyright (c) 2013 by CAPSiDE
249             This code is distributed under the Apache 2 License. The full text of the
250             license can be found in the LICENSE file included with this module.
251              
252             =cut