apig__CreateRequestThrottlingPolicyV2
Create an API Gateway throttling policy that caps request rates per API, user, app, and source IP over a set time interval, protecting backend services from overload.
Instructions
[APIG] 当API上线后,系统会默认给每个API提供一个流控策略,API提供者可以根据自身API的服务能力及负载情况变更这个流控策略。
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"api_call_limits": "<api_call_limits>",
"instance_id": "<instance_id>",
"name": "<name>",
"project_id": "<project_id>",
"time_interval": "<time_interval>",
"time_unit": "<time_unit>"
},
"name": "apig__CreateRequestThrottlingPolicyV2"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | 流控策略名称。支持汉字,英文,数字,下划线,且只能以英文和汉字开头,3 ~ 64字符。 | |
| type | No | 流控策略的类型 | |
| remark | No | 流控策略描述字符长度不超过255。 | |
| time_unit | Yes | 流控的时间单位 | |
| project_id | Yes | 项目ID,获取方式请参见[获取项目ID](apig-api-180713009.xml)。 | |
| instance_id | Yes | 实例ID,在API网关控制台的“实例信息”中获取。 | |
| time_interval | Yes | 流量控制的时长单位。与“流量限制次数”配合使用,表示单位时间内的API请求次数上限。输入的值不超过2147483647。正整数。 | |
| ip_call_limits | No | 源IP流量限制是指一个API在时长之内被每个IP访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 | |
| api_call_limits | Yes | API流量限制是指时长内一个API能够被访问的次数上限。该值不超过系统默认配额限制,系统默认配额为200tps,用户可根据实际情况修改该系统默认配额。输入的值不超过2147483647。正整数。 | |
| app_call_limits | No | APP流量限制是指一个API在时长之内被每个APP访问的次数上限,该数值不超过用户流量限制值。输入的值不超过2147483647。正整数。 | |
| user_call_limits | No | 用户流量限制是指一个API在时长之内每一个用户能访问的次数上限,该数值不超过API流量限制值。输入的值不超过2147483647。正整数。 | |
| enable_adaptive_control | No | 是否开启动态流控: |