ALIYUN::VPC::RouterInterface is used to create a router interface.

Syntax

{
  "Type": "ALIYUN::VPC::RouterInterface",
  "Properties": {
    "OppositeRegionId": String,
    "Description": String,
    "HealthCheckSourceIp": String,
    "RouterType": String,
    "AccessPointId": String,
    "RouterId": String,
    "Role": String,
    "OppositeInterfaceOwnerId": String,
    "OppositeAccessPointId": String,
    "OppositeInterfaceId": String,
    "HealthCheckTargetIp": String,
    "OppositeRouterId": String,
    "Spec": String,
    "OppositeRouterType": String,
    "Name": String,
    "PricingCycle": String, 
    "Period": Number, 
    "AutoPay": Boolean, 
    "InstanceChargeType": String
  }
}

Properties

PropertyTypeRequiredEditableDescriptionConstraint
RouterId String Yes No The ID of the router to which the router interface belongs. None
Role String Yes No The role of the router interface. A router interface can either be a connection initiator or a connection acceptor. Valid values:
  • InitiatingSide

    This parameter must be set to InitiatingSide when the RouterType parameter is set to VBR.

  • AcceptingSide

    This parameter must be set to AcceptingSide when the OppositeRouterType parameter is set to VBR.

RouterType String No No The type of the router to which the router interface belongs.Valid values:
  • VRouter: VPC router
  • VBR: virtual border router
AccessPointId String No No The ID of the access point of the router interface. This parameter is required when the RouterType parameter is set to VBR. The access point ID cannot be modified after the router interface is created. This parameter cannot be set when the RouterType parameter is set to VRouter.
Spec String No No

The specifications of the router interface.

The following list includes available specifications and the corresponding bandwidth values:
  • Mini.2: 2 Mbit/s
  • Mini.5: 5 Mbit/s
  • Small.1: 10 Mbit/s
  • Small.2: 20 Mbit/s
  • Small.5: 50 Mbit/s
  • Middle.1: 100 Mbit/s
  • Middle.2: 200 Mbit/s
  • Middle.5: 500 Mbit/s
  • Large.1: 1,000 Mbit/s
  • Large.2: 2,000 Mbit/s
  • Large.5: 5,000 Mbit/s
  • Xlarge.1: 10,000 Mbit/s

This parameter is required when the Role parameter is set to InitiatingSide.

The value Negative is used by default when the Role parameter is set to AcceptingSide.

OppositeRegionId String No No The region ID of the peer router interface. None
OppositeInterfaceOwnerId String No YesThe ID of the owner of the peer router interface. The default value is the ID of the current user.
OppositeInterfaceIdStringNoYesThe ID of the peer router interface.None
OppositeRouterId String No YesThe ID of the router to which the peer router interface belongs.None
OppositeRouterType String No YesThe type of the router to which the peer router interface belongs.Valid values:
  • VRouter: VPC router

    This parameter must be set to VRouter when the RouterType parameter is set to VBR.

  • VBR: virtual border router
OppositeAccessPointId String No No The ID of the access point of the peer router interface.This parameter is required when the OppositeRouterType parameter is set to VBR. The access point ID cannot be modified after the router interface is created.

This parameter cannot be set when the OppositeRouterType parameter is set to VRouter.

Note When the OppositeRouterType parameter is set to VBR, the VBR specified by the OppositeRouterId parameter must be in the access point specified by the OppositeAccessPointId parameter.
Description String No YesThe description of the router interface.The description must be 2 to 256 characters in length. It cannot start with http:// or https://.

This parameter is empty by default.

