Interface MwaaClient
- All Superinterfaces:
AutoCloseable
,AwsClient
,SdkAutoCloseable
,SdkClient
builder()
method.
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
Modifier and TypeFieldDescriptionstatic final String
Value for looking up the service's metadata from theServiceMetadataProvider
.static final String
-
Method Summary
Modifier and TypeMethodDescriptionstatic MwaaClientBuilder
builder()
Create a builder that can be used to configure and create aMwaaClient
.static MwaaClient
create()
Create aMwaaClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
.default CreateCliTokenResponse
createCliToken
(Consumer<CreateCliTokenRequest.Builder> createCliTokenRequest) Creates a CLI token for the Airflow CLI.default CreateCliTokenResponse
createCliToken
(CreateCliTokenRequest createCliTokenRequest) Creates a CLI token for the Airflow CLI.default CreateEnvironmentResponse
createEnvironment
(Consumer<CreateEnvironmentRequest.Builder> createEnvironmentRequest) Creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CreateEnvironmentResponse
createEnvironment
(CreateEnvironmentRequest createEnvironmentRequest) Creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CreateWebLoginTokenResponse
createWebLoginToken
(Consumer<CreateWebLoginTokenRequest.Builder> createWebLoginTokenRequest) Creates a web login token for the Airflow Web UI.default CreateWebLoginTokenResponse
createWebLoginToken
(CreateWebLoginTokenRequest createWebLoginTokenRequest) Creates a web login token for the Airflow Web UI.default DeleteEnvironmentResponse
deleteEnvironment
(Consumer<DeleteEnvironmentRequest.Builder> deleteEnvironmentRequest) Deletes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default DeleteEnvironmentResponse
deleteEnvironment
(DeleteEnvironmentRequest deleteEnvironmentRequest) Deletes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default GetEnvironmentResponse
getEnvironment
(Consumer<GetEnvironmentRequest.Builder> getEnvironmentRequest) Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default GetEnvironmentResponse
getEnvironment
(GetEnvironmentRequest getEnvironmentRequest) Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default ListEnvironmentsResponse
listEnvironments
(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.default ListEnvironmentsResponse
listEnvironments
(ListEnvironmentsRequest listEnvironmentsRequest) Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.default ListEnvironmentsIterable
listEnvironmentsPaginator
(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) This is a variant oflistEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)
operation.default ListEnvironmentsIterable
listEnvironmentsPaginator
(ListEnvironmentsRequest listEnvironmentsRequest) This is a variant oflistEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)
operation.default ListTagsForResourceResponse
listTagsForResource
(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment.default ListTagsForResourceResponse
listTagsForResource
(ListTagsForResourceRequest listTagsForResourceRequest) Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment.default 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 PublishMetricsResponse
publishMetrics
(PublishMetricsRequest publishMetricsRequest) Deprecated.This API is for internal use and not meant for public use, and is no longer available.default MwaaServiceClientConfiguration
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfigurationstatic ServiceMetadata
default TagResourceResponse
tagResource
(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default TagResourceResponse
tagResource
(TagResourceRequest tagResourceRequest) Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default UntagResourceResponse
untagResource
(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default UntagResourceResponse
untagResource
(UntagResourceRequest untagResourceRequest) Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default UpdateEnvironmentResponse
updateEnvironment
(Consumer<UpdateEnvironmentRequest.Builder> updateEnvironmentRequest) Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default UpdateEnvironmentResponse
updateEnvironment
(UpdateEnvironmentRequest updateEnvironmentRequest) Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.Methods inherited from interface software.amazon.awssdk.utils.SdkAutoCloseable
close
Methods 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 CreateCliTokenResponse createCliToken(CreateCliTokenRequest createCliTokenRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, MwaaException Creates a CLI token for the Airflow CLI. To learn more, see Creating an Apache Airflow CLI token.
- Parameters:
createCliTokenRequest
-- Returns:
- Result of the CreateCliToken operation returned by the service.
- See Also:
-
createCliToken
default CreateCliTokenResponse createCliToken(Consumer<CreateCliTokenRequest.Builder> createCliTokenRequest) throws ResourceNotFoundException, AwsServiceException, SdkClientException, MwaaException 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.Builder
avoiding the need to create one manually viaCreateCliTokenRequest.builder()
- Parameters:
createCliTokenRequest
- AConsumer
that will call methods onCreateCliTokenRequest.Builder
to create a request.- Returns:
- Result of the CreateCliToken operation returned by the service.
- See Also:
-
createEnvironment
default CreateEnvironmentResponse createEnvironment(CreateEnvironmentRequest createEnvironmentRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
- Parameters:
createEnvironmentRequest
- This section contains the Amazon Managed Workflows for Apache Airflow (MWAA) API reference documentation to create an environment. For more information, see Get started with Amazon Managed Workflows for Apache Airflow.- Returns:
- Result of the CreateEnvironment operation returned by the service.
- See Also:
-
createEnvironment
default CreateEnvironmentResponse createEnvironment(Consumer<CreateEnvironmentRequest.Builder> createEnvironmentRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
This is a convenience which creates an instance of the
CreateEnvironmentRequest.Builder
avoiding the need to create one manually viaCreateEnvironmentRequest.builder()
- Parameters:
createEnvironmentRequest
- AConsumer
that will call methods onCreateEnvironmentRequest.Builder
to create a request. This section contains the Amazon Managed Workflows for Apache Airflow (MWAA) API reference documentation to create an environment. For more information, see Get started with Amazon Managed Workflows for Apache Airflow.- Returns:
- Result of the CreateEnvironment operation returned by the service.
- See Also:
-
createWebLoginToken
default CreateWebLoginTokenResponse createWebLoginToken(CreateWebLoginTokenRequest createWebLoginTokenRequest) throws AccessDeniedException, ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Creates a web login token for the Airflow Web UI. To learn more, see Creating an Apache Airflow web login token.
- Parameters:
createWebLoginTokenRequest
-- Returns:
- Result of the CreateWebLoginToken operation returned by the service.
- See Also:
-
createWebLoginToken
default CreateWebLoginTokenResponse createWebLoginToken(Consumer<CreateWebLoginTokenRequest.Builder> createWebLoginTokenRequest) throws AccessDeniedException, ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException 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.Builder
avoiding the need to create one manually viaCreateWebLoginTokenRequest.builder()
- Parameters:
createWebLoginTokenRequest
- AConsumer
that will call methods onCreateWebLoginTokenRequest.Builder
to create a request.- Returns:
- Result of the CreateWebLoginToken operation returned by the service.
- See Also:
-
deleteEnvironment
default DeleteEnvironmentResponse deleteEnvironment(DeleteEnvironmentRequest deleteEnvironmentRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Deletes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
- Parameters:
deleteEnvironmentRequest
-- Returns:
- Result of the DeleteEnvironment operation returned by the service.
- See Also:
-
deleteEnvironment
default DeleteEnvironmentResponse deleteEnvironment(Consumer<DeleteEnvironmentRequest.Builder> deleteEnvironmentRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Deletes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
This is a convenience which creates an instance of the
DeleteEnvironmentRequest.Builder
avoiding the need to create one manually viaDeleteEnvironmentRequest.builder()
- Parameters:
deleteEnvironmentRequest
- AConsumer
that will call methods onDeleteEnvironmentRequest.Builder
to create a request.- Returns:
- Result of the DeleteEnvironment operation returned by the service.
- See Also:
-
getEnvironment
default GetEnvironmentResponse getEnvironment(GetEnvironmentRequest getEnvironmentRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
- Parameters:
getEnvironmentRequest
-- Returns:
- Result of the GetEnvironment operation returned by the service.
- See Also:
-
getEnvironment
default GetEnvironmentResponse getEnvironment(Consumer<GetEnvironmentRequest.Builder> getEnvironmentRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
This is a convenience which creates an instance of the
GetEnvironmentRequest.Builder
avoiding the need to create one manually viaGetEnvironmentRequest.builder()
- Parameters:
getEnvironmentRequest
- AConsumer
that will call methods onGetEnvironmentRequest.Builder
to create a request.- Returns:
- Result of the GetEnvironment operation returned by the service.
- See Also:
-
listEnvironments
default ListEnvironmentsResponse listEnvironments(ListEnvironmentsRequest listEnvironmentsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.
- Parameters:
listEnvironmentsRequest
-- Returns:
- Result of the ListEnvironments operation returned by the service.
- See Also:
-
listEnvironments
default ListEnvironmentsResponse listEnvironments(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.
This is a convenience which creates an instance of the
ListEnvironmentsRequest.Builder
avoiding the need to create one manually viaListEnvironmentsRequest.builder()
- Parameters:
listEnvironmentsRequest
- AConsumer
that will call methods onListEnvironmentsRequest.Builder
to create a request.- Returns:
- Result of the ListEnvironments operation returned by the service.
- See Also:
-
listEnvironmentsPaginator
default ListEnvironmentsIterable listEnvironmentsPaginator(ListEnvironmentsRequest listEnvironmentsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException This is a variant of
listEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsIterable responses = client.listEnvironmentsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsIterable responses = client .listEnvironmentsPaginator(request); for (software.amazon.awssdk.services.mwaa.model.ListEnvironmentsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsIterable responses = client.listEnvironmentsPaginator(request); responses.iterator().forEachRemaining(....);
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 iterable that can be used to iterate through all the response pages.
- See Also:
-
listEnvironmentsPaginator
default ListEnvironmentsIterable listEnvironmentsPaginator(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException This is a variant of
listEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)
operation. The return type is a custom iterable that can be used to iterate through all the pages. SDK will internally handle making service calls for you.When this operation is called, a custom iterable is returned but no service calls are made yet. So there is no guarantee that the request is valid. As you iterate through the iterable, SDK will start lazily loading response pages by making service calls until there are no pages left or your iteration stops. If there are errors in your request, you will see the failures only after you start iterating through the iterable.
The following are few ways to iterate through the response pages:
1) Using a Streamsoftware.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsIterable responses = client.listEnvironmentsPaginator(request); responses.stream().forEach(....);
{ @code software.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsIterable responses = client .listEnvironmentsPaginator(request); for (software.amazon.awssdk.services.mwaa.model.ListEnvironmentsResponse response : responses) { // do something; } }
3) Use iterator directlysoftware.amazon.awssdk.services.mwaa.paginators.ListEnvironmentsIterable responses = client.listEnvironmentsPaginator(request); responses.iterator().forEachRemaining(....);
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.Builder
avoiding the need to create one manually viaListEnvironmentsRequest.builder()
- Parameters:
listEnvironmentsRequest
- AConsumer
that will call methods onListEnvironmentsRequest.Builder
to create a request.- Returns:
- A custom iterable that can be used to iterate through all the response pages.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example,
"Environment": "Staging"
.- Parameters:
listTagsForResourceRequest
-- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
listTagsForResource
default ListTagsForResourceResponse listTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException 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.Builder
avoiding the need to create one manually viaListTagsForResourceRequest.builder()
- Parameters:
listTagsForResourceRequest
- AConsumer
that will call methods onListTagsForResourceRequest.Builder
to create a request.- Returns:
- Result of the ListTagsForResource operation returned by the service.
- See Also:
-
publishMetrics
@Deprecated default PublishMetricsResponse publishMetrics(PublishMetricsRequest publishMetricsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException 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:
- Result of the PublishMetrics operation returned by the service.
- See Also:
-
publishMetrics
@Deprecated default PublishMetricsResponse publishMetrics(Consumer<PublishMetricsRequest.Builder> publishMetricsRequest) throws ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException 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.Builder
avoiding the need to create one manually viaPublishMetricsRequest.builder()
- Parameters:
publishMetricsRequest
- AConsumer
that will call methods onPublishMetricsRequest.Builder
to create a request.- Returns:
- Result of the PublishMetrics operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(TagResourceRequest tagResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.
- Parameters:
tagResourceRequest
-- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
tagResource
default TagResourceResponse tagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException 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.Builder
avoiding the need to create one manually viaTagResourceRequest.builder()
- Parameters:
tagResourceRequest
- AConsumer
that will call methods onTagResourceRequest.Builder
to create a request.- Returns:
- Result of the TagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(UntagResourceRequest untagResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment. For example,
"Environment": "Staging"
.- Parameters:
untagResourceRequest
-- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
untagResource
default UntagResourceResponse untagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException 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.Builder
avoiding the need to create one manually viaUntagResourceRequest.builder()
- Parameters:
untagResourceRequest
- AConsumer
that will call methods onUntagResourceRequest.Builder
to create a request.- Returns:
- Result of the UntagResource operation returned by the service.
- See Also:
-
updateEnvironment
default UpdateEnvironmentResponse updateEnvironment(UpdateEnvironmentRequest updateEnvironmentRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
- Parameters:
updateEnvironmentRequest
-- Returns:
- Result of the UpdateEnvironment operation returned by the service.
- See Also:
-
updateEnvironment
default UpdateEnvironmentResponse updateEnvironment(Consumer<UpdateEnvironmentRequest.Builder> updateEnvironmentRequest) throws ResourceNotFoundException, ValidationException, InternalServerException, AwsServiceException, SdkClientException, MwaaException Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.
This is a convenience which creates an instance of the
UpdateEnvironmentRequest.Builder
avoiding the need to create one manually viaUpdateEnvironmentRequest.builder()
- Parameters:
updateEnvironmentRequest
- AConsumer
that will call methods onUpdateEnvironmentRequest.Builder
to create a request.- Returns:
- Result of the UpdateEnvironment operation returned by the service.
- See Also:
-
create
Create aMwaaClient
with the region loaded from theDefaultAwsRegionProviderChain
and credentials loaded from theDefaultCredentialsProvider
. -
builder
Create a builder that can be used to configure and create aMwaaClient
. -
serviceMetadata
-
serviceClientConfiguration
Description copied from interface:SdkClient
The SDK service client configuration exposes client settings to the user, e.g., ClientOverrideConfiguration- Specified by:
serviceClientConfiguration
in interfaceAwsClient
- Specified by:
serviceClientConfiguration
in interfaceSdkClient
- Returns:
- SdkServiceClientConfiguration
-