Ordinary BLB Instance

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
  • SDK
  • arrow
  • PHP-SDK
  • arrow
  • Ordinary BLB Instance
Table of contents on this page
  • Create BLB instance
  • Modify BLB instance
  • Query BLB instance list
  • Delete BLB instance
  • Create tcpListener instance
  • Create udpListener instance
  • Create httpListener instance
  • Create httpsListener instance
  • Query tcpListener instance
  • Query udpListener instance
  • Query httpListener instance
  • Query httpsListener instance
  • Update tcpListener instance
  • Update udpListener instance
  • Update httpListener instance
  • Update httpsListener instance
  • Delete Listener instance
  • Add real server instance
  • Query a real server instance by port
  • Query a real server instance
  • Update a real server instance
  • Remove real server instance

Ordinary BLB Instance

Updated at:2025-10-16

General-purpose BLB instances offer standard BLB functionalities, serving the basic requirements of most users for load balancing. These instances provide a lightweight design, straightforward configuration, and cost efficiency.

For specific parameter definitions, refer to the BLB official documentation under API reference: General-purpose BLB APIs.

Create BLB instance

Plain Text
1<!---1、*Required. A one-sentence description of the function.-->
2<!---2、*Required. This section is a secondary task. The document uses level-2 headings as the highest-level headings.-->

You can create BLB instance with the following code:

Plain Text
1    /**
2     * Create an nat with the specified options.
3     *
4     * @param string $name
5     *          name of nat
6     *
7     * @param string $vpcId
8     *          id of vpc which nat created in
9     *
10     * @param string $subnetId
11     *          id of subnet which blb created in
12     *
13     * @param string $desc
14     *          description of blb
15     *
16     * @param string $clientToken
17     *          if the clientToken is not specified by the user, a random String
18     *          generated by default algorithm will be used.
19     *
20     * @param array $options
21     *          The optional bce configuration, which will overwrite the
22     *          default configuration that was passed while creating EipClient instance.
23     *
24     * @return mixed
25     */
26    public function createBlb($vpcId = null, $subnetId = null, $name = null, $desc = null, $clientToken = null, $options = array())
27    {
28      
29    }

Usage examples are as follows:

