All Products
Search
Document Center

Virtual Private Cloud:DescribeBgpPeers

Last Updated:Mar 04, 2024

Queries Border Gateway Protocol (BGP) peers in a region.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • The required resource types are displayed in bold characters.
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
vpc:DescribeBgpPeersRead
  • VirtualBorderRouter
    acs:vpc:{#regionId}:{#accountId}:virtualborderrouter/{#VbrId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RouterIdstringNo

The ID of the virtual border router (VBR) that is associated with the BGP peer that you want to query.

vbr-2zecmmvg5gvu8i4te****
BgpPeerIdstringNo

The ID of the BGP peer that you want to query.

bgp-2ze3un0ft1jd1xd****
BgpGroupIdstringNo

The ID of the BGP group to which the BGP peer that you want to query belongs.

bgpg-2zev8h2wo414sfh****
RegionIdstringYes

The region ID of the BGP group to which the BGP peer that you want to query belongs.

You can call the DescribeRegions operation to obtain the region ID.

cn-shanghai
IsDefaultbooleanNo

Specifies whether the BGP group is the default group. Valid values:

  • true
  • false
false
PageNumberintegerNo

The page number. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Valid values: 1 to 50. Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object

The information about the BGP peer.

PageSizeinteger

The number of entries per page.

10
RequestIdstring

The request ID.

DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6
PageNumberinteger

The page number.

1
TotalCountinteger

The number of entries returned.

10
BgpPeersobject []

The information about the BGP peer.

Statusstring

The status of the BGP peer. Valid values:

  • Pending
  • Available
  • Modifying
  • Deleting
  • Deleted
Available
PeerIpAddressstring

The IP address of the BGP peer.

116.62.XX.XX
RouterIdstring

The Router ID.

vbr-2zecmmvg5gvu8i4te****
BgpGroupIdstring

The ID of the BGP group.

bgpg-2zev8h2wo414sfh****
BgpStatusstring

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.
Connect
BfdMultiHopinteger

The Bidirectional Forwarding Detection (BFD) hop count.

3
PeerAsnstring

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

65515
LocalAsnstring

The ASN of the device on the Alibaba Cloud side.

45104
RegionIdstring

The ID of the region to which the BGP group belongs.

cn-shanghai
BgpPeerIdstring

The ID of the BGP peer.

bgp-2ze3un0ft1jd1xd****
EnableBfdboolean

Indicates whether BFD is enabled. Valid values:

  • true
  • false
true
Holdstring

The hold time.

30
IpVersionstring

The version of the IP address.

ipv4
Keepalivestring

The Keepalive interval.

10
Descriptionstring

The description of the BGP group.

test
RouteLimitstring

The maximum number of routes.

110
IsFakeboolean

Indicates whether a fake autonomous system number (ASN) is used. Valid values:

  • true
  • false
true
AuthKeystring

The authentication key of the BGP group.

!PWZ****
Namestring

The name of the BGP peer.

test
AdvertisedRouteCountinteger

The number of advertised routes.

0
ReceivedRouteCountinteger

The number of received routes.

0
GmtModifiedstring

The time when the BGP peer is modified.

2022-05-20T07:29:08Z

Examples

Sample success responses

JSONformat

{
  "PageSize": 10,
  "RequestId": "DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6",
  "PageNumber": 1,
  "TotalCount": 10,
  "BgpPeers": {
    "BgpPeer": [
      {
        "Status": "Available",
        "PeerIpAddress": "116.62.XX.XX",
        "RouterId": "vbr-2zecmmvg5gvu8i4te****",
        "BgpGroupId": "bgpg-2zev8h2wo414sfh****",
        "BgpStatus": "Connect",
        "BfdMultiHop": 3,
        "PeerAsn": "65515",
        "LocalAsn": "45104",
        "RegionId": "cn-shanghai",
        "BgpPeerId": "bgp-2ze3un0ft1jd1xd****",
        "EnableBfd": true,
        "Hold": "30",
        "IpVersion": "ipv4",
        "Keepalive": "10",
        "Description": "test",
        "RouteLimit": "110",
        "IsFake": true,
        "AuthKey": "!PWZ****",
        "Name": "test",
        "AdvertisedRouteCount": 0,
        "ReceivedRouteCount": 0,
        "GmtModified": "2022-05-20T07:29:08Z"
      }
    ]
  }
}

Error codes

HTTP status codeError codeError messageDescription
404InvalidRegionId.NotFoundThe specified RegionId does not exist in our records.The specified region ID does not exist.
500InternalErrorThe request processing has failed due to some unknown error.An unknown error occurred.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-09-11API Description Update. The Error code has changedsee changesets
Change itemChange content
API DescriptionAPI Description Update.
Error CodesThe Error code has changed.
    delete Error Codes: 404
    delete Error Codes: 500
2021-11-17The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 404
    delete Error Codes: 500
Output ParametersThe response structure of the API has changed.