com.amazonaws.services.ec2.model
Class IpPermission

java.lang.Object
  extended by com.amazonaws.services.ec2.model.IpPermission

public class IpPermission
extends Object

An IP permission describing allowed incoming IP traffic to an Amazon EC2 security group.


Constructor Summary
IpPermission()
           
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IpPermission

public IpPermission()
Method Detail

getIpProtocol

public String getIpProtocol()
The IP protocol of this permission.

Valid protocol values: tcp, udp, icmp

Returns:
The IP protocol of this permission.

Valid protocol values: tcp, udp, icmp


setIpProtocol

public void setIpProtocol(String ipProtocol)
The IP protocol of this permission.

Valid protocol values: tcp, udp, icmp

Parameters:
ipProtocol - The IP protocol of this permission.

Valid protocol values: tcp, udp, icmp


withIpProtocol

public IpPermission withIpProtocol(String ipProtocol)
The IP protocol of this permission.

Valid protocol values: tcp, udp, icmp

Returns a reference to this object so that method calls can be chained together.

Parameters:
ipProtocol - The IP protocol of this permission.

Valid protocol values: tcp, udp, icmp

Returns:
A reference to this updated object so that method calls can be chained together.

getFromPort

public Integer getFromPort()
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).

Returns:
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).

setFromPort

public void setFromPort(Integer 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).

Parameters:
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).

withFromPort

public IpPermission withFromPort(Integer 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).

Returns a reference to this object so that method calls can be chained together.

Parameters:
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).
Returns:
A reference to this updated object so that method calls can be chained together.

getToPort

public Integer getToPort()
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).

Returns:
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).

setToPort

public void setToPort(Integer 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).

Parameters:
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).

withToPort

public IpPermission withToPort(Integer 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).

Returns a reference to this object so that method calls can be chained together.

Parameters:
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).
Returns:
A reference to this updated object so that method calls can be chained together.

getUserIdGroupPairs

public List<UserIdGroupPair> getUserIdGroupPairs()
The list of AWS user IDs and groups included in this permission.

Returns:
The list of AWS user IDs and groups included in this permission.

setUserIdGroupPairs

public void setUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
The list of AWS user IDs and groups included in this permission.

Parameters:
userIdGroupPairs - The list of AWS user IDs and groups included in this permission.

withUserIdGroupPairs

public IpPermission withUserIdGroupPairs(UserIdGroupPair... userIdGroupPairs)
The list of AWS user IDs and groups included in this permission.

Returns a reference to this object so that method calls can be chained together.

Parameters:
userIdGroupPairs - The list of AWS user IDs and groups included in this permission.
Returns:
A reference to this updated object so that method calls can be chained together.

withUserIdGroupPairs

public IpPermission withUserIdGroupPairs(Collection<UserIdGroupPair> userIdGroupPairs)
The list of AWS user IDs and groups included in this permission.

Returns a reference to this object so that method calls can be chained together.

Parameters:
userIdGroupPairs - The list of AWS user IDs and groups included in this permission.
Returns:
A reference to this updated object so that method calls can be chained together.

getIpRanges

public List<String> getIpRanges()
The list of CIDR IP ranges included in this permission.

Returns:
The list of CIDR IP ranges included in this permission.

setIpRanges

public void setIpRanges(Collection<String> ipRanges)
The list of CIDR IP ranges included in this permission.

Parameters:
ipRanges - The list of CIDR IP ranges included in this permission.

withIpRanges

public IpPermission withIpRanges(String... ipRanges)
The list of CIDR IP ranges included in this permission.

Returns a reference to this object so that method calls can be chained together.

Parameters:
ipRanges - The list of CIDR IP ranges included in this permission.
Returns:
A reference to this updated object so that method calls can be chained together.

withIpRanges

public IpPermission withIpRanges(Collection<String> ipRanges)
The list of CIDR IP ranges included in this permission.

Returns a reference to this object so that method calls can be chained together.

Parameters:
ipRanges - The list of CIDR IP ranges included in this permission.
Returns:
A reference to this updated 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 class Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2010 Amazon Web Services, Inc. All Rights Reserved.