Querying SQL Throttling Rules
Function
This API is used to query SQL throttling rules. Currently, this function is supported only for MySQL databases.
URI
GET /v3/{project_id}/instances/{instance_id}/sql-limit/rules
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region To obtain this value, see Obtaining a Project ID. Constraints: N/A Values: The value can contain 32 characters. Only letters and digits are allowed. Default value: N/A |
instance_id |
Yes |
String |
Explanation: Unique ID of an instance Constraints: N/A Values: The value can contain 32 characters. Only letters and digits are allowed. Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
No |
Integer |
Explanation: Offset. The query starts from the next piece of data indexed by this parameter. Constraints: N/A Values: [0, 2^31-1]. The actual value depends on the query result. Default value: 0: The query starts from the first data record. |
limit |
No |
Integer |
Explanation: Number of records to be queried Constraints: N/A Values: [1, 100] Default value: 100 |
datastore_type |
Yes |
String |
Explanation: Database type Values:
|
Request Parameters
None
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
sql_limit_rules |
Array of SqlLimitRule objects |
Explanation: SQL throttling rules Values: N/A |
total_count |
Integer |
Explanation: Total number of SQL throttling rules Values: [0, 2^31-1]. The actual value depends on the query result. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Explanation: ID of a SQL throttling rule Values: N/A |
sql_type |
String |
Explanation: SQL type Values: N/A |
pattern |
String |
Explanation: Throttling rule Values: N/A |
max_concurrency |
Integer |
Explanation: Maximum number of concurrent SQL statements Values: N/A |
max_waiting |
Integer |
Explanation: Maximum waiting time Values: N/A |
Example Request
Querying SQL throttling rules
GET https://das.cn-north-1.myhuaweicloud.com/v3/054c630ff780d4cc2f40c00d7f6fb21d/instances/d871e13ee1044e21a473330cd67047cbin01/sql-limit/rules?datastore_type=MySQL&offset=0&limit=10
Example Responses
Status code: 200
Successful request
{ "sql_limit_rules" : [ { "id" : "6", "sql_type" : "SELECT", "max_concurrency" : 1, "pattern" : "select~var~where~id" }, { "id" : "7", "sql_type" : "UPDATE", "max_concurrency" : 10, "pattern" : "update~table01~where~id" } ], "total_count" : 2 }
Status Code
Status Code |
Description |
---|---|
200 |
Successful request |
400 |
Client error. |
500 |
Server error. |
Error Code
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