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 5.3.0
2 2     2   1534 use Moose::Util::TypeConstraints;
  2         7  
  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   4719 use Moose;
  2         7  
  2         22  
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 1150 [ '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-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::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimensionValue->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::MetricDimensionValue {
59 2     2   16438 use Moose;
  2         5  
  2         14  
60 2     2   15066 use MooseX::StrictConstructor;
  2         7  
  2         23  
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::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustmentValue->new( %$_ );
99             }
100             };
101              
102             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepAdjustmentValue {
103 2     2   8769 use Moose;
  2         5  
  2         15  
104 2     2   15660 use MooseX::StrictConstructor;
  2         7  
  2         16  
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::AWS::ApplicationAutoScaling::ScalingPolicy::PredefinedMetricSpecificationValue->new( %$_ );
122             }
123             };
124              
125             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::PredefinedMetricSpecificationValue {
126 2     2   8025 use Moose;
  2         7  
  2         14  
127 2     2   15189 use MooseX::StrictConstructor;
  2         6  
  2         15  
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::AWS::ApplicationAutoScaling::ScalingPolicy::CustomizedMetricSpecificationValue->new( %$_ );
144             }
145             };
146              
147             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::CustomizedMetricSpecificationValue {
148 2     2   8045 use Moose;
  2         7  
  2         12  
149 2     2   14151 use MooseX::StrictConstructor;
  2         7  
  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::AWS::ApplicationAutoScaling::ScalingPolicy::TargetTrackingScalingPolicyConfigurationValue->new( %$_ );
169             }
170             };
171              
172             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::TargetTrackingScalingPolicyConfigurationValue {
173 2     2   7622 use Moose;
  2         6  
  2         15  
174 2     2   15124 use MooseX::StrictConstructor;
  2         8  
  2         14  
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::AWS::ApplicationAutoScaling::ScalingPolicy::StepScalingPolicyConfigurationValue->new( %$_ );
195             }
196             };
197              
198             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalingPolicy::StepScalingPolicyConfigurationValue {
199 2     2   8277 use Moose;
  2         6  
  2         15  
200 2     2   14862 use MooseX::StrictConstructor;
  2         6  
  2         15  
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   7906 use Moose;
  2         7  
  2         12  
212 2     2   14213 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;