Class: Aws::SecurityHub::Types::AwsEc2SecurityGroupIpPermission

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

Overview

Note:

When making an API call, you may pass AwsEc2SecurityGroupIpPermission data as a hash:

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

An IP permission for an EC2 security group.

Instance Attribute Summary collapse

Instance Attribute Details

#from_portInteger

The start of the 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)


1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/types.rb', line 1017

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

#ip_protocolString

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

[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)


1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/types.rb', line 1017

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

#ip_rangesArray<Types::AwsEc2SecurityGroupIpRange>

The IPv4 ranges.



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/types.rb', line 1017

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

#ipv_6_rangesArray<Types::AwsEc2SecurityGroupIpv6Range>

The IPv6 ranges.



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/types.rb', line 1017

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

#prefix_list_idsArray<Types::AwsEc2SecurityGroupPrefixListId>

[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.



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/types.rb', line 1017

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

#to_portInteger

The end of the 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)


1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/types.rb', line 1017

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

#user_id_group_pairsArray<Types::AwsEc2SecurityGroupUserIdGroupPair>

The security group and AWS account ID pairs.



1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
# File 'gems/aws-sdk-securityhub/lib/aws-sdk-securityhub/types.rb', line 1017

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