blib/lib/Paws/EC2/AuthorizeSecurityGroupIngress.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod n/a totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1  
2 package Paws::EC2::AuthorizeSecurityGroupIngress;
3 use Moose;
4 has CidrIp => (is => 'ro', isa => 'Str');
5 has DryRun => (is => 'ro', isa => 'Bool', traits => ['NameInRequest'], request_name => 'dryRun' );
6 has FromPort => (is => 'ro', isa => 'Int');
7 has GroupId => (is => 'ro', isa => 'Str');
8 has GroupName => (is => 'ro', isa => 'Str');
9 has IpPermissions => (is => 'ro', isa => 'ArrayRef[Paws::EC2::IpPermission]');
10 has IpProtocol => (is => 'ro', isa => 'Str');
11 has SourceSecurityGroupName => (is => 'ro', isa => 'Str');
12 has SourceSecurityGroupOwnerId => (is => 'ro', isa => 'Str');
13 has ToPort => (is => 'ro', isa => 'Int');
14  
15 use MooseX::ClassAttribute;
16  
17 class_has _api_call => (isa => 'Str', is => 'ro', default => 'AuthorizeSecurityGroupIngress');
18 class_has _returns => (isa => 'Str', is => 'ro', default => 'Paws::API::Response');
19 class_has _result_key => (isa => 'Str', is => 'ro');
20 1;
21  
22 ### main pod documentation begin ###
23  
24 =head1 NAME
25  
26 Paws::EC2::AuthorizeSecurityGroupIngress - Arguments for method AuthorizeSecurityGroupIngress on L<Paws::EC2>
27  
28 =head1 DESCRIPTION
29  
30 This class represents the parameters used for calling the method AuthorizeSecurityGroupIngress on the
31 L<Amazon Elastic Compute Cloud|Paws::EC2> service. Use the attributes of this class
32 as arguments to method AuthorizeSecurityGroupIngress.
33  
34 You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to AuthorizeSecurityGroupIngress.
35  
36 =head1 SYNOPSIS
37  
38 my $ec2 = Paws->service('EC2');
39 # To add a rule that allows inbound SSH traffic from an IPv4 address range
40 # This example enables inbound traffic on TCP port 22 (SSH). The rule includes a
41 # description to help you identify it later.
42 $ec2->AuthorizeSecurityGroupIngress(
43 'GroupId' => 'sg-903004f8',
44 'IpPermissions' => [
45  
46 {
47 'FromPort' => 22,
48 'IpProtocol' => 'tcp',
49 'IpRanges' => [
50  
51 {
52 'CidrIp' => '203.0.113.0/24',
53 'Description' => 'SSH access from the LA office'
54 }
55 ],
56 'ToPort' => 22
57 }
58 ]
59 );
60  
61 # To add a rule that allows inbound HTTP traffic from another security group
62 # This example enables inbound traffic on TCP port 80 from the specified
63 # security group. The group must be in the same VPC or a peer VPC. Incoming
64 # traffic is allowed based on the private IP addresses of instances that are
65 # associated with the specified security group.
66 $ec2->AuthorizeSecurityGroupIngress(
67 'GroupId' => 'sg-111aaa22',
68 'IpPermissions' => [
69  
70 {
71 'FromPort' => 80,
72 'IpProtocol' => 'tcp',
73 'ToPort' => 80,
74 'UserIdGroupPairs' => [
75  
76 {
77 'Description' => 'HTTP access from other instances',
78 'GroupId' => 'sg-1a2b3c4d'
79 }
80 ]
81 }
82 ]
83 );
84  
85 # To add a rule that allows inbound RDP traffic from an IPv6 address range
86 # This example adds an inbound rule that allows RDP traffic from the specified
87 # IPv6 address range. The rule includes a description to help you identify it
88 # later.
89 $ec2->AuthorizeSecurityGroupIngress(
90 'GroupId' => 'sg-123abc12 ',
91 'IpPermissions' => [
92  
93 {
94 'FromPort' => 3389,
95 'IpProtocol' => 'tcp',
96 'Ipv6Ranges' => [
97  
98 {
99 'CidrIpv6' => '2001:db8:1234:1a00::/64',
100 'Description' => 'RDP access from the NY office'
101 }
102 ],
103 'ToPort' => 3389
104 }
105 ]
106 );
107  
108  
109 Values for attributes that are native types (Int, String, Float, etc) can passed as-is (scalar values). Values for complex Types (objects) can be passed as a HashRef. The keys and values of the hashref will be used to instance the underlying object.
110 For the AWS API documentation, see L<https://docs.aws.amazon.com/goto/WebAPI/ec2/AuthorizeSecurityGroupIngress>
111  
112 =head1 ATTRIBUTES
113  
114  
115 =head2 CidrIp => Str
116  
117 The IPv4 address range, in CIDR format. You can't specify this
118 parameter when specifying a source security group. To specify an IPv6
119 address range, use a set of IP permissions.
120  
121 Alternatively, use a set of IP permissions to specify multiple rules
122 and a description for the rule.
123  
124  
125  
126 =head2 DryRun => Bool
127  
128 Checks whether you have the required permissions for the action,
129 without actually making the request, and provides an error response. If
130 you have the required permissions, the error response is
131 C<DryRunOperation>. Otherwise, it is C<UnauthorizedOperation>.
132  
133  
134  
135 =head2 FromPort => Int
136  
137 The start of port range for the TCP and UDP protocols, or an ICMP type
138 number. For the ICMP type number, use C<-1> to specify all types. If
139 you specify all ICMP types, you must specify all codes.
140  
141 Alternatively, use a set of IP permissions to specify multiple rules
142 and a description for the rule.
143  
144  
145  
146 =head2 GroupId => Str
147  
148 The ID of the security group. You must specify either the security
149 group ID or the security group name in the request. For security groups
150 in a nondefault VPC, you must specify the security group ID.
151  
152  
153  
154 =head2 GroupName => Str
155  
156 [EC2-Classic, default VPC] The name of the security group. You must
157 specify either the security group ID or the security group name in the
158 request.
159  
160  
161  
162 =head2 IpPermissions => ArrayRef[L<Paws::EC2::IpPermission>]
163  
164 The sets of IP permissions.
165  
166  
167  
168 =head2 IpProtocol => Str
169  
170 The IP protocol name (C<tcp>, C<udp>, C<icmp>) or number (see Protocol
171 Numbers
172 (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)).
173 To specify C<icmpv6>, use a set of IP permissions.
174  
175 [VPC only] Use C<-1> to specify all protocols. If you specify C<-1> or
176 a protocol other than C<tcp>, C<udp>, or C<icmp>, traffic on all ports
177 is allowed, regardless of any ports you specify.
178  
179 Alternatively, use a set of IP permissions to specify multiple rules
180 and a description for the rule.
181  
182  
183  
184 =head2 SourceSecurityGroupName => Str
185  
186 [EC2-Classic, default VPC] The name of the source security group. You
187 can't specify this parameter in combination with the following
188 parameters: the CIDR IP address range, the start of the port range, the
189 IP protocol, and the end of the port range. Creates rules that grant
190 full ICMP, UDP, and TCP access. To create a rule with a specific IP
191 protocol and port range, use a set of IP permissions instead. For
192 EC2-VPC, the source security group must be in the same VPC.
193  
194  
195  
196 =head2 SourceSecurityGroupOwnerId => Str
197  
198 [nondefault VPC] The AWS account ID for the source security group, if
199 the source security group is in a different account. You can't specify
200 this parameter in combination with the following parameters: the CIDR
201 IP address range, the IP protocol, the start of the port range, and the
202 end of the port range. Creates rules that grant full ICMP, UDP, and TCP
203 access. To create a rule with a specific IP protocol and port range,
204 use a set of IP permissions instead.
205  
206  
207  
208 =head2 ToPort => Int
209  
210 The end of port range for the TCP and UDP protocols, or an ICMP code
211 number. For the ICMP code number, use C<-1> to specify all codes. If
212 you specify all ICMP types, you must specify all codes.
213  
214 Alternatively, use a set of IP permissions to specify multiple rules
215 and a description for the rule.
216  
217  
218  
219  
220 =head1 SEE ALSO
221  
222 This class forms part of L<Paws>, documenting arguments for method AuthorizeSecurityGroupIngress in L<Paws::EC2>
223  
224 =head1 BUGS and CONTRIBUTIONS
225  
226 The source code is located here: L<https://github.com/pplu/aws-sdk-perl>
227  
228 Please report bugs to: L<https://github.com/pplu/aws-sdk-perl/issues>
229  
230 =cut
231