Class: LoadBalancer

LoadBalancer

new LoadBalancer()

LoadBalancer resource
Source:

Methods

add(loadBalancerId, parametersOrIds, callbackopt)

Create a forwarding rule object in a load balancer.
Parameters:
Name Type Attributes Description
loadBalancerId string The id of the load balancer for which to add a resource
parametersOrIds array | object Array of ids of objects to add to the load balancer. Otherwise, an object with required key of `droplet_ids`. See the official docs for valid attributes.
callback requestCallback <optional>
callback that handles the response
Source:

create(attributes, callbackopt)

Create a load balancer object.
Parameters:
Name Type Attributes Description
attributes object The attributes with which to create the load balancer. See the official docs for valid attributes.
callback requestCallback <optional>
callback that handles the response
Source:

createForwardingRules(loadBalancerId, parametersOrRules, callbackopt)

Create a forwarding rule object in a load balancer.
Parameters:
Name Type Attributes Description
loadBalancerId string The name of the load balancer for which to create a record
parametersOrRules array | object Array of rules to create on the load balancer. Otherwise, an object with required key of `forwarding_rules`. See the https://developers.digitalocean.com/documentation/v2/#load-balancers|official docs} for valid attributes.
callback requestCallback <optional>
callback that handles the response
Source:

delete(id, callbackopt)

Delete the identified load balancer object.
Parameters:
Name Type Attributes Description
id string The id of the load balancer to delete
callback requestCallback <optional>
callback that handles the response
Source:

deleteForwardingRules(loadBalancerId, parametersOrRules, callbackopt)

Delete the identified load balancer forwarding rule object.
Parameters:
Name Type Attributes Description
loadBalancerId string The name of the load balancer for which to delete a record
parametersOrRules array | object Array of rules on the load balancer to delete. Otherwise, an object with required key of `forwarding_rules`. See the https://developers.digitalocean.com/documentation/v2/#load-balancers|official docs} for valid attributes.
callback requestCallback <optional>
callback that handles the response
Source:

get(id, callbackopt)

Get the identified load balancer object.
Parameters:
Name Type Attributes Description
id string The id of the load balancer to retrieve
callback requestCallback <optional>
callback that handles the response
Source:

list(page or queryObjectopt, perPageopt, callbackopt)

List load balancer objects.
Parameters:
Name Type Attributes Description
page or queryObject number | object <optional>
page number to retrieve or key value pairs of query parameters
perPage number <optional>
number of result per page to retrieve
callback listRequestCallback <optional>
callback that handles the response
Source:

remove(loadBalancerId, parametersOrIds, callbackopt)

Remove the specified IDs from the load balancer.
Parameters:
Name Type Attributes Description
loadBalancerId string The name of the load balancer for which to remove a resource
parametersOrIds array | object Array of ids of objects to add to the load balancer. Otherwise, an object with required key of `droplet_ids`. See the official docs for valid attributes.
callback requestCallback <optional>
callback that handles the response
Source:

update(id, attributes, callbackopt)

Update a load balancer object.
Parameters:
Name Type Attributes Description
id string The id of the load balancer to retrieve
attributes object The attributes with which to update the load balancer. See the official docs for valid attributes.
callback requestCallback <optional>
callback that handles the response
Source: