全部產品
Search
文件中心

Resource Orchestration Service:ALIYUN::VPC::VpnPbrRouteEntry

更新時間:Sep 19, 2024

ALIYUN::VPC::VpnPbrRouteEntry類型用於建立VPN策略路由。

文法

{
  "Type": "ALIYUN::VPC::VpnPbrRouteEntry",
  "Properties": {
    "Description": String,
    "RouteDest": String,
    "OverlayMode": String,
    "VpnGatewayId": String,
    "NextHop": String,
    "RouteSource": String,
    "PublishVpc": Boolean,
    "Weight": Integer,
    "Priority": Integer
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

Description

String

策略路由的描述資訊。

RouteDest

String

策略路由的目標網段。

OverlayMode

String

覆蓋模式。

取值:Ipsec,表示IPsec隧道協議。

VpnGatewayId

String

VPN網關的ID。

NextHop

String

策略路由的下一跳。

RouteSource

String

策略路由的源網段。

PublishVpc

Boolean

是否發布策略路由到VPC。

取值:

  • true:發布策略路由到VPC。

  • false:不發布策略路由到VPC。

Weight

Integer

策略路由的權重值。

取值:0~100。

Priority

Integer

策略路由原始的策略優先順序。

取值範圍:1~100

策略優先順序數字越小,策略路由的優先順序越高。

傳回值

Fn::GetAtt

  • RouteDest:策略路由的目標網段。

  • VpnGatewayId:VPN網關的ID。

  • NextHop:策略路由的下一跳。

  • RouteSource:策略路由的源網段。

樣本

JSON格式

{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "Description": {
      "Type": "String",
      "Description": "The description of the VPN destination route."
    },
    "RouteDest": {
      "Type": "String",
      "Description": "The destination CIDR block of the destination route."
    },
    "OverlayMode": {
      "Type": "String",
      "Description": "The overlay mode."
    },
    "VpnGatewayId": {
      "Type": "String",
      "Description": "The ID of the VPN Gateway."
    },
    "NextHop": {
      "Type": "String",
      "Description": "The next hop of the destination route entry."
    },
    "RouteSource": {
      "Type": "String",
      "Description": "The source CIDR block of the policy-based route."
    },
    "PublishVpc": {
      "Type": "Boolean",
      "Description": "Indicates whether to publish the destination route to the VPC. Valid values:\ntrue: Publish the destination route to the VPC.\nfalse: Do not publish the destination route to the VPC.",
      "AllowedValues": [
        "True",
        "true",
        "False",
        "false"
      ]
    },
    "Weight": {
      "Type": "Number",
      "Description": "The weight of the destination route. Valid values: 0|100."
    }
  },
  "Resources": {
    "VpnPbrRouteEntry": {
      "Type": "ALIYUN::VPC::VpnPbrRouteEntry",
      "Properties": {
        "Description": {
          "Ref": "Description"
        },
        "RouteDest": {
          "Ref": "RouteDest"
        },
        "OverlayMode": {
          "Ref": "OverlayMode"
        },
        "VpnGatewayId": {
          "Ref": "VpnGatewayId"
        },
        "NextHop": {
          "Ref": "NextHop"
        },
        "RouteSource": {
          "Ref": "RouteSource"
        },
        "PublishVpc": {
          "Ref": "PublishVpc"
        },
        "Weight": {
          "Ref": "Weight"
        }
      }
    }
  },
  "Outputs": {
    "RouteDest": {
      "Description": "The destination CIDR block of the destination route.",
      "Value": {
        "Fn::GetAtt": [
          "VpnPbrRouteEntry",
          "RouteDest"
        ]
      }
    },
    "VpnGatewayId": {
      "Description": "The ID of the VPN Gateway.",
      "Value": {
        "Fn::GetAtt": [
          "VpnPbrRouteEntry",
          "VpnGatewayId"
        ]
      }
    },
    "NextHop": {
      "Description": "The next hop of the destination route entry.",
      "Value": {
        "Fn::GetAtt": [
          "VpnPbrRouteEntry",
          "NextHop"
        ]
      }
    },
    "RouteSource": {
      "Description": "The destination CIDR block of the policy-based route.",
      "Value": {
        "Fn::GetAtt": [
          "VpnPbrRouteEntry",
          "RouteSource"
        ]
      }
    }
  }
}

YAML格式

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  Description:
    Description: The description of the VPN destination route.
    Type: String
  NextHop:
    Description: The next hop of the destination route entry.
    Type: String
  OverlayMode:
    Description: The overlay mode.
    Type: String
  PublishVpc:
    AllowedValues:
    - 'True'
    - 'true'
    - 'False'
    - 'false'
    Description: 'Indicates whether to publish the destination route to the VPC. Valid
      values:

      true: Publish the destination route to the VPC.

      false: Do not publish the destination route to the VPC.'
    Type: Boolean
  RouteDest:
    Description: The destination CIDR block of the destination route.
    Type: String
  RouteSource:
    Description: The source CIDR block of the policy-based route.
    Type: String
  VpnGatewayId:
    Description: The ID of the VPN Gateway.
    Type: String
  Weight:
    Description: 'The weight of the destination route. Valid values: 0|100.'
    Type: Number
Resources:
  VpnPbrRouteEntry:
    Properties:
      Description:
        Ref: Description
      NextHop:
        Ref: NextHop
      OverlayMode:
        Ref: OverlayMode
      PublishVpc:
        Ref: PublishVpc
      RouteDest:
        Ref: RouteDest
      RouteSource:
        Ref: RouteSource
      VpnGatewayId:
        Ref: VpnGatewayId
      Weight:
        Ref: Weight
    Type: ALIYUN::VPC::VpnPbrRouteEntry
Outputs:
  NextHop:
    Description: The next hop of the destination route entry.
    Value:
      Fn::GetAtt:
      - VpnPbrRouteEntry
      - NextHop
  RouteDest:
    Description: The destination CIDR block of the destination route.
    Value:
      Fn::GetAtt:
      - VpnPbrRouteEntry
      - RouteDest
  RouteSource:
    Description: The destination CIDR block of the policy-based route.
    Value:
      Fn::GetAtt:
      - VpnPbrRouteEntry
      - RouteSource
  VpnGatewayId:
    Description: The ID of the VPN Gateway.
    Value:
      Fn::GetAtt:
      - VpnPbrRouteEntry
      - VpnGatewayId