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

专线连接

复制全文
下载 pdf
虚拟接口
CreateDirectConnectVirtualInterface - 创建虚拟接口
复制全文
下载 pdf
CreateDirectConnectVirtualInterface - 创建虚拟接口
调用CreateDirectConnectVirtualInterface创建一个虚拟接口。​
使用说明​
  • 不支持同时开启NQA检测功能和BFD检测功能。​
  • 当前NQA检测功能为邀测状态,如有需要您可联系客户经理。未开通NQA检测功能,调用时请避免传入EnableNqa、NqaDetectInterval、NqaDetectMultiplier。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:CreateDirectConnectVirtualInterface​
接口名称。当前 API 的名称为 CreateDirectConnectVirtualInterface。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
VirtualInterfaceName String 可选 示例值:test​
虚拟接口的名称。​
  • 必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。​
  • 长度限制为1 ~ 128个字符。​
  • 不传入该参数或该参数不传入数值时,默认为虚拟接口实例的ID。​
​
Description String 可选 示例值:This is a sample description​
虚拟接口的描述信息。​
  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、空格( )、下划线(_)、中划线(-)、等号(=)、英文逗号(,)、中文逗号(,)、中文句号(。)。​
  • 长度限制为0 ~ 255个字符。​
  • 不传入该参数或该参数不传入数值时,默认为空字符串。​
​
DirectConnectConnectionId String 必选 示例值:dcc-2fe3zsmkshs59g****​
虚拟接口关联的物理专线的ID。​
您可调用DescribeDirectConnectConnections接口,查询物理专线的ID。​
​
DirectConnectGatewayId String 可选 示例值:dcg-7qthudw0ll6jmc****​
虚拟接口关联的专线网关的ID。​
您可调用DescribeDirectConnectGateways接口,查询专线网关的ID。​
​
VlanId Integer 必选 示例值:2000​
用于连接本地IDC的VLAN ID,请确保此VLAN ID未被占用,取值范围:0 ~ 2999。​
  • 0:表示该物理专线交换机端口上不配置VLAN,使用三层路由接口模式,该模式下一条物理专线上只可创建一个无VLAN标签的虚拟接口。​
  • 1~2999:表示该物理专线的交换机端口采用三层子接口模式,每个子接口配置不同的VLAN ID对应到一个虚拟接口,该模式下一条物理专线上可以创建出多个虚拟接口。​
​
LocalIp String 必选 示例值:192.XX.XX.10/24​
虚拟接口的本端网关互联IP地址。​
​
PeerIp String 必选 示例值:192.XX.XX.20/24​
虚拟接口的对端网关互联IP地址。​
​
LocalIpv6Ip String 可选 示例值:fe80:XX::1/120​
虚拟接口本端网关互联IP的IPv6地址。​
​
PeerIpv6Ip String 可选 示例值:fe80:XX::2/120​
虚拟接口对端网关互联IP的IPv6地址。​
​
RouteType String 可选 示例值:Static​
虚拟接口的路由类型,取值如下:​
  • BGP:BGP动态路由​
  • Static:静态路由​
​
EnableBfd Boolean 可选 示例值:false​
是否开启BFD检测控制报文模式,取值如下:​
  • true:开启​
  • false(默认):不开启​
​
EnableBfdEcho Boolean 可选 示例值:false​
是否开启BFD检测echo报文模式,取值如下:​
  • true:开启​
  • false(默认):不开启​
​
BfdDetectInterval Integer 可选 示例值:1000​
BFD检测时间间隔。单位:ms,取值范围:200~1000,默认1000。未开启BFD检测功能,请避免传入此参数。​
​
BfdDetectMultiplier Integer 可选 示例值:3​
BFD检测次数。取值范围:3~10,默认3。未开启BFD检测功能,请避免传入此参数。​
​
Bandwidth Integer 可选 示例值:100​
虚拟接口的限速带宽,单位:Mbps。​
  • -1(默认):不限速。​
  • 1~100000:虚拟接口出、入云方向的带宽上限,不可超过虚拟接口关联物理专线的带宽。您可调用DescribeDirectConnectConnections查询物理专线的信息。​
  • 若虚拟接口关联的是共享专线,虚拟接口将继承共享专线的带宽,您无需传入此参数。如需传入,请确保传入的值与虚拟接口关联的共享专线带宽值一致,您可调用DescribeSharedDirectConnectConnections查询共享专线信息(共享专线功能当前正在邀测中,仅开通此功能的账号可使用此功能、可见配套文档,如有需要请联系客户经理申请试用)。​
