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

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

ParameterTypeRequiredExampleDescription
ActionStringYesDescribeBinaryLogList

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

RegionIdStringYescn-hangzhou

The region ID of the instance.

PageNumberIntegerNo1

The number of the page to return. Default value: 1.

PageSizeIntegerNo30

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

DBInstanceNameStringYespxc-hzfd13214******

The name of the instance.

StartTimeStringYes2021-09-09 10:27:46

The beginning of the time range to query.

EndTimeStringYes2021-11-09 10:27:46

The end of the time range to query.

InstanceNameStringNopxc-hzfd13214******-cdc

The name of the CDC instance. By default, the list of single-stream binary logs is queried.

Response parameters

ParameterTypeExampleDescription
RequestIdString2DFF784E-DC31-5BBC-9B25-9261CD9E0AA9

The request ID.

PageNumberInteger1

The page number of the returned page.

PageSizeInteger30

The number of entries returned on the current page.

TotalNumberInteger100

The total number of the returned binary log files.

LogListArray of LogList

Details about the returned binary log files.

EndTimeString2021-11-09 10:27:46

The end of the time range in which log entries were generated in the binary log file.

ModifiedTimeString2021-11-09 10:27:46

The last time when the binary log file was updated.

UploadHostString10.110.88.9

The IP address of the host to which the binary log file is backed up.

UploadStatusInteger2

The backup state of the binary log file. Valid values:

  • 0: The binary log file is not backed up.
  • 1: The binary log file is being backed up.
  • 2: The binary log file is backed up.
DownloadLinkStringhttp://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.

BeginTimeString2021-09-09 10:27:46

The start time of the log entry.

LogSizeLong536870912

The size of the log file. Unit: bytes.

FileNameStringbinlog.000001

The name of the binary log file.

CreatedTimeString2021-09-09 10:27:46

The time when the binary log file was created.

PurgeStatusInteger0

Indicates whether the binary log file is deleted. Valid values:

  • 0: The binary log file is not deleted.
  • 1: The binary log file is deleted.
IdLong100

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&amp;OSSAccessKeyId=LT13fds12ds******&amp;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.