move_address_to_vpc

move_address_to_vpc(**kwargs)

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.

Note

We are retiring EC2-Classic. We recommend that you migrate from EC2-Classic to a VPC. For more information, see Migrate from EC2-Classic to a VPC in the Amazon Elastic Compute Cloud User Guide .

See also: AWS API Documentation

Request Syntax

response = client.move_address_to_vpc(
    DryRun=True|False,
    PublicIp='string'
)
Parameters
  • DryRun (boolean) -- 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 .
  • PublicIp (string) --

    [REQUIRED]

    The Elastic IP address.

Return type

dict

Returns

Response Syntax

{
    'AllocationId': 'string',
    'Status': 'MoveInProgress'|'InVpc'|'InClassic'
}

Response Structure

  • (dict) --

    • AllocationId (string) --

      The allocation ID for the Elastic IP address.

    • Status (string) --

      The status of the move of the IP address.

Examples

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

response = client.move_address_to_vpc(
    PublicIp='54.123.4.56',
)

print(response)

Expected Output:

{
    'Status': 'MoveInProgress',
    'ResponseMetadata': {
        '...': '...',
    },
}