Cfn/Resource/AWS/AutoScaling/ScalingPolicy.pm

filter: Statementstmt 76.3% 100 / 131 Branchbran 0.0% 0 / 18 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 15 / 30 Podpod 0.0% 0 / 2 totaltotal 63.5% 115 / 181 CC 10 SCAR 12.3
CC
10
Cov
67%
__ANON__
6.0
__ANON__
6.0
__ANON__
6.0
CRAP 3.4
« Cfn/Resource/AWS/StepFunctions/StateMachine.pm ↑ Summary Cfn/Resource/AWS/OpsWorks/Stack.pm »
1 # AWS::AutoScaling::ScalingPolicy generated from spec 18.4.0
2 3 ▶use Moose::Util::TypeConstraints;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 coerce 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy',
5 from 'HashRef',
6 8 ▶ via { Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy->new( %$_ ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
7  
8 3 package Cfn::Resource::AWS::AutoScaling::ScalingPolicy {
9 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 3 extends 'Cfn::Resource';
11 3 has Properties => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy', is => 'rw', coerce => 1);
12
13 0 ▶ sub AttributeList {
Subroutine AttributeList: not called CC=1 SCAR=6.9
Pod undocumented
14 0 [ ]
15 }
16 0 ▶ sub supported_regions {
Subroutine supported_regions: not called CC=1 SCAR=6.9
Pod undocumented
17 0 [ '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::AutoScaling::ScalingPolicy::MetricDimension',
23 as 'Cfn::Value',
24 0 ▶ where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
$_->isa("Cfn::Value::Array") or $_->isa("Cfn::Value::Function") 0 0 0
25 0 ▶message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
Subroutine __ANON__: not called CC=1 SCAR=1.2
26  
27 coerce 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::MetricDimension',
28 from 'HashRef',
29 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
30 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
31 0 return $f
32 } else {
33 0 die 'Only accepts functions';
34 }
35 },
36 from 'ArrayRef',
37 0 ▶ via {
Subroutine __ANON__: not called CC=1 SCAR=6.9
38 Cfn::Value::Array->new(Value => [
39 map {
40 0 Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::MetricDimension')->coerce($_)
41 } @$_
42 ]);
43 3 };
44  
45 3 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 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
51 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
52 0 return $f
53 } else {
54 0 return Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::MetricDimension->new( %$_ );
55 }
56 3 };
57  
58 3 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::MetricDimension {
59 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
60 3 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
61 3 extends 'Cfn::Value::TypedValue';
62
63 3 has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64 3 has Value => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
65 }
66  
67 3 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 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
73 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
74 0 return $f
75 } else {
76 0 return Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecification->new( %$_ );
77 }
78 3 };
79  
80 3 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecification {
81 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
82 3 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
83 3 extends 'Cfn::Value::TypedValue';
84
85 3 has PredefinedMetricType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86 3 has ResourceLabel => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
87 }
88  
89 3 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 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
95 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
96 0 return $f
97 } else {
98 0 return Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecification->new( %$_ );
99 }
100 3 };
101  
102 3 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecification {
103 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
104 3 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
105 3 extends 'Cfn::Value::TypedValue';
106
107 3 has Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::MetricDimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
108 3 has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109 3 has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
110 3 has Statistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
111 3 has Unit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
112 }
113  
114 3 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 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
120 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
121 0 return $f
122 } else {
123 0 return Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfiguration->new( %$_ );
124 }
125 3 };
126  
127 3 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfiguration {
128 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
129 3 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
130 3 extends 'Cfn::Value::TypedValue';
131
132 3 has CustomizedMetricSpecification => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
133 3 has DisableScaleIn => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
134 3 has PredefinedMetricSpecification => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
135 3 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 0 ▶ where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
Subroutine __ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
BranchTrueFalseTotal
$_->isa("Cfn::Value::Array") or $_->isa("Cfn::Value::Function") 0 0 0
140 0 ▶message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
Subroutine __ANON__: not called CC=1 SCAR=1.2
141  
142 coerce 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment',
143 from 'HashRef',
144 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
145 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
146 0 return $f
147 } else {
148 0 die 'Only accepts functions';
149 }
150 },
151 from 'ArrayRef',
152 0 ▶ via {
Subroutine __ANON__: not called CC=1 SCAR=6.9
153 Cfn::Value::Array->new(Value => [
154 map {
155 0 Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment')->coerce($_)
156 } @$_
157 ]);
158 3 };
159  
160 3 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 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
166 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
167 0 return $f
168 } else {
169 0 return Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::StepAdjustment->new( %$_ );
170 }
171 3 };
172  
173 3 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::StepAdjustment {
174 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
175 3 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
176 3 extends 'Cfn::Value::TypedValue';
177
178 3 has MetricIntervalLowerBound => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
179 3 has MetricIntervalUpperBound => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
180 3 has ScalingAdjustment => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
181 }
182  
183 3 package Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy {
184 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
185 3 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
186 3 extends 'Cfn::Resource::Properties';
187
188 3 has AdjustmentType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
189 3 has AutoScalingGroupName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
190 3 has Cooldown => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
191 3 has EstimatedInstanceWarmup => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
192 3 has MetricAggregationType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
193 3 has MinAdjustmentMagnitude => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
194 3 has PolicyType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
195 3 has ScalingAdjustment => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
196 3 has StepAdjustments => (isa => 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
197 3 has TargetTrackingConfiguration => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfiguration', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
198 }
199  
200 3 1;
201 ### main pod documentation begin ###
202  
203 =encoding UTF-8
204  
205 =head1 NAME
206  
207 Cfn::Resource::AWS::AutoScaling::ScalingPolicy - Cfn resource for AWS::AutoScaling::ScalingPolicy
208  
209 =head1 DESCRIPTION
210  
211 This module implements a Perl module that represents the CloudFormation object AWS::AutoScaling::ScalingPolicy.
212  
213 See L<Cfn> for more information on how to use it.
214  
215 =head1 AUTHOR
216  
217 Jose Luis Martinez
218 CAPSiDE
219 jlmartinez@capside.com
220  
221 =head1 COPYRIGHT and LICENSE
222  
223 Copyright (c) 2013 by CAPSiDE
224 This code is distributed under the Apache 2 License. The full text of the
225 license can be found in the LICENSE file included with this module.
226  
227 =cut
« Cfn/Resource/AWS/StepFunctions/StateMachine.pm ↑ Summary Cfn/Resource/AWS/OpsWorks/Stack.pm »