Name String No YesThe display name of the router interface. The name must be 2 to 128 characters in length. The name must start with a letter and cannot start with http:// or https://. It can contain letters, digits, periods (.), underscores (_), and hyphens (-).
HealthCheckSourceIp String No No The source IP address of health check packets used in leased line disaster recovery and ECMP scenarios.This parameter is valid only for VRouter interfaces that have a peer router interface on a VBR. It must be an unused IP address in the VPC where the local VRouter is located. The HealthCheckSourceIp and HealthCheckTargetIp parameters must either both be specified or both unspecified.
HealthCheckTargetIp String No No The destination IP address of health check packets used in leased line disaster recovery and ECMP scenarios.This parameter is valid only for VRouter interfaces that have a peer router interface on a VBR. Typically, you can use the IP address of a customer premises equipment (CPE) on the user side of the leased line, which is the IP address of the peer gateway on the VBR where the peer router interface is located. You can also specify another IP address on the user side of the leased line as the destination IP address. The HealthCheckSourceIp and HealthCheckTargetIp parameters must either both be specified or both unspecified.
PricingCycleStringNoNoThe billing cycle of the subscription.Valid values:
  • Month
  • Year
PeriodNumberNoNoThe subscription period.Valid values:
  • Valid values when the PricingCycle parameter is set to Month: 1 to 9.
  • Valid values when the PricingCycle parameter is set to Year: 1 to 3.
AutoPayBooleanNoNoSpecifies whether to enable automatic payment.Default value: true. Valid values:
  • true
  • false
InstanceChargeTypeStringNoNoThe billing method of the router interface.Valid values:
  • Postpaid: pay-as-you-go
  • Prepaid: subscription

Response parameters

Fn::GetAtt

RouterInterfaceId: the ID of the router interface.

Examples

  • YAMLformat

    ROSTemplateFormatVersion: '2015-09-01'
    Parameters:
      OppositeInterfaceId:
        Type: String
        Description: The ID of the peer router interface.
      RouterId:
        Type: String
        Description: The router ID to create RouterInterface.
      OppositeRouterId:
        Type: String
        Description: The router ID of the connection peer RouterInterface.
    Resources:
      RouterInterface:
        Type: ALIYUN::VPC::RouterInterface
        Properties:
          OppositeInterfaceId:
            Ref: OppositeInterfaceId
          OppositeRouterId:
            Ref: OppositeRouterId
          OppositeInterfaceOwnerId:
            Ref: ALIYUN::TenantId
          OppositeRouterType: VRouter
          Description: Initiating Side
          RouterType: VRouter
          RouterId:
            Ref: RouterId
          Role: InitiatingSide
          Spec: Mini.2
          InstanceChargeType: PostPaid
    Outputs:
      RouterInterfaceId:
        Description: The ID of created RouterInterface.
        Value:
          Fn::GetAtt:
            - RouterInterface
            - RouterInterfaceId
  • JSONformat

    {
      "ROSTemplateFormatVersion": "2015-09-01",
      "Parameters": {
        "OppositeInterfaceId": {
          "Type": "String",
          "Description": "The ID of the peer router interface."
        },
        "RouterId": {
          "Type": "String",
          "Description": "The router ID to create RouterInterface."
        },
        "OppositeRouterId": {
          "Type": "String",
          "Description": "The router ID of the connection peer RouterInterface."
        }
      },
      "Resources": {
        "RouterInterface": {
          "Type": "ALIYUN::VPC::RouterInterface",
          "Properties": {
            "OppositeInterfaceId": {
              "Ref": "OppositeInterfaceId"
            },
            "OppositeRouterId": {
              "Ref": "OppositeRouterId"
            },
            "OppositeInterfaceOwnerId": {
              "Ref": "ALIYUN::TenantId"
            },
            "OppositeRouterType": "VRouter",
            "Description": "Initiating Side",
            "RouterType": "VRouter",
            "RouterId": {
              "Ref": "RouterId"
            },
            "Role": "InitiatingSide",
            "Spec": "Mini.2",
            "InstanceChargeType": "PostPaid"
          }
        }
      },
      "Outputs": {
        "RouterInterfaceId": {
          "Description": "The ID of created RouterInterface.",
          "Value": {
            "Fn::GetAtt": [
              "RouterInterface",
              "RouterInterfaceId"
            ]
          }
        }
      }
    }