調用CreateEnsRouteEntry建立自訂路由條目。
調試
您可以在OpenAPI Explorer中直接運行該介面,免去您計算簽名的困擾。運行成功後,OpenAPI Explorer可以自動產生SDK程式碼範例。
調試
授權資訊
|
操作 |
存取層級 |
資源類型 |
條件關鍵字 |
關聯操作 |
|
ens:CreateEnsRouteEntry |
create |
*全部資源
|
無 | 無 |
請求參數
|
名稱 |
類型 |
必填 |
描述 |
樣本值 |
| RouteTableId |
string |
是 |
要建立自訂路由條目的路由表 ID。 |
vtb-bp1cifr72dioje82lse2j |
| DestinationCidrBlock |
string |
是 |
自訂路由條目的目標網段。需滿足以下要求:
|
120.XXX.XXX.0/24 |
| NextHopType |
string |
否 |
自訂路由條目的下一跳的類型,取值:
|
Instance |
| NextHopId |
string |
是 |
自訂路由條目的下一跳執行個體的 ID。 |
i-5vb7leks9z4mxy1ay258 |
| RouteEntryName |
string |
否 |
要建立的自訂路由條目的名稱。長度為 1~128 個字元,但不能以 http://或 https://開頭。 |
test |
| Description |
string |
否 |
自訂路由條目的描述資訊。 |
example |
| SourceCidrBlock |
string |
否 |
源地址網段在配置網關路由表的路由條目時可用,但在配置交換器路由表的路由條目時不受支援。 |
172.XXX.XXX.0/24 |
返回參數
|
名稱 |
類型 |
描述 |
樣本值 |
|
object |
Schema of Response |
||
| RequestId |
string |
請求 ID。 |
473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E |
| RouteEntryId |
string |
路由條目 ID。 |
rte-5vb5q8sk0lyoscx8539ds |
樣本
正常返回樣本
JSON格式
{
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"RouteEntryId": "rte-5vb5q8sk0lyoscx8539ds"
}
錯誤碼
|
HTTP status code |
錯誤碼 |
錯誤資訊 |
描述 |
|---|---|---|---|
| 400 | Invalid%s | The specified parameter %s is invalid. | |
| 400 | Missing%s | You must specify the parameter %s. | |
| 400 | ens.interface.error | Failed to call API. | 介面調用發生異常。 |
| 400 | InvalidRouteTableId.NotFound | Specified route table does not exist. | 該路由表不存在。 |
| 400 | IncorrectStatus.Network | The status of the network is incorrect. | 網路的狀態不正確。 |
| 400 | InvalidNetworkType.NotSupported | The specified network type does not supported. | 網路的類型不支援。 |
| 400 | QuotaExceeded | Route entry quota exceeded in this route table. | 路由表中路由條目數量超出限額。 |
| 400 | InvalidRouteEntry.Duplicate | The route entry already exists. | 指定的路由條目已存在。 |
| 400 | InvalidInstanceId.NotFound | The specified InstanceId does not exist. | 指定執行個體不存在 |
| 400 | InvalidCidrBlock.Malformed | Specified CIDR block is not valid. | 目標網段格式錯誤。 |
| 400 | InvalidSourceCidrBlock.Malformed | Specified Source CIDR Block is not valid. | 源網段格式錯誤。 |
| 400 | InvalidSourceCidrBlock.NotSupported | The route table does not support the source CIDR block parameter. | 路由表不支援源網段參數。 |
| 400 | InvalidNextHopType.NotSupported | This next hop type is not supported. | 不支援這種下一跳類型。 |
| 400 | HaVipNotFound | The input parameter haVipId that is not found. | 指定的HaVip不存在。 |
| 400 | IncorrectHaVipStatus | The status of the haVip is invalid. | HaVip的狀態不正確 |
| 400 | InstanceNotFound.NetworkPeerConnection | Network peer connection not found, please check the InstanceId. | 找不到執行個體,請檢查執行個體ID。 |
| 400 | IncorrectStatus.NetworkPeerConnection | The status of the network peer connection is incorrect. | 網路對等串連的狀態不正確。 |
| 400 | IncorrectNetworkInterfaceStatus | The operation could not be completed because the status of the specified network interface is invalid for this action. | 指定的網卡狀態不支援當前操作。 |
| 400 | NoPermission | Permission denied. | |
| 400 | InvalidParameter.%s | The specified field %s invalid. Please check it again. |
訪問錯誤中心查看更多錯誤碼。
變更歷史
更多資訊,參考變更詳情。