Deletes the data backup files of an ApsaraDB RDS instance.
Operation description
Supported database engines
- MySQL
- PostgreSQL
Description
You can call this operation to delete backup sets of the instance itself. Backup sets of the associated instances such as read-only, disaster recovery, and cloned instances are not deleted.
Precautions
Before you call this operation, make sure that the following requirements are met:
- The instance is in the Running state.
- If the log backup feature is disabled, instances cannot be restored by point in time. You can delete data backup sets that are retained for more than seven days.
- If the log backup feature is enabled and the log backup retention period is shorter than the data backup retention period, you can delete the data backup files that are retained for a period longer than the log backup retention period.
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
rds:DeleteBackup | WRITE |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBInstanceId | string | Yes | The instance ID. You can call the DescribeDBInstances operation to query the instance ID. | rm-uf6wjk5xxxxxxx |
BackupId | string | Yes | The backup set ID. You can call the DescribeBackups operation to query the backup set ID. Separate multiple values with commas (,). You can specify a maximum of 100 values in a single request. Note
You can delete only backup sets whose StoreStatus is Enabled in the response to the DescribeBackups operation call.
| 324****** |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "37441409-FFD1-40AA-8EC5-9ECF5E2F7C29"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | ReadDBInstanceNotSupport | The operation is not permitted due to type of the instance. | - |
400 | ParameterLeastAssociate | Must input at least one optional parameter | You must enter at least one selectable parameter. |
400 | DeleteBackupSetNumExceed | Delete backup set number is more than 100. | - |
403 | IncorrectDBInstanceState | Current DB instance state does not support this operation. | - |
403 | IncorrectDBInstanceType | Current DB instance engine and type does not support operations. | The operation failed. The operation is not supported for the database engine of the RDS instance. |
403 | IncorrectDBInstanceCharacterType | Current DB Instance character_type does not support this operation. | This operation is not supported for the character type of the current instance. |
403 | OperationDenied.BackupSetDeleteNotSupport | The Specified backup does not support this operation. | The current backup set cannot be deleted. |
404 | InvalidDBInstanceName.NotFound | Invalid DBInstanceId NotFound. | The instance ID cannot be found. |
404 | IncorrectDBInstanceLockMode | Current DB instance lock mode does not support this operation. | The operation failed. The RDS instance is locked. |
404 | InvalidBackupSetID.NotFound | Specified backup set ID does not exist. | The backup set does not exist. Specify an available backup set. |
For a list of error codes, visit the Service error codes.