Querying Merged Binlog Files for Download
Function
This API is used to query merged binlog files for download.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about request header parameters.
Authorization Information
- If you are using role/policy-based authorization, see Permissions and Supported Actions for details on the required permissions.
- If you are using identity policy-based authorization, the following identity policy-based permissions are required.
|
Action |
Access Level |
Resource Type (*: required) |
Condition Key |
Alias |
Dependencies |
|---|---|---|---|---|---|
|
rds:binlog:get |
read |
instance |
g:EnterpriseProjectId g:ResourceTag/<tag-key> |
- |
- |
Constraints
This API is only available for MySQL.
- Parameter description
Table 1 Parameters Parameter
Mandatory
Description
project_id
Yes
Definition
Project ID of a tenant in a region.
To obtain the value, see Obtaining a Project ID.
Constraints
The value cannot be empty.
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID, which uniquely identifies an instance.
Constraints
N/A
Range
The value can contain 36 characters. Only letters and digits are allowed.
Default Value
N/A
Table 2 Parameters Parameter
Mandatory
Type
Description
offset
No
Integer
Definition
Index offset. The query starts from the next piece of data indexed by this parameter.
Constraints
N/A
Range
The value must be a non-negative number.
Default Value
0: The query starts from the first data record.
limit
No
Integer
Definition
Number of records returned by a query.
Constraints
N/A
Range
The value must be a positive integer ranging from 1 to 100.
Default Value
10
Request
None
Example Request
Query merged binlog files of a DB instance for download.
GET https://{Endpoint}/v3/54623db08b174c858ba779d2aa7923a3/instances/aa650a108f034e83b24486fd1ff7be2fin01/packlog/infos?offset=0&limit=10
Response
- Normal response
Table 3 Parameters Parameter
Type
Description
total_count
Integer
Definition
Number of merged binlog files.
Range
N/A
pack_log_infos
Array of objects
Definition
Merged binlog file information.
For details, see Table 4.
Table 4 pack_log_infos element structure description Parameter
Type
Description
id
String
Definition
Unique ID of the file.
Range
N/A
instance_id
String
Definition
Instance ID.
Range
N/A
size
Double
Definition
File size.
Range
N/A
size_unit
String
Definition
Unit of the file size.
Range
N/A
status
String
Definition
Status.
Range
N/A
query_start_time
Long
Definition
Timestamp marking the start of the merge.
Range
N/A
query_end_time
Long
Definition
Timestamp marking the end of the merge.
Range
N/A
file_name
String
Definition
File name.
Range
N/A
- Example normal response
{ "statistics": [ { "keyword": "SELECT~FROM~table~WHERE~id", "raw_sql_text": "select *from db1", "ids": [ 123, 124, 125, 126 ], "count": 4, "total_time": 14, "avg_time": 3.5, "max_time": 5, "strategy": "top3_average", "advice_concurrency": "5" } ] } - Abnormal response
For details, see Abnormal Request Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot