Class EnvironmentsRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.distributedtask.environments.EnvironmentsRequestBuilder
Grant ability to manage distributed task environments Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the query parameters.static class
Request 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
ConstructorDescriptionEnvironmentsRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptionCreate an environment.Create an environment.delete
(int environmentId) Delete the specified environment.deleteAsync
(int environmentId) Delete the specified environment.get
(int environmentId) Get an environment by its ID.get
(int environmentId, EnvironmentExpands expands) Get an environment by its ID.getAsync
(int environmentId) Get an environment by its ID.getAsync
(int environmentId, EnvironmentExpands expands) Get an environment by its ID.list()
Get all environments.list
(Consumer<EnvironmentsRequestBuilder.RequestConfiguration> requestConfiguration) Get all environments.Get all environments.listAsync
(Consumer<EnvironmentsRequestBuilder.RequestConfiguration> requestConfiguration) Get all environments.Update the specified environment.updateAsync
(int environmentId, String name, String description) Update the specified environment.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
EnvironmentsRequestBuilder
public EnvironmentsRequestBuilder(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
-
addAsync
public CompletableFuture<EnvironmentInstance> addAsync(String name, String description) throws AzDException Create an environment.- Parameters:
name
- Name of the environment.description
- Description of the environment.- Returns:
- Environment instance
EnvironmentInstance
- Throws:
AzDException
- Default Api Exception handler.
-
deleteAsync
Delete the specified environment.- Parameters:
environmentId
- ID of the environment.- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
Get an environment by its ID.- Parameters:
environmentId
- ID of the environment.- Returns:
- Environment instance
EnvironmentInstance
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<EnvironmentInstance> getAsync(int environmentId, EnvironmentExpands expands) throws AzDException Get an environment by its ID.- Parameters:
environmentId
- ID of the environment.expands
- Include these additional details in the returned objects.EnvironmentExpands
- Returns:
- Environment instance
EnvironmentInstance
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
Get all environments.- Returns:
- Environment instances array
EnvironmentInstances
- Throws:
AzDException
- Default Api Exception handler.
-
listAsync
public CompletableFuture<EnvironmentInstances> listAsync(Consumer<EnvironmentsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get all environments.- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Environment instances array
EnvironmentInstances
- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<EnvironmentInstance> updateAsync(int environmentId, String name, String description) throws AzDException Update the specified environment.- Parameters:
environmentId
- ID of the environment.name
- Name of the environment.description
- Description of the environment.- Returns:
- Environment instance
EnvironmentInstance
- Throws:
AzDException
- Default Api Exception handler.
-
add
Create an environment.- Parameters:
name
- Name of the environment.description
- Description of the environment.- Returns:
- Environment instance
EnvironmentInstance
- Throws:
AzDException
- Default Api Exception handler.
-
delete
Delete the specified environment.- Parameters:
environmentId
- ID of the environment.- Throws:
AzDException
- Default Api Exception handler.
-
get
Get an environment by its ID.- Parameters:
environmentId
- ID of the environment.- Returns:
- Environment instance
EnvironmentInstance
- Throws:
AzDException
- Default Api Exception handler.
-
get
Get an environment by its ID.- Parameters:
environmentId
- ID of the environment.expands
- Include these additional details in the returned objects.EnvironmentExpands
- Returns:
- Environment instance
EnvironmentInstance
- Throws:
AzDException
- Default Api Exception handler.
-
list
Get all environments.- Returns:
- Environment instances array
EnvironmentInstances
- Throws:
AzDException
- Default Api Exception handler.
-
list
public EnvironmentInstances list(Consumer<EnvironmentsRequestBuilder.RequestConfiguration> requestConfiguration) throws AzDException Get all environments.- Parameters:
requestConfiguration
- Consumer of request configuration. This represents the query parameter for the request.- Returns:
- Environment instances array
EnvironmentInstances
- Throws:
AzDException
- Default Api Exception handler.
-
update
public EnvironmentInstance update(int environmentId, String name, String description) throws AzDException Update the specified environment.- Parameters:
environmentId
- ID of the environment.name
- Name of the environment.description
- Description of the environment.- Returns:
- Environment instance
EnvironmentInstance
- Throws:
AzDException
- Default Api Exception handler.
-