org.jclouds.cloudstack.features
Interface LoadBalancerClient


public interface LoadBalancerClient

Provides synchronous access to CloudStack LoadBalancer features.

Author:
Adrian Cole
See Also:
LoadBalancerAsyncClient,

Method Summary
 long assignVirtualMachinesToLoadBalancerRule(long id, Iterable<Long> virtualMachineIds)
          Assigns virtual machine or a list of virtual machines to a load balancer rule.
 long assignVirtualMachinesToLoadBalancerRule(long id, long... virtualMachineIds)
          Assigns virtual machine or a list of virtual machines to a load balancer rule.
 Long createLoadBalancerRuleForPublicIP(long publicIPId, LoadBalancerRule.Algorithm algorithm, String name, int privatePort, int publicPort, CreateLoadBalancerRuleOptions... options)
          Creates a load balancer rule.
 Long deleteLoadBalancerRule(long id)
          deletes a loadbalancer rule
 LoadBalancerRule getLoadBalancerRule(long id)
          get a specific LoadBalancerRule by id
 Set<LoadBalancerRule> listLoadBalancerRules(ListLoadBalancerRulesOptions... options)
          List the load balancer rules
 Set<VirtualMachine> listVirtualMachinesAssignedToLoadBalancerRule(long id)
          List all virtual machine instances that are assigned to a load balancer rule.
 long removeVirtualMachinesFromLoadBalancerRule(long id, Iterable<Long> virtualMachineIds)
          Removes a virtual machine or a list of virtual machines from a load balancer rule.
 long removeVirtualMachinesFromLoadBalancerRule(long id, long... virtualMachineIds)
          Removes a virtual machine or a list of virtual machines from a load balancer rule.
 LoadBalancerRule updateLoadBalancerRule(long id, UpdateLoadBalancerRuleOptions... options)
          Update a load balancer rule.
 

Method Detail

listLoadBalancerRules

Set<LoadBalancerRule> listLoadBalancerRules(ListLoadBalancerRulesOptions... options)
List the load balancer rules

Parameters:
options - if present, how to constrain the list.
Returns:
load balancer rules matching query, or empty set, if no load balancer rules are found

getLoadBalancerRule

LoadBalancerRule getLoadBalancerRule(long id)
get a specific LoadBalancerRule by id

Parameters:
id - LoadBalancerRule to get
Returns:
LoadBalancerRule or null if not found

createLoadBalancerRuleForPublicIP

Long createLoadBalancerRuleForPublicIP(long publicIPId,
                                       LoadBalancerRule.Algorithm algorithm,
                                       String name,
                                       int privatePort,
                                       int publicPort,
                                       CreateLoadBalancerRuleOptions... options)
Creates a load balancer rule.

Parameters:
publicIPId - the public port from where the network traffic will be load balanced from
algorithm - load balancer algorithm (source, roundrobin, leastconn)
name - name of the load balancer rule
privatePort - the private port of the private ip address/virtual machine where the network traffic will be load balanced to
publicPort - public ip address id from where the network traffic will be load balanced from
options - optional call arguments
Returns:
newly created rule

updateLoadBalancerRule

LoadBalancerRule updateLoadBalancerRule(long id,
                                        UpdateLoadBalancerRuleOptions... options)
Update a load balancer rule.

Parameters:
id - rule id
options - optional arguments
Returns:
updated rule

deleteLoadBalancerRule

Long deleteLoadBalancerRule(long id)
deletes a loadbalancer rule

Parameters:
id - id of the rule to delete
Returns:
async job id of the job completing or null, if the load balancer rule was not found.

listVirtualMachinesAssignedToLoadBalancerRule

Set<VirtualMachine> listVirtualMachinesAssignedToLoadBalancerRule(long id)
List all virtual machine instances that are assigned to a load balancer rule.

Parameters:
id - id of the rule
Returns:
VirtualMachines matching query, or empty set, if no VirtualMachines are assigned

assignVirtualMachinesToLoadBalancerRule

long assignVirtualMachinesToLoadBalancerRule(long id,
                                             Iterable<Long> virtualMachineIds)
Assigns virtual machine or a list of virtual machines to a load balancer rule.

Parameters:
id - the ID of the load balancer rule
virtualMachineIds - the list of IDs of the virtual machine that are being assigned to the load balancer rule
Returns:
job id related to the operation

assignVirtualMachinesToLoadBalancerRule

long assignVirtualMachinesToLoadBalancerRule(long id,
                                             long... virtualMachineIds)
Assigns virtual machine or a list of virtual machines to a load balancer rule.

Parameters:
id - the ID of the load balancer rule
virtualMachineIds - the list of IDs of the virtual machine that are being assigned to the load balancer rule
Returns:
job id related to the operation

removeVirtualMachinesFromLoadBalancerRule

long removeVirtualMachinesFromLoadBalancerRule(long id,
                                               Iterable<Long> virtualMachineIds)
Removes a virtual machine or a list of virtual machines from a load balancer rule.

Parameters:
id - the ID of the load balancer rule
virtualMachineIds - the list of IDs of the virtual machine that are being removed from the load balancer rule
Returns:
job id related to the operation

removeVirtualMachinesFromLoadBalancerRule

long removeVirtualMachinesFromLoadBalancerRule(long id,
                                               long... virtualMachineIds)
Removes a virtual machine or a list of virtual machines from a load balancer rule.

Parameters:
id - the ID of the load balancer rule
virtualMachineIds - the list of IDs of the virtual machine that are being removed from the load balancer rule
Returns:
job id related to the operation


Copyright © 2009-2012 jclouds. All Rights Reserved.