Interface GridLoadBalancerApi


  • public interface GridLoadBalancerApi
    • 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 balancer
        virtualIp - virtual IP with IP address set in Ip.ip and port set in IpPortPair.port
        realIps - real IPs to bind the virtual IP to, with IP address set in Ip.ip and port set in IpPortPair.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 balancer
        realIps - real IPs to bind the virtual IP to, with IP address set in Ip.ip and port set in IpPortPair.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 balancer
        realIps - real IPs to bind the virtual IP to, with IP address set in Ip.ip and port set in IpPortPair.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