Deletes a database from a specified PolarDB cluster.
Note
- The cluster must be in the Running state and unlocked. Otherwise, the specified database cannot be deleted.
- The delete operation is performed in an asynchronous manner. It may take a long time to delete a large database. A success response for this operation only indicates that the request to delete the database is sent. You must confirm that the database does not exist in the cluster to determine that the database has been deleted.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | No | DeleteDatabase |
The operation that you want to perform. Set the value to DeleteDatabase. |
DBClusterId | String | Yes | pc-************* |
The ID of the cluster. |
DBName | String | Yes | testdb |
The name of the database. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 2FED790E-FB61-4721-8C1C-07C627****** |
The ID of the request. |
Examples
Sample requests
http(s)://polardb.aliyuncs.com/?Action=DeleteDatabase
&DBClusterId=pc-*************
&DBName=testdb
&<Common request parameters>
Sample success responses
XML
format
<DeleteDatabaseResponse>
<RequestId>2FED790E-FB61-4721-8C1C-07C627******</RequestId>
</DeleteDatabaseResponse>
JSON
format
{
"RequestId": "2FED790E-FB61-4721-8C1C-07C627******"
}
Error codes
HttpCode | Error codes | Error message | Description |
---|---|---|---|
404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The error message returned because the specified DBClusterId does not exist in the current record. |
For a list of error codes, visit the API Error Center.