com.amazonaws.services.ec2.model
Class AssociateAddressRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.AssociateAddressRequest

public class AssociateAddressRequest
extends AmazonWebServiceRequest

Container for the parameters to the AssociateAddress operation.

The AssociateAddress operation associates an elastic IP address with an instance.

If the IP address is currently assigned to another instance, the IP address is assigned to the new instance. This is an idempotent operation. If you enter it more than once, Amazon EC2 does not return an error.

See Also:
AmazonEC2.associateAddress(AssociateAddressRequest)

Constructor Summary
AssociateAddressRequest()
          Default constructor for a new AssociateAddressRequest object.
AssociateAddressRequest(String instanceId, String publicIp)
          Constructs a new AssociateAddressRequest object.
 
Method Summary
 boolean equals(Object obj)
           
 String getAllocationId()
          The allocation ID that AWS returned when you allocated the elastic IP address for use with Amazon VPC.
 Boolean getAllowReassociation()
          Returns the value of the AllowReassociation property for this object.
 String getInstanceId()
          The instance to associate with the IP address.
 String getNetworkInterfaceId()
          Returns the value of the NetworkInterfaceId property for this object.
 String getPrivateIpAddress()
          Returns the value of the PrivateIpAddress property for this object.
 String getPublicIp()
          IP address that you are assigning to the instance.
 int hashCode()
           
 Boolean isAllowReassociation()
          Returns the value of the AllowReassociation property for this object.
 void setAllocationId(String allocationId)
          The allocation ID that AWS returned when you allocated the elastic IP address for use with Amazon VPC.
 void setAllowReassociation(Boolean allowReassociation)
          Sets the value of the AllowReassociation property for this object.
 void setInstanceId(String instanceId)
          The instance to associate with the IP address.
 void setNetworkInterfaceId(String networkInterfaceId)
          Sets the value of the NetworkInterfaceId property for this object.
 void setPrivateIpAddress(String privateIpAddress)
          Sets the value of the PrivateIpAddress property for this object.
 void setPublicIp(String publicIp)
          IP address that you are assigning to the instance.
 String toString()
          Returns a string representation of this object; useful for testing and debugging.
 AssociateAddressRequest withAllocationId(String allocationId)
          The allocation ID that AWS returned when you allocated the elastic IP address for use with Amazon VPC.
 AssociateAddressRequest withAllowReassociation(Boolean allowReassociation)
          Sets the value of the AllowReassociation property for this object.
 AssociateAddressRequest withInstanceId(String instanceId)
          The instance to associate with the IP address.
 AssociateAddressRequest withNetworkInterfaceId(String networkInterfaceId)
          Sets the value of the NetworkInterfaceId property for this object.
 AssociateAddressRequest withPrivateIpAddress(String privateIpAddress)
          Sets the value of the PrivateIpAddress property for this object.
 AssociateAddressRequest withPublicIp(String publicIp)
          IP address that you are assigning to the instance.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, setDelegationToken, setRequestCredentials
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssociateAddressRequest

public AssociateAddressRequest()
Default constructor for a new AssociateAddressRequest object. Callers should use the setter or fluent setter (with...) methods to initialize this object after creating it.


AssociateAddressRequest

public AssociateAddressRequest(String instanceId,
                               String publicIp)
Constructs a new AssociateAddressRequest object. Callers should use the setter or fluent setter (with...) methods to initialize any additional object members.

Parameters:
instanceId - The instance to associate with the IP address.
publicIp - IP address that you are assigning to the instance.
Method Detail

getInstanceId

public String getInstanceId()
The instance to associate with the IP address.

Returns:
The instance to associate with the IP address.

setInstanceId

public void setInstanceId(String instanceId)
The instance to associate with the IP address.

Parameters:
instanceId - The instance to associate with the IP address.

withInstanceId

public AssociateAddressRequest withInstanceId(String instanceId)
The instance to associate with the IP address.

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

Parameters:
instanceId - The instance to associate with the IP address.
Returns:
A reference to this updated object so that method calls can be chained together.

getPublicIp

public String getPublicIp()
IP address that you are assigning to the instance.

Returns:
IP address that you are assigning to the instance.

setPublicIp

public void setPublicIp(String publicIp)
IP address that you are assigning to the instance.

Parameters:
publicIp - IP address that you are assigning to the instance.

withPublicIp

public AssociateAddressRequest withPublicIp(String publicIp)
IP address that you are assigning to the instance.

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

Parameters:
publicIp - IP address that you are assigning to the instance.
Returns:
A reference to this updated object so that method calls can be chained together.

getAllocationId

public String getAllocationId()
The allocation ID that AWS returned when you allocated the elastic IP address for use with Amazon VPC.

Returns:
The allocation ID that AWS returned when you allocated the elastic IP address for use with Amazon VPC.

setAllocationId

public void setAllocationId(String allocationId)
The allocation ID that AWS returned when you allocated the elastic IP address for use with Amazon VPC.

Parameters:
allocationId - The allocation ID that AWS returned when you allocated the elastic IP address for use with Amazon VPC.

withAllocationId

public AssociateAddressRequest withAllocationId(String allocationId)
The allocation ID that AWS returned when you allocated the elastic IP address for use with Amazon VPC.

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

Parameters:
allocationId - The allocation ID that AWS returned when you allocated the elastic IP address for use with Amazon VPC.
Returns:
A reference to this updated object so that method calls can be chained together.

getNetworkInterfaceId

public String getNetworkInterfaceId()
Returns the value of the NetworkInterfaceId property for this object.

Returns:
The value of the NetworkInterfaceId property for this object.

setNetworkInterfaceId

public void setNetworkInterfaceId(String networkInterfaceId)
Sets the value of the NetworkInterfaceId property for this object.

Parameters:
networkInterfaceId - The new value for the NetworkInterfaceId property for this object.

withNetworkInterfaceId

public AssociateAddressRequest withNetworkInterfaceId(String networkInterfaceId)
Sets the value of the NetworkInterfaceId property for this object.

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

Parameters:
networkInterfaceId - The new value for the NetworkInterfaceId property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

getPrivateIpAddress

public String getPrivateIpAddress()
Returns the value of the PrivateIpAddress property for this object.

Returns:
The value of the PrivateIpAddress property for this object.

setPrivateIpAddress

public void setPrivateIpAddress(String privateIpAddress)
Sets the value of the PrivateIpAddress property for this object.

Parameters:
privateIpAddress - The new value for the PrivateIpAddress property for this object.

withPrivateIpAddress

public AssociateAddressRequest withPrivateIpAddress(String privateIpAddress)
Sets the value of the PrivateIpAddress property for this object.

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

Parameters:
privateIpAddress - The new value for the PrivateIpAddress property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

isAllowReassociation

public Boolean isAllowReassociation()
Returns the value of the AllowReassociation property for this object.

Returns:
The value of the AllowReassociation property for this object.

setAllowReassociation

public void setAllowReassociation(Boolean allowReassociation)
Sets the value of the AllowReassociation property for this object.

Parameters:
allowReassociation - The new value for the AllowReassociation property for this object.

withAllowReassociation

public AssociateAddressRequest withAllowReassociation(Boolean allowReassociation)
Sets the value of the AllowReassociation property for this object.

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

Parameters:
allowReassociation - The new value for the AllowReassociation property for this object.
Returns:
A reference to this updated object so that method calls can be chained together.

getAllowReassociation

public Boolean getAllowReassociation()
Returns the value of the AllowReassociation property for this object.

Returns:
The value of the AllowReassociation property for this object.

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.