All Products
Search
Document Center

ApsaraDB RDS:PurgeDBInstanceLog

Last Updated:Apr 28, 2024

Clears the on-premises logs of an ApsaraDB RDS instance.

Operation description

Supported database engines

  • MySQL
  • SQL Server

Description

The system automatically uploads log backup files to Object Storage Service (OSS) buckets. If the remaining storage of an instance is insufficient, you can call this operation to upload the log backup files of the instance to OSS buckets. After the upload is complete, the system deletes these files from the instance to release storage. This operation is called to upload log backup files from an instance to OSS buckets and then delete these files from the instance. If the instance runs SQL Server, transaction log backup files are compressed before they are uploaded.

Precautions

  • When you upload log backup files, the data restoration feature is not affected.
  • This operation is called to release storage. The backup storage usage is not reduced.
  • The OSS buckets to which log backup files are uploaded are provided by the system. You do not need to purchase these OSS buckets. In addition, you cannot access these OSS buckets.

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

Request parameters

ParameterTypeRequiredDescriptionExample
ClientTokenstringNo

The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

ETnLKlblzczshOTUbOCzxxxxxxxxxx
DBInstanceIdstringYes

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

rm-uf6wjk5xxxxxxx

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

RequestIdstring

The ID of the request.

65BDA532-28AF-4122-AA39-B382721EEE64

Examples

Sample success responses

JSONformat

{
  "RequestId": "65BDA532-28AF-4122-AA39-B382721EEE64"
}

Error codes

HTTP status codeError codeError messageDescription
403IncorrectDBInstanceTypeCurrent DB instance type does not support this operation.The operation failed. The RDS instance is not in a ready state.
403IncorrectDBInstanceStateCurrent DB instance state does not support this operation.-
403IncorrectDBInstanceLockModeCurrent DB instance lock mode does not support this operation.The operation failed. The RDS instance is locked.
403ConcurrentTaskExceededConcurrent task exceeding the allowed amount.The number of concurrent tasks exceeds the maximum number of concurrent tasks that are allowed.
403IncorrectDBInstanceEngineCurrent DB Instance engine does not support this operation.The operation failed. The operation is not supported for the database engine that is run on 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.
404InvalidDBInstance.NotFoundSpecified instance does not exist or not support.The RDS instance cannot be found, is deleted, or does not support the operation.
404InvalidPage.NotFoundPage not found.The specified parameters are not found. Check your parameters.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-09-01The Error code has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    Error Codes 404 change
    delete Error Codes: 403