调用DescribeBgpPeers接口查询指定地域下的BGP邻居。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
请求参数
| 名称 | 类型 | 是否必选 | 示例值 | 描述 |
|---|---|---|---|---|
| Action | String | 是 | DescribeBgpPeers |
系统规定参数。取值:DescribeBgpPeers。 |
| RouterId | String | 否 | vbr-2zecmmvg5gvu8i4te**** |
要查询的BGP邻居关联的VBR ID。 |
| BgpPeerId | String | 否 | bgp-2ze3un0ft1jd1xd**** |
要查询的BGP邻居的ID。 |
| BgpGroupId | String | 否 | bgpg-2zev8h2wo414sfh**** |
要查询的BGP邻居所在BGP组的ID。 |
| RegionId | String | 是 | cn-shanghai |
要查询的BGP邻居所在BGP组的地域ID。 您可以通过调用DescribeRegions接口获取地域ID。 |
| IsDefault | Boolean | 否 | false |
是否是默认BGP组。取值:
|
| PageNumber | Integer | 否 | 1 |
列表的页码。默认值:1。 |
| PageSize | Integer | 否 | 10 |
分页查询时每页的行数。最大值:50。默认值:10。 |
返回数据
| 名称 | 类型 | 示例值 | 描述 |
|---|---|---|---|
| PageSize | Integer | 10 |
分页查询时每页的行数。 |
| RequestId | String | DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6 |
请求ID。 |
| PageNumber | Integer | 1 |
列表的页码。 |
| TotalCount | Integer | 10 |
列表条目数。 |
| BgpPeers | Array of BgpPeer |
查询的BGP邻居的详细信息。 |
|
| BgpPeer | |||
| Status | String | Available |
BGP邻居的状态。取值:
|
| PeerIpAddress | String | 116.62.XX.XX |
BGP邻居的IP地址。 |
| RouterId | String | vbr-2zecmmvg5gvu8i4te**** |
路由器的ID。 |
| BgpGroupId | String | bgpg-2zev8h2wo414sfh**** |
BGP组的ID。 |
| BgpStatus | String | Connect |
BGP的连接状态。取值:
|
| BfdMultiHop | Integer | 3 |
BFD跳数。 |
| PeerAsn | String | 65515 |
BGP邻居的AS号。 |
| LocalAsn | String | 45104 |
阿里云侧设备AS号。 |
| RegionId | String | cn-shanghai |
BGP组所属的地域ID。 |
| BgpPeerId | String | bgp-2ze3un0ft1jd1xd**** |
BGP邻居的ID。 |
| EnableBfd | Boolean | true |
是否开启BFD协议。取值:
|
| Hold | String | 30 |
保持时间。 |
| IpVersion | String | ipv4 |
IP版本。 |
| Keepalive | String | 10 |
保活时间。 |
| Description | String | test |
BGP组的描述信息。 |
| RouteLimit | String | 110 |
路由限制。 |
| IsFake | Boolean | true |
是否启用Fake AS号。取值:
|
| AuthKey | String | !PWZ**** |
BGP组的认证密钥。 |
| Name | String | test |
BGP邻居的名称。 |
| AdvertisedRouteCount | Integer | 0 |
宣告的路由数。 |
| ReceivedRouteCount | Integer | 0 |
接收的路由数。 |
| GmtModified | String | 2022-05-20T07:29:08Z |
BGP邻居的修改时间。 |
示例
请求示例
http(s)://[Endpoint]/?Action=DescribeBgpPeers
&RouterId=vbr-2zecmmvg5gvu8i4te****
&BgpPeerId=bgp-2ze3un0ft1jd1xd****
&BgpGroupId=bgpg-2zev8h2wo414sfh****
&RegionId=cn-shanghai
&IsDefault=false
&PageNumber=1
&PageSize=10
&公共请求参数
正常返回示例
XML格式
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>110</RouteLimit>
<IsFake>true</IsFake>
<AuthKey>!PWZ****</AuthKey>
<Name>test</Name>
<AdvertisedRouteCount>0</AdvertisedRouteCount>
<ReceivedRouteCount>0</ReceivedRouteCount>
<GmtModified>2022-05-20T07:29:08Z</GmtModified>
</BgpPeers>
</DescribeBgpPeersResponse>
JSON格式
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" : "110",
"IsFake" : "true",
"AuthKey" : "!PWZ****",
"Name" : "test",
"AdvertisedRouteCount" : 0,
"ReceivedRouteCount" : 0,
"GmtModified" : "2022-05-20T07:29:08Z"
} ]
}
错误码
| HttpCode | 错误码 | 错误信息 | 描述 |
|---|---|---|---|
| 404 | InvalidRegionId.NotFound | The specified RegionId does not exist in our records. | 指定的RegionId不存在。 |
| 500 | InternalError | The request processing has failed due to some unknown error. | 请求处理由于某些未知错误失败。 |
访问错误中心查看更多错误码。