aws_sdk_mwaa/operation/update_environment/builders.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_environment::_update_environment_output::UpdateEnvironmentOutputBuilder;
3
4pub use crate::operation::update_environment::_update_environment_input::UpdateEnvironmentInputBuilder;
5
6impl crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder {
7 /// Sends a request with this input using the given client.
8 pub async fn send_with(
9 self,
10 client: &crate::Client,
11 ) -> ::std::result::Result<
12 crate::operation::update_environment::UpdateEnvironmentOutput,
13 ::aws_smithy_runtime_api::client::result::SdkError<
14 crate::operation::update_environment::UpdateEnvironmentError,
15 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16 >,
17 > {
18 let mut fluent_builder = client.update_environment();
19 fluent_builder.inner = self;
20 fluent_builder.send().await
21 }
22}
23/// Fluent builder constructing a request to `UpdateEnvironment`.
24///
25/// <p>Updates an Amazon Managed Workflows for Apache Airflow (MWAA) environment.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct UpdateEnvironmentFluentBuilder {
28 handle: ::std::sync::Arc<crate::client::Handle>,
29 inner: crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder,
30 config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33 crate::client::customize::internal::CustomizableSend<
34 crate::operation::update_environment::UpdateEnvironmentOutput,
35 crate::operation::update_environment::UpdateEnvironmentError,
36 > for UpdateEnvironmentFluentBuilder
37{
38 fn send(
39 self,
40 config_override: crate::config::Builder,
41 ) -> crate::client::customize::internal::BoxFuture<
42 crate::client::customize::internal::SendResult<
43 crate::operation::update_environment::UpdateEnvironmentOutput,
44 crate::operation::update_environment::UpdateEnvironmentError,
45 >,
46 > {
47 ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48 }
49}
50impl UpdateEnvironmentFluentBuilder {
51 /// Creates a new `UpdateEnvironmentFluentBuilder`.
52 pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
53 Self {
54 handle,
55 inner: ::std::default::Default::default(),
56 config_override: ::std::option::Option::None,
57 }
58 }
59 /// Access the UpdateEnvironment as a reference.
60 pub fn as_input(&self) -> &crate::operation::update_environment::builders::UpdateEnvironmentInputBuilder {
61 &self.inner
62 }
63 /// Sends the request and returns the response.
64 ///
65 /// If an error occurs, an `SdkError` will be returned with additional details that
66 /// can be matched against.
67 ///
68 /// By default, any retryable failures will be retried twice. Retry behavior
69 /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
70 /// set when configuring the client.
71 pub async fn send(
72 self,
73 ) -> ::std::result::Result<
74 crate::operation::update_environment::UpdateEnvironmentOutput,
75 ::aws_smithy_runtime_api::client::result::SdkError<
76 crate::operation::update_environment::UpdateEnvironmentError,
77 ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
78 >,
79 > {
80 let input = self
81 .inner
82 .build()
83 .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
84 let runtime_plugins = crate::operation::update_environment::UpdateEnvironment::operation_runtime_plugins(
85 self.handle.runtime_plugins.clone(),
86 &self.handle.conf,
87 self.config_override,
88 );
89 crate::operation::update_environment::UpdateEnvironment::orchestrate(&runtime_plugins, input).await
90 }
91
92 /// Consumes this builder, creating a customizable operation that can be modified before being sent.
93 pub fn customize(
94 self,
95 ) -> crate::client::customize::CustomizableOperation<
96 crate::operation::update_environment::UpdateEnvironmentOutput,
97 crate::operation::update_environment::UpdateEnvironmentError,
98 Self,
99 > {
100 crate::client::customize::CustomizableOperation::new(self)
101 }
102 pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
103 self.set_config_override(::std::option::Option::Some(config_override.into()));
104 self
105 }
106
107 pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
108 self.config_override = config_override;
109 self
110 }
111 /// <p>The name of your Amazon MWAA environment. For example, <code>MyMWAAEnvironment</code>.</p>
112 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113 self.inner = self.inner.name(input.into());
114 self
115 }
116 /// <p>The name of your Amazon MWAA environment. For example, <code>MyMWAAEnvironment</code>.</p>
117 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118 self.inner = self.inner.set_name(input);
119 self
120 }
121 /// <p>The name of your Amazon MWAA environment. For example, <code>MyMWAAEnvironment</code>.</p>
122 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
123 self.inner.get_name()
124 }
125 /// <p>The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access Amazon Web Services resources in your environment. For example, <code>arn:aws:iam::123456789:role/my-execution-role</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html">Amazon MWAA Execution role</a>.</p>
126 pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
127 self.inner = self.inner.execution_role_arn(input.into());
128 self
129 }
130 /// <p>The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access Amazon Web Services resources in your environment. For example, <code>arn:aws:iam::123456789:role/my-execution-role</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html">Amazon MWAA Execution role</a>.</p>
131 pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
132 self.inner = self.inner.set_execution_role_arn(input);
133 self
134 }
135 /// <p>The Amazon Resource Name (ARN) of the execution role in IAM that allows MWAA to access Amazon Web Services resources in your environment. For example, <code>arn:aws:iam::123456789:role/my-execution-role</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-create-role.html">Amazon MWAA Execution role</a>.</p>
136 pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
137 self.inner.get_execution_role_arn()
138 }
139 ///
140 /// Adds a key-value pair to `AirflowConfigurationOptions`.
141 ///
142 /// To override the contents of this collection use [`set_airflow_configuration_options`](Self::set_airflow_configuration_options).
143 ///
144 /// <p>A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html">Apache Airflow configuration options</a>.</p>
145 pub fn airflow_configuration_options(
146 mut self,
147 k: impl ::std::convert::Into<::std::string::String>,
148 v: impl ::std::convert::Into<::std::string::String>,
149 ) -> Self {
150 self.inner = self.inner.airflow_configuration_options(k.into(), v.into());
151 self
152 }
153 /// <p>A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html">Apache Airflow configuration options</a>.</p>
154 pub fn set_airflow_configuration_options(
155 mut self,
156 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
157 ) -> Self {
158 self.inner = self.inner.set_airflow_configuration_options(input);
159 self
160 }
161 /// <p>A list of key-value pairs containing the Apache Airflow configuration options you want to attach to your environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-env-variables.html">Apache Airflow configuration options</a>.</p>
162 pub fn get_airflow_configuration_options(
163 &self,
164 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
165 self.inner.get_airflow_configuration_options()
166 }
167 /// <p>The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.</p>
168 /// <p>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 <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/upgrading-environment.html">Upgrading an Amazon MWAA environment</a>.</p>
169 /// <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>, <code>2.8.1</code>, <code>2.9.2</code>, <code>2.10.1</code>, and <code>2.10.3</code>.</p>
170 pub fn airflow_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
171 self.inner = self.inner.airflow_version(input.into());
172 self
173 }
174 /// <p>The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.</p>
175 /// <p>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 <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/upgrading-environment.html">Upgrading an Amazon MWAA environment</a>.</p>
176 /// <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>, <code>2.8.1</code>, <code>2.9.2</code>, <code>2.10.1</code>, and <code>2.10.3</code>.</p>
177 pub fn set_airflow_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
178 self.inner = self.inner.set_airflow_version(input);
179 self
180 }
181 /// <p>The Apache Airflow version for your environment. To upgrade your environment, specify a newer version of Apache Airflow supported by Amazon MWAA.</p>
182 /// <p>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 <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/upgrading-environment.html">Upgrading an Amazon MWAA environment</a>.</p>
183 /// <p>Valid values: <code>1.10.12</code>, <code>2.0.2</code>, <code>2.2.2</code>, <code>2.4.3</code>, <code>2.5.1</code>, <code>2.6.3</code>, <code>2.7.2</code>, <code>2.8.1</code>, <code>2.9.2</code>, <code>2.10.1</code>, and <code>2.10.3</code>.</p>
184 pub fn get_airflow_version(&self) -> &::std::option::Option<::std::string::String> {
185 self.inner.get_airflow_version()
186 }
187 /// <p>The relative path to the DAGs folder on your Amazon S3 bucket. For example, <code>dags</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html">Adding or updating DAGs</a>.</p>
188 pub fn dag_s3_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
189 self.inner = self.inner.dag_s3_path(input.into());
190 self
191 }
192 /// <p>The relative path to the DAGs folder on your Amazon S3 bucket. For example, <code>dags</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html">Adding or updating DAGs</a>.</p>
193 pub fn set_dag_s3_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
194 self.inner = self.inner.set_dag_s3_path(input);
195 self
196 }
197 /// <p>The relative path to the DAGs folder on your Amazon S3 bucket. For example, <code>dags</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-folder.html">Adding or updating DAGs</a>.</p>
198 pub fn get_dag_s3_path(&self) -> &::std::option::Option<::std::string::String> {
199 self.inner.get_dag_s3_path()
200 }
201 /// <p>The environment class type. Valid values: <code>mw1.micro</code>, <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>, <code>mw1.xlarge</code>, and <code>mw1.2xlarge</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p>
202 pub fn environment_class(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
203 self.inner = self.inner.environment_class(input.into());
204 self
205 }
206 /// <p>The environment class type. Valid values: <code>mw1.micro</code>, <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>, <code>mw1.xlarge</code>, and <code>mw1.2xlarge</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p>
207 pub fn set_environment_class(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
208 self.inner = self.inner.set_environment_class(input);
209 self
210 }
211 /// <p>The environment class type. Valid values: <code>mw1.micro</code>, <code>mw1.small</code>, <code>mw1.medium</code>, <code>mw1.large</code>, <code>mw1.xlarge</code>, and <code>mw1.2xlarge</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/environment-class.html">Amazon MWAA environment class</a>.</p>
212 pub fn get_environment_class(&self) -> &::std::option::Option<::std::string::String> {
213 self.inner.get_environment_class()
214 }
215 /// <p>The Apache Airflow log types to send to CloudWatch Logs.</p>
216 pub fn logging_configuration(mut self, input: crate::types::LoggingConfigurationInput) -> Self {
217 self.inner = self.inner.logging_configuration(input);
218 self
219 }
220 /// <p>The Apache Airflow log types to send to CloudWatch Logs.</p>
221 pub fn set_logging_configuration(mut self, input: ::std::option::Option<crate::types::LoggingConfigurationInput>) -> Self {
222 self.inner = self.inner.set_logging_configuration(input);
223 self
224 }
225 /// <p>The Apache Airflow log types to send to CloudWatch Logs.</p>
226 pub fn get_logging_configuration(&self) -> &::std::option::Option<crate::types::LoggingConfigurationInput> {
227 self.inner.get_logging_configuration()
228 }
229 /// <p>The 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 <code>MaxWorkers</code> field. For example, <code>20</code>. 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 in <code>MinWorkers</code>.</p>
230 pub fn max_workers(mut self, input: i32) -> Self {
231 self.inner = self.inner.max_workers(input);
232 self
233 }
234 /// <p>The 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 <code>MaxWorkers</code> field. For example, <code>20</code>. 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 in <code>MinWorkers</code>.</p>
235 pub fn set_max_workers(mut self, input: ::std::option::Option<i32>) -> Self {
236 self.inner = self.inner.set_max_workers(input);
237 self
238 }
239 /// <p>The 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 <code>MaxWorkers</code> field. For example, <code>20</code>. 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 in <code>MinWorkers</code>.</p>
240 pub fn get_max_workers(&self) -> &::std::option::Option<i32> {
241 self.inner.get_max_workers()
242 }
243 /// <p>The 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 <code>MaxWorkers</code> 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 the <code>MinWorkers</code> field. For example, <code>2</code>.</p>
244 pub fn min_workers(mut self, input: i32) -> Self {
245 self.inner = self.inner.min_workers(input);
246 self
247 }
248 /// <p>The 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 <code>MaxWorkers</code> 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 the <code>MinWorkers</code> field. For example, <code>2</code>.</p>
249 pub fn set_min_workers(mut self, input: ::std::option::Option<i32>) -> Self {
250 self.inner = self.inner.set_min_workers(input);
251 self
252 }
253 /// <p>The 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 <code>MaxWorkers</code> 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 the <code>MinWorkers</code> field. For example, <code>2</code>.</p>
254 pub fn get_min_workers(&self) -> &::std::option::Option<i32> {
255 self.inner.get_min_workers()
256 }
257 /// <p>The 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 <code>MaxWebservers</code> 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 in <code>MaxWebserers</code>. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.</p>
258 /// <p>Valid values: For environments larger than mw1.micro, accepts values from <code>2</code> to <code>5</code>. Defaults to <code>2</code> for all environment sizes except mw1.micro, which defaults to <code>1</code>.</p>
259 pub fn max_webservers(mut self, input: i32) -> Self {
260 self.inner = self.inner.max_webservers(input);
261 self
262 }
263 /// <p>The 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 <code>MaxWebservers</code> 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 in <code>MaxWebserers</code>. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.</p>
264 /// <p>Valid values: For environments larger than mw1.micro, accepts values from <code>2</code> to <code>5</code>. Defaults to <code>2</code> for all environment sizes except mw1.micro, which defaults to <code>1</code>.</p>
265 pub fn set_max_webservers(mut self, input: ::std::option::Option<i32>) -> Self {
266 self.inner = self.inner.set_max_webservers(input);
267 self
268 }
269 /// <p>The 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 <code>MaxWebservers</code> 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 in <code>MaxWebserers</code>. As TPS rates decrease Amazon MWAA disposes of the additional web servers, and scales down to the number set in <code>MinxWebserers</code>.</p>
270 /// <p>Valid values: For environments larger than mw1.micro, accepts values from <code>2</code> to <code>5</code>. Defaults to <code>2</code> for all environment sizes except mw1.micro, which defaults to <code>1</code>.</p>
271 pub fn get_max_webservers(&self) -> &::std::option::Option<i32> {
272 self.inner.get_max_webservers()
273 }
274 /// <p>The 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 <code>MaxWebservers</code> 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 in <code>MinxWebserers</code>.</p>
275 /// <p>Valid values: For environments larger than mw1.micro, accepts values from <code>2</code> to <code>5</code>. Defaults to <code>2</code> for all environment sizes except mw1.micro, which defaults to <code>1</code>.</p>
276 pub fn min_webservers(mut self, input: i32) -> Self {
277 self.inner = self.inner.min_webservers(input);
278 self
279 }
280 /// <p>The 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 <code>MaxWebservers</code> 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 in <code>MinxWebserers</code>.</p>
281 /// <p>Valid values: For environments larger than mw1.micro, accepts values from <code>2</code> to <code>5</code>. Defaults to <code>2</code> for all environment sizes except mw1.micro, which defaults to <code>1</code>.</p>
282 pub fn set_min_webservers(mut self, input: ::std::option::Option<i32>) -> Self {
283 self.inner = self.inner.set_min_webservers(input);
284 self
285 }
286 /// <p>The 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 <code>MaxWebservers</code> 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 in <code>MinxWebserers</code>.</p>
287 /// <p>Valid values: For environments larger than mw1.micro, accepts values from <code>2</code> to <code>5</code>. Defaults to <code>2</code> for all environment sizes except mw1.micro, which defaults to <code>1</code>.</p>
288 pub fn get_min_webservers(&self) -> &::std::option::Option<i32> {
289 self.inner.get_min_webservers()
290 }
291 /// <p>The worker replacement strategy to use when updating the environment.</p>
292 /// <p>You can select one of the following strategies:</p>
293 /// <ul>
294 /// <li>
295 /// <p><b>Forced -</b> Stops and replaces Apache Airflow workers without waiting for tasks to complete before an update.</p></li>
296 /// <li>
297 /// <p><b>Graceful -</b> Allows Apache Airflow workers to complete running tasks for up to 12 hours during an update before they're stopped and replaced.</p></li>
298 /// </ul>
299 pub fn worker_replacement_strategy(mut self, input: crate::types::WorkerReplacementStrategy) -> Self {
300 self.inner = self.inner.worker_replacement_strategy(input);
301 self
302 }
303 /// <p>The worker replacement strategy to use when updating the environment.</p>
304 /// <p>You can select one of the following strategies:</p>
305 /// <ul>
306 /// <li>
307 /// <p><b>Forced -</b> Stops and replaces Apache Airflow workers without waiting for tasks to complete before an update.</p></li>
308 /// <li>
309 /// <p><b>Graceful -</b> Allows Apache Airflow workers to complete running tasks for up to 12 hours during an update before they're stopped and replaced.</p></li>
310 /// </ul>
311 pub fn set_worker_replacement_strategy(mut self, input: ::std::option::Option<crate::types::WorkerReplacementStrategy>) -> Self {
312 self.inner = self.inner.set_worker_replacement_strategy(input);
313 self
314 }
315 /// <p>The worker replacement strategy to use when updating the environment.</p>
316 /// <p>You can select one of the following strategies:</p>
317 /// <ul>
318 /// <li>
319 /// <p><b>Forced -</b> Stops and replaces Apache Airflow workers without waiting for tasks to complete before an update.</p></li>
320 /// <li>
321 /// <p><b>Graceful -</b> Allows Apache Airflow workers to complete running tasks for up to 12 hours during an update before they're stopped and replaced.</p></li>
322 /// </ul>
323 pub fn get_worker_replacement_strategy(&self) -> &::std::option::Option<crate::types::WorkerReplacementStrategy> {
324 self.inner.get_worker_replacement_strategy()
325 }
326 /// <p>The VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html">About networking on Amazon MWAA</a>.</p>
327 pub fn network_configuration(mut self, input: crate::types::UpdateNetworkConfigurationInput) -> Self {
328 self.inner = self.inner.network_configuration(input);
329 self
330 }
331 /// <p>The VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html">About networking on Amazon MWAA</a>.</p>
332 pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::UpdateNetworkConfigurationInput>) -> Self {
333 self.inner = self.inner.set_network_configuration(input);
334 self
335 }
336 /// <p>The VPC networking components used to secure and enable network traffic between the Amazon Web Services resources for your environment. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/networking-about.html">About networking on Amazon MWAA</a>.</p>
337 pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::UpdateNetworkConfigurationInput> {
338 self.inner.get_network_configuration()
339 }
340 /// <p>The relative path to the <code>plugins.zip</code> file on your Amazon S3 bucket. For example, <code>plugins.zip</code>. If specified, then the plugins.zip version is required. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html">Installing custom plugins</a>.</p>
341 pub fn plugins_s3_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
342 self.inner = self.inner.plugins_s3_path(input.into());
343 self
344 }
345 /// <p>The relative path to the <code>plugins.zip</code> file on your Amazon S3 bucket. For example, <code>plugins.zip</code>. If specified, then the plugins.zip version is required. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html">Installing custom plugins</a>.</p>
346 pub fn set_plugins_s3_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
347 self.inner = self.inner.set_plugins_s3_path(input);
348 self
349 }
350 /// <p>The relative path to the <code>plugins.zip</code> file on your Amazon S3 bucket. For example, <code>plugins.zip</code>. If specified, then the plugins.zip version is required. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-dag-import-plugins.html">Installing custom plugins</a>.</p>
351 pub fn get_plugins_s3_path(&self) -> &::std::option::Option<::std::string::String> {
352 self.inner.get_plugins_s3_path()
353 }
354 /// <p>The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a <code>plugins.zip</code> file is updated. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">How S3 Versioning works</a>.</p>
355 pub fn plugins_s3_object_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
356 self.inner = self.inner.plugins_s3_object_version(input.into());
357 self
358 }
359 /// <p>The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a <code>plugins.zip</code> file is updated. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">How S3 Versioning works</a>.</p>
360 pub fn set_plugins_s3_object_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
361 self.inner = self.inner.set_plugins_s3_object_version(input);
362 self
363 }
364 /// <p>The version of the plugins.zip file on your Amazon S3 bucket. You must specify a version each time a <code>plugins.zip</code> file is updated. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">How S3 Versioning works</a>.</p>
365 pub fn get_plugins_s3_object_version(&self) -> &::std::option::Option<::std::string::String> {
366 self.inner.get_plugins_s3_object_version()
367 }
368 /// <p>The relative path to the <code>requirements.txt</code> file on your Amazon S3 bucket. For example, <code>requirements.txt</code>. If specified, then a file version is required. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html">Installing Python dependencies</a>.</p>
369 pub fn requirements_s3_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
370 self.inner = self.inner.requirements_s3_path(input.into());
371 self
372 }
373 /// <p>The relative path to the <code>requirements.txt</code> file on your Amazon S3 bucket. For example, <code>requirements.txt</code>. If specified, then a file version is required. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html">Installing Python dependencies</a>.</p>
374 pub fn set_requirements_s3_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
375 self.inner = self.inner.set_requirements_s3_path(input);
376 self
377 }
378 /// <p>The relative path to the <code>requirements.txt</code> file on your Amazon S3 bucket. For example, <code>requirements.txt</code>. If specified, then a file version is required. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/working-dags-dependencies.html">Installing Python dependencies</a>.</p>
379 pub fn get_requirements_s3_path(&self) -> &::std::option::Option<::std::string::String> {
380 self.inner.get_requirements_s3_path()
381 }
382 /// <p>The version of the requirements.txt file on your Amazon S3 bucket. You must specify a version each time a <code>requirements.txt</code> file is updated. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">How S3 Versioning works</a>.</p>
383 pub fn requirements_s3_object_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
384 self.inner = self.inner.requirements_s3_object_version(input.into());
385 self
386 }
387 /// <p>The version of the requirements.txt file on your Amazon S3 bucket. You must specify a version each time a <code>requirements.txt</code> file is updated. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">How S3 Versioning works</a>.</p>
388 pub fn set_requirements_s3_object_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
389 self.inner = self.inner.set_requirements_s3_object_version(input);
390 self
391 }
392 /// <p>The version of the requirements.txt file on your Amazon S3 bucket. You must specify a version each time a <code>requirements.txt</code> file is updated. For more information, see <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">How S3 Versioning works</a>.</p>
393 pub fn get_requirements_s3_object_version(&self) -> &::std::option::Option<::std::string::String> {
394 self.inner.get_requirements_s3_object_version()
395 }
396 /// <p>The number of Apache Airflow schedulers to run in your Amazon MWAA environment.</p>
397 pub fn schedulers(mut self, input: i32) -> Self {
398 self.inner = self.inner.schedulers(input);
399 self
400 }
401 /// <p>The number of Apache Airflow schedulers to run in your Amazon MWAA environment.</p>
402 pub fn set_schedulers(mut self, input: ::std::option::Option<i32>) -> Self {
403 self.inner = self.inner.set_schedulers(input);
404 self
405 }
406 /// <p>The number of Apache Airflow schedulers to run in your Amazon MWAA environment.</p>
407 pub fn get_schedulers(&self) -> &::std::option::Option<i32> {
408 self.inner.get_schedulers()
409 }
410 /// <p>The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, <code>arn:aws:s3:::my-airflow-bucket-unique-name</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html">Create an Amazon S3 bucket for Amazon MWAA</a>.</p>
411 pub fn source_bucket_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
412 self.inner = self.inner.source_bucket_arn(input.into());
413 self
414 }
415 /// <p>The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, <code>arn:aws:s3:::my-airflow-bucket-unique-name</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html">Create an Amazon S3 bucket for Amazon MWAA</a>.</p>
416 pub fn set_source_bucket_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
417 self.inner = self.inner.set_source_bucket_arn(input);
418 self
419 }
420 /// <p>The Amazon Resource Name (ARN) of the Amazon S3 bucket where your DAG code and supporting files are stored. For example, <code>arn:aws:s3:::my-airflow-bucket-unique-name</code>. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/mwaa-s3-bucket.html">Create an Amazon S3 bucket for Amazon MWAA</a>.</p>
421 pub fn get_source_bucket_arn(&self) -> &::std::option::Option<::std::string::String> {
422 self.inner.get_source_bucket_arn()
423 }
424 /// <p>The relative path to the startup shell script in your Amazon S3 bucket. For example, <code>s3://mwaa-environment/startup.sh</code>.</p>
425 /// <p>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 <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html">Using a startup script</a>.</p>
426 pub fn startup_script_s3_path(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
427 self.inner = self.inner.startup_script_s3_path(input.into());
428 self
429 }
430 /// <p>The relative path to the startup shell script in your Amazon S3 bucket. For example, <code>s3://mwaa-environment/startup.sh</code>.</p>
431 /// <p>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 <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html">Using a startup script</a>.</p>
432 pub fn set_startup_script_s3_path(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
433 self.inner = self.inner.set_startup_script_s3_path(input);
434 self
435 }
436 /// <p>The relative path to the startup shell script in your Amazon S3 bucket. For example, <code>s3://mwaa-environment/startup.sh</code>.</p>
437 /// <p>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 <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html">Using a startup script</a>.</p>
438 pub fn get_startup_script_s3_path(&self) -> &::std::option::Option<::std::string::String> {
439 self.inner.get_startup_script_s3_path()
440 }
441 /// <p>The version of the startup shell script in your Amazon S3 bucket. You must specify the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">version ID</a> that Amazon S3 assigns to the file every time you update the script.</p>
442 /// <p>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:</p>
443 /// <p><code>3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo</code></p>
444 /// <p>For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html">Using a startup script</a>.</p>
445 pub fn startup_script_s3_object_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
446 self.inner = self.inner.startup_script_s3_object_version(input.into());
447 self
448 }
449 /// <p>The version of the startup shell script in your Amazon S3 bucket. You must specify the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">version ID</a> that Amazon S3 assigns to the file every time you update the script.</p>
450 /// <p>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:</p>
451 /// <p><code>3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo</code></p>
452 /// <p>For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html">Using a startup script</a>.</p>
453 pub fn set_startup_script_s3_object_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
454 self.inner = self.inner.set_startup_script_s3_object_version(input);
455 self
456 }
457 /// <p>The version of the startup shell script in your Amazon S3 bucket. You must specify the <a href="https://docs.aws.amazon.com/AmazonS3/latest/userguide/versioning-workflows.html">version ID</a> that Amazon S3 assigns to the file every time you update the script.</p>
458 /// <p>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:</p>
459 /// <p><code>3sL4kqtJlcpXroDTDmJ+rmSpXd3dIbrHY+MTRCxf3vjVBH40Nr8X8gdRQBpUMLUo</code></p>
460 /// <p>For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/using-startup-script.html">Using a startup script</a>.</p>
461 pub fn get_startup_script_s3_object_version(&self) -> &::std::option::Option<::std::string::String> {
462 self.inner.get_startup_script_s3_object_version()
463 }
464 /// <p>The Apache Airflow <i>Web server</i> access mode. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html">Apache Airflow access modes</a>.</p>
465 pub fn webserver_access_mode(mut self, input: crate::types::WebserverAccessMode) -> Self {
466 self.inner = self.inner.webserver_access_mode(input);
467 self
468 }
469 /// <p>The Apache Airflow <i>Web server</i> access mode. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html">Apache Airflow access modes</a>.</p>
470 pub fn set_webserver_access_mode(mut self, input: ::std::option::Option<crate::types::WebserverAccessMode>) -> Self {
471 self.inner = self.inner.set_webserver_access_mode(input);
472 self
473 }
474 /// <p>The Apache Airflow <i>Web server</i> access mode. For more information, see <a href="https://docs.aws.amazon.com/mwaa/latest/userguide/configuring-networking.html">Apache Airflow access modes</a>.</p>
475 pub fn get_webserver_access_mode(&self) -> &::std::option::Option<crate::types::WebserverAccessMode> {
476 self.inner.get_webserver_access_mode()
477 }
478 /// <p>The 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: <code>DAY:HH:MM</code>. For example: <code>TUE:03:30</code>. You can specify a start time in 30 minute increments only.</p>
479 pub fn weekly_maintenance_window_start(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
480 self.inner = self.inner.weekly_maintenance_window_start(input.into());
481 self
482 }
483 /// <p>The 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: <code>DAY:HH:MM</code>. For example: <code>TUE:03:30</code>. You can specify a start time in 30 minute increments only.</p>
484 pub fn set_weekly_maintenance_window_start(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
485 self.inner = self.inner.set_weekly_maintenance_window_start(input);
486 self
487 }
488 /// <p>The 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: <code>DAY:HH:MM</code>. For example: <code>TUE:03:30</code>. You can specify a start time in 30 minute increments only.</p>
489 pub fn get_weekly_maintenance_window_start(&self) -> &::std::option::Option<::std::string::String> {
490 self.inner.get_weekly_maintenance_window_start()
491 }
492}