If your ECS instances provide critical services, you can enable release protection for these ECS instances to prevent irreversible data loss resulting from accidental or incorrect operations during a manual release. This topic describes how to enable and disable instance release protection and view the instance release protection status.

Limits

  • Instance release protection applies only to Pay-As-You-Go instances.
  • An automatic release of an instance due to normal circumstances take precedence. These circumstances include, but are not limited to:
    • A payment under your account is overdue for more than 15 days.
    • The automatic release time that you set for the instance is reached.
    • The instance does not comply with the applicable security compliance policies.
    • The instance was automatically created by Auto Scaling and consequently is removed from the scaling group when the scaling group scales in.

Enable instance release protection when you create an instance

Note This procedure describes the instance release protection settings. For information about other settings, see Create an instance by using the wizard.

To enable instance release protection when you create an instance, follow these steps:

  1. On the Instances page, click Create Instance.
  2. On the Basic Configurations page, set the Billing Method to Pay-As-You-Go, set other parameters as needed, and then click Next: Networking.
  3. On the Networking page, set the parameters as needed, and then click Next: System Configurations.
  4. On the System Configurations page, select Prevent users from releasing the instance inadvertently by using the console or API, set the parameters as needed, and then click Next: Grouping.
    Next: Grouping
  5. On the Grouping page, set the parameters as needed, and then click Next: Preview and confirm your settings.

When you create an instance through RunInstances or CreateInstance, you can use the DeletionProtection parameter to enable or disable instance release protection.

Enable or disable instance release protection by modifying instance information

To enable or disable instance release protection by modifying the information of an instance, follow these steps:

  1. On the Instances page, choose More > Instance Settings > Modify Instance Attributes in the Actions column of the instance to be modified.
  2. In the Modify Instance Attributes dialog box, select Enable Instance Release Protection.
    Note To disable the instance release protection, clear Enable Instance Release Protection.


  3. Click OK.

When you modify instance information through ModifyInstanceAttribute, you can use the DeletionProtection parameter to enable or disable instance release protection.

View the instance release protection status

To view the release protection status of an instance, follow these steps:

  1. On the Instances page, click the target instance in the Instance ID/Name column, or click Manage in the Actions column of the instance.
  2. On the Instance Details page, view the status of Enable release protection in the Payment Information area.

Example of protection effect

After you enable release protection for an instance, a warning message will be displayed if you try to manually release the instance. If you want to manually release the instance, you must disable instance release protection.



After you enable release protection for an instance, the error code InvalidOperation.DeletionProtection is returned if you try to use DeleteInstanceto delete the instance.