全部產品
Search
文件中心

Resource Orchestration Service:ALIYUN::ApiGateway::TrafficControlBinding

更新時間:Jun 15, 2024

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環境

取值:

  • TEST

  • PRE

  • RELEASE

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"
      }
    }
  }
}