Plain Text
1public function testCreateBlb()
2    {
3        $resp = $this->client->createBlb("vpc-545hyqfg6m5s","sbn-e54j0dxwshj6");
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Modify BLB instance

You can modify a BLB instance with the following code:

Plain Text
1    /**
2     * update single blb
3     *
4     * @param string $blbId
5     *          id of blb instance
6     *
7     * @param string $name
8     *          name of blb instance to be updated
9     *
10     * @param string $desc
11     *          description of blb instance to be updated
12     *
13     * @param string $clientToken
14     *          if the clientToken is not specified by the user, a random String
15     *          generated by default algorithm will be used.
16     *
17     * @param array $options
18     *          The optional bce configuration, which will overwrite the
19     *          default configuration that was passed while creating EipClient instance.
20     *
21     * @return mixed
22     */
23    public function updateBlb($blbId, $name = null, $desc = null, $clientToken = null, $options = array())
24    {
25       
26    }

Usage examples are as follows:

Plain Text
1public function testUpdateBlb()
2    {
3        $resp = $this->client->updateBlb('lb-48872493', 'testName', 'testDesc');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Query BLB instance list

You can query the BLB list with the following code:

Plain Text
1    /**
2     * get a list of blb owned by the authenticated user and specified conditions.
3     *
4     * @param string $address
5     *          address of blb in vpc. The optional parameter
6     *
7     * @param string $blbId
8     *          id of blb instance. The optional parameter
9     *
10     * @param string $name
11     *          name of nat instance. The optional parameter
12     *
13     * @param string $bccId
14     *          id of bcc instance which is bound to blb instance. The optional parameter
15     *
16     * @param string $marker
17     *          The optional parameter marker specified in the original request to specify
18     *          where in the results to begin listing.
19     *
20     * @param int $maxKeys
21     *          The optional parameter to specifies the max number of list result to return.
22     *          The default value is 1000.
23     *
24     * @param array $options
25     *           The optional bce configuration, which will overwrite the
26     *          default configuration that was passed while creating EipClient instance.
27     *
28     * @return mixed
29     */
30    public function listBlbs($address = null, $name = null, $blbId = null, $bccId = null, $marker = null, $maxKeys = 1000, $options = array())
31    {
32       
33    }

Usage examples are as follows:

Plain Text
1public function testListBlb()
2    {
3        $resp = $this->client->listBlbs();
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Delete BLB instance

You can delete BLB instance with the following code:

Plain Text
1    /**
2     * delete the blb
3     * Only the Postpaid instance or Prepaid which is expired can be released.
4     *
5     * @param string $blbId
6     *          id of blb instance to be released
7     *
8     * @param string $clientToken
9     *          if the clientToken is not specified by the user, a random String
10     *          generated by default algorithm will be used.
11     *
12     * @param array $options
13     *          The optional bce configuration, which will overwrite the
14     *          default configuration that was passed while creating EipClient instance.
15     *
16     * @return mixed
17     */
18    public function deleteBlb($blbId, $clientToken = null, $options = array())
19    {
20       
21    }

Usage examples are as follows:

Plain Text
1    public function testDeleteBlb()
2    {
3        $resp = $this->client->deleteBlb('lb-90d60843');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Create tcpListener instance

You can create a tcpListener instance with the following code:

Plain Text
1    /**
2     * Create a tcp listener with the specified options.
3     *
4     * @param string $blbId
5     *          id of blb
6     *
7     * @param int $listenerPort
8     *          front end port of listener
9     *
10     * @param int $backendPort
11     *          back end port of listener
12     *
13     * @param string $scheduler
14     *          scheduler of load balance
15     *
16     * @param int $healthCheckTimeoutInSecond
17     *          timeout of health check, default 3 seconds
18     *
19     * @param int $healthCheckInterval
20     *          interval of health check, default 3 seconds
21     *
22     * @param int $unhealthyThreshold
23     *          times threshold of unhealthy check, default 3 times
24     *
25     * @param int $healthyThreshold
26     *          times threshold of healthy check, default 3 times
27     *
28     * @param string $clientToken
29     *          if the clientToken is not specified by the user, a random String
30     *          generated by default algorithm will be used.
31     *
32     * @param array $options
33     *          The optional bce configuration, which will overwrite the
34     *          default configuration that was passed while creating EipClient instance.
35     *
36     * @return mixed
37     */
38    public function createTcpListener($blbId, $listenerPort, $backendPort, $scheduler, $healthCheckTimeoutInSecond = 3, $healthCheckInterval = 3, $unhealthyThreshold = 3, $healthyThreshold = 3, $clientToken = null, $options = array())
39    {
40      
41    }

Usage examples are as follows:

Plain Text
1    public function testCreateTcpListener()
2    {
3        $resp = $this->client->createTcpListener('lb-48872493', 8000, 8008, 'RoundRobin');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Create udpListener instance

You can create an udpListener instance with the following code:

Plain Text
1    /**
2     * Create a udp listener with the specified options.
3     *
4     * @param string $blbId
5     *          id of blb
6     *
7     * @param int $listenerPort
8     *          front end port of listener
9     *
10     * @param int $backendPort
11     *          back end port of listener
12     *
13     * @param string $scheduler
14     *          scheduler of load balance
15     *
16     * @param string $healthCheckString
17     *          string to send for health check
18     *
19     * @param int $healthCheckTimeoutInSecond
20     *          timeout of health check, default 3 seconds
21     *
22     * @param int $healthCheckInterval
23     *          interval of health check, default 3 seconds
24     *
25     * @param int $unhealthyThreshold
26     *          times threshold of unhealthy check, default 3 times
27     *
28     * @param int $healthyThreshold
29     *          times threshold of healthy check, default 3 times
30     *
31     * @param string $clientToken
32     *          if the clientToken is not specified by the user, a random String
33     *          generated by default algorithm will be used.
34     *
35     * @param array $options
36     *          The optional bce configuration, which will overwrite the
37     *          default configuration that was passed while creating EipClient instance.
38     *
39     * @return mixed
40     */
41    public function createUdpListener($blbId, $listenerPort, $backendPort, $scheduler, $healthCheckString, $healthCheckTimeoutInSecond = 3, $healthCheckInterval = 3, $unhealthyThreshold = 3, $healthyThreshold = 3, $clientToken = null, $options = array())
42    {
43       
44    }

Usage examples are as follows:

Plain Text
1    public function testCreateUdpListener()
2    {
3        $resp = $this->client->createUdpListener('lb-48872493', 8001, 8008, 'RoundRobin', 'aaa');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Create httpListener instance

You can create an httpListener instance with the following code:

Plain Text
1    /**
2     * Create a http listener with the specified options.
3     *
4     * @param string $blbId
5     *          id of blb
6     *
7     * @param int $listenerPort
8     *          front end port of listener
9     *
10     * @param int $backendPort
11     *          back end port of listener
12     *
13     * @param string $scheduler
14     *          scheduler of load balance
15     *
16     * @param boolean $keepSession
17     *          switch for keep session
18     *
19     * @param string $keepSessionType
20     *          type to keep session
21     *
22     * @param int $keepSessionDuration
23     *          duration to keep session
24     *
25     * @param string $keepSessionCookieName
26     *          cookie name for keep session
27     *
28     * @param boolean $xForwardFor
29     *          switch for acquiring real ip
30     *
31     * @param string $healthCheckType
32     *          type for health check
33     *
34     * @param int $healthCheckPort
35     *          port for health check
36     *
37     * @param string $healthCheckURI
38     *          uri for health check
39     *
40     * @param int $healthCheckTimeoutInSecond
41     *          timeout of health check, default 3 seconds
42     *
43     * @param int $healthCheckInterval
44     *          interval of health check, default 3 seconds
45     *
46     * @param int $unhealthyThreshold
47     *          times threshold of unhealthy check, default 3 times
48     *
49     * @param int $healthyThreshold
50     *          times threshold of healthy check, default 3 times
51     *
52     * @param string $healthCheckNormalStatus
53     *          normal status for http health check
54     *
55     * @param int $serverTimeout
56     *          timeout for backend server
57     *
58     * @param int $redirectPort
59     *          port for redirect
60     *
61     * @param string $clientToken
62     *          if the clientToken is not specified by the user, a random String
63     *          generated by default algorithm will be used.
64     *
65     * @param array $options
66     *          The optional bce configuration, which will overwrite the
67     *          default configuration that was passed while creating EipClient instance.
68     *
69     * @return mixed
70     */
71    public function createHttpListener($blbId, $listenerPort, $backendPort, $scheduler, $keepSession = false,
72                                       $keepSessionType = null, $keepSessionDuration = 3600, $keepSessionCookieName = null,
73                                       $xForwardFor = false, $healthCheckType = null, $healthCheckPort = null, $healthCheckURI = null,
74                                       $healthCheckTimeoutInSecond = 3, $healthCheckInterval = 3, $unhealthyThreshold = 3, $healthyThreshold = 3,
75                                       $healthCheckNormalStatus = null, $serverTimeout = 30, $redirectPort = null, $clientToken = null, $options = array())
76    {
77       
78    }

Usage examples are as follows:

Plain Text
1    public function testCreateHttpListener()
2    {
3        $resp = $this->client->createHttpListener('lb-48872493', 8002, 8008, 'RoundRobin');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Create httpsListener instance

You can create an httpsListener instance with the following code:

Plain Text
1    /**
2     * Create a https listener with the specified options.
3     *
4     * @param string $blbId
5     *          id of blb
6     *
7     * @param int $listenerPort
8     *          front end port of listener
9     *
10     * @param int $backendPort
11     *          back end port of listener
12     *
13     * @param string $scheduler
14     *          scheduler of load balance
15     *
16     * @param array $certIds
17     *          SSL certs for listener
18     *
19     * @param boolean $keepSession
20     *          switch for keep session
21     *
22     * @param string $keepSessionType
23     *          type to keep session
24     *
25     * @param int $keepSessionDuration
26     *          duration to keep session
27     *
28     * @param string $keepSessionCookieName
29     *          cookie name for keep session
30     *
31     * @param boolean $xForwardFor
32     *          switch for acquiring real ip
33     *
34     * @param string $healthCheckType
35     *          type for health check
36     *
37     * @param int $healthCheckPort
38     *          port for health check
39     *
40     * @param string $healthCheckURI
41     *          uri for health check
42     *
43     * @param int $healthCheckTimeoutInSecond
44     *          timeout of health check, default 3 seconds
45     *
46     * @param int $healthCheckInterval
47     *          interval of health check, default 3 seconds
48     *
49     * @param int $unhealthyThreshold
50     *          times threshold of unhealthy check, default 3 times
51     *
52     * @param int $healthyThreshold
53     *          times threshold of healthy check, default 3 times
54     *
55     * @param string $healthCheckNormalStatus
56     *          normal status for http health check
57     *
58     * @param int $serverTimeout
59     *          timeout for backend server
60     *
61     * @param boolean $ie6Compatible
62     *          switch for compatibility with IE6
63     *
64     * @param string $clientToken
65     *          if the clientToken is not specified by the user, a random String
66     *          generated by default algorithm will be used.
67     *
68     * @param array $options
69     *          The optional bce configuration, which will overwrite the
70     *          default configuration that was passed while creating EipClient instance.
71     *
72     * @return mixed
73     */
74    public function createHttpsListener($blbId, $listenerPort, $backendPort, $scheduler, $certIds, $keepSession = false,
75                                        $keepSessionType = null, $keepSessionDuration = 3600, $keepSessionCookieName = null,
76                                        $xForwardFor = false, $healthCheckType = null, $healthCheckPort = null, $healthCheckURI = null,
77                                        $healthCheckTimeoutInSecond = 3, $healthCheckInterval = 3, $unhealthyThreshold = 3, $healthyThreshold = 3,
78                                        $healthCheckNormalStatus = null, $serverTimeout = 30, $ie6Compatible = true, $clientToken = null, $options = array())
79    {
80        
81    }

Usage examples are as follows:

Plain Text
1    public function testCreateHttpsListener()
2    {
3        $resp = $this->client->createHttpsListener('lb-5538a312', 8000, 8008, 'RoundRobin', array('cert-ahc9dhfh7icf'));
4        print_r($resp);
5        $this->assertNotNull($resp);

Query tcpListener instance

You can query a tcpListener instance with the following code:

Plain Text
1    /**
2     * list tcp listener.
3     *
4     * @param string $blbId
5     *          id of blb instance
6     *
7     * @param int listenerPort
8     *          port of listener
9     *
10     * @param string $marker
11     *          The optional parameter marker specified in the original request to specify
12     *          where in the results to begin listing.
13     *
14     * @param int $maxKeys
15     *          The optional parameter to specifies the max number of list result to return.
16     *          The default value is 1000.
17     *
18     * @param array $options
19     *          The optional bce configuration, which will overwrite the
20     *          default configuration that was passed while creating EipClient instance.
21     *
22     * @return mixed
23     */
24    public function listTcpListeners($blbId, $listenerPort = null, $marker = null, $maxKeys = 1000, $options = array())
25    {
26       
27    }

Usage examples are as follows:

Plain Text
1    public function testListTcpListeners()
2    {
3        $resp = $this->client->listTcpListeners('lb-48872493');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Query udpListener instance

You can query an udpListener instance with the following code:

Plain Text
1    /**
2     * list udp listener.
3     *
4     * @param string $blbId
5     *          id of blb instance
6     *
7     * @param int listenerPort
8     *          port of listener
9     *
10     * @param string $marker
11     *          The optional parameter marker specified in the original request to specify
12     *          where in the results to begin listing.
13     *
14     * @param int $maxKeys
15     *          The optional parameter to specifies the max number of list result to return.
16     *          The default value is 1000.
17     *
18     * @param array $options
19     *          The optional bce configuration, which will overwrite the
20     *          default configuration that was passed while creating EipClient instance.
21     *
22     * @return mixed
23     */
24    public function listUdpListeners($blbId, $listenerPort = null, $marker = null, $maxKeys = 1000, $options = array())
25    {
26       
27    }

Usage examples are as follows:

Plain Text
1   public function testListUdpListeners()
2    {
3        $resp = $this->client->listUdpListeners('lb-48872493');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Query httpListener instance

You can query an httpListener instance with the following code:

Plain Text
1    /**
2     * list http listener.
3     *
4     * @param string $blbId
5     *          id of blb instance
6     *
7     * @param int listenerPort
8     *          port of listener
9     *
10     * @param string $marker
11     *          The optional parameter marker specified in the original request to specify
12     *          where in the results to begin listing.
13     *
14     * @param int $maxKeys
15     *          The optional parameter to specifies the max number of list result to return.
16     *          The default value is 1000.
17     *
18     * @param array $options
19     *          The optional bce configuration, which will overwrite the
20     *          default configuration that was passed while creating EipClient instance.
21     *
22     * @return mixed
23     */
24    public function listHttpListeners($blbId, $listenerPort = null, $marker = null, $maxKeys = 1000, $options = array())
25    {
26        
27    }

Usage examples are as follows:

Plain Text
1    public function testListHttpListeners()
2    {
3        $resp = $this->client->listHttpListeners('lb-48872493');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Query httpsListener instance

You can query an httpsListener instance with the following code:

Plain Text
1    /**
2     * list https listener.
3     *
4     * @param string $blbId
5     *          id of blb instance
6     *
7     * @param int listenerPort
8     *          port of listener
9     *
10     * @param string $marker
11     *          The optional parameter marker specified in the original request to specify
12     *          where in the results to begin listing.
13     *
14     * @param int $maxKeys
15     *          The optional parameter to specifies the max number of list result to return.
16     *          The default value is 1000.
17     *
18     * @param array $options
19     *          The optional bce configuration, which will overwrite the
20     *          default configuration that was passed while creating EipClient instance.
21     *
22     * @return mixed
23     */
24    public function listHttpsListeners($blbId, $listenerPort = null, $marker = null, $maxKeys = 1000, $options = array())
25    {
26        
27    }

Usage examples are as follows:

Plain Text
1        public function testListHttpsListeners()
2    {
3        $resp = $this->client->listHttpsListeners('lb-5538a312');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Update tcpListener instance

You can update a tcpListener instance with the following code:

Plain Text
1    /**
2     * update a tcp listener with the specified options.
3     *
4     * @param string $blbId
5     *          id of blb
6     *
7     * @param int $listenerPort
8     *          front end port of listener
9     *
10     * @param int $backendPort
11     *          back end port of listener
12     *
13     * @param string $scheduler
14     *          scheduler of load balance
15     *
16     * @param int $healthCheckTimeoutInSecond
17     *          timeout of health check, default 3 seconds
18     *
19     * @param int $healthCheckInterval
20     *          interval of health check, default 3 seconds
21     *
22     * @param int $unhealthyThreshold
23     *          times threshold of unhealthy check, default 3 times
24     *
25     * @param int $healthyThreshold
26     *          times threshold of healthy check, default 3 times
27     *
28     * @param string $clientToken
29     *          if the clientToken is not specified by the user, a random String
30     *          generated by default algorithm will be used.
31     *
32     * @param array $options
33     *          The optional bce configuration, which will overwrite the
34     *          default configuration that was passed while creating EipClient instance.
35     *
36     * @return mixed
37     */
38    public function updateTcpListener($blbId, $listenerPort, $backendPort = null, $scheduler = null, $healthCheckTimeoutInSecond = null, $healthCheckInterval = null, $unhealthyThreshold = null, $healthyThreshold = null, $clientToken = null, $options = array())
39    {
40       
41    }

Usage examples are as follows:

Plain Text
1    public function testUpdateTcpListener()
2    {
3        $resp = $this->client->updateTcpListener('lb-48872493', 8000, 8009);
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Update udpListener instance

You can update an udpListener instance with the following code:

Plain Text
1    /**
2     * update a udp listener with the specified options.
3     *
4     * @param string $blbId
5     *          id of blb
6     *
7     * @param int $listenerPort
8     *          front end port of listener
9     *
10     * @param int $backendPort
11     *          back end port of listener
12     *
13     * @param string $scheduler
14     *          scheduler of load balance
15     *
16     * @param string $healthCheckString
17     *          string to send for health check
18     *
19     * @param int $healthCheckTimeoutInSecond
20     *          timeout of health check, default 3 seconds
21     *
22     * @param int $healthCheckInterval
23     *          interval of health check, default 3 seconds
24     *
25     * @param int $unhealthyThreshold
26     *          times threshold of unhealthy check, default 3 times
27     *
28     * @param int $healthyThreshold
29     *          times threshold of healthy check, default 3 times
30     *
31     * @param string $clientToken
32     *          if the clientToken is not specified by the user, a random String
33     *          generated by default algorithm will be used.
34     *
35     * @param array $options
36     *          The optional bce configuration, which will overwrite the
37     *          default configuration that was passed while creating EipClient instance.
38     *
39     * @return mixed
40     */
41    public function updateUdpListener($blbId, $listenerPort, $backendPort, $scheduler, $healthCheckString, $healthCheckTimeoutInSecond = null, $healthCheckInterval = null, $unhealthyThreshold = null, $healthyThreshold = null, $clientToken = null, $options = array())
42    {
43       
44    }

Usage examples are as follows:

Plain Text
1        public function testUpdateUdpListener()
2    {
3        $resp = $this->client->updateUdpListener('lb-48872493', 8001, 8009, 'RoundRobin', 'bbb');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Update httpListener instance

You can update an httpListener instance with the following code:

Plain Text
1    /**
2     * update a http listener with the specified options.
3     *
4     * @param string $blbId
5     *          id of blb
6     *
7     * @param int $listenerPort
8     *          front end port of listener
9     *
10     * @param int $backendPort
11     *          back end port of listener
12     *
13     * @param string $scheduler
14     *          scheduler of load balance
15     *
16     * @param boolean $keepSession
17     *          switch for keep session
18     *
19     * @param string $keepSessionType
20     *          type to keep session
21     *
22     * @param int $keepSessionDuration
23     *          duration to keep session
24     *
25     * @param string $keepSessionCookieName
26     *          cookie name for keep session
27     *
28     * @param boolean $xForwardFor
29     *          switch for acquiring real ip
30     *
31     * @param string $healthCheckType
32     *          type for health check
33     *
34     * @param int $healthCheckPort
35     *          port for health check
36     *
37     * @param string $healthCheckURI
38     *          uri for health check
39     *
40     * @param int $healthCheckTimeoutInSecond
41     *          timeout of health check, default 3 seconds
42     *
43     * @param int $healthCheckInterval
44     *          interval of health check, default 3 seconds
45     *
46     * @param int $unhealthyThreshold
47     *          times threshold of unhealthy check, default 3 times
48     *
49     * @param int $healthyThreshold
50     *          times threshold of healthy check, default 3 times
51     *
52     * @param string $healthCheckNormalStatus
53     *          normal status for http health check
54     *
55     * @param int $serverTimeout
56     *          timeout for backend server
57     *
58     * @param int $redirectPort
59     *          port for redirect
60     *
61     * @param string $clientToken
62     *          if the clientToken is not specified by the user, a random String
63     *          generated by default algorithm will be used.
64     *
65     * @param array $options
66     *          The optional bce configuration, which will overwrite the
67     *          default configuration that was passed while creating EipClient instance.
68     *
69     * @return mixed
70     */
71    public function updateHttpListener($blbId, $listenerPort, $backendPort = null, $scheduler = null, $keepSession = null,
72                                       $keepSessionType = null, $keepSessionDuration = null, $keepSessionCookieName = null,
73                                       $xForwardFor = null, $healthCheckType = null, $healthCheckPort = null, $healthCheckURI = null,
74                                       $healthCheckTimeoutInSecond = null, $healthCheckInterval = null, $unhealthyThreshold = null, $healthyThreshold = null,
75                                       $healthCheckNormalStatus = null, $serverTimeout = null, $redirectPort = null, $clientToken = null, $options = array())
76    {
77        
78    }

Usage examples are as follows:

Plain Text
1      public function testUpdateHttpListener()
2    {
3        $resp = $this->client->updateHttpListener('lb-48872493', 8002, 8009);
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Update httpsListener instance

You can update an httpsListener instance with the following code:

Plain Text
1    /**
2     * update a https listener with the specified options.
3     *
4     * @param string $blbId
5     *          id of blb
6     *
7     * @param int $listenerPort
8     *          front end port of listener
9     *
10     * @param int $backendPort
11     *          back end port of listener
12     *
13     * @param string $scheduler
14     *          scheduler of load balance
15     *
16     * @param array $certIds
17     *          SSL certs for listener
18     *
19     * @param boolean $keepSession
20     *          switch for keep session
21     *
22     * @param string $keepSessionType
23     *          type to keep session
24     *
25     * @param int $keepSessionDuration
26     *          duration to keep session
27     *
28     * @param string $keepSessionCookieName
29     *          cookie name for keep session
30     *
31     * @param boolean $xForwardFor
32     *          switch for acquiring real ip
33     *
34     * @param string $healthCheckType
35     *          type for health check
36     *
37     * @param int $healthCheckPort
38     *          port for health check
39     *
40     * @param string $healthCheckURI
41     *          uri for health check
42     *
43     * @param int $healthCheckTimeoutInSecond
44     *          timeout of health check, default 3 seconds
45     *
46     * @param int $healthCheckInterval
47     *          interval of health check, default 3 seconds
48     *
49     * @param int $unhealthyThreshold
50     *          times threshold of unhealthy check, default 3 times
51     *
52     * @param int $healthyThreshold
53     *          times threshold of healthy check, default 3 times
54     *
55     * @param string $healthCheckNormalStatus
56     *          normal status for http health check
57     *
58     * @param int $serverTimeout
59     *          timeout for backend server
60     *
61     * @param boolean $ie6Compatible
62     *          switch for compatibility with IE6
63     *
64     * @param string $clientToken
65     *          if the clientToken is not specified by the user, a random String
66     *          generated by default algorithm will be used.
67     *
68     * @param array $options
69     *          The optional bce configuration, which will overwrite the
70     *          default configuration that was passed while creating EipClient instance.
71     *
72     * @return mixed
73     */
74    public function updateHttpsListener($blbId, $listenerPort, $backendPort = null, $scheduler = null, $certIds = null, $keepSession = null,
75                                        $keepSessionType = null, $keepSessionDuration = null, $keepSessionCookieName = null,
76                                        $xForwardFor = null, $healthCheckType = null, $healthCheckPort = null, $healthCheckURI = null,
77                                        $healthCheckTimeoutInSecond = null, $healthCheckInterval = null, $unhealthyThreshold = null, $healthyThreshold = null,
78                                        $healthCheckNormalStatus = null, $serverTimeout = null, $ie6Compatible = null, $clientToken = null, $options = array())
79    {
80        
81    }

Usage examples are as follows:

Plain Text
1    public function testUpdateHttpsListener()
2    {
3        $resp = $this->client->updateHttpsListener('lb-5538a312', 8000, 8010);
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Delete Listener instance

You can delete a Listener instance with the following code:

Plain Text
1    /**
2     * delete a listener.
3     *
4     * @param string $blbId
5     *          id of blb
6     *
7     * @param array $portList
8     *          ports of listener to be deleted
9     *
10     * @param string $clientToken
11     *          if the clientToken is not specified by the user, a random String
12     *          generated by default algorithm will be used.
13     *
14     * @param array $options
15     *          The optional bce configuration, which will overwrite the
16     *          default configuration that was passed while creating EipClient instance.
17     *
18     * @return mixed
19     */
20    public function deleteListeners($blbId, $portList, $clientToken = null, $options = array())
21    {
22       
23    }

Usage examples are as follows:

Plain Text
1    public function testDeleteListener()
2    {
3        $resp = $this->client->deleteListeners('lb-48872493', array(8000, 8001));
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Add real server instance

You can add real server instance with the following code:

Plain Text
1    /**
2     * add backend server
3     *
4     * @param string $blbId
5     *          blb instance id
6     *
7     * @param array $backendServerList
8     *          back end servers to be added
9     *
10     * @param string $clientToken
11     *          if the clientToken is not specified by the user, a random String
12     *          generated by default algorithm will be used.
13     *
14     * @param array $options
15     *          The optional bce configuration, which will overwrite the
16     *          default configuration that was passed while creating EipClient instance.
17     *
18     * @return mixed
19     */
20    public function addBackendServer($blbId, $backendServerList, $clientToken = null, $options = array())
21    {
22       
23    }

Usage examples are as follows:

Plain Text
1    public function testAddServers()
2    {
3        $b1 = new BackendServer('i-xtsPZTGY', 2);
4        $b2 = new BackendServer('i-Xf3hfqWt', 3);
5        $backendServerList = array($b1, $b2);
6        $resp = $this->client->addBackendServer('lb-21e928b8', $backendServerList);
7        print_r($resp);
8        $this->assertNotNull($resp);
9    }

Query a real server instance by port

You can query real server instance with the following code:

Plain Text
1    /**
2     * list backend servers mounted with blb instance. Health Status will be presented while listener port is necessary
3     *
4     * @param string $blbId
5     *          blb instance id
6     *
7     * @param int listenerPort
8     *          port of listener
9     *
10     * @param string $marker
11     *          The optional parameter marker specified in the original request to specify
12     *          where in the results to begin listing.
13     *
14     * @param int $maxKeys
15     *          The optional parameter to specifies the max number of list result to return.
16     *          The default value is 1000.
17     *
18     * @param string $clientToken
19     *          if the clientToken is not specified by the user, a random String
20     *          generated by default algorithm will be used.
21     *
22     * @param array $options
23     *          The optional bce configuration, which will overwrite the
24     *          default configuration that was passed while creating EipClient instance.
25     *
26     * @return mixed
27     */
28    public function listBackendServersWithPort($blbId, $listenerPort, $marker = null, $maxKeys = 1000, $clientToken = null, $options = array())
29    {
30        
31    }

Usage examples are as follows:

Plain Text
1    public function testListBackendServersWithPort()
2    {
3        $resp = $this->client->listBackendServersWithPort('lb-21e928b8', 80);
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Query a real server instance

You can query real server instance with the following code:

Plain Text
1    /**
2     * list backend servers mounted with blb instance
3     *
4     * @param string $blbId
5     *          blb instance id
6     *
7     * @param string $marker
8     *          The optional parameter marker specified in the original request to specify
9     *          where in the results to begin listing.
10     *
11     * @param int $maxKeys
12     *          The optional parameter to specifies the max number of list result to return.
13     *          The default value is 1000.
14     *
15     * @param string $clientToken
16     *          if the clientToken is not specified by the user, a random String
17     *          generated by default algorithm will be used.
18     *
19     * @param array $options
20     *          The optional bce configuration, which will overwrite the
21     *          default configuration that was passed while creating EipClient instance.
22     *
23     * @return mixed
24     */
25    public function listBackendServers($blbId, $marker = null, $maxKeys = 1000, $clientToken = null, $options = array())
26    {
27       
28    }

Usage examples are as follows:

Plain Text
1    public function testListBackendServers()
2    {
3        $resp = $this->client->listBackendServers('lb-21e928b8');
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Update a real server instance

You can update real server instance with the following code:

Plain Text
1    /**
2     * update weight of backend servers
3     *
4     * @param string $blbId
5     *          blb instance id
6     *
7     * @param array $backendServerList
8     *          back end servers to be updated
9     *
10     * @param string $clientToken
11     *          if the clientToken is not specified by the user, a random String
12     *          generated by default algorithm will be used.
13     *
14     * @param array $options
15     *          The optional bce configuration, which will overwrite the
16     *          default configuration that was passed while creating EipClient instance.
17     *
18     * @return mixed
19     */
20    public function updateBackendServer($blbId, $backendServerList, $clientToken = null, $options = array())
21    {
22        
23    }

Usage examples are as follows:

Plain Text
1    public function testUpdateServers()
2    {
3        $b1 = new BackendServer('i-xtsPZTGY', 20);
4        $b2 = new BackendServer('i-Xf3hfqWt', 31);
5        $backendServerList = array($b1, $b2);
6        $resp = $this->client->updateBackendServer('lb-21e928b8', $backendServerList);
7        print_r($resp);
8        $this->assertNotNull($resp);
9    }

Remove real server instance

You can remove real server instance with the following code:

Plain Text
1    /**
2     * remove backend servers
3     *
4     * @param string $blbId
5     *          blb instance id
6     *
7     * @param array $backendServerList
8     *          back end servers to be removed
9     *
10     * @param string $clientToken
11     *          if the clientToken is not specified by the user, a random String
12     *          generated by default algorithm will be used.
13     *
14     * @param array $options
15     *          The optional bce configuration, which will overwrite the
16     *          default configuration that was passed while creating EipClient instance.
17     *
18     * @return mixed
19     */
20    public function removeBackendServers($blbId, $backendServerList, $clientToken = null, $options = array())
21    {
22        
23    }

Usage examples are as follows:

Plain Text
1    public function testRemoveServers()
2    {
3        $resp = $this->client->removeBackendServers('lb-21e928b8', array('i-xtsPZTGY', 'i-Xf3hfqWt'));
4        print_r($resp);
5        $this->assertNotNull($resp);
6    }

Previous
Install
Next
Overview