閱讀938 返回首頁    go 阿裏雲 go 技術社區[雲棲]


新建路由器接口__高速通道相關接口_API 參考_雲服務器 ECS-阿裏雲

描述

創建一個路由器接口(RouterInterface)。

關於路由器接口的介紹,請參見 阿裏雲文檔-網絡產品-高速通道-功能介紹。

高速通道產品處於公測狀態。如果您需要使用該功能,請到阿裏雲官網高速通道產品頁 申請公測資格。

  • 該API僅用於生成一個RouterInterface,並未觸發連接動作。若要真的實現路由器接口的互聯,需要使用後麵的“發起路由器接口連接”操作。
  • 路由器接口之間的“互連”,表示兩個路由器通過一根虛擬的“鏈路”連接起來。若要在鏈路上正確的實現消息的傳遞,還需要在兩邊的路由器上正確地配置路由表,以及在實際通信的對象上正確的配置訪問控製規則;
  • 任意兩個路由器之間,最多隻能存在一對互連的RouterInterface。
  • 一個路由器上可以最多創建5個路由器接口。
  • 一個用戶名下最多可以同時擁有5個路由器接口。
  • 若用戶名下有RI處於欠費狀態,則不允許新建更多的路由器接口。
  • OppositeRouterType、OppositeRouterId、OppositeInterfaceId、OppositeInterfaceOwnerId四個參數,用於兩個路由器接口互連時進行校驗。在發起連接時必須事先填好。所以,您可以選擇在創建時就填好,或者創建出路由器接口之後調用ModifyRouterInterfaceAttribute來修改。

對於創建本端或對端是VBR上的Router Interface時:

  • 增加AccessPointId和OppositeAccessPointId參數,描述和限製見以下參數表
  • 新增HealthCheckSourceIp和HealthCheckTargetIp參數,描述和限製見以下參數表
  • VBR隻能是發起端,此時對端(接收端)隻能是VRouter,具體的限製如下:
    • 如果RouterType(本端)是VBR,Role必須是InitiatingSide,而且OppositeRouterType隻能是VRouter並且不能修改
    • 對端是VBR的Router Interface隻能是接收端,在創建時必須指定對端的RouterType(VBR)和AccessPointId,而且創建後不能修改這兩個屬性,具體的限製如下:
    • OppositeRouterType不允許從其他值(VRouter或空)改為VBR,或從VBR改為其他值(VRouter或空)
    • OppositeRouterType是VBR時Role(本端)必須是AcceptingSide,而且OppositeAccessPointId是必填並且不可改
  • 在VBR上創建Router Interface要求VBR必須當時必須處於Enabled狀態

請求參數

