public class IpPermission extends Object implements Serializable
Describes a security group rule.
Constructor and Description |
---|
IpPermission() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Integer |
getFromPort()
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
String |
getIpProtocol()
The protocol.
|
List<String> |
getIpRanges()
One or more IP ranges.
|
Integer |
getToPort()
The end of port range for the TCP and UDP protocols, or an ICMP code.
|
List<UserIdGroupPair> |
getUserIdGroupPairs()
One or more security group and AWS account ID pairs.
|
int |
hashCode() |
void |
setFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
void |
setIpProtocol(String ipProtocol)
The protocol.
|
void |
setIpRanges(Collection<String> ipRanges)
One or more IP ranges.
|
void |
setToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code.
|
void |
setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group and AWS account ID pairs.
|
String |
toString()
Returns a string representation of this object; useful for testing and
debugging.
|
IpPermission |
withFromPort(Integer fromPort)
The start of port range for the TCP and UDP protocols, or an ICMP type
number.
|
IpPermission |
withIpProtocol(String ipProtocol)
The protocol.
|
IpPermission |
withIpRanges(Collection<String> ipRanges)
One or more IP ranges.
|
IpPermission |
withIpRanges(String... ipRanges)
One or more IP ranges.
|
IpPermission |
withToPort(Integer toPort)
The end of port range for the TCP and UDP protocols, or an ICMP code.
|
IpPermission |
withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group and AWS account ID pairs.
|
IpPermission |
withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
One or more security group and AWS account ID pairs.
|
public String getIpProtocol()
When you call DescribeSecurityGroups, the
protocol value returned is the number. Exception: For TCP, UDP, and
ICMP, the value returned is the name (for example, tcp
,
udp
, or icmp
). For a list of protocol
numbers, see Protocol
Numbers.
When you call DescribeSecurityGroups, the
protocol value returned is the number. Exception: For TCP, UDP, and
ICMP, the value returned is the name (for example, tcp
,
udp
, or icmp
). For a list of protocol
numbers, see Protocol
Numbers.
public void setIpProtocol(String ipProtocol)
When you call DescribeSecurityGroups, the
protocol value returned is the number. Exception: For TCP, UDP, and
ICMP, the value returned is the name (for example, tcp
,
udp
, or icmp
). For a list of protocol
numbers, see Protocol
Numbers.
ipProtocol
- The protocol. When you call DescribeSecurityGroups, the
protocol value returned is the number. Exception: For TCP, UDP, and
ICMP, the value returned is the name (for example, tcp
,
udp
, or icmp
). For a list of protocol
numbers, see Protocol
Numbers.
public IpPermission withIpProtocol(String ipProtocol)
When you call DescribeSecurityGroups, the
protocol value returned is the number. Exception: For TCP, UDP, and
ICMP, the value returned is the name (for example, tcp
,
udp
, or icmp
). For a list of protocol
numbers, see Protocol
Numbers.
Returns a reference to this object so that method calls can be chained together.
ipProtocol
- The protocol. When you call DescribeSecurityGroups, the
protocol value returned is the number. Exception: For TCP, UDP, and
ICMP, the value returned is the name (for example, tcp
,
udp
, or icmp
). For a list of protocol
numbers, see Protocol
Numbers.
public Integer getFromPort()
-1
indicates all ICMP types.-1
indicates all ICMP types.public void setFromPort(Integer fromPort)
-1
indicates all ICMP types.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.public IpPermission withFromPort(Integer fromPort)
-1
indicates all ICMP types.
Returns a reference to this object so that method calls can be chained together.
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.public Integer getToPort()
-1
indicates all ICMP codes for the specified
ICMP type.-1
indicates all ICMP codes for the specified
ICMP type.public void setToPort(Integer toPort)
-1
indicates all ICMP codes for the specified
ICMP type.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.public IpPermission withToPort(Integer toPort)
-1
indicates all ICMP codes for the specified
ICMP type.
Returns a reference to this object so that method calls can be chained together.
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.public List<UserIdGroupPair> getUserIdGroupPairs()
public void setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
userIdGroupPairs
- One or more security group and AWS account ID pairs.public IpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
Returns a reference to this object so that method calls can be chained together.
userIdGroupPairs
- One or more security group and AWS account ID pairs.public IpPermission withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
Returns a reference to this object so that method calls can be chained together.
userIdGroupPairs
- One or more security group and AWS account ID pairs.public void setIpRanges(Collection<String> ipRanges)
ipRanges
- One or more IP ranges.public IpPermission withIpRanges(String... ipRanges)
Returns a reference to this object so that method calls can be chained together.
ipRanges
- One or more IP ranges.public IpPermission withIpRanges(Collection<String> ipRanges)
Returns a reference to this object so that method calls can be chained together.
ipRanges
- One or more IP ranges.public String toString()
toString
in class Object
Object.toString()
Copyright © 2015. All rights reserved.