​
Tags.N.Key String 可选 示例值:key1​
虚拟接口标签的标签键(Key)。​
  • 参数 - N - 参数:表示标签键(Key)的序号,取值范围:1、2、3、……、49、50,且N应按照连续的从小到大的顺序。​
  • 多个标签键(Key)之间用&分隔。​
  • 不能以 volc:和sys:开头,包括任意大小写形式。volc:和sys:开头为系统预留标签,禁止创建。​
  • 长度取值范围为1~128字符,允许输入各国语言文字、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。​
​
Tags.N.Value String 可选 示例值:value1​
虚拟接口标签的标签值(Value)。​
  • 参数 - N - 参数:表示标签值(Value)的序号,取值范围:1、2、3、……、49、50,且N应按照连续的从小到大的顺序。​
  • 多个标签值(Value)之间用&分隔。​
  • 长度取值范围为0~256字符,不填默认为空。​
  • 允许输入各国语言文字、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。​
  • 大小写敏感,不能以空格开头或结尾。​
说明​
传入Tags.N.Value则必须传入Tags.N.Key。​
​
EnableNqa Boolean 可选 示例值:true​
是否开启NQA检测功能,取值如下:​
  • true:开启​
  • false(默认):不开启​
说明​
仅RouteType为Static时,支持开启NQA检测功能。​
​
NqaDetectInterval Integer 可选 示例值:3000​
NQA检测发送连续探测报文的时间间隔。单位:ms,取值:1000~5000,默认2000。未开启NQA检测功能,请避免传入此参数。​
​
NqaDetectMultiplier Integer 可选 示例值:8​
NQA检测的时间次数,若NQA检测连续失败次数达到设定的检测次数,则判定此线路故障。取值:3~8 ,默认5。未开启NQA检测功能,请避免传入此参数。​
说明​
开启NQA功能后,若线路流量几乎可达带宽上限,建议把检测次数设为8。​
​
GatewayType String 可选 示例值:DCGW​
虚拟接口关联的网关类型,取值如下:​
  • DCGW(默认):专线网关。​
  • DXGW:全域网关。​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
