All Products
Search
Document Center

Resource Orchestration Service:ALIYUN::ApiGateway::TrafficControlBinding

Last Updated:Jul 10, 2024

ALIYUN::ApiGateway::TrafficControlBinding is used to bind a custom throttling policy to APIs.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

ApiIds

List

Yes

Yes

The IDs of the APIs.

You can specify up to 100 API IDs.

GroupId

String

Yes

Yes

The ID of the API group to which the APIs belong.

None.

StageName

String

Yes

Yes

The environment in which you want to bind a custom throttling policy to APIs.

Valid values:

  • TEST

  • PRE

  • RELEASE

TrafficControlId

String

Yes

Yes

The ID of the throttling policy.

None.

Return values

Fn::GetAtt

None.

Examples

YAML format

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  TrafficControlId:
    Type: String
    Description: the ID of the throttling policy.
  GroupId:
    Type: String
    Description: the ID of the API group.
  ApiId:
    Type: String
    Description: the ID of the API to which the custom throttling policy is bound.
Resources:
  TrafficControlBinding:
    Type: ALIYUN::ApiGateway::TrafficControlBinding
    Properties:
      TrafficControlId:
        Ref: TrafficControlId
      GroupId:
        Ref: GroupId
      ApiIds:
        - Ref: ApiId
      StageName: RELEASE

JSON format

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "TrafficControlId": {
      "Type": "String",
      "Description": "the ID of the throttling policy."
    },
    "GroupId": {
      "Type": "String",
      "Description": "the ID of the API group."
    },
    "ApiId": {
      "Type": "String",
      "Description": "the ID of the API to which the custom throttling policy is bound."
    }
  },
  "Resources": {
    "TrafficControlBinding": {
      "Type": "ALIYUN::ApiGateway::TrafficControlBinding",
      "Properties": {
        "TrafficControlId": {
          "Ref": "TrafficControlId"
        },
        "GroupId": {
          "Ref": "GroupId"
        },
        "ApiIds": [
          {
            "Ref": "ApiId"
          }
        ],
        "StageName": "RELEASE"
      }
    }
  }
}