File Coverage

blib/lib/Cfn/Resource/AWS/CloudWatch/Alarm.pm
Criterion Covered Total %
statement 38 38 100.0
branch n/a
condition n/a
subroutine 14 14 100.0
pod 0 2 0.0
total 52 54 96.3


line stmt bran cond sub pod time code
1             # AWS::CloudWatch::Alarm generated from spec 18.4.0
2 5     5   3817 use Moose::Util::TypeConstraints;
  5         17  
  5         65  
3              
4             coerce 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::CloudWatch::Alarm->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::CloudWatch::Alarm {
9 5     5   11413 use Moose;
  5         15  
  5         39  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 5 [ 'Arn' ]
15             }
16             sub supported_regions {
17 1     1 0 1101 [ '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             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::CloudWatch::Alarm::Dimension',
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::CloudWatch::Alarm::Dimension')->coerce($_)
41             } @$_
42             ]);
43             };
44              
45             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             via {
51             if (my $f = Cfn::TypeLibrary::try_function($_)) {
52             return $f
53             } else {
54             return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Dimension->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Dimension {
59 5     5   38757 use Moose;
  5         11  
  5         38  
60 5     5   33410 use MooseX::StrictConstructor;
  5         16  
  5         50  
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::CloudWatch::Alarm::Metric',
68             as 'Cfn::Value';
69              
70             coerce 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Metric',
71             from 'HashRef',
72             via {
73             if (my $f = Cfn::TypeLibrary::try_function($_)) {
74             return $f
75             } else {
76             return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Metric->new( %$_ );
77             }
78             };
79              
80             package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Metric {
81 5     5   18377 use Moose;
  5         18  
  5         37  
82 5     5   33391 use MooseX::StrictConstructor;
  5         17  
  5         25  
83             extends 'Cfn::Value::TypedValue';
84            
85             has Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
86             has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
87             has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
88             }
89              
90             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             via {
96             if (my $f = Cfn::TypeLibrary::try_function($_)) {
97             return $f
98             } else {
99             return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricStat->new( %$_ );
100             }
101             };
102              
103             package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricStat {
104 5     5   17028 use Moose;
  5         16  
  5         33  
105 5     5   33951 use MooseX::StrictConstructor;
  5         17  
  5         33  
106             extends 'Cfn::Value::TypedValue';
107            
108             has Metric => (isa => 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Metric', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109             has Period => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
110             has Stat => (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             subtype 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery',
114             as 'Cfn::Value',
115             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
116             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
117              
118             coerce 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery',
119             from 'HashRef',
120             via {
121             if (my $f = Cfn::TypeLibrary::try_function($_)) {
122             return $f
123             } else {
124             die 'Only accepts functions';
125             }
126             },
127             from 'ArrayRef',
128             via {
129             Cfn::Value::Array->new(Value => [
130             map {
131             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery')->coerce($_)
132             } @$_
133             ]);
134             };
135              
136             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             via {
142             if (my $f = Cfn::TypeLibrary::try_function($_)) {
143             return $f
144             } else {
145             return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricDataQuery->new( %$_ );
146             }
147             };
148              
149             package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricDataQuery {
150 5     5   18406 use Moose;
  5         16  
  5         29  
151 5     5   33392 use MooseX::StrictConstructor;
  5         25  
  5         35  
152             extends 'Cfn::Value::TypedValue';
153            
154             has Expression => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
155             has Id => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
156             has Label => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
157             has MetricStat => (isa => 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricStat', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
158             has Period => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
159             has ReturnData => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
160             }
161              
162             package Cfn::Resource::Properties::AWS::CloudWatch::Alarm {
163 5     5   17371 use Moose;
  5         28  
  5         30  
164 5     5   33439 use MooseX::StrictConstructor;
  5         15  
  5         34  
165             extends 'Cfn::Resource::Properties';
166            
167             has ActionsEnabled => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
168             has AlarmActions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
169             has AlarmDescription => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
170             has AlarmName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
171             has ComparisonOperator => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
172             has DatapointsToAlarm => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
173             has Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
174             has EvaluateLowSampleCountPercentile => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
175             has EvaluationPeriods => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
176             has ExtendedStatistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
177             has InsufficientDataActions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
178             has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
179             has Metrics => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
180             has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
181             has OKActions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
182             has Period => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
183             has Statistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
184             has Threshold => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
185             has ThresholdMetricId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
186             has TreatMissingData => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
187             has Unit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
188             }
189              
190             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