All Products
Search
Document Center

Virtual Private Cloud:ConnectRouterInterface

Last Updated:Nov 13, 2024

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.

Debugging

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
vpc:ConnectRouterInterfaceupdate
  • RouterInterface
    acs:vpc:{#regionId}:{#accountId}:routerinterface/{#RouterInterfaceId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
RegionIdstringYes

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

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

cn-hangzhou
RouterInterfaceIdstringYes

The ID of the initiator router interface.

ri-2zeo3xzyf38r4urzd****

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

DE77A7F3-3B74-41C0-A5BC-CAFD188C28B6

Examples

Sample success responses

JSONformat

{
  "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-
400AttrMismatching.AcceptingSideRole%s-
400AttrMismatching.AcceptingSideInstanceId%s-
400AttrMismatching.AcceptingSideRegionNo%s-
400AttrMismatching.AcceptingSideRouterId%s-
400AttrMismatching.AcceptingSideRouterType%s-
400AttrMismatching.AcceptingSideAliUid%s-
400AttrMismatching.AcceptingSideOppositeInterfaceOwnerId%s-
400AttrMismatching.AcceptingSideOppositeRegionNo%s-
400AttrMismatching.AcceptingSideOppositeInterfaceId%s-
400AttrMismatching.AcceptingSideOppositeRouterId%s-
400AttrMismatching.AcceptingSideOppositeRouterType%s-
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-12-21API Description Update. The API operation is not deprecated.. The Error code has changedView Change Details
2023-07-21The Error code has changedView Change Details