You can call the DeleteDBInstance operation to release an ApsaraDB RDS instance.

Before you call this operation, make sure that the following requirements are met:

  • The instance must be in the Running state.
  • The read/write splitting feature must be disabled for the instance.
  • The instance must be a primary, read-only, disaster recovery, or temporary instance. If the instance is a primary instance, it must use the pay-as-you-go billing method.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DeleteDBInstance

The operation that you want to perform. Set the value to DeleteDBInstance.

DBInstanceId String Yes rm-uf6wjk5xxxxxxxxxx

The ID of the instance.

ReleasedKeepPolicy String No Lastest

The policy based on which ApsaraDB RDS retains archived backup files after the instance is released. Valid values:

  • None: No archived backup files are retained.
  • Lastest: Only the last archived backup file is retained.
  • All: All the archived backup files are retained.
Note This parameter is supported only when the instance runs the MySQL database engine.

Response parameters

Parameter Type Example Description
RegionId String ap-southeast-1

The ID of the region to which the instance belongs.

RequestId String 65BDA532-28AF-4122-AA39-B382721EEE64

The ID of the request.


Sample requests

http(s):// Action=DeleteDBInstance
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.