LoadBalancerService
extends VultrService
in package
Load balancer service handler, for all load-balancers endpoints.
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- createForwardingRule() : void
- Create a forwarding rule for a load balancer.
- createLoadBalancer() : LoadBalancer
- Create a load balancer in a particular region.
- deleteForwardRule() : void
- Delete forwarding rule on a load balancer.
- deleteLoadBalancer() : void
- Delete a load balancer on the account.
- getFirewallRule() : FirewallRule
- Get a specific firewall rule on a load balancer.
- getFirewallRules() : array<string|int, FirewallRule>
- Get firewall rules for a load balancer.
- getForwardingRule() : FowardRule
- Get a specific forwarding rule for on a load balancer.
- getForwardingRules() : array<string|int, ForwardRule>
- Get forwarding rules for a specific load balancer.
- getLoadBalancer() : LoadBalancer
- Get load balancers on the account.
- getLoadBalancers() : array<string|int, LoadBalancer>
- Get a specific load balancer on the account.
- updateLoadBalancer() : void
- Update information for a load balancer. All attributes are optional. If not set the attributes will not be sent to the api.
- createObject() : ModelInterface
- deleteObject() : void
- getClientHandler() : VultrClientHandler
- getListObjects() : array<string|int, ModelInterface>
- getObject() : ModelInterface
- getVultrClient() : VultrClient
- list() : array<string|int, mixed>
- patchObject() : void
- getReadableClassType() : string
- setRules() : void
Properties
$vultr
protected
VultrClient
$vultr
$client
private
VultrClientHandler
$client
Methods
__construct()
public
__construct(VultrClient $vultr, VultrClientHandler $client) : mixed
Parameters
- $vultr : VultrClient
- $client : VultrClientHandler
createForwardingRule()
Create a forwarding rule for a load balancer.
public
createForwardingRule( $id, ForwardRule $rule) : void
Parameters
- $id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $rule : ForwardRule
Tags
createLoadBalancer()
Create a load balancer in a particular region.
public
createLoadBalancer( $create) : LoadBalancer
Parameters
Tags
Return values
LoadBalancerdeleteForwardRule()
Delete forwarding rule on a load balancer.
public
deleteForwardRule( $loadbalancer_id, $forward_id) : void
Parameters
- $loadbalancer_id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $forward_id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
Tags
deleteLoadBalancer()
Delete a load balancer on the account.
public
deleteLoadBalancer( $id) : void
Parameters
Tags
getFirewallRule()
Get a specific firewall rule on a load balancer.
public
getFirewallRule( $loadbalancer_id, $firewall_id) : FirewallRule
Parameters
- $loadbalancer_id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $firewall_id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
Tags
Return values
FirewallRulegetFirewallRules()
Get firewall rules for a load balancer.
public
getFirewallRules( $id[, &$options = null ]) : array<string|int, FirewallRule>
Parameters
- $id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $options : = null
-
- ListOptions|null - Interact via reference.
Tags
Return values
array<string|int, FirewallRule>getForwardingRule()
Get a specific forwarding rule for on a load balancer.
public
getForwardingRule( $loadbalancer_id, $forward_id) : FowardRule
Parameters
- $loadbalancer_id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $forward_id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
Tags
Return values
FowardRulegetForwardingRules()
Get forwarding rules for a specific load balancer.
public
getForwardingRules( $id[, &$options = null ]) : array<string|int, ForwardRule>
Parameters
- $id :
-
- string - Example: cb676a46-66fd-4dfb-b839-443f2e6c0b60
- $options : = null
-
- ListOptions|null - Interact via reference.
Tags
Return values
array<string|int, ForwardRule>getLoadBalancer()
Get load balancers on the account.
public
getLoadBalancer( $id) : LoadBalancer
Parameters
Tags
Return values
LoadBalancergetLoadBalancers()
Get a specific load balancer on the account.
public
getLoadBalancers([ &$options = null ]) : array<string|int, LoadBalancer>
Parameters
Tags
Return values
array<string|int, LoadBalancer>updateLoadBalancer()
Update information for a load balancer. All attributes are optional. If not set the attributes will not be sent to the api.
public
updateLoadBalancer( $id, $update) : void
Parameters
Tags
createObject()
protected
createObject( $uri, $model, $params) : ModelInterface
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are creating
- $params :
-
- array - The values that we will be sending. Refactor to use getUpdateParams/getUpdateArray?
Tags
Return values
ModelInterfacedeleteObject()
protected
deleteObject( $uri, $model) : void
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are acting on deleting. This doesn't need to be a fully initialized object.
Tags
getClientHandler()
protected
getClientHandler() : VultrClientHandler
Return values
VultrClientHandlergetListObjects()
protected
getListObjects( $uri, $model[, &$options = null ][, $params = null ]) : array<string|int, ModelInterface>
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object that will be mapped to the get response.
- $options : = null
-
- ListOptions - Pagination object
- $params : = null
-
- array - filter parameters.
Tags
Return values
array<string|int, ModelInterface>getObject()
protected
getObject( $uri, $model) : ModelInterface
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object that will be mapped to the get response.
Tags
Return values
ModelInterfacegetVultrClient()
protected
getVultrClient() : VultrClient
Return values
VultrClientlist()
protected
list(string $uri, ModelInterface $model, ListOptions &$options[, array<string|int, mixed>|null $params = null ]) : array<string|int, mixed>
Parameters
- $uri : string
- $model : ModelInterface
- $options : ListOptions
- $params : array<string|int, mixed>|null = null
Return values
array<string|int, mixed>patchObject()
protected
patchObject( $uri, $model[, array<string|int, mixed>|null $params = null ]) : void
Parameters
- $uri :
-
- string - the url address to query after api.vultr.com/v2
- $model :
-
- ModelInterface - the object model that we are updating. This needs to be a fully initialized object.
- $params : array<string|int, mixed>|null = null
Tags
getReadableClassType()
private
getReadableClassType(ModelInterface $model) : string
Parameters
- $model : ModelInterface
Return values
stringsetRules()
private
setRules(LoadBalancer &$object) : void
Parameters
- $object : LoadBalancer