org.jclouds.cloudloadbalancers.features
Interface LoadBalancerClient


public interface LoadBalancerClient

Provides synchronous access to CloudLoadBalancers LoadBalancer features.

Author:
Adrian Cole
See Also:
LoadBalancerAsyncClient,

Method Summary
 LoadBalancer createLoadBalancer(LoadBalancerRequest lb)
          Create a new load balancer with the configuration defined by the request.
 LoadBalancer getLoadBalancer(int id)
           
 Set<LoadBalancer> listLoadBalancers()
           
 void removeLoadBalancer(int id)
          Remove a load balancer from the account.
 void updateLoadBalancerAttributes(int id, LoadBalancerAttributes attrs)
          Update the properties of a load balancer.
 

Method Detail

createLoadBalancer

LoadBalancer createLoadBalancer(LoadBalancerRequest lb)
Create a new load balancer with the configuration defined by the request.

This operation asynchronously provisions a new load balancer based on the configuration defined in the request object. Once the request is validated and progress has started on the provisioning process, a response object will be returned.

Parameters:
lb - configuration to create
Returns:
The object will contain a unique identifier and status of the request. Using the identifier, the caller can check on the progress of the operation by performing a getLoadBalancer(int).
Throws:
HttpResponseException - If the corresponding request cannot be fulfilled due to insufficient or invalid data

updateLoadBalancerAttributes

void updateLoadBalancerAttributes(int id,
                                  LoadBalancerAttributes attrs)
Update the properties of a load balancer.

This operation asynchronously updates the attributes of the specified load balancer. Upon successful validation of the request, the service will return a 202 (Accepted) response code. A caller can poll the load balancer with its ID to wait for the changes to be applied and the load balancer to return to an ACTIVE status.

Parameters:
id - id of the loadbalancer to change
attrs - what to change
See Also:
LoadBalancerAttributes.fromLoadBalancer(T)

listLoadBalancers

Set<LoadBalancer> listLoadBalancers()
Returns:
all load balancers configured for the account, or empty set if none available

getLoadBalancer

LoadBalancer getLoadBalancer(int id)
Parameters:
id - id of the loadbalancer to retrieve
Returns:
details of the specified load balancer, or null if not found

removeLoadBalancer

void removeLoadBalancer(int id)
Remove a load balancer from the account.

The remove load balancer function removes the specified load balancer and its associated configuration from the account. Any and all configuration data is immediately purged and is not recoverable.

Parameters:
id - to remove


Copyright © 2009-2011 jclouds. All Rights Reserved.