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
On this page

Show all

API Overview

Updated on 2024-12-04 GMT+08:00

DAS provides extension APIs. By calling DAS APIs, you can use some DAS functions. See the following table for details.

Table 1 APIs

Type

Description

Querying API Versions

  • Query API versions.
  • Query a specified API version.

Querying a SQL Execution Plan

Query a SQL execution plan. Currently, this function is supported only for MySQL DB instances.

Killing Sessions

Kill sessions. Sessions are killed by user, database, or session ID. Currently, this function is supported only for MySQL DB instances.

Querying Metadata Locks

Query metadata locks. Currently, this function is supported only for MySQL DB instances.

Querying InnoDB Lock Waits

Query InnoDB lock waits. Currently, this function is supported only for MySQL DB instances.

Querying Database Users

Query registered database users. Currently, this function is supported only for MySQL DB instances.

Registering a Database User

Register the database username and password with the DAS system. A database user ID will be returned in the response and is required for calling other APIs, such as the API used to query instance sessions. The database password is encrypted and used for DAS API calls only. This API does not create database user objects on the database. Currently, this function is supported only for MySQL DB instances.

Querying Instance Sessions

Query instance sessions by database or user. Currently, this function is supported only for MySQL DB instances.

Querying a Specified Database User

Query information of a specified database user. Currently, this function is supported only for MySQL DB instances.

Modifying a Database User

Change the username and password for a registered database user. Currently, this function is supported only for MySQL DB instances.

Deleting a Database User

Delete a database user. The database user is deleted from the DAS system only. The real database user object is not deleted. Currently, this function is supported only for MySQL DB instances.

Obtaining the Space Analysis Data

Obtain the space analysis data. The file system generates instance-level data, and the information_schema.tables table generates database-level and table-level data. Space & Metadata Analysis allows you to analyze a maximum of 10,000 tables. If tablespace data is missing, there may be too many instance tables, or the account password has not been saved. If the password has not been saved, use the user management API or page to save the database account. MySQL and TaurusDB are supported.

Creating a Space Analysis Task

This API is used to create a space analysis task, for example, triggering re-analysis. This function is supported for MySQL and TaurusDB.

Enabling or Disabling SQL Explorer and Slow Query Log

Enable or disable SQL Explorer. After this function is enabled, the instance performance loss rate is within 5% and DAS stores all SQL statement logs for analysis. You can set the retention period of SQL explorer data. After the retention period expires, the data is automatically deleted. If not specified, the data is retained for seven days.

Enable or disable Slow Query Log. After this function is enabled, DAS stores slow query logs for analysis. You can set the retention period of slow query logs. After the retention period expires, the data is automatically deleted. If not specified, the data is retained for seven days.

Querying Whether SQL Explorer and Slow Query Log Are Enabled

Query whether SQL Explorer and Slow Query Log are enabled.

Exporting Slow Query Logs

After Slow Query Log is enabled, you can export the slow query logs within a specified period at a time. The data can be obtained by page.

Exporting SQL Explorer Data

After SQL Explorer is enabled, you can export the SQL explorer data within a specified period at a time. The data can be obtained by page.

Querying Whether SQL Statement Concurrency Control Is Enabled

Query whether SQL Statement Concurrency Control is enabled. Currently, this function is supported only for MySQL DB instances.

Enabling or Disabling SQL Statement Concurrency Control

Enable or disable SQL Statement Concurrency Control. Currently, this function is supported only for MySQL DB instances.

Querying Concurrency Control Rules of SQL Statements

Query concurrency control rules of SQL statements. Currently, this function is supported only for MySQL DB instances.

Creating a Concurrency Control Rule

Add concurrency control rules of SQL statements. Currently, this function is supported only for MySQL DB instances.

The restrictions are as follows:

  • Take select~a as an example. select and a are two keywords contained in a concurrency control rule. The keywords are separated by a tilde (~). In this example, the rule restricts the execution of only the SQL statements containing keywords select and a.
  • If a SQL statement matches multiple concurrency control rules, only the most recently added rule is applied.
  • Keywords in a concurrency control rule are sorted in a specific order, and the system will match them from first to last. For example, if one rule contains the keyword a~and~b, the system only matches xxx a>1 and b>2.
  • Generated keywords may be case-sensitive. Execute show variables like 'rds_sqlfilter_case_sensitive' or go to the console to check parameter settings.
  • Concurrency control rules can only be added for primary instances.
  • System catalogs are not restricted, queries which do not involve data are not restricted, and the root user is not restricted in specific versions.

Deleting a Concurrency Control Rule

Delete concurrency control rules of SQL statements. Currently, this function is supported only for MySQL DB instances.

Querying Concurrency Control Tasks

Query information about an SQL concurrency control task with a specified ID.

Exporting the Top SQL Template List

Export the top SQL template list after Top SQL is enabled. This function is available only for paid instances. The maximum query interval is one hour.

Exporting SQL Execution Time Distribution

Export the SQL execution duration after Top SQL is enabled. This function is available only for paid instances. The query interval is 6 hours.

Exporting the Slow SQL Template List

Export the slow SQL template list after Slow Query Log is enabled. This function is available only for paid instances. The maximum query interval is one day.

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