/**
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0.
*/
#pragma once
#include
#include
#include
#include
#include
#include
namespace Aws
{
namespace MWAA
{
/**
* Amazon Managed Workflows for Apache Airflow
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.
-
ops.airflow.{region}.amazonaws.com
* - This endpoint is used to push environment metrics that track environment
* health.
Regions
For
* a list of regions that Amazon MWAA supports, see Region
* availability in the Amazon MWAA User Guide.
*/
class AWS_MWAA_API MWAAClient : public Aws::Client::AWSJsonClient, public Aws::Client::ClientWithAsyncTemplateMethods
{
public:
typedef Aws::Client::AWSJsonClient BASECLASS;
static const char* SERVICE_NAME;
static const char* ALLOCATION_TAG;
typedef MWAAClientConfiguration ClientConfigurationType;
typedef MWAAEndpointProvider EndpointProviderType;
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
MWAAClient(const Aws::MWAA::MWAAClientConfiguration& clientConfiguration = Aws::MWAA::MWAAClientConfiguration(),
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG));
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
MWAAClient(const Aws::Auth::AWSCredentials& credentials,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::MWAA::MWAAClientConfiguration& clientConfiguration = Aws::MWAA::MWAAClientConfiguration());
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
MWAAClient(const std::shared_ptr& credentialsProvider,
std::shared_ptr endpointProvider = Aws::MakeShared(ALLOCATION_TAG),
const Aws::MWAA::MWAAClientConfiguration& clientConfiguration = Aws::MWAA::MWAAClientConfiguration());
/* Legacy constructors due deprecation */
/**
* Initializes client to use DefaultCredentialProviderChain, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
MWAAClient(const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use SimpleAWSCredentialsProvider, with default http client factory, and optional client config. If client config
* is not specified, it will be initialized to default values.
*/
MWAAClient(const Aws::Auth::AWSCredentials& credentials,
const Aws::Client::ClientConfiguration& clientConfiguration);
/**
* Initializes client to use specified credentials provider with specified client config. If http client factory is not supplied,
* the default http client factory will be used
*/
MWAAClient(const std::shared_ptr& credentialsProvider,
const Aws::Client::ClientConfiguration& clientConfiguration);
/* End of legacy constructors due deprecation */
virtual ~MWAAClient();
/**
* Creates a CLI token for the Airflow CLI. To learn more, see Creating
* an Apache Airflow CLI token.
See Also:
AWS
* API Reference
*/
virtual Model::CreateCliTokenOutcome CreateCliToken(const Model::CreateCliTokenRequest& request) const;
/**
* A Callable wrapper for CreateCliToken that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateCliTokenOutcomeCallable CreateCliTokenCallable(const CreateCliTokenRequestT& request) const
{
return SubmitCallable(&MWAAClient::CreateCliToken, request);
}
/**
* An Async wrapper for CreateCliToken that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateCliTokenAsync(const CreateCliTokenRequestT& request, const CreateCliTokenResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::CreateCliToken, request, handler, context);
}
/**
* Creates an Amazon Managed Workflows for Apache Airflow (MWAA)
* environment.
See Also:
AWS
* API Reference
*/
virtual Model::CreateEnvironmentOutcome CreateEnvironment(const Model::CreateEnvironmentRequest& request) const;
/**
* A Callable wrapper for CreateEnvironment that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateEnvironmentOutcomeCallable CreateEnvironmentCallable(const CreateEnvironmentRequestT& request) const
{
return SubmitCallable(&MWAAClient::CreateEnvironment, request);
}
/**
* An Async wrapper for CreateEnvironment that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateEnvironmentAsync(const CreateEnvironmentRequestT& request, const CreateEnvironmentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::CreateEnvironment, request, handler, context);
}
/**
* Creates a web login token for the Airflow Web UI. To learn more, see Creating
* an Apache Airflow web login token.
See Also:
AWS
* API Reference
*/
virtual Model::CreateWebLoginTokenOutcome CreateWebLoginToken(const Model::CreateWebLoginTokenRequest& request) const;
/**
* A Callable wrapper for CreateWebLoginToken that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::CreateWebLoginTokenOutcomeCallable CreateWebLoginTokenCallable(const CreateWebLoginTokenRequestT& request) const
{
return SubmitCallable(&MWAAClient::CreateWebLoginToken, request);
}
/**
* An Async wrapper for CreateWebLoginToken that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void CreateWebLoginTokenAsync(const CreateWebLoginTokenRequestT& request, const CreateWebLoginTokenResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::CreateWebLoginToken, request, handler, context);
}
/**
* Deletes an Amazon Managed Workflows for Apache Airflow (MWAA)
* environment.
See Also:
AWS
* API Reference
*/
virtual Model::DeleteEnvironmentOutcome DeleteEnvironment(const Model::DeleteEnvironmentRequest& request) const;
/**
* A Callable wrapper for DeleteEnvironment that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::DeleteEnvironmentOutcomeCallable DeleteEnvironmentCallable(const DeleteEnvironmentRequestT& request) const
{
return SubmitCallable(&MWAAClient::DeleteEnvironment, request);
}
/**
* An Async wrapper for DeleteEnvironment that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void DeleteEnvironmentAsync(const DeleteEnvironmentRequestT& request, const DeleteEnvironmentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::DeleteEnvironment, request, handler, context);
}
/**
* Describes an Amazon Managed Workflows for Apache Airflow (MWAA)
* environment.
See Also:
AWS
* API Reference
*/
virtual Model::GetEnvironmentOutcome GetEnvironment(const Model::GetEnvironmentRequest& request) const;
/**
* A Callable wrapper for GetEnvironment that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::GetEnvironmentOutcomeCallable GetEnvironmentCallable(const GetEnvironmentRequestT& request) const
{
return SubmitCallable(&MWAAClient::GetEnvironment, request);
}
/**
* An Async wrapper for GetEnvironment that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void GetEnvironmentAsync(const GetEnvironmentRequestT& request, const GetEnvironmentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::GetEnvironment, request, handler, context);
}
/**
* Lists the Amazon Managed Workflows for Apache Airflow (MWAA)
* environments.
See Also:
AWS
* API Reference
*/
virtual Model::ListEnvironmentsOutcome ListEnvironments(const Model::ListEnvironmentsRequest& request) const;
/**
* A Callable wrapper for ListEnvironments that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListEnvironmentsOutcomeCallable ListEnvironmentsCallable(const ListEnvironmentsRequestT& request) const
{
return SubmitCallable(&MWAAClient::ListEnvironments, request);
}
/**
* An Async wrapper for ListEnvironments that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListEnvironmentsAsync(const ListEnvironmentsRequestT& request, const ListEnvironmentsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::ListEnvironments, request, handler, context);
}
/**
* Lists the key-value tag pairs associated to the Amazon Managed Workflows for
* Apache Airflow (MWAA) environment. For example, "Environment":
* "Staging"
.
See Also:
AWS
* API Reference
*/
virtual Model::ListTagsForResourceOutcome ListTagsForResource(const Model::ListTagsForResourceRequest& request) const;
/**
* A Callable wrapper for ListTagsForResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::ListTagsForResourceOutcomeCallable ListTagsForResourceCallable(const ListTagsForResourceRequestT& request) const
{
return SubmitCallable(&MWAAClient::ListTagsForResource, request);
}
/**
* An Async wrapper for ListTagsForResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void ListTagsForResourceAsync(const ListTagsForResourceRequestT& request, const ListTagsForResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::ListTagsForResource, request, handler, context);
}
/**
* Internal only. Publishes environment health metrics to Amazon
* CloudWatch.
See Also:
AWS
* API Reference
*/
virtual Model::PublishMetricsOutcome PublishMetrics(const Model::PublishMetricsRequest& request) const;
/**
* A Callable wrapper for PublishMetrics that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::PublishMetricsOutcomeCallable PublishMetricsCallable(const PublishMetricsRequestT& request) const
{
return SubmitCallable(&MWAAClient::PublishMetrics, request);
}
/**
* An Async wrapper for PublishMetrics that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void PublishMetricsAsync(const PublishMetricsRequestT& request, const PublishMetricsResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::PublishMetrics, request, handler, context);
}
/**
* Associates key-value tag pairs to your Amazon Managed Workflows for Apache
* Airflow (MWAA) environment.
See Also:
AWS
* API Reference
*/
virtual Model::TagResourceOutcome TagResource(const Model::TagResourceRequest& request) const;
/**
* A Callable wrapper for TagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::TagResourceOutcomeCallable TagResourceCallable(const TagResourceRequestT& request) const
{
return SubmitCallable(&MWAAClient::TagResource, request);
}
/**
* An Async wrapper for TagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void TagResourceAsync(const TagResourceRequestT& request, const TagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::TagResource, request, handler, context);
}
/**
* Removes key-value tag pairs associated to your Amazon Managed Workflows for
* Apache Airflow (MWAA) environment. For example, "Environment":
* "Staging"
.
See Also:
AWS
* API Reference
*/
virtual Model::UntagResourceOutcome UntagResource(const Model::UntagResourceRequest& request) const;
/**
* A Callable wrapper for UntagResource that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UntagResourceOutcomeCallable UntagResourceCallable(const UntagResourceRequestT& request) const
{
return SubmitCallable(&MWAAClient::UntagResource, request);
}
/**
* An Async wrapper for UntagResource that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UntagResourceAsync(const UntagResourceRequestT& request, const UntagResourceResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::UntagResource, request, handler, context);
}
/**
* Updates an Amazon Managed Workflows for Apache Airflow (MWAA)
* environment.
See Also:
AWS
* API Reference
*/
virtual Model::UpdateEnvironmentOutcome UpdateEnvironment(const Model::UpdateEnvironmentRequest& request) const;
/**
* A Callable wrapper for UpdateEnvironment that returns a future to the operation so that it can be executed in parallel to other requests.
*/
template
Model::UpdateEnvironmentOutcomeCallable UpdateEnvironmentCallable(const UpdateEnvironmentRequestT& request) const
{
return SubmitCallable(&MWAAClient::UpdateEnvironment, request);
}
/**
* An Async wrapper for UpdateEnvironment that queues the request into a thread executor and triggers associated callback when operation has finished.
*/
template
void UpdateEnvironmentAsync(const UpdateEnvironmentRequestT& request, const UpdateEnvironmentResponseReceivedHandler& handler, const std::shared_ptr& context = nullptr) const
{
return SubmitAsync(&MWAAClient::UpdateEnvironment, request, handler, context);
}
void OverrideEndpoint(const Aws::String& endpoint);
std::shared_ptr& accessEndpointProvider();
private:
friend class Aws::Client::ClientWithAsyncTemplateMethods;
void init(const MWAAClientConfiguration& clientConfiguration);
MWAAClientConfiguration m_clientConfiguration;
std::shared_ptr m_executor;
std::shared_ptr m_endpointProvider;
};
} // namespace MWAA
} // namespace Aws