Interface AwsEc2SecurityGroupIpPermission.Builder

    • Method Detail

      • ipProtocol

        AwsEc2SecurityGroupIpPermission.Builder ipProtocol​(String ipProtocol)

        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.

        Parameters:
        ipProtocol - 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:
        Returns a reference to this object so that method calls can be chained together.
      • fromPort

        AwsEc2SecurityGroupIpPermission.Builder fromPort​(Integer fromPort)

        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.

        Parameters:
        fromPort - 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:
        Returns a reference to this object so that method calls can be chained together.
      • toPort

        AwsEc2SecurityGroupIpPermission.Builder toPort​(Integer toPort)

        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.

        Parameters:
        toPort - 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:
        Returns a reference to this object so that method calls can be chained together.
      • userIdGroupPairs

        AwsEc2SecurityGroupIpPermission.Builder userIdGroupPairs​(AwsEc2SecurityGroupUserIdGroupPair... userIdGroupPairs)

        The security group and Amazon Web Services account ID pairs.

        Parameters:
        userIdGroupPairs - The security group and Amazon Web Services account ID pairs.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • prefixListIds

        AwsEc2SecurityGroupIpPermission.Builder prefixListIds​(Collection<AwsEc2SecurityGroupPrefixListId> prefixListIds)

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

        Parameters:
        prefixListIds - [VPC only] The prefix list IDs for an Amazon Web Services service. With outbound rules, this is the Amazon Web Services service to access through a VPC endpoint from instances associated with the security group.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • prefixListIds

        AwsEc2SecurityGroupIpPermission.Builder prefixListIds​(AwsEc2SecurityGroupPrefixListId... prefixListIds)

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

        Parameters:
        prefixListIds - [VPC only] The prefix list IDs for an Amazon Web Services service. With outbound rules, this is the Amazon Web Services service to access through a VPC endpoint from instances associated with the security group.
        Returns:
        Returns a reference to this object so that method calls can be chained together.