ALIYUN::VPC::RouterInterface

更新时间:
复制为 MD 格式

ALIYUN::VPC::RouterInterface用于创建路由器接口。

语法

{
  "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,
    "ResourceGroupId": String,
    "AutoRenew": Boolean,
    "FastLinkMode": Boolean
  }
}

属性

属性名称

类型

必须

允许更新

描述

约束

RouterId

String

路由器ID。

Role

String

连接中扮演的角色。即,是连接发起端还是连接接受端。

取值:

  • InitiatingSide

    RouterType取值为VBR时,该参数取值必须为InitiatingSide。

  • AcceptingSide

    OppositeRouterType取值为VBR时,该参数取值必须为AcceptingSide。

RouterType

String

所属的路由器类型。

取值:

  • VRouter:VPC路由器。

  • VBR:边界路由器。

AccessPointId

String

所属的接入点ID。

RouterType取值为VBR时该参数必须指定,而且创建后不允许修改。在RouterType取值为VRouter时,不能指定该参数。

Spec

String

路由器接口的规格。

可用的规格和对应的带宽如下:

  • Mini.2:2Mbps

  • Mini.5:5Mbps

  • Small.1:10Mbps

  • Small.2:20Mbps

  • Small.5:50Mbps

  • Middle.1:100Mbps

  • Middle.2:200Mbps

  • Middle.5:500Mbps

  • Large.1:1000 Mbps

  • Large.2:2000Mbps

  • Large.5:5000 Mbps

  • Xlarge.1:10000Mbps

Role取值为InitiatingSide时,该参数必须指定。

Role参数取值为AcceptingSide时,该参数取值默认为Negative。

OppositeRegionId

String

要连接的对端所在的地域。

OppositeInterfaceOwnerId

String

连接对端路由器接口的持有者账号ID。

默认是当前用户的ID。

OppositeInterfaceId

String

对端路由器接口ID。

OppositeRouterId

String

要连接的对端的路由器的ID。

OppositeRouterType

String

要连接的对端路由器接口所属的路由器类型。

取值:

  • VRouter:VPC路由器。

    RouterType取值为VBR时,该参数取值必须是VRouter。

  • VBR:边界路由器。

OppositeAccessPointId

String

对端所属的接入点ID。

OppositeRouterType取值为VBR时该参数必须指定,而且创建后不允许修改。

OppositeRouterType取值为VRouter时,不能指定该参数。

说明

OppositeRouterType取值为VBROppositeRouterId所指定的VBR必须在OppositeAccessPointId所指定的接入点内。

Description

String

路由器接口描述。

长度为2~256个字符。不能以http://https://开头。

不填则为空,默认为空。

Name

String

路由器接口显示名称。

长度为2~128个字符。必须以英文字母或汉字开头,不能以http://https://开头。可包含英文字母、汉字、数字、英文句点(.)、下划线(_)和短划线(-)。

ResourceGroupId

String

资源组ID。

AutoRenew

Boolean

是否开启自动续费。

FastLinkMode

Boolean

是否为使用快速连接模式创建的 VBR 上联路由器接口。

快速连接模式可实现 VBR 和 VPC 两端路由器接口创建完毕后自动完成连接。取值:

  • true:是。

  • false(默认值):否。

说明

该参数只在 RouterType 取值为 VBROppositeRouterType 参数取值为 VRouter 时生效。

  • 当 FastLinkMode 参数取值为 true 时,Role 参数必须取值为 InitiatingSideAccessPointIdOppositeRouterTypeOpppsiteRouterId 和 OppositeInterfaceOwnerId 参数为必选。

HealthCheckSourceIp

String

专线容灾和ECMP场景下用来做专线健康检查的Packet的源IP。

只对本端是VRouter,而且对端是VB的路由器接口有效。必须是本端VRouter所在的VPC内的一个未被使用的IP。HealthCheckSourceIpHealthCheckTargetIp必须同时指定,或同时不指定。

HealthCheckTargetIp

String

专线容灾和ECMP场景下用来做专线健康检查的Packet的目标IP。

只对本端是VRouter,而且对端是VBR的路由器接口有效。通常可以用专线用户端CPEIP(即对端RI所在的VBR上的PeerGatewayIp),也可以指定专线用户端的其他IP。HealthCheckSourceIpHealthCheckTargetIp必须同时指定,或同时不指定。

PricingCycle

String

预付费的计费周期。

取值:

  • Month:按月付费。

  • Year:按年付费。

Period

Number

购买时长。

取值:

  • 当选择按月付费时,取值范围:1~9。

  • 当选择按年付费时,取值范围:1~3。

AutoPay

Boolean

自动付款。

取值:

  • true(默认值)

  • false

InstanceChargeType

String

实例的付费类型。

取值:

  • Postpaid:后付费(按量付费)。

  • Prepaid:预付费(包年包月)。

返回值

Fn::GetAtt

RouterInterfaceId:路由器接口ID。

示例

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
{
  "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"
        ]
      }
    }
  }
}