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'
)
DryRunOperation
. Otherwise, it is UnauthorizedOperation
.[REQUIRED]
The Elastic IP address.
dict
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': {
'...': '...',
},
}