You need to enable JavaScript to run this app.
导航

CreateDirectConnectVirtualInterface

最近更新时间2024.04.18 19:01:51

首次发布时间2022.03.25 07:38:20

调用CreateDirectConnectVirtualInterface创建一个虚拟接口。

调用说明

  • 不支持同时开启NQA检测功能和BFD检测功能。
  • 当前NQA检测功能为邀测状态,如有需要您可联系客户经理。未开通NQA检测功能,调用时请避免传入EnableNqaNqaDetectIntervalNqaDetectMultiplier

调试

请求参数

名称类型是否必选示例值描述
ActionStringCreateDirectConnectVirtualInterface要执行的操作,取值为CreateDirectConnectVirtualInterface。
VersionString2020-04-01API版本信息。

VirtualInterfaceName

String

test

虚拟接口的名称。

  • 以中文、字母、数字开头,只能包含中文、字母、必须以字母或中文开头,可包含数字、点号(.)、下划线(_)和短横线(-)。
  • 长度限制为1 ~ 128个字符。
  • 不传入该参数或该参数不传入数值时,默认为虚拟接口实例的ID。

Description

String

This is a sample description

虚拟接口的描述信息。

  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、空格( )、下划线(_)、中划线(-)、等号(=)、英文逗号(,)、中文逗号(,)、中文句号(。)。
  • 长度限制为0 ~ 255个字符。
  • 不传入该参数或该参数不传入数值时,默认为空字符串。
DirectConnectConnectionIdStringdcc-2fe3zsmkshs59g****虚拟接口关联的物理专线的ID。您可调用DescribeDirectConnectConnections查询物理专线的ID。
DirectConnectGatewayIdStringdcg-7qthudw0ll6jmc****虚拟接口关联的专线网关的ID。您可调用DescribeDirectConnectGateways查询专线网关的ID。

VlanId

Integer

2000

用于连接本地IDC的VLAN ID,请确保此VLAN ID未被占用,取值范围:0 ~ 2999。

  • 0:表示该物理专线交换机端口上不配置VLAN,使用三层路由接口模式,该模式下一条物理专线上只可创建一个无VLAN标签的虚拟接口。
  • 1~2999:表示该物理专线的交换机端口采用三层子接口模式,每个子接口配置不同的VLAN ID对应到一个虚拟接口,该模式下一条物理专线上可以创建出多个虚拟接口。
LocalIpString192.XX.XX.10/24虚拟接口的本端网关互联IP地址。
PeerIpString192.XX.XX.20/24虚拟接口的对端网关互联IP地址。
LocalIpv6IpStringfe80:XX::1/120虚拟接口本端网关互联IP的IPv6地址。
PeerIpv6IpStringfe80:XX::2/120虚拟接口对端网关互联IP的IPv6地址。

RouteType

String

Static

虚拟接口的路由类型,取值如下:

  • BGP:BGP动态路由
  • Static:静态路由

EnableBfd

Boolean

false

是否开启BFD检测。

  • true:开启
  • false(默认):不开启
BfdDetectIntervalInteger1000BFD检测时间间隔。单位:ms,取值范围:200~1000,默认1000。未开启BFD检测功能,请避免传入此参数。
BfdDetectMultiplierInteger3BFD检测次数。取值范围:3~10,默认3。未开启BFD检测功能,请避免传入此参数。

Bandwidth

Integer

100

虚拟接口的限速带宽,单位:Mbps。

  • -1(默认):不限速
  • 不可超过所关联物理专线的带宽。
  • 若关联的是共享专线,则继承共享专线带宽,不可修改。

Tags.N.Key

String

Tags.1.Key=key1&Tags.2.Key=key2&Tags.3.Key=key3

虚拟接口标签的标签键(Key)。

  • 参数 - N - 参数:表示标签键(Key)的序号,取值范围:1、2、3、……、49、50,且N应按照连续的从小到大的顺序。
  • 多个标签键(Key)之间用&分隔。
  • 不能以 volc:sys:开头,包括任意大小写形式。volc:sys:开头为系统预留标签,禁止创建。
  • 长度取值范围为1~128字符,允许输入各国语言文字、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。

Tags.N.Value

String

Tags.1.Value=value1&Tags.2.Value=value2&Tags.3.Value=value3

虚拟接口标签的标签值(Value)。

  • 参数 - N - 参数:表示标签值(Value)的序号,取值范围:1、2、3、……、49、50,且N应按照连续的从小到大的顺序。
  • 多个标签值(Value)之间用&分隔。
  • 长度取值范围为0~256字符,不填默认为空。
  • 允许输入各国语言文字、数字、空格()、下划线(_)、点号(.)、半角冒号(:)、斜杠(/)、等号(=)、加号(+)、中划线(-)和@(@)。
  • 大小写敏感,不能以空格开头或结尾。

说明

传入Tags.N.Value则必须传入Tags.N.Key

EnableNqa

Boolean

true

是否开启NQA检测功能。

  • true:开启
  • false(默认):不开启

说明

RouteTypeStatic时,支持开启NQA检测功能。

NqaDetectIntervalInteger3000NQA检测发送连续探测报文的时间间隔。单位:ms,取值:1000~5000,默认2000。未开启NQA检测功能,请避免传入此参数。

NqaDetectMultiplier

Integer

8

