File Coverage

blib/lib/Cfn/Resource/AWS/ImageBuilder/ImageRecipe.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::ImageBuilder::ImageRecipe generated from spec 20.1.0
2 1     1   804 use Moose::Util::TypeConstraints;
  1         3  
  1         9  
3              
4             coerce 'Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::ImageBuilder::ImageRecipe {
9 1     1   2238 use Moose;
  1         3  
  1         10  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 4 [ 'Arn' ]
15             }
16             sub supported_regions {
17 1     1 0 1182 [ 'af-south-1','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-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::ImageBuilder::ImageRecipe::EbsInstanceBlockDeviceSpecification',
24             as 'Cfn::Value';
25              
26             coerce 'Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::EbsInstanceBlockDeviceSpecification',
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::ImageBuilder::ImageRecipe::EbsInstanceBlockDeviceSpecification->new( %$_ );
33             }
34             };
35              
36             package Cfn::Resource::Properties::Object::AWS::ImageBuilder::ImageRecipe::EbsInstanceBlockDeviceSpecification {
37 1     1   7554 use Moose;
  1         2  
  1         14  
38 1     1   6703 use MooseX::StrictConstructor;
  1         2  
  1         11  
39             extends 'Cfn::Value::TypedValue';
40            
41             has DeleteOnTermination => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
42             has Encrypted => (isa => 'Cfn::Value::Boolean', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
43             has Iops => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
44             has KmsKeyId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
45             has SnapshotId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
46             has VolumeSize => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
47             has VolumeType => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
48             }
49             subtype 'ArrayOfCfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::InstanceBlockDeviceMapping',
50             as 'Cfn::Value',
51             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
52             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
53              
54             coerce 'ArrayOfCfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::InstanceBlockDeviceMapping',
55             from 'HashRef',
56             via {
57             if (my $f = Cfn::TypeLibrary::try_function($_)) {
58             return $f
59             } else {
60             die 'Only accepts functions';
61             }
62             },
63             from 'ArrayRef',
64             via {
65             Cfn::Value::Array->new(Value => [
66             map {
67             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::InstanceBlockDeviceMapping')->coerce($_)
68             } @$_
69             ]);
70             };
71              
72             subtype 'Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::InstanceBlockDeviceMapping',
73             as 'Cfn::Value';
74              
75             coerce 'Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::InstanceBlockDeviceMapping',
76             from 'HashRef',
77             via {
78             if (my $f = Cfn::TypeLibrary::try_function($_)) {
79             return $f
80             } else {
81             return Cfn::Resource::Properties::Object::AWS::ImageBuilder::ImageRecipe::InstanceBlockDeviceMapping->new( %$_ );
82             }
83             };
84              
85             package Cfn::Resource::Properties::Object::AWS::ImageBuilder::ImageRecipe::InstanceBlockDeviceMapping {
86 1     1   3930 use Moose;
  1         3  
  1         5  
87 1     1   6611 use MooseX::StrictConstructor;
  1         2  
  1         6  
88             extends 'Cfn::Value::TypedValue';
89            
90             has DeviceName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
91             has Ebs => (isa => 'Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::EbsInstanceBlockDeviceSpecification', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
92             has NoDevice => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
93             has VirtualName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
94             }
95             subtype 'ArrayOfCfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::ComponentConfiguration',
96             as 'Cfn::Value',
97             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
98             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
99              
100             coerce 'ArrayOfCfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::ComponentConfiguration',
101             from 'HashRef',
102             via {
103             if (my $f = Cfn::TypeLibrary::try_function($_)) {
104             return $f
105             } else {
106             die 'Only accepts functions';
107             }
108             },
109             from 'ArrayRef',
110             via {
111             Cfn::Value::Array->new(Value => [
112             map {
113             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::ComponentConfiguration')->coerce($_)
114             } @$_
115             ]);
116             };
117              
118             subtype 'Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::ComponentConfiguration',
119             as 'Cfn::Value';
120              
121             coerce 'Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::ComponentConfiguration',
122             from 'HashRef',
123             via {
124             if (my $f = Cfn::TypeLibrary::try_function($_)) {
125             return $f
126             } else {
127             return Cfn::Resource::Properties::Object::AWS::ImageBuilder::ImageRecipe::ComponentConfiguration->new( %$_ );
128             }
129             };
130              
131             package Cfn::Resource::Properties::Object::AWS::ImageBuilder::ImageRecipe::ComponentConfiguration {
132 1     1   3587 use Moose;
  1         4  
  1         14  
133 1     1   6634 use MooseX::StrictConstructor;
  1         2  
  1         5  
134             extends 'Cfn::Value::TypedValue';
135            
136             has ComponentArn => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
137             }
138              
139             package Cfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe {
140 1     1   3384 use Moose;
  1         2  
  1         6  
141 1     1   6775 use MooseX::StrictConstructor;
  1         4  
  1         5  
142             extends 'Cfn::Resource::Properties';
143            
144             has BlockDeviceMappings => (isa => 'ArrayOfCfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::InstanceBlockDeviceMapping', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
145             has Components => (isa => 'ArrayOfCfn::Resource::Properties::AWS::ImageBuilder::ImageRecipe::ComponentConfiguration', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
146             has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
147             has Name => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
148             has ParentImage => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
149             has Tags => (isa => 'Cfn::Value::Hash|Cfn::DynamicValue', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
150             has Version => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
151             has WorkingDirectory => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
152             }
153              
154             1;
155             ### main pod documentation begin ###
156              
157             =encoding UTF-8
158              
159             =head1 NAME
160              
161             Cfn::Resource::AWS::ImageBuilder::ImageRecipe - Cfn resource for AWS::ImageBuilder::ImageRecipe
162              
163             =head1 DESCRIPTION
164              
165             This module implements a Perl module that represents the CloudFormation object AWS::ImageBuilder::ImageRecipe.
166              
167             See L<Cfn> for more information on how to use it.
168              
169             =head1 AUTHOR
170              
171             Jose Luis Martinez
172             CAPSiDE
173             jlmartinez@capside.com
174              
175             =head1 COPYRIGHT and LICENSE
176              
177             Copyright (c) 2013 by CAPSiDE
178             This code is distributed under the Apache 2 License. The full text of the
179             license can be found in the LICENSE file included with this module.
180              
181             =cut