aws_sdk_ssm/operation/register_task_with_maintenance_window/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::register_task_with_maintenance_window::_register_task_with_maintenance_window_output::RegisterTaskWithMaintenanceWindowOutputBuilder;
3
4pub use crate::operation::register_task_with_maintenance_window::_register_task_with_maintenance_window_input::RegisterTaskWithMaintenanceWindowInputBuilder;
5
6impl crate::operation::register_task_with_maintenance_window::builders::RegisterTaskWithMaintenanceWindowInputBuilder {
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::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.register_task_with_maintenance_window();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `RegisterTaskWithMaintenanceWindow`.
24///
25/// <p>Adds a new task to a maintenance window.</p>
26#[derive(::std::clone::Clone, ::std::fmt::Debug)]
27pub struct RegisterTaskWithMaintenanceWindowFluentBuilder {
28    handle: ::std::sync::Arc<crate::client::Handle>,
29    inner: crate::operation::register_task_with_maintenance_window::builders::RegisterTaskWithMaintenanceWindowInputBuilder,
30    config_override: ::std::option::Option<crate::config::Builder>,
31}
32impl
33    crate::client::customize::internal::CustomizableSend<
34        crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowOutput,
35        crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
36    > for RegisterTaskWithMaintenanceWindowFluentBuilder
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::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowOutput,
44            crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
45        >,
46    > {
47        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
48    }
49}
50impl RegisterTaskWithMaintenanceWindowFluentBuilder {
51    /// Creates a new `RegisterTaskWithMaintenanceWindowFluentBuilder`.
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 RegisterTaskWithMaintenanceWindow as a reference.
60    pub fn as_input(&self) -> &crate::operation::register_task_with_maintenance_window::builders::RegisterTaskWithMaintenanceWindowInputBuilder {
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::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowOutput,
75        ::aws_smithy_runtime_api::client::result::SdkError<
76            crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
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::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindow::operation_runtime_plugins(
85            self.handle.runtime_plugins.clone(),
86            &self.handle.conf,
87            self.config_override,
88        );
89        crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindow::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::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowOutput,
97        crate::operation::register_task_with_maintenance_window::RegisterTaskWithMaintenanceWindowError,
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 ID of the maintenance window the task should be added to.</p>
112    pub fn window_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
113        self.inner = self.inner.window_id(input.into());
114        self
115    }
116    /// <p>The ID of the maintenance window the task should be added to.</p>
117    pub fn set_window_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
118        self.inner = self.inner.set_window_id(input);
119        self
120    }
121    /// <p>The ID of the maintenance window the task should be added to.</p>
122    pub fn get_window_id(&self) -> &::std::option::Option<::std::string::String> {
123        self.inner.get_window_id()
124    }
125    ///
126    /// Appends an item to `Targets`.
127    ///
128    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
129    ///
130    /// <p>The targets (either managed nodes or maintenance window targets).</p><note>
131    /// <p>One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">Registering maintenance window tasks without targets</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
132    /// </note>
133    /// <p>Specify managed nodes using the following format:</p>
134    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
135    /// ,
136    /// <instance-id-2></instance-id-2>
137    /// </instance-id-1></code></p>
138    /// <p>Specify maintenance window targets using the following format:</p>
139    /// <p><code>Key=WindowTargetIds,Values=<window-target-id-1>
140    /// ,
141    /// <window-target-id-2></window-target-id-2>
142    /// </window-target-id-1></code></p>
143    pub fn targets(mut self, input: crate::types::Target) -> Self {
144        self.inner = self.inner.targets(input);
145        self
146    }
147    /// <p>The targets (either managed nodes or maintenance window targets).</p><note>
148    /// <p>One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">Registering maintenance window tasks without targets</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
149    /// </note>
150    /// <p>Specify managed nodes using the following format:</p>
151    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
152    /// ,
153    /// <instance-id-2></instance-id-2>
154    /// </instance-id-1></code></p>
155    /// <p>Specify maintenance window targets using the following format:</p>
156    /// <p><code>Key=WindowTargetIds,Values=<window-target-id-1>
157    /// ,
158    /// <window-target-id-2></window-target-id-2>
159    /// </window-target-id-1></code></p>
160    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
161        self.inner = self.inner.set_targets(input);
162        self
163    }
164    /// <p>The targets (either managed nodes or maintenance window targets).</p><note>
165    /// <p>One or more targets must be specified for maintenance window Run Command-type tasks. Depending on the task, targets are optional for other maintenance window task types (Automation, Lambda, and Step Functions). For more information about running tasks that don't specify targets, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">Registering maintenance window tasks without targets</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
166    /// </note>
167    /// <p>Specify managed nodes using the following format:</p>
168    /// <p><code>Key=InstanceIds,Values=<instance-id-1>
169    /// ,
170    /// <instance-id-2></instance-id-2>
171    /// </instance-id-1></code></p>
172    /// <p>Specify maintenance window targets using the following format:</p>
173    /// <p><code>Key=WindowTargetIds,Values=<window-target-id-1>
174    /// ,
175    /// <window-target-id-2></window-target-id-2>
176    /// </window-target-id-1></code></p>
177    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
178        self.inner.get_targets()
179    }
180    /// <p>The ARN of the task to run.</p>
181    pub fn task_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
182        self.inner = self.inner.task_arn(input.into());
183        self
184    }
185    /// <p>The ARN of the task to run.</p>
186    pub fn set_task_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
187        self.inner = self.inner.set_task_arn(input);
188        self
189    }
190    /// <p>The ARN of the task to run.</p>
191    pub fn get_task_arn(&self) -> &::std::option::Option<::std::string::String> {
192        self.inner.get_task_arn()
193    }
194    /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
195    /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
196    pub fn service_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
197        self.inner = self.inner.service_role_arn(input.into());
198        self
199    }
200    /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
201    /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
202    pub fn set_service_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
203        self.inner = self.inner.set_service_role_arn(input);
204        self
205    }
206    /// <p>The Amazon Resource Name (ARN) of the IAM service role for Amazon Web Services Systems Manager to assume when running a maintenance window task. If you do not specify a service role ARN, Systems Manager uses a service-linked role in your account. If no appropriate service-linked role for Systems Manager exists in your account, it is created when you run <code>RegisterTaskWithMaintenanceWindow</code>.</p>
207    /// <p>However, for an improved security posture, we strongly recommend creating a custom policy and custom service role for running your maintenance window tasks. The policy can be crafted to provide only the permissions needed for your particular maintenance window tasks. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-maintenance-permissions.html">Setting up Maintenance Windows</a> in the in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
208    pub fn get_service_role_arn(&self) -> &::std::option::Option<::std::string::String> {
209        self.inner.get_service_role_arn()
210    }
211    /// <p>The type of task being registered.</p>
212    pub fn task_type(mut self, input: crate::types::MaintenanceWindowTaskType) -> Self {
213        self.inner = self.inner.task_type(input);
214        self
215    }
216    /// <p>The type of task being registered.</p>
217    pub fn set_task_type(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowTaskType>) -> Self {
218        self.inner = self.inner.set_task_type(input);
219        self
220    }
221    /// <p>The type of task being registered.</p>
222    pub fn get_task_type(&self) -> &::std::option::Option<crate::types::MaintenanceWindowTaskType> {
223        self.inner.get_task_type()
224    }
225    ///
226    /// Adds a key-value pair to `TaskParameters`.
227    ///
228    /// To override the contents of this collection use [`set_task_parameters`](Self::set_task_parameters).
229    ///
230    /// <p>The parameters that should be passed to the task when it is run.</p><note>
231    /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
232    /// </note>
233    pub fn task_parameters(
234        mut self,
235        k: impl ::std::convert::Into<::std::string::String>,
236        v: crate::types::MaintenanceWindowTaskParameterValueExpression,
237    ) -> Self {
238        self.inner = self.inner.task_parameters(k.into(), v);
239        self
240    }
241    /// <p>The parameters that should be passed to the task when it is run.</p><note>
242    /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
243    /// </note>
244    pub fn set_task_parameters(
245        mut self,
246        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>>,
247    ) -> Self {
248        self.inner = self.inner.set_task_parameters(input);
249        self
250    }
251    /// <p>The parameters that should be passed to the task when it is run.</p><note>
252    /// <p><code>TaskParameters</code> has been deprecated. To specify parameters to pass to a task when it runs, instead use the <code>Parameters</code> option in the <code>TaskInvocationParameters</code> structure. For information about how Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
253    /// </note>
254    pub fn get_task_parameters(
255        &self,
256    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, crate::types::MaintenanceWindowTaskParameterValueExpression>> {
257        self.inner.get_task_parameters()
258    }
259    /// <p>The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.</p>
260    pub fn task_invocation_parameters(mut self, input: crate::types::MaintenanceWindowTaskInvocationParameters) -> Self {
261        self.inner = self.inner.task_invocation_parameters(input);
262        self
263    }
264    /// <p>The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.</p>
265    pub fn set_task_invocation_parameters(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowTaskInvocationParameters>) -> Self {
266        self.inner = self.inner.set_task_invocation_parameters(input);
267        self
268    }
269    /// <p>The parameters that the task should use during execution. Populate only the fields that match the task type. All other fields should be empty.</p>
270    pub fn get_task_invocation_parameters(&self) -> &::std::option::Option<crate::types::MaintenanceWindowTaskInvocationParameters> {
271        self.inner.get_task_invocation_parameters()
272    }
273    /// <p>The priority of the task in the maintenance window, the lower the number the higher the priority. Tasks in a maintenance window are scheduled in priority order with tasks that have the same priority scheduled in parallel.</p>
274    pub fn priority(mut self, input: i32) -> Self {
275        self.inner = self.inner.priority(input);
276        self
277    }
278    /// <p>The priority of the task in the maintenance window, the lower the number the higher the priority. Tasks in a maintenance window are scheduled in priority order with tasks that have the same priority scheduled in parallel.</p>
279    pub fn set_priority(mut self, input: ::std::option::Option<i32>) -> Self {
280        self.inner = self.inner.set_priority(input);
281        self
282    }
283    /// <p>The priority of the task in the maintenance window, the lower the number the higher the priority. Tasks in a maintenance window are scheduled in priority order with tasks that have the same priority scheduled in parallel.</p>
284    pub fn get_priority(&self) -> &::std::option::Option<i32> {
285        self.inner.get_priority()
286    }
287    /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
288    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
289    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
290    /// </note>
291    pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
292        self.inner = self.inner.max_concurrency(input.into());
293        self
294    }
295    /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
296    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
297    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
298    /// </note>
299    pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
300        self.inner = self.inner.set_max_concurrency(input);
301        self
302    }
303    /// <p>The maximum number of targets this task can be run for, in parallel.</p><note>
304    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
305    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
306    /// </note>
307    pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
308        self.inner.get_max_concurrency()
309    }
310    /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
311    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
312    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
313    /// </note>
314    pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
315        self.inner = self.inner.max_errors(input.into());
316        self
317    }
318    /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
319    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
320    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
321    /// </note>
322    pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
323        self.inner = self.inner.set_max_errors(input);
324        self
325    }
326    /// <p>The maximum number of errors allowed before this task stops being scheduled.</p><note>
327    /// <p>Although this element is listed as "Required: No", a value can be omitted only when you are registering or updating a <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/maintenance-windows-targetless-tasks.html">targetless task</a> You must provide a value in all other cases.</p>
328    /// <p>For maintenance window tasks without a target specified, you can't supply a value for this option. Instead, the system inserts a placeholder value of <code>1</code>. This value doesn't affect the running of your task.</p>
329    /// </note>
330    pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
331        self.inner.get_max_errors()
332    }
333    /// <p>A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to.</p><note>
334    /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
335    /// </note>
336    pub fn logging_info(mut self, input: crate::types::LoggingInfo) -> Self {
337        self.inner = self.inner.logging_info(input);
338        self
339    }
340    /// <p>A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to.</p><note>
341    /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
342    /// </note>
343    pub fn set_logging_info(mut self, input: ::std::option::Option<crate::types::LoggingInfo>) -> Self {
344        self.inner = self.inner.set_logging_info(input);
345        self
346    }
347    /// <p>A structure containing information about an Amazon Simple Storage Service (Amazon S3) bucket to write managed node-level logs to.</p><note>
348    /// <p><code>LoggingInfo</code> has been deprecated. To specify an Amazon Simple Storage Service (Amazon S3) bucket to contain logs, instead use the <code>OutputS3BucketName</code> and <code>OutputS3KeyPrefix</code> options in the <code>TaskInvocationParameters</code> structure. For information about how Amazon Web Services Systems Manager handles these options for the supported maintenance window task types, see <code>MaintenanceWindowTaskInvocationParameters</code>.</p>
349    /// </note>
350    pub fn get_logging_info(&self) -> &::std::option::Option<crate::types::LoggingInfo> {
351        self.inner.get_logging_info()
352    }
353    /// <p>An optional name for the task.</p>
354    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
355        self.inner = self.inner.name(input.into());
356        self
357    }
358    /// <p>An optional name for the task.</p>
359    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
360        self.inner = self.inner.set_name(input);
361        self
362    }
363    /// <p>An optional name for the task.</p>
364    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
365        self.inner.get_name()
366    }
367    /// <p>An optional description for the task.</p>
368    pub fn description(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
369        self.inner = self.inner.description(input.into());
370        self
371    }
372    /// <p>An optional description for the task.</p>
373    pub fn set_description(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
374        self.inner = self.inner.set_description(input);
375        self
376    }
377    /// <p>An optional description for the task.</p>
378    pub fn get_description(&self) -> &::std::option::Option<::std::string::String> {
379        self.inner.get_description()
380    }
381    /// <p>User-provided idempotency token.</p>
382    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
383        self.inner = self.inner.client_token(input.into());
384        self
385    }
386    /// <p>User-provided idempotency token.</p>
387    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
388        self.inner = self.inner.set_client_token(input);
389        self
390    }
391    /// <p>User-provided idempotency token.</p>
392    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
393        self.inner.get_client_token()
394    }
395    /// <p>Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
396    /// <ul>
397    /// <li>
398    /// <p><code>CONTINUE_TASK</code>: When the cutoff time is reached, any tasks that are running continue. The default value.</p></li>
399    /// <li>
400    /// <p><code>CANCEL_TASK</code>:</p>
401    /// <ul>
402    /// <li>
403    /// <p>For Automation, Lambda, Step Functions tasks: When the cutoff time is reached, any task invocations that are already running continue, but no new task invocations are started.</p></li>
404    /// <li>
405    /// <p>For Run Command tasks: When the cutoff time is reached, the system sends a <code>CancelCommand</code> operation that attempts to cancel the command associated with the task. However, there is no guarantee that the command will be terminated and the underlying process stopped.</p></li>
406    /// </ul>
407    /// <p>The status for tasks that are not completed is <code>TIMED_OUT</code>.</p></li>
408    /// </ul>
409    pub fn cutoff_behavior(mut self, input: crate::types::MaintenanceWindowTaskCutoffBehavior) -> Self {
410        self.inner = self.inner.cutoff_behavior(input);
411        self
412    }
413    /// <p>Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
414    /// <ul>
415    /// <li>
416    /// <p><code>CONTINUE_TASK</code>: When the cutoff time is reached, any tasks that are running continue. The default value.</p></li>
417    /// <li>
418    /// <p><code>CANCEL_TASK</code>:</p>
419    /// <ul>
420    /// <li>
421    /// <p>For Automation, Lambda, Step Functions tasks: When the cutoff time is reached, any task invocations that are already running continue, but no new task invocations are started.</p></li>
422    /// <li>
423    /// <p>For Run Command tasks: When the cutoff time is reached, the system sends a <code>CancelCommand</code> operation that attempts to cancel the command associated with the task. However, there is no guarantee that the command will be terminated and the underlying process stopped.</p></li>
424    /// </ul>
425    /// <p>The status for tasks that are not completed is <code>TIMED_OUT</code>.</p></li>
426    /// </ul>
427    pub fn set_cutoff_behavior(mut self, input: ::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior>) -> Self {
428        self.inner = self.inner.set_cutoff_behavior(input);
429        self
430    }
431    /// <p>Indicates whether tasks should continue to run after the cutoff time specified in the maintenance windows is reached.</p>
432    /// <ul>
433    /// <li>
434    /// <p><code>CONTINUE_TASK</code>: When the cutoff time is reached, any tasks that are running continue. The default value.</p></li>
435    /// <li>
436    /// <p><code>CANCEL_TASK</code>:</p>
437    /// <ul>
438    /// <li>
439    /// <p>For Automation, Lambda, Step Functions tasks: When the cutoff time is reached, any task invocations that are already running continue, but no new task invocations are started.</p></li>
440    /// <li>
441    /// <p>For Run Command tasks: When the cutoff time is reached, the system sends a <code>CancelCommand</code> operation that attempts to cancel the command associated with the task. However, there is no guarantee that the command will be terminated and the underlying process stopped.</p></li>
442    /// </ul>
443    /// <p>The status for tasks that are not completed is <code>TIMED_OUT</code>.</p></li>
444    /// </ul>
445    pub fn get_cutoff_behavior(&self) -> &::std::option::Option<crate::types::MaintenanceWindowTaskCutoffBehavior> {
446        self.inner.get_cutoff_behavior()
447    }
448    /// <p>The CloudWatch alarm you want to apply to your maintenance window task.</p>
449    pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
450        self.inner = self.inner.alarm_configuration(input);
451        self
452    }
453    /// <p>The CloudWatch alarm you want to apply to your maintenance window task.</p>
454    pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
455        self.inner = self.inner.set_alarm_configuration(input);
456        self
457    }
458    /// <p>The CloudWatch alarm you want to apply to your maintenance window task.</p>
459    pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
460        self.inner.get_alarm_configuration()
461    }
462}