You need to enable JavaScript to run this app.
文档中心
专线连接

专线连接

复制全文
下载 pdf
专线网关路由
CreateDirectConnectGatewayRoute - 创建专线网关路由
复制全文
下载 pdf
CreateDirectConnectGatewayRoute - 创建专线网关路由
调用CreateDirectConnectGatewayRoute为专线网关添加一条静态路由。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:CreateDirectConnectGatewayRoute​
接口名称。当前 API 的名称为 CreateDirectConnectGatewayRoute。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
DirectConnectGatewayId String 必选 示例值:dcg-2fe3zsmkshs59g****​
专线网关的ID。​
您可调用DescribeDirectConnectGateways查询专线网关的ID。​
​
DestinationCidrBlock String 必选 示例值:172.XX.XX.0/24​
专线网关路由的目的网段。​
​
NextHopId String 必选 示例值:dcv-7qthudw0ll6jmc****​
专线网关路由下一跳虚拟接口的ID。​
您可调用DescribeDirectConnectVirtualInterfaces查询虚拟接口的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: directconnect.cn-beijing.volcengineapi.com​
X-Date: 20251121T094038Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20251121/cn-beijing/directconnect/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202111161611080102121461940900****",​
"Action": "CreateDirectConnectGatewayRoute",​
"Version": "2020-04-01",​
"Service": "directconnect",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "202111161611080102121461940900****",​
"DirectConnectGatewayRouteId": "dcr-2752hzaqrwfeo7f****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
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.​
指定的路由与已有路由冲突。​
​
​
最近更新时间:2026.01.23 17:00:39
这个页面对您有帮助吗?
有用
有用
无用
无用