public class IpPermission extends Object implements Serializable
An IP permission describing allowed incoming IP traffic to an Amazon EC2 security group.
Constructor and Description |
---|
IpPermission() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Integer |
getFromPort()
Start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
String |
getIpProtocol()
The IP protocol of this permission.
|
List<String> |
getIpRanges()
The list of CIDR IP ranges included in this permission.
|
Integer |
getToPort()
End of port range for the TCP and UDP protocols, or an ICMP code.
|
List<UserIdGroupPair> |
getUserIdGroupPairs()
The list of AWS user IDs and groups included in this permission.
|
int |
hashCode() |
void |
setFromPort(Integer fromPort)
Start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
void |
setIpProtocol(String ipProtocol)
The IP protocol of this permission.
|
void |
setIpRanges(Collection<String> ipRanges)
The list of CIDR IP ranges included in this permission.
|
void |
setToPort(Integer toPort)
End of port range for the TCP and UDP protocols, or an ICMP code.
|
void |
setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
The list of AWS user IDs and groups included in this permission.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
IpPermission |
withFromPort(Integer fromPort)
Start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
IpPermission |
withIpProtocol(String ipProtocol)
The IP protocol of this permission.
|
IpPermission |
withIpRanges(Collection<String> ipRanges)
The list of CIDR IP ranges included in this permission.
|
IpPermission |
withIpRanges(String... ipRanges)
The list of CIDR IP ranges included in this permission.
|
IpPermission |
withToPort(Integer toPort)
End of port range for the TCP and UDP protocols, or an ICMP code.
|
IpPermission |
withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
The list of AWS user IDs and groups included in this permission.
|
IpPermission |
withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
The list of AWS user IDs and groups included in this permission.
|
public String getIpProtocol()
Valid protocol values:
tcp
, udp
, icmp
Valid protocol values:
tcp
, udp
, icmp
public void setIpProtocol(String ipProtocol)
Valid protocol values:
tcp
, udp
, icmp
ipProtocol
- The IP protocol of this permission. Valid protocol values:
tcp
, udp
, icmp
public IpPermission withIpProtocol(String ipProtocol)
Valid protocol values:
tcp
, udp
, icmp
Returns a reference to this object so that method calls can be chained together.
ipProtocol
- The IP protocol of this permission. Valid protocol values:
tcp
, udp
, icmp
public Integer getFromPort()
-1
indicates a wildcard
(i.e., any ICMP type number).-1
indicates a wildcard
(i.e., any ICMP type number).public void setFromPort(Integer fromPort)
-1
indicates a wildcard
(i.e., any ICMP type number).fromPort
- Start of port range for the TCP and UDP protocols, or an ICMP type
number. An ICMP type number of -1
indicates a wildcard
(i.e., any ICMP type number).public IpPermission withFromPort(Integer fromPort)
-1
indicates a wildcard
(i.e., any ICMP type number).
Returns a reference to this object so that method calls can be chained together.
fromPort
- Start of port range for the TCP and UDP protocols, or an ICMP type
number. An ICMP type number of -1
indicates a wildcard
(i.e., any ICMP type number).public Integer getToPort()
-1
indicates a wildcard (i.e., any ICMP
code).-1
indicates a wildcard (i.e., any ICMP
code).public void setToPort(Integer toPort)
-1
indicates a wildcard (i.e., any ICMP
code).toPort
- End of port range for the TCP and UDP protocols, or an ICMP code. An
ICMP code of -1
indicates a wildcard (i.e., any ICMP
code).public IpPermission withToPort(Integer toPort)
-1
indicates a wildcard (i.e., any ICMP
code).
Returns a reference to this object so that method calls can be chained together.
toPort
- End of port range for the TCP and UDP protocols, or an ICMP code. An
ICMP code of -1
indicates a wildcard (i.e., any ICMP
code).public List<UserIdGroupPair> getUserIdGroupPairs()
public void setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
userIdGroupPairs
- The list of AWS user IDs and groups included in this permission.public IpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
Returns a reference to this object so that method calls can be chained together.
userIdGroupPairs
- The list of AWS user IDs and groups included in this permission.public IpPermission withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
Returns a reference to this object so that method calls can be chained together.
userIdGroupPairs
- The list of AWS user IDs and groups included in this permission.public List<String> getIpRanges()
public void setIpRanges(Collection<String> ipRanges)
ipRanges
- The list of CIDR IP ranges included in this permission.public IpPermission withIpRanges(String... ipRanges)
Returns a reference to this object so that method calls can be chained together.
ipRanges
- The list of CIDR IP ranges included in this permission.public IpPermission withIpRanges(Collection<String> ipRanges)
Returns a reference to this object so that method calls can be chained together.
ipRanges
- The list of CIDR IP ranges included in this permission.public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.