All Products
Search
Document Center

ApsaraDB RDS:DeleteBackup

Last Updated:Apr 25, 2024

Deletes the data backup files of an ApsaraDB RDS instance.

Operation description

Supported database engines

  • MySQL
  • PostgreSQL
Note Only instances that run RDS High-availability Edition are supported.

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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.
OperationAccess levelResource typeCondition keyAssociated operation
rds:DeleteBackupWRITE
  • DBInstance
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The instance ID. You can call the DescribeDBInstances operation to query the instance ID.

rm-uf6wjk5xxxxxxx
BackupIdstringYes

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

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

37441409-FFD1-40AA-8EC5-9ECF5E2F7C29

Examples

Sample success responses

JSONformat

{
  "RequestId": "37441409-FFD1-40AA-8EC5-9ECF5E2F7C29"
}

Error codes

HTTP status codeError codeError messageDescription
400ReadDBInstanceNotSupportThe operation is not permitted due to type of the instance.-
400ParameterLeastAssociateMust input at least one optional parameterYou must enter at least one selectable parameter.
400DeleteBackupSetNumExceedDelete backup set number is more than 100.-
403IncorrectDBInstanceStateCurrent DB instance state does not support this operation.-
403IncorrectDBInstanceTypeCurrent 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.
403IncorrectDBInstanceCharacterTypeCurrent DB Instance character_type does not support this operation.This operation is not supported for the character type of the current instance.
403OperationDenied.BackupSetDeleteNotSupportThe Specified backup does not support this operation.The current backup set cannot be deleted.
404InvalidDBInstanceName.NotFoundInvalid DBInstanceId NotFound.The instance ID cannot be found.
404IncorrectDBInstanceLockModeCurrent DB instance lock mode does not support this operation.The operation failed. The RDS instance is locked.
404InvalidBackupSetID.NotFoundSpecified 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.