All Products
Document Center

Virtual Private Cloud:ConnectRouterInterface

Last Updated:Dec 02, 2023

Initiates a connection from the router interface of an initiator to the router interface of an accepter.

Operation Description

After you call this operation, the router interface enters the Connecting state. When the connection is established, it enters the Active state.

When you call this operation, take note of the following items:

  • Only an initiator router interface in the Idle state can initiate a connection.
  • You can create only one pair of connected router interfaces between two routers.
  • You cannot initiate a connection if your Alibaba Cloud account has a router interface with overdue payments.


You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.


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.
OperationAccess levelResource typeCondition keyAssociated operation
  • RouterInterface

Request parameters


The ID of the region where the router interface is deployed.

You can call the DescribeRegions operation to query the most recent region list.


The ID of the initiator router interface.


Response parameters


The request ID.



Sample success responses


  "RequestId": "DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6"

Error codes

HTTP status codeError codeError messageDescription
400IncorrectRole.NotInitiatingSideThe specified RouterInterface is not InitiatingSide.The specified router interface is not an initiator. Select an initiator router interface.
400IncorrectRIStatusRouterInterface can be operated by this action only when it's status is Idle.You can perform the operation only when the router interface is in the Idle state.
400IncorrectOppositeInterfaceInfo.NotSetOppositeInterfaceId/OppositeRouterId/OppositeRouterType/OppositeInterfaceOwnerId must be all set.You must specify OppositeInterfaceId, OppositeRouterId, OppositeRouterType, and OppositeInterfaceOwnerId.
400IncorrectOppositeInterfaceInfoCannot connect on the same routerYou are not allowed to connect to the same router.
400IncorrectOppositeInterfaceInfoThe opposite RouterInterface information specified by OppositeInterfaceId/OppositeRouterId/OppositeRouterType/OppositeInterfaceOwnerId is wrong. Maybe the RouterInterface or Router does not exist, or the parameters mismatched, or that RouterInterface is not a AcceptingSide.-
400Forbidden.OnlyOneConnectionThe Specified routers have a connection alreadyThe router is already connected to a router interface.
400Forbidden.OnlyOneConnectionCannot connect concurrently between same routersYou cannot initiate a connection on the same router.
400Forbidden.BillsOutstandingYou cannot use this action because you have bills outstanding.You have uncompleted payments and cannot call this operation.
400InvalidAccount.NotFoundThe specified account is not exists.-
400ErrCode.Invalidgot error-
400IllegalParam.InstanceOwnerThe router instance owener error.-
404InvalidRegionId.NotFoundThe RegionId provided does not exist in our records.The RegionId parameter is set to an invalid value. Specify a valid value and try again.
404InvalidRouterInterfaceId.NotFoundThe specified RouterInterfaceId does not exist in our record.The specified router interface does not exist.
404CROSS_BID.FORBIDDENConnect RouterInterface across bid is illegalThe cross-BID connection is invalid.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2023-07-21The error codes of the API operation change.see changesets
Change itemChange content
Error CodesThe error codes of the API operation change.
    Error Codes 400 change
    delete Error Codes: 404