NQA检测的时间次数,若NQA检测连续失败次数达到设定的检测次数,则判定此线路故障。取值:3~8 ,默认5。未开启NQA检测功能,请避免传入此参数。

说明

开启NQA功能后,若线路流量几乎可达带宽上限,建议把检测次数设为8

返回数据

名称类型
示例值
描述
RequestIdString202111161611080102121461940900****请求ID。
VirtualInterfaceIdStringdcv-7qthudw0ll6jmc****新创建虚拟接口的ID。

请求示例

GET /?Action=CreateDirectConnectVirtualInterface&Version=2020-04-01&VirtualInterfaceName=test&Description=test&DirectConnectConnectionId=dcc-2fe3zsmkshs59g****&DirectConnectGatewayId=dcg-7qthudw0ll6jmc****&VlanId=2000&LocalIp=192.XX.XX.10/24&PeerIp=192.XX.XX.20/24 HTTP/1.1
Host: open.volcengineapi.com
ServiceName: directconnect
Region: cn-beijing

返回示例

{
    "ResponseMetadata": {
        "RequestId": "202111161611080102121461940900****",
        "Action": "CreateDirectConnectVirtualInterface",
        "Version": "2020-04-01",
        "Service": "directconnect",
        "Region": "cn-beijing"
    },
    "Result": {
        "RequestId": "202111161611080102121461940900****",
        "VirtualInterfaceId": "dcv-7qthudw0ll6jmc****"
    }
}

错误码

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

HttpCode
错误码
错误信息
描述
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.指定的专线网关和物理专线不在同一接入交换机。
400InvalidName.MalformedThe specified name is malformed. Ensure the maximum length of name is 128.指定的名称格式不合法。名称长度不能超过128个字符。
400InvalidName.MalformedThe specified name is malformed.指定的名称格式不合法。请修复名称格式后重试。
400InvalidDescription.MalformedThe specified description is malformed. Ensure the maximum length of description is 255.指定的描述格式不合法。描述长度不能超过255个字符。
400InvalidDescription.MalformedThe specified description is malformed.指定的描述格式不合法。请修复描述格式后重试。
400
InvalidDirectConnectVirtualInterface.BandwidthMismatch
The specified bandwidth of virtual interface is inconsistent with the bandwidth of the shared connection.指定的虚拟接口带宽与共享专线的带宽不一致。
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之间。
400InvalidTagKey.MalformedThe specified parameter tag key is invalid.标签键不合法。
400InvalidTagValue.MalformedThe specified parameter tag value is invalid.标签值不合法。
400LimitExceeded.TagsYou've reached the limit on the number of tags that you can operate at one time.已达到单次可操作标签数量的上限。
400InvalidTag.DisorderThe specified index order of tag is malformed.指定标签的索引顺序参数格式不合法。
400InvalidDirectConnectConnection.InvalidStatusThe specified direct connect connection is not in the correct status for the request.指定的物理专线所处的状态无法响应该请求。
400InvalidDirectConnectGateway.InvalidStatusThe specified direct connect gateway is not in the correct status for the request.指定的专线网关所处的状态无法响应该请求。
400InvalidDirectConnectVirtualInterface.EnableNqaMismatchThe specified virtual interface route type does not support enable nqa.指定的虚拟接口路由类型不支持启用NQA检测。
400InvalidDirectConnectVirtualInterface.NqaDetectIntervalMalformedThe 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之间。
400InvalidDirectConnectVirtualInterface.NqaDetectMultiplierMalformedThe 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之间。
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.指定的专线网关所处的状态无法响应该请求。当前专线网关被冻结。
400InvalidDirectConnectVirtualInterface.GatewayIpv6NotEnableThe specified direct connect gateway does not enable IPv6.指定的专线网关未启用IPv6。
400InvalidDirectConnectVirtualInterface.Ipv6IpMissingThe 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地址。
400InvalidDirectConnectVirtualInterface.LocalIpv6IpMalformedThe specified virtual interface local IPv6 address is malformed.指定的虚拟接口本端IPv6地址不合法。
400InvalidDirectConnectVirtualInterface.PeerIpv6IpMalformedThe specified virtual interface peer IPv6 address is malformed.指定的虚拟接口对端IPv6地址不合法。
400InvalidDirectConnectVirtualInterface.PeerIpv6IPMismatchThe specified virtual interface Peer IPv6 IP and Local IPv6 IP are not in the same subnet.指定的虚拟接口对端IPv6地址与本端IPv6地址不在同一个子网。
400InvalidDirectConnectVirtualInterface.NqaBfdBothEnabledThe specified virtual interface does not support enabling bfd and nqa at the same time.指定的虚拟接口不支持同时启动BFD和NQA检测。
403Forbidden.IPv6You are not authorized to operate IPv6 functions.无权限操作IPv6功能。
403ForbiddenYou are not authorized to perform nqa operations on the specified virtual interface.无权限对指定的虚拟接口进行NQA操作。
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地址已存在。
409InvalidDirectConnectVirtualInterface.PeerIpv6IpConflictThe specified virtual interface peer IPv6 IP conflicts with its local IPv6 IP.指定的虚拟接口对端IPv6地址与本端IPv6地址重复。
409InvalidDirectConnectVirtualInterface.LocalIpv6IpConflictThe subnet of the specified virtual interface local IPv6 IP overlaps with another virtual interface.指定的虚拟接口本端IPv6地址所在子网与另一个虚拟接口所在子网重叠。