Queries the binary log files of an ApsaraDB for RDS instance.

  • If the value returned for the DownloadLink parameter is NULL for a binary log file, the binary log file cannot be downloaded from a URL.
  • If the value returned for the DownloadLink parameter is not NULL for a binary log file, the binary log file can be downloaded from a URL. The expiration time of the URL is specified by using the LinkExpiredTime parameter. You must download the binary log file before the expiration time.
    Note If the instance is running SQL Server, this operation is not supported.

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 DescribeBinlogFiles

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

DBInstanceId String Yes rm-uf6wjk5xxxxxxx

The ID of the instance.

EndTime String Yes 2011-06-20T15:00:00Z

The end of the time range to query. The end time must be later than the start time. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

StartTime String Yes 2011-06-01T15:00:00Z

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

PageSize Integer No 30

The number of entries to return on each page. Valid values: 30 to 100. Default value: 30.

PageNumber Integer No 1

The number of the page to return. Pages start from page 1.

Default value: 1.

Response parameters

Parameter Type Example Description
RequestId String ED169A3E-1657-4104-82AB-24EA8CD0DB75

The ID of the request.

TotalRecordCount Integer 100

The total number of binary log files returned.

PageNumber Integer 1

The page number of the returned page.

PageRecordCount Integer 30

The number of binary log files returned on the current page.

TotalFileSize Long 2269410

The total size of binary log files returned.

Items Array

An array that consists of binary log files.

FileSize Long 2269410

The size of the binary log file. Unit: bytes.

LogBeginTime String 2019-02-09T17:45:21Z

The start time of the log data recorded in the binary log file. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

LogEndTime String 2019-02-15T13:10:28Z

The end time of the log data recorded in the binary log file. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

DownloadLink String http://rdsxxxxx.oss.aliyuncs.com/xxxxxx

The HTTP-based URL from which the binary log file can be downloaded over the Internet. If a NULL value is returned, the binary log file cannot be downloaded from a URL.

IntranetDownloadLink String http://rdslog-hz-v3.oss-cn-hangzhou-internal.aliyuncs.com/xxxxxx

The URL from which the binary log file can be downloaded over an internal network.

LinkExpiredTime String 2013-06-09T18:00:00Z

The expiration time of the URL. The time follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC.

Checksum String 18358304393468701857

The checksum.

HostInstanceID String 5841973

The ID of the instance on which the binary log file was generated. You can use this parameter to determine whether the binary log file is generated on the primary or secondary instance.

LogFileName String 000000040000000000000019

The name of the binary log file.

Examples

Sample requests

http(s)://rds.aliyuncs.com/? Action=DescribeBinlogFiles
&DBInstanceId=rm-uf6wjk5xxxxxxx
&StartTime=2011-06-01T15:00:00Z
&EndTime=2011-06-20T15:00:00Z
&<Common request parameters>

Sample success responses

XML format

<DescribeBinlogFilesResponse>
	  <Items></Items>
	  <PageNumber>1</PageNumber>
	  <TotalRecordCount>0</TotalRecordCount>
	  <TotalFileSize>0</TotalFileSize>
	  <RequestId>ED169A3E-1657-4104-82AB-24EA8CD0DB75</RequestId>
	  <PageRecordCount>0</PageRecordCount>
</DescribeBinlogFilesResponse>

JSON format

{
	"Items": {
		"BinLogFile": []
	},
	"PageNumber": 1,
	"TotalRecordCount": 0,
	"TotalFileSize": "0",
	"RequestId": "ED169A3E-1657-4104-82AB-24EA8CD0DB75",
	"PageRecordCount": 0
}

Error codes

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