File Coverage

blib/lib/Cfn/Resource/AWS/EC2/SecurityGroup.pm
Criterion Covered Total %
statement 26 26 100.0
branch n/a
condition n/a
subroutine 10 10 100.0
pod 0 2 0.0
total 36 38 94.7


line stmt bran cond sub pod time code
1             # AWS::EC2::SecurityGroup generated from spec 18.4.0
2 5     5   3747 use Moose::Util::TypeConstraints;
  5         14  
  5         56  
3              
4             coerce 'Cfn::Resource::Properties::AWS::EC2::SecurityGroup',
5             from 'HashRef',
6             via { Cfn::Resource::Properties::AWS::EC2::SecurityGroup->new( %$_ ) };
7              
8             package Cfn::Resource::AWS::EC2::SecurityGroup {
9 5     5   11037 use Moose;
  5         18  
  5         39  
10             extends 'Cfn::Resource';
11             has Properties => (isa => 'Cfn::Resource::Properties::AWS::EC2::SecurityGroup', is => 'rw', coerce => 1);
12            
13             sub AttributeList {
14 1     1 0 5 [ 'GroupId','VpcId' ]
15             }
16             sub supported_regions {
17 1     1 0 1139 [ '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::EC2::SecurityGroup::Ingress',
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::EC2::SecurityGroup::Ingress',
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::EC2::SecurityGroup::Ingress')->coerce($_)
41             } @$_
42             ]);
43             };
44              
45             subtype 'Cfn::Resource::Properties::AWS::EC2::SecurityGroup::Ingress',
46             as 'Cfn::Value';
47              
48             coerce 'Cfn::Resource::Properties::AWS::EC2::SecurityGroup::Ingress',
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::EC2::SecurityGroup::Ingress->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::Object::AWS::EC2::SecurityGroup::Ingress {
59 5     5   37064 use Moose;
  5         14  
  5         28  
60 5     5   32436 use MooseX::StrictConstructor;
  5         14  
  5         50  
61             extends 'Cfn::Value::TypedValue';
62            
63             has CidrIp => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
64             has CidrIpv6 => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
65             has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
66             has FromPort => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
67             has IpProtocol => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
68             has SourcePrefixListId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
69             has SourceSecurityGroupId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
70             has SourceSecurityGroupName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
71             has SourceSecurityGroupOwnerId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
72             has ToPort => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
73             }
74             subtype 'ArrayOfCfn::Resource::Properties::AWS::EC2::SecurityGroup::Egress',
75             as 'Cfn::Value',
76             where { $_->isa('Cfn::Value::Array') or $_->isa('Cfn::Value::Function') },
77             message { "$_ is not a Cfn::Value or a Cfn::Value::Function" };
78              
79             coerce 'ArrayOfCfn::Resource::Properties::AWS::EC2::SecurityGroup::Egress',
80             from 'HashRef',
81             via {
82             if (my $f = Cfn::TypeLibrary::try_function($_)) {
83             return $f
84             } else {
85             die 'Only accepts functions';
86             }
87             },
88             from 'ArrayRef',
89             via {
90             Cfn::Value::Array->new(Value => [
91             map {
92             Moose::Util::TypeConstraints::find_type_constraint('Cfn::Resource::Properties::AWS::EC2::SecurityGroup::Egress')->coerce($_)
93             } @$_
94             ]);
95             };
96              
97             subtype 'Cfn::Resource::Properties::AWS::EC2::SecurityGroup::Egress',
98             as 'Cfn::Value';
99              
100             coerce 'Cfn::Resource::Properties::AWS::EC2::SecurityGroup::Egress',
101             from 'HashRef',
102             via {
103             if (my $f = Cfn::TypeLibrary::try_function($_)) {
104             return $f
105             } else {
106             return Cfn::Resource::Properties::Object::AWS::EC2::SecurityGroup::Egress->new( %$_ );
107             }
108             };
109              
110             package Cfn::Resource::Properties::Object::AWS::EC2::SecurityGroup::Egress {
111 5     5   19062 use Moose;
  5         11  
  5         31  
112 5     5   32392 use MooseX::StrictConstructor;
  5         20  
  5         28  
113             extends 'Cfn::Value::TypedValue';
114            
115             has CidrIp => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
116             has CidrIpv6 => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
117             has Description => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
118             has DestinationPrefixListId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
119             has DestinationSecurityGroupId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
120             has FromPort => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
121             has IpProtocol => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
122             has ToPort => (isa => 'Cfn::Value::Integer', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
123             }
124              
125             package Cfn::Resource::Properties::AWS::EC2::SecurityGroup {
126 5     5   16652 use Moose;
  5         14  
  5         24  
127 5     5   32532 use MooseX::StrictConstructor;
  5         14  
  5         28  
128             extends 'Cfn::Resource::Properties';
129            
130             has GroupDescription => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, required => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
131             has GroupName => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
132             has SecurityGroupEgress => (isa => 'ArrayOfCfn::Resource::Properties::AWS::EC2::SecurityGroup::Egress', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
133             has SecurityGroupIngress => (isa => 'ArrayOfCfn::Resource::Properties::AWS::EC2::SecurityGroup::Ingress', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
134             has Tags => (isa => 'ArrayOfCfn::Resource::Properties::TagType', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Mutable');
135             has VpcId => (isa => 'Cfn::Value::String', is => 'rw', coerce => 1, traits => [ 'CfnMutability' ], mutability => 'Immutable');
136             }
137              
138             1;
139             ### main pod documentation begin ###
140              
141             =encoding UTF-8
142              
143             =head1 NAME
144              
145             Cfn::Resource::AWS::EC2::SecurityGroup - Cfn resource for AWS::EC2::SecurityGroup
146              
147             =head1 DESCRIPTION
148              
149             This module implements a Perl module that represents the CloudFormation object AWS::EC2::SecurityGroup.
150              
151             See L<Cfn> for more information on how to use it.
152              
153             =head1 AUTHOR
154              
155             Jose Luis Martinez
156             CAPSiDE
157             jlmartinez@capside.com
158              
159             =head1 COPYRIGHT and LICENSE
160              
161             Copyright (c) 2013 by CAPSiDE
162             This code is distributed under the Apache 2 License. The full text of the
163             license can be found in the LICENSE file included with this module.
164              
165             =cut