Modifies the log backup retention period that is allowed by the SQL explorer feature on an ApsaraDB for RDS instance.

The SQL explorer must be enabled for the instance.

The instance must run MySQL. For more information, see SQL Explorer.

Note After you shorten the log backup retention period, log backpack files that are stored longer than the specified log backup retention period are immediately deleted.


OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes ModifySQLCollectorRetention

The operation that you want to perform. Set the value to ModifySQLCollectorRetention.

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

ConfigValue String Yes 365

The log backup retention period that is allowed by the SQL explorer on the instance. Valid values:

  • 30: 30 days
  • 180: 180 days
  • 365: one year
  • 1095: three years
  • 1825: five years
RegionId String No cn-hangzhou

The ID of the region to which the instance belongs. You can call the DescribeRegions operation to query the most recent region list.

ResourceGroupId String No rg-acfmyxxxx

The ID of the resource group to which the instance belongs.

Response parameters

Parameter Type Example Description
RequestId String 21383BB3-3845-4628-B422-B4FB5C83DEBD

The ID of the request.


Sample requests

http(s):// Action=ModifySQLCollectorRetention
&<Common request parameters>

Sample success responses

XML format


JSON format


Error codes

For a list of error codes, visit the API Error Center.