Class LoadBalancer
A load balancer is a logical device which belongs to a cloud account. It is used to distribute workloads between multiple back-end systems or services, based on the criteria defined as part of its configuration.
- OpenCloud\Common\Base
-
OpenCloud\Common\Resource\BaseResource
-
OpenCloud\Common\Resource\PersistentResource
-
OpenCloud\LoadBalancer\Resource\LoadBalancer implements OpenCloud\DNS\Resource\HasPtrRecordsInterface
Located at OpenCloud/LoadBalancer/Resource/LoadBalancer.php
public
|
#
addNode( string $address, integer $port, boolean $condition = OpenCloud\LoadBalancer\Resource\NodeCondition::ENABLED, string $type = null, integer $weight = null )
This method creates a Node object and adds it to a list of Nodes to be added to the LoadBalancer. This method will not add the nodes directly to the load balancer itself; it stores them in an array and the nodes are added later, in one of two ways: |
public
array
|
|
public
Guzzle\Http\Message\Response
|
|
public
|
#
addVirtualIp( string $type = OpenCloud\LoadBalancer\Resource\IpType::PUBLIC_TYPE, integer $ipVersion = null )
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
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
array
|
#
addCertificateMapping( string $hostName, string $privateKey, string $certificate, string $intermediateCertificate = null )
Creates a certificate mapping. |
public
array
|
#
updateCertificateMapping( integer $id, string $hostName = null, string $privateKey = null, string $certificate = null, string $intermediateCertificate = null )
Updates a certificate mapping. |
public
Guzzle\Http\Message\Response
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
|
|
public
Guzzle\Http\Message\Response
|
#
createAccessList( array $list )
Creates an access list. You must provide an array of \stdClass objects, each of which contains `type' and `address' properties. Valid types for the former are: "DENY" or "ALLOW". The address must be a valid IP address, either v4 or v6. |
public
|
|
public
|
|
public
boolean
|
|
public
Guzzle\Http\Message\Response
|
|
public
boolean
|
|
public
Guzzle\Http\Message\Response
|
|
public
|
|
public
|
|
public
|
|
protected
object
|
|
protected
|
PATCH_CONTENT_TYPE
|
public
mixed
|
$id
|
|
public
string
|
$name
Name of the load balancer to create. The name must be 128 characters or less in length, and all UTF-8 characters are valid. |
|
public
string
|
$port
Port of the service which is being load balanced. |
|
public
string
|
$protocol
Protocol of the service which is being load balanced. |
|
public
array|Collection
|
$virtualIps
Type of virtual IP to add along with the creation of a load balancer. |
# array() |
public
array|Collection
|
$nodes
Nodes to be added to the load balancer. |
# array() |
public
Collection
|
$accessList
The access list management feature allows fine-grained network access controls to be applied to the load balancer's virtual IP address. |
|
public
|
$algorithm
Algorithm that defines how traffic should be directed between back-end nodes. |
|
public
boolean
|
$httpsRedirect
Enables or disables HTTP to HTTPS redirection for the load balancer. |
|
public
|
$connectionLogging
Current connection logging configuration. |
|
public
|
$connectionThrottle
Specifies limits on the number of connections per IP address to help mitigate malicious or abusive traffic to your applications. |
|
public
|
$healthMonitor
The type of health monitor check to perform to ensure that the service is performing properly. |
|
public
SessionPersistance
|
$sessionPersistence
Forces multiple requests, of the same protocol, from clients to be directed to the same node. |
|
public
array| |
$metadata
Information (metadata) that can be associated with each load balancer for the client's personal use. |
# array() |
public
integer
|
$timeout
The timeout value for the load balancer and communications with its nodes. Defaults to 30 seconds with a maximum of 120 seconds. |
|
public
mixed
|
$created
|
|
public
mixed
|
$updated
|
|
public
mixed
|
$status
|
|
public
mixed
|
$nodeCount
|
|
public
mixed
|
$sourceAddresses
|
|
public
mixed
|
$cluster
|
|
protected static
string
|
$json_name
|
# 'loadBalancer' |
protected static
string
|
$url_resource
|
# 'loadbalancers' |
protected
array
|
$associatedResources
|
# array(
'certificateMapping' => 'CertificateMapping',
'node' => 'Node',
'virtualIp' => 'VirtualIp',
'connectionLogging' => 'ConnectionLogging',
'healthMonitor' => 'HealthMonitor',
'sessionPersistance' => 'SessionPersistance'
) |
protected
array
|
$associatedCollections
|
# array(
'certificateMappings' => 'CertificateMapping',
'nodes' => 'Node',
'virtualIps' => 'VirtualIp',
'accessList' => 'Access'
) |
protected
array
|
$createKeys
|
# array(
'name',
'port',
'protocol',
'virtualIps',
'nodes',
'accessList',
'algorithm',
'connectionLogging',
'connectionThrottle',
'healthMonitor',
'sessionPersistence',
'httpsRedirect'
) |
$parent,
$service
|
$aliases
|