Amazon Elastic Compute Cloud
API Reference (API Version 2013-02-01)
« PreviousNext »
View the PDF for this guide.Go to the AWS Discussion Forum for this product.Did this page help you?  Yes | No |  Tell us about it...

DisassociateAddress

Description

Disassociates an Elastic IP address from the instance or network interface it's associated with.

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.

This is an idempotent action. If you enter it more than once, Amazon EC2 does not return an error.

Request Parameters

PublicIp

[EC2-Classic] The Elastic IP address.

Type: String

Default: None

Required: Conditional

Condition: Required for EC2-Classic

AssociationId

[EC2-VPC] The association ID corresponding to the Elastic IP address.

Type: String

Default: None

Required: Conditional

Condition: Required for EC2-VPC

Response Elements

The following elements are returned in a DisassociateAddressResponse element.

requestId

The ID of the request.

Type: xsd:string

return

Returns true if the request succeeds. Otherwise, returns an error.

Type: xsd:boolean

Examples

Example Request

This example disassociates the EC2 Elastic IP address 67.202.55.255 from the instance to which it is assigned.

https://ec2.amazonaws.com/?Action=DisassociateAddress
&PublicIp=192.0.2.1
&AUTHPARAMS

Example Request

This example disassociates the Elastic IP address with association ID eipassoc-aa7486c3 from the instance in a VPC to which it is assigned.

https://ec2.amazonaws.com/?Action=DisassociateAddress
&AssociationID=eipassoc-aa7486c3
&AUTHPARAMS

Example Response

<DisassociateAddressResponse xmlns="http://ec2.amazonaws.com/doc/2013-02-01/">
  <requestId>59dbff89-35bd-4eac-99ed-be587EXAMPLE</requestId> 
  <return>true</return>
</DisassociateAddressResponse>