Modifies the configuration of a BGP peer.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
RegionId String Yes cn-shanghai

The region ID of the BGP group to which the BGP peer that you want to modify belongs.

You can call the DescribeRegions operation to query the most recent region list.

BgpPeerId String Yes bgp-m5eoyp2mwegk8ce9v****

The ID of the BGP peer that you want to modify.

BgpGroupId String No bgpg-m5eo12jxuw2hc0uqq****

The ID of the BGP group to which the BGP peer that you want to modify belongs.

PeerIpAddress String No 116.62.XX.XX

The IP address of the BGP peer that you want to modify.

EnableBfd Boolean No false

Specifies whether to enable the Bidirectional Forwarding Detection (BFD) feature. Valid values:

  • true: enables BFD.
  • false: disables BFD. This is the default value.
Action String Yes ModifyBgpPeerAttribute

The operation that you want to perform. Set the value to ModifyBgpPeerAttribute.

ClientToken String No 123e4567-e89b-12d3-a456-426655440000

The client token that is used to ensure the idempotence of the request.

You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length.

Note If you do not set this parameter, the system automatically uses RequestId as ClientToken. RequestId may be different for each API request.
BfdMultiHop Integer No 3

The BFD hop count. Valid values: 1 to 255.

This parameter is required only if you enable BFD.

The parameter specifies the maximum number of network devices that a packet can traverse from the source to the destination. You can set a proper value based on the factors that affect the physical connection.

Response parameters

Parameter Type Example Description
RequestId String D4B7649A-61BB-4C64-A586-1DFF1EDA6A42

The ID of the request.

Examples

Sample requests

http(s)://[Endpoint]/?RegionId=cn-shanghai
&BgpPeerId=bgp-m5eoyp2mwegk8ce9v****
&BgpGroupId=bgpg-m5eo12jxuw2hc0uqq****
&PeerIpAddress=116.62.XX.XX
&EnableBfd=false
&Action=ModifyBgpPeerAttribute
&ClientToken=123e4567-e89b-12d3-a456-426655440000
&BfdMultiHop=3
&Common request parameters

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<ModifyBgpPeerAttributeResponse>
    <RequestId>D4B7649A-61BB-4C64-A586-1DFF1EDA6A42</RequestId>
</ModifyBgpPeerAttributeResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "RequestId" : "D4B7649A-61BB-4C64-A586-1DFF1EDA6A42"
}

Error codes

HttpCode Error code Error message Description
400 InvalidRegionId.NotFound The specified RegionId does not exist in our records. The error message returned because the specified region ID does not exist.
400 OperationFailed.PconnTrafficNotEnable The operation is failed because of PconnTrafficNotEnable. The error message returned because outbound traffic is disabled.

For a list of error codes, visit the API Error Center.