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...

UnassignPrivateIpAddresses

Description

Unassigns one or more secondary private IP addresses from a network interface.

This command is only available in EC2-VPC.

Request Parameters

NetworkInterfaceId

The network interface from which the secondary private IP address will be unassigned.

Type: String

Default: None

Required: Yes

PrivateIpAddress.n

The secondary private IP addresses that you want to unassign from the network interface. You can specify this option multiple times to unassign more than one IP address.

Type: AssignPrivateIpAddressesSetItemRequestType

Default: None

Required: Yes

Response Elements

The following elements are returned in an UnassignPrivateIpAddressesResponse 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

The following request unassigns two secondary private IP addresses from the specified network interface.

https://ec2.amazonaws.com/?Action=UnassignPrivateIpAddresses
&NetworkInterfaceId=eni-197d9972
&PrivateIpAddress.0=10.0.2.60 
&PrivateIpAddress.1=10.0.2.65 
&AUTHPARAMS

Example Response

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