Queries the throttling rules that are in effect.
This API operation is applicable to the following database services:
- RDS MySQL
- PolarDB MySQL
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetRunningSqlConcurrencyControlRules |
The operation that you want to perform. Set the value to GetRunningSqlConcurrencyControlRules. |
ConsoleContext | String | No | None |
A hidden parameter. |
InstanceId | String | Yes | rm-2ze1jdv45i7l6**** |
The ID of the instance. Note The instance must be an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL instance.
|
PageNo | Long | No | 1 |
The number of the page to return. The specified value must be a positive integer that does not exceed the maximum value of the INTEGER data type. Default value: 1. |
PageSize | Long | No | 10 |
The maximum number of entries to return on each page. The specified value must be a positive integer that does not exceed the maximum value of the INTEGER data type. Default value: 10. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Code | String | 200 |
The returned status code. |
Message | String | Successful |
The returned message for the request. Note If the request was successful, Successful was returned. If the request failed, an
error message that contains an error code was returned.
|
Data | Object |
The list of detailed information, including the error codes and the number of error messages. |
|
Total | Long | 2 |
The total number of entries returned. |
List | Array of runningRules |
Responses |
|
runningRules | |||
ItemId | Long | 16 |
The ID of the throttling rule that was applied to the instance. |
SqlType | String | SELECT |
The type of the SQL statements. Valid values:
|
InstanceId | String | rm-2ze1jdv45i7l6**** |
The ID of the instance. |
SqlKeywords | String | call~open~api~test~4~from~POP |
Indicates the one or more SQL keywords contained in the SQL statements to which the throttling rule was applied. Note SQL keywords are separated with tildes (~). When the number of concurrent SQL statements
that contain all the specified SQL keywords reaches the specified upper limit, the
corresponding throttling rule is triggered.
|
StartTime | Long | 1608888296000 |
The time when the throttling rule that is in effect started to take effect. The value is a UNIX timestamp. Unit: milliseconds. |
KeywordsHash | String | b0b8aceeb43baea87b219c81767b**** |
The hash value of the SQL keywords. The throttling rule takes effect on the SQL statements that contain the specified SQL keywords. |
ConcurrencyControlTime | Long | 600 |
The duration within which the SQL throttling rule takes effect. Unit: seconds. Note The throttling rule is enabled only within this duration.
|
UserId | String | testxxx |
The ID of the Alibaba Cloud account. |
MaxConcurrency | String | 2 |
The maximum number of concurrent SQL statements. The specified value must be a positive integer. Note When the number of concurrent SQL statements that contain the specified keywords reaches
the limit specified by this parameter, the corresponding throttling rule is triggered.
|
Status | String | Open |
The status of the throttling rule. The value of this parameter is Open. This value indicates that the throttling rule in effect. |
RequestId | String | B6D17591-B48B-4D31-9CD6-9B9796B2**** |
The ID of the request. |
Success | String | true |
Indicates whether the request was successful. Valid values:
|
Examples
Sample requests
http(s)://das.cn-shanghai.aliyuncs.com/?Action=GetRunningSqlConcurrencyControlRules
&ConsoleContext=None
&InstanceId=rm-2ze1jdv45i7l6****
&PageNo=1
&PageSize=10
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetRunningSqlConcurrencyControlRulesResponse>
<Code>200</Code>
<Message>Successful</Message>
<Data>
<Total>2</Total>
<List>
<ItemId>16</ItemId>
<SqlType>SELECT</SqlType>
<InstanceId>rm-2ze1jdv45i7l6****</InstanceId>
<SqlKeywords>call~open~api~test~4~from~POP</SqlKeywords>
<StartTime>1608888296000</StartTime>
<KeywordsHash>b0b8aceeb43baea87b219c81767b****</KeywordsHash>
<ConcurrencyControlTime>600</ConcurrencyControlTime>
<UserId>testxxx</UserId>
<MaxConcurrency>2</MaxConcurrency>
<Status>Open</Status>
</List>
</Data>
<RequestId>B6D17591-B48B-4D31-9CD6-9B9796B2****</RequestId>
<Success>true</Success>
</GetRunningSqlConcurrencyControlRulesResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : "200",
"Message" : "Successful",
"Data" : {
"Total" : 2,
"List" : [ {
"ItemId" : 16,
"SqlType" : "SELECT",
"InstanceId" : "rm-2ze1jdv45i7l6****",
"SqlKeywords" : "call~open~api~test~4~from~POP",
"StartTime" : 1608888296000,
"KeywordsHash" : "b0b8aceeb43baea87b219c81767b****",
"ConcurrencyControlTime" : 600,
"UserId" : "testxxx",
"MaxConcurrency" : "2",
"Status" : "Open"
} ]
},
"RequestId" : "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success" : "true"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidParams | The request parameters are invalid. | The request parameters are invalid. |
For a list of error codes, visit the API Error Center.