Querying SQL Throttling Tasks
Function
This API is used to query SQL throttling tasks based on search criteria. Before calling this API:
- Learn how to authenticate this API.
- Obtain the required region and endpoint.
URI
GET /v3/{project_id}/instances/{instance_id}/limit-task-list
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 The value can contain 32 characters. Only letters and digits are allowed. Default Value N/A |
instance_id |
Yes |
Definition Instance ID, which uniquely identifies an instance. Constraints N/A Range The value can contain 36 characters. Only letters and digits are allowed. Default Value N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
task_scope |
No |
String |
Definition Throttling task scope. Constraints N/A Range Currently, SQL and SESSION are supported. Default Value N/A |
limit_type |
No |
String |
Definition Throttling type. Constraints N/A Range The value can be SQL_ID, SQL_TYPE, or SESSION_ACTIVE_MAX_COUNT. Default Value N/A |
limit_type_value |
No |
String |
Definition Throttling type value. Fuzzy match is supported. Constraints N/A Range N/A Default Value N/A |
task_name |
No |
String |
Definition Throttling task name. Fuzzy match is supported. Constraints N/A Range N/A Default Value N/A |
sql_model |
No |
String |
Definition SQL template. Fuzzy match is supported. Constraints N/A Range N/A Default Value N/A |
rule_name |
No |
String |
Definition Rule name. Constraints N/A Range N/A Default Value N/A |
start_time |
No |
String |
Definition Throttling task start time. Constraints The time format must be yyyy-mm-ddThh:mm:ssZ. The current time is the UTC time. Range N/A Default Value N/A |
end_time |
No |
String |
Definition Throttling task end time. Constraints The time format must be yyyy-mm-ddThh:mm:ssZ. The current time is the UTC time. Range N/A Default Value N/A |
offset |
No |
Integer |
Index offset. The query starts from the next piece of data indexed by this parameter. Constraints The value must be a non-negative integer. Range 0~10000 Default Value 0: The query starts from the first data record. |
limit |
No |
Integer |
Definition Number of records returned by a query. Constraints The value cannot be a negative number. Range [1,100] Default Value 10 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Definition User token. You can obtain the token by calling the IAM API used to obtain a user token. After the request is processed, the value of X-Subject-Token in the message header is the token value. Constraints N/A Range N/A Default Value N/A |
X-Language |
No |
String |
Definition Language. Constraints N/A Range
Default Value en-us |
Response Parameters
Parameter |
Type |
Description |
---|---|---|
limit_task_list |
Array of objects |
Definition Throttling task information in the list. For details, see Table 5. |
limit |
Integer |
Definition Number of records returned by a query. Range 0~100 |
offset |
Integer |
Definition Index offset. Range 0~10000 |
total_count |
Integer |
Definition Total number of throttling tasks. Range 0~10000 |
Parameter |
Type |
Description |
---|---|---|
task_id |
String |
Definition Throttling task ID. Range N/A |
task_scope |
String |
Definition Throttling task scope. Range Currently, SQL and SESSION are supported. |
limit_type |
String |
Definition Throttling task type. Range
|
limit_type_value |
String |
Definition Throttling task type value. Range
|
task_name |
String |
Definition Throttling task name. Range N/A |
databases |
String |
Definition Databases of the instance. Databases are separated by commas (,). Range N/A |
sql_model |
String |
Definition SQL template. This parameter is returned only when the task type is SQL_ID. Range N/A |
key_words |
String |
Definition Keyword. This parameter is returned only when the task type is SQL_TYPE. Range N/A |
status |
String |
Definition Throttling task status. Range The value can be CREATING, UPDATING, DELETING, WAIT_EXECUTE, EXECUTING, TIME_OVER, DELETED, CREATE_FAILED, UPDATE_FAILED, DELETE_FAILED, EXCEPTION, or NODE_SHUT_DOWN. |
instance_id |
String |
Definition Instance ID. Range N/A |
rule_name |
String |
Definition Rule name. Range N/A |
parallel_size |
Integer |
Definition Maximum concurrency. Range [0, 2147483647] |
start_time |
String |
Definition Start time of the throttling task. The format is yyyy-mm-ddThh:mm:ssZ. This parameter is returned when task_scope is set to SQL. Range N/A |
end_time |
String |
Definition End time of the throttling task. The format is yyyy-mm-ddThh:mm:ssZ. This parameter is returned when task_scope is set to SQL. Range N/A |
cpu_utilization |
Integer |
Definition CPU usage threshold. This parameter is returned with only its integer part retained when the task type is SESSION_ACTIVE_MAX_COUNT. Range [0,100) |
memory_utilization |
Integer |
Definition Memory usage threshold. This parameter is returned with only its integer part retained when the task type is SESSION_ACTIVE_MAX_COUNT. Range [0,100) |
created |
String |
Definition Creation time. The format is yyyy-mm-ddThh:mm:ss+0000. Range N/A |
updated |
String |
Definition Update time. The format is yyyy-mm-ddThh:mm:ss+0000. Range N/A |
creator |
String |
Definition Creator. Range N/A |
modifier |
String |
Definition Modifier. Range N/A |
node_infos |
Array of objects |
Definition CN information. For details, see Table 6. |
Example Request
https://gaussdb-opengauss.ap-southeast-1.myhuaweicloud.com/v3/0611f1bd8b00d5d32f17c017f15b599f/instances/3d39c18788b54a919bab633874c159dfin14/limit-task-list?offset=1&limit=10&limit_type=SQL_ID&task_name=test
Example Response
{ "limit_task_list" : [ { "task_id" : "59b6a1a278844ac48119d86512e0000", "task_scope" : "SQL", "limit_type" : "SQL_ID", "limit_type_value" : 2348983611, "sql_model" : "select * from table where id = {id}", "status" : "creating", "key_words" : null, "instance_id" : "39b6a1a278844ac48119d86512e0000bin06", "parallel_size" : 100, "rule_name" : "dsa48119d86512e0000bin066a1a27", "databases" : "test1", "task_name" : "test1", "start_time" : "2023-12-30T02:00:00Z", "end_time" : "2023-12-30T02:00:00Z", "created" : "2023-12-28T01:55:08Z,", "updated" : "2023-12-28T01:55:08Z,", "creator" : "test,", "modifier" : "null,", "cpu_utilization" : null, "memory_utilization" : null, "node_infos" : [ { "node_id" : "cf521ccca2d74c9e89569a9828b6adcbno14", "sql_id" : 2348983611 } ] } ], "total_count" : 1, "limit" : 10, "offset" : 1 }
Status Codes
- Normal
- Abnormal
For details, see Status Codes.
Error Codes
For details, 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