调用CreateBgpPeer接口向指定的BGP组中添加BGP邻居。
调试
您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。
调试
授权信息
|
操作 |
访问级别 |
资源类型 |
条件关键字 |
关联操作 |
|
vpc:CreateBgpPeer |
create |
*VirtualBorderRouter
|
无 | 无 |
请求参数
|
名称 |
类型 |
必填 |
描述 |
示例值 |
| RegionId |
string |
是 |
BGP 组所在的地域 ID。 您可以通过调用 DescribeRegions 接口获取地域 ID。 |
cn-shanghai |
| BgpGroupId |
string |
是 |
BGP 组的 ID。 |
bgpg-wz9f62v4fbg**** |
| PeerIpAddress |
string |
否 |
BGP 邻居的 IP 地址。 |
116.62.XX.XX |
| EnableBfd |
boolean |
否 |
是否开启 BFD 功能,取值:
|
true |
| ClientToken |
string |
否 |
客户端 Token,用于保证请求的幂等性。 由客户端生成该参数值,要保证在不同请求间唯一,最大值不超过 64 个 ASCII 字符。 说明
若您未指定,则系统自动使用 API 请求的 RequestId 作为 ClientToken 标识。每次 API 请求的 RequestId 不一样。 |
123e4567-e89b-12d3-a456-426655440000 |
| IpVersion |
string |
否 |
IP 版本。取值:
|
IPv4 |
| BfdMultiHop |
integer |
否 |
BFD 跳数。取值范围:1~255。 选择开启 BFD 功能时,需要配置此参数。 输入 BFD 跳数,即数据从源端到目标端传输时经过的最大设备数量。您可以根据真实的物理链路因素配置不同的跳数。 说明
当您在多云环境或光纤直连组网中使用 BFD,中间无任何桥接设备时,则需要将 BFD 的默认跳数从 255 改成 1。 |
3 |
返回参数
|
名称 |
类型 |
描述 |
示例值 |
|
object |
|||
| BgpPeerId |
string |
BGP 邻居的 ID。 |
bgp-m5eoyp2mwegk8ce9v**** |
| RequestId |
string |
请求 ID。 |
D4B7649A-61BB-4C64-A586-1DFF1EDA6A42 |
示例
正常返回示例
JSON格式
{
"BgpPeerId": "bgp-m5eoyp2mwegk8ce9v****",
"RequestId": "D4B7649A-61BB-4C64-A586-1DFF1EDA6A42"
}
错误码
|
HTTP status code |
错误码 |
错误信息 |
描述 |
|---|---|---|---|
| 400 | QuotaExceeded.Bgp | bgp peer count per vbr quota exceed. | 边界路由器的BGP邻居数量已达到配额。 |
| 400 | QuotaExceeded.Nqa | nqa count per vbr quota exceed. | |
| 400 | InvalidAccessDeviceId.NotFound | There is no Access_Device_Id in our records | |
| 400 | QuotaExceeded.BfdSession | Your Bfd Session number reaches the upper limit. | |
| 400 | QuotaExceeded.BgpNetwork | bgp network count per vbr quota exceed. | |
| 400 | InvalidPeerIpAddress | multi pconn peer ip can not be null. | |
| 400 | InvalidVbrNetwork | vbr netowrk not exists | |
| 400 | InvalidBgpGroup | bgp group not exists | |
| 400 | InvalidBgpName.Malformed | Specified Bgp Group name is not valid. | |
| 400 | InvalidBgpDiscription.Malformed | Specified Bgp Group description is not valid. | |
| 400 | InvalidBgpAuthkey.Malformed | Specified Bgp Group authkey is not valid. | |
| 400 | InvalidIP.Malformed | Ip malformed. | |
| 400 | InvalidPeerAsn.Malformed | invalid peer asn cannot equals aliyun asn:45104 | |
| 400 | InvalidParams.NotNull | invalid peer asn cannot equals aliyun asn:45104 | |
| 400 | InvalidParams.NotFound | instance not found | |
| 400 | InvalidParams.AlreadyExists | bgp network already exists | BGP网络已经存在。 |
| 400 | InvalidStatus.CannotOperate | invalid status cannot operate | |
| 400 | InvalidParams.PeerIpAddressMustPointOut | vbr has 0 or more than 1 subif ,point out peerIpAddress. | 请指出PeerIpAddress |
| 400 | InvalidParams.PeerIpAddressInUse | peer ip address in use ,cannot create bgp peer. | 对等IP地址正在使用,无法创建BGP对等。 |
| 400 | BgpPeer.Already.Exists | bgp peer already exists. | |
| 400 | MissingParam.EnableBfd | The parameter EnableBfd is missing. | |
| 400 | OperationUnsupported.IPV6ForThisRegion | This Region is unsupported IPV6. | |
| 400 | IllegalParam.BfdMultiHop | BfdMultiHop is illegal. | |
| 400 | OperationFailed.PconnTrafficNotEnable | The operation is failed because of PconnTrafficNotEnable. | 操作失败,因为出方向流量未开通。 |
| 400 | UnsupportedFeature.Vpconn | The feature of Vpconn is not supported. | 不支持Vpconn类型。 |
| 400 | DuplicatedParam.PeerIpAddress | The param of PeerIpAddress is duplicated. | BGP邻居IP地址重复。 |
| 400 | DuplicatedParam.LocalIpAddress | The LocalIpAddress already exists. | 本端IP地址参数有重复,请更换本端IP后重试。 |
| 400 | DuplicatedParam.PeerIpv6Address | The PeerIpv6Address already exists. | 对端IP地址参数有重复,请更换对端IP后重试。 |
| 400 | DuplicatedParam.LocalIpv6Address | The LocalIpv6Address already exists. | 本端IP地址参数有重复,请更换本端IP后重试。 |
| 400 | IllegalParam.LocalGatewayIpAndMask | The LocalGatewayIpAndMask value is invalid. | 本端网关IP和掩码非法,请更正后重试。 |
| 400 | IllegalParam.PeeringIpv6SubnetMask | The PeeringIpv6SubnetMask value is invalid. | 掩码非法,请更正后重试。 |
| 400 | IllegalParam.IpVersion | The param of IPV6 is illegal. | 参数 IpVersion 异常,请核对参数后重试. |
| 400 | IllegalParam.PeerIpAddress | The param of PeerIpAddress is illegal. | 对端Ip地址非法。 |
| 404 | InvalidRegionId.NotFound | Specified value of "regionId" is not supported. |
访问错误中心查看更多错误码。
变更历史
更多信息,参考变更详情。