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

The SQL explorer feature must be enabled for the instance.

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

Debugging

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 DescribeSQLCollectorRetention

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

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

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
ConfigValue String 365

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

  • 30: 30 days
  • 180: 180 days
  • 365: one year
  • 1095: three years
  • 1825: five years
RequestId String D5CEDCC2-CA75-43F7-9508-92F418CE6391

The ID of the request.

Examples

Sample requests

http(s)://rds.aliyuncs.com/? Action=DescribeSQLCollectorRetention
&DBInstanceId=rm-uf6wjk5xxxxxxx
&<Common request parameters>

Sample success responses

XML format

<DescribeSQLCollectorRetentionResponse>
  <ConfigValue>365</ConfigValue>
  <RequestId>D5CEDCC2-CA75-43F7-9508-92F418CE6391</RequestId>
</DescribeSQLCollectorRetentionResponse>

JSON format

{"ConfigValue":"365",
"RequestId":"D5CEDCC2-CA75-43F7-9508-92F418CE6391"}

Error codes

HTTP status code Error code Error message Description
400 InvalidComment Should specify a policy name. The error message returned because no policy name has been specified.

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