Release protection prevents an ApsaraDB RDS for PostgreSQL instance from being manually released through the console or an API call. Enable it on pay-as-you-go instances that run critical workloads to guard against accidental deletion or miscommunication within a team.
Release protection only blocks manual release attempts. It does not prevent automatic release triggered by either of the following conditions:
Your account has an overdue payment for more than 15 days.
The RDS instance does not comply with applicable security compliance policies.
Prerequisites
Before you begin, ensure that you have:
A pay-as-you-go RDS instance (release protection is not available for subscription instances)
How it works
When release protection is enabled on an instance:
Console: Attempting to release the instance displays an error message indicating that the release failed.
API: Calling the DeleteDBInstance operation returns an error message indicating that the release failed.
Enable release protection
Enable during instance creation
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which the RDS instance resides.
On the Instances page, click Create Instance.
In the Basic Resources step, set Billing Method to Pay-As-You-Go and configure the other required parameters. Click Next: Instance Configuration.
In the Instance Configuration step, select Prevents instances from being unexpectedly deleted by using the console or calling an API operation. Configure the other required parameters, then click Next: Confirm Order.
Complete the remaining configuration and confirm the order.
When calling CreateDBInstance or CloneDBInstance to create an instance, set the DeletionProtection parameter to enable or disable release protection.
Enable for an existing instance
Method 1: From the Instances page
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which the RDS instance resides.
Find the target instance and choose More > Change Release Protection Settings in the Actions column.
In the dialog box, turn on Release Protection.
Click OK.
Method 2: From the instance details page
Go to the Instances page. In the top navigation bar, select the region, then click the instance ID.
On the Basic Information page, find the Configuration Information section and click Settings to the right of Release Protection.
In the dialog box, turn on Release Protection.
Click OK.
To enable release protection via API, call ModifyDBInstanceDeletionProtection.
Disable release protection
Method 1: From the Instances page
Log on to the ApsaraDB RDS console. In the left-side navigation pane, click Instances. In the top navigation bar, select the region in which the RDS instance resides.
Find the target instance and choose More > Change Release Protection Settings in the Actions column.
In the dialog box, turn off Release Protection.
Click OK.
Method 2: From the instance details page
Go to the Instances page. In the top navigation bar, select the region, then click the instance ID.
On the Basic Information page, find the Configuration Information section and click Settings to the right of Release Protection.
In the dialog box, turn off Release Protection.
Click OK.
API reference
The following API operations support release protection settings. Use the DeletionProtection parameter to enable or disable the feature when creating an instance.
| Operation | Description |
|---|---|
| CreateDBInstance | Creates an instance. Use the DeletionProtection parameter to set release protection at creation time. |
| CloneDBInstance | Restores instance data to a new instance. Use the DeletionProtection parameter to set release protection. |
| ModifyDBInstanceDeletionProtection | Enables or disables release protection for an existing instance. |
What's next
To create an RDS instance, see Create an ApsaraDB RDS for PostgreSQL instance.
To release an instance after disabling release protection, see Release or unsubscribe from an ApsaraDB RDS for PostgreSQL instance.