调用CreateDirectConnectGatewayRoute为专线网关添加一条静态路由。
名称 | 类型 | 是否必选 | 示例值 | 描述 |
---|---|---|---|---|
Action | String | 是 | CreateDirectConnectGatewayRoute | 要执行的操作,取值:CreateDirectConnectGatewayRoute。 |
Version | String | 是 | 2020-04-01 | API版本信息。 |
DirectConnectGatewayId | String | 是 | dcg-2fe3zsmkshs59g**** | 专线网关的ID。您可调用DescribeDirectConnectGateways查询专线网关的ID。 |
DestinationCidrBlock | String | 是 | 172.XX.XX.0/24 | 专线网关路由的目的网段。 |
NextHopId | String | 是 | dcv-7qthudw0ll6jmc**** | 专线网关路由下一跳虚拟接口的ID。您可调用DescribeDirectConnectVirtualInterfaces查询虚拟接口的ID。 |
名称 | 类型 | 示例值 | 描述 |
---|---|---|---|
RequestId | String | 202111161611080102121461940900**** | 请求ID。 |
DirectConnectGatewayRouteId | String | dcr-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 | 错误码 | 错误信息 | 描述 |
---|---|---|---|
400 | QuotaExceeded.DirectConnectGatewayRoute | You've reached the limit on the number of routes per direct connect gateways that you can create. | 已达到每个专线网关可创建的路由条目的数量上限。 |
400 | InvalidDirectConnectGatewayRoute.InvalidVirtualInterfaceRouteType | The specified next hop does not support. | 指定的下一跳路由类型不支持创建此专线网关路由。 |
400 | InvalidRouteCidr.Malformed | The specified CIDR is malformed. | 指定的网段不合法。 |
400 | InvalidDirectConnectGateway.InvalidStatus | The specified direct connect gateway is not in the correct status for the request. | 指定的专线网关所处的状态无法响应该请求。 |
400 | InvalidDirectConnectConnection.InvalidBusinessStatus | The specified direct connect connection is not in the correct status for the request. The specified direct connect connection is in freeze. | 指定的物理专线所处的状态无法响应该请求。当前物理专线被冻结。 |
400 | InvalidDirectConnectGateway.InvalidBusinessStatus | The specified direct connect gateway is not in the correct status for the request. The specified direct connect gateway is in freeze. | 指定的专线网关所处的状态无法响应该请求。当前专线网关被冻结。 |
400 | InvalidCen.InvalidStatus | The CEN attached by the specified direct connect gateway is not in the correct status for the request. | 指定的专线网关挂载的CEN实例状态无法响应该请求,请稍后再试。 |
400 | InvalidCidr.Malformed | The specified cidr block is malformed. | 指定的网段格式不合法。 |
400 | InvalidDirectConnectGatewayRoute.IpVersionMismatch | The specified direct connect virtual interface has no IPv6 address. | 指定的虚拟接口上没有IPv6地址。 |
400 | InvalidDirectConnectVirtualInterface.InvalidStatus | The specified direct connect virtual interface is not in the correct status for the request. | 指定的虚拟接口所处的状态无法响应该请求。 |
403 | Forbidden.IPv6 | You are not authorized to operate IPv6 functions. | 无权限操作IPv6功能。 |
403 | InvalidOperation.NotSupport | The operation is not supported. | 当前操作不支持。 |
404 | InvalidDirectConnectGateway.NotFound | The specified direct connect gateway does not exist. | 指定的专线网关不存在。 |
404 | InvalidDirectConnectVirtualInterface.NotFound | The specified direct connect virtual interface does not exist. | 指定的虚拟接口不存在。 |
404 | InvalidDirectConnectGatewayRoute.InvalidNextHop | The specified virtual interface does not belong to the specified direct connect gateway. | 指定的下一跳不属于指定的专线网关。 |
409 | InvalidRouteCidr.Conflict | There is conflict between the specified route and existed routes. | 指定的路由与已有路由冲突。 |