Common BLB Monitor Related Interface
CreateTCPListener
Description
- Under the specified LoadBalancer, create a TCP protocol-based listener to listen to a frontend port, and forward all TCP traffic sent to this port to the backend port monitored by the backend server. The TCP listener only supports the health check of the TCP protocol. The check port is the same as the backend server listening port.
Request Structure
POST /v{version}/blb/{blbId}/TCPlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"backendPort":backendPort,
"scheduler":scheduler,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold
}
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 | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
backendPort | int | Yes | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
tcpSessionTimeout | int | No | RequestBody parameter | TCP sets the connection timeout (unit: seconds). The default value is 900, which should be an integer between 10 and 4000 |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2-5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2-5 |
udpSessionTimeout | int | No | RequestBody parameter | The udp session timeout duration. The default value is 90. This parameter needs to be an integer between 5-4000 and in seconds |
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/TCPlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
CreateUDPListener
Description
- Under the specified LoadBalancer, create a UDP protocol-based listener to listen to a frontend port and forward all UDP traffic sent to the port to the backend port monitored by the backend server. The UDP listener only supports the health check of the UDP protocol. The check port is the same as the backend server listening port.
Request Structure
POST /v{version}/blb/{blbId}/UDPlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"backendPort":backendPort,
"scheduler":scheduler,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold,
"healthCheckString":"health check"
}
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 |
listenerPort | int | Yes | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
backendPort | int | Yes | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
healthCheckString | String | Yes | RequestBody parameter | For the request string sent by health, the back-end server needs to respond after receiving it. It supports hexadecimal \00-\FF and standard ascii strings, with a maximum length of 1299 |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2 and 5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2 and 5 |
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/UDPlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2,
"healthCheckString":"health check"
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
CreateHTTPListener
Description
- Under the specified LoadBalancer, create a listener based on the HTTP protocol to listen to a frontend port and forward all HTTP requests sent to this port to the backend port monitored by the backend server.
Request Structure
POST /v{version}/blb/{blbId}/HTTPlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"backendPort":backendPort,
"scheduler":scheduler,
"keepSession":keepSession,
"keepSessionType":keepSessionType,
"keepSessionDuration":keepSessionDuration,
"keepSessionCookieName":keepSessionCookieName,
"xForwardFor":xForwardFor,
"healthCheckType":healthCheckType,
"healthCheckPort":healthCheckPort,
"healthCheckURI":healthCheckURI,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold,
"healthCheckNormalStatus":healthCheckNormalStatus,
"serverTimeout":serverTimeout,
"redirectPort":redirectPort
}
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 | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
backendPort | int | Yes | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 2 methods: "RoundRobin"/"LeastConnection" |
keepSession | bool | No | RequestBody parameter | Whether to enable the keep session feature with which requests from the same Client will reach the same backend server; disabled by default |
keepSessionType | String | No | RequestBody parameter | Cookie processing method of keep session; valid only if keep session is enabled; supports "insert"/"rewrite"; "insert" by default |
keepSessionDuration | int | No | RequestBody parameter | Cookie validity time of keep session (unit: seconds); valid only if keep session is enabled. 3,600 sec by default; must be an integer between 1 and 15,552,000. |
keepSessionCookieName | String | No | RequestBody parameter | The name of the cookie that needs to be overwritten during keep session. It is valid only if keep session is enabled and keepSessionType = "rewrite". |
xForwardFor | bool | No | RequestBody parameter | Whether to obtain the real IP address of the client. After it is enabled, the client's real address can be obtained through the X-Forwarded-For HTTP header on the backend server. It is disabled by default. |
healthCheckType | String | No | RequestBody parameter | Health check protocol supports "HTTP"/"TCP" with HTTP by default |
healthCheckPort | int | No | RequestBody parameter | Health check port with backendPort by default |
healthCheckURI | String | No | RequestBody parameter | Health check URI,/by default. Effective when the health check protocol is "HTTP" |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2 and 5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2 and 5 |
healthCheckNormalStatus | String | No | RequestBody parameter | The HTTP status code when the health check is normal. It supports 5 types of status code combinations like "http_1xx| http_2xx", and is "http_2xx| http_3xx" by default. Effective when the health check protocol is "HTTP" |
serverTimeout | int | No | RequestBody parameter | Backend server timeout (unit: second); 30s by default; it must be an integer between 1 and 3600 |
redirectPort | int | No | RequestBody parameter | Forward the request received by this listener to the HTTPS listener specified through this port |
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/HTTPlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":95,
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2,
"xForwardFor":true,
"healthCheckType":"HTTP",
"serverTimeout":1800,
"healthCheckNormalStatus":"http_1xx| http_2xx",
"redirectPort":80
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
CreateHTTPSListener
Description
Under the specified LoadBalancer, create a listener based on the HTTPS protocol and listen to a frontend port. All HTTPS requests sent to this port will be converted to HTTP requests through SSL offload and then forwarded to the backend port monitored by the backend server. on.
Request Structure
POST /v{version}/blb/{blbId}/HTTPSlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"backendPort":backendPort,
"scheduler":scheduler,
"keepSession":keepSession,
"keepSessionType":keepSessionType,
"keepSessionDuration":keepSessionDuration,
"keepSessionCookieName":keepSessionCookieName,
"xForwardFor":xForwardFor,
"healthCheckType":healthCheckType,
"healthCheckPort":healthCheckPort,
"healthCheckURI":healthCheckURI,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold,
"healthCheckNormalStatus":healthCheckNormalStatus,
"serverTimeout":serverTimeout,
"certIds":[id1, id2],
"ie6Compatible":true,
"encryptionType":encryptionType,
"encryptionProtocols":[protocal1, protacal2],
"dualAuth":false,
"clientCertIds":[id1, id2]
}
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 |
listenerPort | int | Yes | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
backendPort | int | Yes | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 2 methods: "RoundRobin"/"LeastConnection" |
keepSession | boolean | No | RequestBody parameter | Whether to enable the keep session feature with which requests from the same Client will reach the same backend server; disabled by default |
keepSessionType | String | No | RequestBody parameter | Cookie processing method of keep session; valid only if keep session is enabled; supports "insert"/"rewrite"; "insert" by default |
keepSessionDuration | int | No | RequestBody parameter | Cookie validity time of keep session (unit: seconds); valid only if keep session is enabled. 3,600 sec by default; must be an integer between 1 and 15,552,000. |
keepSessionCookieName | String | No | RequestBody parameter | The name of the cookie that needs to be overwritten during keep session. It is valid only if keep session is enabled and keepSessionType = "rewrite". |
xForwardFor | boolean | No | RequestBody parameter | Whether to obtain the real IP address of the client. After it is enabled, the client's real address can be obtained through the X-Forwarded-For HTTP header on the backend server. It is disabled by default. |
healthCheckType | String | No | RequestBody parameter | Health check protocol supports "HTTP"/"TCP" with HTTP by default |
healthCheckPort | int | No | RequestBody parameter | Health check port with backendPort by default |
healthCheckURI | String | No | RequestBody parameter | Health check URI,/by default. Effective when the health check protocol is "HTTP" |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2 and 5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2 and 5 |
healthCheckNormalStatus | String | No | RequestBody parameter | The HTTP status code when the health check is normal. It supports 5 types of status code combinations like "http_1xx| http_2xx", and is "http_2xx| http_3xx" by default. Effective when the health check protocol is "HTTP" |
serverTimeout | int | No | RequestBody parameter | Backend server timeout (unit: second); 30s by default; it must be an integer between 1 and 3600 |
certIds | List\<String> | Yes | RequestBody parameter | The certificate chain to be loaded by the listener |
ie6Compatible | boolean | No | RequestBody parameter | Whether compatible with the HTTPS request of IE6 (the protocol format is the earlier SSL3.0 with poor security); enabled by default |
encryptionType | String | No | RequestBody parameter | Encryption option supports three types: compatibleIE/incompatibleIE/userDefind ie6Compatible field pass value does not take effect when encryptionType has a value and is legal |
encryptionProtocols | List\<String> | No | RequestBody parameter | When the encryptionType value is userDefind, the protocol type list is a string list formed by the combination of four protocols: "sslv3", "tlsv10", "tlsv11", and "tlsv12" |
dualAuth | boolean | No | RequestBody parameter | Whether to enable two-way authentication. The default is off. |
clientCertIds | List\<String> | No | RequestBody parameter | The client certificate chain loaded when dualAuth is true |
Return Status Code
"200" for return successful andError Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
None
POST /v1/blb/lb-j8UqijYf/HTTPSlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2,
"xForwardFor":true,
"healthCheckType":"HTTP",
"serverTimeout":1800,
"healthCheckNormalStatus":"http_1xx| http_2xx",
"certIds":["cert-zfj2ey2z4kmm"]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
CreateSSLListener
Description
- Under the specified LoadBalancer, create a TCP protocol-based listener to listen to a frontend port, and forward all TCP traffic sent to this port to the backend port monitored by the backend server. The TCP listener only supports the health check of the TCP protocol. The check port is the same as the backend server listening port.
Request Structure
POST /v{version}/blb/{blbId}/SSLlistener?clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"listenerPort":listenerPort,
"backendPort":backendPort,
"scheduler":scheduler,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold,
"certIds":[id1, id2],
"ie6Compatible":true,
"encryptionType":encryptionType,
"encryptionProtocols":[protocal1, protacal2],
"dualAuth":false,
"clientCertIds":[id1, id2]
}
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 |
listenerPort | int | Yes | RequestBody parameter | The listening port of the listener. It must be an integer between 1 and 65535. |
backendPort | int | Yes | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | Yes | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2-5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2-5 |
certIds | List\<String> | Yes | RequestBody parameter | The certificate chain to be loaded by the listener |
ie6Compatible | boolean | No | RequestBody parameter | Whether compatible with the HTTPS request of IE6 (the protocol format is the earlier SSL3.0 with poor security); enabled by default |
encryptionType | String | No | RequestBody parameter | Encryption option supports three types: compatibleIE/incompatibleIE/userDefind ie6Compatible field pass value does not take effect when encryptionType has a value and is legal |
encryptionProtocols | List\<String> | No | RequestBody parameter | When the encryptionType value is userDefind, the protocol type list is a string list formed by the combination of four protocols: "sslv3", "tlsv10", "tlsv11", and "tlsv12" |
dualAuth | boolean | No | RequestBody parameter | Whether to enable two-way authentication. The default is off. |
clientCertIds | List\<String> | No | RequestBody parameter | The client certificate chain loaded when dualAuth is true |
Return Status Code
"200" for return successful andError 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/SSLlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2,
"certIds":["cert-zfj2ey2z4kmm"]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
DescribeTCPListeners
Description
- Query information about all TCP listeners under the specified LoadBalancer.
- Support matching query by listener port.
- 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}/TCPlistener?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 | No | 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 andError Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
listenerList | List<TCPListenerModel> | List containing query results |
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-j8UqijYf/TCPlistener?maxKeys=2 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: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"listenerList": [
{
"listenerPort": 80,
"backendPort": 80,
"scheduler": "RoundRobin",
"healthCheckTimeoutInSecond": 3,
"healthCheckInterval": 3,
"unhealthyThreshold": 3,
"healthyThreshold": 3
},
{
"listenerPort": 88,
"backendPort": 88,
"scheduler": "RoundRobin",
"healthCheckTimeoutInSecond": 2,
"healthCheckInterval": 4,
"unhealthyThreshold": 3,
"healthyThreshold": 3
}
],
"marker": "listener-0050",
"nextMarker": null,
"isTruncated": false,
"maxKeys": 2
}
DescribeUDPListener
Description
- Query information about all UDP listeners under the specified LoadBalancer
- Support matching query by listener port
- 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}/UDPlistener?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 | No | 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 andError Code for return failed
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
listenerList | List<UDPListenerModel> | List containing query results |
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-j8UqijYf/UDPlistener?maxKeys=2 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"listenerList": [
{
"listenerPort": 80,
"backendPort": 80,
"scheduler": "RoundRobin",
"healthCheckTimeoutInSecond": 3,
"healthCheckInterval": 3,
"unhealthyThreshold": 3,
"healthyThreshold": 3,
"healthCheckString":"health check"
},
{
"listenerPort": 88,
"backendPort": 88,
"scheduler": "RoundRobin",
"healthCheckTimeoutInSecond": 2,
"healthCheckInterval": 4,
"unhealthyThreshold": 3,
"healthyThreshold": 3,
"healthCheckString":"health check"
}
],
"marker": "listener-0050",
"nextMarker": null,
"isTruncated": false,
"maxKeys": 2
}
DescribeHTTPListeners
Description
- Query information about all HTTP listeners under the specified LoadBalancer
- Support matching query by listener port
- 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}/HTTPlistener?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 | No | 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 andError Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
listenerList | List<HTTPListenerModel> | List containing query results |
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-j8UqijYf/HTTPlistener?maxKeys=2 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 06:42:44 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"listenerList": [
{
"listenerPort": 90,
"backendPort": 90,
"scheduler": "LeastConnection",
"healthCheckTimeoutInSecond": 4,
"healthCheckInterval": 5,
"unhealthyThreshold": 2,
"healthyThreshold": 3,
"keepSession": false,
"keepSessionType": null,
"keepSessionDuration": null,
"keepSessionCookieName": null,
"xForwardFor": false,
"healthCheckType": "HTTP",
"healthCheckPort": 90,
"healthCheckURI": "/",
"healthCheckNormalStatus": "http_2xx| http_3xx",
"serverTimeout": 30,
"redirectPort": 80
},
{
"listenerPort": 95,
"backendPort": 95,
"scheduler": "LeastConnection",
"healthCheckTimeoutInSecond": 4,
"healthCheckInterval": 5,
"unhealthyThreshold": 2,
"healthyThreshold": 3,
"keepSession": false,
"keepSessionType": null,
"keepSessionDuration": null,
"keepSessionCookieName": null,
"xForwardFor": false,
"healthCheckType": "HTTP",
"healthCheckPort": 95,
"healthCheckURI": "/",
"healthCheckNormalStatus": "http_1xx| http_2xx",
"serverTimeout": 1800,
"redirectPort": 80
}
],
"marker": "listener-005A",
"nextMarker": "listener-0322",
"isTruncated": true,
"maxKeys": 2
}
DescribeHTTPSListeners
Description
- Query information about all HTTPS listeners under the specified LoadBalancer.
- Support matching query by listener port.
- 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}/HTTPSlistener?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 | No | 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 andError Code for return failed.
Return Header
There are no other special headers except the public headers.
Return Parameter
Parameter name | Type | Description |
---|---|---|
listenerList | List<HTTPSListenerModel> | List containing query results |
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-j8UqijYf/HTTPSlistener?maxKeys=2 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 06:42:44 GMT Transfer-Encoding: chunked Content-Type: application/json;charset=UTF-8 Server: BWS
{
"listenerList": [
{
"listenerPort": 90,
"backendPort": 90,
"scheduler": "LeastConnection",
"healthCheckTimeoutInSecond": 4,
"healthCheckInterval": 5,
"unhealthyThreshold": 2,
"healthyThreshold": 3,
"keepSession": false,
"keepSessionType": null,
"keepSessionDuration": null,
"keepSessionCookieName": null,
"xForwardFor": false,
"healthCheckType": "HTTP",
"healthCheckPort": 90,
"healthCheckURI": "/",
"healthCheckNormalStatus": "http_2xx| http_3xx",
"serverTimeout": 30,
"certIds": ["cert-zfj2ey2z4kmm"],
"ie6Compatible": true
},
{
"listenerPort": 95,
"backendPort": 95,
"scheduler": "LeastConnection",
"healthCheckTimeoutInSecond": 4,
"healthCheckInterval": 5,
"unhealthyThreshold": 2,
"healthyThreshold": 3,
"keepSession": false,
"keepSessionType": null,
"keepSessionDuration": null,
"keepSessionCookieName": null,
"xForwardFor": false,
"healthCheckType": "HTTP",
"healthCheckPort": 95,
"healthCheckURI": "/",
"healthCheckNormalStatus": "http_1xx| http_2xx",
"serverTimeout": 1800,
"certIds": ["cert-zfj2ey2z4kmm"],
"ie6Compatible": true
}
],
"marker": "listener-005A",
"nextMarker": "listener-0322",
"isTruncated": true,
"maxKeys": 2
}
DescribeSSLListeners
Description
- Query information about all SSL listeners under the specified LoadBalancer.
- Support matching query by listener port.
- 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}/SSLlistener?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 | No | 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 |
---|---|---|
listenerList | List<SSLListenerModel> | List containing query results |
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-j8UqijYf/SSLlistener?maxKeys=2 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
{
"listenerList": [
{
"listenerPort": 80,
"backendPort": 80,
"scheduler": "RoundRobin",
"healthCheckTimeoutInSecond": 3,
"healthCheckInterval": 3,
"unhealthyThreshold": 3,
"healthyThreshold": 3
},
{
"listenerPort": 88,
"backendPort": 88,
"scheduler": "RoundRobin",
"healthCheckTimeoutInSecond": 2,
"healthCheckInterval": 4,
"unhealthyThreshold": 3,
"healthyThreshold": 3
}
],
"marker": "listener-0050",
"nextMarker": null,
"isTruncated": false,
"maxKeys": 2
}
UpdateTCPListener
Description
Update the TCP listener parameters under the specified LoadBalancer. All the specified fields in the request parameters will be updated. The unspecified fields remain unchanged, and the listener is specified through the port.
Request Structure
PUT /v{version}/blb/{blbId}/TCPlistener?listenerPort={listenerPort}&clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"backendPort":backendPort,
"scheduler":scheduler,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold
}
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 be updated needs to be an integer between 1 and 65,535 |
backendPort | int | No | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | No | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2-5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2-5 |
Return Status Code
"200" for return successful andError 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/TCPlistener?listenerPort=80&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
UpdateUDPListener
Description
- Update the UDP listener parameters under the specified LoadBalancer. All the domains specified in the request parameters will be updated, the unspecified domains will remain unchanged, and the listener will be specified through the port.
Request Structure
PUT /v{version}/blb/{blbId}/UDPlistener?listenerPort={listenerPort} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"backendPort":backendPort,
"scheduler":scheduler,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold,
"healthCheckString":"health check"
}
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 listening port of the listener. It must be an integer between 1 and 65535. |
backendPort | int | No | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | No | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2 and 5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2 and 5 |
healthCheckString | String | No | RequestBody parameter | A healthy sent request string that the backend server needs to respond to when it receives it. It supports standard escapes such as \00 and \xf2, which is convenient for configuring binary format requests. |
udpSessionTimeout | int | No | RequestBody parameter | The udp session timeout duration. The default value is 90. This parameter needs to be an integer between 5-4000 and in seconds |
Return Status Code
"200" for return successful andError 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/UDPlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2,
"healthCheckString":"health check"
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
UpdateHTTPListener
Description
- Update the HTTP listener parameters under the specified LoadBalancer. All the domains specified in the request parameters will be updated. The unspecified domains will remain unchanged. The listener is specified through the port.
Request Structure
PUT /v{version}/blb/{blbId}/HTTPlistener?listenerPort={listenerPort}&clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"backendPort":backendPort,
"scheduler":scheduler,
"keepSession":keepSession,
"keepSessionType":keepSessionType,
"keepSessionDuration":keepSessionDuration,
"keepSessionCookieName":keepSessionCookieName,
"xForwardFor":xForwardFor,
"healthCheckType":healthCheckType,
"healthCheckPort":healthCheckPort,
"healthCheckURI":healthCheckURI,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold,
"healthCheckNormalStatus":healthCheckNormalStatus,
"serverTimeout":serverTimeout,
"redirectPort":redirectPort
}
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 be updated needs to be an integer between 1 and 65,535 |
backendPort | int | No | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | No | RequestBody parameter | Load balancing algorithm supports 2 methods: "RoundRobin"/"LeastConnection" |
keepSession | bool | No | RequestBody parameter | Whether to enable the keep session feature with which requests from the same Client will reach the same backend server; disabled by default |
keepSessionType | String | No | RequestBody parameter | Cookie processing method of keep session; valid only if keep session is enabled; supports "insert"/"rewrite"; "insert" by default |
keepSessionDuration | int | No | RequestBody parameter | Cookie validity time of keep session (unit: seconds); valid only if keep session is enabled. 3,600 sec by default; must be an integer between 1 and 15,552,000. |
keepSessionCookieName | String | No | RequestBody parameter | The name of the cookie that needs to be overwritten during keep session. It is valid only if keep session is enabled and keepSessionType = "rewrite". |
xForwardFor | bool | No | RequestBody parameter | Whether to obtain the real IP address of the client. After it is enabled, the client's real address can be obtained through the X-Forwarded-For HTTP header on the backend server. It is disabled by default. |
healthCheckType | String | No | RequestBody parameter | Health check protocol supports "HTTP"/"TCP" with HTTP by default |
healthCheckPort | int | No | RequestBody parameter | Health check port with backendPort by default |
healthCheckURI | String | No | RequestBody parameter | Health check URI,/by default. Effective when the health check protocol is "HTTP" |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2 and 5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2 and 5 |
healthCheckNormalStatus | String | No | RequestBody parameter | The HTTP status code when the health check is normal. It supports 5 types of status code combinations like "http_1xx| http_2xx", and is "http_2xx| http_3xx" by default. Effective when the health check protocol is "HTTP" |
serverTimeout | int | No | RequestBody parameter | Backend server timeout (unit: second); 30s by default; it must be an integer between 1 and 3600 |
redirectPort | int | No | RequestBody parameter | Forward the request received by this listener to the HTTPS listener specified through this port |
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/HTTPlistener?listenerPort=8080&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2,
"xForwardFor":true,
"healthCheckType":"HTTP",
"serverTimeout":1800,
"healthCheckNormalStatus":"http_1xx| http_2xx"
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
UpdateHTTPSListener
Description
- Update the HTTPS listener parameters under the specified LoadBalancer. All the domains specified in the request parameters will be updated, the unspecified domains will remain unchanged, and the listener will be specified through the port.
Request Structure
PUT /v{version}/blb/{blbId}/HTTPSlistener?listenerPort={listenerPort}&clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"backendPort":backendPort,
"scheduler":scheduler,
"keepSession":keepSession,
"keepSessionType":keepSessionType,
"keepSessionDuration":keepSessionDuration,
"keepSessionCookieName":keepSessionCookieName,
"xForwardFor":xForwardFor,
"healthCheckType":healthCheckType,
"healthCheckPort":healthCheckPort,
"healthCheckURI":healthCheckURI,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold,
"healthCheckNormalStatus":healthCheckNormalStatus,
"serverTimeout":serverTimeout,
"certIds":[id1, id2],
"ie6Compatible":true
}
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 be updated needs to be an integer between 1 and 65,535 |
backendPort | int | No | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | No | RequestBody parameter | Load balancing algorithm supports 2 methods: "RoundRobin"/"LeastConnection" |
keepSession | bool | No | RequestBody parameter | Whether to enable the keep session feature with which requests from the same Client will reach the same backend server; disabled by default |
keepSessionType | String | No | RequestBody parameter | Cookie processing method of keep session; valid only if keep session is enabled; supports "insert"/"rewrite"; "insert" by default |
keepSessionDuration | int | No | RequestBody parameter | Cookie validity time of keep session (unit: seconds); valid only if keep session is enabled. 3,600 sec by default; must be an integer between 1 and 15,552,000. |
keepSessionCookieName | String | No | RequestBody parameter | The name of the cookie that needs to be overwritten during keep session. It is valid only if keep session is enabled and keepSessionType = "rewrite". |
xForwardFor | bool | No | RequestBody parameter | Whether to obtain the real IP address of the client. After it is enabled, the client's real address can be obtained through the X-Forwarded-For HTTP header on the backend server. It is disabled by default. |
healthCheckType | String | No | RequestBody parameter | Health check protocol supports "HTTP"/"TCP" with HTTP by default |
healthCheckPort | int | No | RequestBody parameter | Health check port with backendPort by default |
healthCheckURI | String | No | RequestBody parameter | Health check URI,/by default. Effective when the health check protocol is "HTTP" |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2 and 5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2 and 5 |
healthCheckNormalStatus | String | No | RequestBody parameter | The HTTP status code when the health check is normal. It supports 5 types of status code combinations like "http_1xx| http_2xx", and is "http_2xx| http_3xx" by default. Effective when the health check protocol is "HTTP" |
serverTimeout | int | No | RequestBody parameter | Backend server timeout (unit: second); 30s by default; it must be an integer between 1 and 3600 |
certIds | List<int> | No | RequestBody parameter | The certificate chain to be loaded by the listener |
ie6Compatible | bool | No | RequestBody parameter | Whether compatible with the HTTPS request of IE6 (the protocol format is the earlier SSL3.0 with poor security); enabled by default |
Return Status Code
"200" for return successful andError 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/HTTPSlistener?listenerPort=88&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2,
"xForwardFor":true,
"healthCheckType":"HTTP",
"serverTimeout":1800,
"healthCheckNormalStatus":"http_1xx| http_2xx"
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
UpdateSSLListener
Description
- Update the SSL listener parameters under the specified LoadBalancer. All the domains specified in the request parameters will be updated, the unspecified domains will remain unchanged, and the listener will be specified through the port.
Request Structure
PUT /v{version}/blb/{blbId}/SSLlistener?listenerPort={listenerPort} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"backendPort":backendPort,
"scheduler":scheduler,
"healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
"healthCheckInterval":healthCheckInterval,
"unhealthyThreshold":unhealthyThreshold,
"healthyThreshold":healthyThreshold,
"certIds":[id1, id2],
"ie6Compatible":true,
"encryptionType":encryptionType,
"encryptionProtocols":[protocal1, protacal2],
"dualAuth":false,
"clientCertIds":[id1, id2]
}
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 be updated needs to be an integer between 1 and 65,535 |
backendPort | int | No | RequestBody parameter | The listening port of the backend server, which must be an integer between 1 and 65,535 |
scheduler | String | No | RequestBody parameter | Load balancing algorithm supports 3 methods: "RoundRobin"/"LeastConnection"/"Hash" |
tcpSessionTimeout | int | No | RequestBody parameter | TCP sets the connection timeout (unit: seconds). The default value is 900, which should be an integer between 10 and 4000 |
healthCheckTimeoutInSecond | int | No | RequestBody parameter | Health check timeout (unit: second); 3 by default; it must be an integer between 1 and 60 |
healthCheckInterval | int | No | RequestBody parameter | Health check interval (unit: second); 3 by default; it must be an integer between 1 and 10 |
unhealthyThreshold | int | No | RequestBody parameter | Unhealthy threshold (the number of failed consecutive health check before the backend server is blocked). 3 by default, must be an integer between 2 and 5 |
healthyThreshold | int | No | RequestBody parameter | Healthy threshold (the number of successful consecutive health checks before the backend server is made available again). 3 by default, must be an integer between 2 and 5 |
certIds | List\<int> | No | RequestBody parameter | The certificate chain to be loaded by the listener |
ie6Compatible | boolean | No | RequestBody parameter | Whether compatible with the HTTPS request of IE6 (the protocol format is the earlier SSL3.0 with poor security); enabled by default |
encryptionType | String | No | RequestBody parameter | Encryption option supports three types: compatibleIE/incompatibleIE/userDefind ie6Compatible field pass value does not take effect when encryptionType has a value and is legal |
encryptionProtocols | List\<String> | No | RequestBody parameter | When the encryptionType value is userDefind, the protocol type list is a string list formed by the combination of four protocols: "sslv3", "tlsv10", "tlsv11", and "tlsv12" |
dualAuth | boolean | No | RequestBody parameter | Whether to enable two-way authentication. The default is off. |
clientCertIds | List\<String> | No | RequestBody parameter | The client certificate chain loaded when dualAuth is true |
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/SSLlistener?clientToken=asdfg HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
{
"listenerPort":95,
"backendPort":95,
"scheduler":"LeastConnection",
"healthCheckTimeoutInSecond":4,
"healthCheckInterval":5,
"unhealthyThreshold":2,
"certIds":["cert-zfj2ey2z4kmm"]
}
Response Example
HTTP/1.1 200 OK
x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
Date: Wed, 10 Apr 2016 08:26:52 GMT
Transfer-Encoding: chunked
Content-Type: application/json;charset=UTF-8
Server: BWS
DeleteListeners
Description
- Releases the listener under the specified LoadBalancer. The listener is specified by the listening port.
- Support batch release
Request Structure
PUT /v{version}/blb/{blbId}/listener?{action}&clientToken={clientToken} HTTP/1.1
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"portList":[port1,port2,...]
}
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 | URL parameter | batchdelete |
clientToken | String | Yes | Query parameter | Idempotent Token, no longer than 64 bits |
portList | List<int> | Yes | RequestBody parameter | The ports of all listeners 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-j8UqijYf/listener?batchdelete&clientToken=clienttokentest
Host: blb.bj.baidubce.com
Authorization: authorization string
{
"portList":[80,87]
}
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