ALIYUN::ApiGateway::TrafficControlBinding类型用于设置API的用户自定义流控。

语法

{
  "Type": "ALIYUN::ApiGateway::TrafficControlBinding",
  "Properties": {
    "ApiIds": List,
    "TrafficControlId": String,
    "StageName": String,
    "GroupId": String
  }
}

属性

属性名称类型必须允许更新描述约束
ApiIds List 要操作的API编号 最多支持100个
TrafficControlId String 要操作的流控策略ID
StageName String 要操作的API环境取值:
  • TEST
  • PRE
  • RELEASE
GroupId String 要操作的API所属分组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"
          }
        }
      }
    }