You are viewing documentation for version 2 of the AWS SDK for Ruby. Version 3 documentation can be found here.

Class: Aws::EC2::Types::IpPermission

Inherits:
Struct
  • Object
show all
Defined in:
(unknown)

Overview

Note:

When passing IpPermission as input to an Aws::Client method, you can use a vanilla Hash:

{
  from_port: 1,
  ip_protocol: "String",
  ip_ranges: [
    {
      cidr_ip: "String",
      description: "String",
    },
  ],
  ipv_6_ranges: [
    {
      cidr_ipv_6: "String",
      description: "String",
    },
  ],
  prefix_list_ids: [
    {
      description: "String",
      prefix_list_id: "String",
    },
  ],
  to_port: 1,
  user_id_group_pairs: [
    {
      description: "String",
      group_id: "String",
      group_name: "String",
      peering_status: "String",
      user_id: "String",
      vpc_id: "String",
      vpc_peering_connection_id: "String",
    },
  ],
}

Describes a set of permissions for a security group rule.

Instance Attribute Summary collapse

Instance Attribute Details

#from_portInteger

The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all codes.

Returns:

  • (Integer)

    The start of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 type number.

#ip_protocolString

The IP protocol name (tcp, udp, icmp) or number (see Protocol Numbers).

[EC2-VPC only] Use -1 to specify all protocols. When authorizing security group rules, specifying -1 or a protocol number other than tcp, udp, icmp, or 58 (ICMPv6) allows traffic on all ports, regardless of any port range you specify. For tcp, udp, and icmp, you must specify a port range. For 58 (ICMPv6), you can optionally specify a port range; if you don\'t, traffic for all types and codes is allowed when authorizing rules.

Returns:

  • (String)

    The IP protocol name (tcp, udp, icmp) or number (see [Protocol Numbers][1]).

#ip_rangesArray<Types::IpRange>

One or more IPv4 ranges.

Returns:

#ipv_6_rangesArray<Types::Ipv6Range>

[EC2-VPC only] One or more IPv6 ranges.

Returns:

#prefix_list_idsArray<Types::PrefixListId>

(Valid for AuthorizeSecurityGroupEgress, RevokeSecurityGroupEgress and DescribeSecurityGroups only) One or more prefix list IDs for an AWS service. In an AuthorizeSecurityGroupEgress request, this is the AWS service that you want to access through a VPC endpoint from instances associated with the security group.

Returns:

#to_portInteger

The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code. A value of -1 indicates all ICMP/ICMPv6 codes for the specified ICMP type. If you specify all ICMP/ICMPv6 types, you must specify all codes.

Returns:

  • (Integer)

    The end of port range for the TCP and UDP protocols, or an ICMP/ICMPv6 code.

#user_id_group_pairsArray<Types::UserIdGroupPair>

One or more security group and AWS account ID pairs.

Returns: