文档

DATASOURCE::VPC::BgpPeer

更新时间:

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

语法

{
  "Type": "DATASOURCE::VPC::BgpPeer",
  "Properties": {
    "BgpPeerId": String,
    "RefreshOptions": String
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

BgpPeerId

String

BGP 邻居的 ID。

RefreshOptions

String

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

有效值:

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

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

返回值

Fn::GetAtt

  • Status:BGP邻居的状态。

  • Description:BGP组的描述信息。

  • PeerIpAddress:BGP邻居的IP地址。

  • IpVersion:IP版本。

  • Keepalive:保活时间。

  • GmtModified:BGP邻居的修改时间。

  • RouterId:路由器的ID。

  • ReceivedRouteCount:接收的路由数。

  • PeerAsn:BGP邻居的AS号。

  • Name:BGP邻居的名称。

  • BgpPeerId:BGP邻居的ID。

  • LocalAsn:阿里云侧设备AS号。

  • AdvertisedRouteCount:宣告的路由数。

  • EnableBfd:是否开启BFD协议。

  • BfdMultiHop:BFD跳数。

  • BgpStatus:BGP的连接状态。

  • IsFake:是否启用Fake AS号。

  • AuthKey:BGP组的认证密钥。

  • RouteLimit:路由限制。

  • Hold:保持时间。

  • BgpGroupId:BGP组的ID。

示例

ROSTemplateFormatVersion: '2015-09-01'
Parameters:
  BgpPeerId:
    Type: String
    Description:
      en: The ID of the BGP peer.
    Required: false
Resources:
  ExtensionDataSource:
    Type: DATASOURCE::VPC::BgpPeer
    Properties:
      BgpPeerId:
        Ref: BgpPeerId
Outputs:
  Status:
    Description: |-
      The status of the BGP peer. Valid values:
      * Pending
      * Available
      * Modifying
      * Deleting
      * Deleted
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Status
  Description:
    Description: The description of the BGP group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Description
  PeerIpAddress:
    Description: The IP address of the BGP peer.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PeerIpAddress
  IpVersion:
    Description: The version of the IP address.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - IpVersion
  Keepalive:
    Description: The Keepalive interval.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Keepalive
  GmtModified:
    Description: The time when the BGP peer is modified.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - GmtModified
  RouterId:
    Description: The Router ID.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RouterId
  ReceivedRouteCount:
    Description: The number of received routes.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - ReceivedRouteCount
  PeerAsn:
    Description: The autonomous system number (ASN)of the BGP peer.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - PeerAsn
  Name:
    Description: The name of the BGP peer.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Name
  BgpPeerId:
    Description: The ID of the BGP peer.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BgpPeerId
  LocalAsn:
    Description: The ASN of the device on the Alibaba Cloud side.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - LocalAsn
  AdvertisedRouteCount:
    Description: The number of advertised routes.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AdvertisedRouteCount
  EnableBfd:
    Description: |-
      Indicates whether BFD is enabled. Valid values:
      * false
      * true
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - EnableBfd
  BfdMultiHop:
    Description: The Bidirectional Forwarding Detection (BFD) hop count.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BfdMultiHop
  BgpStatus:
    Description: |-
      The status of the BGP connection. Valid values:
      * Idle: The BGP connection is not used.
      * Connect: The BGP connection is used.
      * Active: The BGP connection is available.
      * Established: The BGP connection is established.
      * Down: The BGP connection is unavailable.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BgpStatus
  IsFake:
    Description: |-
      Indicates whether a fake autonomous system number (ASN) is used. Valid values:
      * false
      * true
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - IsFake
  AuthKey:
    Description: The authentication key of the BGP group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - AuthKey
  RouteLimit:
    Description: The maximum number of routes.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - RouteLimit
  Hold:
    Description: The hold time.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - Hold
  BgpGroupId:
    Description: The ID of the BGP group.
    Value:
      Fn::GetAtt:
        - ExtensionDataSource
        - BgpGroupId
{
  "ROSTemplateFormatVersion": "2015-09-01",
  "Parameters": {
    "BgpPeerId": {
      "Type": "String",
      "Description": {
        "en": "The ID of the BGP peer."
      },
      "Required": false
    }
  },
  "Resources": {
    "ExtensionDataSource": {
      "Type": "DATASOURCE::VPC::BgpPeer",
      "Properties": {
        "BgpPeerId": {
          "Ref": "BgpPeerId"
        }
      }
    }
  },
  "Outputs": {
    "Status": {
      "Description": "The status of the BGP peer. Valid values:\n* Pending\n* Available\n* Modifying\n* Deleting\n* Deleted",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Status"
        ]
      }
    },
    "Description": {
      "Description": "The description of the BGP group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Description"
        ]
      }
    },
    "PeerIpAddress": {
      "Description": "The IP address of the BGP peer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PeerIpAddress"
        ]
      }
    },
    "IpVersion": {
      "Description": "The version of the IP address.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "IpVersion"
        ]
      }
    },
    "Keepalive": {
      "Description": "The Keepalive interval.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Keepalive"
        ]
      }
    },
    "GmtModified": {
      "Description": "The time when the BGP peer is modified.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "GmtModified"
        ]
      }
    },
    "RouterId": {
      "Description": "The Router ID.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RouterId"
        ]
      }
    },
    "ReceivedRouteCount": {
      "Description": "The number of received routes.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "ReceivedRouteCount"
        ]
      }
    },
    "PeerAsn": {
      "Description": "The autonomous system number (ASN)of the BGP peer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "PeerAsn"
        ]
      }
    },
    "Name": {
      "Description": "The name of the BGP peer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Name"
        ]
      }
    },
    "BgpPeerId": {
      "Description": "The ID of the BGP peer.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BgpPeerId"
        ]
      }
    },
    "LocalAsn": {
      "Description": "The ASN of the device on the Alibaba Cloud side.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "LocalAsn"
        ]
      }
    },
    "AdvertisedRouteCount": {
      "Description": "The number of advertised routes.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AdvertisedRouteCount"
        ]
      }
    },
    "EnableBfd": {
      "Description": "Indicates whether BFD is enabled. Valid values:\n* false\n* true",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "EnableBfd"
        ]
      }
    },
    "BfdMultiHop": {
      "Description": "The Bidirectional Forwarding Detection (BFD) hop count.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BfdMultiHop"
        ]
      }
    },
    "BgpStatus": {
      "Description": "The status of the BGP connection. Valid values:\n* Idle: The BGP connection is not used.\n* Connect: The BGP connection is used.\n* Active: The BGP connection is available.\n* Established: The BGP connection is established.\n* Down: The BGP connection is unavailable.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BgpStatus"
        ]
      }
    },
    "IsFake": {
      "Description": "Indicates whether a fake autonomous system number (ASN) is used. Valid values:\n* false\n* true",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "IsFake"
        ]
      }
    },
    "AuthKey": {
      "Description": "The authentication key of the BGP group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "AuthKey"
        ]
      }
    },
    "RouteLimit": {
      "Description": "The maximum number of routes.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "RouteLimit"
        ]
      }
    },
    "Hold": {
      "Description": "The hold time.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "Hold"
        ]
      }
    },
    "BgpGroupId": {
      "Description": "The ID of the BGP group.",
      "Value": {
        "Fn::GetAtt": [
          "ExtensionDataSource",
          "BgpGroupId"
        ]
      }
    }
  }
}