Creates a BGP group.

You can use BGP to establish the communication between the Virtual Border Router (VBR) and the on-premises IDC.  To use BGP, add the BGP peer communicating with the VBR to the corresponding BGP group and advertise the BGP network in the VBR.

A BGP group is used for simplifying BGP configurations. You can combine repetitive configurations into a BGP group to reduce the configuration complexity.  Each BGP group is associated with an autonomous system number (ASN).

Note the following before you call this action:

  • The supported BGP version is 4 (BGP4).

  • IPv4 BGP is supported, but IPv6 BGP is not supported.

Debug

By using API Explorer, you can easily debug APIs, automatically generate SDK code examples, and quickly search for APIs.

Request parameters

Parameter Type Required? Example value Description
Action String Yes CreateBgpGroup

The name of this action. Value:

CreateBgpGroup

PeerASN String Yes 1111

The ASN of the BGP peer.

RegionId String Yes cn-shanghai

The region to which the BGP group belongs.

To query the region ID, call DescribeRegions.

RouterId String No vrt-bp1lhl0taikrteen80oxx

The ID of the VBR.

Authkey String No !PWZ2wsq

The authentication key of the BGP group.

ClientToken String No 02fb3da4-130e-11e9-8e44-0016e04115b

The client token that guarantees the idempotence of the request.

This parameter value is generated by the client and must be unique. It must be 1 to 64 ASCII characters in length.

Description String No BGP

The description of the BGP group.

The description must be 2 to 256 characters in length. It must start with a letter, but cannot start with http:// or https://.

IsFakeAsn Boolean No true

Indicates whether the ASN is the correct ASN.

A router running BGP can only belong to one AS in general. However, in such cases as where an AS needs to be migrated or merged with other ASs, a new ASN must be used.

Name String No test

The name of the BGP group.

The name must be 2 to 128 characters in length and can contain letters, numbers, periods (.), underscores (_), and hyphens (-). The name must start with a letter. It cannot start with http:// or https://.

Response parameters

Parameter Type Example value Description
BgpGroupId String bgpg-2zendnzngq9lkjkhvlrsr The ID of the BGP group.
RequestId String C1221A1F-2ACD-4592-8F27-474E02883159 The ID of the request.

Examples

Request example


https://vpc.aliyuncs.com/?Action=CreateBgpGroup
&PeerAsn=1111
&RegionId=cn-shanghai
&RouterId=vrt-bp1lhl0taikrteen80oxx
&<CommonParameters>
Response example
  • XML format

    <CreateBgpGroupResponse>
      <BgpGroupId>bgpg-2zendnzngq9lkjkhvlrsr</BgpGroupId>
      <RequestId>C1221A1F-2ACD-4592-8F27-474E02883159</RequestId>
    </CreateBgpGroupResponse>
    
  • JSON format

    {
    	"BgpGroupId":"bgpg-2zendnzngq9lkjkhvlrsr",
    	"RequestId":"C1221A1F-2ACD-4592-8F27-474E02883159"
    }

Error codes

HTTP status code Error code Error message Description
400 QuotaExceeded.Bgp bgp peer count per vbr quota exceed. The BGP group quota of the VBR has been reached.
400 QuotaExceeded.Nqa nqa count per vbr quota exceed. The NQA quota of the VBR has been reached.
400 QuotaExceeded.BgpNetwork bgp network count per vbr quota exceed. The BGP network quota of the VBR has been reached.
400 InvalidPeerIpAddress multi pconn peer ip can not be null. The peer IP address of multiple physical connections cannot be null.
400 InvalidVbrNetwork vbr netowrk not exists The specified VBR does not exist.
400 InvalidBgpName.Malformed Specified Bgp Group name is not valid. The name of the BGP group is invalid.
400 InvalidBgpDescription.Malformed Specified Bgp Group description is not valid. The description of the BGP group is invalid.
400 InvalidBgpAuthkey.Malformed Specified Bgp Group authkey is not valid. The authentication key of the BGP group is invalid.
404 InvalidRegionId.NotFound The specified RegionId is not found. The specified region ID does not exist.
400 InvalidIP.Malformed Ip malformed. The IP address format is invalid.
400 InvalidPeerAsn.Malformed invalid peer asn cannot equals aliyun asn:45104 The specified ASN cannot be the same as the Alibaba Cloud ASN.
400 InvalidParams.NotNull invalid peer asn cannot equals aliyun asn:45104 The specified ASN cannot be the same as the Alibaba Cloud ASN.
400 InvalidParams.NotFound vpc instance not found The specified VPC does not exist.
400 InvalidParams.AlreadyExists bgp network already exists The specified BGP network already exists.
400 InvalidStatus.CannotOperate invalid status cannot operate You cannot perform this operation because the status of the resource does not permit this action.

See common error codes