Interface MwaaAsyncClient
- All Superinterfaces:
AutoCloseable,AwsClient,SdkAutoCloseable,SdkClient
builder()
method.The asynchronous client performs non-blocking I/O when configured with any SdkAsyncHttpClient
supported in the SDK. However, full non-blocking is not guaranteed as the async client may perform blocking calls in
some cases such as credentials retrieval and endpoint discovery as part of the async API call.
This section contains the Amazon Managed Workflows for Apache Airflow (MWAA) API reference documentation. For more information, see What is Amazon MWAA?.
Endpoints
-
api.airflow.{region}.amazonaws.com- This endpoint is used for environment management. -
env.airflow.{region}.amazonaws.com- This endpoint is used to operate the Airflow environment.
Regions
For a list of supported regions, see Amazon MWAA endpoints and quotas in the Amazon Web Services General Reference.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic MwaaAsyncClientBuilderbuilder()Create a builder that can be used to configure and create aMwaaAsyncClient.static MwaaAsyncClientcreate()Create aMwaaAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CompletableFuture<CreateCliTokenResponse> createCliToken(Consumer<CreateCliTokenRequest.Builder> createCliTokenRequest) Creates a CLI token for the Airflow CLI.default CompletableFuture<CreateCliTokenResponse> createCliToken(CreateCliTokenRequest createCliTokenRequest) Creates a CLI token for the Airflow CLI.createEnvironment(Consumer<CreateEnvironmentRequest.Builder> createEnvironmentRequest) Creates an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.createEnvironment(CreateEnvironmentRequest createEnvironmentRequest) Creates an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.createWebLoginToken(Consumer<CreateWebLoginTokenRequest.Builder> createWebLoginTokenRequest) Creates a web login token for the Airflow Web UI.createWebLoginToken(CreateWebLoginTokenRequest createWebLoginTokenRequest) Creates a web login token for the Airflow Web UI.deleteEnvironment(Consumer<DeleteEnvironmentRequest.Builder> deleteEnvironmentRequest) Deletes an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.deleteEnvironment(DeleteEnvironmentRequest deleteEnvironmentRequest) Deletes an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.default CompletableFuture<GetEnvironmentResponse> getEnvironment(Consumer<GetEnvironmentRequest.Builder> getEnvironmentRequest) Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CompletableFuture<GetEnvironmentResponse> getEnvironment(GetEnvironmentRequest getEnvironmentRequest) Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CompletableFuture<InvokeRestApiResponse> invokeRestApi(Consumer<InvokeRestApiRequest.Builder> invokeRestApiRequest) Invokes the Apache Airflow REST API on the webserver with the specified inputs.default CompletableFuture<InvokeRestApiResponse> invokeRestApi(InvokeRestApiRequest invokeRestApiRequest) Invokes the Apache Airflow REST API on the webserver with the specified inputs.listEnvironments(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.listEnvironments(ListEnvironmentsRequest listEnvironmentsRequest) Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.default ListEnvironmentsPublisherlistEnvironmentsPaginator(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) This is a variant oflistEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)operation.default ListEnvironmentsPublisherlistEnvironmentsPaginator(ListEnvironmentsRequest listEnvironmentsRequest) This is a variant oflistEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)operation.listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment.listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CompletableFuture<PublishMetricsResponse> publishMetrics(Consumer<PublishMetricsRequest.Builder> publishMetricsRequest) Deprecated.This API is for internal use and not meant for public use, and is no longer available.default CompletableFuture<PublishMetricsResponse> publishMetrics(PublishMetricsRequest publishMetricsRequest) Deprecated.This API is for internal use and not meant for public use, and is no longer available.default MwaaServiceClientConfigurationThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationdefault CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CompletableFuture<TagResourceResponse> tagResource(TagResourceRequest tagResourceRequest) Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.updateEnvironment(Consumer<UpdateEnvironmentRequest.Builder> updateEnvironmentRequest) Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.updateEnvironment(UpdateEnvironmentRequest updateEnvironmentRequest) Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
closeMethods inherited from interface software.amazon.awssdk.core.SdkClient
serviceName
-
Field Details
-
SERVICE_NAME
- See Also:
-
SERVICE_METADATA_ID
Value for looking up the service's metadata from theServiceMetadataProvider.- See Also:
-
-
Method Details
-
createCliToken
default CompletableFuture<CreateCliTokenResponse> createCliToken(CreateCliTokenRequest createCliTokenRequest) Creates a CLI token for the Airflow CLI. To learn more, see Creating an Apache Airflow CLI token.
- Parameters:
createCliTokenRequest-- Returns:
- A Java Future containing the result of the CreateCliToken operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createCliToken
default CompletableFuture<CreateCliTokenResponse> createCliToken(Consumer<CreateCliTokenRequest.Builder> createCliTokenRequest) Creates a CLI token for the Airflow CLI. To learn more, see Creating an Apache Airflow CLI token.
This is a convenience which creates an instance of the
CreateCliTokenRequest.Builderavoiding the need to create one manually viaCreateCliTokenRequest.builder()- Parameters:
createCliTokenRequest- AConsumerthat will call methods onCreateCliTokenRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateCliToken operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createEnvironment
default CompletableFuture<CreateEnvironmentResponse> createEnvironment(CreateEnvironmentRequest createEnvironmentRequest) Creates an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.
- Parameters:
createEnvironmentRequest- This section contains the Amazon Managed Workflows for Apache Airflow (Amazon MWAA) API reference documentation to create an environment. For more information, see Get started with Amazon Managed Workflows for Apache Airflow.- Returns:
- A Java Future containing the result of the CreateEnvironment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createEnvironment
default CompletableFuture<CreateEnvironmentResponse> createEnvironment(Consumer<CreateEnvironmentRequest.Builder> createEnvironmentRequest) Creates an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.
This is a convenience which creates an instance of the
CreateEnvironmentRequest.Builderavoiding the need to create one manually viaCreateEnvironmentRequest.builder()- Parameters:
createEnvironmentRequest- AConsumerthat will call methods onCreateEnvironmentRequest.Builderto create a request. This section contains the Amazon Managed Workflows for Apache Airflow (Amazon MWAA) API reference documentation to create an environment. For more information, see Get started with Amazon Managed Workflows for Apache Airflow.- Returns:
- A Java Future containing the result of the CreateEnvironment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createWebLoginToken
default CompletableFuture<CreateWebLoginTokenResponse> createWebLoginToken(CreateWebLoginTokenRequest createWebLoginTokenRequest) Creates a web login token for the Airflow Web UI. To learn more, see Creating an Apache Airflow web login token.
- Parameters:
createWebLoginTokenRequest-- Returns:
- A Java Future containing the result of the CreateWebLoginToken operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException Access to the Apache Airflow Web UI or CLI has been denied due to insufficient permissions. To learn more, see Accessing an Amazon MWAA environment.
- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
createWebLoginToken
default CompletableFuture<CreateWebLoginTokenResponse> createWebLoginToken(Consumer<CreateWebLoginTokenRequest.Builder> createWebLoginTokenRequest) Creates a web login token for the Airflow Web UI. To learn more, see Creating an Apache Airflow web login token.
This is a convenience which creates an instance of the
CreateWebLoginTokenRequest.Builderavoiding the need to create one manually viaCreateWebLoginTokenRequest.builder()- Parameters:
createWebLoginTokenRequest- AConsumerthat will call methods onCreateWebLoginTokenRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the CreateWebLoginToken operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- AccessDeniedException Access to the Apache Airflow Web UI or CLI has been denied due to insufficient permissions. To learn more, see Accessing an Amazon MWAA environment.
- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteEnvironment
default CompletableFuture<DeleteEnvironmentResponse> deleteEnvironment(DeleteEnvironmentRequest deleteEnvironmentRequest) Deletes an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.
- Parameters:
deleteEnvironmentRequest-- Returns:
- A Java Future containing the result of the DeleteEnvironment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
deleteEnvironment
default CompletableFuture<DeleteEnvironmentResponse> deleteEnvironment(Consumer<DeleteEnvironmentRequest.Builder> deleteEnvironmentRequest) Deletes an Amazon Managed Workflows for Apache Airflow (Amazon MWAA) environment.
This is a convenience which creates an instance of the
DeleteEnvironmentRequest.Builderavoiding the need to create one manually viaDeleteEnvironmentRequest.builder()- Parameters:
deleteEnvironmentRequest- AConsumerthat will call methods onDeleteEnvironmentRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the DeleteEnvironment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getEnvironment
default CompletableFuture<GetEnvironmentResponse> getEnvironment(GetEnvironmentRequest getEnvironmentRequest) Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
- Parameters:
getEnvironmentRequest-- Returns:
- A Java Future containing the result of the GetEnvironment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
getEnvironment
default CompletableFuture<GetEnvironmentResponse> getEnvironment(Consumer<GetEnvironmentRequest.Builder> getEnvironmentRequest) Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
This is a convenience which creates an instance of the
GetEnvironmentRequest.Builderavoiding the need to create one manually viaGetEnvironmentRequest.builder()- Parameters:
getEnvironmentRequest- AConsumerthat will call methods onGetEnvironmentRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the GetEnvironment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
invokeRestApi
default CompletableFuture<InvokeRestApiResponse> invokeRestApi(InvokeRestApiRequest invokeRestApiRequest) Invokes the Apache Airflow REST API on the webserver with the specified inputs. To learn more, see Using the Apache Airflow REST API
- Parameters:
invokeRestApiRequest-- Returns:
- A Java Future containing the result of the InvokeRestApi operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- RestApiClientException An exception indicating that a client-side error occurred during the Apache Airflow REST API call.
- AccessDeniedException Access to the Apache Airflow Web UI or CLI has been denied due to insufficient permissions. To learn more, see Accessing an Amazon MWAA environment.
- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- RestApiServerException An exception indicating that a server-side error occurred during the Apache Airflow REST API call.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
invokeRestApi
default CompletableFuture<InvokeRestApiResponse> invokeRestApi(Consumer<InvokeRestApiRequest.Builder> invokeRestApiRequest) Invokes the Apache Airflow REST API on the webserver with the specified inputs. To learn more, see Using the Apache Airflow REST API
This is a convenience which creates an instance of the
InvokeRestApiRequest.Builderavoiding the need to create one manually viaInvokeRestApiRequest.builder()- Parameters:
invokeRestApiRequest- AConsumerthat will call methods onInvokeRestApiRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the InvokeRestApi operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- RestApiClientException An exception indicating that a client-side error occurred during the Apache Airflow REST API call.
- AccessDeniedException Access to the Apache Airflow Web UI or CLI has been denied due to insufficient permissions. To learn more, see Accessing an Amazon MWAA environment.
- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- RestApiServerException An exception indicating that a server-side error occurred during the Apache Airflow REST API call.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEnvironments
default CompletableFuture<ListEnvironmentsResponse> listEnvironments(ListEnvironmentsRequest listEnvironmentsRequest) Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.
- Parameters:
listEnvironmentsRequest-- Returns:
- A Java Future containing the result of the ListEnvironments operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEnvironments
default CompletableFuture<ListEnvironmentsResponse> listEnvironments(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.
This is a convenience which creates an instance of the
ListEnvironmentsRequest.Builderavoiding the need to create one manually viaListEnvironmentsRequest.builder()- Parameters:
listEnvironmentsRequest- AConsumerthat will call methods onListEnvironmentsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListEnvironments operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEnvironmentsPaginator
default ListEnvironmentsPublisher listEnvironmentsPaginator(ListEnvironmentsRequest listEnvironmentsRequest) This is a variant of
listEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsPublisher publisher = client.listEnvironmentsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsPublisher publisher = client.listEnvironmentsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.mwaa.model.ListEnvironmentsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)operation.- Parameters:
listEnvironmentsRequest-- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listEnvironmentsPaginator
default ListEnvironmentsPublisher listEnvironmentsPaginator(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) This is a variant of
listEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)operation. The return type is a custom publisher that can be subscribed to request a stream of response pages. SDK will internally handle making service calls for you.When the operation is called, an instance of this class is returned. At this point, no service calls are made yet and so there is no guarantee that the request is valid. If there are errors in your request, you will see the failures only after you start streaming the data. The subscribe method should be called as a request to start streaming data. For more info, see
Publisher.subscribe(org.reactivestreams.Subscriber). Each call to the subscribe method will result in a newSubscriptioni.e., a new contract to stream data from the starting request.The following are few ways to use the response class:
1) Using the subscribe helper method
2) Using a custom subscribersoftware.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsPublisher publisher = client.listEnvironmentsPaginator(request); CompletableFuture<Void> future = publisher.subscribe(res -> { // Do something with the response }); future.get();
As the response is a publisher, it can work well with third party reactive streams implementations like RxJava2.software.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsPublisher publisher = client.listEnvironmentsPaginator(request); publisher.subscribe(new Subscriber<software.amazon.awssdk.services.mwaa.model.ListEnvironmentsResponse>() { public void onSubscribe(org.reactivestreams.Subscriber subscription) { //... }; public void onNext(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsResponse response) { //... }; });Please notice that the configuration of MaxResults won't limit the number of results you get with the paginator. It only limits the number of results in each page.
Note: If you prefer to have control on service calls, use the
listEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)operation.
This is a convenience which creates an instance of the
ListEnvironmentsRequest.Builderavoiding the need to create one manually viaListEnvironmentsRequest.builder()- Parameters:
listEnvironmentsRequest- AConsumerthat will call methods onListEnvironmentsRequest.Builderto create a request.- Returns:
- A custom publisher that can be subscribed to request a stream of response pages.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example,
"Environment": "Staging".- Parameters:
listTagsForResourceRequest-- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
listTagsForResource
default CompletableFuture<ListTagsForResourceResponse> listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example,
"Environment": "Staging".
This is a convenience which creates an instance of the
ListTagsForResourceRequest.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the ListTagsForResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
publishMetrics
@Deprecated default CompletableFuture<PublishMetricsResponse> publishMetrics(PublishMetricsRequest publishMetricsRequest) Deprecated.This API is for internal use and not meant for public use, and is no longer available.Internal only. Publishes environment health metrics to Amazon CloudWatch.
- Parameters:
publishMetricsRequest-- Returns:
- A Java Future containing the result of the PublishMetrics operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
publishMetrics
@Deprecated default CompletableFuture<PublishMetricsResponse> publishMetrics(Consumer<PublishMetricsRequest.Builder> publishMetricsRequest) Deprecated.This API is for internal use and not meant for public use, and is no longer available.Internal only. Publishes environment health metrics to Amazon CloudWatch.
This is a convenience which creates an instance of the
PublishMetricsRequest.Builderavoiding the need to create one manually viaPublishMetricsRequest.builder()- Parameters:
publishMetricsRequest- AConsumerthat will call methods onPublishMetricsRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the PublishMetrics operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.
- Parameters:
tagResourceRequest-- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
tagResource
default CompletableFuture<TagResourceResponse> tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.
This is a convenience which creates an instance of the
TagResourceRequest.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the TagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(UntagResourceRequest untagResourceRequest) Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example,
"Environment": "Staging".- Parameters:
untagResourceRequest-- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
untagResource
default CompletableFuture<UntagResourceResponse> untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example,
"Environment": "Staging".
This is a convenience which creates an instance of the
UntagResourceRequest.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UntagResource operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateEnvironment
default CompletableFuture<UpdateEnvironmentResponse> updateEnvironment(UpdateEnvironmentRequest updateEnvironmentRequest) Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
- Parameters:
updateEnvironmentRequest-- Returns:
- A Java Future containing the result of the UpdateEnvironment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
updateEnvironment
default CompletableFuture<UpdateEnvironmentResponse> updateEnvironment(Consumer<UpdateEnvironmentRequest.Builder> updateEnvironmentRequest) Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
This is a convenience which creates an instance of the
UpdateEnvironmentRequest.Builderavoiding the need to create one manually viaUpdateEnvironmentRequest.builder()- Parameters:
updateEnvironmentRequest- AConsumerthat will call methods onUpdateEnvironmentRequest.Builderto create a request.- Returns:
- A Java Future containing the result of the UpdateEnvironment operation returned by the service.
The CompletableFuture returned by this method can be completed exceptionally with the following exceptions. The exception returned is wrapped with CompletionException, so you need to invokeThrowable.getCause()to retrieve the underlying exception.- ResourceNotFoundException ResourceNotFoundException: The resource is not available.
- ValidationException ValidationException: The provided input is not valid.
- InternalServerException InternalServerException: An internal error has occurred.
- SdkException Base class for all exceptions that can be thrown by the SDK (both service and client). Can be used for catch all scenarios.
- SdkClientException If any client side error occurs such as an IO related failure, failure to get credentials, etc.
- MwaaException Base class for all service exceptions. Unknown exceptions will be thrown as an instance of this type.
- See Also:
-
serviceClientConfiguration
Description copied from interface:SdkClientThe SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfigurationin interfaceAwsClient- Specified by:
serviceClientConfigurationin interfaceSdkClient- Returns:
- SdkServiceClientConfiguration
-
create
Create aMwaaAsyncClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aMwaaAsyncClient.
-