Advertises a Border Gateway Protocol (BGP) network.

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 AddBgpNetwork

The operation that you want to perform. Set the value to AddBgpNetwork.

RegionId String Yes cn-shanghai

The region ID of the virtual border router (VBR) group.

You can call the DescribeRegions operation to query the most recent region list.

DstCidrBlock String Yes 10.10.XX.XX/32

The CIDR block of the virtual private cloud (VPC) or vSwitch that you want to connect to a data center.

VpcId String No vpc-bp1qpo0kug3a2*****

The ID of the VPC.

RouterId String Yes vrt-2zeo3xzyf38r4u******

The ID of the router that is associated with the router interface.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters.

Note If you do not specify this parameter, the system automatically uses RequestId as ClientToken. RequestId may be different for each API request.

Response parameters

Parameter Type Example Description
RequestId String 9C7FA9D6-72E0-48A9-A9C3-2DA8569CD5EB

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=AddBgpNetwork
&RegionId=cn-shanghai
&DstCidrBlock=10.10.XX.XX/32
&VpcId=vpc-bp1qpo0kug3a2*****
&RouterId=vrt-2zeo3xzyf38r4u******
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&Common request parameters

Sample success responses

XML format

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

<AddBgpNetworkResponse>
    <RequestId>9C7FA9D6-72E0-48A9-A9C3-2DA8569CD5EB</RequestId>
</AddBgpNetworkResponse>

JSON format

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

{
  "RequestId" : "9C7FA9D6-72E0-48A9-A9C3-2DA8569CD5EB"
}

Error codes

HTTP status code Error code Error message Description
400 QuotaExceeded.Bgp bgp peer count per vbr quota exceed. The error message returned because the number of BGP groups in the VBR has reached the upper limit.
400 QuotaExceeded.Nqa nqa count per vbr quota exceed. The error message returned because the number of Network Quality Analyzers (NQAs) has reached the upper limit that is supported by the VBR.
400 QuotaExceeded.BgpNetwork bgp network count per vbr quota exceed. The error message returned because the number of BGP networks in the VBR has reached the upper limit.
400 InvalidPeerIpAddress multi pconn peer ip can not be null. The error message returned because the IP addresses of multiple Express Connect circuits cannot be empty.
400 InvalidVbrNetwork vbr netowrk not exists The error message returned because the specified VBR does not exist. Check whether the specified VBR is valid.
400 InvalidBgpGroup bgp group not exists The error message returned because the BGP group does not exist.
400 InvalidBgpName.Malformed Specified Bgp Group name is not valid. The error message returned because the name of the BGP group is invalid.
400 InvalidBgpDiscription.Malformed Specified Bgp Group description is not valid. The error message returned because the description of the BGP group is invalid.
400 InvalidBgpAuthkey.Malformed Specified Bgp Group authkey is not valid. The error message returned because the authentication key of the BGP group is invalid.
400 InvalidIP.Malformed Ip malformed. The error message returned because the format of the IP address is invalid.
400 InvalidPeerAsn.Malformed invalid peer asn cannot equals aliyun asn:45104 The error message returned because the ASN cannot be the same as the ASN on the Alibaba Cloud side.
400 InvalidParams.NotNull parameter must not null. The error message returned because a required parameter is empty.
400 InvalidParams.NotFound instance not found The error message returned because the specified instance does not exist.
400 InvalidParams.NotFound vpc instance not found The error message returned because the specified VPC does not exist. Check whether the specified VPC ID is valid.
400 InvalidParams.AlreadyExists bgp network already exists The error message returned because the BGP network already exists.
400 InvalidStatus.CannotOperate invalid status cannot operate The error message returned because the operation is not supported when the specified resource is in the current state.
400 QuotaExceeded.Bgp bgp group count per vbr quota exceed. The error message returned because the number of BGP groups in the VBR has reached the upper limit.
400 OperationFailed.PconnTrafficNotEnable The operation is failed because of PconnTrafficNotEnable. The error message returned because outbound traffic is not allowed.
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.