Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Situation Awareness
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Obtaining Links for Downloading Slow Query Logs

Updated on 2024-08-28 GMT+08:00

Function

This API is used to obtain links for downloading slow query logs. The downloaded logs contain only the logs of the primary node.

  • Before calling an API, you need to understand the API in Authentication.

URI

  • URI format

    POST /v3/{project_id}/instances/{instance_id}/slowlog-download

  • Parameter description
    Table 1 Parameter description

    Name

    Mandatory

    Description

    project_id

    Yes

    Explanation:

    Project ID of a tenant in a region.

    For details about how to obtain the project ID, see Obtaining a Project ID.

    Constraints:

    N/A

    Value range:

    N/A

    Default value:

    N/A

    instance_id

    Yes

    Explanation:

    ID of the instance to be queried.

    Constraints:

    N/A

    Value range:

    N/A

    Default value:

    N/A

Request

Table 2 Parameter description

Name

Mandatory

Type

Description

file_name

No

String

Explanation:

Name of the file to be downloaded.

To obtain the file name, click the instance name on the console and choose Logs > Slow Query Logs.

Constraints:

This parameter is mandatory for Microsoft SQL Server.

Value range:

N/A

Default value:

N/A

Example Request

Obtain the link for downloading the slow query log Database_slowlog_name.

POST https://{endpoint}/v3/0483b6b16e954cb88930a360d2c4e663/instances/cee5265e1e5845649e354841234567dfin01/slowlog-download
{
	"file_name":"Database_slowlog_name"
}

Response

  • Normal response
    Table 3 Parameter description

    Name

    Type

    Description

    list

    List

    Explanation:

    Indicates the links for downloading slow query logs. For details, see Table 4.

    status

    String

    Explanation:

    Indicates the status of generating links for downloading slow query logs.

    Value range:

    • FINISH: The download link has been generated.
    • CREATING: A file is being generated and the download link is to be prepared.
    • FAILED: Log files fail to be prepared.

    count

    Integer

    Explanation:

    Indicates the number of links for downloading slow query logs.

    Value range:

    N/A

    Table 4 linkInfo field data structure description

    Name

    Type

    Description

    workflow_id

    String

    Explanation:

    Task ID.

    Value range:

    For the MySQL DB engine, the value is always "".

    file_name

    String

    Explanation:

    Indicates the name of the generated file for downloading slow query logs.

    Value range:

    N/A

    status

    String

    Explanation:

    Indicates the generation status of the current link.

    Value range:

    • EXPORTING: indicates that the download link is being generated.
    • SUCCESS: indicates that the download link is successfully generated.
    • FAILED: indicates that the download link failed to be generated.

    file_size

    String

    Explanation:

    Indicates the file size in KB.

    Value range:

    N/A

    file_link

    String

    Explanation:

    Indicates the download link. The link is valid for 5 minutes.

    Value range:

    N/A

    create_at

    Long

    Explanation:

    Indicates the generation time.

    Value range:

    N/A

    update_at

    Long

    Explanation:

    Indicates the update time.

    Value range:

    N/A

  • Example normal response
    {
      "list": [
               {
                  "workflow_id": "44fb1d85-2fcc-4d63-ad3b-c3d1ecd7000e",
                  "file_name": "054bc9c1f680d55c1f36c006e5a9f67b_slowlog_download_20200515080614589",
                  "status": "SUCCESS",
                  "file_size": "0",
                  "file_link": "https://rdsbucket.xxxr.obs.cn-xianhz-1.myhuaweicloud.com:443/054bc9c1f680d55c1f36c006e5a9f67b_slowlog_download_20200515080614589?AWSAccessKeyId=1BQ38TBCQHAVQXBUMUTC&Expires=1589530200&response-cache-control=no-cache%2Cno-store&Signature=Fgi4%2BLOJ9frAXyOkz5hRoW5O%2BUM%3D",
     
                  "create_at": 1589529991385,
                  "update_at": 1589529991385
               }
        ],
      "status": "finish",
      "count": 1
    }
  • Abnormal response

    For details, see Abnormal Request Results.

Status Code

Error Code

For details, see Error Codes.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback