Cfn/Resource/AWS/AutoScaling/ScalingPolicy.pm

filter: Statementstmt 77.8% 102 / 131 Branchbran 0.0% 0 / 18 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 56.6% 17 / 30 Podpod 0.0% 0 / 2 totaltotal 65.7% 119 / 181 CC 10 SCAR 12.1
CC
10
Cov
68%
__ANON__
6.0
__ANON__
6.0
__ANON__
6.0
CRAP 3.4
« Cfn/Resource/AWS/CloudFormation/StackSet.pm ↑ Summary Cfn/Resource/AWS/Amplify/App.pm »
1 # AWS::AutoScaling::ScalingPolicy generated from spec 18.4.0
2 5 ▶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 10 ▶ via { Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy->new( %$_ ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
7  
8 5 package Cfn::Resource::AWS::AutoScaling::ScalingPolicy {
9 5 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 5 extends 'Cfn::Resource';
11 5 has Properties => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy', is => 'rw', coerce => 1);
12
13 sub AttributeList {
14 1 ▶ [ ]
Subroutine AttributeList: called CC=1 SCAR=0.0
Pod undocumented
15 }
16 sub supported_regions {
17 1 ▶ [ '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' ]
Subroutine supported_regions: called CC=1 SCAR=0.0
Pod undocumented
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 via {
30 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
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 via {
38 Cfn::Value::Array->new(Value => [
39 map {
40 0 ▶ Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::MetricDimension')->coerce($_)
Subroutine __ANON__: not called CC=1 SCAR=6.9
41 } @$_
42 ]);
43 5 };
44  
45 5 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 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
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 5 };
57  
58 5 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::MetricDimension {
59 5 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
60 5 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
61 5 extends 'Cfn::Value::TypedValue';
62
63 5 has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64 5 has Value => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
65 }
66  
67 5 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 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
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 5 };
79  
80 5 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecification {
81 5 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
82 5 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
83 5 extends 'Cfn::Value::TypedValue';
84
85 5 has PredefinedMetricType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86 5 has ResourceLabel => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
87 }
88  
89 5 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 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
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 5 };
101  
102 5 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecification {
103 5 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
104 5 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
105 5 extends 'Cfn::Value::TypedValue';
106
107 5 has Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::MetricDimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
108 5 has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109 5 has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
110 5 has Statistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
111 5 has Unit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
112 }
113  
114 5 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 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
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 5 };
126  
127 5 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfiguration {
128 5 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
129 5 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
130 5 extends 'Cfn::Value::TypedValue';
131
132 5 has CustomizedMetricSpecification => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::CustomizedMetricSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
133 5 has DisableScaleIn => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
134 5 has PredefinedMetricSpecification => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::PredefinedMetricSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
135 5 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 via {
145 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
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 via {
153 Cfn::Value::Array->new(Value => [
154 map {
155 0 ▶ Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment')->coerce($_)
Subroutine __ANON__: not called CC=1 SCAR=6.9
156 } @$_
157 ]);
158 5 };
159  
160 5 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 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Subroutine __ANON__: not called CC=2 SCAR=17.9
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 5 };
172  
173 5 package Cfn::Resource::Properties::Object::AWS::AutoScaling::ScalingPolicy::StepAdjustment {
174 5 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
175 5 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
176 5 extends 'Cfn::Value::TypedValue';
177
178 5 has MetricIntervalLowerBound => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
179 5 has MetricIntervalUpperBound => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
180 5 has ScalingAdjustment => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
181 }
182  
183 5 package Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy {
184 5 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
185 5 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
186 5 extends 'Cfn::Resource::Properties';
187
188 5 has AdjustmentType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
189 5 has AutoScalingGroupName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
190 5 has Cooldown => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
191 5 has EstimatedInstanceWarmup => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
192 5 has MetricAggregationType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
193 5 has MinAdjustmentMagnitude => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
194 5 has PolicyType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
195 5 has ScalingAdjustment => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
196 5 has StepAdjustments => (isa => 'ArrayOfCfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::StepAdjustment', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
197 5 has TargetTrackingConfiguration => (isa => 'Cfn::Resource::Properties::AWS::AutoScaling::ScalingPolicy::TargetTrackingConfiguration', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
198 }
199  
200 5 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/CloudFormation/StackSet.pm ↑ Summary Cfn/Resource/AWS/Amplify/App.pm »