File Coverage

blib/lib/Cfn/Resource/AWS/AutoScaling/ScalingPolicy.pm
Criterion Covered Total %
statement 44 44 100.0
branch n/a
condition n/a
subroutine 16 16 100.0
pod 0 2 0.0
total 60 62 96.7


line stmt bran cond sub pod time code
1             # AWS::AutoScaling::ScalingPolicy generated from spec 5.3.0
2 5     5   3351 use Moose::Util::TypeConstraints;
  5         15  
  5         54  
3              
4             coerce 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::AutoScaling::ScalingPolicy {
9 5     5   10320 use Moose;
  5         11  
  5         36  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 4 [ ]
15             }
16             sub supported_regions {
17 1     1 0 1146 [ '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::AutoScaling::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::AutoScaling::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::AutoScaling::ScalingPolicy::MetricDimension')->coerce($_)
41             } @$_
42             ]);
43             };
44              
45             subtype 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::MetricDimension',
46             as 'Cfn::Value';
47              
48             coerce 'Cfn::Resource::Properties::AWS::AutoScaling::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::AutoScaling::ScalingPolicy::MetricDimensionValue->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::MetricDimensionValue {
59 5     5   34161 use Moose;
  5         12  
  5         28  
60 5     5   29125 use MooseX::StrictConstructor;
  5         15  
  5         46  
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              
67             subtype 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecification',
68             as 'Cfn::Value';
69              
70             coerce 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecification',
71             from 'HashRef',
72             via {
73             if (my $f = Cfn::TypeLibrary::try_function($_)) {
74             return $f
75             } else {
76             return Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecificationValue->new( %$_ );
77             }
78             };
79              
80             package Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecificationValue {
81 5     5   15954 use Moose;
  5         14  
  5         27  
82 5     5   29967 use MooseX::StrictConstructor;
  5         10  
  5         28  
83             extends 'Cfn::Value::TypedValue';
84            
85             has PredefinedMetricType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86             has ResourceLabel => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
87             }
88              
89             subtype 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecification',
90             as 'Cfn::Value';
91              
92             coerce 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecification',
93             from 'HashRef',
94             via {
95             if (my $f = Cfn::TypeLibrary::try_function($_)) {
96             return $f
97             } else {
98             return Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecificationValue->new( %$_ );
99             }
100             };
101              
102             package Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecificationValue {
103 5     5   14775 use Moose;
  5         16  
  5         27  
104 5     5   29241 use MooseX::StrictConstructor;
  5         17  
  5         27  
105             extends 'Cfn::Value::TypedValue';
106            
107             has Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::MetricDimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
108             has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109             has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
110             has Statistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
111             has Unit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
112             }
113              
114             subtype 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfiguration',
115             as 'Cfn::Value';
116              
117             coerce 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfiguration',
118             from 'HashRef',
119             via {
120             if (my $f = Cfn::TypeLibrary::try_function($_)) {
121             return $f
122             } else {
123             return Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfigurationValue->new( %$_ );
124             }
125             };
126              
127             package Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfigurationValue {
128 5     5   15759 use Moose;
  5         14  
  5         27  
129 5     5   29923 use MooseX::StrictConstructor;
  5         14  
  5         26  
130             extends 'Cfn::Value::TypedValue';
131            
132             has CustomizedMetricSpecification => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
133             has DisableScaleIn => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
134             has PredefinedMetricSpecification => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
135             has TargetValue => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
136             }
137             subtype 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment',
138             as 'Cfn::Value',
139             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
140             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
141              
142             coerce 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment',
143             from 'HashRef',
144             via {
145             if (my $f = Cfn::TypeLibrary::try_function($_)) {
146             return $f
147             } else {
148             die 'Only accepts functions';
149             }
150             },
151             from 'ArrayRef',
152             via {
153             Cfn::Value::Array->new(Value => [
154             map {
155             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment')->coerce($_)
156             } @$_
157             ]);
158             };
159              
160             subtype 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment',
161             as 'Cfn::Value';
162              
163             coerce 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment',
164             from 'HashRef',
165             via {
166             if (my $f = Cfn::TypeLibrary::try_function($_)) {
167             return $f
168             } else {
169             return Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustmentValue->new( %$_ );
170             }
171             };
172              
173             package Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustmentValue {
174 5     5   16079 use Moose;
  5         12  
  5         44  
175 5     5   30148 use MooseX::StrictConstructor;
  5         41  
  5         27  
176             extends 'Cfn::Value::TypedValue';
177            
178             has MetricIntervalLowerBound => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
179             has MetricIntervalUpperBound => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
180             has ScalingAdjustment => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
181             }
182              
183             package Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy {
184 5     5   15147 use Moose;
  5         17  
  5         26  
185 5     5   30059 use MooseX::StrictConstructor;
  5         18  
  5         27  
186             extends 'Cfn::Resource::Properties';
187            
188             has AdjustmentType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
189             has AutoScalingGroupName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
190             has Cooldown => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
191             has EstimatedInstanceWarmup => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
192             has MetricAggregationType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
193             has MinAdjustmentMagnitude => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
194             has PolicyType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
195             has ScalingAdjustment => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
196             has StepAdjustments => (isa => 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
197             has TargetTrackingConfiguration => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfiguration', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
198             }
199              
200             1;