Queries the throttling rules that are in effect.

This API operation is applicable to the following database services:

  • RDS MySQL
  • PolarDB for MySQL

Request parameters

ParameterTypeRequiredExampleDescription
ActionStringYesGetRunningSqlConcurrencyControlRules

The operation that you want to perform. Set the value to GetRunningSqlConcurrencyControlRules.

ConsoleContextStringNoNone

A hidden parameter.

InstanceIdStringYesrm-2ze1jdv45i7l6****

The ID of the instance.

Note The instance must be an ApsaraDB RDS for MySQL instance or a PolarDB for MySQL instance.
PageNoLongNo1

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.

PageSizeLongNo10

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

ParameterTypeExampleDescription
CodeString200

The returned status code.

MessageStringSuccessful

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.
DataObject

The list of detailed information, including the error codes and the number of error messages.

TotalLong2

The total number of entries returned.

ListArray of runningRules

Responses

runningRules
ItemIdLong16

The ID of the throttling rule that was applied to the instance.

SqlTypeStringSELECT

The type of the SQL statements. Valid values:

  • SELECT
  • UPDATE
  • DELETE
InstanceIdStringrm-2ze1jdv45i7l6****

The ID of the instance.

SqlKeywordsStringcall~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.
StartTimeLong1608888296000

The time when the throttling rule that is in effect started to take effect. The value is a UNIX timestamp. Unit: milliseconds.

KeywordsHashStringb0b8aceeb43baea87b219c81767b****

The hash value of the SQL keywords. The throttling rule takes effect on the SQL statements that contain the specified SQL keywords.

ConcurrencyControlTimeLong600

The duration within which the SQL throttling rule takes effect. Unit: seconds.

Note The throttling rule is enabled only within this duration.
UserIdStringtestxxx

The ID of the Alibaba Cloud account.

MaxConcurrencyString2

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.
StatusStringOpen

The status of the throttling rule. The value of this parameter is Open. This value indicates that the throttling rule in effect.

RequestIdStringB6D17591-B48B-4D31-9CD6-9B9796B2****

The ID of the request.

SuccessStringtrue

Indicates whether the request was successful. Valid values:

  • true: The request was successful.
  • false: The request failed.

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

HttpCodeError codeError messageDescription
400InvalidParamsThe request parameters are invalid.The request parameters are invalid.

For a list of error codes, visit the API Error Center.