全部产品
Search
文档中心

资源编排:ALIYUN::CLOUDFW::TrFirewallRoutePolicy

更新时间:Dec 02, 2024

ALIYUN::CLOUDFW::TrFirewallRoutePolicy类型用于创建TR防火墙路由规则。

语法

{
  "Type": "ALIYUN::CLOUDFW::TrFirewallRoutePolicy",
  "Properties": {
    "FirewallId": String,
    "PolicyType": String,
    "PolicyDescription": String,
    "PolicyName": String,
    "DestCandidateList": List,
    "SrcCandidateList": List
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

FirewallId

String

VPC 边界防火墙实例 ID。

PolicyType

String

VPC 边界防火墙云企业网企业版引流场景类型。

取值:

  • fullmesh:多点间互联

  • one_to_one:点到点

  • end_to_end:点到多点

PolicyDescription

String

引流描述。

PolicyName

String

引流名称。

DestCandidateList

List

子引流实例列表。

更多信息,请参见DestCandidateList属性

SrcCandidateList

List

主引流实例列表。

更多信息,请参见SrcCandidateList属性

SrcCandidateList语法

"SrcCandidateList": [
  {
    "CandidateType": String,
    "CandidateId": String
  }
]

SrcCandidateList属性

属性名称

类型

必须

允许更新

描述

约束

CandidateId

String

引流实例的 ID。

CandidateType

String

引流实例类型。

DestCandidateList语法

"DestCandidateList": [
  {
    "CandidateType": String,
    "CandidateId": String
  }
]

DestCandidateList属性

属性名称

类型

必须

允许更新

描述

约束

CandidateId

String

引流实例的 ID。

CandidateType

String

引流实例类型。

返回值

Fn::GetAtt

  • FirewallId:VPC 边界防火墙实例 ID。

  • TrFirewallRoutePolicyId:防火墙路由策略 ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  PolicyType:
    Type: String
    Description:
      en: |-
        The type of the traffic redirection scenario of the VPC firewall. Valid values:
        fullmesh: interconnected instances
        one_to_one: instance to instance
        end_to_end: instance to instances
    AllowedValues:
      - fullmesh
      - one_to_one
      - end_to_end
    Required: true
    Default: end_to_end
  PolicyName:
    Type: String
    Description:
      en: The name of the traffic redirection instance.
    Required: true
  FirewallId:
    Type: String
    Description:
      en: The instance ID of the VPC firewall.
    Required: true
Resources:
  ExtensionResource:
    Type: ALIYUN::CLOUDFW::TrFirewallRoutePolicy
    Properties:
      PolicyType:
        Ref: PolicyType
      PolicyName:
        Ref: PolicyName
      FirewallId:
        Ref: FirewallId
      PolicyDescription: demo
      SrcCandidateList:
        - CandidateType: VPC
          CandidateId: vpc-wXXXXX
      DestCandidateList:
        - CandidateType: VPC
          CandidateId: vpc-wXXXXX
Outputs:
  FirewallId:
    Description: The instance ID of the VPC firewall.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - FirewallId
  TrFirewallRoutePolicyId:
    Description: The ID of the routing policy.
    Value:
      Fn::GetAtt:
        - ExtensionResource
        - TrFirewallRoutePolicyId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "PolicyType": {
      "Type": "String",
      "Description": {
        "en": "The type of the traffic redirection scenario of the VPC firewall. Valid values:\nfullmesh: interconnected instances\none_to_one: instance to instance\nend_to_end: instance to instances"
      },
      "AllowedValues": [
        "fullmesh",
        "one_to_one",
        "end_to_end"
      ],
      "Required": true,
      "Default": "end_to_end"
    },
    "PolicyName": {
      "Type": "String",
      "Description": {
        "en": "The name of the traffic redirection instance."
      },
      "Required": true
    },
    "FirewallId": {
      "Type": "String",
      "Description": {
        "en": "The instance ID of the VPC firewall."
      },
      "Required": true
    }
  },
  "Resources": {
    "ExtensionResource": {
      "Type": "ALIYUN::CLOUDFW::TrFirewallRoutePolicy",
      "Properties": {
        "PolicyType": {
          "Ref": "PolicyType"
        },
        "PolicyName": {
          "Ref": "PolicyName"
        },
        "FirewallId": {
          "Ref": "FirewallId"
        },
        "PolicyDescription": "demo",
        "SrcCandidateList": [
          {
            "CandidateType": "VPC",
            "CandidateId": "vpc-wXXXXX"
          }
        ],
        "DestCandidateList": [
          {
            "CandidateType": "VPC",
            "CandidateId": "vpc-wXXXXX"
          }
        ]
      }
    }
  },
  "Outputs": {
    "FirewallId": {
      "Description": "The instance ID of the VPC firewall.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "FirewallId"
        ]
      }
    },
    "TrFirewallRoutePolicyId": {
      "Description": "The ID of the routing policy.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionResource",
          "TrFirewallRoutePolicyId"
        ]
      }
    }
  }
}