Queries advertised Border Gateway Protocol (BGP) networks.

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 DescribeBgpNetworks

The operation that you want to perform.

Set the value to DescribeBgpNetworks.

RegionId String Yes cn-hangzhou

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

You can call the DescribeRegions operation to query region IDs.

RouterId String No vrt-2zeazning6tb********

The ID of the router to which the route table belongs.

PageNumber Integer No 2

The 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
RequestId String 6F513A15-669F-419D-B511-08A85292059B

The ID of the request.

TotalCount Integer 2

The total number of advertised BGP networks.

PageNumber Integer 2

The number of the returned page.

PageSize Integer 12

The number of entries returned per page.

BgpNetworks Array

BGP networks.

VpcId String vpc-bp1qpo0kug3a********

The ID of the virtual private cloud (VPC).

DstCidrBlock String 10.1.**. **/24

Advertised BGP networks.

RouterId String vrt-bp1el837xkkak********

The ID of the vRouter.

Status String Enabled

The state of the advertised BGP network.

Examples

Sample requests

http(s)://[Endpoint]/? Action=DescribeBgpNetworks
&RegionId=cn-hangzhou
&RouterId=vrt-2zeazning6tb********
&<Common request parameters>

Sample success responses

XML format

<DescribeBgpNetworksResponse>
      <BgpNetworks>
            <BgpNetwork>
                  <DstCidrBlock>192.168. **. **/24</DstCidrBlock>
                  <VpcId></VpcId>
            </BgpNetwork>
      </BgpNetworks>
      <RequestId>6F513A15-669F-419D-B511-08A85292059B</RequestId>
      <PageSize>10</PageSize>
      <TotalCount>1</TotalCount>
</DescribeBgpNetworksResponse>

JSON format

{
  "BgpNetworks": {
    "BgpNetwork": [
      {
        "DstCidrBlock": "192.168. **. **/24",
        "VpcId": ""
      }
    ]
  },
  "RequestId": "6F513A15-669F-419D-B511-08A85292059B",
  "PageSize": 10,
  "TotalCount": 1
}

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 does not exist. Check whether the service is available in the region.

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