百度智能云

All Product Document

          Load Balance

          Common BLB Back-end Server Related Interface

          AddBackendServers

          Description

          • Add backend server for specified LoadBalancer, and batch add is supported.

          Request Structure

          POST /v{version}/blb/{blbId}/backendserver?clientToken={clientToken} HTTP/1.1 
          Host: blb.bj.baidubce.com 
          Authorization: authorization string 
          
          { 
              "backendServerList":[ 
                  { 
                      "instanceId":instanceId, 
                      "weight":weight 
                  },... 
              ] 
          } 

          Request Header

          There are no other special headers except the public headers.

          Request Parameter

          Parameter name Type Required or not Parameter position Description
          version String Yes URL parameter API version number (the current value is 1)
          blbId String Yes URL parameter The identifier of the own LoadBalancer
          clientToken String Yes Query parameter Idempotent Token, no longer than 64 bits
          backendServerList List<BackendServerModel> Yes RequestBody parameter List of backend servers to be added

          Return Status Code

          "200" for return successful and Error Code for return failed.

          Return Header

          There are no other special headers except the public headers.

          Return Parameter

          None

          Request Example

          POST /v1/blb/lb-j8UqijYf/backendserver?clientToken=clienttokentest 
          Host: blb.bj.baidubce.com 
          Authorization: authorization string 
          
          { 
              "backendServerList":[ 
                  { 
                      "instanceId":"i-YfAibl4A", 
                      "weight":"50" 
                  }, 
                  { 
                      "instanceId":"i-jBXABQ8D", 
                      "weight":"60" 
                  } 
              ] 
          } 

          Response Example

          HTTP/1.1 200 OK 
          x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
          Date: Fri, 03 Jun 2016 03:54:29 GMT 
          Transfer-Encoding: chunked 
          Content-Type: application/json;charset=UTF-8 
          Server: BWS 

          DescribeHealthStatus

          Description

          • Query the backend server information under the specified LoadBalancer. You need to specify the listening port. The result will return the health status of the backend server.
          • The result supports marker paging. The default paging size is 1,000, and can be specified by the maxKeys parameter

          Request Structure

          GET /v{version}/blb/{blbId}/backendserver?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1 
          Host: blb.bj.baidubce.com 
          Authorization: authorization string 

          Request Header

          There are no other special headers except the public headers.

          Request Parameter

          Parameter name Type Required or not Parameter position Description
          version String Yes URL parameter API version number (the current value is 1)
          blbId String Yes URL parameter The identifier of the own LoadBalancer
          listenerPort int Yes Query parameter The listener port to query
          marker String No Query parameter The starting location of query for batch acquisition of lists, and is one string generated by the system.
          maxKeys int No Query parameter Maximum number contained in each page, generally not exceeding 1000. The default value is 1000.

          Return Status Code

          "200" for return successful and Error Code for return failed.

          Return Header

          There are no other special headers except the public headers.

          Return Parameter

          Parameter name Type Description
          backendServerList List<BackendServerStatus> Backend server status list
          type String Listener model with a value of "TCP"/"HTTP"
          listenerPort int Listening port of listener
          backendPort int Listening port of backend server
          marker string Mark the starting position of the query. The item does not exist if the result list is empty
          isTruncated boolean True means there are additional data in the following pages and false means the current page is the last page.
          nextMarker String The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false.
          maxKeys int Maximum number contained in each page.

          Request Example

          GET /v1/blb/lb-j8UqijY/backendserver?listenerPort=88 HTTP/1.1 
          Host: blb.bj.baidubce.com 
          Authorization: authorization string 

          Response Example

          HTTP/1.1 200 OK 
          x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
          Date: Fri, 03 Jun 2016 03:54:29 GMT 
          Transfer-Encoding: chunked 
          Content-Type: application/json;charset=UTF-8 
          Server: BWS 
          
          { 
              "backendServerList": [ 
                  { 
                      "instanceId": "i-YfAibl4A", 
                      "weight": 50, 
                      "status": "Alive" 
                  }, 
                  { 
                      "instanceId": "i-jBXABQ8D", 
                      "weight": 60, 
                      "status": "Dead" 
                  } 
              ], 
              "type": "TCP", 
              "listenerPort": 88, 
              "backendPort": 88, 
              "marker": "rs-0A6BE9BB", 
              "nextMarker": null, 
              "isTruncated": false, 
              "maxKeys": 1000 
          } 

          DescribeBackendServers

          Description

          • Query the list of backend servers under the specified LoadBalancer.
          • The result supports marker paging. The default paging size is 1,000, and can be specified by the maxKeys parameter.

          Request Structure

          GET /v{version}/blb/{blbId}/backendserver?marker={marker}&maxKeys={maxKeys} HTTP/1.1 
          Host: blb.bj.baidubce.com 
          Authorization: authorization string 

          Request Header

          There are no other special headers except the public headers.

          Request Parameter

          Parameter name Type Required or not Parameter position Description
          version String Yes URL parameter API version number (the current value is 1)
          blbId String Yes URL parameter The identifier of the own LoadBalancer
          marker String No Query parameter The starting location of query for batch acquisition of lists, and is one string generated by the system.
          maxKeys int No Query parameter Maximum number contained in each page, generally not exceeding 1000. The default value is 1000.

          Return Status Code

          "200" for return successful and Error Code for return failed.

          Return Header

          There are no other special headers except the public headers.

          Return Parameter

          Parameter name Type Description
          backendServerList List<BackendServerModel> Backend server list
          marker string Mark the starting position of the query. The item does not exist if the result list is empty
          isTruncated boolean True means there are additional data in the following pages and false means the current page is the last page.
          nextMarker String The marker value requiring to be passed in order to acquire the next page. The domain doesn't appear when isTruncated is false.
          maxKeys int Maximum number contained in each page.

          Request Example

          GET /v1/blb/lb-j8UqijY/backendserver HTTP/1.1 
          Host: blb.bj.baidubce.com 
          Authorization: authorization string 

          Response Example

           HTTP/1.1 200 OK 
           x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
           Date: Fri, 03 Jun 2016 03:54:29 GMT 
           Transfer-Encoding: chunked 
           Content-Type: application/json;charset=UTF-8 
           Server: BWS 
          { 
              "backendServerList": [ 
                  { 
                      "instanceId": "i-YfAibl4A", 
                      "weight": 50, 
                  } 
              ], 
              "marker": "rs-0A6BE9BB", 
              "nextMarker": null, 
              "isTruncated": false, 
              "maxKeys": 1000 
          } 

          UpdateBackendServers

          Description

          Update the backend server weights under the specified LoadBalancer and batch modification is supported.

          Request Structure

          PUT /v{version}/blb/{blbId}/backendserver?{action}&clientToken={clientToken} HTTP/1.1 
          Host: blb.bj.baidubce.com 
          Authorization: authorization string 
          
          { 
              "backendServerList":[ 
                  { 
                      "instanceId":instanceId, 
                      "weight":weight 
                  },... 
              ] 
          } 

          Request Header

          There are no other special headers except the public headers.

          Request Parameter

          Parameter name Type Required or not Parameter position Description
          version String Yes URL parameter API version number (the current value is 1)
          blbId String Yes URL parameter The identifier of the own LoadBalancer
          action String Yes Query parameter Must be update
          clientToken String Yes Query parameter Idempotent Token, no longer than 64 bits
          backendServerList List<BackendServerModel> Yes RequestBody parameter List of backend servers to be updated

          Return Status Code

          "200" for return successful and Error Code for return failed.

          Return Header

          There are no other special headers except the public headers.

          Return Parameter

          None

          Request Example

          PUT /v1/blb/lb-j8UqijYf/backendserver?update&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1 
          Host: blb.bj.baidubce.com 
          Authorization: bce-auth-v1/ae4780f344774daa832f34caadd4d7de/2016-06-03T03:26:45Z/1800/host/c863c8b9f75ff307eb1a3c564307b0833acb9d857c65de108258c3edd4cd0118 
          
          { 
              "backendServerList":[ 
                  { 
                      "instanceId":"i-YfAibl4A", 
                      "weight":"50" 
                  }, 
                  { 
                      "instanceId":"i-jBXABQ8D", 
                      "weight":"60" 
                  } 
              ] 
          } 

          Response Example

          HTTP/1.1 200 OK 
          x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
          Date: Fri, 03 Jun 2016 03:54:29 GMT 
          Transfer-Encoding: chunked 
          Content-Type: application/json;charset=UTF-8 
          Server: BWS 

          RemoveBackendServers

          Description

          • Release the backend server specified by its identifier under the specified LoadBalancer.
          • Support batch release.

          Request Structure

          PUT /v{version}/blb/{blbId}/backendserver?clientToken={clientToken} HTTP/1.1 
          Host: blb.bj.baidubce.com 
          Authorization: authorization string 
          
          { 
              "backendServerList":[backendServer1,backendServer2,...] 
          } 

          Request Header

          There are no other special headers except the public headers.

          Request Parameter

          Parameter name Type Required or not Parameter position Description
          version String Yes URL parameter API version number (the current value is 1)
          blbId String Yes URL parameter The identifier of the own LoadBalancer
          clientToken String Yes Query parameter Idempotent Token, no longer than 64 bits
          backendServerList List<String> Yes RequestBody parameter All backend server identifiers to be released form an array together

          Return Status Code

          "200" for return successful and Error Code for return failed.

          Return Header

          There are no other special headers except the public headers.

          Return Parameter

          None

          Request Example

          PUT /v1/blb/lb-j8UqijY/backendserver?clientToken=shfkjanajsabvhj HTTP/1.1 
          Host: blb.bj.baidubce.com 
          Authorization: authorization string 
          
          { 
              "backendServerList":["i-jBXABQ8D"] 
          } 

          Response Example

          HTTP/1.1 200 OK 
          x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
          Date: Fri, 03 Jun 2016 03:54:29 GMT 
          Transfer-Encoding: chunked 
          Content-Type: application/json;charset=UTF-8 
          Server: BWS
          Previous
          Common BLB Instance Related Interface
          Next
          Common BLB Monitor Related Interface