restore_address_to_classic

EC2.Client.restore_address_to_classic(**kwargs)

Restores an Elastic IP address that was previously moved to the EC2-VPC platform back to the EC2-Classic platform. You cannot move an Elastic IP address that was originally allocated for use in EC2-VPC. The Elastic IP address must not be associated with an instance or network interface.

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

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

Response Structure

  • (dict) --

    • PublicIp (string) --

      The Elastic IP address.

    • Status (string) --

      The move status for the IP address.

Examples

This example restores the specified Elastic IP address to the EC2-Classic platform.

response = client.restore_address_to_classic(
    PublicIp='198.51.100.0',
)

print(response)

Expected Output:

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