If your ECS instance of the classic network or VPC type was assigned a public IP address within the last six hours, you can change the public IP address.
Prerequisites
Before changing the public IP address of an ECS instance, ensure that the following
requirements are met:
- The ECS instance is in the
Stopped
state.Note If No Charges After Instance Is Stopped is enabled for your account, you must select Retain Instance and Continue Charging After Instance Is Stopped when stopping the ECS instance. Otherwise, the Change Public IP Address item will not be displayed in the ECS console after you stop the ECS instance. - The ECS instance was assigned a public IP address.
- The public IP address was assigned within the last six hours.
Background information
Changing the public IP address of an ECS instance is subject to the following limits:
- You can change the public IP address of an ECS instance a maximum of three times.
- If no public IP address was allocated during ECS instance creation, you cannot use
the procedure set out in this topic. In this case, you must use either of the following
methods:
- Apply for and bind an Elastic IP Address (EIP) to the ECS instance. For more information, see the following topic of EIP documentation: Create an EIP.
- Modify the public bandwidth of the ECS instance to allocate a fixed public IP address. For more information about modifying the public bandwidth of a subscription ECS instance, see Overview of configuration changes. For more information about modifying the public bandwidth of a pay-as-you-go ECS instance, see Change Internet bandwidth.