line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Amazon::EC2::IpPermission; |
2
|
2
|
|
|
2
|
|
1182
|
use Moose; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
13
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
=head1 NAME |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
Net::Amazon::EC2::IpPermission |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
=head1 DESCRIPTION |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
A class representing a rule within the security group. |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 ATTRIBUTES |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=over |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=item ip_protocol (required) |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Protocol for the rule. e.g. tcp |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=item from_port (required) |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
Start of port range for the TCP and UDP protocols, or an |
23
|
|
|
|
|
|
|
ICMP type number. An ICMP type number of -1 indicates a |
24
|
|
|
|
|
|
|
wildcard (i.e., any ICMP type number). |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=item to_port (required) |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
End of port range for the TCP and UDP protocols, or an |
29
|
|
|
|
|
|
|
ICMP code. An ICMP code of -1 indicates a wildcard (i.e., |
30
|
|
|
|
|
|
|
any ICMP code). |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=item ip_ranges (optional) |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
An array ref of Net::Amazon::EC2::IpRange objects to be associated with this rule. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=item groups (optional) |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
An array ref of Net::Amazon::EC2::UserIdGroupPair objects to be associated with this rule. |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=item icmp_port (optional) |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
For the ICMP protocol, the ICMP type and code must be specified. This must be specified in the format type:code where both are integers. Type, code, |
43
|
|
|
|
|
|
|
or both can be specified as -1, which is a wildcard. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=back |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=cut |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
has 'ip_protocol' => ( is => 'ro', isa => 'Str', required => 1 ); |
50
|
|
|
|
|
|
|
has 'from_port' => ( is => 'ro', isa => 'Maybe[Int]', required => 1 ); |
51
|
|
|
|
|
|
|
has 'to_port' => ( is => 'ro', isa => 'Maybe[Int]', required => 1 ); |
52
|
|
|
|
|
|
|
has 'ip_ranges' => ( |
53
|
|
|
|
|
|
|
is => 'rw', |
54
|
|
|
|
|
|
|
isa => 'ArrayRef[Net::Amazon::EC2::IpRange]', |
55
|
|
|
|
|
|
|
predicate => 'has_ip_ranges', |
56
|
|
|
|
|
|
|
required => 0, |
57
|
|
|
|
|
|
|
); |
58
|
|
|
|
|
|
|
has 'groups' => ( |
59
|
|
|
|
|
|
|
is => 'rw', |
60
|
|
|
|
|
|
|
isa => 'ArrayRef[Net::Amazon::EC2::UserIdGroupPair]', |
61
|
|
|
|
|
|
|
predicate => 'has_groups', |
62
|
|
|
|
|
|
|
required => 0, |
63
|
|
|
|
|
|
|
); |
64
|
|
|
|
|
|
|
has 'icmp_port' => ( is => 'ro', isa => 'Maybe[Str]', required => 0 ); |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable(); |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 AUTHOR |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
Jeff Kim <cpan@chosec.com> |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head1 COPYRIGHT |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Copyright (c) 2006-2010 Jeff Kim. This program is free software; you can redistribute it and/or modify it |
75
|
|
|
|
|
|
|
under the same terms as Perl itself. |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
|
79
|
2
|
|
|
2
|
|
13810
|
no Moose; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
11
|
|
80
|
|
|
|
|
|
|
1; |