Queries 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. 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.

RouterId String No vbr-2zecmmvg5gvu8i4te****

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

BgpPeerId String No bgp-2ze3un0ft1jd1xd****

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

BgpGroupId String No bgpg-2zev8h2wo414sfh****

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

RegionId String Yes cn-shanghai

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 query the most recent region list.

IsDefault Boolean No false

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

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

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

PageSize Integer No 10

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

Response parameters

Parameter Type Example Description
PageSize Integer 10

The number of entries returned on each page.

RequestId String DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6

The ID of the request.

PageNumber Integer 1

The page number of the returned page.

TotalCount Integer 10

The number of entries returned.

BgpPeers Array of BgpPeer

The detailed information about the BGP peers.

BgpPeer
Status String Available

The status of the BGP peer. Valid values:

  • Pending: pending
  • Available: available
  • Modifying: being modified
  • Deleting: being deleted
  • Deleted: deleted
PeerIpAddress String 116.62.XX.XX

The IP address of the BGP peer.

RouterId String vbr-2zecmmvg5gvu8i4te****

The ID of the vRouter.

BgpGroupId String bgpg-2zev8h2wo414sfh****

The ID of the BGP group.

BgpStatus String Connect

The status of the BGP connection. Valid values:

  • creating: being created
  • Connect: being used
  • modifying: being modified
  • deleting: being deleted
  • deleted: deleted
BfdMultiHop Integer 3

The BFD hop count.

PeerAsn String 65515

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

LocalAsn String 45104

The AS number of the device on the Alibaba Cloud side.

RegionId String cn-shanghai

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

BgpPeerId String bgp-2ze3un0ft1jd1xd****

The ID of the BGP peer.

EnableBfd Boolean true

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

Hold String 30

The hold time.

IpVersion String ipv4

The IP version.

Keepalive String 10

The keepalive time.

Description String test

The description of the BGP group.

RouteLimit String 99

The limit on routes.

IsFake String true

Indicates whether a fake AS number is used.

AuthKey String !PWZ****

The authentication key of the BGP group.

Name String test

The name of the BGP peer.

Examples

Sample requests

http(s)://[Endpoint]/?Action=DescribeBgpPeers
&RouterId=vbr-2zecmmvg5gvu8i4te****
&BgpPeerId=bgp-2ze3un0ft1jd1xd****
&BgpGroupId=bgpg-2zev8h2wo414sfh****
&RegionId=cn-shanghai
&IsDefault=false
&PageNumber=1
&PageSize=10
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<DescribeBgpPeersResponse>
    <PageSize>10</PageSize>
    <RequestId>DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6</RequestId>
    <PageNumber>1</PageNumber>
    <TotalCount>10</TotalCount>
    <BgpPeers>
        <Status>Available</Status>
        <PeerIpAddress>116.62.XX.XX</PeerIpAddress>
        <RouterId>vbr-2zecmmvg5gvu8i4te****</RouterId>
        <BgpGroupId>bgpg-2zev8h2wo414sfh****</BgpGroupId>
        <BgpStatus>Connect</BgpStatus>
        <BfdMultiHop>3</BfdMultiHop>
        <PeerAsn>65515</PeerAsn>
        <LocalAsn>45104</LocalAsn>
        <RegionId>cn-shanghai</RegionId>
        <BgpPeerId>bgp-2ze3un0ft1jd1xd****</BgpPeerId>
        <EnableBfd>true</EnableBfd>
        <Hold>30</Hold>
        <IpVersion>ipv4</IpVersion>
        <Keepalive>10</Keepalive>
        <Description>test</Description>
        <RouteLimit>99</RouteLimit>
        <IsFake>true</IsFake>
        <AuthKey>!PWZ****</AuthKey>
        <Name>test</Name>
    </BgpPeers>
</DescribeBgpPeersResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "PageSize" : 10,
  "RequestId" : "DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6",
  "PageNumber" : 1,
  "TotalCount" : 10,
  "BgpPeers" : [ {
    "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" : "99",
    "IsFake" : "true",
    "AuthKey" : "!PWZ****",
    "Name" : "test"
  } ]
}

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 an unknown error occurred.
404 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The error message returned because the specified region ID does not exist.

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