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

Usage notes

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 rules:

  • 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.

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
Action String Yes ConnectRouterInterface

The operation that you want to perform. Set the value to ConnectRouterInterface.

RegionId String Yes cn-hangzhou

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

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

RouterInterfaceId String Yes ri-2zeo3xzyf38r4urzd****

The ID of the initiator router interface.

Response parameters

Parameter Type Example Description
RequestId String DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?Action=ConnectRouterInterface
&RegionId=cn-hangzhou
&RouterInterfaceId=ri-2zeo3xzyf38r4urzd****
&Common request parameters

Sample success responses

XML format

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

<ConnectRouterInterfaceResponse>
    <RequestId>DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6</RequestId>
</ConnectRouterInterfaceResponse>

JSON format

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

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

Error codes

HttpCode Error code Error message Description
400 IncorrectRole.NotInitiatingSide The specified RouterInterface is not InitiatingSide. The error message returned because the specified router interface is not an initiator. Select an initiator router interface.
400 IncorrectOppositeInterfaceInfo Cannot connect on the same router The error message returned because you cannot connect a router to itself.
400 Forbidden.OnlyOneConnection The Specified routers have a connection already The error message returned because the router is already connected to a router interface.
400 Forbidden.OnlyOneConnection Cannot connect concurrently between same routers The error message returned because you cannot initiate a connection on the same router.
400 Forbidden.BillsOutstanding You cannot use this action because you have bills outstanding. The error message returned because you have uncompleted payments and cannot call this operation.
404 InvalidRouterInterfaceId.NotFound The specified RouterInterfaceId does not exist in our record. The error message returned because the specified router interface does not exist. Check whether the specified router interface is valid.
404 CROSS_BID.FORBIDDEN Connect RouterInterface across bid is illegal The error message returned because cross-BID connections are invalid.

For a list of error codes, visit the API Error Center.