文档

DATASOURCE::VPC::BgpPeers

更新时间:

DATASOURCE::VPC::BgpPeers类型用于查询指定地域下的BGP邻居。

语法

{
  "Type": "DATASOURCE::VPC::BgpPeers",
  "Properties": {
    "BgpPeerId": String,
    "BgpGroupId": String,
    "RouterId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

BgpPeerId

String

BGP邻居的 ID。

BgpGroupId

String

BGP邻居所在 BGP组的ID。

RouterId

String

路由器的ID。

RefreshOptions

String

当资源栈更新时,数据源资源的刷新策略。

有效值:

  • Never(默认值):更新堆栈时,从不刷新数据源资源。

  • Always:更新堆栈时,始终刷新数据源资源。

返回值

Fn::GetAtt

  • BgpPeerIds:BGP邻居的ID列表。

  • BgpPeers:BGP邻居的详情列表。

属性名称

类型

描述

约束

BgpPeerIds

List

BGP邻居的ID列表。

BgpPeers

List

BGP邻居的详情列表

Status

String

BGP邻居的状态。

PeerIpAddress

String

BGP邻居的IP地址。

RouterId

Number

路由器的ID。

BgpGroupId

String

BGP组的ID。

BgpStatus

String

BGP的连接状态。

取值:

  • Idle:未连接。

  • Connect:使用中。

  • Active:可用。

  • Established:已建立。

  • Down:不可用。

BfdMultiHop

String

BFD跳数。

PeerAsn

String

BGP邻居的AS号。

LocalAsn

String

阿里云侧设备AS号。

BgpPeerId

String

BGP邻居的ID。

EnableBfd

String

是否开启BFD协议。

取值:

  • true:开启 BFD 协议。

  • false:未开启 BFD 协议。

Hold

String

保持时间。

IpVersion

String

IP版本。

Keepalive

String

保活时间。

Description

String

BGP组的描述信息。

RouteLimit

String

路由限制。

IsFake

String

是否启用Fake AS号。

取值:

  • true:启用 Fake AS 号。

  • false:未启用 Fake AS 号。

AuthKey

String

BGP组的认证密钥。

Name

String

BGP邻居的名称。

AdvertisedRouteCount

String

宣告的路由数。

ReceivedRouteCount

String

接收的路由数。

GmtModified

String

BGP邻居的修改时间。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  BgpPeerId:
    Type: String
    Description:
      en: The ID of the BGP peer that you want to query.
    Required: false
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::VPC::BgpPeers
    Properties:
      BgpPeerId:
        Ref: BgpPeerId
Outputs:
  BgpPeerIds:
    Description: The list of The BGP peer ids.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BgpPeerIds
  BgpPeers:
    Description: The list of The BGP peers.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BgpPeers
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "BgpPeerId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the BGP peer that you want to query."
      },
      "Required": false
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::BgpPeers",
      "Properties": {
        "BgpPeerId": {
          "Ref": "BgpPeerId"
        }
      }
    }
  },
  "Outputs": {
    "BgpPeerIds": {
      "Description": "The list of The BGP peer ids.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BgpPeerIds"
        ]
      }
    },
    "BgpPeers": {
      "Description": "The list of The BGP peers.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BgpPeers"
        ]
      }
    }
  }
}