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.
| Name | Description | Required |
|---|---|---|
|
|
IP address to assign to the instance. Type: String Default: None |
Yes |
|
|
The instance to associate with the IP address. Type: String Default: None |
Yes |
The elements in the following table come wrapped in an
AssociateAddressResponse structure.
| Name | Description |
|---|---|
|
|
The ID of the request. Type: xsd:string |
|
|
Returns true if the request succeeds. Otherwise, returns an error. Type: xsd:boolean |
This example associates an IP address with an instance.
https://ec2.amazonaws.com/?Action=AssociateAddress &InstanceId=i-2ea64347 &PublicIp=67.202.55.255 &AuthParams
<AssociateAddressResponse xmlns="http://ec2.amazonaws.com/doc/2010-08-31/"> <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> <return>true</return> </AssociateAddressResponse>