CLI Command Reference
API Version Queries
Intelligent O&M
| API Name | Command | Description | Operation |
|---|---|---|---|
| Querying a SQL Execution Plan | hcloud DAS ShowSqlExecutionPlan | This API is used to query a SQL execution plan. | |
| Querying a SQL Execution Plan | hcloud DAS ShowSqlExplain | This API is used to query a SQL execution plan. | |
| Killing Sessions | hcloud DAS DeleteProcess | This API is used to kill sessions by user, database, or session ID. | |
| Querying Metadata Locks | hcloud DAS ListMetadataLocks | This API is used to query metadata locks. | |
| Querying InnoDB Lock Waits | hcloud DAS ListInnodbLocks | This API is used to query InnoDB lock waits. | |
| Querying Database Users | hcloud DAS ListDbUsers | This API is used to query database users registered on DAS. db_user_id returned by this API is required for calling other APIs (such as the API for querying instance sessions). This API does not return database user objects of an instance. | |
| Registering a Database User | hcloud DAS RegisterDbUser | This API is used to register the database username and password with the DAS system. A database user ID will be returned in response and is required for calling other APIs, such as the API for querying instance sessions. The database password is encrypted and used for DAS API calls only. This API does not create database user objects on an instance. Ensure that the username and password you entered are valid and correct. | |
| Querying Instance Sessions | hcloud DAS ListProcesses | This API is used to query instance sessions by database or user. | |
| Querying a Specified Database User | hcloud DAS ShowDbUser | This API is used to query information of a specified database user. It does not query database user objects on an instance. | |
| Modifying a Database User | hcloud DAS UpdateDbUser | This API is used to change the username and password for a registered database user. This API does not change the user name and password of database user objects on an instance. Ensure that the username and password you entered are valid and correct. | |
| Deleting a Database User | hcloud DAS DeleteDbUser | This API is used to delete a registered database user. Only registered database users are deleted from the DAS system. Database user objects are not affected. | |
| Obtain the Space Analysis Data List | hcloud DAS ListSpaceAnalysis | This API is used to obtain the space analysis data list. The file system generated 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 account password has not been saved, use the user management interface or page to save the database account. MySQL, GaussDB(for MySQL) and SQLServer are supported. | |
| Creating a Space Analysis Task | hcloud DAS CreateSpaceAnalysisTask | This API is used to create a space analysis task, for example, triggering re-analysis. MySQL and GaussDB(for MySQL) are supported. | |
| Enabling/Disabling SQL Explorer and Slow Query Log | hcloud DAS ChangeSqlSwitch | This API is used to enable or disable SQL Explorer. After this function is enabled, the instance performance loss is within 5%. Enabling SQL Explorer will allow DAS to store 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. | |
| Querying Whether SQL Explorer and Slow Query Log Are Enabled | hcloud DAS ShowSqlSwitchStatus | This API is used to query whether SQL Explorer and Slow Query Log are enabled. Only paid instances are supported. | |
| Exporting Slow Query Logs | hcloud DAS ExportSlowQueryLogs | 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. Free instance only supports viewing data within the last hour. | |
| Exporting All SQL Statements | hcloud DAS ExportSqlStatements | 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. Only paid instances are supported. | |
| Export Full SQL Details | hcloud DAS ExportFullSqlDetails | After SQL Explorer is enabled, you can create an SQL insight task and export full SQL details by node, user name, database, or operation type. This function supports only paid instances. | |
| Querying the SQL Insight Task List | hcloud DAS ListFullSqlTasks | After SQL Explorer is enabled, you can query the SQL insight task list. Only paid instances are supported. | |
| Querying Intelligent O&M Quotas | hcloud DAS ShowQuotas | This API is used to query Intelligent O&M quotas. | |
| Querying Whether SQL Statement Concurrency Control Is Enabled | hcloud DAS ShowSqlLimitSwitchStatus | This API is used to query whether SQL statement concurrency control is enabled. Only MySQL instances are supported. | |
| Configuring SQL Statement Concurrency Control | hcloud DAS ChangeSqlLimitSwitchStatus | This API is used to configure SQL Statement Concurrency Control. Only MySQL databases are supported. | |
| Querying Concurrency Control Rules of SQL Statements | hcloud DAS ListSqlLimitRules | This API is used to query concurrency control rules of SQL statements. Only MySQL and PostgreSQL databases are supported. | |
| Creating a Concurrency Control Rule of SQL Statements | hcloud DAS CreateSqlLimitRules | This API is used to add a concurrency control rule of SQL statements. Only MySQL and PostgreSQL databases are supported. | |
| Deleting a Concurrency Control Rule of SQL Statements | hcloud DAS DeleteSqlLimitRules | This API is used to delete a concurrency control rule of SQL statements. Only MySQL and PostgreSQL databases are supported currently. | |
| Updating a Concurrency Control Rule of SQL Statements | hcloud DAS UpdateSqlLimitRules | Deleting a Concurrency Control Rule of SQL Statements. Only PostgreSQL databases are supported. | |
| Exporting Top SQL Statement Templates | hcloud DAS ExportTopSqlTemplatesDetails | After TopSQL is enabled, the top SQL template list is exported. Only paid instances are supported. The maximum query interval is one hour. | |
| Querying a SQL Statement Concurrency Control Task | hcloud DAS ShowSqlLimitJobInfo | This API is used to query information about the SQL statement concurrency control task with a specified ID. | |
| Exporting Slow SQL Statement Templates | hcloud DAS ExportSlowSqlTemplatesDetails | After this function is enabled, the slow SQL template list is exported. Free instance only supports viewing data within the last hour. The maximum query interval is one day. | |
| Exporting SQL Statement Execution Duration Ranges | hcloud DAS ExportTopSqlTrendDetails | After this function is enabled, execution durations of a SQL statement are exported. Only paid instances are supported. The maximum query interval is six hours. | |
| Executing a SQL Diagnosis | hcloud DAS CreateTuning | Executing a SQL diagnosis. | |
| Obtaining Diagnosis Results | hcloud DAS ShowTuning | This API is used to obtain diagnosis results. | |
| Exporting Slow SQL Statistics | hcloud DAS ExportSlowSqlStatistics | After this function is enabled, the slow SQL statistics list is exported. | |
| Querying the historical transaction switch | hcloud DAS ShowTransactionSwitchStatus | Querying the historical transaction switch. | |
| Enabling or Disabling the Historical Transaction Switch | hcloud DAS ChangeTransactionSwitchStatus | Enables or disables the historical transaction function. Only the MySQL engine is supported, and the full SQL or slow SQL function must be enabled. | |
| Querying the Historical Transaction List | hcloud DAS ListTransactions | Querying the Historical Transaction List. | |
| Create an export history transaction task | hcloud DAS CreateHistoryTransactionExportTask | After the DAS historical transaction collection switch is turned on, it supports the creation of a one-time export task for historical transaction data within a specified time range. | |
| Delete the obs file corresponding to the export historical transaction task | hcloud DAS DeleteHistoryTransactionExportTask | After the historical transaction collection switch is turned on, delete the OBS file corresponding to the historical transaction export task record. | |
| Query the historical transaction export task list | hcloud DAS ListHistoryTransactionExportTask | After the DAS historical transaction collection switch is turned on, the historical transaction export task list is queried. | |
| Query the details of the historical transaction export task | hcloud DAS ShowHistoryTransactionExportTaskInfo | After the DAS historical transaction collection switch is turned on, the details of the historical transaction export task are queried. | |
| Generate SQL Throttling Keywords based on Original SQL | hcloud DAS ParseSqlLimitRules | Generate SQL Throttling Keywords based on Original SQL. MySQL, MariaDB, and GaussDB(for MySQL) are supported. | |
| Exporting Slow SQL Trend | hcloud DAS ExportSlowSqlTrendDetails | After this function is enabled, the slow SQL trend list is exported. Free instance only supports viewing data within the last hour. The maximum query interval is one day. | |
| Exporting the list of risk instances | hcloud DAS ExportTopRiskInstances | Exporting the list of risk instances. The maximum query interval is one day. | |
| View the instance list on the Intelligent O&M page. | hcloud DAS ListCloudDbaInstances | View the instance list on the Intelligent O&M page. | |
| Creating an Instance Diagnosis Task | hcloud DAS CreateHealthReportTask | This API is used to create an instance diagnosis task. | |
| Querying Instance Diagnosis Reports | hcloud DAS ListHealthReportTask | Querying Instance Diagnosis Reports | |
| Obtaining an Instance Diagnosis Report | hcloud DAS ShowInstanceHealthReport | Obtaining an Instance Diagnosis Report | |
| Synchronize instance list | hcloud DAS SynchronizeInstances | Synchronize instance list. | |
| Querying Instance Distribution | hcloud DAS ListInstanceDistribution | Querying Instance Distribution | |
| Querying the List of Top Slow SQL Statements | hcloud DAS ListTopSlowLog | Querying the List of Top Slow SQL Statements | |
| Querying the List of Top Slow SQL Statements of an Instance | hcloud DAS ListInstanceTopSlowLog | Querying the List of Top Slow SQL Statements of an Instance | |
| Indicator information supported by a single indicator on multiple nodes | hcloud DAS ShowMetricNamesSupport | Indicator information supported by a single indicator on multiple nodes | |
| Obtaining the Node Information of a Single Instance | hcloud DAS ListInstanceNodesInfo | Obtaining the Node Information of a Single Instance | |
| Obtaining Data of a Single Indicator on Multiple Nodes | hcloud DAS ListInstanceMultiNodesSingleMetric | Obtaining Data of a Single Indicator on Multiple Nodes | |
| Querying Resource Risk Instance Risk Items | hcloud DAS ListRiskItems | Querying Resource Risk Instance Risk Items | |
| Querying Resource Risk Instance Risk Trends | hcloud DAS ListRiskTrend | Querying Resource Risk Instance Risk Trends | |
| set metric threshould | hcloud DAS SetThresholdForMetric | set metric threshould | |
| Setting the payment mode | hcloud DAS ChangeChargeMode | Setting the payment mode | |
| Setting the payment mode | hcloud DAS ChangePaymentModeNew | Setting the payment mode | |
| Creating a Full SQL Detail Parsing Task | hcloud DAS AddFullSqlTask | Creating a Full SQL Detail Parsing Task | |
| Configure full deadlock detection switch | hcloud DAS ChangeFullDeadLockSwitch | Enable or disable comprehensive deadlock monitoring | |
| Get Full Deadlock Switch Status | hcloud DAS ShowFullDeadLockSwitch | Retrieves the status of the full deadlock detection switch | |
| Retrieve complete deadlock information | hcloud DAS ShowFullDeadLockList | Get comprehensive deadlock records | |
| Get deadlock snapshot details | hcloud DAS ShowLatestDeadLockSnapshot | Retrieve detailed information about a deadlock snapshot | |
| List snapshots | hcloud DAS ListSnapshots | Query snapshot list | |
| Create snapshot | hcloud DAS CreateSnapshots | Create a snapshot | |
| Check AK/SK | hcloud DAS CheckCredential | Check AK/SK to verify whether the user's AK/SK can access the OBS bucket normally. | |
| Save AK/SK | hcloud DAS SaveCredential | Save AK/SK for backend tasks to access OBS and upload instance diagnostic reports. | |
| Querying Instance Diagnostic Report Settings | hcloud DAS ShowHealthReportSettings | Querying Instance Diagnostic Report Settings | |
| Update Instance Diagnostics Report Settings | hcloud DAS UpdateHealthReportSettings | Update Instance Diagnostics Report Settings | |
| built in account login | hcloud DAS LoginBuiltInAccount | built in account login | |
| built in account logoff | hcloud DAS LogoffBuiltInAccount | built in account logoff | |
| Automatically Recommend SQL Throttling Rules | hcloud DAS ShowDasRecommendSqlLimitRule | Automatically recommends SQL throttling rules based on conditions (including average execution time, count, maximum execution time, or a combination of the three criteria) | |
| Query auto-increment quota | hcloud DAS ListAutoIncrementUsage | Query auto-increment quota usage | |
| Querying Inspection Report List | hcloud DAS ListInspectionReport | Querying Inspection Report List | |
| Querying Email Records | hcloud DAS ListEmailRecord | Querying Email Records | |
| Querying Email Template List | hcloud DAS ListEmailTemplate | Querying Email Template List | |
| Creating an Email Template | hcloud DAS AddEmailTemplate | Creating an Email Template | |
| Modifying an Email Template | hcloud DAS UpdateEmailTemplate | Modifying an Email Template | |
| Deleting an Email Template | hcloud DAS DeleteEmailTemplate | Deleting an Email Template | |
| Batch Subscribe/Unsubscribe | hcloud DAS BatchSubscribeReport | Batch Subscribe/Unsubscribe | |
| Querying Instance Group List | hcloud DAS ListInstanceGroup | Querying Instance Group List | |
| Creating an Instance Group | hcloud DAS AddInstanceGroup | Creating an Instance Group | |
| Modifying an Instance Group | hcloud DAS UpdateInstanceGroup | Modifying an Instance Group | |
| Deleting an Instance Group | hcloud DAS DeleteInstanceGroup | Deleting an Instance Group | |
| Adding instances to the instance group | hcloud DAS AddInstanceToGroup | Adding instances to the instance group | |
| Sending emails in batches | hcloud DAS BatchSendEmail | Sending emails in batches | |
| Check AK/SK | hcloud DAS CheckCredentialForBatchInspection | Check AK/SK to verify whether the user's AK/SK can access the OBS bucket normally. | |
| Save AK/SK | hcloud DAS SaveCredentialForBatchInspection | Save AK/SK for backend tasks to access OBS and upload instance diagnostic reports. | |
| Querying AK/SK | hcloud DAS ShowCredential | Querying AK/SK, used to determine whether AK/SK has been saved. | |
| Query the lock blocking database list | hcloud DAS ListLockBlockingDb | Query the lock blocking database list. | |
| Query the lock blocking details list | hcloud DAS ListLockBlockingDetail | Query the lock blocking details list. | |
| Query the lock blocking relationship | hcloud DAS ListLockBlockingRelationship | Query the lock blocking relationship. | |
| Query the lock blocking statistics | hcloud DAS ShowLockBlockingStatistics | Query the lock blocking statistics. | |
| Query the lock blocking trend list | hcloud DAS ShowLockBlockingTrend | Query the lock blocking trend list. | |
| Query the lock blocking switch and retention hours | hcloud DAS ShowLockBlockingSwitch | Query the lock blocking switch and retention hours. | |
| Set the lock blocking switch and retention hours. | hcloud DAS SetLockBlockingSwitch | Set the lock blocking switch and retention hours. Only SQL Server DB instances are supported. | |
| Start Session Analysis | hcloud DAS StartAnalysisSession | Start session analysis | |
| Query Session Analysis Status | hcloud DAS ShowAnalysisSessionStatus | Query session analysis status | |
| Query Session Analysis Results | hcloud DAS ShowAnalysisSessionResult | Query session analysis results | |
| Get deadlock topology data | hcloud DAS ShowDeadLockTopology | Get deadlock topology data | |
| Analyze deadlock log | hcloud DAS ParseDeadLock | Analyze deadlock log | |
| Query deadlock log analysis result | hcloud DAS ShowDeadLockAnalysisResult | Query deadlock log analysis result | |
| Cancel shared connections | hcloud DAS CancelShareNew | Cancel shared connections | |
| Batch delete connections | hcloud DAS BatchDeleteConnectionNew | Batch delete connections | |
| Show latest instance health report info | hcloud DAS ShowLatestInstanceHealthReport | Show latest instance health report info | |
| Add sql limiting record | hcloud DAS AddSqlLimitingRecordNew | Add sql limiting record | |
| Show export full sql task info | hcloud DAS ShowExportTaskInfo | Show export full sql task info | |
| Determine whether this instance can use the cloud DBA function | hcloud DAS ShowWhetherUseCloudDba | Determine whether this instance can use the cloud DBA function | |
| Open quota inquiry | hcloud DAS ShowDasCloudDbaPrice | Open quota inquiry | |
| Query the status of the get-search-path switch | hcloud DAS ShowClouddbaGetSearchPathFlagNew | Query the status of the get-search-path switch | |
| Query the status of the deadlock switch | hcloud DAS ShowDeadLockSwitchNew | Query the status of the deadlock switch | |
| Query the supported engine types | hcloud DAS ShowSupportedEngines | Query the supported engine types | |
| Turn on/off the full SQL switch | hcloud DAS SwitchFullsqlSwitch | Turn on/off the full SQL switch | |
| Obtain the full deadlock switch | hcloud DAS ShowFullDeadLockSwitchNew | Obtain the full deadlock switch | |
| Obtain product-level security protocols | hcloud DAS ShowGlobalPrivacyNew | Obtain product-level security protocols | |
| Query the history-transaction switch | hcloud DAS ShowHistoryTransactionSwitchNew | Query the history-transaction switch | |
| Query the long-history-transaction switch | hcloud DAS ShowLongHistoryTransactionSwitchNew | Query the long-history-transaction switch | |
| Query the index-usage switch | hcloud DAS ShowIndexUsageSwitchNew | Query the index-usage switch | |
| Query the slow-log switch | hcloud DAS ShowSlowLogSwitchNew | Query the slow-log switch | |
| Query the sql-limiting switch | hcloud DAS ShowSqlLimitingSwitchNew | Query the sql-limiting switch | |
| List database names | hcloud DAS ListDbNames | List database names | |
| List database names | hcloud DAS ShowNameList | List database names | |
| Query the kill process task switch | hcloud DAS ShowKillProcessTaskSwitch | Query the kill process task switch |
Development Tool
| API Name | Command | Description | Operation |
|---|---|---|---|
| Setting a Sharing Link | hcloud DAS CreateShareConnections | Setting a sharing link. | |
| Deleting a Sharing Link | hcloud DAS CancelShareConnections | Deleting a sharing link. | |
| Creating an Instance Connection | hcloud DAS CreateInstanceConnection | This API is used to create an instance connection. | |
| Querying the Instance Connection List | hcloud DAS ListConnections | This API is used to querying the instance connection list. | |
| Executing an Export Task Immediately | hcloud DAS ExecuteExportTask | Executing an export task immediately. | |
| Executing an Import Task Immediately | hcloud DAS ExecuteImportTask | Executing an import task immediately. |
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