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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes DescribeBgpPeers

The operation that you want to perform.

Set the value to DescribeBgpPeers.

RegionId String Yes cn-shanghai

The ID of the region where the BGP group is deployed.

You can call the DescribeRegions operation to query region IDs.

RouterId String No vbr-2zecmmvg5gvu8i4te****

The ID of the vRouter.

BgpPeerId String No bgp-2ze3un0ft1jd1xd*****

The ID of the BGP peer.

BgpGroupId String No bgpg-2zev8h2wo414sfh******

The ID of the BGP group.

IsDefault Boolean No false

Specifies whether the BGP group is the default one.

  • true: The BGP group is the default one.
  • false: The BGP group is not the default one.
PageNumber Integer No 1

The number of the page to return. Default value: 1.

PageSize Integer No 1

The number of entries to return on each page. Maximum value: 50. Default value: 10.

Response parameters

Parameter Type Example Description
RequestId String DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6

The ID of the request.

TotalCount Integer 10

The total number of entries returned.

PageNumber Integer 1

The number of the returned page.

PageSize Integer 2

The number of entries returned per page.

BgpPeers Array

The detailed information about the BGP peer.

Name String test

The name of the BGP peer.

Description String xxxxxxxxx

The description of the BGP group.

BgpPeerId String bgp-wz977wcrmb69agdb******

The ID of the BGP peer.

BgpGroupId String bgp-wz977wcrmb69*******

The ID of the BGP group.

PeerIpAddress String 116.62.**. **

The IP address of the BGP peer.

PeerAsn String active

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

AuthKey String ! PWZ2wsq******

The authentication key of the BGP group.

RouterId String vbr-2zecmmvg5gvu8i4te****w

The ID of the vRouter.

BgpStatus String deleted

The state of the BGP connection. Valid values:

  • creating: being created
  • working: being used
  • modifying: being modified
  • deleting: being deleted
  • deleted: deleted
Status String active

The state of the BGP peer. Valid values:

  • Pending: pending
  • Available: available
  • Modifying: being modified
  • Deleting: being deleted
  • Deleted: deleted
Keepalive String 10

The keepalive time.

LocalAsn String 45104

The local AS number.

Hold String 30

The hold time.

IsFake String true

Indicates whether a fake AS number is used.

RouteLimit String 99

Routing limits.

RegionId String cn-shanghai

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

EnableBfd Boolean true

Indicates whether the Bidirectional Forwarding Detection (BFD) protocol is enabled.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeBgpPeers
&RegionId=cn-shanghai
&<Common request parameters>

Sample success responses

XML format

<TotalCount>2</TotalCount>
<PageSize>10</PageSize>
<RequestId>16DFA5E6-9771-41B7-B079-DD7C2DF49BE6</RequestId>
<BgpPeers>
    <BgpPeer>
        <BgpGroupId>bgpg-2zev8h2wo414****</BgpGroupId>
        <LocalAsn>45104</LocalAsn>
        <PeerIpAddress>11.11. **. **</PeerIpAddress>
        <Hold>30</Hold>
        <Description/>
        <AuthKey/>
        <IsFake>true</IsFake>
        <PeerAsn>234</PeerAsn>
        <Keepalive>10</Keepalive>
        <RouteLimit>99</RouteLimit>
        <BgpPeerId>bgp-2ze3un0ft1jd1x***</BgpPeerId>
        <Name/>
        <Status>Available</Status>
        <BgpStatus/>
        <RouterId>vbr-2zecmmvg5gvu8i4te****w</RouterId>
        <RegionId>cn-beijing</RegionId>
    </BgpPeer>
    <BgpPeer>
        <BgpGroupId>bgpg-2zev8h2wo414sf****</BgpGroupId>
        <LocalAsn>45104</LocalAsn>
        <PeerIpAddress>11.11. **. **</PeerIpAddress>
        <Hold>30</Hold>
        <Description/>
        <AuthKey/>
        <IsFake>true</IsFake>
        <PeerAsn>234</PeerAsn>
        <Keepalive>10</Keepalive>
        <RouteLimit>99</RouteLimit>
        <BgpPeerId>bgp-2zeu54rbreqqzy*****</BgpPeerId>
        <Name/>
        <Status>Available</Status>
        <BgpStatus/>
        <RouterId>vbr-2zecmmvg5gvu8i*****</RouterId>
        <RegionId>cn-beijing</RegionId>
    </BgpPeer>
</BgpPeers>

JSON format

{
    "TotalCount": 2, 
    "PageSize": 10, 
    "RequestId": "16DFA5E6-9771-41B7-B079-DD7C2DF49BE6", 
    "BgpPeers": {
        "BgpPeer": [
            {
                "BgpGroupId": "bgpg-2zev8h2wo414****", 
                "LocalAsn": 45104, 
                "PeerIpAddress": "11.11. **. **", 
                "Hold": 30, 
                "Description": "", 
                "AuthKey": "", 
                "IsFake": true, 
                "PeerAsn": 234, 
                "Keepalive": 10, 
                "RouteLimit": 99, 
                "BgpPeerId": "bgp-2ze3un0ft1jd1x***", 
                "Name": "", 
                "Status": "Available", 
                "BgpStatus": "", 
                "RouterId": "vbr-2zecmmvg5gvu8i4te****w", 
                "RegionId": "cn-beijing"
            }, 
            {
                "BgpGroupId": "bgpg-2zev8h2wo414sf****", 
                "LocalAsn": 45104, 
                "PeerIpAddress": "11.11. **. **", 
                "Hold": 30, 
                "Description": "", 
                "AuthKey": "", 
                "IsFake": true, 
                "PeerAsn": 234, 
                "Keepalive": 10, 
                "RouteLimit": 99, 
                "BgpPeerId": "bgp-2zeu54rbreqqzy*****", 
                "Name": "", 
                "Status": "Available", 
                "BgpStatus": "", 
                "RouterId": "vbr-2zecmmvg5gvu8i*****", 
                "RegionId": "cn-beijing"
            }
        ]
    }
}

Error codes

HttpCode Error code Error message Description
500 InternalError The request processing has failed due to some unknown error. The error message returned because unknown errors have occurred.
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The error message returned because the specified region ID is invalid. Check whether the service is available in the specified region.

For a list of error codes, visit the API Error Center.