# Configuring Instance Protection

#### Scenarios

To control whether a particular instance can be removed automatically from an AS group, use instance protection. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.

#### Prerequisites

Instance protection does not protect instances from the following:

- Health check replacement if the instance fails health checks
- Manual removal
  - Instance protection does not protect unhealthy instances because such instances cannot provide services.
  - By default, instance protection does not take effect on the ECSs that are newly created in or added to an AS group.
  - If an instance is removed from an AS group, its instance protection setting is lost.

#### Enabling Instance Protection

1. Log in to the management console.
2. Click in the upper left corner and select the desired region and project.
3. Under Computing, click Auto Scaling. In the navigation pane on the left, choose Instance Scaling. Then click the AS Groups tab.
4. Click the name of the target AS group.
5. Click the Instances tab. Select one or more instances and choose Enable Instance Protection from the More drop-down list. In the displayed Enable Instance Protection dialog box, click Yes.

#### Disabling Instance Protection

1. Log in to the management console.

1. Click in the upper left corner and select the desired region and project.
2. Under Computing, click Auto Scaling. In the navigation pane on the left, choose Instance Scaling. Then click the AS Groups tab.
3. Click the name of the target AS group.
4. Click the Instances tab. Select one or more instances and choose Disable Instance Protection from the More drop-down list. In the displayed Disable Instance Protection dialog box, click Yes.

Parent topic: Scaling Action