Creates a router interface.
Operation description
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
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
vpc:CreateRouterInterface | create |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
RegionId | string | Yes | The ID of the region to which the router interface belongs. You can call the DescribeRegions operation to obtain the region ID. | cn-hangzhou |
Role | string | Yes | The role of the router interface. Valid values:
| InitiatingSide |
OppositeRegionId | string | Yes | The ID of the region in which the acceptor is deployed. | cn-shanghai |
Spec | string | Yes | The specification of the router interface and the corresponding bandwidth. Valid values:
Note
If Role is set to AcceptingSide, set Spec to Negative. This indicates that you do not need to specify the specification when you create an acceptor router interface.
| Mini.2 |
RouterType | string | Yes | The type of router that is associated with the router interface. Valid values:
| VRouter |
RouterId | string | Yes | The ID of the router that is associated with the router interface. | vbr-m5ebm6g9ptc9mly1c**** |
OppositeInterfaceId | string | No | The ID of the peer router interface. | ri-2zeo3xzyf38r4urzd**** |
OppositeRouterId | string | No | The ID of the peer router. | vrt-bp1lhl0taikrteen8**** |
OppositeRouterType | string | No | The type of router that is associated with the peer router interface. Valid values:
| VRouter |
OppositeInterfaceOwnerId | string | No | The ID of the Alibaba Cloud account to which the peer router interface belongs. | 253460731706911258 |
HealthCheckSourceIp | string | No | 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 when an Express Connect circuit is used.
| 192.168.0.6 |
HealthCheckTargetIp | string | No | The destination IP address that is used to perform health checks. Note
This parameter is required if you specify HealthCheckSourceIp
| 192.168.0.8 |
AccessPointId | string | No | The ID of the access point to which the VBR belongs. You can call the DescribeAccessPoints operation to obtain the IDs of access points. Note
This parameter is required if the VBR is connected to an Express Connect circuit.
| ap-cn-hangzhou-yh-ts-A |
OppositeAccessPointId | string | No | 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.
| ap-cn-shanghai-nt-aligroup-C |
Description | string | No | The description of the router interface. The description must be 2 to 256 characters in length. It must start with a letter but cannot start with | abcabc |
Name | string | No | 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 (-). | abc |
Period | integer | No | The subscription duration. Valid values:
Note
This parameter is required if InstanceChargeType is set to PrePaid.
| 3 |
InstanceChargeType | string | No | The billing method of the router interface. Valid values:
| PrePaid |
AutoPay | boolean | No | Specifies whether to enable automatic payment. Valid values:
Note
This parameter is required if InstanceChargeType is set to PrePaid.
| false |
PricingCycle | string | No | The billing cycle of the subscription. Valid values:
Note
This parameter is required if InstanceChargeType is set to PrePaid.
| Month |
ClientToken | string | No | The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. Note
If you do not specify this parameter, the system automatically uses the request ID as the client token. The request ID may be different for each request.
| 123e4567-e89b-12d3-a456-426655440000 |
FastLinkMode | boolean | No | Specifies 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
| false |
AutoRenew | boolean | No | Specifies whether to enable auto-renewal. Valid values:
| false |
ResourceGroupId | string | No | The ID of the resource group. For more information about resource group, see What is Resource Management? | rg-acfmxazb4ph6aiy**** |
Tags | array<object> | No | The tag to add to the resource. | |
object | No | |||
Key | string | No | The tag key to add to the resource. You must enter at least one tag key. You can specify up to 20 tag keys. The tag key cannot be an empty string. A tag key can be at most 128 characters in length. It cannot start with | FinanceDept |
Value | string | No | The tag value to add to the resource. You can specify up to 20 tag values. The tag value can be an empty string. The tag value can be up to 128 characters in length and cannot start with | FinanceJoshua |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "079874CD-AEC1-43E6-AC03-ADD96B6E4907",
"OrderId": 202008594930117,
"RouterInterfaceId": "ri-2ze7fbuohm****"
}
Error codes
HTTP status code | Error code | Error message | Description |
---|---|---|---|
400 | InvalidPrice.NotFound | Pricing plan result not found. | The Price parameter is set to an invalid value. |
400 | InvalidAliuid | Invalid Aliuid. | The Aliuid parameter is set to an invalid value. |
400 | InvalidRole.ValueNotSupported | The specified Role is not valid. | The specified role is invalid. |
400 | InvalidSpec.ValudNotSupported | The specified Spec is not supported. | The specification does not support this operation. Change the specification and try again. |
400 | InvalidRouterType.ValueNotSupported | The specified RouterType is not valid. | The router type is invalid. |
400 | InvalidName.Malformed | The specified "Name" is not valid. | The name format is invalid. |
400 | Forbidden.BillsOutstanding | You cannot create more RouterInterface because you have bills outstanding. | You cannot create router interfaces. You have overdue payments. |
400 | LimitationExceed.InterfaceNumberOnRouter | Total number of RouterInterfaces on a Router exceeded. | The number of router interfaces reaches the quota. |
400 | Forbidden.NotInRouterInterfaceCreateWhitelist | Not in router interface create whitelist. | 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. | You can create only one router interface at a time. |
400 | InvalidAccessPoint.ValueNotAllowed | The non-vbr router interface cannot have access point configured. | 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. | You cannot configure access points for the router interface of a non-VBR router. |
400 | InvalidParam.NotFound | Parameter must not be null,uid, bid,regionNo, remoteRegionNo, routerId or accessPointId | The parameter value cannot be null. |
400 | InvalidAccessPoint.NotMatch | The accessPoint id is not matched | The specified ID of the access point is invalid. |
400 | InvalidAccessPoint.NotExist | The accessPoint not exit | The access point does not exist. |
400 | InvalidRouterType.ValueNotSupported | The specified RouterType is not valid | The router type is invalid. |
400 | INVAID_VBR_STATUS | VBR status must be active | - |
400 | IncorrectStatus.CenStatus | Cen status must not be middle status. | Check the status of the CEN instance. |
400 | Forbidden.AcceptRoleNotSupportPrePay | Acception side ri not support chargetype for prepaid. | The subscription billing method is not supported. |
400 | InvalidRouterInterfaceSpec.Malformed | Specified RouterInterface spec is not valid. | The RouterInterface Spec parameter is set to an invalid value. |
400 | VpcSubnet.NotFound | Vpc subnet not exist. | The VPC subnet does not exist. |
400 | IllegalParam.HealthcheckIp | Healthcheck ip cannot equal with instance ip. | 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 IP address configured for health checks is invalid. |
400 | OperationFailed.SyncOrderToSub | SyncOrderToSub error. | The operation failed. |
400 | IllegalParam.CrossBorderBandwidth | CrossBorder bandwidth error. | The inter-region bandwidth plan is invalid. |
400 | IllegalParam.VRouterType | The VRouterType is not supported. | The VRouterType parameter is set to an invalid value. |
400 | IllegalParam.Spec | The spec is illegal. | The spec parameter is set to an invalid value. |
400 | Forbidden.CrossBorder | User not authorized to create cross border routerInterface. | 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 RouterId parameter is set to an invalid value. |
400 | InvalidCommodity.NotFound | Commodity is not exist. | The Commodity parameter is set to an invalid value. |
400 | InvalidRouterInterfaceChargeType.Malformed | Specified RouterInterface ChargeType is not valid. | The RouterInterface ChargeType parameter is set to an invalid value. |
400 | IllegalParam.RegionId | The specified regionId is illegal. | The regionId parameter is set to an invalid value. |
400 | PAY.MAYI_WITHHOLDING_AGREEMENT_ILLEGAL | User withhoding argeement is illegal. | - |
400 | QuotaExceeded | RiPerUser quota exceeded | - |
400 | OperationFailed.PconnTrafficNotEnable | The operation is failed because of PconnTrafficNotEnable. | Billing for outbound data transfer is disabled. |
400 | InvalidRegionId.NotFound | The regionId provided does not exist in ec region list. | - |
400 | ResourceNotInResourceGroup | The specified resource is not in the specified ResourceGroup. | The specified resource does not belong to the resource group. |
400 | HaveConnectionBetweenRouters | Have connection between routers | A connection is established between the two routers. |
400 | InvalidDescription.Malformed | The specified "Description" is not valid. | The description can be 2 to 256 characters in length and cannot start with http:// and https. |
400 | InvalidBandwidth.NotEnough | Bandwidth not enough. | The bandwidth plan has insufficient bandwidth. |
400 | ForbiddenAction | The user does not support this action. | You do not have the required permissions. |
404 | InvalidRegionId.NotFound | The regionId provided does not exist in our records. | The RegionId parameter is set to an invalid value. Specify a valid value and try again. |
404 | InvalidRouterId.NotFound | The specified RouterId does not exist in our recored. | The specified router ID does not exist. |
404 | InvalidRegionId.NotFound | The parameter wrong, pageNum or pageSize. | The parameter is set to an invalid value. |
404 | InvalidRouterId.AttacedToCEN | Can not create ri when attaced to CEN. | You cannot attach the router interface to the CEN instance. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-06-28 | The Error code has changed | View Change Details |
2024-05-08 | The Error code has changed | View Change Details |
2024-04-17 | The Error code has changed | View Change Details |
2023-12-22 | The Error code has changed | View Change Details |
2023-12-21 | The Error code has changed | View Change Details |
2023-09-11 | API Description Update. The Error code has changed | View Change Details |
2023-07-20 | The Error code has changed. The request parameters of the API has changed | View Change Details |
2023-05-18 | The Error code has changed. The request parameters of the API has changed | View Change Details |