Description
For creating custom throttling policies.
- This function is intended for API activators.
- Throttling policies are meaningless if they are not bound to APIs. After the policies are bound to APIs, they take effect for the APIs instantly.
- This API can call up to 50 QPS for a single user.
Request parameters
Name | Type | Required? | Description |
---|---|---|---|
Action | String | Yes | Operation interface name, which is a required parameter; value: CreateTrafficControl. |
TrafficControlName | String | Yes | Throttling policy name, which contains 4–50 characters including English letters (upper and lower cases), Chinese characters, numbers, and underscores. The policy name must not start with an underscore. |
TrafficControlUnit | String | Yes | Throttling policy unit; values:
|
ApiDefault | Integer | Yes | Default throttling value for each API. |
UserDefault | Integer | No | Default throttling value for each user. |
AppDefault | Integer | No | Default throttling value for each app. |
Description | String | No | Throttling policy description. |
Return parameters
Name | Type | Description |
---|---|---|
RequestId | String | ID of the current request. |
TrafficControlId | String | Unique throttling policy ID. |
Examples
Request example
https://apigateway.cn-qingdao.aliyuncs.com/?Action=CreateTrafficControl
&TrafficControlName=throttling test
&TrafficControlUnit=MINUTE
&ApiDefault=10000
&UserDefault=10000
&AppDefault=10000
&Description=throttling test description
&<Public request parameters>
Response example
XML
format
<CreateTrafficControlResponse>
<RequestId>CEF72CEB-54B6-4AE8-B225-F876FF7BZ004</RequestId>
<TrafficControlId>tf123456</TrafficControlId>
</CreateTrafficControlResponse>
JSON
format
{
"RequestId":"CEF72CEB-54B6-4AE8-B225-F876FF7BZ004",
"TrafficControlId":"tf123456"
}