You need to enable JavaScript to run this app.
Database Workshop

Database Workshop

Copy page
Download PDF
SQL throttling
CreateSqlConcurrencyControlRule
Copy page
Download PDF
CreateSqlConcurrencyControlRule
Call the CreateSqlConcurrencyControlRule API to create a SQL throttling task.​
Request type​
Synchronous request​
Request parameters​
​
Name​
Type​
Is it required?​
Sample​
Description​
InstanceId​
​
String​
Yes​
mysql-383906******​
Database instance ID​
InstanceType​
String​
Yes​
MySQL​
Database types. The following database types are supported:​
  • MySQL: RDS for MySQL.​
  • VeDBMySQL: veDB for MySQL.​
RegionId​
String​
Yes​
cn-beijing​
Region ID.​
ThrottleTarget​
String​
Yes​
MaxConcurrencyCount​
Rate limiting object. Currently, only MaxConcurrencyCount is supported, which indicates SQL keyword-based rate limiting.​
KeyWords​
String​
Yes​
select~from~test​
SQL keywords.​
tip​
You can call the DescribeSqlKeywords operation to generate SQL keywords.​
SqlType​
String​
Yes​
SELECT​
SQL types that require rate limiting include SELECT, UPDATE, DELETE, INSERT, and REPLACE.​
TerminationType​
String​
Yes​
Manual​
End of task for the SQL throttling task. Valid values:​
  • Manual: Manually end the throttling task.​
  • Auto: Automatically end the throttling task.​
ConcurrencyCount​
Integer​
Yes​
1​
Maximum concurrency for SQL statements on each node, with a value range of 0 to 99999.​
tip​
When ConcurrencyCount is 0, execution of matching SQL statements is prohibited.​
EffectiveTime​
Integer​
No​
10​
​
Throttling time for the SQL throttling task. Valid range: 1 to 9,999,999 minutes.​
tip​
This parameter is required when the TerminationType parameter is set to Auto.​
​
Response parameters​
​
Name​
Type​
Sample​
Description​
RuleId​
Integer​
2108098738466619392​
SQL throttling task ID.​
​
Request example​
​
POST /?Action=CreateSqlConcurrencyControlRule&Version=2018-01-01 HTTP/1.1​
Content-Type: application/json​
Host: dbw.cn-beijing.volcengineapi.com​
Authorization: HMAC-SHA256 Credential=AKLTN2I0MmFiNzMxNWE5NDgzMzk4MmVjMTVkODlkZTZ****/20211202/cn-beijing/dbw/request,SignedHeaders=x-date, Signature=71d31fc7bcf990142851c9833c5656391486cda0ae2e0b8ada733b7c645****​
​
{​
"TerminationType": "Auto",​
"ConcurrencyCount": 1,​
"ThrottleTarget": "MaxConcurrencyCount",​
"SqlType": "SELECT",​
"KeyWords": "select~from~test",​
"InstanceId": "mysql-383906******",​
"InstanceType": "MySQL",​
"EffectiveTime": 10,​
"RegionId":"cn-beijing"​
}​
​
Response example​
​
{​
"ResponseMetadata": {​
"RequestId": "20261008153440FDEC164725BAFD66357F-c1e95d",​
"Action": "CreateSqlConcurrencyControlRule",​
"Version": "2018-01-01",​
"Service": "dbw",​
"Region": "cn-beijing"​
},​
"Result": {​
"RuleId": 2108098738466619392​
}​
}​
​
Error code​
For details, refer to Error codes.​
Last updated: 2026.10.14 09:51:11