Package org.jclouds.cloudstack.features
Interface LoadBalancerApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
assignVirtualMachinesToLoadBalancerRule(String id, Iterable<String> virtualMachineIds)
Assigns virtual machine or a list of virtual machines to a load balancer rule.String
assignVirtualMachinesToLoadBalancerRule(String id, String... virtualMachineIds)
Assigns virtual machine or a list of virtual machines to a load balancer rule.String
createLoadBalancerRuleForPublicIP(String publicIPId, LoadBalancerRule.Algorithm algorithm, String name, int privatePort, int publicPort, CreateLoadBalancerRuleOptions... options)
Creates a load balancer rule.String
deleteLoadBalancerRule(String id)
deletes a loadbalancer ruleLoadBalancerRule
getLoadBalancerRule(String id)
get a specific LoadBalancerRule by idSet<LoadBalancerRule>
listLoadBalancerRules(ListLoadBalancerRulesOptions... options)
List the load balancer rulesSet<VirtualMachine>
listVirtualMachinesAssignedToLoadBalancerRule(String id)
List all virtual machine instances that are assigned to a load balancer rule.String
removeVirtualMachinesFromLoadBalancerRule(String id, Iterable<String> virtualMachineIds)
Removes a virtual machine or a list of virtual machines from a load balancer rule.String
removeVirtualMachinesFromLoadBalancerRule(String id, String... virtualMachineIds)
Removes a virtual machine or a list of virtual machines from a load balancer rule.LoadBalancerRule
updateLoadBalancerRule(String id, UpdateLoadBalancerRuleOptions... options)
Update a load balancer rule.
-
-
-
Method Detail
-
listLoadBalancerRules
@Named("listLoadBalancerRules") @GET @Consumes("application/json") 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
@Named("listLoadBalancerRules") @GET @Consumes("application/json") LoadBalancerRule getLoadBalancerRule(@QueryParam("id") String id)
get a specific LoadBalancerRule by id- Parameters:
id
- LoadBalancerRule to get- Returns:
- LoadBalancerRule or null if not found
-
createLoadBalancerRuleForPublicIP
@Named("createLoadBalancerRule") @GET @Consumes("application/json") String createLoadBalancerRuleForPublicIP(@QueryParam("publicipid") String publicIPId, @QueryParam("algorithm") LoadBalancerRule.Algorithm algorithm, @QueryParam("name") String name, @QueryParam("privateport") int privatePort, @QueryParam("publicport") int publicPort, CreateLoadBalancerRuleOptions... options)
Creates a load balancer rule.- Parameters:
publicIPId
- the public port from where the network traffic will be load balanced fromalgorithm
- load balancer algorithm (source, roundrobin, leastconn)name
- name of the load balancer ruleprivatePort
- the private port of the private ip address/virtual machine where the network traffic will be load balanced topublicPort
- public ip address id from where the network traffic will be load balanced fromoptions
- optional call arguments- Returns:
- newly created rule
-
updateLoadBalancerRule
@Named("updateLoadBalancerRule") @GET @Consumes("application/json") LoadBalancerRule updateLoadBalancerRule(@QueryParam("id") String id, UpdateLoadBalancerRuleOptions... options)
Update a load balancer rule.- Parameters:
id
- rule idoptions
- optional arguments- Returns:
- updated rule
-
deleteLoadBalancerRule
@Named("deleteLoadBalancerRule") @GET @Consumes("application/json") String deleteLoadBalancerRule(@QueryParam("id") String 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.
-
assignVirtualMachinesToLoadBalancerRule
@Named("assignToLoadBalancerRule") @GET @Consumes("application/json") String assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") String id, @QueryParam("virtualmachineids") Iterable<String> virtualMachineIds)
Assigns virtual machine or a list of virtual machines to a load balancer rule.- Parameters:
id
- the ID of the load balancer rulevirtualMachineIds
- 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
@Named("assignToLoadBalancerRule") @GET @Consumes("application/json") String assignVirtualMachinesToLoadBalancerRule(@QueryParam("id") String id, @QueryParam("virtualmachineids") String... virtualMachineIds)
Assigns virtual machine or a list of virtual machines to a load balancer rule.- Parameters:
id
- the ID of the load balancer rulevirtualMachineIds
- 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
@Named("removeFromLoadBalancerRule") @GET @Consumes("application/json") String removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") String id, @QueryParam("virtualmachineids") Iterable<String> virtualMachineIds)
Removes a virtual machine or a list of virtual machines from a load balancer rule.- Parameters:
id
- the ID of the load balancer rulevirtualMachineIds
- 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
@Named("removeFromLoadBalancerRule") @GET @Consumes("application/json") String removeVirtualMachinesFromLoadBalancerRule(@QueryParam("id") String id, @QueryParam("virtualmachineids") String... virtualMachineIds)
Removes a virtual machine or a list of virtual machines from a load balancer rule.- Parameters:
id
- the ID of the load balancer rulevirtualMachineIds
- the list of IDs of the virtual machine that are being removed from the load balancer rule- Returns:
- job id related to the operation
-
listVirtualMachinesAssignedToLoadBalancerRule
@Named("listLoadBalancerRuleInstances") @GET @Consumes("application/json") Set<VirtualMachine> listVirtualMachinesAssignedToLoadBalancerRule(@QueryParam("id") String 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
-
-