全部產品
Search
文件中心

Resource Orchestration Service:ALIYUN::VPC::RouterInterface

更新時間:Mar 28, 2026

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取值為VBR時OppositeRouterId所指定的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。HealthCheckSourceIp與HealthCheckTargetIp必須同時指定,或同時不指定。

HealthCheckTargetIp

String

專線容災和ECMP情境下用來做專線健全狀態檢查的Packet的目標IP。

只對本端是VRouter,而且對端是VBR的路由器介面有效。通常可以用專線使用者端CPE的IP(即對端RI所在的VBR上的PeerGatewayIp),也可以指定專線使用者端的其他IP。HealthCheckSourceIp與HealthCheckTargetIp必須同時指定,或同時不指定。

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