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 5.3.0
2 5     5   3265 use Moose::Util::TypeConstraints;
  5         17  
  5         48  
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   9796 use Moose;
  5         13  
  5         36  
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 4 [ 'GroupId','VpcId' ]
15             }
16             sub supported_regions {
17 1     1 0 1181 [ '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-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::AWS::EC2::SecurityGroup::IngressValue->new( %$_ );
55             }
56             };
57              
58             package Cfn::Resource::Properties::AWS::EC2::SecurityGroup::IngressValue {
59 5     5   33229 use Moose;
  5         12  
  5         33  
60 5     5   29401 use MooseX::StrictConstructor;
  5         14  
  5         44  
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::AWS::EC2::SecurityGroup::EgressValue->new( %$_ );
107             }
108             };
109              
110             package Cfn::Resource::Properties::AWS::EC2::SecurityGroup::EgressValue {
111 5     5   17128 use Moose;
  5         30  
  5         68  
112 5     5   29349 use MooseX::StrictConstructor;
  5         13  
  5         22  
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   14802 use Moose;
  5         15  
  5         23  
127 5     5   28996 use MooseX::StrictConstructor;
  5         12  
  5         26  
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;