CreateRouterInterface - 建立路由器介面
調用CreateRouterInterface介面建立路由器介面。
介面說明
調用本介面建立路由器介面時,請注意:
-
任意兩個路由器之間,最多隻能存在一對互連的路由器介面。
-
一個路由器上可以最多建立 5 個路由器介面。
-
如果賬戶下存在欠費狀態的路由器介面,則無法再建立路由器介面。
-
同一路由表下的路由條目的目標網段(DestinationCidrBlock)不允許相同。
-
邊界路由器 VBR(Virtual Border Router)只能是串連發起端,並且是已啟用狀態。
-
通過本介面可以建立預付費和後付費的路由器介面。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RegionId |
string |
是 |
路由器介面所在的地區 ID。 您可以通過調用 DescribeRegions 介面擷取地區 ID。 |
cn-hangzhou |
| Role |
string |
是 |
路由器介面的角色,取值:
|
InitiatingSide |
| OppositeRegionId |
string |
是 |
串連接收端所在的地區 ID。 |
cn-shanghai |
| Spec |
string |
是 |
路由器介面的規格。可用的規格和對應的頻寬取值如下:
說明
當 Role 為 AcceptingSide(串連接收端)時,Spec 取值為 Negative 即建立接收端路由器介面時不涉及規格。 |
Mini.2 |
| RouterType |
string |
是 |
路由器介面關聯的路由器類型,取值:
|
VRouter |
| RouterId |
string |
是 |
路由器介面關聯的路由器 ID。 |
vbr-m5ebm6g9ptc9mly1c**** |
| OppositeInterfaceId |
string |
否 |
對端路由器介面 ID。 |
ri-2zeo3xzyf38r4urzd**** |
| OppositeRouterId |
string |
否 |
對端路由器的 ID。 |
vrt-bp1lhl0taikrteen8**** |
| OppositeRouterType |
string |
否 |
對端路由器介面關聯的路由器類型,取值:
|
VRouter |
| OppositeInterfaceOwnerId |
string |
否 |
對端路由器介面的所有者的阿里雲帳號 ID。 |
253460731706911258 |
| HealthCheckSourceIp |
string |
否 |
健全狀態檢查源 IP 位址,必須是本端 VPC 內的一個未被使用的 IP。 說明
物理專線接入情境下可指定該參數。 |
192.168.0.6 |
| HealthCheckTargetIp |
string |
否 |
健全狀態檢查目的 IP 位址。 說明
當指定了 HealthCheckSourceIp 後,該參數必填。 |
192.168.0.8 |
| AccessPointId |
string |
否 |
VBR 所屬的存取點 ID。 您可以通過調用 DescribeAccessPoints 介面擷取物理專線存取點 ID。 說明
物理專線接入情境下需指定該參數。 |
ap-cn-hangzhou-yh-ts-A |
| OppositeAccessPointId |
string |
否 |
對端所屬的存取點 ID。 說明
對端路由器介面位於 VBR 上時需指定該參數,建立路由器介面後無法修改。 |
ap-cn-shanghai-nt-aligroup-C |
| Description |
string |
否 |
路由器介面的描述資訊。 長度為 2~256 個字元,必須以字母或中文開頭,但不能以 |
abcabc |
| Name |
string |
否 |
路由器介面的名稱。 長度為 2~128 個字元,必須以字母或中文開頭,可包含數字、半形句號(.)、底線(_)和短劃線(-)。 |
abc |
| Period |
integer |
否 |
購買時間長度,取值:
說明
InstanceChargeType 參數的值為 PrePaid 時,該參數必填。 |
3 |
| InstanceChargeType |
string |
否 |
路由器介面的付費方式,取值:
|
PrePaid |
| AutoPay |
boolean |
否 |
是否自動付費,取值:
說明
InstanceChargeType 參數的值為 PrePaid 時,該參數必填。 |
false |
| PricingCycle |
string |
否 |
預付費的計費周期,取值:
說明
InstanceChargeType 參數的值為 PrePaid 時,該參數必填。 |
Month |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的等冪性。 由用戶端產生該參數值,要保證在不同請求間唯一。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 可能不一樣。 |
123e4567-e89b-12d3-a456-426655440000 |
| ClientToken |
string |
否 |
用戶端 Token,用於保證請求的等冪性。 由用戶端產生該參數值,要保證在不同請求間唯一。 說明
若您未指定,則系統自動使用 API 請求的 RequestId 作為 ClientToken 標識。每次 API 請求的 RequestId 可能不一樣。 |
123e4567-e89b-12d3-a456-426655440000 |
| FastLinkMode |
boolean |
否 |
是否為使用快速串連模式建立的 VBR 上聯路由器介面,快速串連模式可實現 VBR 和 VPC 兩端路由器介面建立完畢後自動完成串連。取值:
說明
|
false |
| AutoRenew |
boolean |
否 |
是否開通自動續約。取值:
|
false |
| ResourceGroupId |
string |
否 |
資源群組 ID。 關於資源群組的更多資訊,請參見什麼是資源群組。 |
rg-acfmxazb4ph6aiy**** |
| Tags |
array<object> |
否 |
資源的標籤。 |
|
|
object |
否 |
標籤。 |
||
| Key |
string |
否 |
資源的標籤鍵。至少輸入 1 個標籤鍵,最多支援輸入 20 個標籤鍵。如需傳入該值,則不能輸入Null 字元串。 一個標籤鍵最多支援 128 個字元,不能以 |
FinanceDept |
| Value |
string |
否 |
資源的標籤值。最多支援輸入 20 個標籤值。如果傳入該值,可以輸入Null 字元串。 最多支援 128 個字元,不能以 |
FinanceJoshua |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
請求 ID。 |
||
| RequestId |
string |
請求 ID。 |
079874CD-AEC1-43E6-AC03-ADD96B6E4907 |
| OrderId |
integer |
訂單號,選擇預付費時返回該參數。 |
20210101123456 |
| RouterInterfaceId |
string |
路由器介面的 ID。 |
ri-2ze7fbuohm**** |
樣本
正常返回樣本
JSON格式
{
"RequestId": "079874CD-AEC1-43E6-AC03-ADD96B6E4907",
"OrderId": 20210101123456,
"RouterInterfaceId": "ri-2ze7fbuohm****"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | InvalidPrice.NotFound | Pricing plan result not found. | Price參數無效 |
| 400 | InvalidAliuid | Invalid Aliuid. | Aliuid無效 |
| 400 | InvalidRole.ValueNotSupported | The specified Role is not valid. | |
| 400 | InvalidSpec.ValudNotSupported | The specified Spec is not supported. | |
| 400 | InvalidRouterType.ValueNotSupported | The specified RouterType is not valid. | |
| 400 | InvalidName.Malformed | The specified "Name" is not valid. | |
| 400 | Forbidden.BillsOutstanding | You cannot create more RouterInterface because you have bills outstanding. | |
| 400 | LimitationExceed.InterfaceNumberOnRouter | Total number of RouterInterfaces on a Router exceeded. | |
| 400 | Forbidden.NotInRouterInterfaceCreateWhitelist | Not in router interface create whitelist. | |
| 400 | RI_CREATE_ONE_LIMIT_BY_SYNC | Create ri only one limit by sync. | |
| 400 | InvalidAccessPoint.ValueNotAllowed | The non-vbr router interface cannot have access point configured. | |
| 400 | InvalidParam.NotFound | Parameter must not be null,uid, bid,regionNo, remoteRegionNo, routerId or accessPointId | 參數不能為null |
| 400 | InvalidAccessPoint.NotMatch | The accessPoint id is not matched | |
| 400 | InvalidAccessPoint.NotExist | The accessPoint not exit | |
| 400 | INVAID_VBR_STATUS | VBR status must be active | |
| 400 | IncorrectStatus.CenStatus | Cen status must not be middle status. | 請檢查cen 狀態 |
| 400 | Forbidden.AcceptRoleNotSupportPrePay | Acception side ri not support chargetype for prepaid. | 不支援預付費的費用類型。 |
| 400 | InvalidRouterInterfaceSpec.Malformed | Specified RouterInterface spec is not valid. | 指定的RouterInterface Spec無效。 |
| 400 | VpcSubnet.NotFound | Vpc subnet not exist. | Vpc子網不存在。 |
| 400 | IllegalParam.HealthcheckIp | Healthcheck ip cannot equal with instance ip. | Healthcheck ip不能與執行個體ip相等。 |
| 400 | OperationFailed.HcForInvalidRiType | Healthchecksourceip and healthchecktargetip is only valid for vr ri that is connected to vbr. | 健全狀態檢查IP無效 |
| 400 | OperationFailed.SyncOrderToSub | SyncOrderToSub error. | 操作失敗 |
| 400 | IllegalParam.CrossBorderBandwidth | CrossBorder bandwidth error. | 跨域頻寬包不合法 |
| 400 | IllegalParam.VRouterType | The VRouterType is not supported. | VRouterType不合法 |
| 400 | IllegalParam.Spec | The spec is illegal. | spec不合法 |
| 400 | Forbidden.CrossBorder | User not authorized to create cross border routerInterface. | 使用者無權建立跨境routerInterface |
| 400 | InvalidRouterId.NotFound | Param is not valid,this user does not have this router or aliuid bid regionNo and routerId must have something wrong. | RouterId參數無效 |
| 400 | InvalidCommodity.NotFound | Commodity is not exist. | Commodity不存在 |
| 400 | InvalidRouterInterfaceChargeType.Malformed | Specified RouterInterface ChargeType is not valid. | 指定的RouterInterface ChargeType無效。 |
| 400 | IllegalParam.RegionId | The specified regionId is illegal. | regionId不合法 |
| 400 | PAY.MAYI_WITHHOLDING_AGREEMENT_ILLEGAL | User withhoding argeement is illegal. | |
| 400 | QuotaExceeded | RiPerUser quota exceeded | 目前使用者建立的對等連線路由器介面數量已達上限 |
| 400 | OperationFailed.PconnTrafficNotEnable | The operation is failed because of PconnTrafficNotEnable. | 操作失敗,因為出方向流量未開通。 |
| 400 | InvalidRegionId.NotFound | The regionId provided does not exist in ec region list. | 提供的regionId無效,請檢查。 |
| 400 | ResourceNotInResourceGroup | The specified resource is not in the specified ResourceGroup. | 輸入的資源不在輸入的資源群組內 |
| 400 | HaveConnectionBetweenRouters | Have connection between routers | 兩個路由器之間已經建立了串連 |
| 400 | InvalidDescription.Malformed | The specified "Description" is not valid. | 描述的長度可以是2到256個字元,不能以http://和https://開頭。 |
| 400 | InvalidBandwidth.NotEnough | Bandwidth not enough. | 頻寬計劃的頻寬不足。 |
| 400 | ForbiddenAction | The user does not support this action. | 您沒有所需的許可權。 |
| 400 | OperationFailed.NotSupportIPv6 | Router interface not support IPv6. | 路由介面不支援IPv6。 |
| 400 | InvalidParam.AvailableZoneId | The specified AvailableZoneId did not retrieve the corresponding cluster IP address. | 您指定的AvailableZoneId沒有擷取到對應的叢集IP地址。 |
| 400 | OperationFailed.NoAvailableAmount | The available amount of your account is less than 0, please recharge before attempting to purchase. | 您的賬戶可用額度小於0,請先儲值後再嘗試購買。 |
| 400 | OperationFailed.OperationLocked | Operation failed because OperationLocked. | 操作失敗因為執行個體已經被營運鎖定。 |
| 400 | OperationFailed.InvalidEcGrant | The VBR have no grant to create EC. | VBR 執行個體未獲得 VPC 執行個體授權 ,請授權後重試。 |
| 400 | OperationFailed.CannotConnectOtherOwnerInstance | Can not connect with other owner VPC or CEN. | 當前資源與其它帳號 VPC 或 CEN 綁定失敗,請核對是否有相關許可權後重試。 |
| 400 | InvalidParams.NotNull | params must not null. | 參數不可為空 |
| 404 | InvalidRegionId.NotFound | The regionId provided does not exist in our records. | 指定的RegionId不存在。請檢查該參數是否正確。 |
| 404 | InvalidRouterId.NotFound | The specified RouterId does not exist in our recored. | |
| 404 | InvalidRouterId.AttacedToCEN | Can not create ri when attaced to CEN. | ri不能附加cen |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。