@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class IpPermission extends Object implements Serializable, Cloneable
Describes a set of 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 ranges.
|
List<Ipv6Range> |
getIpv6Ranges()
[VPC only] The IPv6 ranges.
|
List<PrefixListId> |
getPrefixListIds()
[VPC only] 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 ranges.
|
void |
setIpv6Ranges(Collection<Ipv6Range> ipv6Ranges)
[VPC only] The IPv6 ranges.
|
void |
setPrefixListIds(Collection<PrefixListId> prefixListIds)
[VPC only] 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 ranges.
|
IpPermission |
withIpv4Ranges(IpRange... ipv4Ranges)
The IPv4 ranges.
|
IpPermission |
withIpv6Ranges(Collection<Ipv6Range> ipv6Ranges)
[VPC only] The IPv6 ranges.
|
IpPermission |
withIpv6Ranges(Ipv6Range... ipv6Ranges)
[VPC only] The IPv6 ranges.
|
IpPermission |
withPrefixListIds(Collection<PrefixListId> prefixListIds)
[VPC only] The prefix list IDs.
|
IpPermission |
withPrefixListIds(PrefixListId... prefixListIds)
[VPC only] 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 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.
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 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6
types, you must specify all ICMP/ICMPv6 codes.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 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.
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 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 codes.
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 type number. A value of -1 indicates all ICMP/ICMPv6 types. If you specify all ICMP/ICMPv6
types, you must specify all ICMP/ICMPv6 codes.public void setIpProtocol(String ipProtocol)
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.
ipProtocol
- 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.
public String getIpProtocol()
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.
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.
public IpPermission withIpProtocol(String ipProtocol)
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.
ipProtocol
- 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.
public List<Ipv6Range> getIpv6Ranges()
[VPC only] The IPv6 ranges.
public void setIpv6Ranges(Collection<Ipv6Range> ipv6Ranges)
[VPC only] The IPv6 ranges.
ipv6Ranges
- [VPC only] The IPv6 ranges.public IpPermission withIpv6Ranges(Ipv6Range... ipv6Ranges)
[VPC only] The IPv6 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
- [VPC only] The IPv6 ranges.public IpPermission withIpv6Ranges(Collection<Ipv6Range> ipv6Ranges)
[VPC only] The IPv6 ranges.
ipv6Ranges
- [VPC only] The IPv6 ranges.public List<PrefixListId> getPrefixListIds()
[VPC only] The prefix list IDs.
public void setPrefixListIds(Collection<PrefixListId> prefixListIds)
[VPC only] The prefix list IDs.
prefixListIds
- [VPC only] The prefix list IDs.public IpPermission withPrefixListIds(PrefixListId... prefixListIds)
[VPC only] 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
- [VPC only] The prefix list IDs.public IpPermission withPrefixListIds(Collection<PrefixListId> prefixListIds)
[VPC only] The prefix list IDs.
prefixListIds
- [VPC only] 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 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 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 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must
specify all ICMP/ICMPv6 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 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 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 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must specify all ICMP/ICMPv6 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 code. A value of -1 indicates all ICMP/ICMPv6 codes. If you specify all ICMP/ICMPv6 types, you must
specify all ICMP/ICMPv6 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 void setIpv4Ranges(Collection<IpRange> ipv4Ranges)
The IPv4 ranges.
ipv4Ranges
- The IPv4 ranges.public IpPermission withIpv4Ranges(IpRange... ipv4Ranges)
The IPv4 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 ranges.public IpPermission withIpv4Ranges(Collection<IpRange> ipv4Ranges)
The IPv4 ranges.
ipv4Ranges
- The IPv4 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()