调用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. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。