全部產品
Search
文件中心

Resource Orchestration Service:ALIYUN::VPC::BgpPeer

更新時間:Mar 28, 2026

ALIYUN::VPC::BgpPeer類型用於向指定的BGP組中添加BGP鄰居。

文法

{
  "Type": "ALIYUN::VPC::BgpPeer",
  "Properties": {
    "PeerIpAddress": String,
    "EnableBfd": Boolean,
    "BgpGroupId": String,
    "BfdMultiHop": Integer,
    "IpVersion": String
  }
}

屬性

屬性名稱

類型

必須

允許更新

描述

約束

PeerIpAddress

String

BGP鄰居的IP地址。

EnableBfd

Boolean

是否開啟BFD功能。

取值:

  • true:開啟。

  • false:不開啟。

BgpGroupId

String

BGP組的ID。

BfdMultiHop

Integer

BFD 跳數。

取值範圍:1~255

選擇開啟 BFD 功能時,需要配置此參數。 輸入 BFD 跳數,即資料從源端到目標端傳輸時經過的最大裝置數量。您可以根據真實的物理鏈路因素配置不同的跳數。

說明

當您在多雲環境或光纖直連組網中使用 BFD,中間無任何橋接裝置時,則需要將 BFD 的預設跳數從 255 改成 1

IpVersion

String

IP 版本。

取值:

  • IPv4(預設值):IPv4 版本。

  • IPv6:IPv6 版本,只有當建立 BGP 組的 VBR 開通 IPv6 功能時,支援 IPv6 版本。

傳回值

Fn::GetAtt

BgpPeerId:BGP鄰居的ID。

樣本

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  BgpGroupId:
    Type: String
    Description: The ID of the BGP group.
Resources:
  BgpPeer:
    Type: ALIYUN::VPC::BgpPeer
    Properties:
      PeerIpAddress: 192.168.1.1
      EnableBfd: false
      BgpGroupId:
        Ref: BgpGroupId
Outputs:
  BgpPeerId:
    Description: The ID of the BGP peer.
    Value:
      Fn::GetAtt:
        - BgpPeer
        - BgpPeerId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "BgpGroupId": {
      "Type": "String",
      "Description": "The ID of the BGP group."
    }
  },
  "Resources": {
    "BgpPeer": {
      "Type": "ALIYUN::VPC::BgpPeer",
      "Properties": {
        "PeerIpAddress": "192.168.1.1",
        "EnableBfd": false,
        "BgpGroupId": {
          "Ref": "BgpGroupId"
        }
      }
    }
  },
  "Outputs": {
    "BgpPeerId": {
      "Description": "The ID of the BGP peer.",
      "Value": {
        "Fn::GetAtt": [
          "BgpPeer",
          "BgpPeerId"
        ]
      }
    }
  }
}