Interface TargetPoolApi


  • @Path("/targetPools")
    @Consumes("application/json")
    public interface TargetPoolApi
    • Method Detail

      • get

        @Named("TargetPools:get")
        @GET
        @Path("/{targetPool}")
        @Nullable
        TargetPool get​(@PathParam("targetPool")
                       String targetPool)
        Returns a target pool by name or null if not found.
      • create

        @Named("TargetPools:insert")
        @POST
        @Produces("application/json")
        Operation create​(TargetPoolCreationOptions options)
        Creates a TargetPool resource in the specified project and region using the data included in the request.
        Parameters:
        name - the name of the targetPool.
        options - options of the TargetPool to create.
        Returns:
        an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
      • delete

        @Named("TargetPools:delete")
        @DELETE
        @Path("/{targetPool}")
        @Nullable
        Operation delete​(@PathParam("targetPool")
                         String targetPool)
        Deletes a target pool by name and returns the operation in progress, or null if not found.
      • addInstance

        @Named("TargetPools:addInstance")
        @POST
        @Path("/{targetPool}/addInstance")
        Operation addInstance​(@PathParam("targetPool")
                              String targetPool,
                              List<URI> instances)
        Adds instance to the targetPool.
        Parameters:
        targetPool - the name of the target pool.
        instances - the self-links of the instances to be added to targetPool.
        Returns:
        an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
      • removeInstance

        @Named("TargetPools:removeInstance")
        @POST
        @Path("/{targetPool}/removeInstance")
        Operation removeInstance​(@PathParam("targetPool")
                                 String targetPool,
                                 List<URI> instances)
        Removes instance URL from targetPool.
        Parameters:
        targetPool - the name of the target pool.
        instances - the self-links of the instances to be removed from the targetPool.
        Returns:
        an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
      • addHealthCheck

        @Named("TargetPools:addHealthCheck")
        @POST
        @Path("/{targetPool}/addHealthCheck")
        Operation addHealthCheck​(@PathParam("targetPool")
                                 String targetPool,
                                 List<URI> healthChecks)
        Adds health check URL to targetPool.
        Parameters:
        targetPool - the name of the target pool.
        healthChecks - the self-links of the health checks to be added to targetPool.
        Returns:
        an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
      • removeHealthCheck

        @Named("TargetPools:removeHealthCheck")
        @POST
        @Path("/{targetPool}/removeHealthCheck")
        Operation removeHealthCheck​(@PathParam("targetPool")
                                    String targetPool,
                                    List<URI> healthChecks)
        Removes health check URL from targetPool.
        Parameters:
        targetPool - the name of the target pool.
        healthChecks - the self-links of the health checks to be removed from the targetPool.
        Returns:
        an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
      • getHealth

        @Named("TargetPools:getHealth")
        @POST
        @Path("/{targetPool}/getHealth")
        HealthStatus getHealth​(@PathParam("targetPool")
                               String targetPool,
                               URI instance)
        Gets the HealthStatus of an instance in a targetPool.
        Parameters:
        targetPool - the name of the target pool.
        healthChecks - the self-links of the health checks to be removed from the targetPool.
        Returns:
        an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
      • setBackup

        @Named("TargetPools:setBackup")
        @POST
        @Path("/{targetPool}/setBackup")
        @Nullable
        Operation setBackup​(@PathParam("targetPool")
                            String targetPool,
                            URI target)
        Changes backup pool configurations.
        Parameters:
        targetPool - the name of the target pool.
        target - the URL of target pool for which you want to use as backup. WARNING: failoverRatio and BackupPool must either both be set or not set. This method is only for updating the backup pool on a Target Pool that already has a failoverRatio.
        Returns:
        an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
      • setBackup

        @Named("TargetPools:setBackup")
        @POST
        @Path("/{targetPool}/setBackup")
        @Nullable
        Operation setBackup​(@PathParam("targetPool")
                            String targetPool,
                            @QueryParam("failoverRatio")
                            Float failoverRatio,
                            URI target)
        Changes backup pool configurations.
        Parameters:
        targetPool - the name of the target pool.
        target - the URL of target pool for which you want to use as backup.
        Returns:
        an Operation resource. To check on the status of an operation, poll the Operations resource returned to you, and look for the status field.
      • listPage

        @Named("TargetPools:list")
        @GET
        ListPage<TargetPool> listPage​(@Nullable @QueryParam("pageToken")
                                      String pageToken,
                                      ListOptions listOptions)
        Retrieves the list of target pool resources available to the specified project. By default the list as a maximum size of 100, if no options are provided or ListOptions#getMaxResults() has not been set.
        Parameters:
        pageToken - marks the beginning of the next list page
        listOptions - listing options
        Returns:
        a page of the list