Obtaining Links for Downloading Extended Logs (RDS for SQL Server)
Function
This API is used to obtain links for downloading extended logs.
- Before calling this API, learn how to authenticate it.
- Before calling this API, learn about the 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:log:download | read | instance | - g:EnterpriseProjectId - g:ResourceTag/<tag-key> | - | - |
Constraints
This API is supported only for RDS for SQL Server.
URI
- 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
N/A
Range
N/A
Default Value
N/A
instance_id
Yes
Definition
Instance ID.
You can obtain the value of this parameter from id in Table 4 by calling the API for querying DB instances.
Constraints
N/A
Range
N/A
Default Value
N/A
Request
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| file_name | Yes | String | Definition Name of the file to be downloaded. Constraints N/A Range The value cannot be null or empty. It can contain only uppercase letters, lowercase letters, digits, and underscores (_) and ends with .xel. You can obtain the file name from Querying Extended Logs (RDS for SQL Server). Default Value N/A |
Example Request
Obtain links for downloading extended logs.
POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/xellog-download
{
"file_name":"sqlserver_xellog_name.xel"
} Response
- Normal response
Table 3 Parameters Parameter
Type
Description
list
List
Definition
List of links for downloading extended logs. For details, see Table 4.
count
Integer
Definition
Number of extended log links.
Range
N/A
Table 4 linkInfo field data structure description Parameter
Type
Description
file_name
String
Definition
Name of the generated file for downloading.
Range
N/A
status
String
Definition
Generation status of the link.
Range
- FINISH: The download link has been generated.
- EXPORTING: The file is being generated.
- FAILED: The log file fails to be prepared.
file_size
String
Definition
File size in KB.
Range
N/A
file_link
String
Definition
Download link.
Range
If the link generation status is EXPORTING or FAILED, no value is returned.
create_at
String
Definition
Generation time.
Range
N/A
update_at
String
Definition
Update time.
Range
N/A
- Example normal response Generating links for downloading extended logs
{ "list": [ { "file_name": "HkEngineEventFile_0_133337769850300000.xel", "status": "EXPORTING", "file_size": "0", "create_at": "2023-08-14T03:35:24+0000", "update_at": "2023-08-14T03:35:24+0000" } ], "count": 1 }Links for downloading extended logs obtained successfully{ "list": [ { "file_name": "HkEngineEventFile_0_133337769850300000.xel", "status": "SUCCESS", "file_size": "0", "file_link": "https://obs.xxx:443/xxx-7a95af72c4d54a31ae0663263f0e35ea/6e22b18b43a74e4486264194f6e09f66_EL_HkEngineEventFile_0_133337769850300000.xel?xxx", "create_at": "2023-08-14T03:35:41+0000", "update_at": "2023-08-14T03:35:41+0000" } ], "count": 1 } - Abnormal response
For details, see Abnormal Response Results.
Status Code
- Normal
- Abnormal
For details, see Status Codes.
Error Code
For details, see Error Codes.
What is your overall rating for this page?
Thank 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