Generates a throttling keyword string based on an SQL statement.
Operation description
This operation supports the following database engines:
ApsaraDB RDS for MySQL
PolarDB for MySQL
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:GetSqlConcurrencyControlKeywordsFromSqlText |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| ConsoleContext |
string |
No |
The reserved parameter. |
None |
| InstanceId |
string |
Yes |
The instance ID. |
rm-2ze5hpn2b99d2**** |
| SqlText |
string |
Yes |
The SQL statement based on which a throttling keyword string is to be generated. |
SELECT * FROM test where name = 'das' |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The HTTP status code returned. |
200 |
| Message |
string |
The returned message. Note
If the request was successful, Successful is returned. If the request failed, an error message such as an error code is returned. |
Successful |
| Data |
string |
The throttling keyword string that was generated based on the SQL statement. |
SELECT~FROM~test~where~name |
| RequestId |
string |
The request ID. |
30A643F5-D7A6-55F5-AB75-DF501427**** |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
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
Success response
JSON format
{
"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. | |
| 403 | NoPermission | You are not authorized to do this action. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.