All Products
Search
Document Center

Elastic Compute Service:CreateRouterInterface

Last Updated:Jun 18, 2026

CreateRouterInterface.

Note

This API has been deprecated. We recommend migrating to Vpc(2016-04-28) - CreateRouterInterface for enhanced functionality and continued support. While the deprecated API remains temporarily accessible, no further updates or bug fixes will be provided.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

vpc:CreateRouterInterface

create

*All Resource

*

  • vpc:TargetAccountRDId
None

Request parameters

Parameter

Type

Required

Description

Example

RegionId

string

Yes

Role

string

Yes

OppositeRegionId

string

Yes

Spec

string

Yes

RouterType

string

Yes

RouterId

string

Yes

OppositeInterfaceId

string

No

OppositeRouterId

string

No

OppositeRouterType

string

No

OppositeInterfaceOwnerId

string

No

HealthCheckSourceIp

string

No

HealthCheckTargetIp

string

No

AccessPointId

string

No

OppositeAccessPointId

string

No

Description

string

No

Name

string

No

Period

integer

No

InstanceChargeType

string

No

AutoPay

boolean

No

PricingCycle

string

No

ClientToken

string

No

ClientToken

string

No

UserCidr

string

No

Response elements

Element

Type

Description

Example

object

RequestId

string

OrderId

integer

RouterInterfaceId

string

Examples

Success response

JSON format

{
  "RequestId": "",
  "OrderId": 0,
  "RouterInterfaceId": ""
}

Error codes

HTTP status code

Error code

Error message

Description

400 InvalidPrice.NotFound Pricing plan result not found.
400 InvalidAliuid Invalid Aliuid.
400 InvalidBandwidth.NotEnough bandwdith not enough.
400 InvalidRole.ValueNotSupported The specified Role is not valid. The specified role is invalid.
400 InvalidSpec.ValudNotSupported The specified Spec is not supported. The specified Spec parameter is invalid.
400 InvalidRouterType.ValueNotSupported The specified RouterType is not valid. The specified router type is invalid.
400 InvalidOppositeRouterType.ValueNotSupported The specified OppositeRouterType is not valid. The specified OppositeRouterType parameter is invalid.
400 ParameterMismatch.Role-Spec The specified Spec and Role mismatch. The specified Spec does not match the Role.
400 InvalidName.Malformed The specified "Name" is not valid.
400 InvalidDescription.Malformed The specifid "Description" is not valid.
400 Forbidden.BillsOutstanding You cannot create more RouterInterface because you have bills outstanding. The router interface cannot be created because you have unpaid orders. Pay for the orders and try again.
400 QuotaExceed.RouterInterface Living RouterInterface quota exceeded. The maximum number of active router interfaces has been reached.
400 LimitationExceed.InterfaceNumberOnRouter Total number of RouterInterfaces on a Router exceeded. The maximum number of router interfaces is exceeded.
400 InvalidParam.NotFound Parameter must not be null,uid, bid,regionNo, remoteRegionNo or routerId
400 InvalidAccessPoint.NotMatch The accessPoint id is not matched The specified access point ID is invalid.
400 InvalidAccessPoint.NotExist The accessPoint not exit
400 ForbiddenAction The user does not supported this action.
400 Forbidden.AcceptRoleNotSupportPrePay Acception side ri not support chargetype for prepaid.
400 IllegalParam.HealthcheckIp Healthcheck ip cannot equal with instance ip.
400 OperationFailed.HcForInvalidRiType Healthchecksourceip and healthchecktargetip is only valid for vr ri that is connected to vbr.
400 OperationFailed.SyncOrderToSub SyncOrderToSub error.
400 IllegalParam.CrossBorderBandwidth CrossBorder bandwidth error.
400 IllegalParam.VRouterType The VRouterType is not supported.
400 IllegalParam.Spec The spec is illegal.
400 Forbidden.CrossBorder User not authorized to create cross border routerInterface.
400 InvalidRouterId.NotFound Param is not valid,this user does not have this router or aliuid bid regionNo and routerId must have something wrong.
400 INVAID_VBR_STATUS VBR status must be active
400 InvalidRouterInterfaceSpec.Malformed Specified RouterInterface spec is not valid.
400 InvalidCommodity.NotFound Commodity is not exist.
400 InvalidRouterInterfaceChargeType.Malformed Specified RouterInterface ChargeType is not valid.
400 IllegalParam.RegionId The specified regionId is illegal.
400 PAY.MAYI_WITHHOLDING_AGREEMENT_ILLEGAL User withhoding argeement is illegal.
500 Forbidden.NotInRouterInterfaceCreateWhitelist Not in router interface create whitelist.
500 RI_CREATE_ONE_LIMIT_BY_SYNC Create ri only one limit by sync.
500 InvalidDescription.Malformed The specifid "Description" is not valid.
500 InvalidName.Malformed The specified "Name" is not valid.
500 InvalidAccessPoint.ValueNotAllowed The non-vbr router interface cannot have access point configured.
404 InvalidRegionId.NotFound The regionId provided does not exist in our records. The RegionId provided does not exist
404 InvalidOppositeRegionId.NotFound The oppositeRegionId provided does not exist in our records.
404 InvalidRouterId.NotFound The specified RouterId does not exist in our recored. The specified RouterId parameter does not exist.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.