Generates a throttling keyword string based on an SQL statement.
This operation is applicable to the following database services:
- ApsaraDB RDS for MySQL
- PolarDB for MySQL
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | GetSqlConcurrencyControlKeywordsFromSqlText | The operation that you want to perform. Set the value to GetSqlConcurrencyControlKeywordsFromSqlText. |
ConsoleContext | String | No | None | A hidden parameter. |
InstanceId | String | Yes | rm-2ze5hpn2b99d2**** | The instance ID. |
SqlText | String | Yes | SELECT * FROM test where name = 'das' | The SQL statement based on which a throttling keyword string is to be generated. |
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 that includes an error code is returned. |
Data | String | SELECT~FROM~test~where~name | The throttling keyword string that is generated based on the SQL statement. |
RequestId | String | 30A643F5-D7A6-55F5-AB75-DF501427**** | The ID of the request. |
Success | String | true | Indicates whether the request is successful. Valid values:
|
The returned throttling keyword string is generated based on SQL syntax. To throttle a specific value, you must add the value to the string. For example, if the original SQL statement is SELECT * FROM test where name = 'das', the following throttling keyword string is returned: SELECT~FROM~test~where~name. If you want to throttle the das value, you must add ~das to the string, so that the string becomes SELECT~FROM~test~where~name~das.
Examples
Sample requests
http(s)://das.cn-shanghai.aliyuncs.com/?Action=GetSqlConcurrencyControlKeywordsFromSqlText
&ConsoleContext=None
&InstanceId=rm-2ze5hpn2b99d2****
&SqlText=SELECT * FROM test where name = 'das'
&<Common request parameters>
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<GetSqlConcurrencyControlKeywordsFromSqlTextResponse>
<Code>200</Code>
<Message>Successful</Message>
<Data>SELECT~FROM~test~where~name</Data>
<RequestId>30A643F5-D7A6-55F5-AB75-DF501427****</RequestId>
<Success>true</Success>
</GetSqlConcurrencyControlKeywordsFromSqlTextResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"Code" : "200",
"Message" : "Successful",
"Data" : "SELECT~FROM~test~where~name",
"RequestId" : "30A643F5-D7A6-55F5-AB75-DF501427****",
"Success" : "true"
}
Error codes
HTTP status code | 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.