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

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

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb

Overview

Note:

When making an API call, you may pass IpPermission data as a 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)


23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 23850

class IpPermission < Struct.new(
  :from_port,
  :ip_protocol,
  :ip_ranges,
  :ipv_6_ranges,
  :prefix_list_ids,
  :to_port,
  :user_id_group_pairs)
  include Aws::Structure
end

#ip_protocolString

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

[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 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 icmpv6, the port range is optional; if you omit the port range, traffic for all types and codes is allowed.

Returns:

  • (String)


23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 23850

class IpPermission < Struct.new(
  :from_port,
  :ip_protocol,
  :ip_ranges,
  :ipv_6_ranges,
  :prefix_list_ids,
  :to_port,
  :user_id_group_pairs)
  include Aws::Structure
end

#ip_rangesArray<Types::IpRange>

The IPv4 ranges.

Returns:



23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 23850

class IpPermission < Struct.new(
  :from_port,
  :ip_protocol,
  :ip_ranges,
  :ipv_6_ranges,
  :prefix_list_ids,
  :to_port,
  :user_id_group_pairs)
  include Aws::Structure
end

#ipv_6_rangesArray<Types::Ipv6Range>

[VPC only] The IPv6 ranges.

Returns:



23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 23850

class IpPermission < Struct.new(
  :from_port,
  :ip_protocol,
  :ip_ranges,
  :ipv_6_ranges,
  :prefix_list_ids,
  :to_port,
  :user_id_group_pairs)
  include Aws::Structure
end

#prefix_list_idsArray<Types::PrefixListId>

[VPC only] The prefix list IDs for an AWS service. With outbound rules, this is the AWS service to access through a VPC endpoint from instances associated with the security group.

Returns:



23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 23850

class IpPermission < Struct.new(
  :from_port,
  :ip_protocol,
  :ip_ranges,
  :ipv_6_ranges,
  :prefix_list_ids,
  :to_port,
  :user_id_group_pairs)
  include Aws::Structure
end

#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. If you specify all ICMP/ICMPv6 types, you must specify all codes.

Returns:

  • (Integer)


23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 23850

class IpPermission < Struct.new(
  :from_port,
  :ip_protocol,
  :ip_ranges,
  :ipv_6_ranges,
  :prefix_list_ids,
  :to_port,
  :user_id_group_pairs)
  include Aws::Structure
end

#user_id_group_pairsArray<Types::UserIdGroupPair>

The security group and AWS account ID pairs.

Returns:



23850
23851
23852
23853
23854
23855
23856
23857
23858
23859
# File 'gems/aws-sdk-ec2/lib/aws-sdk-ec2/types.rb', line 23850

class IpPermission < Struct.new(
  :from_port,
  :ip_protocol,
  :ip_ranges,
  :ipv_6_ranges,
  :prefix_list_ids,
  :to_port,
  :user_id_group_pairs)
  include Aws::Structure
end