Client Reference
Load Balancers
Load balancers distribute traffic across your origin servers to reduce response time and increase availability. A load balancer is scoped to either an account or a zone: pass exactly one of $accountId or $zoneId.
Load balancers distribute traffic across your origin servers to reduce response time and increase availability. A load balancer is scoped to either an account or a zone: pass exactly one of $accountId or $zoneId.
List
List configured load balancers.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | No | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | No | Zone Identifier. Provide exactly one of $accountId or $zoneId. |
php
$response = $client->loadBalancers()->list('ACCOUNT_ID', 'ZONE_ID');
Create
Create a new load balancer.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | Yes | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | Yes | Zone Identifier. Provide exactly one of $accountId or $zoneId. | |
values | array | Yes | Values to set on the load balancer, e.g. `name`, `default_pools`, `fallback_pool`. |
php
$response = $client->loadBalancers()->create('ACCOUNT_ID', 'ZONE_ID', []);
Get
Get a single configured load balancer.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | Yes | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | Yes | Zone Identifier. Provide exactly one of $accountId or $zoneId. | |
loadBalancerId | string | Yes | Load Balancer Identifier. |
php
$response = $client->loadBalancers()->get('ACCOUNT_ID', 'ZONE_ID', 'LOAD_BALANCER_ID');
Update
Update an existing load balancer, overwriting the full configuration.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | Yes | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | Yes | Zone Identifier. Provide exactly one of $accountId or $zoneId. | |
loadBalancerId | string | Yes | Load Balancer Identifier. | |
values | array | Yes | Values to set on the load balancer, e.g. `name`, `default_pools`, `fallback_pool`. |
php
$response = $client->loadBalancers()->update('ACCOUNT_ID', 'ZONE_ID', 'LOAD_BALANCER_ID', []);
Edit
Apply changes to an existing load balancer, overwriting only the supplied properties.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | Yes | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | Yes | Zone Identifier. Provide exactly one of $accountId or $zoneId. | |
loadBalancerId | string | Yes | Load Balancer Identifier. | |
values | array | Yes | Values to patch on the load balancer. |
php
$response = $client->loadBalancers()->edit('ACCOUNT_ID', 'ZONE_ID', 'LOAD_BALANCER_ID', []);
Delete
Delete a load balancer.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string|null | Yes | Account Identifier. Provide exactly one of $accountId or $zoneId. | |
zoneId | string|null | Yes | Zone Identifier. Provide exactly one of $accountId or $zoneId. | |
loadBalancerId | string | Yes | Load Balancer Identifier. |
php
$response = $client->loadBalancers()->delete('ACCOUNT_ID', 'ZONE_ID', 'LOAD_BALANCER_ID');
Usage
Fetch the current load balancer usage for an account.
| Param | Type | Required | Default | Description |
|---|---|---|---|---|
accountId | string | Yes | Account Identifier. |
php
$response = $client->loadBalancers()->usage('ACCOUNT_ID');

