Creates a router interface.
Usage notes
When you call this operation, take note of the following limits:
- You can create only one pair of interfaces to be connected between two routers.
- You can create a maximum of five router interfaces for a router.
- If your Alibaba Cloud account has a router interface with overdue payments, you cannot create new router interfaces.
- Each destination CIDR block of route entries in the same route table must be unique.
- A virtual border router (VBR) can serve only as a requester. The VBR must be in the Activated state.
- You can call this operation to create subscription and pay-as-you-go router interfaces.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
RegionId | String | Yes | cn-hangzhou |
The ID of the region to which the router interface belongs. You can call the DescribeRegions operation to query the most recent region list. |
Role | String | Yes | InitiatingSide |
The role of the router interface. Valid values:
|
OppositeRegionId | String | Yes | cn-shanghai |
The ID of the region where the acceptor is deployed. |
Spec | String | Yes | Mini.2 |
The specification of the router interface. Valid specifications and bandwidth values:
Note If Role is set to AcceptingSide (acceptor), set Spec to Negative. You do not need to specify specifications when you create an acceptor router interface.
|
RouterType | String | Yes | VRouter |
The type of router associated with the router interface. Valid values:
|
RouterId | String | Yes | vbr-m5ebm6g9ptc9mly1c**** |
The ID of the router that is associated with the router interface. |
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 | 253460731706911258 |
The ID of the Alibaba Cloud 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. The source IP address must be an idle IP address of the local virtual private cloud (VPC). Note You can set this parameter if an Express Connect circuit is used.
|
HealthCheckTargetIp | String | No | 192.168.0.8 |
The destination IP address that is used to perform health checks. Note This parameter is required if the HealthCheckSourceIp parameter is set.
|
AccessPointId | String | No | ap-cn-hangzhou-yh-ts-A |
The ID of the access point to which the VBR belongs. You can call the DescribeAccessPoints operation to query the most recent access point list. Note This parameter is required if an Express Connect circuit is used.
|
OppositeAccessPointId | String | No | ap-cn-shanghai-nt-aligroup-C |
The ID of the access point to which the peer belongs. Note This parameter is required if the peer router interface is associated with a VBR.
The specified 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. The description must start
with a letter but 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 letters, digits, periods (.), underscores (_), and hyphens (-). The name must start with a letter. |
Period | Integer | No | 3 |
The subscription duration. Valid values:
Note This parameter is required if 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 if InstanceChargeType is set to PrePaid.
|
PricingCycle | String | No | Month |
The billing cycle of the subscription. Valid values:
Note This parameter is required if InstanceChargeType is set to PrePaid.
|
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. Note If you do not set this parameter, ClientToken is set to the value of RequestId. The
value of RequestId for each API request may be different.
|
Action | String | Yes | CreateRouterInterface |
The operation that you want to perform. Set the value to CreateRouterInterface. |
FastLinkMode | Boolean | No | false |
Indicates whether the VBR that is created in the Fast Link mode is uplinked to the router interface. The Fast Link mode helps automatically connect router interfaces that are created for the VBR and its peer VPC. Valid values:
Note
|
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
RequestId | String | 079874CD-AEC1-43E6-AC03-ADD96B6E4907 |
The ID of the request. |
OrderId | Long | 202008594930117 |
The order number. This parameter is returned if InstanceChargeType is set to PrePaid. |
RouterInterfaceId | String | ri-2ze7fbuohm**** |
The ID of the router interface. |
Examples
Sample requests
http(s)://[Endpoint]/?RegionId=cn-hangzhou
&Role=InitiatingSide
&OppositeRegionId=cn-shanghai
&Spec=Mini.2
&RouterType=VRouter
&RouterId=vbr-m5ebm6g9ptc9mly1c****
&OppositeInterfaceId=ri-2zeo3xzyf38r4urzd****
&OppositeRouterId=vrt-bp1lhl0taikrteen8****
&OppositeRouterType=VRouter
&OppositeInterfaceOwnerId=253460731706911258
&HealthCheckSourceIp=192.168.0.6
&HealthCheckTargetIp=192.168.0.8
&AccessPointId=ap-cn-hangzhou-yh-ts-A
&OppositeAccessPointId=ap-cn-shanghai-nt-aligroup-C
&Description=abcabc
&Name=abc
&Period=3
&InstanceChargeType=PrePaid
&AutoPay=false
&PricingCycle=Month
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&Action=CreateRouterInterface
&FastLinkMode=false
&Common request parameters
Sample success responses
XML
format
HTTP/1.1 200 OK
Content-Type:application/xml
<CreateRouterInterfaceResponse>
<RequestId>079874CD-AEC1-43E6-AC03-ADD96B6E4907</RequestId>
<OrderId>202008594930117</OrderId>
<RouterInterfaceId>ri-2ze7fbuohm****</RouterInterfaceId>
</CreateRouterInterfaceResponse>
JSON
format
HTTP/1.1 200 OK
Content-Type:application/json
{
"RequestId" : "079874CD-AEC1-43E6-AC03-ADD96B6E4907",
"OrderId" : 202008594930117,
"RouterInterfaceId" : "ri-2ze7fbuohm****"
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | InvalidPrice.NotFound | Pricing plan result not found. | The error message returned because the Price parameter is set to an invalid value. |
400 | InvalidAliuid | Invalid Aliuid. | The error message returned because the Aliuid parameter is set to an invalid value. |
400 | InvalidBandwidth.NotEnough | bandwdith not enough. | The error message returned because the bandwidth of the bandwidth plan is insufficient. |
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. |
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 and 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 if 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 | InvalidParam.NotFound | Parameter must not be null,uid, bid,regionNo, remoteRegionNo, routerId or accessPointId | The error message returned because the parameter value cannot be null. |
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 | IncorrectStatus.CenStatus | Cen status must not be middle status. | The error message returned because the Cloud Enterprise Network (CEN) instance status is invalid. Check the status of the CEN instance. |
400 | ForbiddenAction | The user does not supported this action. | The error message returned because you do not have the required permissions. |
400 | Forbidden.AcceptRoleNotSupportPrePay | Acception side ri not support chargetype for prepaid. | The error message returned because the subscription billing method is not supported. |
400 | InvalidRouterInterfaceSpec.Malformed | Specified RouterInterface spec is not valid. | The error message returned because the RouterInterface Spec parameter is set to an invalid value. |
400 | VpcSubnet.NotFound | Vpc subnet not exist. | The error message returned because the VPC subnet does not exist. |
400 | IllegalParam.HealthcheckIp | Healthcheck ip cannot equal with instance ip. | The error message returned because the IP address configured for health checks cannot be the same as the IP address of the instance. |
400 | OperationFailed.HcForInvalidRiType | Healthchecksourceip and healthchecktargetip is only valid for vr ri that is connected to vbr. | The error message returned because the IP address configured for health checks is invalid. |
400 | OperationFailed.SyncOrderToSub | SyncOrderToSub error. | The error message returned because the operation failed. |
400 | IllegalParam.CrossBorderBandwidth | CrossBorder bandwidth error. | The error message returned because the inter-region bandwidth plan is invalid. |
400 | IllegalParam.VRouterType | The VRouterType is not supported. | The error message returned because the VRouterType parameter is set to an invalid value. |
400 | IllegalParam.Spec | The spec is illegal. | The error message returned because the Spec parameter is set to an invalid value. |
400 | Forbidden.CrossBorder | User not authorized to create cross border routerInterface. | The error message returned because you do not have the permissions to create a cross-border router interface. |
400 | InvalidRouterId.NotFound | Param is not valid,this user does not have this router or aliuid bid regionNo and routerId must have something wrong. | The error message returned because the RouterId parameter is set to an invalid value. |
400 | InvalidCommodity.NotFound | Commodity is not exist. | The error message returned because the Commodity parameter is set to an invalid value. |
400 | InvalidRouterInterfaceChargeType.Malformed | Specified RouterInterface ChargeType is not valid. | The error message returned because the RouterInterface ChargeType parameter is set to an invalid value. |
400 | IllegalParam.RegionId | The specified regionId is illegal. | The error message returned because the specified RegionId parameter is invalid. |
400 | QuotaExceeded | RiPerUser quota exceeded | The error message returned because the quota is exceeded. |
400 | OperationFailed.PconnTrafficNotEnable | The operation is failed because of PconnTrafficNotEnable. | The error message returned because outbound data transfer billing is disabled. |
400 | InvalidRegionId.NotFound | The regionId provided does not exist in ec region list. | The error message returned because the region ID is invalid. |
404 | InvalidRegionId.NotFound | The regionId provided does not exist in our records. | The error message returned because the specified region ID (RegionId) does not exist. Check whether the region ID is valid. |
404 | InvalidRouterId.NotFound | The specified RouterId does not exist in our recored. | The error message returned because the specified router ID does not exist. |
404 | InvalidRegionId.NotFound | The parameter wrong, pageNum or pageSize. | The error message returned because one or more parameters are invalid. |
404 | InvalidRouterId.AttacedToCEN | Can not create ri when attaced to CEN. | The error message returned because you cannot attach the router interface to the CEN instance. |
For a list of error codes, see Service error codes.