You need to enable JavaScript to run this app.
导航
CreateDirectConnectGatewayRoute
最近更新时间:2024.05.17 08:41:54首次发布时间:2022.03.25 07:38:20

调用CreateDirectConnectGatewayRoute为专线网关添加一条静态路由。

调试

请求参数

名称类型是否必选示例值描述
ActionStringCreateDirectConnectGatewayRoute要执行的操作,取值:CreateDirectConnectGatewayRoute。
VersionString2020-04-01API版本信息。
DirectConnectGatewayIdStringdcg-2fe3zsmkshs59g****专线网关的ID。您可调用DescribeDirectConnectGateways查询专线网关的ID。
DestinationCidrBlockString172.XX.XX.0/24专线网关路由的目的网段。
NextHopIdStringdcv-7qthudw0ll6jmc****专线网关路由下一跳虚拟接口的ID。您可调用DescribeDirectConnectVirtualInterfaces查询虚拟接口的ID。

返回数据

名称类型
示例值
描述
RequestIdString202111161611080102121461940900****请求ID。
DirectConnectGatewayRouteIdStringdcr-7qthudw0ll6jmc****新添加静态路由的ID。

请求示例

GET /?Action=CreateDirectConnectGatewayRoute&Version=2020-04-01&DirectConnectGatewayId=dcg-2fe3zsmkshs59g****&DestinationCidrBlock=172.XX.XX.0/24&NextHopId=dcv-7qthudw0ll6jmc**** HTTP/1.1
Host: open.volcengineapi.com
ServiceName: directconnect
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202111161611080102121461940900****",
        "Action": "CreateDirectConnectGatewayRoute",
        "Version": "2020-04-01",
        "Service": "directconnect",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "202111161611080102121461940900****",
        "DirectConnectGatewayRouteId": "dcr-2752hzaqrwfeo7f****"
    }
}

错误码

此处仅展示当前API的错误码,更多错误码请参见公共错误码

HttpCode
错误码
错误信息
描述
400QuotaExceeded.DirectConnectGatewayRouteYou've reached the limit on the number of routes per direct connect gateways that you can create.已达到每个专线网关可创建的路由条目的数量上限。
400InvalidDirectConnectGatewayRoute.InvalidVirtualInterfaceRouteTypeThe specified next hop does not support.指定的下一跳路由类型不支持创建此专线网关路由。
400InvalidRouteCidr.MalformedThe specified CIDR is malformed.指定的网段不合法。
400InvalidDirectConnectGateway.InvalidStatusThe specified direct connect gateway is not in the correct status for the request.指定的专线网关所处的状态无法响应该请求。
400InvalidDirectConnectConnection.InvalidBusinessStatusThe specified direct connect connection is not in the correct status for the request. The specified direct connect connection is in freeze.指定的物理专线所处的状态无法响应该请求。当前物理专线被冻结。
400InvalidDirectConnectGateway.InvalidBusinessStatusThe specified direct connect gateway is not in the correct status for the request. The specified direct connect gateway is in freeze.指定的专线网关所处的状态无法响应该请求。当前专线网关被冻结。
400InvalidCen.InvalidStatusThe CEN attached by the specified direct connect gateway is not in the correct status for the request.指定的专线网关挂载的CEN实例状态无法响应该请求,请稍后再试。
400InvalidCidr.MalformedThe specified cidr block is malformed.指定的网段格式不合法。
400InvalidDirectConnectGatewayRoute.IpVersionMismatchThe specified direct connect virtual interface has no IPv6 address.指定的虚拟接口上没有IPv6地址。
400InvalidDirectConnectVirtualInterface.InvalidStatusThe specified direct connect virtual interface is not in the correct status for the request.指定的虚拟接口所处的状态无法响应该请求。
403Forbidden.IPv6You are not authorized to operate IPv6 functions.无权限操作IPv6功能。
403InvalidOperation.NotSupportThe operation is not supported.当前操作不支持。
404InvalidDirectConnectGateway.NotFoundThe specified direct connect gateway does not exist.指定的专线网关不存在。
404InvalidDirectConnectVirtualInterface.NotFoundThe specified direct connect virtual interface does not exist.指定的虚拟接口不存在。
404InvalidDirectConnectGatewayRoute.InvalidNextHopThe specified virtual interface does not belong to the specified direct connect gateway.指定的下一跳不属于指定的专线网关。
409InvalidRouteCidr.ConflictThere is conflict between the specified route and existed routes.指定的路由与已有路由冲突。