Cfn/Resource/AWS/CloudWatch/Alarm.pm

filter: Statementstmt 82.0% 105 / 128 Branchbran 12.5% 2 / 16 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 59.2% 16 / 27 Podpod 0.0% 0 / 2 totaltotal 71.1% 123 / 173 CC 9 SCAR 10.8
CC
9
Cov
74%
__ANON__
6.0
__ANON__
6.0
__ANON__
6.0
CRAP 2.9
« Cfn/Resource/AWS/EC2/VPNConnection.pm ↑ Summary Cfn/Resource/AWS/ElastiCache/ReplicationGroup.pm »
1 # AWS::CloudWatch::Alarm 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::CloudWatch::Alarm',
5 from 'HashRef',
6 10 ▶ via { Cfn::Resource::Properties::AWS::CloudWatch::Alarm->new( %$_ ) };
Subroutine __ANON__: called CC=1 SCAR=0.0
7  
8 3 package Cfn::Resource::AWS::CloudWatch::Alarm {
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::CloudWatch::Alarm', is => 'rw', coerce => 1);
12
13 0 ▶ sub AttributeList {
Subroutine AttributeList: not called CC=1 SCAR=6.9
Pod undocumented
14 0 [ 'Arn' ]
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::CloudWatch::Alarm::Dimension',
23 as 'Cfn::Value',
24 10 ▶ where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
Subroutine __ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
BranchTrueFalseTotal
$_->isa("Cfn::Value::Array") or $_->isa("Cfn::Value::Function") 10 0 10
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::CloudWatch::Alarm::Dimension',
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 10 ▶ via {
Subroutine __ANON__: called CC=1 SCAR=0.0
38 Cfn::Value::Array->new(Value => [
39 map {
40 10 Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension')->coerce($_)
41 } @$_
42 ]);
43 3 };
44  
45 3 subtype 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension',
46 as 'Cfn::Value';
47  
48 coerce 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension',
49 from 'HashRef',
50 10 ▶ via {
Subroutine __ANON__: called CC=2 SCAR=8.1
51 10 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 10 10
52 0 return $f
53 } else {
54 10 return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Dimension->new( %$_ );
55 }
56 3 };
57  
58 3 package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Dimension {
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::CloudWatch::Alarm::Metric',
68 as 'Cfn::Value';
69  
70 coerce 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Metric',
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::CloudWatch::Alarm::Metric->new( %$_ );
77 }
78 3 };
79  
80 3 package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Metric {
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 Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86 3 has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
87 3 has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
88 }
89  
90 3 subtype 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricStat',
91 as 'Cfn::Value';
92  
93 coerce 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricStat',
94 from 'HashRef',
95 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
96 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
97 0 return $f
98 } else {
99 0 return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricStat->new( %$_ );
100 }
101 3 };
102  
103 3 package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricStat {
104 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
105 3 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
106 3 extends 'Cfn::Value::TypedValue';
107
108 3 has Metric => (isa => 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Metric', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109 3 has Period => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
110 3 has Stat => (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 subtype 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery',
114 as 'Cfn::Value',
115 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
116 0 ▶message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
Subroutine __ANON__: not called CC=1 SCAR=1.2
117  
118 coerce 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery',
119 from 'HashRef',
120 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
121 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
122 0 return $f
123 } else {
124 0 die 'Only accepts functions';
125 }
126 },
127 from 'ArrayRef',
128 0 ▶ via {
Subroutine __ANON__: not called CC=1 SCAR=6.9
129 Cfn::Value::Array->new(Value => [
130 map {
131 0 Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery')->coerce($_)
132 } @$_
133 ]);
134 3 };
135  
136 3 subtype 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery',
137 as 'Cfn::Value';
138  
139 coerce 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery',
140 from 'HashRef',
141 0 ▶ via {
Subroutine __ANON__: not called CC=2 SCAR=17.9
142 0 ▶ if (my $f = Cfn::TypeLibrary::try_function($_)) {
Branch: 1 branch
BranchTrueFalseTotal
if (my $f = Cfn::TypeLibrary::try_function($_)) { } 0 0 0
143 0 return $f
144 } else {
145 0 return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricDataQuery->new( %$_ );
146 }
147 3 };
148  
149 3 package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricDataQuery {
150 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
151 3 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
152 3 extends 'Cfn::Value::TypedValue';
153
154 3 has Expression => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
155 3 has Id => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
156 3 has Label => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
157 3 has MetricStat => (isa => 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricStat', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
158 3 has Period => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
159 3 has ReturnData => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
160 }
161  
162 3 package Cfn::Resource::Properties::AWS::CloudWatch::Alarm {
163 3 ▶ use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
164 3 ▶ use MooseX::StrictConstructor;
Subroutine BEGIN: called CC=1 SCAR=0.0
165 3 extends 'Cfn::Resource::Properties';
166
167 3 has ActionsEnabled => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
168 3 has AlarmActions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
169 3 has AlarmDescription => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
170 3 has AlarmName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
171 3 has ComparisonOperator => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
172 3 has DatapointsToAlarm => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
173 3 has Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
174 3 has EvaluateLowSampleCountPercentile => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
175 3 has EvaluationPeriods => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
176 3 has ExtendedStatistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
177 3 has InsufficientDataActions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
178 3 has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
179 3 has Metrics => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
180 3 has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
181 3 has OKActions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
182 3 has Period => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
183 3 has Statistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
184 3 has Threshold => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
185 3 has ThresholdMetricId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
186 3 has TreatMissingData => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
187 3 has Unit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
188 }
189  
190 3 1;
191 ### main pod documentation begin ###
192  
193 =encoding UTF-8
194  
195 =head1 NAME
196  
197 Cfn::Resource::AWS::CloudWatch::Alarm - Cfn resource for AWS::CloudWatch::Alarm
198  
199 =head1 DESCRIPTION
200  
201 This module implements a Perl module that represents the CloudFormation object AWS::CloudWatch::Alarm.
202  
203 See L<Cfn> for more information on how to use it.
204  
205 =head1 AUTHOR
206  
207 Jose Luis Martinez
208 CAPSiDE
209 jlmartinez@capside.com
210  
211 =head1 COPYRIGHT and LICENSE
212  
213 Copyright (c) 2013 by CAPSiDE
214 This code is distributed under the Apache 2 License. The full text of the
215 license can be found in the LICENSE file included with this module.
216  
217 =cut
« Cfn/Resource/AWS/EC2/VPNConnection.pm ↑ Summary Cfn/Resource/AWS/ElastiCache/ReplicationGroup.pm »