ALIYUN::EDAS::SwimmingLane

更新时间:
复制为 MD 格式

ALIYUN::EDAS::SwimmingLane类型用于新建泳道。

语法

{
  "Type": "ALIYUN::EDAS::SwimmingLane",
  "Properties": {
    "EntryRules": List,
    "GroupId": Integer,
    "LogicalRegionId": String,
    "Name": String,
    "Tag": String,
    "AppInfos": List,
    "EnableRules": Boolean
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

EntryRules

List

流控条件。

示例:

[{"priority":1,"path":"/traffic","condition":"AND","restItems":[{"type":"header","name":"testheader","value":"testvalue","cond":"==","operator":"rawvalue"}]}]

GroupId

Integer

泳道组 ID。

LogicalRegionId

String

自定义命名空间的 RegionId。

格式为:物理 Region:自定义命名空间标识符,例如cn-hangzhou:test

Name

String

泳道名称。

Tag

String

标签。

AppInfos

List

泳道涉及应用信息。

示例:

[{"priority":1,"path":"/traffic","condition":"AND","restItems":[{"type":"header","name":"testheader","value":"testvalue","cond":"==","operator":"rawvalue"}]}]

EnableRules

Boolean

是否启用流控规则。

返回值

Fn::GetAtt

LaneId:泳道 ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  LogicalRegionId:
    Type: String
    Description:
      en: 'The RegionId of the logical region. Format: `physicalRegion:customNamespaceIdentifier`.'
    Required: true
  EntryRules:
    AssociationPropertyMetadata: {}
    AssociationProperty: List[Parameters]
    Type: Json
    Description:
      en: The entry rules of the swimming lane.
    Required: true
  Tag:
    Type: String
    Description:
      en: The tag of the swimming lane.
    Required: true
  Name:
    Type: String
    Description:
      en: The name of the swimming lane.
    Required: true
  GroupId:
    Type: Number
    Description:
      en: The group ID of the swimming lane.
    Required: true
Resources:
  SwimmingLane:
    Type: ALIYUN::EDAS::SwimmingLane
    Properties:
      LogicalRegionId:
        Ref: LogicalRegionId
      EntryRules:
        Ref: EntryRules
      Tag:
        Ref: Tag
      Name:
        Ref: Name
      GroupId:
        Ref: GroupId
Outputs:
  LaneId:
    Description: The ID of the swimming lane.
    Value:
      Fn::GetAtt:
        - SwimmingLane
        - LaneId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "LogicalRegionId": {
      "Type": "String",
      "Description": {
        "en": "The RegionId of the logical region. Format: `physicalRegion:customNamespaceIdentifier`."
      },
      "Required": true
    },
    "EntryRules": {
      "AssociationPropertyMetadata": {},
      "AssociationProperty": "List[Parameters]",
      "Type": "Json",
      "Description": {
        "en": "The entry rules of the swimming lane."
      },
      "Required": true
    },
    "Tag": {
      "Type": "String",
      "Description": {
        "en": "The tag of the swimming lane."
      },
      "Required": true
    },
    "Name": {
      "Type": "String",
      "Description": {
        "en": "The name of the swimming lane."
      },
      "Required": true
    },
    "GroupId": {
      "Type": "Number",
      "Description": {
        "en": "The group ID of the swimming lane."
      },
      "Required": true
    }
  },
  "Resources": {
    "SwimmingLane": {
      "Type": "ALIYUN::EDAS::SwimmingLane",
      "Properties": {
        "LogicalRegionId": {
          "Ref": "LogicalRegionId"
        },
        "EntryRules": {
          "Ref": "EntryRules"
        },
        "Tag": {
          "Ref": "Tag"
        },
        "Name": {
          "Ref": "Name"
        },
        "GroupId": {
          "Ref": "GroupId"
        }
      }
    }
  },
  "Outputs": {
    "LaneId": {
      "Description": "The ID of the swimming lane.",
      "Value": {
        "Fn::GetAtt": [
          "SwimmingLane",
          "LaneId"
        ]
      }
    }
  }
}