public class AssociateAddressRequest extends AmazonWebServiceRequest implements Serializable, DryRunSupportedRequest<AssociateAddressRequest>
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.
Constructor and Description |
---|
AssociateAddressRequest()
Default constructor for a new AssociateAddressRequest object.
|
AssociateAddressRequest(String instanceId,
String publicIp)
Constructs a new AssociateAddressRequest object.
|
Modifier and Type | Method and Description |
---|---|
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.
|
Request<AssociateAddressRequest> |
getDryRunRequest()
This method is intended for internal use only.
|
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.
|
copyPrivateRequestParameters, getRequestClientOptions, getRequestCredentials, getRequestMetricCollector, setRequestCredentials, setRequestMetricCollector, withRequestMetricCollector
public AssociateAddressRequest()
public AssociateAddressRequest(String instanceId, String publicIp)
instanceId
- The instance to associate with the IP address.publicIp
- IP address that you are assigning to the instance.public String getInstanceId()
public void setInstanceId(String instanceId)
instanceId
- The instance to associate with the IP address.public AssociateAddressRequest withInstanceId(String instanceId)
Returns a reference to this object so that method calls can be chained together.
instanceId
- The instance to associate with the IP address.public String getPublicIp()
public void setPublicIp(String publicIp)
publicIp
- IP address that you are assigning to the instance.public AssociateAddressRequest withPublicIp(String publicIp)
Returns a reference to this object so that method calls can be chained together.
publicIp
- IP address that you are assigning to the instance.public String getAllocationId()
public void setAllocationId(String allocationId)
allocationId
- The allocation ID that AWS returned when you allocated the elastic IP
address for use with Amazon VPC.public AssociateAddressRequest withAllocationId(String allocationId)
Returns a reference to this object so that method calls can be chained together.
allocationId
- The allocation ID that AWS returned when you allocated the elastic IP
address for use with Amazon VPC.public String getNetworkInterfaceId()
public void setNetworkInterfaceId(String networkInterfaceId)
networkInterfaceId
- The new value for the NetworkInterfaceId property for this object.public AssociateAddressRequest withNetworkInterfaceId(String networkInterfaceId)
Returns a reference to this object so that method calls can be chained together.
networkInterfaceId
- The new value for the NetworkInterfaceId property for this object.public String getPrivateIpAddress()
public void setPrivateIpAddress(String privateIpAddress)
privateIpAddress
- The new value for the PrivateIpAddress property for this object.public AssociateAddressRequest withPrivateIpAddress(String privateIpAddress)
Returns a reference to this object so that method calls can be chained together.
privateIpAddress
- The new value for the PrivateIpAddress property for this object.public Boolean isAllowReassociation()
public void setAllowReassociation(Boolean allowReassociation)
allowReassociation
- The new value for the AllowReassociation property for this object.public AssociateAddressRequest withAllowReassociation(Boolean allowReassociation)
Returns a reference to this object so that method calls can be chained together.
allowReassociation
- The new value for the AllowReassociation property for this object.public Boolean getAllowReassociation()
public Request<AssociateAddressRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<AssociateAddressRequest>
public String toString()
toString
in class Object
Object.toString()
Copyright © 2013 Amazon Web Services, Inc. All Rights Reserved.