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
 String getInstanceId()
          The instance to associate with the IP address.
 String getPublicIp()
          IP address that you are assigning to the instance.
 void setInstanceId(String instanceId)
          The instance to associate with the IP address.
 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 withInstanceId(String instanceId)
          The instance to associate with the IP address.
 AssociateAddressRequest withPublicIp(String publicIp)
          IP address that you are assigning to the instance.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getRequestCredentials, setRequestCredentials
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, 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.

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()


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