Creates a virtual border router (VBR) connection on an Enterprise Edition transit router.
Usage notes
- For more information about the regions and zones that support Enterprise Edition transit routers, see What is CEN?
- You can use the following methods to create a VBR connection on an Enterprise Edition
transit router:
- If an Enterprise Edition transit router is already created in the region where you want to create a VBR connection, set the VbrId and TransitRouterId parameters.
- If no Enterprise Edition transit router is created in the region where you want to create a VBR connection, set the VbrId, CenId, and RegionId parameters. Then, the system automatically creates an Enterprise Edition transit router in the specified region.
- CreateTransitRouterVbrAttachment is an asynchronous operation. After you send a request, the ID of the VBR connection
is returned but the operation is still being performed in the system background. You
can call ListTransitRouterVbrAttachments to query the status of a VBR connection.
- If a VBR is in the Attaching state, the VBR connection is being created. You can query the VBR connection but cannot perform other operations.
- If a VBR connection is in the Attached state, the VBR connection is created.
Debugging
Request parameters
| Parameter | Type | Required | Example | Description |
|---|---|---|---|---|
| Action | String | Yes | CreateTransitRouterVbrAttachment |
The operation that you want to perform. Set the value to CreateTransitRouterVbrAttachment. |
| ClientToken | String | No | 02fb3da4-130e-11e9-8e44-001**** |
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. ClientToken can contain only ASCII characters. Note If you do not set this parameter, ClientToken is set to the value of RequestId. The value of RequestId of each API request may be different.
|
| CenId | String | No | cen-j3jzhw1zpau2km**** |
The ID of the Cloud Enterprise Network (CEN) instance. |
| TransitRouterId | String | No | tr-bp1su1ytdxtataupl**** |
The ID of the Enterprise Edition transit router. |
| RegionId | String | No | cn-hangzhou |
The ID of the region where the VBR is deployed. You can call the DescribeRegions operation to query the most recent region list. |
| TransitRouterAttachmentName | String | No | testname |
The name of the VBR connection. The name must be 2 to 128 characters in length, and can contain letters, digits, underscores (_), and hyphens (-). It must start with a letter. |
| TransitRouterAttachmentDescription | String | No | testdesc |
The description of the VBR connection. The description must be 2 to 256 characters in length. The description must start
with a letter but cannot start with |
| VbrId | String | Yes | vbr-bp1svadp4lq38janc**** |
The ID of the VBR. |
| VbrOwnerId | Long | No | 1250123456123456 |
The ID of the Alibaba Cloud account to which the VBR belongs. The default value is the ID of the current Alibaba Cloud account. Note If you want to connect to a network instance that belongs to another account, this
parameter is required.
|
| AutoPublishRouteEnabled | Boolean | No | false |
Specifies whether to enable the Enterprise Edition transit router to automatically advertise routes to the VBR. Valid values:
|
| DryRun | Boolean | No | false |
Specifies whether to perform a precheck to check information such as the permissions and instance status. Valid values:
|
Response parameters
| Parameter | Type | Example | Description |
|---|---|---|---|
| TransitRouterAttachmentId | String | tr-attach-ia340z7xis7t5s**** |
The ID of the VBR connection. |
| RequestId | String | C087A369-82B9-43EF-91F4-4B63A9C6E6B6 |
The ID of the request. |
Examples
Sample requests
http(s)://[Endpoint]/?Action=CreateTransitRouterVbrAttachment
&ClientToken=02fb3da4-130e-11e9-8e44-001****
&CenId=cen-j3jzhw1zpau2km****
&TransitRouterId=tr-bp1su1ytdxtataupl****
&RegionId=cn-hangzhou
&TransitRouterAttachmentName=testname
&TransitRouterAttachmentDescription=testdesc
&VbrId=vbr-bp1svadp4lq38janc****
&VbrOwnerId=1250123456123456
&AutoPublishRouteEnabled=false
&DryRun=false
&Common request parameters
Sample success responses
XML format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateTransitRouterVbrAttachmentResponse>
<TransitRouterAttachmentId>tr-attach-ia340z7xis7t5s****</TransitRouterAttachmentId>
<RequestId>C087A369-82B9-43EF-91F4-4B63A9C6E6B6</RequestId>
</CreateTransitRouterVbrAttachmentResponse>
JSON format
HTTP/1.1 200 OK
Content-Type:application/json
{
"TransitRouterAttachmentId" : "tr-attach-ia340z7xis7t5s****",
"RequestId" : "C087A369-82B9-43EF-91F4-4B63A9C6E6B6"
}
Error codes
| HttpCode | Error codes | Error message | Description |
|---|---|---|---|
| 400 | NoPermission.AliyunServiceRolePolicyForCEN | You are not authorized to create the service linked role. Role Name: AliyunServiceRolePolicyForCEN. Service Name: cen.aliyuncs.com. Make sure that the user has been granted the ram:CreateServiceLinkedRole permission. | The error message returned because you are not authorized to create the service-linked role AliyunServiceRolePolicyForCEN for the service cen.aliyuncs.com. You must acquire the ram:CreateServiceLinkedRole permission before you can perform the operation. |
| 400 | OperationUnsupported.TransitRouterRegionId | The specified TransitRouterRegion does not support the operation. | The error message returned because the specified region does not support the operation. |
| 400 | InvalidCenId.NotFound | CenId is not found. | The error message returned because the specified CEN instance does not exist. |
| 400 | InvalidTransitRouterId.NotFound | TransitRouterId is not found. | The error message returned because the ID of the transit router is invalid. |
For a list of error codes, visit the API Error Center.