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

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-hz1fds

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.

Response parameters

Parameter Type Example Description
RequestId String 2DFF784E-DC31-5BBC-9B25-9261CD9E0AA9

The ID of the request.

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

The 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:

  • 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.
DownloadLink String http://polarx-cdc-binlog-cn-hangzhou.oss-cn-hangzhou.aliyuncs.com/polardbx_cdc/pxc-hzfd132143sfds1/binlog.000001?Expires=1636469502&OSSAccessKeyId=LT13fds12dsafddsf&Signature=fdpm%bdsfadsa%2F%bdsafdsaf%3D

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 beginning of the time range in which log entries were generated in the binary log file.

LogSize Long 536870912

The size of the binary log file.

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:

  • 0: The binary log file is not deleted.
  • 1: The binary log file is deleted.
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-hz1fds
&StartTime=2021-09-09 10:27:46
&EndTime=2021-11-09 10:27:46
&<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-hzfd132143sfds1/binlog.000001?Expires=1636469502&amp;OSSAccessKeyId=LT13fds12dsafddsf&amp;Signature=fdpm%bdsfadsa%2F%bdsafdsaf%3D</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-hzfd132143sfds1/binlog.000001?Expires=1636469502&OSSAccessKeyId=LT13fds12dsafddsf&Signature=fdpm%bdsfadsa%2F%bdsafdsaf%3D",
    "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

HttpCode Error code Error message Description
400 InvalidPageSize.Malformed The specified parameter PageSize is not valid. The error message returned because the specified PageSize parameter is invalid.

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