com.amazonaws.services.ec2.model
Class ReleaseAddressRequest

java.lang.Object
  extended by com.amazonaws.AmazonWebServiceRequest
      extended by com.amazonaws.services.ec2.model.ReleaseAddressRequest
All Implemented Interfaces:
DryRunSupportedRequest<ReleaseAddressRequest>, java.io.Serializable

public class ReleaseAddressRequest
extends AmazonWebServiceRequest
implements java.io.Serializable, DryRunSupportedRequest<ReleaseAddressRequest>

Container for the parameters to the ReleaseAddress operation.

Releases the specified Elastic IP address.

After releasing an Elastic IP address, it is released to the IP address pool and might be unavailable to you. Be sure to update your DNS records and any servers or devices that communicate with the address. If you attempt to release an Elastic IP address that you already released, you'll get an AuthFailure error if the address is already allocated to another AWS account.

[EC2-Classic, default VPC] Releasing an Elastic IP address automatically disassociates it from any instance that it's associated with. To disassociate an Elastic IP address without releasing it, use DisassociateAddress.

[Nondefault VPC] You must use the DisassociateAddress to disassociate the Elastic IP address before you try to release it. Otherwise, Amazon EC2 returns an error ( InvalidIPAddress.InUse ).

See Also:
AmazonEC2.releaseAddress(ReleaseAddressRequest), Serialized Form

Constructor Summary
ReleaseAddressRequest()
          Default constructor for a new ReleaseAddressRequest object.
ReleaseAddressRequest(java.lang.String publicIp)
          Constructs a new ReleaseAddressRequest object.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getAllocationId()
          [EC2-VPC] The allocation ID.
 Request<ReleaseAddressRequest> getDryRunRequest()
          This method is intended for internal use only.
 java.lang.String getPublicIp()
          [EC2-Classic] The Elastic IP address.
 int hashCode()
           
 void setAllocationId(java.lang.String allocationId)
          [EC2-VPC] The allocation ID.
 void setPublicIp(java.lang.String publicIp)
          [EC2-Classic] The Elastic IP address.
 java.lang.String toString()
          Returns a string representation of this object; useful for testing and debugging.
 ReleaseAddressRequest withAllocationId(java.lang.String allocationId)
          [EC2-VPC] The allocation ID.
 ReleaseAddressRequest withPublicIp(java.lang.String publicIp)
          [EC2-Classic] The Elastic IP address.
 
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyPrivateRequestParameters, getDelegationToken, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setDelegationToken, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReleaseAddressRequest

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


ReleaseAddressRequest

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

Parameters:
publicIp - [EC2-Classic] The Elastic IP address.
Method Detail

getPublicIp

public java.lang.String getPublicIp()
[EC2-Classic] The Elastic IP address.

Returns:
[EC2-Classic] The Elastic IP address.

setPublicIp

public void setPublicIp(java.lang.String publicIp)
[EC2-Classic] The Elastic IP address.

Parameters:
publicIp - [EC2-Classic] The Elastic IP address.

withPublicIp

public ReleaseAddressRequest withPublicIp(java.lang.String publicIp)
[EC2-Classic] The Elastic IP address.

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

Parameters:
publicIp - [EC2-Classic] The Elastic IP address.
Returns:
A reference to this updated object so that method calls can be chained together.

getAllocationId

public java.lang.String getAllocationId()
[EC2-VPC] The allocation ID.

Returns:
[EC2-VPC] The allocation ID.

setAllocationId

public void setAllocationId(java.lang.String allocationId)
[EC2-VPC] The allocation ID.

Parameters:
allocationId - [EC2-VPC] The allocation ID.

withAllocationId

public ReleaseAddressRequest withAllocationId(java.lang.String allocationId)
[EC2-VPC] The allocation ID.

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

Parameters:
allocationId - [EC2-VPC] The allocation ID.
Returns:
A reference to this updated object so that method calls can be chained together.

getDryRunRequest

public Request<ReleaseAddressRequest> getDryRunRequest()
This method is intended for internal use only. Returns the marshaled request configured with additional parameters to enable operation dry-run.

Specified by:
getDryRunRequest in interface DryRunSupportedRequest<ReleaseAddressRequest>

toString

public java.lang.String toString()
Returns a string representation of this object; useful for testing and debugging.

Overrides:
toString in class java.lang.Object
Returns:
A string representation of this object.
See Also:
Object.toString()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


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