Package org.jclouds.gogrid.features
Interface GridLoadBalancerApi
-
public interface GridLoadBalancerApi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description LoadBalancer
addLoadBalancer(String name, IpPortPair virtualIp, List<IpPortPair> realIps, AddLoadBalancerOptions... options)
Creates a load balancer with given properties.LoadBalancer
deleteById(Long id)
Deletes the load balancer by IdLoadBalancer
deleteByName(String name)
Deletes the load balancer by name; NOTE: Using this parameter may generate an error if one or more load balancers share a non-unique name.LoadBalancer
editLoadBalancer(long id, List<IpPortPair> realIps)
Edits the existing load balancer to change the real IP mapping.LoadBalancer
editLoadBalancerNamed(String name, List<IpPortPair> realIps)
Edits the existing load balancer to change the real IP mapping.Set<Option>
getDatacenters()
Retrieves the list of supported Datacenters to launch servers into.Set<LoadBalancer>
getLoadBalancerList()
Returns all load balancers found for the current user.Set<LoadBalancer>
getLoadBalancersById(Long... ids)
Returns the load balancer(s) by unique id(s).Set<LoadBalancer>
getLoadBalancersByName(String... names)
Returns the load balancer(s) by unique name(s).
-
-
-
Method Detail
-
getLoadBalancerList
@GET @Path("/grid/loadbalancer/list") Set<LoadBalancer> getLoadBalancerList()
Returns all load balancers found for the current user.- Returns:
- load balancers found
-
getLoadBalancersByName
@GET @Path("/grid/loadbalancer/get") Set<LoadBalancer> getLoadBalancersByName(String... names)
Returns the load balancer(s) by unique name(s). Given a name or a set of names, finds one or multiple load balancers.- Parameters:
names
- to get the load balancers- Returns:
- load balancer(s) matching the name(s)
-
getLoadBalancersById
@GET @Path("/grid/loadbalancer/get") Set<LoadBalancer> getLoadBalancersById(Long... ids)
Returns the load balancer(s) by unique id(s). Given an id or a set of ids, finds one or multiple load balancers.- Parameters:
ids
- to get the load balancers- Returns:
- load balancer(s) matching the ids
-
addLoadBalancer
@GET @Path("/grid/loadbalancer/add") LoadBalancer addLoadBalancer(@QueryParam("name") String name, IpPortPair virtualIp, List<IpPortPair> realIps, AddLoadBalancerOptions... options)
Creates a load balancer with given properties.- Parameters:
name
- name of the load balancervirtualIp
- virtual IP with IP address set inIp.ip
and port set inIpPortPair.port
realIps
- real IPs to bind the virtual IP to, with IP address set inIp.ip
and port set inIpPortPair.port
options
- options that specify load balancer's type (round robin, least load), persistence strategy, or description.- Returns:
- created load balancer object
-
editLoadBalancerNamed
@GET @Path("/grid/loadbalancer/edit") LoadBalancer editLoadBalancerNamed(@QueryParam("name") String name, List<IpPortPair> realIps)
Edits the existing load balancer to change the real IP mapping.- Parameters:
name
- id of the existing load balancerrealIps
- real IPs to bind the virtual IP to, with IP address set inIp.ip
and port set inIpPortPair.port
- Returns:
- edited object
-
editLoadBalancer
@GET @Path("/grid/loadbalancer/edit") LoadBalancer editLoadBalancer(@QueryParam("id") long id, List<IpPortPair> realIps)
Edits the existing load balancer to change the real IP mapping.- Parameters:
id
- name of the existing load balancerrealIps
- real IPs to bind the virtual IP to, with IP address set inIp.ip
and port set inIpPortPair.port
- Returns:
- edited object
-
deleteById
@GET @Path("/grid/loadbalancer/delete") LoadBalancer deleteById(@QueryParam("id") Long id)
Deletes the load balancer by Id- Parameters:
id
- id of the load balancer to delete- Returns:
- load balancer before the command is executed
-
deleteByName
@GET @Path("/grid/loadbalancer/delete") LoadBalancer deleteByName(@QueryParam("name") String name)
Deletes the load balancer by name; NOTE: Using this parameter may generate an error if one or more load balancers share a non-unique name.- Parameters:
name
- name of the load balancer to be deleted- Returns:
- load balancer before the command is executed
-
getDatacenters
@GET @Path("/common/lookup/list") Set<Option> getDatacenters()
Retrieves the list of supported Datacenters to launch servers into. The objects will have datacenter ID, name and description. In most cases, id or name will be used foraddLoadBalancer(java.lang.String, org.jclouds.gogrid.domain.IpPortPair, java.util.List<org.jclouds.gogrid.domain.IpPortPair>, org.jclouds.gogrid.options.AddLoadBalancerOptions...)
.- Returns:
- supported datacenters
-
-