ALIYUN::ApiGateway::TrafficControl is used to create a user-defined throttling policy.
Syntax
{
"Type": "ALIYUN::ApiGateway::TrafficControl",
"Properties": {
"TrafficControlName": String,
"Description": String,
"UserDefault": String,
"AppDefault": String,
"TrafficControlUnit": String,
"Special": List,
"ApiDefault": Integer
}
}
Properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
TrafficControlName | String | Yes | Yes | The name of the throttling policy. | The name must be 4 to 50 characters in length and can contain letters, digits, and underscores (_). It cannot start with an underscore (_). |
TrafficControlUnit | String | Yes | Yes | The throttling unit. | Valid values:
|
ApiDefault | Integer | Yes | Yes | The default throttling value for each API. | None. |
Description | String | No | Yes | The description of the throttling policy. | None. |
UserDefault | String | No | Yes | The default throttling value for each user. | None. |
AppDefault | String | No | Yes | The default throttling value for each application. | None. |
Special | List | No | Yes | The list of special throttling policies customized by the user. | None. |
Special syntax
"Special": {
"SpecialType" : String,
"SpecialKey" : String,
"TrafficValue" : Integer
}
Special properties
Property | Type | Required | Editable | Description | Constraint |
---|---|---|---|---|---|
SpecialType | String | Yes | No | The special throttling type. | Valid values:
|
SpecialKey | String | Yes | No | The application ID or Alibaba Cloud account ID that corresponds to the special throttling type. | None. |
TrafficValue | Integer | Yes | No | The special throttling value. | None. |
Response parameters
Fn::GetAtt
TrafficControlId: the ID of the user-defined throttling policy.
Examples
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"AppId": {
"Type": "String",
"Description": "The ID of the special application"
}
},
"Resources": {
"TrafficControl": {
"Type": "ALIYUN::ApiGateway::TrafficControl",
"Properties": {
"TrafficControlName": "test_traffic_cont****",
"TrafficControlUnit": "MINUTE",
"ApiDefault": 400,
"UserDefault": 200,
"AppDefault": 100,
"Description": "demo2",
"Special": [
{
"SpecialType": "APP",
"SpecialKey": {
"Ref": "AppId"
},
"TrafficValue": 80
}
]
}
}
}
}