public class ReleaseAddressRequest extends AmazonWebServiceRequest implements java.io.Serializable, DryRunSupportedRequest<ReleaseAddressRequest>
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 DisassociateAddress to disassociate the
Elastic IP address before you try to release it. Otherwise, Amazon EC2
returns an error (
InvalidIPAddress.InUse
).
Constructor and Description |
---|
ReleaseAddressRequest()
Default constructor for a new ReleaseAddressRequest object.
|
ReleaseAddressRequest(java.lang.String publicIp)
Constructs a new ReleaseAddressRequest object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
clone, getCloneRoot, getCloneSource, getGeneralProgressListener, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setGeneralProgressListener, setRequestCredentials, setRequestMetricCollector, withGeneralProgressListener, withRequestMetricCollector
public ReleaseAddressRequest()
public ReleaseAddressRequest(java.lang.String publicIp)
publicIp
- [EC2-Classic] The Elastic IP address. Required for
EC2-Classic.public java.lang.String getPublicIp()
public void setPublicIp(java.lang.String publicIp)
publicIp
- [EC2-Classic] The Elastic IP address. Required for EC2-Classic.public ReleaseAddressRequest withPublicIp(java.lang.String publicIp)
Returns a reference to this object so that method calls can be chained together.
publicIp
- [EC2-Classic] The Elastic IP address. Required for EC2-Classic.public java.lang.String getAllocationId()
public void setAllocationId(java.lang.String allocationId)
allocationId
- [EC2-VPC] The allocation ID. Required for EC2-VPC.public ReleaseAddressRequest withAllocationId(java.lang.String allocationId)
Returns a reference to this object so that method calls can be chained together.
allocationId
- [EC2-VPC] The allocation ID. Required for EC2-VPC.public Request<ReleaseAddressRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<ReleaseAddressRequest>
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2018 Amazon Web Services, Inc. All Rights Reserved.