If your critical business is deployed on an Elastic Compute Service (ECS) pay-as-you-go instance, we recommend that you enable release protection for the instance. This can prevent accidental release of the instance, which may cause irreparable consequences. After release protection is enabled for the instance, the instance cannot be manually released in the ECS console, by calling API operations, or by using command-line interfaces. This topic describes how to configure release protection for ECS instances.
Prerequisites
The instances for which you want to enable or disable release protection are pay-as-you-go instances.
Usage notes
The release protection feature cannot prevent the automatic release of instances that is triggered by normal reasons, such as the following ones:
A payment in your Alibaba Cloud account is overdue for more than 15 days.
The automatic release time that you set for the instance has arrived.
The instance does not comply with the applicable security compliance policies.
The instance was automatically created by Auto Scaling and is removed during subsequent scale-in events.
Enable or disable release protection for instances
By default, release protection is disabled for instances. You can manually enable or disable release protection for instances when you create the instances or after the instances are created.

Enable or disable release protection in the ECS console
Scenario 1: Enable or disable release protection for existing instances
After pay-as-you-go instances are created, you can enable or disable release protection for the instances.
Log on to the ECS console.
In the left-side navigation pane, choose .
In the upper-left corner of the top navigation bar, select a region.
On the Instances page, enable or disable release protection for a single instance or multiple instances.
To enable or disable release protection for a single instance, find the instance and choose More > Instance Settings > Change Release Protection Setting in the Actions column. In the Change Release Protection Setting dialog box, turn on or turn off Release Protection.
To enable or disable release protection for multiple instances, select the instances and choose More > Instance Settings > Change Release Protection Setting in the lower part of the page. In the Change Release Protection Setting dialog box, turn on or turn off Release Protection.
Scenario 2: Enable or disable release protection when you create instances
When you create instances, release protection is disabled for the instances by default. If you want to enable release protection, you must manually enable it.
On the instance buy page, click the Custom Launch tab. In the Billing Method section of the Basic Configurations step, click Pay-as-you-go. Then, in the Release Protection section of the System Configurations (Optional) step, select Prevent users from releasing the instance inadvertently by using the console or API.
Enable or disable release protection by calling API operations
To enable or disable release protection for existing instances, call the ModifyInstanceAttribute operation and configure the
DeletionProtection
parameter.To enable or disable release protection when you create instances, call the RunInstances or CreateInstance operation and configure the
DeletionProtection
parameter.
If you call the DeleteInstance operation to release an instance for which release protection is enabled, the error code InvalidOperation.DeletionProtection
is returned.
Check whether release protection is enabled for an instance
On the Instances page, click the ID of the instance to go to the Instance Details page. In the Other section, check the value of the Release Protection parameter.
Yes indicates that release protection is enabled for the instance.
No indicates that release protection is disabled for the instance.