All Products
Search
Document Center

ApsaraDB RDS:DeleteBackup

Last Updated:May 29, 2023

Deletes a backup file of an instance.

Operation Description

Backup sets of only the instance itself are deleted. Backup sets of the associated instances such as read-only, disaster recovery, and cloned instances are not deleted.

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

  • The instance is in the Running state.
  • The instance runs PostgreSQL or MySQL on RDS High-availability.
  • 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.

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
  • RDS
    acs:rds:{#regionId}:{#accountId}:dbinstance/{#dbinstanceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBInstanceIdstringYes

The ID of the instance.

rm-uf6wjk5xxxxxxx
BackupIdstringYes

The ID of the backup set. You can call the DescribeBackups operation to query backup set IDs. Separate multiple values with commas (,). You can specify a maximum of 100 values in a single request.

NoteAfter you call the DescribeBackups operation, the returned backup sets whose StoreStatus is Enabled can be deleted.
324909958

Response parameters

ParameterTypeDescriptionExample
object
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.