@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class IpPermission extends Object implements Serializable, Cloneable
Describes the permissions for a security group rule.
Constructor and Description |
---|
IpPermission() |
Modifier and Type | Method and Description |
---|---|
IpPermission |
clone() |
boolean |
equals(Object obj) |
Integer |
getFromPort()
If the protocol is TCP or UDP, this is the start of the port range.
|
String |
getIpProtocol()
|
List<String> |
getIpRanges()
Deprecated.
Use
getIpv4Ranges() . |
List<IpRange> |
getIpv4Ranges()
The IPv4 address ranges.
|
List<Ipv6Range> |
getIpv6Ranges()
The IPv6 address ranges.
|
List<PrefixListId> |
getPrefixListIds()
The prefix list IDs.
|
Integer |
getToPort()
If the protocol is TCP or UDP, this is the end of the port range.
|
List<UserIdGroupPair> |
getUserIdGroupPairs()
The security group and Amazon Web Services account ID pairs.
|
int |
hashCode() |
void |
setFromPort(Integer fromPort)
If the protocol is TCP or UDP, this is the start of the port range.
|
void |
setIpProtocol(String ipProtocol)
|
void |
setIpRanges(Collection<String> ipRanges)
Deprecated.
|
void |
setIpv4Ranges(Collection<IpRange> ipv4Ranges)
The IPv4 address ranges.
|
void |
setIpv6Ranges(Collection<Ipv6Range> ipv6Ranges)
The IPv6 address ranges.
|
void |
setPrefixListIds(Collection<PrefixListId> prefixListIds)
The prefix list IDs.
|
void |
setToPort(Integer toPort)
If the protocol is TCP or UDP, this is the end of the port range.
|
void |
setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
|
String |
toString()
Returns a string representation of this object.
|
IpPermission |
withFromPort(Integer fromPort)
If the protocol is TCP or UDP, this is the start of the port range.
|
IpPermission |
withIpProtocol(String ipProtocol)
|
IpPermission |
withIpRanges(Collection<String> ipRanges)
Deprecated.
|
IpPermission |
withIpRanges(String... ipRanges)
Deprecated.
|
IpPermission |
withIpv4Ranges(Collection<IpRange> ipv4Ranges)
The IPv4 address ranges.
|
IpPermission |
withIpv4Ranges(IpRange... ipv4Ranges)
The IPv4 address ranges.
|
IpPermission |
withIpv6Ranges(Collection<Ipv6Range> ipv6Ranges)
The IPv6 address ranges.
|
IpPermission |
withIpv6Ranges(Ipv6Range... ipv6Ranges)
The IPv6 address ranges.
|
IpPermission |
withPrefixListIds(Collection<PrefixListId> prefixListIds)
The prefix list IDs.
|
IpPermission |
withPrefixListIds(PrefixListId... prefixListIds)
The prefix list IDs.
|
IpPermission |
withToPort(Integer toPort)
If the protocol is TCP or UDP, this is the end of the port range.
|
IpPermission |
withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
|
IpPermission |
withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
|
public void setFromPort(Integer fromPort)
If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).
fromPort
- If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6,
this is the ICMP type or -1 (all ICMP types).public Integer getFromPort()
If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).
public IpPermission withFromPort(Integer fromPort)
If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP type or -1 (all ICMP types).
fromPort
- If the protocol is TCP or UDP, this is the start of the port range. If the protocol is ICMP or ICMPv6,
this is the ICMP type or -1 (all ICMP types).public void setIpProtocol(String ipProtocol)
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number (see
Protocol Numbers).
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.
ipProtocol
- The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or
number (see Protocol
Numbers).
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.
public String getIpProtocol()
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number (see
Protocol Numbers).
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.
tcp
, udp
, icmp
, icmpv6
) or
number (see Protocol
Numbers).
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.
public IpPermission withIpProtocol(String ipProtocol)
The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or number (see
Protocol Numbers).
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.
ipProtocol
- The IP protocol name (tcp
, udp
, icmp
, icmpv6
) or
number (see Protocol
Numbers).
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.
public List<Ipv6Range> getIpv6Ranges()
The IPv6 address ranges.
public void setIpv6Ranges(Collection<Ipv6Range> ipv6Ranges)
The IPv6 address ranges.
ipv6Ranges
- The IPv6 address ranges.public IpPermission withIpv6Ranges(Ipv6Range... ipv6Ranges)
The IPv6 address ranges.
NOTE: This method appends the values to the existing list (if any). Use
setIpv6Ranges(java.util.Collection)
or withIpv6Ranges(java.util.Collection)
if you want to
override the existing values.
ipv6Ranges
- The IPv6 address ranges.public IpPermission withIpv6Ranges(Collection<Ipv6Range> ipv6Ranges)
The IPv6 address ranges.
ipv6Ranges
- The IPv6 address ranges.public List<PrefixListId> getPrefixListIds()
The prefix list IDs.
public void setPrefixListIds(Collection<PrefixListId> prefixListIds)
The prefix list IDs.
prefixListIds
- The prefix list IDs.public IpPermission withPrefixListIds(PrefixListId... prefixListIds)
The prefix list IDs.
NOTE: This method appends the values to the existing list (if any). Use
setPrefixListIds(java.util.Collection)
or withPrefixListIds(java.util.Collection)
if you want
to override the existing values.
prefixListIds
- The prefix list IDs.public IpPermission withPrefixListIds(Collection<PrefixListId> prefixListIds)
The prefix list IDs.
prefixListIds
- The prefix list IDs.public void setToPort(Integer toPort)
If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
toPort
- If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this
is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must
be -1 (all ICMP codes).public Integer getToPort()
If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
public IpPermission withToPort(Integer toPort)
If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must be -1 (all ICMP codes).
toPort
- If the protocol is TCP or UDP, this is the end of the port range. If the protocol is ICMP or ICMPv6, this
is the ICMP code or -1 (all ICMP codes). If the start port is -1 (all ICMP types), then the end port must
be -1 (all ICMP codes).public List<UserIdGroupPair> getUserIdGroupPairs()
The security group and Amazon Web Services account ID pairs.
public void setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
userIdGroupPairs
- The security group and Amazon Web Services account ID pairs.public IpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
NOTE: This method appends the values to the existing list (if any). Use
setUserIdGroupPairs(java.util.Collection)
or withUserIdGroupPairs(java.util.Collection)
if you
want to override the existing values.
userIdGroupPairs
- The security group and Amazon Web Services account ID pairs.public IpPermission withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
The security group and Amazon Web Services account ID pairs.
userIdGroupPairs
- The security group and Amazon Web Services account ID pairs.public List<IpRange> getIpv4Ranges()
The IPv4 address ranges.
public void setIpv4Ranges(Collection<IpRange> ipv4Ranges)
The IPv4 address ranges.
ipv4Ranges
- The IPv4 address ranges.public IpPermission withIpv4Ranges(IpRange... ipv4Ranges)
The IPv4 address ranges.
NOTE: This method appends the values to the existing list (if any). Use
setIpv4Ranges(java.util.Collection)
or withIpv4Ranges(java.util.Collection)
if you want to
override the existing values.
ipv4Ranges
- The IPv4 address ranges.public IpPermission withIpv4Ranges(Collection<IpRange> ipv4Ranges)
The IPv4 address ranges.
ipv4Ranges
- The IPv4 address ranges.@Deprecated public List<String> getIpRanges()
getIpv4Ranges()
.One or more IP ranges.
@Deprecated public void setIpRanges(Collection<String> ipRanges)
setIpv4Ranges(java.util.Collection)
One or more IP ranges.
ipRanges
- One or more IP ranges.@Deprecated public IpPermission withIpRanges(String... ipRanges)
withIpv4Ranges(IpRange...)
One or more IP ranges.
NOTE: This method appends the values to the existing list (if any). Use
setIpRanges(java.util.Collection)
or withIpRanges(java.util.Collection)
if you want to override
the existing values.
ipRanges
- One or more IP ranges.@Deprecated public IpPermission withIpRanges(Collection<String> ipRanges)
withIpv4Ranges(java.util.Collection)
One or more IP ranges.
ipRanges
- One or more IP ranges.public String toString()
toString
in class Object
Object.toString()
public IpPermission clone()