VirtualInterfaceId String 示例值:dcv-7qthudw0ll6jmc****​
新创建虚拟接口的ID。​
​
​
​
请求示例​
​
GET /?Action=CreateDirectConnectVirtualInterface&Version=2020-04-01&VirtualInterfaceName=test&Description=This is a sample description&DirectConnectConnectionId=dcc-2fe3zsmkshs59g****&DirectConnectGatewayId=dcg-7qthudw0ll6jmc****&VlanId=2000&LocalIp=192.XX.XX.10/24&PeerIp=192.XX.XX.20/24&LocalIpv6Ip=fe80:XX::1/120&PeerIpv6Ip=fe80:XX::2/120&RouteType=Static&EnableBfd=false&EnableBfdEcho=false&BfdDetectInterval=1000&BfdDetectMultiplier=3&Bandwidth=100&Tags.1.Key=key1&Tags.1.Value=value1&EnableNqa=true&NqaDetectInterval=3000&NqaDetectMultiplier=8&GatewayType=DCGW HTTP/1.1​
Host: directconnect.cn-beijing.volcengineapi.com​
X-Date: 20250804T033538Z​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20250804/cn-beijing/directconnect/request, SignedHeaders=host;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "20230604110420****100232280022D31",​
"Action": "CreateDirectConnectVirtualInterface",​
"Version": "2020-04-01",​
"Service": "directconnect",​
"Region": "cn-north-1"​
},​
"Result": {​
"VirtualInterfaceId": "dcv-7qthudw0ll6jmc****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
QuotaExceeded.VirtualInterfacePerGateway​
You've reached the limit on the number of virtual interfaces per direct connect gateway that you can create.​
已达到每个专线网关可创建的虚拟接口的数量上限。​
400​
QuotaExceeded.VirtualInterfacePerConnection​
You've reached the limit on the number of virtual interfaces per direct connect connection that you can create.​
已达到每条物理专线可创建的虚拟接口的数量上限。​
400​
InvalidDirectConnectVirtualInterface.LocalIpMalformed​
The specified virtual interface local IP is malformed.​
指定的虚拟接口本端互联IP地址不合法。​
400​
InvalidDirectConnectVirtualInterface.PeerIpMalformed​
The specified virtual interface peer IP is malformed.​
指定的虚拟接口对端互联IP地址不合法。​
400​
InvalidDirectConnectVirtualInterface.PeerIpMismatch​
The specified virtual interface Peer IP and Local IP are not in the same subnet.​
指定的虚拟接口对端互联IP地址与本端互联IP地址不在同一个子网。​
400​
InvalidDirectConnectVirtualInterface.VlanIdMalformed​
The specified virtual interface Vlan ID is malformed.​
指定的虚拟接口VLAN ID不合法。​
400​
InvalidDirectConnectVirtualInterface.RouteTypeMalformed​
The specified virtual interface route type is malformed.​
指定的虚拟接口路由类型不合法。​
400​
InvalidDirectConnectVirtualInterface.ConnectionIsShared​
The specified virtual interface connection is shared. You can not create a new virtual interface which Vlan ID is 0.​
指定的虚拟接口所在的专线已共享。无法创建VLAN ID为0的新虚拟接口。​
400​
InvalidDirectConnectVirtualInterface.ConnectionIsExclusive​
The specified virtual interface connection is exclusive. You can not create another virtual interface.​
指定的虚拟接口所在的专线已独占。无法创建新的虚拟接口。​
400​
InvalidDirectConnectVirtualInterface.DirectConnectGatewayMismatch​
The specified direct connect gateway and connection are in different switches.​
指定的专线网关和物理专线不在同一接入交换机。​
400​
InvalidName.Malformed​
The specified name is malformed. Ensure the maximum length of name is 128.​
指定的名称格式不合法。名称长度不能超过128个字符。​
400​
InvalidName.Malformed​
The specified name is malformed.​
指定的名称格式不合法。请修复名称格式后重试。​
400​
InvalidDescription.Malformed​
The specified description is malformed. Ensure the maximum length of description is 255.​
指定的描述格式不合法。描述长度不能超过255个字符。​
400​
InvalidDescription.Malformed​
The specified description is malformed.​
指定的描述格式不合法。请修复描述格式后重试。​
400​
InvalidDirectConnectVirtualInterface.BandwidthMismatch​
The specified bandwidth of virtual interface is inconsistent with the bandwidth of the shared connection.​
指定的虚拟接口带宽与共享专线的带宽不一致。​
400​
InvalidDirectConnectVirtualInterface.BfdBfdEchoBothEnabled​
The specified virtual interface does not support enabling bfd and bfd echo at the same time.​
指定的虚拟接口不支持同时启动BFD控制报文模式和ECHO模式检测。​
400​
InvalidDirectConnectVirtualInterface.VlanIdMismatch​
TThe specified Vlan ID of virtual interface is inconsistent with the Vlan ID of the shared connection.​
指定的虚拟接口VLAN ID与共享专线的VLAN ID不一致。​
400​
InvalidDirectConnectVirtualInterface.BandwidthMalformed​
The specified bandwidth is malformed.​
指定的带宽不合法。​
400​
InvalidDirectConnectVirtualInterface.BandwidthExceeded​
The specified bandwidth of virtual interface exceeds the bandwidth of physical connection.​
指定的虚拟接口带宽超过了物理专线带宽。​
400​
InvalidDirectConnectVirtualInterface.EnableBfdMismatch​
The specified virtual interface route type does not support enable bfd.​
指定的虚拟接口路由类型不支持启用BFD检测。​
400​
InvalidDirectConnectVirtualInterface.BfdDetectIntervalMalformed​
The specified bfd detect interval is malformed. It can only be set when bfd is enabled, and the value should be between 200 and 1000.​
指定的BFD检测间隔数值不合法。只有在启用BFD时才可设置该值,且该值应在200和1000之间。​
400​
InvalidDirectConnectVirtualInterface.BfdDetectMultiplierMalformed​
The specified bfd detect multiplier is malformed. It can only be set when bfd is enabled, and the value should be between 3 and 10.​
指定的BFD检测次数数值不合法。只有在启用BFD时才可设置该值,且该值应在3和10之间。​
400​
InvalidTagKey.Malformed​
The specified parameter tag key is invalid.​
标签键不合法。​
400​
InvalidTagValue.Malformed​
The specified parameter tag value is invalid.​
标签值不合法。​
400​
LimitExceeded.Tags​
You've reached the limit on the number of tags that you can operate at one time.​
已达到单次可操作标签数量的上限。​
400​
InvalidTag.Disorder​
The specified index order of tag is malformed.​
指定标签的索引顺序参数格式不合法。​
400​
InvalidDirectConnectConnection.InvalidStatus​
The specified direct connect connection is not in the correct status for the request.​
指定的物理专线所处的状态无法响应该请求。​
400​
InvalidDirectConnectGateway.InvalidStatus​
The specified direct connect gateway is not in the correct status for the request.​
指定的专线网关所处的状态无法响应该请求。​
400​
InvalidDirectConnectVirtualInterface.EnableNqaMismatch​
The specified virtual interface route type does not support enable nqa.​
指定的虚拟接口路由类型不支持启用NQA检测。​
400​
InvalidDirectConnectVirtualInterface.NqaBfdEchoBothEnabled​
The specified virtual interface does not support enabling bfd echo and nqa at the same time.​
指定的虚拟接口不支持同时启动BFD ECHO模式和NQA检测。​
400​
InvalidDirectConnectVirtualInterface.NqaDetectIntervalMalformed​
The specified nqa detect interval is malformed. It can only be set when nqa is enabled, and the value should be between 1000 and 5000.​
指定的NQA检测间隔数值不合法。只有在启用NQA时才可设置该值,且该值应在1000和5000之间。​
400​
InvalidDirectConnectVirtualInterface.NqaDetectMultiplierMalformed​
The specified nqa detect multiplier is malformed. It can only be set when nqa is enabled, and the value should be between 3 and 8.​
指定的NQA检测次数数值不合法。只有在启用NQA时才可设置该值,且该值应在3和8之间。​
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​
InvalidDirectConnectVirtualInterface.GatewayIpv6NotEnable​
The specified direct connect gateway does not enable IPv6.​
指定的专线网关未启用IPv6。​
400​
InvalidDirectConnectVirtualInterface.Ipv6IpMissing​
The specified virtual interface local IPv6 IP or peer IPv6 IP is missing, they must either both be configured or not configured at all.​
指定的虚拟接口必须同时指定本端IPv6地址和对端IPv6地址。​
400​
InvalidDirectConnectVirtualInterface.LocalIpv6IpMalformed​
The specified virtual interface local IPv6 address is malformed.​
指定的虚拟接口本端IPv6地址不合法。​
400​
InvalidDirectConnectVirtualInterface.PeerIpv6IpMalformed​
The specified virtual interface peer IPv6 address is malformed.​
指定的虚拟接口对端IPv6地址不合法。​
400​
InvalidDirectConnectVirtualInterface.PeerIpv6IPMismatch​
The specified virtual interface Peer IPv6 IP and Local IPv6 IP are not in the same subnet.​
指定的虚拟接口对端IPv6地址与本端IPv6地址不在同一个子网。​
400​
InvalidDirectConnectVirtualInterface.NqaBfdBothEnabled​
The specified virtual interface does not support enabling bfd and nqa at the same time.​
指定的虚拟接口不支持同时启动BFD和NQA检测。​
400​
LimitExceeded.PhysicalLineBandwidth​
You’ve reached the bandwidth limit on the number of physical line.​
已达到物理线路可分配带宽上限。​
400​
InvalidDirectConnectTrafficQosPolicy.DirectConnectConnectionWithDifferentQos​
In the direct connect gateway with multiple direct connect connections scene, it is not supported to associate with different qos policy in all direct connect connections.​
多条物理专线关联同一个专线网关场景下,多条物理专线仅可绑定同一个QoS策略。​
403​
Forbidden.IPv6​
You are not authorized to operate IPv6 functions.​
无权限操作IPv6功能。​
403​
Forbidden​
You are not authorized to perform nqa operations on the specified virtual interface.​
无权限对指定的虚拟接口进行NQA操作。​
403​
InvalidDirectConnectVirtualInterface.BfdEchoForbidden​
You are not authorized to perform bfd echo operations on the specified virtual interface.​
无权限对指定的虚拟接口进行BFD echo操作。​
404​
InvalidDirectConnectConnection.NotFound​
The specified direct connect connection does not exist.​
指定的物理专线不存在。​
404​
InvalidDirectConnectGateway.NotFound​
The specified direct connect gateway does not exist.​
指定的专线网关不存在。​
409​
InvalidDirectConnectVirtualInterface.PeerIpConflict​
The specified virtual interface peer IP conflicts with its local IP.​
指定的虚拟接口对端互联IP地址与本端互联IP地址重复。​
409​
InvalidDirectConnectVirtualInterface.VlanIdConflict​
The specified virtual interface Vlan ID already exists.​
指定的虚拟接口VLAN ID已存在。​
409​
InvalidDirectConnectVirtualInterface.LocalIpConflict​
The specified virtual interface local IP already exists.​
指定的虚拟接口本端互联IP地址已存在。​
409​
InvalidDirectConnectVirtualInterface.PeerIpv6IpConflict​
The specified virtual interface peer IPv6 IP conflicts with its local IPv6 IP.​
指定的虚拟接口对端IPv6地址与本端IPv6地址重复。​
409​
InvalidDirectConnectVirtualInterface.LocalIpv6IpConflict​
The subnet of the specified virtual interface local IPv6 IP overlaps with another virtual interface.​
指定的虚拟接口本端IPv6地址所在子网与另一个虚拟接口所在子网重叠。​
​
​
最近更新时间:2026.07.10 15:41:38
这个页面对您有帮助吗?
有用
有用
无用
无用