File Coverage

blib/lib/Cfn/Resource/AWS/Batch/ComputeEnvironment.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::Batch::ComputeEnvironment generated from spec 21.0.0
2 3     3   2520 use Moose::Util::TypeConstraints;
  3         10  
  3         39  
3              
4             coerce 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::Batch::ComputeEnvironment {
9 3     3   7033 use Moose;
  3         11  
  3         34  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 5 [ ]
15             }
16             sub supported_regions {
17 1     1 0 1180 [ 'ap-east-1','ap-northeast-1','ap-northeast-2','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-west-1','eu-west-2','eu-west-3','me-south-1','sa-east-1','us-east-1','us-east-2','us-west-1','us-west-2' ]
18             }
19             }
20              
21              
22              
23             subtype 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment::LaunchTemplateSpecification',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment::LaunchTemplateSpecification',
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::Batch::ComputeEnvironment::LaunchTemplateSpecification->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::Object::AWS::Batch::ComputeEnvironment::LaunchTemplateSpecification {
37 3     3   22566 use Moose;
  3         7  
  3         16  
38 3     3   20422 use MooseX::StrictConstructor;
  3         9  
  3         32  
39             extends 'Cfn::Value::TypedValue';
40            
41             has LaunchTemplateId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
42             has LaunchTemplateName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
43             has Version => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
44             }
45             subtype 'ArrayOfCfn::Resource::Properties::AWS::Batch::ComputeEnvironment::Ec2ConfigurationObject',
46             as 'Cfn::Value',
47             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
48             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
49              
50             coerce 'ArrayOfCfn::Resource::Properties::AWS::Batch::ComputeEnvironment::Ec2ConfigurationObject',
51             from 'HashRef',
52             via {
53             if (my $f = Cfn::TypeLibrary::try_function($_)) {
54             return $f
55             } else {
56             die 'Only accepts functions';
57             }
58             },
59             from 'ArrayRef',
60             via {
61             Cfn::Value::Array->new(Value => [
62             map {
63             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment::Ec2ConfigurationObject')->coerce($_)
64             } @$_
65             ]);
66             };
67              
68             subtype 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment::Ec2ConfigurationObject',
69             as 'Cfn::Value';
70              
71             coerce 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment::Ec2ConfigurationObject',
72             from 'HashRef',
73             via {
74             if (my $f = Cfn::TypeLibrary::try_function($_)) {
75             return $f
76             } else {
77             return Cfn::Resource::Properties::Object::AWS::Batch::ComputeEnvironment::Ec2ConfigurationObject->new( %$_ );
78             }
79             };
80              
81             package Cfn::Resource::Properties::Object::AWS::Batch::ComputeEnvironment::Ec2ConfigurationObject {
82 3     3   11799 use Moose;
  3         8  
  3         16  
83 3     3   20563 use MooseX::StrictConstructor;
  3         8  
  3         21  
84             extends 'Cfn::Value::TypedValue';
85            
86             has ImageIdOverride => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
87             has ImageType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
88             }
89              
90             subtype 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment::ComputeResources',
91             as 'Cfn::Value';
92              
93             coerce 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment::ComputeResources',
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::Batch::ComputeEnvironment::ComputeResources->new( %$_ );
100             }
101             };
102              
103             package Cfn::Resource::Properties::Object::AWS::Batch::ComputeEnvironment::ComputeResources {
104 3     3   10412 use Moose;
  3         8  
  3         17  
105 3     3   20262 use MooseX::StrictConstructor;
  3         22  
  3         17  
106             extends 'Cfn::Value::TypedValue';
107            
108             has AllocationStrategy => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
109             has BidPercentage => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
110             has DesiredvCpus => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
111             has Ec2Configuration => (isa => 'ArrayOfCfn::Resource::Properties::AWS::Batch::ComputeEnvironment::Ec2ConfigurationObject', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
112             has Ec2KeyPair => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
113             has ImageId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
114             has InstanceRole => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
115             has InstanceTypes => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
116             has LaunchTemplate => (isa => 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment::LaunchTemplateSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
117             has MaxvCpus => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
118             has MinvCpus => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
119             has PlacementGroup => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
120             has SecurityGroupIds => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
121             has SpotIamFleetRole => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
122             has Subnets => (isa => 'Cfn::Value::Array|Cfn::Value::Function|Cfn::DynamicValue', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
123             has Tags => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
124             has Type => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
125             }
126              
127             package Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment {
128 3     3   10945 use Moose;
  3         11  
  3         18  
129 3     3   20427 use MooseX::StrictConstructor;
  3         8  
  3         17  
130             extends 'Cfn::Resource::Properties';
131            
132             has ComputeEnvironmentName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
133             has ComputeResources => (isa => 'Cfn::Resource::Properties::AWS::Batch::ComputeEnvironment::ComputeResources', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
134             has ServiceRole => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
135             has State => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
136             has Tags => (isa => 'Cfn::Value::Json|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
137             has Type => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
138             }
139              
140             1;
141             ### main pod documentation begin ###
142              
143             =encoding UTF-8
144              
145             =head1 NAME
146              
147             Cfn::Resource::AWS::Batch::ComputeEnvironment - Cfn resource for AWS::Batch::ComputeEnvironment
148              
149             =head1 DESCRIPTION
150              
151             This module implements a Perl module that represents the CloudFormation object AWS::Batch::ComputeEnvironment.
152              
153             See L<Cfn> for more information on how to use it.
154              
155             =head1 AUTHOR
156              
157             Jose Luis Martinez
158             CAPSiDE
159             jlmartinez@capside.com
160              
161             =head1 COPYRIGHT and LICENSE
162              
163             Copyright (c) 2013 by CAPSiDE
164             This code is distributed under the Apache 2 License. The full text of the
165             license can be found in the LICENSE file included with this module.
166              
167             =cut