Menu
Amazon Elastic Compute Cloud
API Reference (API Version 2016-11-15)

MoveAddressToVpc

Moves an Elastic IP address from the EC2-Classic platform to the EC2-VPC platform. The Elastic IP address must be allocated to your account for more than 24 hours, and it must not be associated with an instance. After the Elastic IP address is moved, it is no longer available for use in the EC2-Classic platform, unless you move it back using the RestoreAddressToClassic request. You cannot move an Elastic IP address that was originally allocated for use in the EC2-VPC platform to the EC2-Classic platform.

Request Parameters

The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.

DryRun

Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is DryRunOperation. Otherwise, it is UnauthorizedOperation.

Type: Boolean

Required: No

PublicIp

The Elastic IP address.

Type: String

Required: Yes

Response Elements

The following elements are returned by the service.

allocationId

The allocation ID for the Elastic IP address.

Type: String

requestId

The ID of the request.

Type: String

status

The status of the move of the IP address.

Type: String

Valid Values: MoveInProgress | InVpc | InClassic

Errors

For information about the errors that are common to all actions, see Common Errors.

Example

Example

This example moves Elastic IP address 54.123.4.56 to the EC2-VPC platform.

Sample Request

Copy
https://ec2.amazonaws.com/?Action=MoveAddressToVpc &publicIp=54.123.4.56 &AUTHPARAMS

Sample Response

Copy
<MoveAddressToVpcResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>f7de5e98-491a-4c19-a92d-908d6EXAMPLE</requestId> <allocationId>eipalloc-1cfe1879</allocationId> <status>InVpc</status> </MoveAddressToVpcResponse>

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: