| 1 | # AWS::CloudWatch::Alarm 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::CloudWatch::Alarm', | ||||||||||
| 5 | from 'HashRef', | ||||||||||
| 6 | 12 | ▶ | via { Cfn::Resource::Properties::AWS::CloudWatch::Alarm->new( %$_ ) }; | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 5 | package Cfn::Resource::AWS::CloudWatch::Alarm { | |||||||||
| 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::CloudWatch::Alarm', is => 'rw', coerce => 1); | |||||||||
| 12 | |||||||||||
| 13 | sub AttributeList { | ||||||||||
| 14 | 1 | ▶ | [ 'Arn' ] | ||||||||
|
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::CloudWatch::Alarm::Dimension', | ||||||||||
| 23 | as 'Cfn::Value', | ||||||||||
| 24 | 12 | ▶ | where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') }, | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||
| 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 | via { | ||||||||||
| 30 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 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 | 12 | ▶ | Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension')->coerce($_) | ||||||||
|
Subroutine
__ANON__: called CC=1 SCAR=0.0
| |||||||||||
| 41 | } @$_ | ||||||||||
| 42 | ]); | ||||||||||
| 43 | 5 | }; | |||||||||
| 44 | |||||||||||
| 45 | 5 | 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 | 12 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=8.1
Branch: 1 branch
| |||||||||||
| 52 | 0 | return $f | |||||||||
| 53 | } else { | ||||||||||
| 54 | 12 | return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Dimension->new( %$_ ); | |||||||||
| 55 | } | ||||||||||
| 56 | 5 | }; | |||||||||
| 57 | |||||||||||
| 58 | 5 | package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Dimension { | |||||||||
| 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::CloudWatch::Alarm::Metric', | |||||||||
| 68 | as 'Cfn::Value'; | ||||||||||
| 69 | |||||||||||
| 70 | coerce 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Metric', | ||||||||||
| 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
| |||||||||||
| 74 | 0 | return $f | |||||||||
| 75 | } else { | ||||||||||
| 76 | 0 | return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Metric->new( %$_ ); | |||||||||
| 77 | } | ||||||||||
| 78 | 5 | }; | |||||||||
| 79 | |||||||||||
| 80 | 5 | package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::Metric { | |||||||||
| 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 Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 86 | 5 | has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 87 | 5 | has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 88 | } | ||||||||||
| 89 | |||||||||||
| 90 | 5 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 97 | 0 | return $f | |||||||||
| 98 | } else { | ||||||||||
| 99 | 0 | return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricStat->new( %$_ ); | |||||||||
| 100 | } | ||||||||||
| 101 | 5 | }; | |||||||||
| 102 | |||||||||||
| 103 | 5 | package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricStat { | |||||||||
| 104 | 5 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 105 | 5 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 106 | 5 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 107 | |||||||||||
| 108 | 5 | has Metric => (isa => 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::Metric', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 109 | 5 | has Period => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 110 | 5 | has Stat => (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 | 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
| |||||||||||
| 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 | via { | ||||||||||
| 121 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 122 | 0 | return $f | |||||||||
| 123 | } else { | ||||||||||
| 124 | 0 | die 'Only accepts functions'; | |||||||||
| 125 | } | ||||||||||
| 126 | }, | ||||||||||
| 127 | from 'ArrayRef', | ||||||||||
| 128 | via { | ||||||||||
| 129 | Cfn::Value::Array->new(Value => [ | ||||||||||
| 130 | map { | ||||||||||
| 131 | 0 | ▶ | Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery')->coerce($_) | ||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||
| 132 | } @$_ | ||||||||||
| 133 | ]); | ||||||||||
| 134 | 5 | }; | |||||||||
| 135 | |||||||||||
| 136 | 5 | 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 | 0 | ▶ | if (my $f = Cfn::TypeLibrary::try_function($_)) { | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
Branch: 1 branch
| |||||||||||
| 143 | 0 | return $f | |||||||||
| 144 | } else { | ||||||||||
| 145 | 0 | return Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricDataQuery->new( %$_ ); | |||||||||
| 146 | } | ||||||||||
| 147 | 5 | }; | |||||||||
| 148 | |||||||||||
| 149 | 5 | package Cfn::Resource::Properties::Object::AWS::CloudWatch::Alarm::MetricDataQuery { | |||||||||
| 150 | 5 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 151 | 5 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 152 | 5 | extends 'Cfn::Value::TypedValue'; | |||||||||
| 153 | |||||||||||
| 154 | 5 | has Expression => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 155 | 5 | has Id => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 156 | 5 | has Label => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 157 | 5 | has MetricStat => (isa => 'Cfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricStat', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 158 | 5 | has Period => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 159 | 5 | has ReturnData => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 160 | } | ||||||||||
| 161 | |||||||||||
| 162 | 5 | package Cfn::Resource::Properties::AWS::CloudWatch::Alarm { | |||||||||
| 163 | 5 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 164 | 5 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 165 | 5 | extends 'Cfn::Resource::Properties'; | |||||||||
| 166 | |||||||||||
| 167 | 5 | has ActionsEnabled => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 168 | 5 | has AlarmActions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 169 | 5 | has AlarmDescription => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 170 | 5 | has AlarmName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable'); | |||||||||
| 171 | 5 | has ComparisonOperator => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 172 | 5 | has DatapointsToAlarm => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 173 | 5 | has Dimensions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::Dimension', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 174 | 5 | has EvaluateLowSampleCountPercentile => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 175 | 5 | has EvaluationPeriods => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 176 | 5 | has ExtendedStatistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 177 | 5 | has InsufficientDataActions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 178 | 5 | has MetricName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 179 | 5 | has Metrics => (isa => 'ArrayOfCfn::Resource::Properties::AWS::CloudWatch::Alarm::MetricDataQuery', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 180 | 5 | has Namespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 181 | 5 | has OKActions => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 182 | 5 | has Period => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 183 | 5 | has Statistic => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 184 | 5 | has Threshold => (isa => 'Cfn::Value::Double', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 185 | 5 | has ThresholdMetricId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 186 | 5 | has TreatMissingData => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 187 | 5 | has Unit => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable'); | |||||||||
| 188 | } | ||||||||||
| 189 | |||||||||||
| 190 | 5 | 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 | ||||||||||