Creates a router interface.
Limits
When you call this operation, make sure that the following requirements are met:
- You can create only one pair of interconnected router interfaces between two routers.
- You can create a maximum of five router interfaces for a router.
- If your account owns a router interface that has overdue payments, you cannot create new router interfaces.
- The destination CIDR blocks of routes in the same route table must be unique.
- A virtual border router (VBR) can serve as only the initiator of a peering connection. In addition, the VBR must be in the Active state.
- Router interfaces created by calling the operation are billed on a daily basis. You cannot call the operation to create subscription router interfaces.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | CreateRouterInterface |
The operation that you want to perform. Set the value to CreateRouterInterface. |
OppositeRegionId | String | Yes | cn-shanghai |
The ID of the region where the acceptor of the connection is deployed. |
RegionId | String | Yes | cn-hangzhou |
The ID of the region where you want to create the router interface. You can call the DescribeRegions operation to query region IDs. |
Role | String | Yes | InitiatingSide |
Specifies whether the router interface is used for the initiator or the acceptor. Valid values:
|
RouterId | String | Yes | vrt-12345 |
The ID of the router that is associated with the router interface. |
RouterType | String | Yes | VRouter |
The type of router associated with the router interface. Valid values:
|
Spec | String | Yes | Mini.2 |
The specification of the router interface. The following shows the available specifications and bandwidth limits:
Note If you set Role to AcceptingSide (acceptor), set the value of Spec to Negative.
|
OppositeInterfaceId | String | No | ri-2zeo3xzyf38r4urzd**** |
The ID of the peer router interface. |
OppositeRouterId | String | No | vrt-bp1lhl0taikrteen8**** |
The ID of the peer router. |
OppositeRouterType | String | No | VRouter |
The type of router that is associated with the peer router interface. Valid values:
|
OppositeInterfaceOwnerId | String | No | 2348*** |
The ID of the account to which the peer router interface belongs. |
HealthCheckSourceIp | String | No | 192.168.0.6 |
The source IP address that is used to perform health checks. It must be an idle IP address of the source virtual private cloud (VPC). Note You can set this parameter when the VPC is connected to an Express Connect circuit.
|
HealthCheckTargetIp | String | No | 192.168.0.8 |
The destination IP address that is used to perform health checks. Note This parameter is required when HealthCheckSourceIp is set.
|
AccessPointId | String | No | ap-cn-shanghaiSZ-**** |
The ID of the access point to which the VBR belongs. You can call the DescribeAccessPoints operation to query access point IDs. Note This parameter is required when the VBR is connected to an Express Connect circuit.
|
OppositeAccessPointId | String | No | ap-cn-shanghaiSZ-**** |
The ID of the access point to which the peer belongs. Note This parameter is required when the peer router interface is associated with a VBR.
This value cannot be changed after the router interface is created.
|
Description | String | No | abcabc |
The description of the router interface. The description must be 2 to 256 characters in length. It must start with a letter
and cannot start with |
Name | String | No | abc |
The name of the router interface. The name must be 2 to 128 characters in length and can contain digits, periods (.),
underscores (_), and hyphens (-). It must start with a letter. The name cannot start
with |
Period | Integer | No | 3 |
The subscription duration.
Note This parameter is required when InstanceChargeType is set to PrePaid.
|
InstanceChargeType | String | No | PrePaid |
The billing method of the router interface. Valid values:
|
AutoPay | Boolean | No | false |
Specifies whether to enable automatic payment. Valid values:
Note This parameter is required when InstanceChargeType is set to PrePaid.
|
PricingCycle | String | No | Month |
The billing cycle of the subscription. Valid values:
|
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. Make sure that the value is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. Note If you do not specify this parameter, the system automatically uses the request ID
as the client token. The ID of each request may be unique.
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
OrderId | Long | 202008594930117 |
The order number. This parameter is returned when InstanceChargeType is set to PrePaid. |
RequestId | String | 079874CD-AEC1-43E6-AC03-ADD96B6E4907 |
The ID of the request. |
RouterInterfaceId | String | ri-2ze7fbuohm**** |
The ID of the router interface. |
Examples
Sample requests
http(s)://vpc.aliyuncs.com/?Action=CreateRouterInterface
&OppositeRegionId=cn-shanghai
&RegionId=cn-hangzhou
&Role=InitiatingSide
&RouterId=vrt-12345
&RouterType=VRouter
&Spec=Mini.2
&<Common request parameters>
Sample success responses
XML
format
<CreateRouterInterfaceResponse>
<RequestId>980960B0-2969-40BF-8542-EBB34FD358AB</RequestId>
<RouterInterfaceId>ri-2ze7fbuohm****</RouterInterfaceId>
</CreateRouterInterfaceResponse>
JSON
format
{
"RequestId": "980960B0-2969-40BF-8542-EBB34FD358AB",
"RouterInterfaceId": "ri-2ze7fbuohm****"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
404 | InvalidRegionId.NotFound | The regionId provided does not exist in our records. | The error message returned because the specified region ID does not exist. Check whether the specified region ID is valid. |
400 | InvalidRole.ValueNotSupported | The specified Role is not valid. | The error message returned because Role is set to an invalid value. Check whether the specified value is valid. |
400 | InvalidSpec.ValudNotSupported | The specified Spec is not supported. | The error message returned because the specification does not support this operation. Change the specification and try again. |
400 | InvalidRouterType.ValueNotSupported | The specified RouterType is not valid. | The error message returned because the type of the router is invalid. |
404 | InvalidRouterId.NotFound | The specified RouterId does not exist in our recored. | The error message returned because the specified router ID does not exist. |
400 | InvalidName.Malformed | The specified "Name" is not valid. | The error message returned because the format of the name is invalid. |
400 | InvalidDescription.Malformed | The specifid "Description" is not valid. | The error message returned because the format of the specified description is invalid. The description must be 2 to 256 characters in length. It cannot start with http:// or https://. |
400 | Forbidden.BillsOutstanding | You cannot create more RouterInterface because you have bills outstanding. | The error message returned because the router interface cannot be created when you have unsettled bills. |
400 | LimitationExceed.InterfaceNumberOnRouter | Total number of RouterInterfaces on a Router exceeded. | The error message returned because the number of router interfaces reaches the quota. |
400 | Forbidden.NotInRouterInterfaceCreateWhitelist | Not in router interface create whitelist. | The error message returned because you are not included in the whitelist to create router interfaces. |
400 | RI_CREATE_ONE_LIMIT_BY_SYNC | Create ri only one limit by sync. | The error message returned because you can create only one router interface at a time. |
400 | InvalidAccessPoint.ValueNotAllowed | The non-vbr router interface cannot have access point configured. | The error message returned because you cannot configure access points for the router interface of a vRouter. |
400 | InvalidAccessPoint.ValueNotAllowed | The non-vbr opposite router interface cannot have opposite access point configured. | The error message returned because you cannot configure access points for the router interface of a vRouter. |
400 | InvalidAccessPoint.NotMatch | The accessPoint id is not matched | The error message returned because the specified ID of the access point is invalid. |
400 | InvalidAccessPoint.NotExist | The accessPoint not exit | The error message returned because the access point does not exist. |
400 | InvalidRouterType.ValueNotSupported | The specified RouterType is not valid | The error message returned because the type of the router is invalid. |
400 | ForbiddenAction | The user dose not supported this action. | The error message returned because you are unauthorized to perform this operation. |
For a list of error codes, visit the API Error Center.