Queries the throttling rules that are being applied or were triggered.
This operation is applicable to the following database services:
- RDS MySQL
- PolarDB MySQL
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetSqlConcurrencyControlRulesHistory |
The operation that you want to perform. Set the value to GetSqlConcurrencyControlRulesHistory. |
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 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 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 message returned for the request. Note If the request is successful, Successful is returned. If the request fails, an error
message such as an error code is returned.
|
Data | Object |
The detailed information, including the error codes and the number of error messages. |
|
Total | Long | 4 |
The total number of entries returned. |
List | Array of rules |
The details about the throttling rules. |
|
rules | |||
ItemId | Long | 16 |
The ID of the throttling rule that is 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 |
The SQL keywords that are contained in the SQL statements to which the throttling rule is 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
throttling rule is triggered.
|
StartTime | Long | 1608888296000 |
The time when the throttling rule started to take effect. This value is a UNIX timestamp. Unit: milliseconds. |
KeywordsHash | String | b0b8aceeb43baea87b219c81767b**** |
The hash value of the SQL keywords. The SQL keywords are contained in the SQL statements to which the throttling rule is applied. |
ConcurrencyControlTime | Long | 600 |
The duration within which the SQL throttling rule takes effect. Unit: seconds. Note The throttling rule takes effect only within this duration.
|
UserId | String | testxxx |
The ID of your Alibaba Cloud account. |
MaxConcurrency | Long | 2 |
The maximum number of concurrent SQL statements. This value is a positive integer. Note When the number of concurrent SQL statements that contain the specified keywords reaches
this upper limit, the throttling rule is triggered.
|
Status | String | Open |
The status of the throttling rule. Valid values:
|
RequestId | String | B6D17591-B48B-4D31-9CD6-9B9796B2**** |
The ID of the request. |
Success | String | true |
Indicates whether the request is successful. Valid values:
|
Examples
Sample requests
http(s)://das.cn-shanghai.aliyuncs.com/?Action=GetSqlConcurrencyControlRulesHistory
&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
<GetSqlConcurrencyControlRulesHistoryResponse>
<Code>200</Code>
<Message>Successful</Message>
<Data>
<Total>4</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>
</GetSqlConcurrencyControlRulesHistoryResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : "200",
"Message" : "Successful",
"Data" : {
"Total" : 4,
"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 error message returned because the specified request parameters are invalid. |
For a list of error codes, visit the API Error Center.