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
FieldsModifier and TypeFieldDescriptionstatic final StringValue for looking up the service's metadata from theServiceMetadataProvider.static final String -
Method Summary
Modifier and TypeMethodDescriptionstatic MwaaClientBuilderbuilder()Create a builder that can be used to configure and create aMwaaClient.static MwaaClientcreate()Create aMwaaClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider.default CreateCliTokenResponsecreateCliToken(Consumer<CreateCliTokenRequest.Builder> createCliTokenRequest) Creates a CLI token for the Airflow CLI.default CreateCliTokenResponsecreateCliToken(CreateCliTokenRequest createCliTokenRequest) Creates a CLI token for the Airflow CLI.default CreateEnvironmentResponsecreateEnvironment(Consumer<CreateEnvironmentRequest.Builder> createEnvironmentRequest) Creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CreateEnvironmentResponsecreateEnvironment(CreateEnvironmentRequest createEnvironmentRequest) Creates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default CreateWebLoginTokenResponsecreateWebLoginToken(Consumer<CreateWebLoginTokenRequest.Builder> createWebLoginTokenRequest) Creates a web login token for the Airflow Web UI.default CreateWebLoginTokenResponsecreateWebLoginToken(CreateWebLoginTokenRequest createWebLoginTokenRequest) Creates a web login token for the Airflow Web UI.default DeleteEnvironmentResponsedeleteEnvironment(Consumer<DeleteEnvironmentRequest.Builder> deleteEnvironmentRequest) Deletes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default DeleteEnvironmentResponsedeleteEnvironment(DeleteEnvironmentRequest deleteEnvironmentRequest) Deletes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default GetEnvironmentResponsegetEnvironment(Consumer<GetEnvironmentRequest.Builder> getEnvironmentRequest) Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default GetEnvironmentResponsegetEnvironment(GetEnvironmentRequest getEnvironmentRequest) Describes an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default ListEnvironmentsResponselistEnvironments(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.default ListEnvironmentsResponselistEnvironments(ListEnvironmentsRequest listEnvironmentsRequest) Lists the Amazon Managed Workflows for Apache Airflow (MWAA) environments.default ListEnvironmentsIterablelistEnvironmentsPaginator(Consumer<ListEnvironmentsRequest.Builder> listEnvironmentsRequest) This is a variant oflistEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)operation.default ListEnvironmentsIterablelistEnvironmentsPaginator(ListEnvironmentsRequest listEnvironmentsRequest) This is a variant oflistEnvironments(software.amazon.awssdk.services.mwaa.model.ListEnvironmentsRequest)operation.default ListTagsForResourceResponselistTagsForResource(Consumer<ListTagsForResourceRequest.Builder> listTagsForResourceRequest) Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment.default ListTagsForResourceResponselistTagsForResource(ListTagsForResourceRequest listTagsForResourceRequest) Lists the key-value tag pairs associated to the Amazon Managed Workflows for Apache Airflow (MWAA) environment.default PublishMetricsResponsepublishMetrics(Consumer<PublishMetricsRequest.Builder> publishMetricsRequest) Deprecated.This API is for internal use and not meant for public use, and is no longer available.default PublishMetricsResponsepublishMetrics(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., ClientOverrideConfigurationstatic ServiceMetadatadefault TagResourceResponsetagResource(Consumer<TagResourceRequest.Builder> tagResourceRequest) Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default TagResourceResponsetagResource(TagResourceRequest tagResourceRequest) Associates key-value tag pairs to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default UntagResourceResponseuntagResource(Consumer<UntagResourceRequest.Builder> untagResourceRequest) Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default UntagResourceResponseuntagResource(UntagResourceRequest untagResourceRequest) Removes key-value tag pairs associated to your Amazon Managed Workflows for Apache Airflow (MWAA) environment.default UpdateEnvironmentResponseupdateEnvironment(Consumer<UpdateEnvironmentRequest.Builder> updateEnvironmentRequest) Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.default UpdateEnvironmentResponseupdateEnvironment(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 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.Builderavoiding the need to create one manually viaCreateCliTokenRequest.builder()- Parameters:
createCliTokenRequest- AConsumerthat will call methods onCreateCliTokenRequest.Builderto 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.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 (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.Builderavoiding the need to create one manually viaCreateWebLoginTokenRequest.builder()- Parameters:
createWebLoginTokenRequest- AConsumerthat will call methods onCreateWebLoginTokenRequest.Builderto 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.Builderavoiding the need to create one manually viaDeleteEnvironmentRequest.builder()- Parameters:
deleteEnvironmentRequest- AConsumerthat will call methods onDeleteEnvironmentRequest.Builderto 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.Builderavoiding the need to create one manually viaGetEnvironmentRequest.builder()- Parameters:
getEnvironmentRequest- AConsumerthat will call methods onGetEnvironmentRequest.Builderto 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.Builderavoiding the need to create one manually viaListEnvironmentsRequest.builder()- Parameters:
listEnvironmentsRequest- AConsumerthat will call methods onListEnvironmentsRequest.Builderto 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 Stream
2) Using For loopsoftware.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 Stream
2) Using For loopsoftware.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.Builderavoiding the need to create one manually viaListEnvironmentsRequest.builder()- Parameters:
listEnvironmentsRequest- AConsumerthat will call methods onListEnvironmentsRequest.Builderto 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.Builderavoiding the need to create one manually viaListTagsForResourceRequest.builder()- Parameters:
listTagsForResourceRequest- AConsumerthat will call methods onListTagsForResourceRequest.Builderto 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.Builderavoiding the need to create one manually viaPublishMetricsRequest.builder()- Parameters:
publishMetricsRequest- AConsumerthat will call methods onPublishMetricsRequest.Builderto 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.Builderavoiding the need to create one manually viaTagResourceRequest.builder()- Parameters:
tagResourceRequest- AConsumerthat will call methods onTagResourceRequest.Builderto 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.Builderavoiding the need to create one manually viaUntagResourceRequest.builder()- Parameters:
untagResourceRequest- AConsumerthat will call methods onUntagResourceRequest.Builderto 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.Builderavoiding the need to create one manually viaUpdateEnvironmentRequest.builder()- Parameters:
updateEnvironmentRequest- AConsumerthat will call methods onUpdateEnvironmentRequest.Builderto create a request.- Returns:
- Result of the UpdateEnvironment operation returned by the service.
- See Also:
-
create
Create aMwaaClientwith the region loaded from theDefaultAwsRegionProviderChainand credentials loaded from theDefaultCredentialsProvider. -
builder
Create a builder that can be used to configure and create aMwaaClient. -
serviceMetadata
-
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
-