All Products
Search
Document Center

ApsaraDB RDS:Enable or disable the release protection feature for an ApsaraDB RDS for PostgreSQL instance

Last Updated:Mar 30, 2026

Deletion protection prevents a pay-as-you-go RDS instance from being manually deleted through the console or an API call. Enable it on instances running critical workloads to guard against accidental deletion caused by unintended operations or miscommunication between team members.

Important

Deletion protection only blocks manual deletion. It does not prevent automatic release in the following cases:

  • Your account has an overdue payment for more than 15 days.

  • The instance does not comply with applicable security compliance policies.

Prerequisites

Before you begin, ensure that you have:

  • A pay-as-you-go RDS instance

How deletion protection works

When deletion protection is enabled, any attempt to delete the instance is blocked:

  • Console: an error message appears indicating the instance cannot be deleted.

  • API: the DeleteDBInstance operation returns an error.

Enable deletion protection

Enable deletion protection on an existing instance

Use either of the following methods. Both take effect immediately.

Method 1: From the Instances list

  1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where the instance resides.

  2. Find the instance, and choose More > Change Release Protection Settings in the Actions column.

  3. In the dialog box, turn on Release Protection.

  4. Click OK.

Method 2: From the instance details page

  1. Go to the Instances page. Select the region, find the instance, and click its ID.

  2. In the Configuration Information section of the Basic Information page, click Settings to the right of Release Protection.

  3. In the dialog box, turn on Release Protection.

  4. Click OK.

To enable deletion protection via API, call the ModifyDBInstanceDeletionProtection operation.

Enable deletion protection when creating an instance

To enable deletion protection during instance creation:

  1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances.

  2. Click Create Instance.

  3. Set Billing Method to Pay-as-you-go.

  4. In the More section, select Prevents instances from being unexpectedly deleted by using the console or calling an API operation.

  5. Configure the remaining parameters and complete the purchase.

For the full list of creation parameters, see Create an ApsaraDB RDS for PostgreSQL instance.

When calling CreateDBInstance or CloneDBInstance to create an instance, set the DeletionProtection parameter to enable or disable deletion protection.

Disable deletion protection

Before you can delete a protected instance, disable deletion protection first.

Method 1: From the Instances list

  1. Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region where the instance resides.

  2. Find the instance, and choose More > Change Release Protection Settings in the Actions column.

  3. In the dialog box, turn off Release Protection.

  4. Click OK.

Method 2: From the instance details page

  1. Go to the Instances page. Select the region, find the instance, and click its ID.

  2. In the Configuration Information section of the Basic Information page, click Settings to the right of Release Protection.

  3. In the dialog box, turn off Release Protection.

  4. Click OK.

API reference

API Description
CreateDBInstance Creates an instance. Use the DeletionProtection parameter to configure deletion protection at creation time.
CloneDBInstance Restores an instance to a new instance. Use the DeletionProtection parameter to configure deletion protection.
ModifyDBInstanceDeletionProtection Enables or disables deletion protection for an existing instance.

What's next