名稱 類型 是否必須 描述
Action String 操作接口名,係統規定參數,取值:CreateRouterInterface
RegionId String 實例所在的地域
RouterType String 所屬的路由器類型。
可選值:VRouter,VBR
AccessPointId String 所屬的接入點ID。在RouterType是VBR時必填,而且創建後不允許修改。在RouterType是VRouter時不能填。
RouterId String 所屬的路由器Id,在RouterType是VBR時RouterId所指定的VBR必須在AccessPointId所指定的接入點內。
Role String 連接中扮演的角色,即,是連接發起端還是連接接受端。
可選值:InitiatingSide|AcceptingSide;
Spec String 規格,詳見 阿裏雲文檔-網絡產品-高速通道-地域、規格與價格
OppositeRegionId String 要連接的對端所在的Region.
OppositeAccessPointId String 對端所屬的接入點ID。在OppositeRouterType是VBR時必填,而且創建後不允許修改。在OppositeRouterType是VRouter時不能填。在OppositeRouterType是VBR時OppositeRouterId所指定的VBR必須在OppositeAccessPointId所指定的接入點內。在創建/修改RouterInterface時不會做對端OppositeRouterId,OppositeAccessPointId等的校驗,在進行連接操作時會出錯。
OppositeRouterType String 要連接的對端路由器接口所屬的路由器類型。可選值:VRouter,VBR;缺省為VRouter類型。
OppositeRouterId String 要連接的對端的路由器的ID。在OppositeRouterType是VBR時OppositeRouterId所指定的VBR必須在OppositeAccessPointId所指定的接入點內。在創建/修改RouterInterface時不會做對端OppositeRouterId,OppositeAccessPointId等的校驗,在進行連接操作時會出錯。
OppositeInterfaceId String 要連接的對端RouterInterface的Id
OppositeInterfaceOwnerId String 連接對端路由器接口的持有者賬號ID。您可以登錄阿裏雲官網以後,在 控製台-用戶中心-賬號管理 中看到您的賬號ID。
Name String 實例的顯示名稱,[2, 128] 英文或中文字符,必須以大小字母或中文開頭,可包含數字,“.”,“_”或“-”。
實例名稱會顯示在控製台。
如果沒有指定該參數,默認值為實例的 InstanceId
不能以 https:// 和 https:// 開頭。
Description String 自定義描述[[2, 256] 個字符,實例描述會顯示在控製台。不填則為空,默認為空。不能以 https:// 和 https:// 開頭
HealthCheckSourceIp String 專線容災和ECMP場景下用來做專線HealthCheck的Packet的Source IP。隻對本端是VRouter而且對端是VBR的Router Interface有效。必須是本端VRouter所在的VPC內的一個未被使用的IP。HealthCheckSourceIp與HealthCheckTargetIp必須同時指定或同時不指定。
HealthCheckTargetIp String 專線容災和ECMP場景下用來做專線HealthCheck的Packet的Target IP。隻對本端是VRouter而且對端是VBR的Router Interface有效。通常可以用專線用戶端CPE的IP(也就是對端RI所在的VBR上的PeerGatewayIp),用戶也可以指定專線用戶端的其他可以用來做HealthCheck Target的IP。HealthCheckSourceIp與HealthCheckTargetIp必須同時指定或同時不指定。
ClientToken String 用於保證請求的冪等性。由客戶端生成該參數值,要保證在不同請求間唯一,最大不值過64個ASCII字符。
具體參見附錄:如何保證冪等性

返回參數

名稱 類型 描述
RouterInterfaceId String 路由器接口的實例ID,由係統生成,全局唯一。是操作路由器接口實例的唯一標識

錯誤碼

錯誤代碼 描述 Http 狀態碼 語義
InvalidRegionId.NotFound The RegionId provided does not exist in our records. 404 指定的 RegionId 不存在
InvalidOppositeRegionId.NotFound The OppositeRegionId provided does not exist in our records. 404 用戶填寫的OppositeRegionId是一個不存在的regionId
InvalidRegionPair.NotReachable The specified OppositeRegion is not reachable by ExpressConnect from that region specified by ‘RegionId’ 400 用戶指定的兩個region是無法通過高速通道產品進行連接的。
InvalidRole.ValueNotSupported The specified Role is not valid. 400 指定的 Role 不合法
InvalidSpec.ValudNotSupported The specified Spec is not supported. 400 指定的 Spec 不支持
InvalidRouterType.ValueNotSupported The specified RouterType is not valid 400 指定的 RouterType 不合法
InvalidRouterId.NotFound The specified RouterId does not exist in our recored. 404 指定的 RouterId 不存在
InvalidOppositeRouterType.ValueNotSupported The specified OppositeRouterType is not valid. 400 指定的 OppositeRouterType 不合法
ParameterMismatch.Role-Spec The specified Spec and Role mismatch. 400 指定的 Spec 和 Role 不匹配
ParameterMismatch.RegionId-OppositeRegionId-Spec The specified Spec is not supported between the specified RegionId and OppositeRegionId. 400 該規格在這兩個Region之間不支持。
InvalidName.Malformed The specified ‘Name’ is not valid. 400 指定的 Name 不合法
InvalidDescription.Malformed The specifid ‘Description’ is not valid. 400 指定的 Description 不合法
Forbidden.BillsOutstanding You cannot create more RouterInterface because you have bills outstanding. 400 有未結清的賬單,因而拒絕創建更多的後付費資源;
QuotaExceed.RouterInterface Living RouterInterface quota exceeded. 400 已有路由器接口數量超過配額
LimitationExceed.InterfaceNumberOnRouter Total number of RouterInterfaces on a Router exceeded. 400 單個路由器上存在的路由器接口數量超過配額
Forbidden.NotInRouterInterfaceCreateWhitelist Not in router interface create whitelist. 500 帳號不在創建路由器接的白名單中
RI_CREATE_ONE_LIMIT_BY_SYNC Create ri only one limit by sync. 500
InvalidAccessPoint.ValueNotAllowed The non-vbr router interface cannot have access point configured. 500 非 VBR 路由器接口不能指定接入點信息
InvalidAccessPoint.ValueNotAllowed The non-vbr opposite router interface cannot have opposite access point configured. 500 非 VBR 對端路由器接口不能指定接入點信息
InvalidParam.NotFound Parameter must not be null,uid, bid,regionNo, remoteRegionNo or routerId 400 ‘uid’, ‘bid’, ‘regionNo’, ‘remoteRegionNo’ 或者 ‘routerId’不能為空
InvalidAccessPoint.NotMatch The accessPoint id is not matched 400 接入點Id 不匹配
InvalidAccessPoint.NotExist The accessPoint not exit 400 接入點Id 不存在

最後更新:2016-11-23 16:03:50

  上一篇:go 刪除端口轉發規則__NAT網關相關接口_API 參考_雲服務器 ECS-阿裏雲
  下一篇:go 修改路由器接口屬性__高速通道相關接口_API 參考_雲服務器 ECS-阿裏雲