Class StaleIpPermission
- java.lang.Object
-
- com.amazonaws.services.ec2.model.StaleIpPermission
-
- All Implemented Interfaces:
Serializable
,Cloneable
public class StaleIpPermission extends Object implements Serializable, Cloneable
Describes a stale rule in a security group.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description StaleIpPermission()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StaleIpPermission
clone()
boolean
equals(Object obj)
Integer
getFromPort()
The start of the port range for the TCP and UDP protocols, or an ICMP type number.String
getIpProtocol()
List<String>
getIpRanges()
One or more IP ranges.List<String>
getPrefixListIds()
One or more prefix list IDs for an AWS service.Integer
getToPort()
The end of the port range for the TCP and UDP protocols, or an ICMP type number.List<UserIdGroupPair>
getUserIdGroupPairs()
One or more security group pairs.int
hashCode()
void
setFromPort(Integer fromPort)
The start of the port range for the TCP and UDP protocols, or an ICMP type number.void
setIpProtocol(String ipProtocol)
void
setIpRanges(Collection<String> ipRanges)
One or more IP ranges.void
setPrefixListIds(Collection<String> prefixListIds)
One or more prefix list IDs for an AWS service.void
setToPort(Integer toPort)
The end of the port range for the TCP and UDP protocols, or an ICMP type number.void
setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group pairs.String
toString()
Returns a string representation of this object; useful for testing and debugging.StaleIpPermission
withFromPort(Integer fromPort)
The start of the port range for the TCP and UDP protocols, or an ICMP type number.StaleIpPermission
withIpProtocol(String ipProtocol)
StaleIpPermission
withIpRanges(String... ipRanges)
One or more IP ranges.StaleIpPermission
withIpRanges(Collection<String> ipRanges)
One or more IP ranges.StaleIpPermission
withPrefixListIds(String... prefixListIds)
One or more prefix list IDs for an AWS service.StaleIpPermission
withPrefixListIds(Collection<String> prefixListIds)
One or more prefix list IDs for an AWS service.StaleIpPermission
withToPort(Integer toPort)
The end of the port range for the TCP and UDP protocols, or an ICMP type number.StaleIpPermission
withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
One or more security group pairs.StaleIpPermission
withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group pairs.
-
-
-
Method Detail
-
setFromPort
public void setFromPort(Integer fromPort)
The start of the 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 the 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 the 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 the port range for the TCP and UDP protocols, or an
ICMP type number. A value of
-1
indicates all ICMP types.
-
withFromPort
public StaleIpPermission withFromPort(Integer fromPort)
The start of the 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 the 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.
-
setIpProtocol
public void setIpProtocol(String ipProtocol)
The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers).- Parameters:
ipProtocol
- The IP protocol name (fortcp
,udp
, andicmp
) or number (see Protocol Numbers).
-
getIpProtocol
public String getIpProtocol()
The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers).- Returns:
- The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers).
-
withIpProtocol
public StaleIpPermission withIpProtocol(String ipProtocol)
The IP protocol name (for
tcp
,udp
, andicmp
) or number (see Protocol Numbers).- Parameters:
ipProtocol
- The IP protocol name (fortcp
,udp
, andicmp
) or number (see Protocol Numbers).- 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. Not applicable for stale security group rules.
- Returns:
- One or more IP ranges. Not applicable for stale security group rules.
-
setIpRanges
public void setIpRanges(Collection<String> ipRanges)
One or more IP ranges. Not applicable for stale security group rules.
- Parameters:
ipRanges
- One or more IP ranges. Not applicable for stale security group rules.
-
withIpRanges
public StaleIpPermission withIpRanges(String... ipRanges)
One or more IP ranges. Not applicable for stale security group rules.
NOTE: This method appends the values to the existing list (if any). Use
setIpRanges(java.util.Collection)
orwithIpRanges(java.util.Collection)
if you want to override the existing values.- Parameters:
ipRanges
- One or more IP ranges. Not applicable for stale security group rules.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withIpRanges
public StaleIpPermission withIpRanges(Collection<String> ipRanges)
One or more IP ranges. Not applicable for stale security group rules.
- Parameters:
ipRanges
- One or more IP ranges. Not applicable for stale security group rules.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
getPrefixListIds
public List<String> getPrefixListIds()
One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.
- Returns:
- One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.
-
setPrefixListIds
public void setPrefixListIds(Collection<String> prefixListIds)
One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.
- Parameters:
prefixListIds
- One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.
-
withPrefixListIds
public StaleIpPermission withPrefixListIds(String... prefixListIds)
One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.
NOTE: This method appends the values to the existing list (if any). Use
setPrefixListIds(java.util.Collection)
orwithPrefixListIds(java.util.Collection)
if you want to override the existing values.- Parameters:
prefixListIds
- One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withPrefixListIds
public StaleIpPermission withPrefixListIds(Collection<String> prefixListIds)
One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.
- Parameters:
prefixListIds
- One or more prefix list IDs for an AWS service. Not applicable for stale security group rules.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
setToPort
public void setToPort(Integer toPort)
The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of
-1
indicates all ICMP types.- Parameters:
toPort
- The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of-1
indicates all ICMP types.
-
getToPort
public Integer getToPort()
The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of
-1
indicates all ICMP types.- Returns:
- The end of the port range for the TCP and UDP protocols, or an
ICMP type number. A value of
-1
indicates all ICMP types.
-
withToPort
public StaleIpPermission withToPort(Integer toPort)
The end of the port range for the TCP and UDP protocols, or an ICMP type number. A value of
-1
indicates all ICMP types.- Parameters:
toPort
- The end of the 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.
-
getUserIdGroupPairs
public List<UserIdGroupPair> getUserIdGroupPairs()
One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.
- Returns:
- One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.
-
setUserIdGroupPairs
public void setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.
- Parameters:
userIdGroupPairs
- One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.
-
withUserIdGroupPairs
public StaleIpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.
NOTE: This method appends the values to the existing list (if any). Use
setUserIdGroupPairs(java.util.Collection)
orwithUserIdGroupPairs(java.util.Collection)
if you want to override the existing values.- Parameters:
userIdGroupPairs
- One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.- Returns:
- Returns a reference to this object so that method calls can be chained together.
-
withUserIdGroupPairs
public StaleIpPermission withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.
- Parameters:
userIdGroupPairs
- One or more security group pairs. Returns the ID of the referenced security group and VPC, and the ID and status of the VPC peering connection.- 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 classObject
- Returns:
- A string representation of this object.
- See Also:
Object.toString()
-
clone
public StaleIpPermission clone()
-
-