Creates a Virtual Border Router (VBR).

If you create a VBR for your account, the VBR is in the Enabled state after being created. Next, if you create a VBR for another account, the VBR is in the Unconfirmed state after being created and confirmation by the account is required.

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 CreateVirtualBorderRouter

The name of this action. Value: 

CreateVirtualBorderRouter

PhysicalConnectionId String Yes pc-xxxxxxxxx

The ID of the physical connection.

RegionId String Yes cn-shanghai

The ID of the region to which the physical connection belongs.

To query the region ID, call DescribeRegions.

VlanId String Yes 10

The VLAN ID of the VBR. Value range: 1 to 2999.

Note Only the owner of the physical connection can specify this parameter. The VLAN IDs of two VBRs of the same physical connection must be different.
CircuitCode String No longtel001

The circuit code provided by the service provider for the physical connection.

Note Only the owner of the physical connection can specify this parameter.
ClientToken  String No 02fb3da4-130e-11e9-8e44-0016e04115b

A client token used to guarantee the idempotence of requests.

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

Description  String No The description of the VBR

The description of the VBR.

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

LocalGatewayIp  String No 116.62.222.28

The Alibaba Cloud-side IP address of the VBR.

Name  String No test

The name of the VBR.

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

PeerGatewayIp  String No 116.62.222.28

The client-side IP address of the VBR. Only the VBR owner can specify or modify this parameter. The client-side IP address of the VBR is required when you create a VBR for the physical connection owner, and it cannot be specified when you create a VBR for another account.

PeeringSubnetMask String No 255.255.255.252

The subnet mask for the Alibaba Cloud-side IP address and the client-side IP address.

The two IP addresses must be in the same subnet.

VbrOwnerId  String No 10

The account ID of the VBR owner.

The default value is account ID of the current user, namely the owner of the physical connection.

Response parameters

Parameter Type Example value Description
VbrId String vbr-bp1jcg5cmxjbl9xgc58bw The ID of the VBR.
RequestId String 4EC47282-1B74-4534-BD0E-403F3EE64CAF The ID of the request.

Examples

Request example


http(s)://vpc.aliyuncs.com/?Action=CreateVirtualBorderRouter
&PhysicalConnectionId=pc-xxxxxxxxx
&RegionId=cn-shanghai
&VlanId=10
&<CommonParameters>
Response example
  • XML format

    <CreateRouterInterfaceResponse>
      <RequestId>980960B0-2969-40BF-8542-EBB34FD358AB</RequestId>
      <VbrId>vbr-2zecmmvg5gvu8i4telkhw</VbrId>
    </CreateRouterInterfaceResponse>
    
  • JSON format

    {
    	"CreateRouterInterfaceResponse":{
    		"RequestId":"980960B0-2969-40BF-8542-EBB34FD358AB",
    		"VbrId":"vbr-2zecmmvg5gvu8i4telkhw"
    	}
    }

Error codes

HTTP status code Error code Error message Description
404 InvalidRegionId.NotFound The specified RegionId is not found. The specified region ID does not exist.
400 InvalidPhysicalConnectionId.NotFound The specified PhysicalConnectionId is not found. The physical connection ID does not exist.
400 InvalidVlanId.Used The specified VlanId has been used. The specified VLAN is already occupied.
400 MissingParameter The input parameter 'PhysicalConnectionId' that is mandatory for processing this request is not supplied. The PhysicalConnectionId parameter must be specified.
400 InvalidPhysicalConnectionId.NotEnabled The specified PhysicalConnectionId is not in Enabled state. The physical connection is not in the Enabled status.
404 InvalidVbrOwnerId.NotFound The specified VbrOwnerId is not valid. The value of the VbrOwnerId parameter is invalid.
400 InvalidVlanId.Malformed The specified VlanId is not valid. The value of the VbrOwnerId parameter is invalid.
400 InvalidCircuitCode.Malformed The specified CircuitCode is not valid. The specified CircuitCode is invalid.
400 MissingParameter The input parameter 'LocalGatewayIp' that is mandatory for processing this request is not supplied. The LocalGatewayIp parameter is required.
400 InvalidLocalGatewayIp.Malformed The specified LocalGatewayIp is not valid. The specified local gateway IP address is invalid.
400 MissingParameter The input parameter 'PeerGatewayIp' that is mandatory for processing this request is not supplied. The PeerGatewayIp parameter is required.
400 MissingParameter The input parameter 'PeeringSubnetMask' that is mandatory for processing this request is not supplied. The PeeringSubnetMask parameter must be specified.
400 InvalidPeeringSubnetMask.Malformed The specified PeeringSubnetMask is not valid. The specified PeeringSubnetMask parameter is invalid.
403 Forbidden.LocalGatewayIpNotAllowedByCaller The caller is not allowed to specify the LocalGatewayIp parameter. You are not allowed to specify the LocalGatewayIp parameter.
403 Forbidden.PeeringSubnetMaskNotAllowedByCaller The caller is not allowed to specify the PeeringSubnetMask parameter. You are not allowed to specify the PeeringSubnetMask parameter.
403 Forbidden.DescriptionNotAllowedByCaller The caller is not allowed to specify the Description parameter. You are not allowed to specify the Description parameter.
400 InvalidName.Malformed The specified ?Name? is not valid. The name format is invalid.
400 InvalidDescription.Malformed The specifid ?Description? is not valid. The description format is invalid. The description must be 2 to 256 characters in length. It cannot start with http:// and https://.
400 QuotaExceeded.vbrPerpConn Virtual boarder router per PhysicalConnection quota exceed. The VBR quota for the physical connection is exceeded.
400 InvalidIp.NotSameSubnet Local gateway ip and peer gateway ip are not in the same subnet. The local gateway IP address and the peer gateway IP address are not in the same subnet.
404 CROSS_BID.FORBIDDEN Create VBR across bid is illegal You cannot create a VBR for a user of another site.

See common error codes