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 | 否 | 是 | 当资源栈更新时,数据源资源的刷新策略。 | 有效值: 
 | 
返回值
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的连接状态。 | 取值: 
 | 
| BfdMultiHop | String | BFD跳数。 | 无 | 
| PeerAsn | String | BGP邻居的AS号。 | 无 | 
| LocalAsn | String | 阿里云侧设备AS号。 | 无 | 
| BgpPeerId | String | BGP邻居的ID。 | 无 | 
| EnableBfd | String | 是否开启BFD协议。 | 取值: 
 | 
| Hold | String | 等待BGP消息传入的保持时间,单位:秒。 | 无 | 
| IpVersion | String | IP版本。 | 无 | 
| Keepalive | String | 保活时间,单位:秒。 | 无 | 
| Description | String | BGP组的描述信息。 | 无 | 
| RouteLimit | String | 路由限制。 | 无 | 
| IsFake | String | 是否启用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"
        ]
      }
    }
  }
}