ALIYUN::ApiGateway::TrafficControlBinding類型用於設定API的使用者自訂流控。
文法
{
"Type": "ALIYUN::ApiGateway::TrafficControlBinding",
"Properties": {
"ApiIds": List,
"TrafficControlId": String,
"StageName": String,
"GroupId": String
}
}
屬性
屬性名稱 | 類型 | 必須 | 允許更新 | 描述 | 約束 |
ApiIds | List | 是 | 是 | 要操作的API編號 | 最多支援100個 |
GroupId | String | 是 | 是 | 要操作的API所屬分組ID | 無 |
StageName | String | 是 | 是 | 要操作的API環境 | 取值:
|
TrafficControlId | String | 是 | 是 | 要操作的流控策略ID | 無 |
傳回值
Fn::GetAtt
無。
樣本
YAML
格式
ROSTemplateFormatVersion: '2015-09-01'
Parameters:
TrafficControlId:
Type: String
Description: 流控策略ID
GroupId:
Type: String
Description: 操作的分組
ApiId:
Type: String
Description: 綁定的API
Resources:
TrafficControlBinding:
Type: ALIYUN::ApiGateway::TrafficControlBinding
Properties:
TrafficControlId:
Ref: TrafficControlId
GroupId:
Ref: GroupId
ApiIds:
- Ref: ApiId
StageName: RELEASE
JSON
格式
{
"ROSTemplateFormatVersion": "2015-09-01",
"Parameters": {
"TrafficControlId": {
"Type": "String",
"Description": "流控策略ID"
},
"GroupId": {
"Type": "String",
"Description": "操作的分組"
},
"ApiId": {
"Type": "String",
"Description": "綁定的API"
}
},
"Resources": {
"TrafficControlBinding": {
"Type": "ALIYUN::ApiGateway::TrafficControlBinding",
"Properties": {
"TrafficControlId": {
"Ref": "TrafficControlId"
},
"GroupId": {
"Ref": "GroupId"
},
"ApiIds": [
{
"Ref": "ApiId"
}
],
"StageName": "RELEASE"
}
}
}
}