Class IpPermission

    • Constructor Detail

      • IpPermission

        public IpPermission()
    • Method Detail

      • setIpProtocol

        public void setIpProtocol​(String ipProtocol)

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

        [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

        Parameters:
        ipProtocol - The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).

        [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

      • getIpProtocol

        public String getIpProtocol()

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

        [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

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

        [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

      • withIpProtocol

        public IpPermission withIpProtocol​(String ipProtocol)

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

        [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

        Parameters:
        ipProtocol - The IP protocol name (for tcp, udp, and icmp) or number (see Protocol Numbers).

        [EC2-VPC only] When you authorize or revoke security group rules, you can use -1 to specify all.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setFromPort

        public void setFromPort​(Integer fromPort)

        The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

        Parameters:
        fromPort - The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.
      • getFromPort

        public Integer getFromPort()

        The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

        Returns:
        The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.
      • withFromPort

        public IpPermission withFromPort​(Integer fromPort)

        The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.

        Parameters:
        fromPort - The start of port range for the TCP and UDP protocols, or an ICMP type number. A value of -1 indicates all ICMP types.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • setToPort

        public void setToPort​(Integer toPort)

        The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

        Parameters:
        toPort - The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.
      • getToPort

        public Integer getToPort()

        The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

        Returns:
        The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.
      • withToPort

        public IpPermission withToPort​(Integer toPort)

        The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.

        Parameters:
        toPort - The end of port range for the TCP and UDP protocols, or an ICMP code. A value of -1 indicates all ICMP codes for the specified ICMP type.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getUserIdGroupPairs

        public List<UserIdGroupPair> getUserIdGroupPairs()

        One or more security group and AWS account ID pairs.

        Returns:
        One or more security group and AWS account ID pairs.
      • setUserIdGroupPairs

        public void setUserIdGroupPairs​(Collection<UserIdGroupPair> userIdGroupPairs)

        One or more security group and AWS account ID pairs.

        Parameters:
        userIdGroupPairs - One or more security group and AWS account ID pairs.
      • withUserIdGroupPairs

        public IpPermission withUserIdGroupPairs​(Collection<UserIdGroupPair> userIdGroupPairs)

        One or more security group and AWS account ID pairs.

        Parameters:
        userIdGroupPairs - One or more security group and AWS account ID pairs.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • getIpRanges

        public List<String> getIpRanges()

        One or more IP ranges.

        Returns:
        One or more IP ranges.
      • setIpRanges

        public void setIpRanges​(Collection<String> ipRanges)

        One or more IP ranges.

        Parameters:
        ipRanges - One or more IP ranges.
      • withIpRanges

        public IpPermission withIpRanges​(Collection<String> ipRanges)

        One or more IP ranges.

        Parameters:
        ipRanges - One or more IP ranges.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • toString

        public String toString()
        Returns a string representation of this object; useful for testing and debugging.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this object.
        See Also:
        Object.toString()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object