All Products
Search
Document Center

:CreateRouterInterface

最終更新日:Aug 08, 2023

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

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-hangzhou

The region ID of the router interface.

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:

  • InitiatingSide
  • AcceptingSide: acceptor
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:

  • Mini.2: 2 Mbit/s
  • Mini.5: 5 Mbit/s
  • Small.1: 10 Mbit/s
  • Small.2: 20 Mbit/s
  • Small.5: 50 Mbit/s
  • Middle.1: 100 Mbit/s
  • Middle.2: 200 Mbit/s
  • Middle.5: 500 Mbit/s
  • Large.1: 1,000 Mbit/s
  • Large.2: 2,000 Mbit/s
  • Large.5: 5,000 Mbit/s
  • Xlarge.1: 10,000 Mbit/s
Note When 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:

  • VRouter
  • VBR
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:

  • VRouter
  • VBR
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 specify 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 when HealthCheckSourceIp is specified.
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 http:// or https://.

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 (-).

Period Integer No 3

The subscription duration. Valid values:

  • Valid values when PricingCycle is set to Month: 1 to 9.
  • Valid values when PricingCycle is set to Year: 1 to 3.
Note This parameter is required when InstanceChargeType is set to PrePaid.
InstanceChargeType String No PrePaid

The billing method of the router interface. Valid values:

  • PrePaid: subscription
  • PostPaid: pay-as-you-go
AutoPay Boolean No false

Specifies whether to enable automatic payment. Valid values:

  • false: disables automatic payment. This is the default value. If you select this option, you must go to the Order Center to complete the payment after an order is generated.
  • true: enables automatic payment. Payments are automatically completed.
Note This parameter is required when InstanceChargeType is set to PrePaid.
PricingCycle String No Month

The billing cycle of the subscription. Valid values:

  • Month (default)
  • Year: annual subscription
Note This parameter is required when 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 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.
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:

  • true
  • false
Note
  • This parameter takes effect only when RouterType is set to VBR and OppositeRouterType is set to VRouter.
  • When FastLinkMode is set to true, Role must be set to InitiatingSide. AccessPointId, OppositeRouterType, OpppsiteRouterId, and OppositeInterfaceOwnerId are required.
AutoRenew Boolean No false

Specifies whether to enable auto renewal. Valid values:

  • false (default)
  • true
ResourceGroupId String No rg-acfmxazb4ph6aiy****

The ID of the resource group.

For more information about resource groups, see What is a resource group?.

Tags.N.Key String No FinanceDept

The key of tag N to add to the resource. You must enter at least one tag key and at most 20 tag keys. The tag key cannot be an empty string.

A tag key can be up to 128 characters in length. It cannot start with aliyun or acs:, and cannot contain http:// or https://.

Tags.N.Value String No FinanceJoshua

The value of tag N to add to the resource. You can specify at most 20 tag values. The tag value can be an empty string.

The tag value can be up to 128 characters in length, and cannot contain http:// or https://. The tag value cannot start with aliyun or acs:.

Response parameters

Parameter Type Example Description
RequestId String 079874CD-AEC1-43E6-AC03-ADD96B6E4907

The request ID.

OrderId Long 20210101123456

The order number. This parameter is returned when 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
&AutoRenew=false
&ResourceGroupId=rg-acfmxazb4ph6aiy****
&Tags=[{"Key":"FinanceDept","Value":"FinanceJoshua"}]
&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>20210101123456</OrderId>
    <RouterInterfaceId>ri-2ze7fbuohm****</RouterInterfaceId>
</CreateRouterInterfaceResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "079874CD-AEC1-43E6-AC03-ADD96B6E4907",
  "OrderId" : 20210101123456,
  "RouterInterfaceId" : "ri-2ze7fbuohm****"
}

Error codes

HttpCode Error code Error message Description
400 InvalidPrice.NotFound Pricing plan result not found. Price is set to an invalid value.
400 InvalidAliuid Invalid Aliuid. Aliuid is set to an invalid value.
400 InvalidBandwidth.NotEnough bandwdith not enough. 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 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 format of the name is invalid.
400 InvalidDescription.Malformed The specifid "Description" is not valid. 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 router interface cannot be created if you have unsettled bills.
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 non-VBR router.
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 IncorrectStatus.CenStatus Cen status must not be middle status. 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. You do not have the required permissions.
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. VRouterType is set to an invalid value.
400 IllegalParam.Spec The spec is illegal. Spec 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. InstanceChargeType is set to an invalid value.
400 IllegalParam.RegionId The specified regionId is illegal. RegionId is set to an invalid value.
400 QuotaExceeded RiPerUser quota exceeded The number of peer router interfaces has reached the upper limit.
400 OperationFailed.PconnTrafficNotEnable The operation is failed because of PconnTrafficNotEnable. Outbound data transfer billing is disabled.
400 InvalidRegionId.NotFound The regionId provided does not exist in ec region list. The region ID is invalid.
400 ResourceNotInResourceGroup The specified resource is not in the specified ResourceGroup. The specified resource does not belong to the resource group.
404 InvalidRegionId.NotFound The regionId provided does not exist in our records. The ID of the specified region does not exist. Check whether the region ID is valid.
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. One or more parameters are invalid.
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, see Service error codes.