Class AgentsRequestBuilder

java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.distributedtask.agents.AgentsRequestBuilder

public class AgentsRequestBuilder extends BaseRequestBuilder
Builder class that constructs requests for Distributed tasks agents Api.
  • Constructor Details

    • AgentsRequestBuilder

      public AgentsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential)
      Instantiates a new RequestBuilder instance and sets the default values.
      Parameters:
      organizationUrl - Represents organization location request url.
      accessTokenCredential - Access token credential object.
  • Method Details

    • deleteAsync

      public CompletableFuture<Void> deleteAsync(int poolId, int agentId) throws AzDException
      Delete an agent.
      Parameters:
      poolId - The pool ID to remove the agent from
      agentId - The agent ID to remove
      Throws:
      AzDException - Default Api Exception handler.
    • getAsync

      public CompletableFuture<TaskAgent> getAsync(int poolId, int agentId) throws AzDException
      Get information about an agent.
      Parameters:
      poolId - The agent pool containing the agent
      agentId - The agent ID to get information about
      Returns:
      A TaskAgent object TaskAgent
      Throws:
      AzDException - Default Api Exception handler.
    • getAsync

      public CompletableFuture<TaskAgent> getAsync(int poolId, int agentId, Consumer<AgentsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException
      Get information about an agent.
      Parameters:
      poolId - The agent pool containing the agent.
      agentId - The agent ID to get information about.
      requestConfiguration - Consumer of request configuration. This represents the query parameter for the request.
      Returns:
      A TaskAgent object TaskAgent.
      Throws:
      AzDException - Default Api Exception handler.
    • getPermissionAsync

      public CompletableFuture<Boolean> getPermissionAsync(int poolId, int agentId, boolean isCheckPermissions) throws AzDException
      Get Permissions on Pool.
      Parameters:
      poolId - The agent pool containing the agent.
      agentId - The agent ID to get information about.
      isCheckPermissions - Set to true to check permission.
      Returns:
      Returns a boolean.
      Throws:
      AzDException - Default Api Exception handler.
    • listAsync

      public CompletableFuture<TaskAgents> listAsync(int poolId) throws AzDException
      Get a list of agents.
      Parameters:
      poolId - The agent pool containing the agents
      Returns:
      TaskAgents object TaskAgents
      Throws:
      AzDException - Default Api Exception handler.
    • listAsync

      public CompletableFuture<TaskAgents> listAsync(int poolId, Consumer<AgentsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException
      Get a list of agents.
      Parameters:
      poolId - The agent pool containing the agents
      requestConfiguration - Consumer of request configuration. This represents the query parameter for the request.
      Returns:
      TaskAgents object TaskAgents
      Throws:
      AzDException - Default Api Exception handler.
    • updateAsync

      public CompletableFuture<TaskAgent> updateAsync(int poolId, int agentId, TaskAgent taskAgent) throws AzDException
      Update agent details.
      Parameters:
      poolId - The agent pool to use
      agentId - The agent to update
      taskAgent - Task agent object.
      Returns:
      A TaskAgent object TaskAgent
      Throws:
      AzDException - Default Api Exception handler.
      See Also:
    • delete

      public Void delete(int poolId, int agentId) throws AzDException
      Delete an agent.
      Parameters:
      poolId - The pool ID to remove the agent from
      agentId - The agent ID to remove
      Throws:
      AzDException - Default Api Exception handler.
    • get

      public TaskAgent get(int poolId, int agentId) throws AzDException
      Get information about an agent.
      Parameters:
      poolId - The agent pool containing the agent
      agentId - The agent ID to get information about
      Returns:
      A TaskAgent object TaskAgent
      Throws:
      AzDException - Default Api Exception handler.
    • get

      public TaskAgent get(int poolId, int agentId, Consumer<AgentsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException
      Get information about an agent.
      Parameters:
      poolId - The agent pool containing the agent.
      agentId - The agent ID to get information about.
      requestConfiguration - Consumer of request configuration. This represents the query parameter for the request.
      Returns:
      A TaskAgent object TaskAgent.
      Throws:
      AzDException - Default Api Exception handler.
    • getPermission

      public Boolean getPermission(int poolId, int agentId, boolean isCheckPermissions) throws AzDException
      Get Permissions on Pool.
      Parameters:
      poolId - The agent pool containing the agent.
      agentId - The agent ID to get information about.
      isCheckPermissions - Set to true to check permission.
      Returns:
      Returns a boolean.
      Throws:
      AzDException - Default Api Exception handler.
    • list

      public TaskAgents list(int poolId) throws AzDException
      Get a list of agents.
      Parameters:
      poolId - The agent pool containing the agents
      Returns:
      TaskAgents object TaskAgents
      Throws:
      AzDException - Default Api Exception handler.
    • list

      public TaskAgents list(int poolId, Consumer<AgentsRequestBuilder.ListRequestConfiguration> requestConfiguration) throws AzDException
      Get a list of agents.
      Parameters:
      poolId - The agent pool containing the agents
      requestConfiguration - Consumer of request configuration. This represents the query parameter for the request.
      Returns:
      TaskAgents object TaskAgents
      Throws:
      AzDException - Default Api Exception handler.
    • update

      public TaskAgent update(int poolId, int agentId, TaskAgent taskAgent) throws AzDException
      Update agent details.
      Parameters:
      poolId - The agent pool to use
      agentId - The agent to update
      taskAgent - Task agent object.
      Returns:
      A TaskAgent object TaskAgent
      Throws:
      AzDException - Default Api Exception handler.
      See Also: