GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
Paws::EC2::AuthorizeSecurityGroupIngress(3) User Contributed Perl Documentation Paws::EC2::AuthorizeSecurityGroupIngress(3)

Paws::EC2::AuthorizeSecurityGroupIngress - Arguments for method AuthorizeSecurityGroupIngress on Paws::EC2

This class represents the parameters used for calling the method AuthorizeSecurityGroupIngress on the Amazon Elastic Compute Cloud service. Use the attributes of this class as arguments to method AuthorizeSecurityGroupIngress.

You shouldn't make instances of this class. Each attribute should be used as a named argument in the call to AuthorizeSecurityGroupIngress.

    my $ec2 = Paws->service('EC2');
# To add a rule that allows inbound SSH traffic from an IPv4 address range
# This example enables inbound traffic on TCP port 22 (SSH). The rule includes a
# description to help you identify it later.
    $ec2->AuthorizeSecurityGroupIngress(
      'GroupId'       => 'sg-903004f8',
      'IpPermissions' => [
        {
          'FromPort'   => 22,
          'IpProtocol' => 'tcp',
          'IpRanges'   => [
            {
              'CidrIp'      => '203.0.113.0/24',
              'Description' => 'SSH access from the LA office'
            }
          ],
          'ToPort' => 22
        }
      ]
    );
    # To add a rule that allows inbound HTTP traffic from another security group
    # This example enables inbound traffic on TCP port 80 from the specified
    # security group. The group must be in the same VPC or a peer VPC. Incoming
    # traffic is allowed based on the private IP addresses of instances that are
    # associated with the specified security group.
    $ec2->AuthorizeSecurityGroupIngress(
      'GroupId'       => 'sg-111aaa22',
      'IpPermissions' => [
        {
          'FromPort'         => 80,
          'IpProtocol'       => 'tcp',
          'ToPort'           => 80,
          'UserIdGroupPairs' => [
            {
              'Description' => 'HTTP access from other instances',
              'GroupId'     => 'sg-1a2b3c4d'
            }
          ]
        }
      ]
    );
  # To add a rule that allows inbound RDP traffic from an IPv6 address range
  # This example adds an inbound rule that allows RDP traffic from the specified
  # IPv6 address range. The rule includes a description to help you identify it
  # later.
    $ec2->AuthorizeSecurityGroupIngress(
      'GroupId'       => 'sg-123abc12 ',
      'IpPermissions' => [
        {
          'FromPort'   => 3389,
          'IpProtocol' => 'tcp',
          'Ipv6Ranges' => [
            {
              'CidrIpv6'    => '2001:db8:1234:1a00::/64',
              'Description' => 'RDP access from the NY office'
            }
          ],
          'ToPort' => 3389
        }
      ]
    );

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. For the AWS API documentation, see <https://docs.aws.amazon.com/goto/WebAPI/ec2/AuthorizeSecurityGroupIngress>

The IPv4 address range, in CIDR format. You can't specify this parameter when specifying a source security group. To specify an IPv6 address range, use a set of IP permissions.

Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is "DryRunOperation". Otherwise, it is "UnauthorizedOperation".

The start of port range for the TCP and UDP protocols, or an ICMP type number. For the ICMP type number, use -1 to specify all types. If you specify all ICMP types, you must specify all codes.

Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

The ID of the security group. You must specify either the security group ID or the security group name in the request. For security groups in a nondefault VPC, you must specify the security group ID.

[EC2-Classic, default VPC] The name of the security group. You must specify either the security group ID or the security group name in the request.

The sets of IP permissions.

The IP protocol name ("tcp", "udp", "icmp") or number (see Protocol Numbers (http://www.iana.org/assignments/protocol-numbers/protocol-numbers.xhtml)). To specify "icmpv6", use a set of IP permissions.

[VPC only] Use -1 to specify all protocols. If you specify -1 or a protocol other than "tcp", "udp", or "icmp", traffic on all ports is allowed, regardless of any ports you specify.

Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

[EC2-Classic, default VPC] The name of the source security group. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the start of the port range, the IP protocol, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead. For EC2-VPC, the source security group must be in the same VPC.

[nondefault VPC] The AWS account ID for the source security group, if the source security group is in a different account. You can't specify this parameter in combination with the following parameters: the CIDR IP address range, the IP protocol, the start of the port range, and the end of the port range. Creates rules that grant full ICMP, UDP, and TCP access. To create a rule with a specific IP protocol and port range, use a set of IP permissions instead.

The end of port range for the TCP and UDP protocols, or an ICMP code number. For the ICMP code number, use -1 to specify all codes. If you specify all ICMP types, you must specify all codes.

Alternatively, use a set of IP permissions to specify multiple rules and a description for the rule.

This class forms part of Paws, documenting arguments for method AuthorizeSecurityGroupIngress in Paws::EC2

The source code is located here: <https://github.com/pplu/aws-sdk-perl>

Please report bugs to: <https://github.com/pplu/aws-sdk-perl/issues>

2022-06-01 perl v5.40.2

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.