edit-icon download-icon

CreateRouterInterface

Last Updated: Apr 09, 2018

Description

Create a router interface.

Note the following before creating a router interface:

  • Up to one pair of interconnected router interfaces can be created between two VRouters.

  • Up to five router interfaces can be created for a VRouter.

  • If there is a delinquent router interface in your account, you can no longer create router interfaces.

  • The router interface created for a Virtual Border Router (VBR) must act as the connection initiator.

  • If you want to create a router interface for a VBR, the VBR must be in the Active status.

Note: A router interface created by using the API only is billed on a daily basis. If you want to buy a router interface charged on a yearly or monthly basis, create it on the console. For more information, see Create a router interface.

Request parameters

Name Type Required Description
Action String Yes

The action to perform.

Valid value: CreateRouterInterface

RegionId String Yes

The region of the router interface.

You can obtain the region ID by calling the DescribeRegions API.

RouterType String Yes

The type of the router that the router interface is created for. Valid value:

  • VRouter: Create a router interface for a VRouter of a VPC.

  • VBR: Create a router interface for a VBR.

AccessPointId String No

The ID of the access point used by the VBR.

This parameter is required when the RouterType parameter is set to VBR.

RouterId String Yes The ID of the VRouter or VBR.
Role String Yes

The role of the router interface. Valid value:

  • InitiatingSide: Connection initiator.

  • AcceptingSide: Connection receiver.

The value of this parameter must be InitiatingSide if the RouterType parameter is set to VBR.

Spec String Yes

The specification of the router interface.The following are available specifications and the corresponding bandwidth:

  • Mini.2: 2 Mbps

  • Mini.5: 5 Mbps

  • Small.1: 10 Mbps

  • Small.2: 20 Mbps

  • Small.5: 50 Mbps

  • Middle.1: 100 Mbps

  • Middle.2: 200 Mbps

  • Middle.5: 500 Mbps

  • Large.1: 1000 Mbps

  • Large.2: 2000 Mbps

  • Large.5: 5000 Mbps

  • Xlarge.1: 10000 Mbps

OppositeRegionId String Yes The region of the peer router interface.
OppositeRouterType String No

The type of the router that the peer router interface associates with. Valid value:

  • VRouter(Default): The peer router interface is associated with a VRouter of a VPC.

  • VBR: The peer router interface is associated with VBR.

OppositeRouterId String No The ID of the peer VRouter or VBR to connect.
OppositeInterfaceId String No The ID of the peer router interface.
OppositeAccessPointId String No

The ID of the access point of the peer router interface. This parameter is required when the value of the OppositeRouterType parameter is set to VBR.

Note: This parameter cannot be modified after the router interface is created.

OppositeInterfaceOwnerId String No The account ID of the owner of the peer router interface.
Name String No

The name of the router interface.

The name must start with an English letter, but cannot start withhttp:// or https://.

The name can contain from 2 to 128 characters including a-z, A-Z, 0-9, underlines, and hyphens.

Description String No

The description of the router interface.

The description must start with English letters, but cannot start with http:// or https://.

The description can contain from 2 to 256 characters.

HealthCheckSourceIp String No

The source IP address used to perform health check on the physical connection. It must be unused IP address of the VPC where local router interface is located.

Note: This parameter works only when creating route interfaces to establish a physical connection.

HealthCheckTargetIp String No The destination IP address used to perform health check on the physical connection.

Note: This parameter is required when the HealthCheckSourceIp parameter is specified.

InstanceChargeType String No

The billing method of the router interface. Valid value:

  • PrePaid: Subscription

  • PostPaid(Default): Pay-As-You-Go

If you select the Subscription billing method, find the order ID in the response and go to the Order Center to complete the payment.

PricingCycle String No

The billing cycle. Valid value:

  • Month: Billing by month

  • Year: Billing by year

Note: This parameter is required if you select the Subscription billing mode.

Period String No

The billing period. Valid value:

  • If you select billing cycle is Month, the valid value is [1, 9].

  • If you select billing cycle is Year, the valid value is [1, 3]

Note: This parameter is required if you select the Subscription billing mode.

AutoPay String No

Whether to pay the order automatically. Valid value:

  • true: Automatically pay the order.
  • false(Default): Do not enable automatic pay. You must go to the Order Center to complete the payment after the order is generated.

ClientToken String No

A client token used to guarantee the idempotence of requests. This parameter value is generated by the client and must be unique. It cannot exceed 64 ASCII characters.

For more information, see How to ensure idempotence.

Response parameters

Name Type Description
RequestId String The ID of the request.
RouterInterfaceId String The ID of the router interface instance.
OrderId String The order number.

Note: This parameter is returned only when you select the Subscription billing mode.

Error codes

See VPC API Error Center.

Examples

Request example

  1. http://vpc.aliyuncs.com/?Action=CreateRouterInterface
  2. &Role=InitiatingSide
  3. &OppositeRegionId=cn-hangzhou
  4. &Spec=Middle.1
  5. &RouterType=VRouter
  6. &RouterId=vpc-xxxx
  7. &RegionId=cn-beijing
  8. &<CommonParameters>

Response example

JSON format

  1. {
  2. "RequestId": "C4C873E5-8B92-4CD8-9163-66703A808E46",
  3. "RouterInterfaceId": "ri-2ze7fbuohmxxxxxx"
  4. }
Thank you! We've received your feedback.