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

专线连接

复制全文
下载 pdf
BGP邻居
CreateBgpPeer - 创建BGP邻居
复制全文
下载 pdf
CreateBgpPeer - 创建BGP邻居
调用CreateBgpPeer为路由方式为“BGP路由”的虚拟接口创建一个BGP邻居。​
调试​
API Explorer
您可以通过 API Explorer 在线发起调用,无需关注签名生成过程,快速获取调用结果。
​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action String 必选 示例值:CreateBgpPeer​
接口名称。当前 API 的名称为 CreateBgpPeer。​
​
Version String 必选 示例值:2020-04-01​
接口版本。当前 API 的版本为 2020-04-01。​
​
BgpPeerName String 可选 示例值:test​
BGP邻居的名称。​
  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、下划线(_)和短横线(-)。​
  • 长度限制为1 ~ 128个字符。​
  • 不传入该参数或该参数不传入数值时,默认为BGP连接实例的ID。​
​
Description String 可选 示例值:This is a sample description​
BGP邻居的描述信息。​
  • 以中文、字母、数字开头,只能包含中文、字母、数字、点号(.)、空格( )、下划线(_)、中划线(-)、等号(=)、英文逗号(,)、中文逗号(,)、中文句号(。)。​
  • 长度限制为0 ~ 255个字符。​
  • 不传入该参数或该参数不传入数值时,默认为空字符串。​
​
VirtualInterfaceId String 必选 示例值:dcv-3tehy13n2l4c6c0v****​
BGP邻居所在虚拟接口的ID。您可调用DescribeDirectConnectVirtualInterfaces查询虚拟接口的ID。​
​
RemoteAsn Integer 必选 示例值:32500​
BGP邻居的ASN。​
ASN有效范围1~4294960000,不可与火山引擎的ASN(137718)重复。​
​
AuthKey String 可选 示例值:testAuth​
BGP邻居的认证密钥。​
  • 长度范围6~80个字符。​
  • 可输入英文大小写字母、特殊符号~`!@#$%^*()-_=+[]{}|,./;:及数字。​
​
IpVersion String 可选 示例值:IPv4​
BGP邻居的IP类型。​
  • IPv4(默认)​
  • IPv6​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
BgpPeerId String 示例值:bgp-2752hz4teko3k7fap8u4c****​
新创建BGP邻居的ID。​
​
​
​
请求示例​
​
GET /?Action=CreateBgpPeer&Version=2020-04-01&BgpPeerName=test&Description=test&VirtualInterfaceId=dcv-3tehy13n2l4c6c0v****&RemoteAsn=32500&AuthKey=testA**** 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": "CreateBgpPeer",​
"Version": "2020-04-01",​
"Service": "directconnect",​
"Region": "cn-beijing"​
},​
"Result": {​
"RequestId": "202111161611080102121461940900****",​
"BgpPeerId": "bgp-2752hz4teko3k7fap8u4c****"​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
400​
InvalidBgpPeer.RemoteAsnMalformed​
The specified remote ASN is malformed. Ensure that you've specified the remote ASN is not 137718.​
指定的ASN不合法。ASN不能和火山引擎ASN一致。​
400​
InvalidBgpPeer.VirtualInterfaceMalformed​
The specified virtual interface does not support creating a BGP Peer.​
指定的虚拟接口不支持创建BGP邻居。​
400​
InvalidBgpPeer.RemoteAsnMalformed​
The specified BGP remote ASN is malformed.​
指定ASN不合法。​
400​
InvalidBgpPeer.AuthKeyMalformed​
The specified BGP AuthKey is malformed.​
指定的BGP认证密钥不合法。​
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​
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​
InvalidBgpPeer.IpVersionMalformed​
The specified IP version is malformed.​
指定的IP版本不合法。​
400​
InvalidBgpPeer.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.​
指定的虚拟接口所处的状态无法响应该请求。​
400​
InvalidBgpPeer.RemoteAsnConflictBgpAsn​
The specified ASN is invalid. The ASN cannot be the same as the ASN of direct connect gateway.​
指定的BGP邻居ASN不合法,不能和专线网关ASN一致。​
403​
Forbidden.IPv6​
You are not authorized to operate IPv6 functions.​
无权限操作IPv6功能。​
403​
InvalidOperation.NotSupport​
The operation is not supported.​
当前操作不支持。​
404​
InvalidDirectConnectVirtualInterface.NotFound​
The specified direct connect virtual interface does not exist.​
指定的虚拟接口不存在。​
409​
InvalidBgpPeer.Conflict​
The specified BGP peer conflicts with another BGP peer.​
指定的BGP邻居与另一条BGP邻居冲突。​
​
​
最近更新时间:2026.01.23 17:00:40
这个页面对您有帮助吗?
有用
有用
无用
无用