Creating a Task for Parsing All SQL Statements
Function
This API is used to create a task for parsing all SQL statements.
Authorization Information
Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.
- If you are using role/policy-based authorization, see the required permissions in Permissions Policies and Supported Actions.
- 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
das:clouddba:listFullSql
List
Instance
-
das:clouddba:fullSqlList
-
URI
POST /v3/{project_id}/instances/{instance_id}/full-sql/add-task
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints N/A Range The value can contain 32 characters, including only letters and digits. Default Value N/A |
|
instance_id |
Yes |
String |
Definition Unique ID of an instance Constraints N/A Range The value can contain 32 characters, including only letters and digits. Default Value N/A |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
datastore_type |
Yes |
String |
Definition DB engine type Constraints N/A Range
Default Value N/A |
|
node_id |
No |
String |
Definition Node ID Constraints N/A Range The value can contain 32 characters, including only letters and digits. Default Value N/A |
|
start_at |
Yes |
Long |
Definition Start time Constraints Unix timestamp, in milliseconds Range [0, 2^31-1]. The actual value depends on the query result. Default Value N/A |
|
end_at |
Yes |
Long |
Definition End time Constraints Unix timestamp, in milliseconds Range [0, 2^31-1]. The actual value depends on the query result. Default Value N/A |
|
user_list |
No |
Array of strings |
Definition Username list Constraints The list can contain a maximum of 20 usernames. Range N/A Default Value N/A |
|
keyword_list |
No |
Array of strings |
Definition Keyword list Constraints The list can contain a maximum of 20 keywords. Range N/A Default Value N/A |
|
db_list |
No |
Array of strings |
Definition Database list Constraints The list can contain a maximum of 20 databases. Range N/A Default Value N/A |
|
operation_list |
No |
Array of strings |
Definition Operation type list Constraints The list can contain a maximum of 20 operation types. Range
Default Value N/A |
|
thread_id_list |
No |
Array of strings |
Definition Thread ID list Constraints The list can contain a maximum of 20 thread IDs. Range N/A Default Value N/A |
|
status_list |
No |
Array of strings |
Definition Execution status list Constraints N/A Range
Default Value N/A |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
task_id |
Long |
Definition Task ID Range N/A |
Example Requests
POST https://das.cn-north-1.myhuaweicloud.com/v3/63be57f43e114de790a9735d1c5bc95d/instances/5c59fa7d6f09456b947f32922f9aeda1in01/full-sql/add-task
{
"datastore_type": "mysql",
"node_id": "09ab88b8a12340569ac056af284011d9no01",
"start_at": 1742815900000,
"end_at": 1742819500000,
"user_list": [
"a"
],
"keyword_list": [
"b"
],
"db_list": [
"c",
"sdfssdff"
],
"operation_list": [
"SELECT"
],
"thread_id_list": [
"1"
],
"status_list": [
"0"
]
}
Example Responses
Status code: 200
{
"task_id": 1
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Successful response |
|
400 |
Client error |
|
500 |
Server error |
Error Codes
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