Standard BLB Listener Related Interfaces

BLB BLB

  • API Reference
    • Access control
    • API Service Domain Name
    • Appendix
    • Application BLB Interface
      • Application BLB Instance Related Interfaces
      • Application BLB Listener Related Interfaces
      • Application BLB Security Group Related Interfaces
      • Application BLB Server Group Related Interfaces
    • Application IPv6 BLB Interface
      • Application IPv6 BLB Instance Related Interfaces
      • Application IPv6 BLB Listener Related Interfaces
      • Application IPv6 BLB Security Group Related Interfaces
      • Application IPv6 BLB Server Group Related Interfaces
    • BLB Order Related Interfaces
      • BLB - Resize
      • BLB Charge Shift - Cancel Prepay to Postpay
      • BLB Charge Shift - Postpay to Prepay
      • BLB Charge Shift - Prepay to Postpay
      • BLB Inquiry
      • BLB Unsubscribe Interface
    • Document Update Records
    • Error code
    • Interface Specifications
    • Introduction
    • Load Balancer Dedicated Cluster LBDC Interface
      • LBDC Instance Related Interfaces
    • Service Publishing Point Interface
      • Service Publishing Point Related Interfaces
    • Standard BLB Interface
      • Standard BLB Instance Related Interfaces
      • Standard BLB Listener Related Interfaces
      • Standard BLB Real Server Related Interfaces
      • Standard BLB Security Group Related Interfaces
    • Standard IPv6 BLB Interface
      • Standard IPv6 BLB Related Interfaces
  • FAQs
    • Billing Problems
    • Common Questions Overview
    • Configuration-related questions
    • Fault-related questions
    • General Problems
    • Load Balancer Dedicated Cluster Related Issues
    • Performance-related questions
    • Security Problems
  • Function Release Records
  • Operation guide
    • Access control
    • Access Logs
    • Application BLB instance
    • Application IPv6 Instance
    • BLB metric description
    • Certification
    • Custom configuration
    • Extended domain name
    • General-purpose BLB instance
      • Creating BLB Ordinary Instance
      • Managing BLB Ordinary Instance
    • General-purpose IPv6 BLB instance
    • Identity and access management
    • IP Group Usage Guide
    • Load Balance Dedicated Cluster
    • Load Balancer Frontend and Backend Protocol Correspondence
    • Recording Access Logs Using VPC Flow Logs
    • Service Release Point
    • Tag Management
  • Product Description
    • Application scenarios
    • Basic Architecture
    • Basic concepts
    • Performance Specification Description
    • Product advantages
    • Product features
    • Product Introduction
    • Usage restrictions
  • Product pricing
    • Load Balancer Dedicated Cluster Billing
    • Load Balancer Instance Billing
  • Quick Start
  • SDK
    • GO-SDK
      • Application BLB Instance
      • Initialization
      • Install
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Ordinary BLB Instance
      • Overview
      • Service Release Point
      • Version Change Records
    • Java-SDK
      • Application BLB instance
      • General-purpose BLB instance
      • Initialization
      • Install the SDK Package
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Overview
      • Service Release Point
      • Version Update Description
    • PHP-SDK
      • Initialization
      • Install
      • Ordinary BLB Instance
      • Overview
    • Python-SDK
      • Application BLB Instance
      • Initialization
      • Install
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Ordinary BLB Instance
      • Overview
      • Service Release Point
      • Version Update Description
  • Service Level Agreement (SLA)
    • Description of Baidu AI Cloud Load Balancer Trusted Cloud certification service availability
    • LBDC Service Level Agreement SLA
    • BLB Service Level Agreement (V2.0)
  • Typical Practices
    • BLB Selection Guide
    • Health Check Exception Troubleshooting
    • Implementing BLB Association with Listeners, Real Servers, Security Groups, etc. via Terraform
    • Implementing Multi-Site Hosting via Application BLB
    • Load Balancer Security Protection Strategy
    • Managing BLB via Terraform
    • Obtaining Client Information via Application BLB Instance
    • Using IP Group Function to Mount Real Servers Across VPCs in Different Regions
    • Using IP Group Function to Mount Real Servers Across VPCs in the Same Region
All documents
menu
No results found, please re-enter

BLB BLB

  • API Reference
    • Access control
    • API Service Domain Name
    • Appendix
    • Application BLB Interface
      • Application BLB Instance Related Interfaces
      • Application BLB Listener Related Interfaces
      • Application BLB Security Group Related Interfaces
      • Application BLB Server Group Related Interfaces
    • Application IPv6 BLB Interface
      • Application IPv6 BLB Instance Related Interfaces
      • Application IPv6 BLB Listener Related Interfaces
      • Application IPv6 BLB Security Group Related Interfaces
      • Application IPv6 BLB Server Group Related Interfaces
    • BLB Order Related Interfaces
      • BLB - Resize
      • BLB Charge Shift - Cancel Prepay to Postpay
      • BLB Charge Shift - Postpay to Prepay
      • BLB Charge Shift - Prepay to Postpay
      • BLB Inquiry
      • BLB Unsubscribe Interface
    • Document Update Records
    • Error code
    • Interface Specifications
    • Introduction
    • Load Balancer Dedicated Cluster LBDC Interface
      • LBDC Instance Related Interfaces
    • Service Publishing Point Interface
      • Service Publishing Point Related Interfaces
    • Standard BLB Interface
      • Standard BLB Instance Related Interfaces
      • Standard BLB Listener Related Interfaces
      • Standard BLB Real Server Related Interfaces
      • Standard BLB Security Group Related Interfaces
    • Standard IPv6 BLB Interface
      • Standard IPv6 BLB Related Interfaces
  • FAQs
    • Billing Problems
    • Common Questions Overview
    • Configuration-related questions
    • Fault-related questions
    • General Problems
    • Load Balancer Dedicated Cluster Related Issues
    • Performance-related questions
    • Security Problems
  • Function Release Records
  • Operation guide
    • Access control
    • Access Logs
    • Application BLB instance
    • Application IPv6 Instance
    • BLB metric description
    • Certification
    • Custom configuration
    • Extended domain name
    • General-purpose BLB instance
      • Creating BLB Ordinary Instance
      • Managing BLB Ordinary Instance
    • General-purpose IPv6 BLB instance
    • Identity and access management
    • IP Group Usage Guide
    • Load Balance Dedicated Cluster
    • Load Balancer Frontend and Backend Protocol Correspondence
    • Recording Access Logs Using VPC Flow Logs
    • Service Release Point
    • Tag Management
  • Product Description
    • Application scenarios
    • Basic Architecture
    • Basic concepts
    • Performance Specification Description
    • Product advantages
    • Product features
    • Product Introduction
    • Usage restrictions
  • Product pricing
    • Load Balancer Dedicated Cluster Billing
    • Load Balancer Instance Billing
  • Quick Start
  • SDK
    • GO-SDK
      • Application BLB Instance
      • Initialization
      • Install
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Ordinary BLB Instance
      • Overview
      • Service Release Point
      • Version Change Records
    • Java-SDK
      • Application BLB instance
      • General-purpose BLB instance
      • Initialization
      • Install the SDK Package
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Overview
      • Service Release Point
      • Version Update Description
    • PHP-SDK
      • Initialization
      • Install
      • Ordinary BLB Instance
      • Overview
    • Python-SDK
      • Application BLB Instance
      • Initialization
      • Install
      • IPv6 BLB Instance
      • Load Balance Dedicated Cluster (LBDC)
      • Ordinary BLB Instance
      • Overview
      • Service Release Point
      • Version Update Description
  • Service Level Agreement (SLA)
    • Description of Baidu AI Cloud Load Balancer Trusted Cloud certification service availability
    • LBDC Service Level Agreement SLA
    • BLB Service Level Agreement (V2.0)
  • Typical Practices
    • BLB Selection Guide
    • Health Check Exception Troubleshooting
    • Implementing BLB Association with Listeners, Real Servers, Security Groups, etc. via Terraform
    • Implementing Multi-Site Hosting via Application BLB
    • Load Balancer Security Protection Strategy
    • Managing BLB via Terraform
    • Obtaining Client Information via Application BLB Instance
    • Using IP Group Function to Mount Real Servers Across VPCs in Different Regions
    • Using IP Group Function to Mount Real Servers Across VPCs in the Same Region
  • Document center
  • arrow
  • BLBBLB
  • arrow
  • API Reference
  • arrow
  • Standard BLB Interface
  • arrow
  • Standard BLB Listener Related Interfaces
