OpenCloud/LoadBalancer/LoadBalancer.php

Properties

Description

Defines a load balancer object

Classes

LoadBalancer

Properties

 
 
 
No 
No 

Description

The LoadBalancer class represents a single load balancer
NOTE: see BillableLoadBalancer, a subclass, defined at the end of this file.

Methods

Access, AccessList, AddNode, AddNodes, AddVirtualIp, ConnectionLogging, ConnectionThrottle, ContentCaching, CreateJson, ErrorPage, HealthMonitor, Metadata, MetadataList, Node, NodeEvent, NodeEventList, NodeList, SSLTermination, SessionPersistence, Stats, Usage, VirtualIp, VirtualIpList,

Access(   $data = null, ) : n/a

Arguments

Name Type Description Default
$data n/a null

Return value

Type Description
n/a n/a

AccessList( ) : n/a

Return value

Type Description
n/a n/a

AddNode( string   $address, integer   $port, boolean   $condition = 'ENABLED', string   $type = null, integer   $weight = null, ) : void

Description

adds a node to the load balancer
This method creates a Node object and adds it to a list of Nodes to be added to the LoadBalancer. *Very important:* this method *NEVER* adds the nodes directly to the load balancer itself; it stores them on the object, and the nodes are added later, in one of two ways: * for a new LoadBalancer, the Nodes are added as part of the Create() method call. * for an existing LoadBalancer, you must call the AddNodes() method

Arguments

Name Type Description Default
$address string

the IP address of the node

$port integer

the port # of the node

$condition boolean

the initial condition of the node

'ENABLED'
$type string

either PRIMARY or SECONDARY

null
$weight integer

the node weight (for round-robin)

null

Return value

Type Description
void

Tags

Name Description
api
throws if value is not valid

AddNodes( ) : \OpenCloud\LoadBalancer\HttpResponse

Description

adds queued nodes to the load balancer
In many cases, Nodes will be added to the Load Balancer when it is created (via the `Create()` method), but this method is provided when a set of Nodes needs to be added after the fact.

Return value

Type Description
\OpenCloud\LoadBalancer\HttpResponse

Tags

Name Description
api

AddVirtualIp(   $type = 'PUBLIC', integer   $ipVersion = NULL, ) : void

Description

adds a virtual IP to the load balancer
You can use the strings `'PUBLIC'` or `'SERVICENET`' to indicate the public or internal networks, or you can pass the `Id` of an existing IP address.

Arguments

Name Type Description Default
$type n/a 'PUBLIC'
$ipVersion integer

either null, 4, or 6 (both, IPv4, or IPv6)

NULL

Return value

Type Description
void

Tags

Name Description
api

ConnectionLogging( ) : n/a

Return value

Type Description
n/a n/a

ConnectionThrottle( ) : n/a

Return value

Type Description
n/a n/a

ContentCaching( ) : n/a

Return value

Type Description
n/a n/a

CreateJson( ) : \OpenCloud\LoadBalancer\stdClass

Description

returns the JSON object for Create()

Return value

Type Description
\OpenCloud\LoadBalancer\stdClass

ErrorPage( ) : \OpenCloud\LoadBalancer\ErrorPage

Description

returns the load balancer's error page object

Return value

Type Description
\OpenCloud\LoadBalancer\ErrorPage

Tags

Name Description
api

HealthMonitor( ) : \OpenCloud\LoadBalancer\HealthMonitor

Description

returns the load balancer's health monitor object

Return value

Type Description
\OpenCloud\LoadBalancer\HealthMonitor

Tags

Name Description
api

Metadata(   $data = null, ) : n/a

Arguments

Name Type Description Default
$data n/a null

Return value

Type Description
n/a n/a

MetadataList( ) : n/a

Return value

Type Description
n/a n/a

Node(   $id = null, ) : n/a

Description

returns a Node object

Arguments

Name Type Description Default
$id n/a null

Return value

Type Description
n/a n/a

NodeEvent( ) : n/a

Description

returns a NodeEvent object

Return value

Type Description
n/a n/a

NodeEventList( ) : n/a

Description

returns a Collection of NodeEvents

Return value

Type Description
n/a n/a

NodeList( ) : n/a

Description

returns a Collection of Nodes

Return value

Type Description
n/a n/a

SSLTermination( ) : n/a

Return value

Type Description
n/a n/a

SessionPersistence( ) : n/a

Return value

Type Description
n/a n/a

Stats( ) : \OpenCloud\LoadBalancer\Stats

Description

returns statistics on the load balancer operation
cannot be created, updated, or deleted

Return value

Type Description
\OpenCloud\LoadBalancer\Stats

Tags

Name Description
api

Usage( ) : n/a

Return value

Type Description
n/a n/a

VirtualIp(   $data = null, ) : n/a

Description

returns a single Virtual IP (not called publicly)

Arguments

Name Type Description Default
$data n/a null

Return value

Type Description
n/a n/a

VirtualIpList( ) : n/a

Description

returns a Collection of Virtual Ips

Return value

Type Description
n/a n/a

Properties

$_create_keys, $accessList, $algorithm, $connectionLogging, $connectionThrottle, $created, $healthMonitor, $id, $json_name, $metadata, $name, $nodeCount, $nodes, $port, $protocol, $sessionPersistence, $sourceAddresses, $status, $timeout, $updated, $url_resource, $virtualIps,

  private  $_create_keys = array('name', 'port', 'protocol', 'virtualIps', 'nodes', 'accessList', 'algorithm', 'connectionLogging', 'connectionThrottle', 'healthMonitor', 'sessionPersistence')




  public  $accessList =




  public  $algorithm =




  public  $connectionLogging =




  public  $connectionThrottle =




  public  $created =




  public  $healthMonitor =




  public  $id =




  protected  static $json_name = 'loadBalancer'




  public  $metadata = array()




  public  $name =




  public  $nodeCount =




  public  $nodes = array()




  public  $port =




  public  $protocol =




  public  $sessionPersistence =




  public  $sourceAddresses =




  public  $status =




  public  $timeout =




  public  $updated =




  protected  static $url_resource = 'loadbalancers'




  public  $virtualIps = array()




Documentation was generated by phpDocumentor 2.0.0b6 .

Namespaces

Packages