百度智能云

All Product Document

          Load Balance

          Common BLB Instance

          Common type blb instance provides conventional load balance feature components featuring light weight, simple configuration, and low price to meet the general needs of users for load balance.

          For the meaning of each parameter, please see the official blb documentation Common blb Interface under the api reference

          Create blb Instance

          You can create a BLB instance using the following code:

              /**
               * Create an nat with the specified options. 
               *
               * @param string $name 
               *          name of nat 
               *
               * @param string $vpcId 
               *          id of vpc which nat created in 
               *
               * @param string $subnetId 
               *          id of subnet which blb created in 
               *
               * @param string $desc 
               *          description of blb 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature createBlb($vpcId = null, $subnetId = null, $name = null, $desc = null, $clientToken = null, $options = array()) 
              { 
                
              } 

          The example is as follows:

          public feature testCreateBlb() 
              { 
                  $resp = $this->client->createBlb("vpc-545hyqfg6m5s","sbn-e54j0dxwshj6"); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Modify the blb Instance

          You can modify the blb instance using the following code:

              /**
               * update single blb 
               *
               * @param string $blbId 
               *          id of blb instance 
               *
               * @param string $name 
               *          name of blb instance to be updated 
               *
               * @param string $desc 
               *          description of blb instance to be updated 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature updateBlb($blbId, $name = null, $desc = null, $clientToken = null, $options = array()) 
              { 
                 
              } 

          The example is as follows:

          public feature testUpdateBlb() 
              { 
                  $resp = $this->client->updateBlb('lb-48872493', 'testName', 'testDesc'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Query a List of blb Instance

          You can query the blb list using the following code:

              /**
               * get a list of blb owned by the verified user and specified conditions. 
               *
               * @param string $address 
               *          address of blb in vpc. The optional parameter 
               *
               * @param string $blbId 
               *          id of blb instance. The optional parameter 
               *
               * @param string $name 
               *          name of nat instance. The optional parameter 
               *
               * @param string $bccId 
               *          id of bcc instance which is bound to blb instance. The optional parameter 
               *
               * @param string $marker 
               *          The optional parameter marker specified in the original request to specify 
               *          where in the results to begin listing. 
               *
               * @param int $maxKeys 
               *          The optional parameter to specifies the max number of list result to return. 
               *          The default value is 1000. 
               *
               * @param array $options 
               *           The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature listBlbs($address = null, $name = null, $blbId = null, $bccId = null, $marker = null, $maxKeys = 1000, $options = array()) 
              { 
                 
              } 

          The example is as follows:

          public feature testListBlb() 
              { 
                  $resp = $this->client->listBlbs(); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Delete blb Instance

          You can delete the blb instance using the following code:

              /**
               * delete the blb 
               * Only the Postpaid instance or Prepaid which is expired can be released. 
               *
               * @param string $blbId 
               *          id of blb instance to be released 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature deleteBlb($blbId, $clientToken = null, $options = array()) 
              { 
                 
              } 

          The example is as follows:

              public feature testDeleteBlb() 
              { 
                  $resp = $this->client->deleteBlb('lb-90d60843'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Create TcpListener Instance

          You can create a tcpListener instance using the following code:

              /**
               * Create a tcp listener with the specified options. 
               *
               * @param string $blbId 
               *          id of blb 
               *
               * @param int $listenerPort 
               *          front end port of listener 
               *
               * @param int $backendPort 
               *          back end port of listener 
               *
               * @param string $scheduler 
               *          scheduler of load balance 
               *
               * @param int $healthCheckTimeoutInSecond 
               *          timeout of health check, default 3 seconds 
               *
               * @param int $healthCheckInterval 
               *          interval of health check, default 3 seconds 
               *
               * @param int $unhealthyThreshold 
               *          times threshold of unhealthy check, default 3 times 
               *
               * @param int $healthyThreshold 
               *          times threshold of healthy check, default 3 times 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature createTcpListener($blbId, $listenerPort, $backendPort, $scheduler, $healthCheckTimeoutInSecond = 3, $healthCheckInterval = 3, $unhealthyThreshold = 3, $healthyThreshold = 3, $clientToken = null, $options = array()) 
              { 
                
              } 

          The example is as follows:

              public feature testCreateTcpListener() 
              { 
                  $resp = $this->client->createTcpListener('lb-48872493', 8000, 8008, 'RoundRobin'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Create UdpListener Instance

          You can create an udpListener instance using the following code:

              /**
               * Create a udp listener with the specified options. 
               *
               * @param string $blbId 
               *          id of blb 
               *
               * @param int $listenerPort 
               *          front end port of listener 
               *
               * @param int $backendPort 
               *          back end port of listener 
               *
               * @param string $scheduler 
               *          scheduler of load balance 
               *
               * @param string $healthCheckString 
               *          string to send for health check 
               *
               * @param int $healthCheckTimeoutInSecond 
               *          timeout of health check, default 3 seconds 
               *
               * @param int $healthCheckInterval 
               *          interval of health check, default 3 seconds 
               *
               * @param int $unhealthyThreshold 
               *          times threshold of unhealthy check, default 3 times 
               *
               * @param int $healthyThreshold 
               *          times threshold of healthy check, default 3 times 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature createUdpListener($blbId, $listenerPort, $backendPort, $scheduler, $healthCheckString, $healthCheckTimeoutInSecond = 3, $healthCheckInterval = 3, $unhealthyThreshold = 3, $healthyThreshold = 3, $clientToken = null, $options = array()) 
              { 
                 
              } 

          The example is as follows:

              public feature testCreateUdpListener() 
              { 
                  $resp = $this->client->createUdpListener('lb-48872493', 8001, 8008, 'RoundRobin', 'aaa'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Create HttpListener Instance

          You can create an httpListener instance using the following code:

              /**
               * Create a http listener with the specified options. 
               *
               * @param string $blbId 
               *          id of blb 
               *
               * @param int $listenerPort 
               *          front end port of listener 
               *
               * @param int $backendPort 
               *          back end port of listener 
               *
               * @param string $scheduler 
               *          scheduler of load balance 
               *
               * @param boolean $keepSession 
               *          switch for keep session 
               *
               * @param string $keepSessionType 
               *          type to keep session 
               *
               * @param int $keepSessionDuration 
               *          duration to keep session 
               *
               * @param string $keepSessionCookieName 
               *          cookie name for keep session 
               *
               * @param boolean $xForwardFor 
               *          switch for acquiring real ip 
               *
               * @param string $healthCheckType 
               *          type for health check 
               *
               * @param int $healthCheckPort 
               *          port for health check 
               *
               * @param string $healthCheckURI 
               *          uri for health check 
               *
               * @param int $healthCheckTimeoutInSecond 
               *          timeout of health check, default 3 seconds 
               *
               * @param int $healthCheckInterval 
               *          interval of health check, default 3 seconds 
               *
               * @param int $unhealthyThreshold 
               *          times threshold of unhealthy check, default 3 times 
               *
               * @param int $healthyThreshold 
               *          times threshold of healthy check, default 3 times 
               *
               * @param string $healthCheckNormalStatus 
               *          normal status for http health check 
               *
               * @param int $serverTimeout 
               *          timeout for backend server 
               *
               * @param int $redirectPort 
               *          port for redirect 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature createHttpListener($blbId, $listenerPort, $backendPort, $scheduler, $keepSession = false, 
                                                 $keepSessionType = null, $keepSessionDuration = 3600, $keepSessionCookieName = null, 
                                                 $xForwardFor = false, $healthCheckType = null, $healthCheckPort = null, $healthCheckURI = null, 
                                                 $healthCheckTimeoutInSecond = 3, $healthCheckInterval = 3, $unhealthyThreshold = 3, $healthyThreshold = 3, 
                                                 $healthCheckNormalStatus = null, $serverTimeout = 30, $redirectPort = null, $clientToken = null, $options = array()) 
              { 
                 
              } 

          The example is as follows:

              public feature testCreateHttpListener() 
              { 
                  $resp = $this->client->createHttpListener('lb-48872493', 8002, 8008, 'RoundRobin'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Create HttpsListener Instance

          You can create an httpsListener instance using the following code:

              /**
               * Create a https listener with the specified options. 
               *
               * @param string $blbId 
               *          id of blb 
               *
               * @param int $listenerPort 
               *          front end port of listener 
               *
               * @param int $backendPort 
               *          back end port of listener 
               *
               * @param string $scheduler 
               *          scheduler of load balance 
               *
               * @param array $certIds 
               *          SSL certs for listener 
               *
               * @param boolean $keepSession 
               *          switch for keep session 
               *
               * @param string $keepSessionType 
               *          type to keep session 
               *
               * @param int $keepSessionDuration 
               *          duration to keep session 
               *
               * @param string $keepSessionCookieName 
               *          cookie name for keep session 
               *
               * @param boolean $xForwardFor 
               *          switch for acquiring real ip 
               *
               * @param string $healthCheckType 
               *          type for health check 
               *
               * @param int $healthCheckPort 
               *          port for health check 
               *
               * @param string $healthCheckURI 
               *          uri for health check 
               *
               * @param int $healthCheckTimeoutInSecond 
               *          timeout of health check, default 3 seconds 
               *
               * @param int $healthCheckInterval 
               *          interval of health check, default 3 seconds 
               *
               * @param int $unhealthyThreshold 
               *          times threshold of unhealthy check, default 3 times 
               *
               * @param int $healthyThreshold 
               *          times threshold of healthy check, default 3 times 
               *
               * @param string $healthCheckNormalStatus 
               *          normal status for http health check 
               *
               * @param int $serverTimeout 
               *          timeout for backend server 
               *
               * @param boolean $ie6Compatible 
               *          switch for compatibility with IE6 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature createHttpsListener($blbId, $listenerPort, $backendPort, $scheduler, $certIds, $keepSession = false, 
                                                  $keepSessionType = null, $keepSessionDuration = 3600, $keepSessionCookieName = null, 
                                                  $xForwardFor = false, $healthCheckType = null, $healthCheckPort = null, $healthCheckURI = null, 
                                                  $healthCheckTimeoutInSecond = 3, $healthCheckInterval = 3, $unhealthyThreshold = 3, $healthyThreshold = 3, 
                                                  $healthCheckNormalStatus = null, $serverTimeout = 30, $ie6Compatible = true, $clientToken = null, $options = array()) 
              { 
                  
              } 

          The example is as follows:

              public feature testCreateHttpsListener() 
              { 
                  $resp = $this->client->createHttpsListener('lb-5538a312', 8000, 8008, 'RoundRobin', array('cert-ahc9dhfh7icf')); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 

          Query TcpListener Instance

          You can query a tcpListener instance using the following code:

              /**
               * list tcp listener. 
               *
               * @param string $blbId 
               *          id of blb instance 
               *
               * @param int listenerPort 
               *          port of listener 
               *
               * @param string $marker 
               *          The optional parameter marker specified in the original request to specify 
               *          where in the results to begin listing. 
               *
               * @param int $maxKeys 
               *          The optional parameter to specifies the max number of list result to return. 
               *          The default value is 1000. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature listTcpListeners($blbId, $listenerPort = null, $marker = null, $maxKeys = 1000, $options = array()) 
              { 
                 
              } 

          The example is as follows:

              public feature testListTcpListeners() 
              { 
                  $resp = $this->client->listTcpListeners('lb-48872493'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Query UdpListener Instance

          You can query a udpListener instance using the following code:

              /**
               * list udp listener. 
               *
               * @param string $blbId 
               *          id of blb instance 
               *
               * @param int listenerPort 
               *          port of listener 
               *
               * @param string $marker 
               *          The optional parameter marker specified in the original request to specify 
               *          where in the results to begin listing. 
               *
               * @param int $maxKeys 
               *          The optional parameter to specifies the max number of list result to return. 
               *          The default value is 1000. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature listUdpListeners($blbId, $listenerPort = null, $marker = null, $maxKeys = 1000, $options = array()) 
              { 
                 
              } 

          The example is as follows:

             public feature testListUdpListeners() 
              { 
                  $resp = $this->client->listUdpListeners('lb-48872493'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Query HttpListener Instance

          You can query a httpListener instance using the following code:

              /**
               * list http listener. 
               *
               * @param string $blbId 
               *          id of blb instance 
               *
               * @param int listenerPort 
               *          port of listener 
               *
               * @param string $marker 
               *          The optional parameter marker specified in the original request to specify 
               *          where in the results to begin listing. 
               *
               * @param int $maxKeys 
               *          The optional parameter to specifies the max number of list result to return. 
               *          The default value is 1000. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature listHttpListeners($blbId, $listenerPort = null, $marker = null, $maxKeys = 1000, $options = array()) 
              { 
                  
              } 

          The example is as follows:

              public feature testListHttpListeners() 
              { 
                  $resp = $this->client->listHttpListeners('lb-48872493'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Query HttpsListener Instance

          You can query a httpsListener instance using the following code:

              /**
               * list https listener. 
               *
               * @param string $blbId 
               *          id of blb instance 
               *
               * @param int listenerPort 
               *          port of listener 
               *
               * @param string $marker 
               *          The optional parameter marker specified in the original request to specify 
               *          where in the results to begin listing. 
               *
               * @param int $maxKeys 
               *          The optional parameter to specifies the max number of list result to return. 
               *          The default value is 1000. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature listHttpsListeners($blbId, $listenerPort = null, $marker = null, $maxKeys = 1000, $options = array()) 
              { 
                  
              } 

          The example is as follows:

                  public feature testListHttpsListeners() 
              { 
                  $resp = $this->client->listHttpsListeners('lb-5538a312'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Update TcpListener Instance

          You can update a tcpListener instance using the following code:

              /**
               * update a tcp listener with the specified options. 
               *
               * @param string $blbId 
               *          id of blb 
               *
               * @param int $listenerPort 
               *          front end port of listener 
               *
               * @param int $backendPort 
               *          back end port of listener 
               *
               * @param string $scheduler 
               *          scheduler of load balance 
               *
               * @param int $healthCheckTimeoutInSecond 
               *          timeout of health check, default 3 seconds 
               *
               * @param int $healthCheckInterval 
               *          interval of health check, default 3 seconds 
               *
               * @param int $unhealthyThreshold 
               *          times threshold of unhealthy check, default 3 times 
               *
               * @param int $healthyThreshold 
               *          times threshold of healthy check, default 3 times 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature updateTcpListener($blbId, $listenerPort, $backendPort = null, $scheduler = null, $healthCheckTimeoutInSecond = null, $healthCheckInterval = null, $unhealthyThreshold = null, $healthyThreshold = null, $clientToken = null, $options = array()) 
              { 
                 
              } 

          The example is as follows:

              public feature testUpdateTcpListener() 
              { 
                  $resp = $this->client->updateTcpListener('lb-48872493', 8000, 8009); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Update UdpListener Instance

          You can update a udpListener instance using the following code:

              /**
               * update a udp listener with the specified options. 
               *
               * @param string $blbId 
               *          id of blb 
               *
               * @param int $listenerPort 
               *          front end port of listener 
               *
               * @param int $backendPort 
               *          back end port of listener 
               *
               * @param string $scheduler 
               *          scheduler of load balance 
               *
               * @param string $healthCheckString 
               *          string to send for health check 
               *
               * @param int $healthCheckTimeoutInSecond 
               *          timeout of health check, default 3 seconds 
               *
               * @param int $healthCheckInterval 
               *          interval of health check, default 3 seconds 
               *
               * @param int $unhealthyThreshold 
               *          times threshold of unhealthy check, default 3 times 
               *
               * @param int $healthyThreshold 
               *          times threshold of healthy check, default 3 times 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature updateUdpListener($blbId, $listenerPort, $backendPort, $scheduler, $healthCheckString, $healthCheckTimeoutInSecond = null, $healthCheckInterval = null, $unhealthyThreshold = null, $healthyThreshold = null, $clientToken = null, $options = array()) 
              { 
                 
              } 

          The example is as follows:

                  public feature testUpdateUdpListener() 
              { 
                  $resp = $this->client->updateUdpListener('lb-48872493', 8001, 8009, 'RoundRobin', 'bbb'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Update HttpListener Instance

          You can update a httpListener instance using the following code:

              /**
               * update a http listener with the specified options. 
               *
               * @param string $blbId 
               *          id of blb 
               *
               * @param int $listenerPort 
               *          front end port of listener 
               *
               * @param int $backendPort 
               *          back end port of listener 
               *
               * @param string $scheduler 
               *          scheduler of load balance 
               *
               * @param boolean $keepSession 
               *          switch for keep session 
               *
               * @param string $keepSessionType 
               *          type to keep session 
               *
               * @param int $keepSessionDuration 
               *          duration to keep session 
               *
               * @param string $keepSessionCookieName 
               *          cookie name for keep session 
               *
               * @param boolean $xForwardFor 
               *          switch for acquiring real ip 
               *
               * @param string $healthCheckType 
               *          type for health check 
               *
               * @param int $healthCheckPort 
               *          port for health check 
               *
               * @param string $healthCheckURI 
               *          uri for health check 
               *
               * @param int $healthCheckTimeoutInSecond 
               *          timeout of health check, default 3 seconds 
               *
               * @param int $healthCheckInterval 
               *          interval of health check, default 3 seconds 
               *
               * @param int $unhealthyThreshold 
               *          times threshold of unhealthy check, default 3 times 
               *
               * @param int $healthyThreshold 
               *          times threshold of healthy check, default 3 times 
               *
               * @param string $healthCheckNormalStatus 
               *          normal status for http health check 
               *
               * @param int $serverTimeout 
               *          timeout for backend server 
               *
               * @param int $redirectPort 
               *          port for redirect 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature updateHttpListener($blbId, $listenerPort, $backendPort = null, $scheduler = null, $keepSession = null, 
                                                 $keepSessionType = null, $keepSessionDuration = null, $keepSessionCookieName = null, 
                                                 $xForwardFor = null, $healthCheckType = null, $healthCheckPort = null, $healthCheckURI = null, 
                                                 $healthCheckTimeoutInSecond = null, $healthCheckInterval = null, $unhealthyThreshold = null, $healthyThreshold = null, 
                                                 $healthCheckNormalStatus = null, $serverTimeout = null, $redirectPort = null, $clientToken = null, $options = array()) 
              { 
                  
              } 

          The example is as follows:

                public feature testUpdateHttpListener() 
              { 
                  $resp = $this->client->updateHttpListener('lb-48872493', 8002, 8009); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Update HttpsListener Instance

          You can update a httpsListener instance using the following code:

              /**
               * update a https listener with the specified options. 
               *
               * @param string $blbId 
               *          id of blb 
               *
               * @param int $listenerPort 
               *          front end port of listener 
               *
               * @param int $backendPort 
               *          back end port of listener 
               *
               * @param string $scheduler 
               *          scheduler of load balance 
               *
               * @param array $certIds 
               *          SSL certs for listener 
               *
               * @param boolean $keepSession 
               *          switch for keep session 
               *
               * @param string $keepSessionType 
               *          type to keep session 
               *
               * @param int $keepSessionDuration 
               *          duration to keep session 
               *
               * @param string $keepSessionCookieName 
               *          cookie name for keep session 
               *
               * @param boolean $xForwardFor 
               *          switch for acquiring real ip 
               *
               * @param string $healthCheckType 
               *          type for health check 
               *
               * @param int $healthCheckPort 
               *          port for health check 
               *
               * @param string $healthCheckURI 
               *          uri for health check 
               *
               * @param int $healthCheckTimeoutInSecond 
               *          timeout of health check, default 3 seconds 
               *
               * @param int $healthCheckInterval 
               *          interval of health check, default 3 seconds 
               *
               * @param int $unhealthyThreshold 
               *          times threshold of unhealthy check, default 3 times 
               *
               * @param int $healthyThreshold 
               *          times threshold of healthy check, default 3 times 
               *
               * @param string $healthCheckNormalStatus 
               *          normal status for http health check 
               *
               * @param int $serverTimeout 
               *          timeout for backend server 
               *
               * @param boolean $ie6Compatible 
               *          switch for compatibility with IE6 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature updateHttpsListener($blbId, $listenerPort, $backendPort = null, $scheduler = null, $certIds = null, $keepSession = null, 
                                                  $keepSessionType = null, $keepSessionDuration = null, $keepSessionCookieName = null, 
                                                  $xForwardFor = null, $healthCheckType = null, $healthCheckPort = null, $healthCheckURI = null, 
                                                  $healthCheckTimeoutInSecond = null, $healthCheckInterval = null, $unhealthyThreshold = null, $healthyThreshold = null, 
                                                  $healthCheckNormalStatus = null, $serverTimeout = null, $ie6Compatible = null, $clientToken = null, $options = array()) 
              { 
                  
              } 

          The example is as follows:

              public feature testUpdateHttpsListener() 
              { 
                  $resp = $this->client->updateHttpsListener('lb-5538a312', 8000, 8010); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Delete Listener Instance

          You can delete a Listener instance using the following code:

              /**
               * delete a listener. 
               *
               * @param string $blbId 
               *          id of blb 
               *
               * @param array $portList 
               *          ports of listener to be deleted 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature deleteListeners($blbId, $portList, $clientToken = null, $options = array()) 
              { 
                 
              } 

          The example is as follows:

              public feature testDeleteListener() 
              { 
                  $resp = $this->client->deleteListeners('lb-48872493', array(8000, 8001)); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Add Backend Server Instance

          You can add a backend server instance using the following code:

              /**
               * add backend server 
               *
               * @param string $blbId 
               *          blb instance id 
               *
               * @param array $backendServerList 
               *          back end servers to be added 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature addBackendServer($blbId, $backendServerList, $clientToken = null, $options = array()) 
              { 
                 
              } 

          The example is as follows:

              public feature testAddServers() 
              { 
                  $b1 = new BackendServer('i-xtsPZTGY', 2); 
                  $b2 = new BackendServer('i-Xf3hfqWt', 3); 
                  $backendServerList = array($b1, $b2); 
                  $resp = $this->client->addBackendServer('lb-21e928b8', $backendServerList); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Query Backend Server Instance with Ports

          You can query a backend server instance using the following code:

              /**
               * list backend servers mounted with blb instance. Health Status will be presented while listener port is necessary 
               *
               * @param string $blbId 
               *          blb instance id 
               *
               * @param int listenerPort 
               *          port of listener 
               *
               * @param string $marker 
               *          The optional parameter marker specified in the original request to specify 
               *          where in the results to begin listing. 
               *
               * @param int $maxKeys 
               *          The optional parameter to specifies the max number of list result to return. 
               *          The default value is 1000. 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature listBackendServersWithPort($blbId, $listenerPort, $marker = null, $maxKeys = 1000, $clientToken = null, $options = array()) 
              { 
                  
              } 

          The example is as follows:

              public feature testListBackendServersWithPort() 
              { 
                  $resp = $this->client->listBackendServersWithPort('lb-21e928b8', 80); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Query Backend Server Instance

          You can query a backend server instance using the following code:

              /**
               * list backend servers mounted with blb instance 
               *
               * @param string $blbId 
               *          blb instance id 
               *
               * @param string $marker 
               *          The optional parameter marker specified in the original request to specify 
               *          where in the results to begin listing. 
               *
               * @param int $maxKeys 
               *          The optional parameter to specifies the max number of list result to return. 
               *          The default value is 1000. 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature listBackendServers($blbId, $marker = null, $maxKeys = 1000, $clientToken = null, $options = array()) 
              { 
                 
              } 

          The example is as follows:

              public feature testListBackendServers() 
              { 
                  $resp = $this->client->listBackendServers('lb-21e928b8'); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Update Backend Server Instance

          You can update a backend server instance using the following code:

              /**
               * update weight of backend servers 
               *
               * @param string $blbId 
               *          blb instance id 
               *
               * @param array $backendServerList 
               *          back end servers to be updated 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature updateBackendServer($blbId, $backendServerList, $clientToken = null, $options = array()) 
              { 
                  
              } 

          The example is as follows:

              public feature testUpdateServers() 
              { 
                  $b1 = new BackendServer('i-xtsPZTGY', 20); 
                  $b2 = new BackendServer('i-Xf3hfqWt', 31); 
                  $backendServerList = array($b1, $b2); 
                  $resp = $this->client->updateBackendServer('lb-21e928b8', $backendServerList); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 

          Remove Backend Server Instance

          You can remove a backend server instance using the following code:

              /**
               * remove backend servers 
               *
               * @param string $blbId 
               *          blb instance id 
               *
               * @param array $backendServerList 
               *          back end servers to be removed 
               *
               * @param string $clientToken 
               *          if the clientToken is not specified by the user, a random String 
               *          generated by default algorithm will be used. 
               *
               * @param array $options 
               *          The optional bce configuration, which will overwrite the 
               *          default configuration that was passed while creating EipClient instance. 
               *
               * @return mixed 
               */
              public feature removeBackendServers($blbId, $backendServerList, $clientToken = null, $options = array()) 
              { 
                  
              } 

          The example is as follows:

              public feature testRemoveServers() 
              { 
                  $resp = $this->client->removeBackendServers('lb-21e928b8', array('i-xtsPZTGY', 'i-Xf3hfqWt')); 
                  print_r($resp); 
                  $this->assertNotNull($resp); 
              } 
          Previous
          Initialization
          Next
          GO-SDK