Table of contents on this page
  • CreateTCPListener: Create a TCP listener
  • CreateUDPListener: Creates a UDP listener
  • CreateHTTPListener: Create an HTTP listener
  • CreateHTTPSListener: Create an HTTPS listener
  • CreateSSLListener: Create SSL listener
  • DescribeTCPListeners: Query TCP listeners
  • DescribeUDPListeners: Query UDP listeners
  • DescribeHTTPListeners: Query HTTP listeners
  • DescribeHTTPSListeners: Query HTTPS listeners
  • DescribeSSLListeners: Query SSL listeners
  • DescribeAllListeners: Query all listeners
  • UpdateTCPListener: Update TCP listener
  • UpdateUDPListener: Update UDP listener
  • UpdateHTTPListener: Update HTTP listener
  • UpdateHTTPSListener: Update HTTPS listener
  • UpdateSSLListener: Update SSL listener
  • DeleteListeners: Delete listener

Standard BLB Listener Related Interfaces

Updated at:2025-10-16

CreateTCPListener: Create a TCP listener

Description

  • Under a specified LoadBalancer, create a TCP listener to forward all TCP traffic received on a frontend port to the backend port on the real servers. TCP listeners only support TCP health checks where the check port aligns with the real server listener port.

Request structure

Plain Text
1POST /v{version}/blb/{blbId}/TCPlistener?clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "listenerPort":listenerPort,
7    "backendPort":backendPort,
8    "scheduler":scheduler,
9    "tcpSessionTimeout":tcpSessionTimeout,
10    "healthCheckType":healthCheckType,
11    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
12    "healthCheckInterval":healthCheckInterval,
13    "unhealthyThreshold":unhealthyThreshold,
14    "healthyThreshold":healthyThreshold
15}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int Yes RequestBody The listener port, which shall be an integer between 1 and 65535.
backendPort int Yes RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String Yes RequestBody Load balancer algorithm supporting 3 methods: "RoundRobin"/"WeightLeastConn"/"Hash", among which "RoundRobin" means weighted round-robin, "WeightLeastConn" means weighted minimum connection counts, and "Hash" means source IP-based hashing.
tcpSessionTimeout int No RequestBody TCP connection timeout duration setting (unit: second). It is 900 by default, and shall be an integer between 10 and 4000.
healthCheckType String No RequestBody Health check protocol type, "TCP" by default.
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1POST /v1/blb/lb-j8UqijYf/TCPlistener?clientToken=asdfg HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4
5{
6    "listenerPort":95,
7    "backendPort":95,
8    "scheduler":"LeastConnection",
9    "tcpSessionTimeout":900,
10    "healthCheckType":"TCP",
11    "healthCheckTimeoutInSecond":4,
12    "healthCheckInterval":5,
13    "unhealthyThreshold":2,
14    "healthyThreshold":3
15}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

CreateUDPListener: Creates a UDP listener

Description

  • Under the specified LoadBalancer, configure a UDP-based listener to monitor a frontend port and forward all UDP traffic to the backend port used by real servers. UDP listeners support both UDP and ICMP health checks, with the check port matching the real server's listener port.

Request structure

Plain Text
1POST /v{version}/blb/{blbId}/UDPlistener?clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "listenerPort":listenerPort,
7    "backendPort":backendPort,
8    "scheduler":scheduler,
9    "healthCheckType":healthCheckType,
10    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
11    "healthCheckInterval":healthCheckInterval,
12    "unhealthyThreshold":unhealthyThreshold,
13    "healthyThreshold":healthyThreshold,
14    "healthCheckString":healthCheck,
15    "udpSessionTimeout":udpSessionTimeout
16}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
clientToken String Yes Query Idempotency Token, with length no more than 64 characters.
listenerPort int Yes RequestBody The listener port, which shall be an integer between 1 and 65535.
backendPort int Yes RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String Yes RequestBody Load balancer algorithm supporting 3 methods: "RoundRobin"/"WeightLeastConn"/"Hash", among which "RoundRobin" means weighted round-robin, "WeightLeastConn" means weighted minimum connection counts, and "Hash" means source IP-based hashing.
healthCheckType String No RequestBody Health check protocol type, which supports "UDP"/"ICMP", and is "UDP" by default.
healthCheckString String No RequestBody Health check request string. Real servers shall respond upon receipt. It shall be hexadecimal \00-\FF and standard ASCII strings, with the length up to 1299, and it is required when health check protocol is "UDP".
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.
udpSessionTimeout int No RequestBody UDP session timeout duration. The default is 90 seconds, but it can be set as an integer between 5 and 4000 seconds.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1POST /v1/blb/lb-j8UqijYf/UDPlistener?clientToken=asdfg HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4
5{
6    "listenerPort":95,
7    "backendPort":95,
8    "scheduler":"LeastConnection",
9    "healthCheckType":"UDP",
10    "healthCheckString":"healthCheck",
11    "healthCheckTimeoutInSecond":4,
12    "healthCheckInterval":5,
13    "unhealthyThreshold":2,
14    "healthyThreshold":3,
15    "udpSessionTimeout":90
16}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

CreateHTTPListener: Create an HTTP listener

Description

  • Under the specified LoadBalancer, create an HTTP-based listener listening to a frontend port to forward all HTTP requests to the backend port listened to by real servers.

Request structure

