pub struct Client { /* private fields */ }
Expand description
Client for AmazonMWAA
Client for invoking operations on AmazonMWAA. Each operation on AmazonMWAA is a method on this
this struct. .send()
MUST be invoked on the generated operations to dispatch the request to the service.
§Constructing a Client
A Config
is required to construct a client. For most use cases, the aws-config
crate should be used to automatically resolve this config using
aws_config::load_from_env()
, since this will resolve an SdkConfig
which can be shared
across multiple different AWS SDK clients. This config resolution process can be customized
by calling aws_config::from_env()
instead, which returns a ConfigLoader
that uses
the builder pattern to customize the default config.
In the simplest case, creating a client looks as follows:
let config = aws_config::load_from_env().await;
let client = aws_sdk_mwaa::Client::new(&config);
Occasionally, SDKs may have additional service-specific values that can be set on the Config
that
is absent from SdkConfig
, or slightly different settings for a specific client may be desired.
The Builder
struct implements From<&SdkConfig>
, so setting these specific settings can be
done as follows:
let sdk_config = ::aws_config::load_from_env().await;
let config = aws_sdk_mwaa::config::Builder::from(&sdk_config)
.some_service_specific_setting("value")
.build();
See the aws-config
docs and Config
for more information on customizing configuration.
Note: Client construction is expensive due to connection thread pool initialization, and should be done once at application start-up.
§Using the Client
A client has a function for every operation that can be performed by the service.
For example, the CreateCliToken
operation has
a Client::create_cli_token
, function which returns a builder for that operation.
The fluent builder ultimately has a send()
function that returns an async future that
returns a result, as illustrated below:
let result = client.create_cli_token()
.name("example")
.send()
.await;
The underlying HTTP requests that get made by this can be modified with the customize_operation
function on the fluent builder. See the customize
module for more
information.
Implementations§
Source§impl Client
impl Client
Sourcepub fn create_cli_token(&self) -> CreateCliTokenFluentBuilder
pub fn create_cli_token(&self) -> CreateCliTokenFluentBuilder
Constructs a fluent builder for the CreateCliToken
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the Amazon MWAA environment. For example,
MyMWAAEnvironment
.
- On success, responds with
CreateCliTokenOutput
with field(s):cli_token(Option<String>)
:An Airflow CLI login token.
web_server_hostname(Option<String>)
:The Airflow web server hostname for the environment.
- On failure, responds with
SdkError<CreateCliTokenError>
Source§impl Client
impl Client
Sourcepub fn create_environment(&self) -> CreateEnvironmentFluentBuilder
pub fn create_environment(&self) -> CreateEnvironmentFluentBuilder
Constructs a fluent builder for the CreateEnvironment
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the Amazon MWAA environment. For example,
MyMWAAEnvironment
.execution_role_arn(impl Into<String>)
/set_execution_role_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the execution role for your environment. An execution role is an Amazon Web Services Identity and Access Management (IAM) role that grants MWAA permission to access Amazon Web Services services and resources used by your environment. For example,
arn:aws:iam::123456789:role/my-execution-role
. For more information, see Amazon MWAA Execution role.source_bucket_arn(impl Into<String>)
/set_source_bucket_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example,
arn:aws:s3:::my-airflow-bucket-unique-name
. For more information, see Create an Amazon S3 bucket for Amazon MWAA.dag_s3_path(impl Into<String>)
/set_dag_s3_path(Option<String>)
:
required: trueThe relative path to the DAGs folder on your Amazon S3 bucket. For example,
dags
. For more information, see Adding or updating DAGs.network_configuration(NetworkConfiguration)
/set_network_configuration(Option<NetworkConfiguration>)
:
required: trueThe VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see About networking on Amazon MWAA.
plugins_s3_path(impl Into<String>)
/set_plugins_s3_path(Option<String>)
:
required: falseThe relative path to the
plugins.zip
file on your Amazon S3 bucket. For example,plugins.zip
. If specified, then theplugins.zip
version is required. For more information, see Installing custom plugins.plugins_s3_object_version(impl Into<String>)
/set_plugins_s3_object_version(Option<String>)
:
required: falseThe version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a plugins.zip file is updated. For more information, see How S3 Versioning works.
requirements_s3_path(impl Into<String>)
/set_requirements_s3_path(Option<String>)
:
required: falseThe relative path to the
requirements.txt
file on your Amazon S3 bucket. For example,requirements.txt
. If specified, then a version is required. For more information, see Installing Python dependencies.requirements_s3_object_version(impl Into<String>)
/set_requirements_s3_object_version(Option<String>)
:
required: falseThe version of the
requirements.txt
file on your Amazon S3 bucket. You must specify a version each time a requirements.txt file is updated. For more information, see How S3 Versioning works.startup_script_s3_path(impl Into<String>)
/set_startup_script_s3_path(Option<String>)
:
required: falseThe relative path to the startup shell script in your Amazon S3 bucket. For example,
s3://mwaa-environment/startup.sh
.Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, see Using a startup script.
startup_script_s3_object_version(impl Into<String>)
/set_startup_script_s3_object_version(Option<String>)
:
required: falseThe version of the startup shell script in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.
Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:
3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo
For more information, see Using a startup script.
airflow_configuration_options(impl Into<String>, impl Into<String>)
/set_airflow_configuration_options(Option<HashMap::<String, String>>)
:
required: falseA list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, see Apache Airflow configuration options.
environment_class(impl Into<String>)
/set_environment_class(Option<String>)
:
required: falseThe environment class type. Valid values:
mw1.micro
,mw1.small
,mw1.medium
,mw1.large
,mw1.xlarge
, andmw1.2xlarge
. For more information, see Amazon MWAA environment class.max_workers(i32)
/set_max_workers(Option<i32>)
:
required: falseThe maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the
MaxWorkers
field. For example,20
. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify inMinWorkers
.kms_key(impl Into<String>)
/set_kms_key(Option<String>)
:
required: falseThe Amazon Web Services Key Management Service (KMS) key to encrypt the data in your environment. You can use an Amazon Web Services owned CMK, or a Customer managed CMK (advanced). For more information, see Create an Amazon MWAA environment.
airflow_version(impl Into<String>)
/set_airflow_version(Option<String>)
:
required: falseThe Apache Airflow version for your environment. If no value is specified, it defaults to the latest version. For more information, see Apache Airflow versions on Amazon Managed Workflows for Apache Airflow (Amazon MWAA).
Valid values:
1.10.12
,2.0.2
,2.2.2
,2.4.3
,2.5.1
,2.6.3
,2.7.2
,2.8.1
,2.9.2
,2.10.1
, and2.10.3
.logging_configuration(LoggingConfigurationInput)
/set_logging_configuration(Option<LoggingConfigurationInput>)
:
required: falseDefines the Apache Airflow logs to send to CloudWatch Logs.
weekly_maintenance_window_start(impl Into<String>)
/set_weekly_maintenance_window_start(Option<String>)
:
required: falseThe day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time to start weekly maintenance updates of your environment in the following format:
DAY:HH:MM
. For example:TUE:03:30
. You can specify a start time in 30 minute increments only.tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: falseThe key-value tag pairs you want to associate to your environment. For example,
“Environment”: “Staging”
. For more information, see Tagging Amazon Web Services resources.webserver_access_mode(WebserverAccessMode)
/set_webserver_access_mode(Option<WebserverAccessMode>)
:
required: falseDefines the access mode for the Apache Airflow web server. For more information, see Apache Airflow access modes.
min_workers(i32)
/set_min_workers(Option<i32>)
:
required: falseThe minimum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the
MaxWorkers
field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in theMinWorkers
field. For example,2
.schedulers(i32)
/set_schedulers(Option<i32>)
:
required: falseThe number of Apache Airflow schedulers to run in your environment. Valid values:
-
v2 - For environments larger than mw1.micro, accepts values from
2
to5
. Defaults to2
for all environment sizes except mw1.micro, which defaults to1
. -
v1 - Accepts
1
.
-
endpoint_management(EndpointManagement)
/set_endpoint_management(Option<EndpointManagement>)
:
required: falseDefines whether the VPC endpoints configured for the environment are created, and managed, by the customer or by Amazon MWAA. If set to
SERVICE
, Amazon MWAA will create and manage the required VPC endpoints in your VPC. If set toCUSTOMER
, you must create, and manage, the VPC endpoints for your VPC. If you choose to create an environment in a shared VPC, you must set this value toCUSTOMER
. In a shared VPC deployment, the environment will remain inPENDING
status until you create the VPC endpoints. If you do not take action to create the endpoints within 72 hours, the status will change toCREATE_FAILED
. You can delete the failed environment and create a new one.min_webservers(i32)
/set_min_webservers(Option<i32>)
:
required: falseThe minimum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for
MaxWebservers
when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set inMinxWebserers
.Valid values: For environments larger than mw1.micro, accepts values from
2
to5
. Defaults to2
for all environment sizes except mw1.micro, which defaults to1
.max_webservers(i32)
/set_max_webservers(Option<i32>)
:
required: falseThe maximum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for
MaxWebservers
when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set inMaxWebserers
. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set inMinxWebserers
.Valid values: For environments larger than mw1.micro, accepts values from
2
to5
. Defaults to2
for all environment sizes except mw1.micro, which defaults to1
.
- On success, responds with
CreateEnvironmentOutput
with field(s):arn(Option<String>)
:The Amazon Resource Name (ARN) returned in the response for the environment.
- On failure, responds with
SdkError<CreateEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn create_web_login_token(&self) -> CreateWebLoginTokenFluentBuilder
pub fn create_web_login_token(&self) -> CreateWebLoginTokenFluentBuilder
Constructs a fluent builder for the CreateWebLoginToken
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the Amazon MWAA environment. For example,
MyMWAAEnvironment
.
- On success, responds with
CreateWebLoginTokenOutput
with field(s):web_token(Option<String>)
:An Airflow web server login token.
web_server_hostname(Option<String>)
:The Airflow web server hostname for the environment.
iam_identity(Option<String>)
:The name of the IAM identity creating the web login token. This might be an IAM user, or an assumed or federated identity. For example,
assumed-role/Admin/your-name
.airflow_identity(Option<String>)
:The user name of the Apache Airflow identity creating the web login token.
- On failure, responds with
SdkError<CreateWebLoginTokenError>
Source§impl Client
impl Client
Sourcepub fn delete_environment(&self) -> DeleteEnvironmentFluentBuilder
pub fn delete_environment(&self) -> DeleteEnvironmentFluentBuilder
Constructs a fluent builder for the DeleteEnvironment
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the Amazon MWAA environment. For example,
MyMWAAEnvironment
.
- On success, responds with
DeleteEnvironmentOutput
- On failure, responds with
SdkError<DeleteEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn get_environment(&self) -> GetEnvironmentFluentBuilder
pub fn get_environment(&self) -> GetEnvironmentFluentBuilder
Constructs a fluent builder for the GetEnvironment
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the Amazon MWAA environment. For example,
MyMWAAEnvironment
.
- On success, responds with
GetEnvironmentOutput
with field(s):environment(Option<Environment>)
:An object containing all available details about the environment.
- On failure, responds with
SdkError<GetEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn invoke_rest_api(&self) -> InvokeRestApiFluentBuilder
pub fn invoke_rest_api(&self) -> InvokeRestApiFluentBuilder
Constructs a fluent builder for the InvokeRestApi
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of the Amazon MWAA environment. For example,
MyMWAAEnvironment
.path(impl Into<String>)
/set_path(Option<String>)
:
required: trueThe Apache Airflow REST API endpoint path to be called. For example,
/dags/123456/clearTaskInstances
. For more information, see Apache Airflow APImethod(RestApiMethod)
/set_method(Option<RestApiMethod>)
:
required: trueThe HTTP method used for making Airflow REST API calls. For example,
POST
.query_parameters(Document)
/set_query_parameters(Option<Document>)
:
required: falseQuery parameters to be included in the Apache Airflow REST API call, provided as a JSON object.
body(Document)
/set_body(Option<Document>)
:
required: falseThe request body for the Apache Airflow REST API call, provided as a JSON object.
- On success, responds with
InvokeRestApiOutput
with field(s):rest_api_status_code(Option<i32>)
:The HTTP status code returned by the Apache Airflow REST API call.
rest_api_response(Option<Document>)
:The response data from the Apache Airflow REST API call, provided as a JSON object.
- On failure, responds with
SdkError<InvokeRestApiError>
Source§impl Client
impl Client
Sourcepub fn list_environments(&self) -> ListEnvironmentsFluentBuilder
pub fn list_environments(&self) -> ListEnvironmentsFluentBuilder
Constructs a fluent builder for the ListEnvironments
operation.
This operation supports pagination; See into_paginator()
.
- The fluent builder is configurable:
next_token(impl Into<String>)
/set_next_token(Option<String>)
:
required: falseRetrieves the next page of the results.
max_results(i32)
/set_max_results(Option<i32>)
:
required: falseThe maximum number of results to retrieve per page. For example,
5
environments per page.
- On success, responds with
ListEnvironmentsOutput
with field(s):environments(Vec::<String>)
:Returns a list of Amazon MWAA environments.
next_token(Option<String>)
:Retrieves the next page of the results.
- On failure, responds with
SdkError<ListEnvironmentsError>
Source§impl Client
impl Client
Constructs a fluent builder for the ListTagsForResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Amazon MWAA environment. For example,
arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment
.
- On success, responds with
ListTagsForResourceOutput
with field(s):tags(Option<HashMap::<String, String>>)
:The key-value tag pairs associated to your environment. For more information, see Tagging Amazon Web Services resources.
- On failure, responds with
SdkError<ListTagsForResourceError>
Source§impl Client
impl Client
Sourcepub fn publish_metrics(&self) -> PublishMetricsFluentBuilder
👎Deprecated: This API is for internal use and not meant for public use, and is no longer available.
pub fn publish_metrics(&self) -> PublishMetricsFluentBuilder
Constructs a fluent builder for the PublishMetrics
operation.
- The fluent builder is configurable:
environment_name(impl Into<String>)
/set_environment_name(Option<String>)
:
required: trueInternal only. The name of the environment.
metric_data(MetricDatum)
/set_metric_data(Option<Vec::<MetricDatum>>)
:
required: trueInternal only. Publishes metrics to Amazon CloudWatch. To learn more about the metrics published to Amazon CloudWatch, see Amazon MWAA performance metrics in Amazon CloudWatch.
- On success, responds with
PublishMetricsOutput
- On failure, responds with
SdkError<PublishMetricsError>
Source§impl Client
impl Client
Sourcepub fn tag_resource(&self) -> TagResourceFluentBuilder
pub fn tag_resource(&self) -> TagResourceFluentBuilder
Constructs a fluent builder for the TagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Amazon MWAA environment. For example,
arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment
.tags(impl Into<String>, impl Into<String>)
/set_tags(Option<HashMap::<String, String>>)
:
required: trueThe key-value tag pairs you want to associate to your environment. For example,
“Environment”: “Staging”
. For more information, see Tagging Amazon Web Services resources.
- On success, responds with
TagResourceOutput
- On failure, responds with
SdkError<TagResourceError>
Source§impl Client
impl Client
Sourcepub fn untag_resource(&self) -> UntagResourceFluentBuilder
pub fn untag_resource(&self) -> UntagResourceFluentBuilder
Constructs a fluent builder for the UntagResource
operation.
- The fluent builder is configurable:
resource_arn(impl Into<String>)
/set_resource_arn(Option<String>)
:
required: trueThe Amazon Resource Name (ARN) of the Amazon MWAA environment. For example,
arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment
.tag_keys(impl Into<String>)
/set_tag_keys(Option<Vec::<String>>)
:
required: trueThe key-value tag pair you want to remove. For example,
“Environment”: “Staging”
.
- On success, responds with
UntagResourceOutput
- On failure, responds with
SdkError<UntagResourceError>
Source§impl Client
impl Client
Sourcepub fn update_environment(&self) -> UpdateEnvironmentFluentBuilder
pub fn update_environment(&self) -> UpdateEnvironmentFluentBuilder
Constructs a fluent builder for the UpdateEnvironment
operation.
- The fluent builder is configurable:
name(impl Into<String>)
/set_name(Option<String>)
:
required: trueThe name of your Amazon MWAA environment. For example,
MyMWAAEnvironment
.execution_role_arn(impl Into<String>)
/set_execution_role_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access Amazon Web Services resources in your environment. For example,
arn:aws:iam::123456789:role/my-execution-role
. For more information, see Amazon MWAA Execution role.airflow_configuration_options(impl Into<String>, impl Into<String>)
/set_airflow_configuration_options(Option<HashMap::<String, String>>)
:
required: falseA list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, see Apache Airflow configuration options.
airflow_version(impl Into<String>)
/set_airflow_version(Option<String>)
:
required: falseThe Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.
Before you upgrade an environment, make sure your requirements, DAGs, plugins, and other resources used in your workflows are compatible with the new Apache Airflow version. For more information about updating your resources, see Upgrading an Amazon MWAA environment.
Valid values:
1.10.12
,2.0.2
,2.2.2
,2.4.3
,2.5.1
,2.6.3
,2.7.2
,2.8.1
,2.9.2
,2.10.1
, and2.10.3
.dag_s3_path(impl Into<String>)
/set_dag_s3_path(Option<String>)
:
required: falseThe relative path to the DAGs folder on your Amazon S3 bucket. For example,
dags
. For more information, see Adding or updating DAGs.environment_class(impl Into<String>)
/set_environment_class(Option<String>)
:
required: falseThe environment class type. Valid values:
mw1.micro
,mw1.small
,mw1.medium
,mw1.large
,mw1.xlarge
, andmw1.2xlarge
. For more information, see Amazon MWAA environment class.logging_configuration(LoggingConfigurationInput)
/set_logging_configuration(Option<LoggingConfigurationInput>)
:
required: falseThe Apache Airflow log types to send to CloudWatch Logs.
max_workers(i32)
/set_max_workers(Option<i32>)
:
required: falseThe maximum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the
MaxWorkers
field. For example,20
. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the one worker that is included with your environment, or the number you specify inMinWorkers
.min_workers(i32)
/set_min_workers(Option<i32>)
:
required: falseThe minimum number of workers that you want to run in your environment. MWAA scales the number of Apache Airflow workers up to the number you specify in the
MaxWorkers
field. When there are no more tasks running, and no more in the queue, MWAA disposes of the extra workers leaving the worker count you specify in theMinWorkers
field. For example,2
.max_webservers(i32)
/set_max_webservers(Option<i32>)
:
required: falseThe maximum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for
MaxWebservers
when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. For example, in scenarios where your workload requires network calls to the Apache Airflow REST API with a high transaction-per-second (TPS) rate, Amazon MWAA will increase the number of web servers up to the number set inMaxWebserers
. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set inMinxWebserers
.Valid values: For environments larger than mw1.micro, accepts values from
2
to5
. Defaults to2
for all environment sizes except mw1.micro, which defaults to1
.min_webservers(i32)
/set_min_webservers(Option<i32>)
:
required: falseThe minimum number of web servers that you want to run in your environment. Amazon MWAA scales the number of Apache Airflow web servers up to the number you specify for
MaxWebservers
when you interact with your Apache Airflow environment using Apache Airflow REST API, or the Apache Airflow CLI. As the transaction-per-second rate, and the network load, decrease, Amazon MWAA disposes of the additional web servers, and scales down to the number set inMinxWebserers
.Valid values: For environments larger than mw1.micro, accepts values from
2
to5
. Defaults to2
for all environment sizes except mw1.micro, which defaults to1
.worker_replacement_strategy(WorkerReplacementStrategy)
/set_worker_replacement_strategy(Option<WorkerReplacementStrategy>)
:
required: falseThe worker replacement strategy to use when updating the environment.
You can select one of the following strategies:
-
Forced - Stops and replaces Apache Airflow workers without waiting for tasks to complete before an update.
-
Graceful - Allows Apache Airflow workers to complete running tasks for up to 12 hours during an update before they’re stopped and replaced.
-
network_configuration(UpdateNetworkConfigurationInput)
/set_network_configuration(Option<UpdateNetworkConfigurationInput>)
:
required: falseThe VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see About networking on Amazon MWAA.
plugins_s3_path(impl Into<String>)
/set_plugins_s3_path(Option<String>)
:
required: falseThe relative path to the
plugins.zip
file on your Amazon S3 bucket. For example,plugins.zip
. If specified, then the plugins.zip version is required. For more information, see Installing custom plugins.plugins_s3_object_version(impl Into<String>)
/set_plugins_s3_object_version(Option<String>)
:
required: falseThe version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a
plugins.zip
file is updated. For more information, see How S3 Versioning works.requirements_s3_path(impl Into<String>)
/set_requirements_s3_path(Option<String>)
:
required: falseThe relative path to the
requirements.txt
file on your Amazon S3 bucket. For example,requirements.txt
. If specified, then a file version is required. For more information, see Installing Python dependencies.requirements_s3_object_version(impl Into<String>)
/set_requirements_s3_object_version(Option<String>)
:
required: falseThe version of the requirements.txt file on your Amazon S3 bucket. You must specify a version each time a
requirements.txt
file is updated. For more information, see How S3 Versioning works.schedulers(i32)
/set_schedulers(Option<i32>)
:
required: falseThe number of Apache Airflow schedulers to run in your Amazon MWAA environment.
source_bucket_arn(impl Into<String>)
/set_source_bucket_arn(Option<String>)
:
required: falseThe Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example,
arn:aws:s3:::my-airflow-bucket-unique-name
. For more information, see Create an Amazon S3 bucket for Amazon MWAA.startup_script_s3_path(impl Into<String>)
/set_startup_script_s3_path(Option<String>)
:
required: falseThe relative path to the startup shell script in your Amazon S3 bucket. For example,
s3://mwaa-environment/startup.sh
.Amazon MWAA runs the script as your environment starts, and before running the Apache Airflow process. You can use this script to install dependencies, modify Apache Airflow configuration options, and set environment variables. For more information, see Using a startup script.
startup_script_s3_object_version(impl Into<String>)
/set_startup_script_s3_object_version(Option<String>)
:
required: falseThe version of the startup shell script in your Amazon S3 bucket. You must specify the version ID that Amazon S3 assigns to the file every time you update the script.
Version IDs are Unicode, UTF-8 encoded, URL-ready, opaque strings that are no more than 1,024 bytes long. The following is an example:
3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo
For more information, see Using a startup script.
webserver_access_mode(WebserverAccessMode)
/set_webserver_access_mode(Option<WebserverAccessMode>)
:
required: falseThe Apache Airflow Web server access mode. For more information, see Apache Airflow access modes.
weekly_maintenance_window_start(impl Into<String>)
/set_weekly_maintenance_window_start(Option<String>)
:
required: falseThe day and time of the week in Coordinated Universal Time (UTC) 24-hour standard time to start weekly maintenance updates of your environment in the following format:
DAY:HH:MM
. For example:TUE:03:30
. You can specify a start time in 30 minute increments only.
- On success, responds with
UpdateEnvironmentOutput
with field(s):arn(Option<String>)
:The Amazon Resource Name (ARN) of the Amazon MWAA environment. For example,
arn:aws:airflow:us-east-1:123456789012:environment/MyMWAAEnvironment
.
- On failure, responds with
SdkError<UpdateEnvironmentError>
Source§impl Client
impl Client
Sourcepub fn from_conf(conf: Config) -> Self
pub fn from_conf(conf: Config) -> Self
Creates a new client from the service Config
.
§Panics
This method will panic in the following cases:
- Retries or timeouts are enabled without a
sleep_impl
configured. - Identity caching is enabled without a
sleep_impl
andtime_source
configured. - No
behavior_version
is provided.
The panic message for each of these will have instructions on how to resolve them.
Source§impl Client
impl Client
Sourcepub fn new(sdk_config: &SdkConfig) -> Self
pub fn new(sdk_config: &SdkConfig) -> Self
Creates a new client from an SDK Config.
§Panics
- This method will panic if the
sdk_config
is missing an async sleep implementation. If you experience this panic, set thesleep_impl
on the Config passed into this function to fix it. - This method will panic if the
sdk_config
is missing an HTTP connector. If you experience this panic, set thehttp_connector
on the Config passed into this function to fix it. - This method will panic if no
BehaviorVersion
is provided. If you experience this panic, setbehavior_version
on the Config or enable thebehavior-version-latest
Cargo feature.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Client
impl !RefUnwindSafe for Client
impl Send for Client
impl Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Paint for Twhere
T: ?Sized,
impl<T> Paint for Twhere
T: ?Sized,
Source§fn fg(&self, value: Color) -> Painted<&T>
fn fg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the foreground set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like red()
and
green()
, which have the same functionality but are
pithier.
§Example
Set foreground color to white using fg()
:
use yansi::{Paint, Color};
painted.fg(Color::White);
Set foreground color to white using white()
.
use yansi::Paint;
painted.white();
Source§fn bright_black(&self) -> Painted<&T>
fn bright_black(&self) -> Painted<&T>
Source§fn bright_red(&self) -> Painted<&T>
fn bright_red(&self) -> Painted<&T>
Source§fn bright_green(&self) -> Painted<&T>
fn bright_green(&self) -> Painted<&T>
Source§fn bright_yellow(&self) -> Painted<&T>
fn bright_yellow(&self) -> Painted<&T>
Source§fn bright_blue(&self) -> Painted<&T>
fn bright_blue(&self) -> Painted<&T>
Source§fn bright_magenta(&self) -> Painted<&T>
fn bright_magenta(&self) -> Painted<&T>
Source§fn bright_cyan(&self) -> Painted<&T>
fn bright_cyan(&self) -> Painted<&T>
Source§fn bright_white(&self) -> Painted<&T>
fn bright_white(&self) -> Painted<&T>
Source§fn bg(&self, value: Color) -> Painted<&T>
fn bg(&self, value: Color) -> Painted<&T>
Returns a styled value derived from self
with the background set to
value
.
This method should be used rarely. Instead, prefer to use color-specific
builder methods like on_red()
and
on_green()
, which have the same functionality but
are pithier.
§Example
Set background color to red using fg()
:
use yansi::{Paint, Color};
painted.bg(Color::Red);
Set background color to red using on_red()
.
use yansi::Paint;
painted.on_red();
Source§fn on_primary(&self) -> Painted<&T>
fn on_primary(&self) -> Painted<&T>
Source§fn on_magenta(&self) -> Painted<&T>
fn on_magenta(&self) -> Painted<&T>
Source§fn on_bright_black(&self) -> Painted<&T>
fn on_bright_black(&self) -> Painted<&T>
Source§fn on_bright_red(&self) -> Painted<&T>
fn on_bright_red(&self) -> Painted<&T>
Source§fn on_bright_green(&self) -> Painted<&T>
fn on_bright_green(&self) -> Painted<&T>
Source§fn on_bright_yellow(&self) -> Painted<&T>
fn on_bright_yellow(&self) -> Painted<&T>
Source§fn on_bright_blue(&self) -> Painted<&T>
fn on_bright_blue(&self) -> Painted<&T>
Source§fn on_bright_magenta(&self) -> Painted<&T>
fn on_bright_magenta(&self) -> Painted<&T>
Source§fn on_bright_cyan(&self) -> Painted<&T>
fn on_bright_cyan(&self) -> Painted<&T>
Source§fn on_bright_white(&self) -> Painted<&T>
fn on_bright_white(&self) -> Painted<&T>
Source§fn attr(&self, value: Attribute) -> Painted<&T>
fn attr(&self, value: Attribute) -> Painted<&T>
Enables the styling Attribute
value
.
This method should be used rarely. Instead, prefer to use
attribute-specific builder methods like bold()
and
underline()
, which have the same functionality
but are pithier.
§Example
Make text bold using attr()
:
use yansi::{Paint, Attribute};
painted.attr(Attribute::Bold);
Make text bold using using bold()
.
use yansi::Paint;
painted.bold();
Source§fn rapid_blink(&self) -> Painted<&T>
fn rapid_blink(&self) -> Painted<&T>
Source§fn quirk(&self, value: Quirk) -> Painted<&T>
fn quirk(&self, value: Quirk) -> Painted<&T>
Enables the yansi
Quirk
value
.
This method should be used rarely. Instead, prefer to use quirk-specific
builder methods like mask()
and
wrap()
, which have the same functionality but are
pithier.
§Example
Enable wrapping using .quirk()
:
use yansi::{Paint, Quirk};
painted.quirk(Quirk::Wrap);
Enable wrapping using wrap()
.
use yansi::Paint;
painted.wrap();
Source§fn clear(&self) -> Painted<&T>
👎Deprecated since 1.0.1: renamed to resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.
fn clear(&self) -> Painted<&T>
resetting()
due to conflicts with Vec::clear()
.
The clear()
method will be removed in a future release.Source§fn whenever(&self, value: Condition) -> Painted<&T>
fn whenever(&self, value: Condition) -> Painted<&T>
Conditionally enable styling based on whether the Condition
value
applies. Replaces any previous condition.
See the crate level docs for more details.
§Example
Enable styling painted
only when both stdout
and stderr
are TTYs:
use yansi::{Paint, Condition};
painted.red().on_yellow().whenever(Condition::STDOUTERR_ARE_TTY);