Package org.azd.distributedtask.agents
Class AgentsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.distributedtask.agents.AgentsRequestBuilder
Builder class that constructs requests for Distributed tasks agents Api.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents the query parameters.static classRepresents the query parameters.static classRequest configuration object for the query parameters.static classRequest configuration object for the query parameters.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter -
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer -
Constructor Summary
ConstructorsConstructorDescriptionAgentsRequestBuilder(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptiondelete(int poolId, int agentId) Delete an agent.deleteAsync(int poolId, int agentId) Delete an agent.get(int poolId, int agentId) Get information about an agent.get(int poolId, int agentId, Consumer<AgentsRequestBuilder.RequestConfiguration> requestConfiguration) Get information about an agent.getAsync(int poolId, int agentId) Get information about an agent.getAsync(int poolId, int agentId, Consumer<AgentsRequestBuilder.RequestConfiguration> requestConfiguration) Get information about an agent.getPermission(int poolId, int agentId, boolean isCheckPermissions) Get Permissions on Pool.getPermissionAsync(int poolId, int agentId, boolean isCheckPermissions) Get Permissions on Pool.list(int poolId) Get a list of agents.list(int poolId, Consumer<AgentsRequestBuilder.ListRequestConfiguration> requestConfiguration) Get a list of agents.listAsync(int poolId) Get a list of agents.listAsync(int poolId, Consumer<AgentsRequestBuilder.ListRequestConfiguration> requestConfiguration) Get a list of agents.Update agent details.updateAsync(int poolId, int agentId, TaskAgent taskAgent) Update agent details.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
AgentsRequestBuilder
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
Delete an agent.- Parameters:
poolId- The pool ID to remove the agent fromagentId- The agent ID to remove- Throws:
AzDException- Default Api Exception handler.
-
getAsync
Get information about an agent.- Parameters:
poolId- The agent pool containing the agentagentId- 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
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 agentsrequestConfiguration- 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 useagentId- The agent to updatetaskAgent- Task agent object.- Returns:
- A TaskAgent object
TaskAgent - Throws:
AzDException- Default Api Exception handler.- See Also:
-
delete
Delete an agent.- Parameters:
poolId- The pool ID to remove the agent fromagentId- The agent ID to remove- Throws:
AzDException- Default Api Exception handler.
-
get
Get information about an agent.- Parameters:
poolId- The agent pool containing the agentagentId- 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
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 agentsrequestConfiguration- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- TaskAgents object
TaskAgents - Throws:
AzDException- Default Api Exception handler.
-
update
Update agent details.- Parameters:
poolId- The agent pool to useagentId- The agent to updatetaskAgent- Task agent object.- Returns:
- A TaskAgent object
TaskAgent - Throws:
AzDException- Default Api Exception handler.- See Also:
-