File Coverage

blib/lib/Cfn/Resource/AWS/ApplicationAutoScaling/ScalableTarget.pm
Criterion Covered Total %
statement 32 32 100.0
branch n/a
condition n/a
subroutine 12 12 100.0
pod 0 2 0.0
total 44 46 95.6


line stmt bran cond sub pod time code
1             # AWS::ApplicationAutoScaling::ScalableTarget generated from spec 18.4.0
2 2     2   1493 use Moose::Util::TypeConstraints;
  2         5  
  2         32  
3              
4             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::ApplicationAutoScaling::ScalableTarget {
9 2     2   4699 use Moose;
  2         6  
  2         19  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 4 [ ]
15             }
16             sub supported_regions {
17 1     1 0 1529 [ '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              
23             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetAction',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetAction',
27             from 'HashRef',
28             via {
29             if (my $f = Cfn::TypeLibrary::try_function($_)) {
30             return $f
31             } else {
32             return Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetAction->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetAction {
37 2     2   15545 use Moose;
  2         7  
  2         11  
38 2     2   13168 use MooseX::StrictConstructor;
  2         5  
  2         22  
39             extends 'Cfn::Value::TypedValue';
40            
41             has MaxCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
42             has MinCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
43             }
44              
45             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::SuspendedState',
46             as 'Cfn::Value';
47              
48             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::SuspendedState',
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::ApplicationAutoScaling::ScalableTarget::SuspendedState->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalableTarget::SuspendedState {
59 2     2   7568 use Moose;
  2         5  
  2         14  
60 2     2   13295 use MooseX::StrictConstructor;
  2         7  
  2         8  
61             extends 'Cfn::Value::TypedValue';
62            
63             has DynamicScalingInSuspended => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64             has DynamicScalingOutSuspended => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
65             has ScheduledScalingSuspended => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
66             }
67             subtype 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction',
68             as 'Cfn::Value',
69             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
70             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
71              
72             coerce 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction',
73             from 'HashRef',
74             via {
75             if (my $f = Cfn::TypeLibrary::try_function($_)) {
76             return $f
77             } else {
78             die 'Only accepts functions';
79             }
80             },
81             from 'ArrayRef',
82             via {
83             Cfn::Value::Array->new(Value => [
84             map {
85             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction')->coerce($_)
86             } @$_
87             ]);
88             };
89              
90             subtype 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction',
91             as 'Cfn::Value';
92              
93             coerce 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction',
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::ApplicationAutoScaling::ScalableTarget::ScheduledAction->new( %$_ );
100             }
101             };
102              
103             package Cfn::Resource::Properties::Object::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction {
104 2     2   7136 use Moose;
  2         8  
  2         11  
105 2     2   13075 use MooseX::StrictConstructor;
  2         8  
  2         12  
106             extends 'Cfn::Value::TypedValue';
107            
108             has EndTime => (isa => 'Cfn::Value::Timestamp', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
109             has ScalableTargetAction => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScalableTargetAction', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
110             has Schedule => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
111             has ScheduledActionName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
112             has StartTime => (isa => 'Cfn::Value::Timestamp', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
113             }
114              
115             package Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget {
116 2     2   6624 use Moose;
  2         7  
  2         11  
117 2     2   13119 use MooseX::StrictConstructor;
  2         6  
  2         13  
118             extends 'Cfn::Resource::Properties';
119            
120             has MaxCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
121             has MinCapacity => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
122             has ResourceId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
123             has RoleARN => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
124             has ScalableDimension => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
125             has ScheduledActions => (isa => 'ArrayOfCfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::ScheduledAction', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
126             has ServiceNamespace => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
127             has SuspendedState => (isa => 'Cfn::Resource::Properties::AWS::ApplicationAutoScaling::ScalableTarget::SuspendedState', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
128             }
129              
130             1;
131             ### main pod documentation begin ###
132              
133             =encoding UTF-8
134              
135             =head1 NAME
136              
137             Cfn::Resource::AWS::ApplicationAutoScaling::ScalableTarget - Cfn resource for AWS::ApplicationAutoScaling::ScalableTarget
138              
139             =head1 DESCRIPTION
140              
141             This module implements a Perl module that represents the CloudFormation object AWS::ApplicationAutoScaling::ScalableTarget.
142              
143             See L<Cfn> for more information on how to use it.
144              
145             =head1 AUTHOR
146              
147             Jose Luis Martinez
148             CAPSiDE
149             jlmartinez@capside.com
150              
151             =head1 COPYRIGHT and LICENSE
152              
153             Copyright (c) 2013 by CAPSiDE
154             This code is distributed under the Apache 2 License. The full text of the
155             license can be found in the LICENSE file included with this module.
156              
157             =cut