Plain Text
1POST /v{version}/blb/{blbId}/HTTPlistener?clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "listenerPort":listenerPort,
7    "backendPort":backendPort,
8    "scheduler":scheduler,
9    "keepSession":keepSession,
10    "keepSessionType":keepSessionType,
11    "keepSessionDuration":keepSessionDuration,
12    "keepSessionCookieName":keepSessionCookieName,
13    "xForwardFor":xForwardFor,
14    "xForwardedProto":xForwardedProto
15    "healthCheckType":healthCheckType,
16    "healthCheckPort":healthCheckPort,
17    "healthCheckURI":healthCheckURI,
18    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
19    "healthCheckInterval":healthCheckInterval,
20    "unhealthyThreshold":unhealthyThreshold,
21    "healthyThreshold":healthyThreshold,
22    "healthCheckNormalStatus":healthCheckNormalStatus,
23    "healthCheckHost":healthCheckHost,
24    "serverTimeout":serverTimeout,
25	"redirectPort":redirectPort
26}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int Yes RequestBody The listener port, which shall be an integer between 1 and 65535.
backendPort int Yes RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String Yes RequestBody Load balancer algorithm supporting 2 methods: "RoundRobin"/"LeastConnection", among which "RoundRobin" means weighted round-robin, and "LeastConnection" means minimum connection counts.
keepSession bool No RequestBody Whether to enable the session persistence function, meaning requests from the same client will be sent to the same real server. It is disabled by default.
keepSessionType String No RequestBody Cookie handling method for session persistence, valid only when the session persistence is enabled, supporting "insert"/"rewrite". It is "insert" by default.
keepSessionDuration int No RequestBody Cookie validity period for session persistence (unit: second). It is valid only when session persistence is enabled. It is 3600s by default, and shall be an integer between 1 and 15552000.
keepSessionCookieName String No RequestBody Cookie name to be overwritten for session persistence, valid only when the session persistence is enabled and keepSessionType="rewrite".
xForwardFor bool No RequestBody Whether to enable retrieving the real IP of the client. Once it is enabled, the real server can retrieve the real IP address of the client via the HTTP Header X-Forwarded-For. It is disabled by default.
xForwardedProto bool No RequestBody Forward the protocol used by the listener to the real server via the x-forwarded-proto HTTP Header.
healthCheckType String No RequestBody Health check protocol type, which supports "HTTP"/"TCP", and is "HTTP" by default.
healthCheckPort int No RequestBody Health check port. It is backendPort by default.
healthCheckURI String No RequestBody Health check URI. It is / by default. It is valid when the health check protocol is "HTTP".
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.
healthCheckNormalStatus String No RequestBody HTTP status codes for successful health checks, supporting combinations of 5 types of status codes such as "http_1xx|http_2xx". It is "http_2xx|http_3xx" by default. It is valid when the health check protocol is "HTTP".
healthCheckHost String No RequestBody The header field of the Layer 7 health check request will include the specified host field, such as "localhost", and the default is "". It is valid when the health check protocol is "HTTP".
serverTimeout int No RequestBody Real server maximum timeout (unit: second). It is 30 s by default, and shall be an integer between 1 and 3600.
redirectPort int No RequestBody Requests received by this listener is forwarded to the HTTPS listener, which is specified through this port.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1POST /v1/blb/lb-j8UqijYf/HTTPlistener?clientToken=asdfg HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "listenerPort":95,
7    "backendPort":95,
8    "scheduler":"LeastConnection",
9    "healthCheckTimeoutInSecond":4,
10    "healthCheckInterval":5,
11    "unhealthyThreshold":2,
12    "xForwardFor":true,
13    "xForwardedProto":true,
14    "healthCheckType":"HTTP",
15    "serverTimeout":1800,
16    "healthCheckNormalStatus":"http_1xx|http_2xx",
17    "healthCheckHost":"localhost",
18	"redirectPort":80
19}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

CreateHTTPSListener: Create an HTTPS listener

Description

Under the specified LoadBalancer, configure an HTTPS-based listener to monitor a frontend port. Convert incoming HTTPS requests on that port into HTTP requests through SSL termination, then forward them to the backend port used by real servers.

Request structure

