Queries the binary log files of a PolarDB-X instance.
- By default, binary log files are saved for 15 days.
- Each binary log file that is returned by this operation contains the log entries that are generated over the time range that is specified by the StartTime and EndTime parameters.
- If the value of the DownloadLink response parameter is a URL instead of NULL, you can download the binary log file from this URL. This URL is valid within two days after it is generated. Download the binary log file before the URL expires.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeBinaryLogList | The operation that you want to perform. Set the value to DescribeBinaryLogList. |
RegionId | String | Yes | cn-hangzhou | The region ID of the instance. |
PageNumber | Integer | No | 1 | The number of the page to return. Default value: 1. |
PageSize | Integer | No | 30 | The number of entries to return on each page. Default value: 30. |
DBInstanceName | String | Yes | pxc-hzfd13214****** | The name of the instance. |
StartTime | String | Yes | 2021-09-09 10:27:46 | The beginning of the time range to query. |
EndTime | String | Yes | 2021-11-09 10:27:46 | The end of the time range to query. |
InstanceName | String | No | pxc-hzfd13214******-cdc | The name of the CDC instance. By default, the list of single-stream binary logs is queried. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 2DFF784E-DC31-5BBC-9B25-9261CD9E0AA9 | The request ID. |
PageNumber | Integer | 1 | The page number of the returned page. |
PageSize | Integer | 30 | The number of entries returned on the current page. |
TotalNumber | Integer | 100 | The total number of the returned binary log files. |
LogList | Array of LogList | Details about the returned binary log files. | |
EndTime | String | 2021-11-09 10:27:46 | The end of the time range in which log entries were generated in the binary log file. |
ModifiedTime | String | 2021-11-09 10:27:46 | The last time when the binary log file was updated. |
UploadHost | String | 10.110.88.9 | The IP address of the host to which the binary log file is backed up. |
UploadStatus | Integer | 2 | The backup state of the binary log file. Valid values:
|
DownloadLink | String | http://polarx-cdc-binlog-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/polardbx_cdc/pxc-hzfd13214******/binlog.000001?Expires=1636469502&OSSAccessKeyId=LT13fds12ds******&Signature=fdpm%bdsfadsa%2F%bdsafd****** | The download URL of the binary log file. This URL is valid within two days after it is generated. |
BeginTime | String | 2021-09-09 10:27:46 | The start time of the log entry. |
LogSize | Long | 536870912 | The size of the log file. Unit: bytes. |
FileName | String | binlog.000001 | The name of the binary log file. |
CreatedTime | String | 2021-09-09 10:27:46 | The time when the binary log file was created. |
PurgeStatus | Integer | 0 | Indicates whether the binary log file is deleted. Valid values:
|
Id | Long | 100 | The unique ID of the returned entry. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=DescribeBinaryLogList
&RegionId=cn-hangzhou
&PageNumber=1
&PageSize=30
&DBInstanceName=pxc-hzfd13214******
&StartTime=2021-09-09 10:27:46
&EndTime=2021-11-09 10:27:46
&InstanceName=pxc-hzfd13214******-cdc
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<DescribeBinaryLogListResponse>
<RequestId>2DFF784E-DC31-5BBC-9B25-9261CD9E0AA9</RequestId>
<PageNumber>1</PageNumber>
<PageSize>30</PageSize>
<TotalNumber>100</TotalNumber>
<LogList>
<EndTime>2021-11-09 10:27:46</EndTime>
<ModifiedTime>2021-11-09 10:27:46</ModifiedTime>
<UploadHost>10.110.88.9</UploadHost>
<UploadStatus>2</UploadStatus>
<DownloadLink>http://polarx-cdc-binlog-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/polardbx_cdc/pxc-hzfd13214******/binlog.000001?Expires=1636469502&OSSAccessKeyId=LT13fds12ds******&Signature=fdpm%bdsfadsa%2F%bdsafd******</DownloadLink>
<BeginTime>2021-09-09 10:27:46</BeginTime>
<LogSize>536870912</LogSize>
<FileName>binlog.000001</FileName>
<CreatedTime>2021-09-09 10:27:46</CreatedTime>
<PurgeStatus>0</PurgeStatus>
<Id>100</Id>
</LogList>
</DescribeBinaryLogListResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "2DFF784E-DC31-5BBC-9B25-9261CD9E0AA9",
"PageNumber" : 1,
"PageSize" : 30,
"TotalNumber" : 100,
"LogList" : [ {
"EndTime" : "2021-11-09 10:27:46",
"ModifiedTime" : "2021-11-09 10:27:46",
"UploadHost" : "10.110.88.9",
"UploadStatus" : 2,
"DownloadLink" : "http://polarx-cdc-binlog-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/polardbx_cdc/pxc-hzfd13214******/binlog.000001?Expires=1636469502&OSSAccessKeyId=LT13fds12ds******&Signature=fdpm%bdsfadsa%2F%bdsafd******",
"BeginTime" : "2021-09-09 10:27:46",
"LogSize" : 536870912,
"FileName" : "binlog.000001",
"CreatedTime" : "2021-09-09 10:27:46",
"PurgeStatus" : 0,
"Id" : 100
} ]
}
Error codes
For a list of error codes, see Service error codes.