|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.ec2.model.AssociateAddressRequest
public class AssociateAddressRequest
Container for the parameters to the AssociateAddress operation
.
Associates an Elastic IP address with an instance or a network interface.
An Elastic IP address is for use in either the EC2-Classic platform or in a VPC. For more information, see Elastic IP Addresses in the Amazon Elastic Compute Cloud User Guide .
[EC2-Classic, default VPC] If the Elastic IP address is already associated with a different instance, it is disassociated from that instance and associated with the specified instance.
[EC2-VPC] If you don't specify a private IP address, the Elastic IP address is associated with the primary IP address. If the Elastic IP address is already associated with a different instance or a network interface, you get an error unless you allow reassociation.
This is an idempotent operation. If you perform the operation more than once, Amazon EC2 doesn't return an error.
AmazonEC2.associateAddress(AssociateAddressRequest)
,
Serialized FormConstructor Summary | |
---|---|
AssociateAddressRequest()
Default constructor for a new AssociateAddressRequest object. |
|
AssociateAddressRequest(java.lang.String instanceId,
java.lang.String publicIp)
Constructs a new AssociateAddressRequest object. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
java.lang.String |
getAllocationId()
[EC2-VPC] The allocation ID. |
java.lang.Boolean |
getAllowReassociation()
[EC2-VPC] Allows an Elastic IP address that is already associated with an instance or network interface to be re-associated with the specified instance or network interface. |
Request<AssociateAddressRequest> |
getDryRunRequest()
This method is intended for internal use only. |
java.lang.String |
getInstanceId()
The ID of the instance. |
java.lang.String |
getNetworkInterfaceId()
[EC2-VPC] The ID of the network interface. |
java.lang.String |
getPrivateIpAddress()
[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. |
java.lang.String |
getPublicIp()
The Elastic IP address. |
int |
hashCode()
|
java.lang.Boolean |
isAllowReassociation()
[EC2-VPC] Allows an Elastic IP address that is already associated with an instance or network interface to be re-associated with the specified instance or network interface. |
void |
setAllocationId(java.lang.String allocationId)
[EC2-VPC] The allocation ID. |
void |
setAllowReassociation(java.lang.Boolean allowReassociation)
[EC2-VPC] Allows an Elastic IP address that is already associated with an instance or network interface to be re-associated with the specified instance or network interface. |
void |
setInstanceId(java.lang.String instanceId)
The ID of the instance. |
void |
setNetworkInterfaceId(java.lang.String networkInterfaceId)
[EC2-VPC] The ID of the network interface. |
void |
setPrivateIpAddress(java.lang.String privateIpAddress)
[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. |
void |
setPublicIp(java.lang.String publicIp)
The Elastic IP address. |
java.lang.String |
toString()
Returns a string representation of this object; useful for testing and debugging. |
AssociateAddressRequest |
withAllocationId(java.lang.String allocationId)
[EC2-VPC] The allocation ID. |
AssociateAddressRequest |
withAllowReassociation(java.lang.Boolean allowReassociation)
[EC2-VPC] Allows an Elastic IP address that is already associated with an instance or network interface to be re-associated with the specified instance or network interface. |
AssociateAddressRequest |
withInstanceId(java.lang.String instanceId)
The ID of the instance. |
AssociateAddressRequest |
withNetworkInterfaceId(java.lang.String networkInterfaceId)
[EC2-VPC] The ID of the network interface. |
AssociateAddressRequest |
withPrivateIpAddress(java.lang.String privateIpAddress)
[EC2-VPC] The primary or secondary private IP address to associate with the Elastic IP address. |
AssociateAddressRequest |
withPublicIp(java.lang.String publicIp)
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 |
---|
public AssociateAddressRequest()
public AssociateAddressRequest(java.lang.String instanceId, java.lang.String publicIp)
instanceId
- The ID of the instance. The operation fails if you
specify an instance ID unless exactly one network interface is
attached.publicIp
- The Elastic IP address.Method Detail |
---|
public java.lang.String getInstanceId()
public void setInstanceId(java.lang.String instanceId)
instanceId
- The ID of the instance. The operation fails if you specify an instance
ID unless exactly one network interface is attached.public AssociateAddressRequest withInstanceId(java.lang.String instanceId)
Returns a reference to this object so that method calls can be chained together.
instanceId
- The ID of the instance. The operation fails if you specify an instance
ID unless exactly one network interface is attached.
public java.lang.String getPublicIp()
public void setPublicIp(java.lang.String publicIp)
publicIp
- The Elastic IP address.public AssociateAddressRequest withPublicIp(java.lang.String publicIp)
Returns a reference to this object so that method calls can be chained together.
publicIp
- The Elastic IP address.
public java.lang.String getAllocationId()
public void setAllocationId(java.lang.String allocationId)
allocationId
- [EC2-VPC] The allocation ID. This is required for EC2-VPC.public AssociateAddressRequest 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. This is required for EC2-VPC.
public java.lang.String getNetworkInterfaceId()
public void setNetworkInterfaceId(java.lang.String networkInterfaceId)
networkInterfaceId
- [EC2-VPC] The ID of the network interface. If the instance has more
than one network interface, you must specify a network interface ID.public AssociateAddressRequest withNetworkInterfaceId(java.lang.String networkInterfaceId)
Returns a reference to this object so that method calls can be chained together.
networkInterfaceId
- [EC2-VPC] The ID of the network interface. If the instance has more
than one network interface, you must specify a network interface ID.
public java.lang.String getPrivateIpAddress()
public void setPrivateIpAddress(java.lang.String privateIpAddress)
privateIpAddress
- [EC2-VPC] The primary or secondary private IP address to associate
with the Elastic IP address. If no private IP address is specified,
the Elastic IP address is associated with the primary private IP
address.public AssociateAddressRequest withPrivateIpAddress(java.lang.String privateIpAddress)
Returns a reference to this object so that method calls can be chained together.
privateIpAddress
- [EC2-VPC] The primary or secondary private IP address to associate
with the Elastic IP address. If no private IP address is specified,
the Elastic IP address is associated with the primary private IP
address.
public java.lang.Boolean isAllowReassociation()
Default: false
Default: false
public void setAllowReassociation(java.lang.Boolean allowReassociation)
Default: false
allowReassociation
- [EC2-VPC] Allows an Elastic IP address that is already associated with
an instance or network interface to be re-associated with the
specified instance or network interface. Otherwise, the operation
fails. Default: false
public AssociateAddressRequest withAllowReassociation(java.lang.Boolean allowReassociation)
Default: false
Returns a reference to this object so that method calls can be chained together.
allowReassociation
- [EC2-VPC] Allows an Elastic IP address that is already associated with
an instance or network interface to be re-associated with the
specified instance or network interface. Otherwise, the operation
fails. Default: false
public java.lang.Boolean getAllowReassociation()
Default: false
Default: false
public Request<AssociateAddressRequest> getDryRunRequest()
getDryRunRequest
in interface DryRunSupportedRequest<AssociateAddressRequest>
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
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |