Upgrade and Degrade of Peer Connection Bandwidth
Last Updated:2020-07-20
Description
Upgrade the bandwidth for the specified peer connection.
- The bandwidth can be upgraded and degraded only by the acceptor for different accounts.
- The prepaid peer connection can only upgrade and cannot degrade the bandwidth.
- The postpaid peer connection can both upgrade and degrade the bandwidth.
Request Structure
PUT /v{version}/peerconn/{peerConnId}?{action}&clientToken={clientToken} HTTP/1.1
Host: bcc.bj.baidubce.com
Authorization: authorization string
{
"newBandwidthInMbps":newBandwidthInMbps
}
Request Parameter
Parameter name | Type | Required or not | Parameter position | Description |
---|---|---|---|---|
version | String | Yes | URL parameter | API version number (the current value is 1) |
peerConnId | String | Yes | URL parameter | peer connection of renewal |
action | String | Yes | Query parameter | The value of the parameter is resize in this interface |
newBandwidthInMbps | int | Yes | RequestBody parameter | Upgraded and degraded bandwidth |
clientToken | String | No | Query parameter | Idempotence Token is an ASCII string with length not exceeding 64 bytes, for details, please see ClientToken Idempotence |
Return Header
There are no other special headers except the public headers.
Return Parameter
There is no special return parameter.
Request Example
PUT /v1/peerconn/peerconn-9td54fmx143e?resize&clientToken=dc31ef8c-5e41-4e38-9ds0-9de75d0ds5b20 HTTP/1.1
host: bcc.bj.baidubce.com
content-type: application/json
authorization: bce-auth-v1/7784e2058c1111e8b62ccf3a4a052967/2018-07-20T11:51:01Z/3600/host;x-bce-account;x-bce-client-ip;x-bce-date;x-bce-request-id;x-bce-security-token/13b9b4830ef19459427e78e61ab811a765ab68416b3ba097e18164b534906ceb
{
"newBandwidthInMbps":20
}
Return Example
HTTP/1.1 200 OK
x-bce-request-id: 3ef091f6-37a4-450c-b8a9-ce64a2e80b27
Date: Fri, 20 Jul 2018 02:47:39 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS