All Products
Search
Document Center

Resource Orchestration Service:DATASOURCE::VPC::BgpPeers

Last Updated:Nov 15, 2024

DATASOURCE::VPC::BgpPeers is used to query Border Gateway Protocol (BGP) peers in a region.

Syntax

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

Properties

Property

Type

Required

Editable

Description

Constraint

BgpPeerId

String

No

Yes

The ID of the BGP peer.

None.

BgpGroupId

String

No

Yes

The ID of the BGP group to which BGP peers belong.

None.

RouterId

String

No

Yes

The ID of the router.

None.

RefreshOptions

String

No

Yes

The refresh policy for data source resources when the stack is updated.

Valid values:

  • Never (default): does not refresh data source resources when the stack is updated.

  • Always: refreshes data source resources when the stack is updated.

Return values

Fn::GetAtt

  • BgpPeerIds: the IDs of the BGP peers.

  • BgpPeers: details of the BGP peers.

Property

Type

Description

Constraint

BgpPeerIds

List

The IDs of the BGP peers.

None.

BgpPeers

List

Details of the BGP peers.

None.

Status

String

The status of the BGP peer.

None.

PeerIpAddress

String

The IP address of the BGP peer.

None.

RouterId

Number

The ID of the router.

None.

BgpGroupId

String

The ID of the BGP group.

None.

BgpStatus

String

The status of the BGP connection.

Valid values:

  • Idle: No connection is established.

  • Connect: The connection is being used.

  • Active: The connection is available.

  • Established: The connection is established.

  • Down: The connection is unavailable.

BfdMultiHop

String

The number of Bidirectional Forwarding Detection (BFD) hops.

None.

PeerAsn

String

The autonomous system number (ASN)of the BGP peer.

None.

LocalAsn

String

The ASN of the device on the Alibaba Cloud side.

None.

BgpPeerId

String

The ID of the BGP peer.

None.

EnableBfd

String

Indicates whether BFD is enabled.

Valid values:

  • true: BFD is enabled.

  • false: BFD is disabled.

Hold

String

The hold time that is used to receive BGP messages. Unit: seconds.

None.

IpVersion

String

The IP version.

None.

Keepalive

String

The keepalive time. Unit: seconds.

None.

Description

String

The description of the BGP group.

None.

RouteLimit

String

The limit on routes.

None.

IsFake

String

Indicates whether a fake ASN is used.

Valid values:

  • true: A fake ASN is used.

  • false: No fake ASN is used.

AuthKey

String

The authentication key of the BGP group.

None.

Name

String

The name of the BGP peer.

None.

AdvertisedRouteCount

String

The number of advertised routes.

None.

ReceivedRouteCount

String

The number of received routes.

None.

GmtModified

String

The time when the BGP peer was modified.

None.

Examples

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"
        ]
      }
    }
  }
}