Plain Text
1POST /v{version}/blb/{blbId}/HTTPSlistener?clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "listenerPort":listenerPort,
7    "backendPort":backendPort,
8    "scheduler":scheduler,
9    "keepSession":keepSession,
10    "keepSessionType":keepSessionType,
11    "keepSessionDuration":keepSessionDuration,
12    "keepSessionCookieName":keepSessionCookieName,
13    "xForwardFor":xForwardFor,
14    "xForwardedProto":xForwardedProto
15    "healthCheckType":healthCheckType,
16    "healthCheckPort":healthCheckPort,
17    "healthCheckURI":healthCheckURI,
18    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
19    "healthCheckInterval":healthCheckInterval,
20    "unhealthyThreshold":unhealthyThreshold,
21    "healthyThreshold":healthyThreshold,
22    "healthCheckNormalStatus":healthCheckNormalStatus,
23    "healthCheckHost":healthCheckHost,
24    "serverTimeout":serverTimeout,
25    "certIds":[certId],
26    "encryptionType":encryptionType,
27    "encryptionProtocols":[protocol1, protacol2],
28    "dualAuth":false,
29    "clientCertIds":[clientCertId],
30    "additionalCertDomains":[{"certId":certId,"host":host}]
31}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
clientToken String Yes Query Idempotency Token, with length no more than 64 characters.
listenerPort int Yes RequestBody The listener port, which shall be an integer between 1 and 65535.
backendPort int Yes RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String Yes RequestBody Load balancer algorithm supporting 2 methods: "RoundRobin"/"LeastConnection", among which "RoundRobin" means weighted round-robin, and "LeastConnection" means minimum connection counts.
keepSession boolean No RequestBody Whether to enable the session persistence function, meaning requests from the same client will be sent to the same real server. It is disabled by default.
keepSessionType String No RequestBody Cookie handling method for session persistence, valid only when the session persistence is enabled, supporting "insert"/"rewrite". It is "insert" by default.
keepSessionDuration int No RequestBody Cookie validity period for session persistence (unit: second). It is valid only when session persistence is enabled. It is 3600s by default, and shall be an integer between 1 and 15552000.
keepSessionCookieName int No RequestBody Cookie name to be overwritten for session persistence, valid only when the session persistence is enabled and keepSessionType="rewrite".
xForwardFor boolean No RequestBody Whether to enable retrieving the real IP of the client. Once it is enabled, the real server can retrieve the real IP address of the client via the HTTP Header X-Forwarded-For. It is disabled by default.
xForwardedProto boolean No. RequestBody Forward the protocol used by the listener to the real server via the x-forwarded-proto HTTP Header.
healthCheckType String No RequestBody Health check protocol type, which supports "HTTP"/"TCP", and is "HTTP" by default.
healthCheckPort int No RequestBody Health check port. It is backendPort by default.
healthCheckURI String No RequestBody Health check URI. It is / by default. It is valid when the health check protocol is "HTTP".
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.
healthCheckNormalStatus String No RequestBody HTTP status codes for successful health checks, supporting combinations of 5 types of status codes such as "http_1xx|http_2xx". It is "http_2xx|http_3xx" by default. It is valid when the health check protocol is "HTTP".
healthCheckHost String No RequestBody The header field of the Layer 7 health check request will include the specified host field, such as "localhost", and the default is "". It is valid when the health check protocol is "HTTP".
serverTimeout int No RequestBody Real server maximum timeout (unit: second). It is 30 s by default, and shall be an integer between 1 and 3600.
certIds List Yes RequestBody Certificate to be loaded by the listener. Currently, only one certificate ID is allowed. If multiple IDs are uploaded, only the last one is valid.
encryptionType String No RequestBody Encryption option. It is tls_cipher_policy_default by default. Support: tls_cipher_policy_default/tls_cipher_policy_1_1/tls_cipher_policy_1_2/tls_cipher_policy_1_2_secure/userDefind. For corresponding encryption protocols and cipher suites, refer to [encryption](BLB/API Reference/Appendix.md#encryption).
encryptionProtocols List No RequestBody When encryptionType is userDefined, the protocol type list is a string array composed of the combinations of three protocols: "tlsv10", "tlsv11" and "tlsv12" protocol.
appliedCiphers String No RequestBody For the cipher suite, refer to [encryption](BLB/API Reference/Appendix.md#encryption) Different suites shall be separated by colons ":".
dualAuth boolean No RequestBody Whether to enable mutual authentication, and it is disabled by default.
clientCertIds List No RequestBody When dualAuth is true, the loaded client certificate chain currently only allows the uploading of one certificate ID. If multiple IDs are uploaded, only the last one is valid.
additionalCertDomains List<[AdditionalCertDomain](BLB/API Reference/Appendix.md#AdditionalCertDomain)> No RequestBody Extended domain name

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Plain Text
1POST /v1/blb/lb-j8UqijYf/HTTPSlistener?clientToken=asdfg HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4
5{
6    "listenerPort":95,
7    "backendPort":95,
8    "scheduler":"LeastConnection",
9    "healthCheckTimeoutInSecond":4,
10    "healthCheckInterval":5,
11    "unhealthyThreshold":2,
12    "healthyThreshold":3,
13    "xForwardFor":true,
14    "xForwardedProto": true,
15    "healthCheckType":"HTTP",
16    "serverTimeout":1800,
17    "healthCheckNormalStatus":"http_1xx|http_2xx",
18    "healthCheckHost":"localhost",
19    "certIds":["cert-zfj2ey2z4kmm"]
20}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

CreateSSLListener: Create SSL listener

Description

  • Under the specified LoadBalancer, configure an SSL protocol-based listener to monitor a frontend port. Convert incoming SSL traffic on that port into TCP requests via SSL termination and forward them to the backend port used by real servers. SSL listeners only support TCP health checks, with the check port matching the real server's listener port.

Request structure

Plain Text
1POST /v{version}/blb/{blbId}/SSLlistener?clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "listenerPort":listenerPort,
7    "backendPort":backendPort,
8    "scheduler":scheduler,
9    "healthCheckType":healthCheckType,
10    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
11    "healthCheckInterval":healthCheckInterval,
12    "unhealthyThreshold":unhealthyThreshold,
13    "healthyThreshold":healthyThreshold,
14    "certIds":[certId],
15    "encryptionType":encryptionType,
16    "encryptionProtocols":[protocol1, protacol2],
17    "dualAuth":false,
18    "clientCertIds":[clientCertId]              
19}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
clientToken String Yes Query Idempotency Token, with length no more than 64 characters.
listenerPort int Yes RequestBody The listener port, which shall be an integer between 1 and 65535.
backendPort int Yes RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String Yes RequestBody Load balancer algorithm supporting 3 methods: "RoundRobin"/"LeastConnection"/"Hash", among which "RoundRobin" means weighted round-robin, "LeastConnection" means weighted minimum connection counts, and "Hash" means source IP-based hashing.
healthCheckType String No RequestBody Health check protocol type, "TCP" by default.
tcpSessionTimeout int No RequestBody TCP connection timeout duration setting (unit: second). It is 900 by default, and shall be an integer between 10 and 4000.
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.
certIds List Yes RequestBody Certificate chain to be loaded by the listener. Currently, only one certificate ID is allowed. If multiple IDs are uploaded, only the last one is valid.
encryptionType String No RequestBody Encryption option. It is tls_cipher_policy_default by default. Support: tls_cipher_policy_default/tls_cipher_policy_1_1/tls_cipher_policy_1_2/tls_cipher_policy_1_2_secure/userDefind. For corresponding encryption protocols and cipher suites, refer to [encryption](BLB/API Reference/Appendix.md#encryption).
encryptionProtocols List No RequestBody When encryptionType is userDefined, the protocol type list is a string array composed of the combinations of three protocols: "tlsv10", "tlsv11" and "tlsv12" protocol.
appliedCiphers String No RequestBody For the cipher suite, refer to [encryption](BLB/API Reference/Appendix.md#encryption) Different suites shall be separated by colons ":".
dualAuth boolean No RequestBody Whether to enable mutual authentication, and it is disabled by default.
clientCertIds List No RequestBody When dualAuth is true, the loaded client certificate chain currently only allows the uploading of one certificate ID. If multiple IDs are uploaded, only the last one is valid.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1POST /v1/blb/lb-j8UqijYf/SSLlistener?clientToken=asdfg HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4
5{
6    "listenerPort":95,
7    "backendPort":95,
8    "scheduler":"LeastConnection",
9    "healthCheckType":"TCP",
10    "healthCheckTimeoutInSecond":4,
11    "healthCheckInterval":5,
12    "unhealthyThreshold":2,
13    "healthyThreshold":3,
14    "certIds":["cert-zfj2ey2z4kmm"]
15}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

DescribeTCPListeners: Query TCP listeners

Description

  • Query information of all TCP listeners under the specified LoadBalancer
  • Support querying by listener port for matching items
  • Results support marker-based pagination, with a default page size of 1000, which can be specified via the maxKeys parameter.

Request structure

Plain Text
1GET /v{version}/blb/{blbId}/TCPlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int No Query Listener port to be queried
marker String No Query The starting position of the batch list query is a system-generated string
maxKeys int No Query Maximum number of items per page is 1,000, with a default value of 1000.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

Parameter name Types Description
listenerList List<[TCPListenerModel](BLB/API Reference/Appendix.md#TCPListenerModel)> List containing query results
marker string Marker indicating the starting position of the query. If the result list is empty, this field does not exist.
isTruncated boolean true indicates there is more data later, false indicates it is the last page
nextMarker String The marker value needed to fetch the next page. This field is absent when isTruncated is false.
maxKeys int Maximum number of items included per page

Request example

Plain Text
1GET /v1/blb/lb-j8UqijYf/TCPlistener?maxKeys=2 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7
8{
9    "listenerList": [
10        {
11            "listenerPort": 80,
12            "backendPort": 80,
13            "scheduler": "RoundRobin",
14            "healthCheckTimeoutInSecond": 3,
15            "healthCheckInterval": 3,
16            "unhealthyThreshold": 3,
17            "healthyThreshold": 3
18        },
19        {
20            "listenerPort": 88,
21            "backendPort": 88,
22            "scheduler": "RoundRobin",
23            "healthCheckTimeoutInSecond": 2,
24            "healthCheckInterval": 4,
25            "unhealthyThreshold": 3,
26            "healthyThreshold": 3
27        }
28    ],
29    "marker": "listener-0050",
30    "nextMarker": null,
31    "isTruncated": false,
32    "maxKeys": 2
33}

DescribeUDPListeners: Query UDP listeners

Description

  • Query information of all UDP listeners under the specified LoadBalancer
  • Support querying by listener port for matching items
  • Results support marker-based pagination, with a default page size of 1000, which can be specified via the maxKeys parameter.

Request structure

Plain Text
1GET /v{version}/blb/{blbId}/UDPlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int No Query Listener port to be queried
marker String No Query The starting position of the batch list query is a system-generated string
maxKeys int No Query Maximum number of items per page is 1,000, with a default value of 1000.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

Parameter name Types Description
listenerList List<[UDPListenerModel](BLB/API Reference/Appendix.md#UDPListenerModel)> List containing query results
marker string Marker indicating the starting position of the query. If the result list is empty, this field does not exist.
isTruncated boolean true indicates there is more data later, false indicates it is the last page
nextMarker String The marker value needed to fetch the next page. This field is absent when isTruncated is false.
maxKeys int Maximum number of items included per page

Request example

Plain Text
1GET /v1/blb/lb-j8UqijYf/UDPlistener?maxKeys=2 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7
8{
9    "listenerList": [
10        {
11            "listenerPort": 80,
12            "backendPort": 80,
13            "scheduler": "RoundRobin",
14            "healthCheckType": "UDP",
15            "healthCheckTimeoutInSecond": 3,
16            "healthCheckInterval": 3,
17            "unhealthyThreshold": 3,
18            "healthyThreshold": 3,
19			"healthCheckString":"healthCheck",
20            "udpSessionTimeout":90
21        },
22        {
23            "listenerPort": 88,
24            "backendPort": 88,
25            "scheduler": "RoundRobin",
26            "healthCheckType": "UDP",
27            "healthCheckTimeoutInSecond": 2,
28            "healthCheckInterval": 4,
29            "unhealthyThreshold": 3,
30            "healthyThreshold": 3,
31			"healthCheckString":"healthCheck",
32            "udpSessionTimeout": 90
33        }
34    ],
35    "marker": "listener-0050",
36    "nextMarker": null,
37    "isTruncated": false,
38    "maxKeys": 2
39}

DescribeHTTPListeners: Query HTTP listeners

Description

  • Query information of all HTTP listeners under the specified LoadBalancer
  • Support querying by listener port for matching items
  • Results support marker-based pagination, with a default page size of 1000, which can be specified via the maxKeys parameter.

Request structure

Plain Text
1GET /v{version}/blb/{blbId}/HTTPlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int No Query Listener port to be queried
marker String No Query The starting position of the batch list query is a system-generated string
maxKeys int No Query Maximum number of items per page is 1,000, with a default value of 1000.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

Parameter name Types Description
listenerList List<[HTTPListenerModel](BLB/API Reference/Appendix.md#HTTPListenerModel)> List containing query results
marker string Marker indicating the starting position of the query. If the result list is empty, this field does not exist.
isTruncated boolean true indicates there is more data later, false indicates it is the last page
nextMarker String The marker value needed to fetch the next page. This field is absent when isTruncated is false.
maxKeys int Maximum number of items included per page

Request example

Plain Text
1GET /v1/blb/lb-j8UqijYf/HTTPlistener?maxKeys=2 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Fri, 03 Jun 2016 06:42:44 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7
8{
9    "listenerList": [
10        {
11            "listenerPort": 90,
12            "backendPort": 90,
13            "scheduler": "LeastConnection",
14            "healthCheckTimeoutInSecond": 4,
15            "healthCheckInterval": 5,
16            "unhealthyThreshold": 2,
17            "healthyThreshold": 3,
18            "keepSession": false,
19            "keepSessionType": null,
20            "keepSessionDuration": null,
21            "keepSessionCookieName": null,
22            "xForwardFor": false,
23            "healthCheckType": "HTTP",
24            "healthCheckPort": 90,
25            "healthCheckURI": "/",
26            "healthCheckNormalStatus": "http_2xx|http_3xx",
27            "serverTimeout": 30,
28			"redirectPort": 80
29        },
30        {
31            "listenerPort": 95,
32            "backendPort": 95,
33            "scheduler": "LeastConnection",
34            "healthCheckTimeoutInSecond": 4,
35            "healthCheckInterval": 5,
36            "unhealthyThreshold": 2,
37            "healthyThreshold": 3,
38            "keepSession": false,
39            "keepSessionType": null,
40            "keepSessionDuration": null,
41            "keepSessionCookieName": null,
42            "xForwardFor": false,
43            "healthCheckType": "HTTP",
44            "healthCheckPort": 95,
45            "healthCheckURI": "/",
46            "healthCheckNormalStatus": "http_1xx|http_2xx",
47            "serverTimeout": 1800,
48			"redirectPort": 80
49        }
50    ],
51    "marker": "listener-005A",
52    "nextMarker": "listener-0322",
53    "isTruncated": true,
54    "maxKeys": 2
55}

DescribeHTTPSListeners: Query HTTPS listeners

Description

  • Query information of all HTTPS listeners under the specified LoadBalancer
  • Support querying by listener port for matching items
  • Results support marker-based pagination, with a default page size of 1000, which can be specified via the maxKeys parameter.

Request structure

Plain Text
1GET /v{version}/blb/{blbId}/HTTPSlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int No Query Listener port to be queried
marker String No Query The starting position of the batch list query is a system-generated string
maxKeys int No Query Maximum number of items per page is 1,000, with a default value of 1000.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

Parameter name Types Description
listenerList List<[HTTPSListenerModel](BLB/API Reference/Appendix.md#HTTPSListenerModel)> List containing query results
marker string Marker indicating the starting position of the query. If the result list is empty, this field does not exist.
isTruncated boolean true indicates there is more data later, false indicates it is the last page
nextMarker String The marker value needed to fetch the next page. This field is absent when isTruncated is false.
maxKeys int Maximum number of items included per page

Request example

Plain Text
1GET /v1/blb/lb-j8UqijYf/HTTPSlistener?maxKeys=2 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: 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

Plain Text
1{
2    "listenerList": [
3        {
4            "listenerPort": 90,
5            "backendPort": 90,
6            "scheduler": "LeastConnection",
7            "healthCheckTimeoutInSecond": 4,
8            "healthCheckInterval": 5,
9            "unhealthyThreshold": 2,
10            "healthyThreshold": 3,
11            "keepSession": false,
12            "keepSessionType": null,
13            "keepSessionDuration": null,
14            "keepSessionCookieName": null,
15            "xForwardFor": false,
16            "healthCheckType": "HTTP",
17            "healthCheckPort": 90,
18            "healthCheckURI": "/",
19            "healthCheckNormalStatus": "http_2xx|http_3xx",
20            "serverTimeout": 30,
21			"certIds": ["cert-zfj2ey2z4kmm"]
22        },
23        {
24            "listenerPort": 95,
25            "backendPort": 95,
26            "scheduler": "LeastConnection",
27            "healthCheckTimeoutInSecond": 4,
28            "healthCheckInterval": 5,
29            "unhealthyThreshold": 2,
30            "healthyThreshold": 3,
31            "keepSession": false,
32            "keepSessionType": null,
33            "keepSessionDuration": null,
34            "keepSessionCookieName": null,
35            "xForwardFor": false,
36            "healthCheckType": "HTTP",
37            "healthCheckPort": 95,
38            "healthCheckURI": "/",
39            "healthCheckNormalStatus": "http_1xx|http_2xx",
40            "serverTimeout": 1800,
41			"certIds": ["cert-zfj2ey2z4kmm"]
42        }
43    ],
44    "marker": "listener-005A",
45    "nextMarker": "listener-0322",
46    "isTruncated": true,
47    "maxKeys": 2
48}

DescribeSSLListeners: Query SSL listeners

Description

  • Query information of all SSL listeners under the specified LoadBalancer
  • Support querying by listener port for matching items
  • Results support marker-based pagination, with a default page size of 1000, which can be specified via the maxKeys parameter.

Request structure

Plain Text
1GET /v{version}/blb/{blbId}/SSLlistener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int No Query Listener port to be queried
marker String No Query The starting position of the batch list query is a system-generated string
maxKeys int No Query Maximum number of items per page is 1,000, with a default value of 1000.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

Parameter name Types Description
listenerList List<[SSLListenerModel](BLB/API Reference/Appendix.md#SSLListenerModel)> List containing query results
marker String Marker indicating the starting position of the query. If the result list is empty, this field does not exist.
isTruncated boolean true indicates there is more data later, false indicates it is the last page
nextMarker String The marker value needed to fetch the next page. This field is absent when isTruncated is false.
maxKeys int Maximum number of items included per page

Request example

Plain Text
1GET /v1/blb/lb-j8UqijYf/SSLlistener?maxKeys=2 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS
7
8{
9    "listenerList": [
10        {
11            "listenerPort": 80,
12            "backendPort": 80,
13            "scheduler": "RoundRobin",
14            "healthCheckTimeoutInSecond": 3,
15            "healthCheckInterval": 3,
16            "unhealthyThreshold": 3,
17            "healthyThreshold": 3
18        },
19        {
20            "listenerPort": 88,
21            "backendPort": 88,
22            "scheduler": "RoundRobin",
23            "healthCheckTimeoutInSecond": 2,
24            "healthCheckInterval": 4,
25            "unhealthyThreshold": 3,
26            "healthyThreshold": 3
27        }
28    ],
29    "marker": "listener-0050",
30    "nextMarker": null,
31    "isTruncated": false,
32    "maxKeys": 2
33}

DescribeAllListeners: Query all listeners

Request structure

Plain Text
1GET /v{version}/blb/{blbId}/listener?listenerPort={listenerPort}&marker={marker}&maxKeys={maxKeys}   HTTP/1.1   
2Host: blb.bj.baidubce.com      
3Authorization: authorization string      

Request headers

There are no special headers required beyond the common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int No Query Listener port to be queried
marker String No Query The starting position of the batch list query is a system-generated string
maxKeys int No Query Maximum number of items included per page, maximum: 1,000, default: 1,000

Response headers

No special headers are required beyond the standard ones.

Response parameters

Parameter name Types Description
marker String Mark the starting position of the query.
isTruncated boolean true indicates there is more data later, false indicates it is the last page
nextMarker String The marker value needed to fetch the next page. This field is absent when isTruncated is false.
maxKeys int Maximum number of items included per page
listenerList List<[AllListenerModel](BLB/API Reference/Appendix.md#AllListenerModel)> Contain the listener list queried

Request example

Plain Text
1GET /v1/blb/lb-a7942975/listener HTTP/1.1   
2Host: blb.bj.baidubce.com     
3ContentType: application/json     
4Authorization: bce auth v1/f81d3b34e48048fbb2634dc7882d7e21/2017 03 11T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de     

Response example

Plain Text
1 HTTP/1.1 200 OK     
2 x-bce-request-id: 1214cca7 4ad5 451d 9215 71cb844c0a50     
3 Date: Thu, 16 Mar 2017 06:29:48 GMT    
4 Content Type: application/json;charset=UTF 8     
5 Server: BWS  
6  
7{
8    "nextMarker": "",
9    "marker": "",
10    "maxKeys": 1,
11    "isTruncated": true,
12    "listenerList": [
13        {
14        "listenerPort": 53,
15        "backendPort": 53,
16        "scheduler": "RoundRobin",
17        "healthCheckTimeoutInSecond": 3,
18        "healthCheckInterval": 3,
19        "unhealthyThreshold": 3,
20        "healthyThreshold": 3,
21        "getBlbIp": false,
22        "listenerType": "UDP",
23        "udpSessionTimeout": 90,
24        "healthCheckString": "\\00\\01\\01\\00\\00\\01\\00\\00\\00\\00\\00\\00\\05baidu\\03com\\00\\00\\01\\00\\01",
25        "healthCheckType": "UDP"
26    },
27    {
28        "listenerPort": 82,
29        "backendPort": 80,
30        "scheduler": "RoundRobin",
31        "healthCheckTimeoutInSecond": 3,
32        "healthCheckInterval": 3,
33        "unhealthyThreshold": 3,
34        "healthyThreshold": 3,
35        "getBlbIp": false,
36        "listenerType": "TCP",
37        "tcpSessionTimeout": 900
38    },
39    {
40        "listenerPort": 87,
41        "backendPort": 80,
42        "scheduler": "RoundRobin",
43        "healthCheckTimeoutInSecond": 3,
44        "healthCheckInterval": 3,
45        "unhealthyThreshold": 3,
46        "healthyThreshold": 3,
47        "getBlbIp": false,
48        "listenerType": "HTTP",
49        "keepSession": false,
50        "xForwardFor": true,
51        "healthCheckType": "HTTP",
52        "healthCheckPort": 80,
53        "healthCheckURI": "/",
54        "healthCheckNormalStatus": "http_2xx|http_3xx",
55        "healthCheckHost": "",
56        "serverTimeout": 30,
57        "redirectPort": 0
58    },
59    {
60        "listenerPort": 443,
61        "backendPort": 80,
62        "scheduler": "RoundRobin",
63        "healthCheckTimeoutInSecond": 3,
64        "healthCheckInterval": 3,
65        "unhealthyThreshold": 3,
66        "healthyThreshold": 3,
67        "getBlbIp": false,
68        "listenerType": "HTTPS",
69        "keepSession": false,
70        "xForwardFor": true,
71        "healthCheckType": "HTTP",
72        "healthCheckPort": 80,
73        "healthCheckURI": "/",
74        "healthCheckNormalStatus": "http_2xx|http_3xx",
75        "healthCheckHost": "",
76        "serverTimeout": 30,
77        "certIds": [
78            "cert-gs8bktrm7drp"
79        ],
80        "dualAuth": false,
81        "encryptionType": "tls_cipher_policy_1_2_secure",
82        "encryptionProtocols": [
83            "tlsv12"
84        ],
85        "appliedCiphers": "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA"
86    },
87    {
88        "listenerPort": 446,
89        "backendPort": 80,
90        "scheduler": "RoundRobin",
91        "healthCheckTimeoutInSecond": 3,
92        "healthCheckInterval": 3,
93        "unhealthyThreshold": 3,
94        "healthyThreshold": 3,
95        "getBlbIp": false,
96        "listenerType": "SSL",
97        "certIds": [
98            "cert-gs8bktrm7drp"
99        ],
100        "dualAuth": true,
101        "clientCertIds": [
102            "cert-0x037gwe4fmg"
103        ],
104        "encryptionType": "tls_cipher_policy_default",
105        "encryptionProtocols": [
106            "tlsv10",
107            "tlsv11",
108            "tlsv12"
109        ],
110        "appliedCiphers": "ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:AES128-GCM-SHA256:AES256-SHA:AES128-SHA:AES256-GCM-SHA384:AES256-SHA256:AES128-SHA256:DES-CBC3-SHA"
111    }
112    ]
113}  

UpdateTCPListener: Update TCP listener

Description

Update the parameters of a TCP listener under the specified LoadBalancer. All fields specified in the request will be updated, while unspecified fields will remain unchanged. Listeners are identified by ports.

Request structure

Plain Text
1PUT /v{version}/blb/{blbId}/TCPlistener?listenerPort={listenerPort}&clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "backendPort":backendPort,
7    "scheduler":scheduler,
8    "healthCheckType":healthCheckType,
9    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
10    "healthCheckInterval":healthCheckInterval,
11    "unhealthyThreshold":unhealthyThreshold,
12    "healthyThreshold":healthyThreshold
13}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int Yes Query The listener port to be updated, which shall be an integer between 1 and 65535.
backendPort int No RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String No RequestBody Load balancer algorithm supporting 3 methods: "RoundRobin"/"LeastConnection"/"Hash", among which "RoundRobin" means weighted round-robin, "LeastConnection" means weighted minimum connection counts, and "Hash" means source IP-based hashing.
healthCheckType String No RequestBody Health check protocol type, which supports "TCP".
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1PUT /v1/blb/lb-j8UqijYf/TCPlistener?listenerPort=80&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4
5{
6    "backendPort":95,
7    "scheduler":"LeastConnection",
8    "healthCheckTimeoutInSecond":4,
9    "healthCheckInterval":5,
10    "unhealthyThreshold":2
11}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

UpdateUDPListener: Update UDP listener

Description

  • Update the parameters of a UDP listener under the specified LoadBalancer. All domains specified in the request parameters will be updated, while unspecified domains will remain unchanged. Listeners are identified by ports.

Request structure

Plain Text
1PUT /v{version}/blb/{blbId}/UDPlistener?listenerPort={listenerPort} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "backendPort":backendPort,
7    "scheduler":scheduler,
8    "healthCheckType":healthCheckType,
9    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
10    "healthCheckInterval":healthCheckInterval,
11    "unhealthyThreshold":unhealthyThreshold,
12    "healthyThreshold":healthyThreshold,
13    "healthCheckString":"healthCheck"
14}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int Yes Query The listener port, which shall be an integer between 1 and 65535.
backendPort int No RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String No RequestBody Load balancer algorithm supporting 3 methods: "RoundRobin"/"LeastConnection"/"Hash", among which "RoundRobin" means weighted round-robin, "LeastConnection" means weighted minimum connection counts, and "Hash" means source IP-based hashing.
healthCheckType String No RequestBody Health check protocol type, which supports "UDP"/"ICMP".
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.
healthCheckString String No RequestBody The health check request string sent to the real server requires a response upon receipt. It supports standard escape sequences such as \00 and \xf2, facilitating the configuration of binary format requests. It must be loaded when the health check protocol is "UDP".
udpSessionTimeout int No RequestBody UDP session timeout duration. The default is 90 seconds, but it can be set as an integer between 5 and 4000 seconds.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1POST /v1/blb/lb-j8UqijYf/UDPlistener?clientToken=asdfg HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4
5{
6    "listenerPort":95,
7    "backendPort":95,
8    "scheduler":"LeastConnection",
9    "healthCheckTimeoutInSecond":4,
10    "healthCheckInterval":5,
11    "unhealthyThreshold":2,
12	"healthCheckString":"healthCheck",
13    "udpSessionTimeout": 90
14}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

UpdateHTTPListener: Update HTTP listener

Description

Update the parameters of an HTTP listener under the specified LoadBalancer. All domains specified in the request parameters will be updated, while unspecified domains will remain unchanged. Listeners are identified by ports.

Request structure

Plain Text
1PUT /v{version}/blb/{blbId}/HTTPlistener?listenerPort={listenerPort}&clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "backendPort":backendPort,
7    "scheduler":scheduler,
8    "keepSession":keepSession,
9    "keepSessionType":keepSessionType,
10    "keepSessionDuration":keepSessionDuration,
11    "keepSessionCookieName":keepSessionCookieName,
12    "xForwardFor":xForwardFor,
13    "xForwardedProto":xForwardedProto,
14    "healthCheckType":healthCheckType,
15    "healthCheckPort":healthCheckPort,
16    "healthCheckURI":healthCheckURI,
17    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
18    "healthCheckInterval":healthCheckInterval,
19    "unhealthyThreshold":unhealthyThreshold,
20    "healthyThreshold":healthyThreshold,
21    "healthCheckNormalStatus":healthCheckNormalStatus,
22    "healthCheckHost":healthCheckHost,
23    "serverTimeout":serverTimeout,
24    "redirectPort":redirectPort
25}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int Yes Query The listener port to be updated, which shall be an integer between 1 and 65535.
backendPort int No RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String No RequestBody Load balancer algorithm supporting 2 methods: "RoundRobin"/"LeastConnection", among which "RoundRobin" means weighted round-robin, and "LeastConnection" means minimum connection counts.
keepSession bool No RequestBody Whether to enable the session persistence function, meaning requests from the same client will be sent to the same real server. It is disabled by default.
keepSessionType String No RequestBody Cookie handling method for session persistence, valid only when the session persistence is enabled, supporting "insert"/"rewrite". It is "insert" by default.
keepSessionDuration int No RequestBody Cookie validity period for session persistence (unit: second). It is valid only when session persistence is enabled. It is 3600s by default, and shall be an integer between 1 and 15552000.
keepSessionCookieName String No RequestBody Cookie name to be overwritten for session persistence, valid only when the session persistence is enabled and keepSessionType="rewrite".
xForwardFor bool No RequestBody Whether to enable retrieving the real IP of the client. Once it is enabled, the real server can retrieve the real IP address of the client via the HTTP Header X-Forwarded-For. It is disabled by default.
xForwardedProto bool No RequestBody Forward the protocol used by the listener to the real server via the x-forwarded-proto HTTP Header.
healthCheckType String No RequestBody Health check protocol, supporting "HTTP"/"TCP"
healthCheckPort int No RequestBody Health check port. It is backendPort by default.
healthCheckURI String No RequestBody Health check URI. It is / by default. It is valid when the health check protocol is "HTTP".
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.
healthCheckNormalStatus String No RequestBody HTTP status codes for successful health checks, supporting combinations of 5 types of status codes such as "http_1xx|http_2xx". It is "http_2xx|http_3xx" by default. It is valid when the health check protocol is "HTTP".
healthCheckHost String No RequestBody The header field of the Layer 7 health check request will include the specified host field, such as "localhost", and the default is "". It is valid when the health check protocol is "HTTP".
serverTimeout int No RequestBody Real server maximum timeout (unit: second). It is 30 s by default, and shall be an integer between 1 and 3600.
redirectPort int No RequestBody Requests received by this listener is forwarded to the HTTPS listener, which is specified through this port.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1PUT /v1/blb/lb-j8UqijYf/HTTPlistener?listenerPort=8080&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4
5{
6    "backendPort":95,
7    "scheduler":"LeastConnection",
8    "healthCheckTimeoutInSecond":4,
9    "healthCheckInterval":5,
10    "unhealthyThreshold":2,
11    "xForwardFor":true,
12    "xForwardedProto":true,
13    "healthCheckType":"HTTP",
14    "serverTimeout":1800,
15    "healthCheckNormalStatus":"http_1xx|http_2xx",
16    "healthCheckHost":"localhost"
17}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

UpdateHTTPSListener: Update HTTPS listener

Description

Update the parameters of an HTTPS listener under the specified LoadBalancer. All domains specified in the request parameters will be updated, while unspecified domains will remain unchanged. Listeners are identified by ports.

Request structure

Plain Text
1PUT /v{version}/blb/{blbId}/HTTPSlistener?listenerPort={listenerPort}&clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "backendPort":backendPort,
7    "scheduler":scheduler,
8    "keepSession":keepSession,
9    "keepSessionType":keepSessionType,
10    "keepSessionDuration":keepSessionDuration,
11    "keepSessionCookieName":keepSessionCookieName,
12    "xForwardFor":xForwardFor,
13    "xForwardedProto":xForwardedProto,
14    "healthCheckType":healthCheckType,
15    "healthCheckPort":healthCheckPort,
16    "healthCheckURI":healthCheckURI,
17    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
18    "healthCheckInterval":healthCheckInterval,
19    "unhealthyThreshold":unhealthyThreshold,
20    "healthyThreshold":healthyThreshold,
21    "healthCheckNormalStatus":healthCheckNormalStatus,
22    "healthCheckHost":healthCheckHost,
23    "serverTimeout":serverTimeout,
24    "certIds":[certId],
25    "additionalCertDomains":[{"certId":certId,"host":host}]
26}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int Yes Query The listener port to be updated, which shall be an integer between 1 and 65535.
backendPort int No RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String No RequestBody Load balancer algorithm supporting 2 methods: "RoundRobin"/"LeastConnection", among which "RoundRobin" means weighted round-robin, and "LeastConnection" means minimum connection counts.
keepSession bool No RequestBody Whether to enable the session persistence function, meaning requests from the same client will be sent to the same real server. It is disabled by default.
keepSessionType String No RequestBody Cookie handling method for session persistence, valid only when the session persistence is enabled, supporting "insert"/"rewrite". It is "insert" by default.
keepSessionDuration int No RequestBody Cookie validity period for session persistence (unit: second). It is valid only when session persistence is enabled. It is 3600s by default, and shall be an integer between 1 and 15552000.
keepSessionCookieName String No RequestBody Cookie name to be overwritten for session persistence, valid only when the session persistence is enabled and keepSessionType="rewrite".
xForwardFor bool No RequestBody Whether to enable retrieving the real IP of the client. Once it is enabled, the real server can retrieve the real IP address of the client via the HTTP Header X-Forwarded-For. It is disabled by default.
xForwardedProto bool No RequestBody Forward the protocol used by the listener to the real server via the x-forwarded-proto HTTP Header.
healthCheckType String No RequestBody Health check protocol, supporting "HTTP"/"TCP"
healthCheckPort int No RequestBody Health check port. It is backendPort by default.
healthCheckURI String No RequestBody Health check URI. It is / by default. It is valid when the health check protocol is "HTTP".
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.
healthCheckNormalStatus String No RequestBody HTTP status codes for successful health checks, supporting combinations of 5 types of status codes such as "http_1xx|http_2xx". It is "http_2xx|http_3xx" by default. It is valid when the health check protocol is "HTTP".
healthCheckHost String No RequestBody The header field of the Layer 7 health check request will include the specified host field, such as "localhost", and the default is "". It is valid when the health check protocol is "HTTP".
serverTimeout int No RequestBody Real server maximum timeout (unit: second). It is 30 s by default, and shall be an integer between 1 and 3600.
certIds List No RequestBody Certificate chain to be loaded by the listener. Currently, only one certificate ID is allowed. If multiple IDs are uploaded, only the last one is valid.
additionalCertDomains List<[AdditionalCertDomain](BLB/API Reference/Appendix.md#AdditionalCertDomain)> No RequestBody Extended domain name
encryptionType String No RequestBody Encryption options. Support: tls_cipher_policy_default/tls_cipher_policy_1_1/tls_cipher_policy_1_2/tls_cipher_policy_1_2_secure/userDefind. For corresponding encryption protocols and cipher suites, refer to [encryption](BLB/API Reference/Appendix.md#encryption).
encryptionProtocols List No RequestBody When encryptionType is userDefined, the protocol type list is a string array composed of the combinations of three protocols: "tlsv10", "tlsv11" and "tlsv12" protocol.
appliedCiphers String No RequestBody For the cipher suite, refer to [encryption](BLB/API Reference/Appendix.md#encryption) Different suites shall be separated by colons ":".

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1PUT /v1/blb/lb-j8UqijYf/HTTPSlistener?listenerPort=88&clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4
5{
6    "backendPort":95,
7    "scheduler":"LeastConnection",
8    "healthCheckTimeoutInSecond":4,
9    "healthCheckInterval":5,
10    "unhealthyThreshold":2,
11    "xForwardFor":true,
12    "healthCheckType":"HTTP",
13    "serverTimeout":1800,
14    "healthCheckNormalStatus":"http_1xx|http_2xx",
15    "healthCheckHost":"localhost"
16}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

UpdateSSLListener: Update SSL listener

Description

  • Update the parameters of an SSL listener under the specified LoadBalancer. All domains specified in the request parameters will be updated, while unspecified domains will remain unchanged. Listeners are identified by ports.

Request structure

Plain Text
1PUT /v{version}/blb/{blbId}/SSLlistener?listenerPort={listenerPort} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "backendPort":backendPort,
7    "scheduler":scheduler,
8    "healthCheckType":healthCheckType,
9    "healthCheckTimeoutInSecond":healthCheckTimeoutInSecond,
10    "healthCheckInterval":healthCheckInterval,
11    "unhealthyThreshold":unhealthyThreshold,
12    "healthyThreshold":healthyThreshold,
13    "certIds":[certId],
14    "encryptionType":encryptionType,
15    "encryptionProtocols":[protocol1, protacol2],
16    "dualAuth":false,
17    "clientCertIds":[clientCertId]
18}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
listenerPort int Yes Query The listener port to be updated, which shall be an integer between 1 and 65535.
backendPort int No RequestBody The listener port of real server, which shall be an integer between 1 and 65535.
scheduler String No RequestBody Load balancer algorithm supporting 3 methods: "RoundRobin"/"LeastConnection"/"Hash", among which "RoundRobin" means weighted round-robin, "LeastConnection" means weighted minimum connection counts, and "Hash" means source IP-based hashing.
healthCheckType String No RequestBody Health check protocol type, which supports "TCP".
healthCheckTimeoutInSecond int No RequestBody Health check timeout duration (unit: second). It is 3 by default, and shall be an integer between 1 and 60.
healthCheckInterval int No RequestBody Health check interval (unit: second). It is 3 by default, and shall be an integer between 1 and 10.
unhealthyThreshold int No RequestBody Unhealthy threshold represents the number of consecutive health check failures required to block the real server. Default is 3, and it must be an integer between 2 and 5.
healthyThreshold int No RequestBody Healthy threshold represents the number of consecutive successful health checks required to set the real server as available. Default is 3, and it must be an integer between 2 and 5.
certIds List\ No RequestBody Certificate chain to be loaded by the listener. Currently, only one certificate ID is allowed. If multiple IDs are uploaded, only the last one is valid.
encryptionType String No RequestBody Encryption options. Support: tls_cipher_policy_default/tls_cipher_policy_1_1/tls_cipher_policy_1_2/tls_cipher_policy_1_2_secure/userDefind. For corresponding encryption protocols and cipher suites, refer to [encryption](BLB/API Reference/Appendix.md#encryption).
encryptionProtocols List No RequestBody When encryptionType is userDefined, the protocol type list is a string array composed of the combinations of three protocols: "tlsv10", "tlsv11" and "tlsv12" protocol.
appliedCiphers String No RequestBody For the cipher suite, refer to [encryption](BLB/API Reference/Appendix.md#encryption) Different suites shall be separated by colons ":".
dualAuth boolean No RequestBody Whether to enable mutual authentication, and it is disabled by default.
clientCertIds List\ No RequestBody When dualAuth is true, the loaded client certificate chain currently only allows the uploading of one certificate ID. If multiple IDs are uploaded, only the last one is valid.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1POST /v1/blb/lb-j8UqijYf/SSLlistener?clientToken=asdfg HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: bce-auth-v1/5e5a8adf11ae475ba95f1bd38228b44f/2016-04-10T08:26:52Z/1800/host;x-bce-date/ec3c0069f9abb1e247773a62707224124b2b31b4c171133677f9042969791f02
4
5{
6    "listenerPort":95,
7    "backendPort":95,
8    "scheduler":"LeastConnection",
9    "healthCheckTimeoutInSecond":4,
10    "healthCheckInterval":5,
11    "unhealthyThreshold":2,
12    "certIds":["cert-zfj2ey2z4kmm"]
13}

Response example

Plain Text
1HTTP/1.1 200 OK
2x-bce-request-id: 946002ee-cb4f-4aad-b686-5be55df27f09
3Date: Wed, 10 Apr 2016 08:26:52 GMT
4Transfer-Encoding: chunked
5Content-Type: application/json;charset=UTF-8
6Server: BWS

DeleteListeners: Delete listener

Description

  • Delete listeners under the specified LoadBalancer. Those listeners are specified by listener ports.
  • Supports batch deletion

Request structure

Plain Text
1PUT /v{version}/blb/{blbId}/listener?{action}&clientToken={clientToken} HTTP/1.1
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "portList":[port1,port2,...]
7}
8 Or
9{
10    "portTypeList":[
11        {
12            "port":port,
13            "type":"type"
14        },
15        {
16            "port":port,
17            "type":"type"
18        },
19    ]
20}

Request headers

No special headers beyond common headers.

Request parameters

Parameter name Types Whether required Parameter location Description
version String Yes URL parameter API version number, current value is 1.
blbId String Yes URL parameter LoadBalancer identifier
action String Yes URL parameter batchdelete
clientToken String Yes Query Idempotency Token, with length no more than 64 characters.
portList List No RequestBody All ports of listeners to be deleted form an array.
portTypeList List<[PortTypeModel](BLB/API Reference/Appendix.md#PortTypeModel)> No RequestBody An array of all ports and protocols of listeners to be deleted. If multiple protocols on the same port are enabled and only one protocol needs to be removed, use this parameter. At least one of portList or portTypeList must be provided.

Response Status Code

Respond with 200 after successful operation, and respond with error codes after failed operation, as shown in [Error Codes](BLB/API Reference/Error code.md)

Response headers

No special headers beyond common headers.

Response parameters

None

Request example

Plain Text
1PUT /v1/blb/lb-j8UqijYf/listener?batchdelete&clientToken=clienttokentest
2Host: blb.bj.baidubce.com
3Authorization: authorization string
4
5{
6    "portList":[80,87]
7}
8 Or
9{
10    "portTypeList":[
11        {
12            "port":80,
13            "type":"TCP"
14        },
15        {
16            "port":80,
17            "type":"UDP"
18        },
19    ]
20}

Response example

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

Previous
Standard BLB Instance Related Interfaces
Next
Standard BLB Real Server Related Interfaces