aws_sdk_ssm/operation/update_association/
builders.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2pub use crate::operation::update_association::_update_association_output::UpdateAssociationOutputBuilder;
3
4pub use crate::operation::update_association::_update_association_input::UpdateAssociationInputBuilder;
5
6impl crate::operation::update_association::builders::UpdateAssociationInputBuilder {
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_association::UpdateAssociationOutput,
13        ::aws_smithy_runtime_api::client::result::SdkError<
14            crate::operation::update_association::UpdateAssociationError,
15            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
16        >,
17    > {
18        let mut fluent_builder = client.update_association();
19        fluent_builder.inner = self;
20        fluent_builder.send().await
21    }
22}
23/// Fluent builder constructing a request to `UpdateAssociation`.
24///
25/// <p>Updates an association. You can update the association name and version, the document version, schedule, parameters, and Amazon Simple Storage Service (Amazon S3) output. When you call <code>UpdateAssociation</code>, the system removes all optional parameters from the request and overwrites the association with null values for those parameters. This is by design. You must specify all optional parameters in the call, even if you are not changing the parameters. This includes the <code>Name</code> parameter. Before calling this API action, we recommend that you call the <code>DescribeAssociation</code> API operation and make a note of all optional parameters required for your <code>UpdateAssociation</code> call.</p>
26/// <p>In order to call this API operation, a user, group, or role must be granted permission to call the <code>DescribeAssociation</code> API operation. If you don't have permission to call <code>DescribeAssociation</code>, then you receive the following error: <code>An error occurred (AccessDeniedException) when calling the UpdateAssociation operation: User: <user_arn>
27/// isn't authorized to perform: ssm:DescribeAssociation on resource:
28/// <resource_arn></resource_arn>
29/// </user_arn></code></p><important>
30/// <p>When you update an association, the association immediately runs against the specified targets. You can add the <code>ApplyOnlyAtCronInterval</code> parameter to run the association during the next schedule run.</p>
31/// </important>
32#[derive(::std::clone::Clone, ::std::fmt::Debug)]
33pub struct UpdateAssociationFluentBuilder {
34    handle: ::std::sync::Arc<crate::client::Handle>,
35    inner: crate::operation::update_association::builders::UpdateAssociationInputBuilder,
36    config_override: ::std::option::Option<crate::config::Builder>,
37}
38impl
39    crate::client::customize::internal::CustomizableSend<
40        crate::operation::update_association::UpdateAssociationOutput,
41        crate::operation::update_association::UpdateAssociationError,
42    > for UpdateAssociationFluentBuilder
43{
44    fn send(
45        self,
46        config_override: crate::config::Builder,
47    ) -> crate::client::customize::internal::BoxFuture<
48        crate::client::customize::internal::SendResult<
49            crate::operation::update_association::UpdateAssociationOutput,
50            crate::operation::update_association::UpdateAssociationError,
51        >,
52    > {
53        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
54    }
55}
56impl UpdateAssociationFluentBuilder {
57    /// Creates a new `UpdateAssociationFluentBuilder`.
58    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
59        Self {
60            handle,
61            inner: ::std::default::Default::default(),
62            config_override: ::std::option::Option::None,
63        }
64    }
65    /// Access the UpdateAssociation as a reference.
66    pub fn as_input(&self) -> &crate::operation::update_association::builders::UpdateAssociationInputBuilder {
67        &self.inner
68    }
69    /// Sends the request and returns the response.
70    ///
71    /// If an error occurs, an `SdkError` will be returned with additional details that
72    /// can be matched against.
73    ///
74    /// By default, any retryable failures will be retried twice. Retry behavior
75    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
76    /// set when configuring the client.
77    pub async fn send(
78        self,
79    ) -> ::std::result::Result<
80        crate::operation::update_association::UpdateAssociationOutput,
81        ::aws_smithy_runtime_api::client::result::SdkError<
82            crate::operation::update_association::UpdateAssociationError,
83            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
84        >,
85    > {
86        let input = self
87            .inner
88            .build()
89            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
90        let runtime_plugins = crate::operation::update_association::UpdateAssociation::operation_runtime_plugins(
91            self.handle.runtime_plugins.clone(),
92            &self.handle.conf,
93            self.config_override,
94        );
95        crate::operation::update_association::UpdateAssociation::orchestrate(&runtime_plugins, input).await
96    }
97
98    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
99    pub fn customize(
100        self,
101    ) -> crate::client::customize::CustomizableOperation<
102        crate::operation::update_association::UpdateAssociationOutput,
103        crate::operation::update_association::UpdateAssociationError,
104        Self,
105    > {
106        crate::client::customize::CustomizableOperation::new(self)
107    }
108    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
109        self.set_config_override(::std::option::Option::Some(config_override.into()));
110        self
111    }
112
113    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
114        self.config_override = config_override;
115        self
116    }
117    /// <p>The ID of the association you want to update.</p>
118    pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119        self.inner = self.inner.association_id(input.into());
120        self
121    }
122    /// <p>The ID of the association you want to update.</p>
123    pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124        self.inner = self.inner.set_association_id(input);
125        self
126    }
127    /// <p>The ID of the association you want to update.</p>
128    pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
129        self.inner.get_association_id()
130    }
131    ///
132    /// Adds a key-value pair to `Parameters`.
133    ///
134    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
135    ///
136    /// <p>The parameters you want to update for the association. If you create a parameter using Parameter Store, a tool in Amazon Web Services Systems Manager, you can reference the parameter using <code>{{ssm:parameter-name}}</code>.</p>
137    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
138        self.inner = self.inner.parameters(k.into(), v);
139        self
140    }
141    /// <p>The parameters you want to update for the association. If you create a parameter using Parameter Store, a tool in Amazon Web Services Systems Manager, you can reference the parameter using <code>{{ssm:parameter-name}}</code>.</p>
142    pub fn set_parameters(
143        mut self,
144        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
145    ) -> Self {
146        self.inner = self.inner.set_parameters(input);
147        self
148    }
149    /// <p>The parameters you want to update for the association. If you create a parameter using Parameter Store, a tool in Amazon Web Services Systems Manager, you can reference the parameter using <code>{{ssm:parameter-name}}</code>.</p>
150    pub fn get_parameters(
151        &self,
152    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
153        self.inner.get_parameters()
154    }
155    /// <p>The document version you want update for the association.</p><important>
156    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
157    /// </important>
158    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
159        self.inner = self.inner.document_version(input.into());
160        self
161    }
162    /// <p>The document version you want update for the association.</p><important>
163    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
164    /// </important>
165    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
166        self.inner = self.inner.set_document_version(input);
167        self
168    }
169    /// <p>The document version you want update for the association.</p><important>
170    /// <p>State Manager doesn't support running associations that use a new version of a document if that document is shared from another account. State Manager always runs the <code>default</code> version of a document if shared from another account, even though the Systems Manager console shows that a new version was processed. If you want to run an association using a new version of a document shared form another account, you must set the document version to <code>default</code>.</p>
171    /// </important>
172    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
173        self.inner.get_document_version()
174    }
175    /// <p>The cron expression used to schedule the association that you want to update.</p>
176    pub fn schedule_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
177        self.inner = self.inner.schedule_expression(input.into());
178        self
179    }
180    /// <p>The cron expression used to schedule the association that you want to update.</p>
181    pub fn set_schedule_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
182        self.inner = self.inner.set_schedule_expression(input);
183        self
184    }
185    /// <p>The cron expression used to schedule the association that you want to update.</p>
186    pub fn get_schedule_expression(&self) -> &::std::option::Option<::std::string::String> {
187        self.inner.get_schedule_expression()
188    }
189    /// <p>An S3 bucket where you want to store the results of this request.</p>
190    pub fn output_location(mut self, input: crate::types::InstanceAssociationOutputLocation) -> Self {
191        self.inner = self.inner.output_location(input);
192        self
193    }
194    /// <p>An S3 bucket where you want to store the results of this request.</p>
195    pub fn set_output_location(mut self, input: ::std::option::Option<crate::types::InstanceAssociationOutputLocation>) -> Self {
196        self.inner = self.inner.set_output_location(input);
197        self
198    }
199    /// <p>An S3 bucket where you want to store the results of this request.</p>
200    pub fn get_output_location(&self) -> &::std::option::Option<crate::types::InstanceAssociationOutputLocation> {
201        self.inner.get_output_location()
202    }
203    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
204    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
205    /// <p>For Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
206    /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
207    /// <p>For example:</p>
208    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
209    /// <p>For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, <code>AWS-ApplyPatchBaseline</code> or <code>My-Document</code>.</p>
210    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
211        self.inner = self.inner.name(input.into());
212        self
213    }
214    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
215    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
216    /// <p>For Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
217    /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
218    /// <p>For example:</p>
219    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
220    /// <p>For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, <code>AWS-ApplyPatchBaseline</code> or <code>My-Document</code>.</p>
221    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
222        self.inner = self.inner.set_name(input);
223        self
224    }
225    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
226    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
227    /// <p>For Systems Manager document (SSM document) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
228    /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
229    /// <p>For example:</p>
230    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
231    /// <p>For Amazon Web Services-predefined documents and SSM documents you created in your account, you only need to specify the document name. For example, <code>AWS-ApplyPatchBaseline</code> or <code>My-Document</code>.</p>
232    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
233        self.inner.get_name()
234    }
235    ///
236    /// Appends an item to `Targets`.
237    ///
238    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
239    ///
240    /// <p>The targets of the association.</p>
241    pub fn targets(mut self, input: crate::types::Target) -> Self {
242        self.inner = self.inner.targets(input);
243        self
244    }
245    /// <p>The targets of the association.</p>
246    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
247        self.inner = self.inner.set_targets(input);
248        self
249    }
250    /// <p>The targets of the association.</p>
251    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
252        self.inner.get_targets()
253    }
254    /// <p>The name of the association that you want to update.</p>
255    pub fn association_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
256        self.inner = self.inner.association_name(input.into());
257        self
258    }
259    /// <p>The name of the association that you want to update.</p>
260    pub fn set_association_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
261        self.inner = self.inner.set_association_name(input);
262        self
263    }
264    /// <p>The name of the association that you want to update.</p>
265    pub fn get_association_name(&self) -> &::std::option::Option<::std::string::String> {
266        self.inner.get_association_name()
267    }
268    /// <p>This parameter is provided for concurrency control purposes. You must specify the latest association version in the service. If you want to ensure that this request succeeds, either specify <code>$LATEST</code>, or omit this parameter.</p>
269    pub fn association_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
270        self.inner = self.inner.association_version(input.into());
271        self
272    }
273    /// <p>This parameter is provided for concurrency control purposes. You must specify the latest association version in the service. If you want to ensure that this request succeeds, either specify <code>$LATEST</code>, or omit this parameter.</p>
274    pub fn set_association_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
275        self.inner = self.inner.set_association_version(input);
276        self
277    }
278    /// <p>This parameter is provided for concurrency control purposes. You must specify the latest association version in the service. If you want to ensure that this request succeeds, either specify <code>$LATEST</code>, or omit this parameter.</p>
279    pub fn get_association_version(&self) -> &::std::option::Option<::std::string::String> {
280        self.inner.get_association_version()
281    }
282    /// <p>Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a tool in Amazon Web Services Systems Manager.</p>
283    pub fn automation_target_parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
284        self.inner = self.inner.automation_target_parameter_name(input.into());
285        self
286    }
287    /// <p>Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a tool in Amazon Web Services Systems Manager.</p>
288    pub fn set_automation_target_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
289        self.inner = self.inner.set_automation_target_parameter_name(input);
290        self
291    }
292    /// <p>Choose the parameter that will define how your automation will branch out. This target is required for associations that use an Automation runbook and target resources by using rate controls. Automation is a tool in Amazon Web Services Systems Manager.</p>
293    pub fn get_automation_target_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
294        self.inner.get_automation_target_parameter_name()
295    }
296    /// <p>The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set <code>MaxError</code> to 10%, then the system stops sending the request when the sixth error is received.</p>
297    /// <p>Executions that are already running an association when <code>MaxErrors</code> is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set <code>MaxConcurrency</code> to 1 so that executions proceed one at a time.</p>
298    pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
299        self.inner = self.inner.max_errors(input.into());
300        self
301    }
302    /// <p>The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set <code>MaxError</code> to 10%, then the system stops sending the request when the sixth error is received.</p>
303    /// <p>Executions that are already running an association when <code>MaxErrors</code> is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set <code>MaxConcurrency</code> to 1 so that executions proceed one at a time.</p>
304    pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
305        self.inner = self.inner.set_max_errors(input);
306        self
307    }
308    /// <p>The number of errors that are allowed before the system stops sending requests to run the association on additional targets. You can specify either an absolute number of errors, for example 10, or a percentage of the target set, for example 10%. If you specify 3, for example, the system stops sending requests when the fourth error is received. If you specify 0, then the system stops sending requests after the first error is returned. If you run an association on 50 managed nodes and set <code>MaxError</code> to 10%, then the system stops sending the request when the sixth error is received.</p>
309    /// <p>Executions that are already running an association when <code>MaxErrors</code> is reached are allowed to complete, but some of these executions may fail as well. If you need to ensure that there won't be more than max-errors failed executions, set <code>MaxConcurrency</code> to 1 so that executions proceed one at a time.</p>
310    pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
311        self.inner.get_max_errors()
312    }
313    /// <p>The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.</p>
314    /// <p>If a new managed node starts and attempts to run an association while Systems Manager is running <code>MaxConcurrency</code> associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for <code>MaxConcurrency</code>.</p>
315    pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
316        self.inner = self.inner.max_concurrency(input.into());
317        self
318    }
319    /// <p>The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.</p>
320    /// <p>If a new managed node starts and attempts to run an association while Systems Manager is running <code>MaxConcurrency</code> associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for <code>MaxConcurrency</code>.</p>
321    pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
322        self.inner = self.inner.set_max_concurrency(input);
323        self
324    }
325    /// <p>The maximum number of targets allowed to run the association at the same time. You can specify a number, for example 10, or a percentage of the target set, for example 10%. The default value is 100%, which means all targets run the association at the same time.</p>
326    /// <p>If a new managed node starts and attempts to run an association while Systems Manager is running <code>MaxConcurrency</code> associations, the association is allowed to run. During the next association interval, the new managed node will process its association within the limit specified for <code>MaxConcurrency</code>.</p>
327    pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
328        self.inner.get_max_concurrency()
329    }
330    /// <p>The severity level to assign to the association.</p>
331    pub fn compliance_severity(mut self, input: crate::types::AssociationComplianceSeverity) -> Self {
332        self.inner = self.inner.compliance_severity(input);
333        self
334    }
335    /// <p>The severity level to assign to the association.</p>
336    pub fn set_compliance_severity(mut self, input: ::std::option::Option<crate::types::AssociationComplianceSeverity>) -> Self {
337        self.inner = self.inner.set_compliance_severity(input);
338        self
339    }
340    /// <p>The severity level to assign to the association.</p>
341    pub fn get_compliance_severity(&self) -> &::std::option::Option<crate::types::AssociationComplianceSeverity> {
342        self.inner.get_compliance_severity()
343    }
344    /// <p>The mode for generating association compliance. You can specify <code>AUTO</code> or <code>MANUAL</code>. In <code>AUTO</code> mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is <code>COMPLIANT</code>. If the association execution doesn't run successfully, the association is <code>NON-COMPLIANT</code>.</p>
345    /// <p>In <code>MANUAL</code> mode, you must specify the <code>AssociationId</code> as a parameter for the <code>PutComplianceItems</code> API operation. In this case, compliance data isn't managed by State Manager, a tool in Amazon Web Services Systems Manager. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
346    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
347    pub fn sync_compliance(mut self, input: crate::types::AssociationSyncCompliance) -> Self {
348        self.inner = self.inner.sync_compliance(input);
349        self
350    }
351    /// <p>The mode for generating association compliance. You can specify <code>AUTO</code> or <code>MANUAL</code>. In <code>AUTO</code> mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is <code>COMPLIANT</code>. If the association execution doesn't run successfully, the association is <code>NON-COMPLIANT</code>.</p>
352    /// <p>In <code>MANUAL</code> mode, you must specify the <code>AssociationId</code> as a parameter for the <code>PutComplianceItems</code> API operation. In this case, compliance data isn't managed by State Manager, a tool in Amazon Web Services Systems Manager. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
353    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
354    pub fn set_sync_compliance(mut self, input: ::std::option::Option<crate::types::AssociationSyncCompliance>) -> Self {
355        self.inner = self.inner.set_sync_compliance(input);
356        self
357    }
358    /// <p>The mode for generating association compliance. You can specify <code>AUTO</code> or <code>MANUAL</code>. In <code>AUTO</code> mode, the system uses the status of the association execution to determine the compliance status. If the association execution runs successfully, then the association is <code>COMPLIANT</code>. If the association execution doesn't run successfully, the association is <code>NON-COMPLIANT</code>.</p>
359    /// <p>In <code>MANUAL</code> mode, you must specify the <code>AssociationId</code> as a parameter for the <code>PutComplianceItems</code> API operation. In this case, compliance data isn't managed by State Manager, a tool in Amazon Web Services Systems Manager. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
360    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
361    pub fn get_sync_compliance(&self) -> &::std::option::Option<crate::types::AssociationSyncCompliance> {
362        self.inner.get_sync_compliance()
363    }
364    /// <p>By default, when you update an association, the system runs it immediately after it is updated and then according to the schedule you specified. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code> if you want the association to run only according to the schedule you specified.</p>
365    /// <p>If you chose this option when you created an association and later you edit that association or you make changes to the Automation runbook or SSM document on which that association is based, State Manager applies the association at the next specified cron interval. For example, if you chose the <code>Latest</code> version of an SSM document when you created an association and you edit the association by choosing a different document version on the Documents page, State Manager applies the association at the next specified cron interval if you previously set <code>ApplyOnlyAtCronInterval</code> to <code>true</code>. If this option wasn't selected, State Manager immediately runs the association.</p>
366    /// <p>For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#state-manager-about-scheduling">Understanding when associations are applied to resources</a> and <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#runbook-target-updates">About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
367    /// <p>This parameter isn't supported for rate expressions.</p>
368    /// <p>You can reset this parameter. To do so, specify the <code>no-apply-only-at-cron-interval</code> parameter when you update the association from the command line. This parameter forces the association to run immediately after updating it and according to the interval specified.</p>
369    pub fn apply_only_at_cron_interval(mut self, input: bool) -> Self {
370        self.inner = self.inner.apply_only_at_cron_interval(input);
371        self
372    }
373    /// <p>By default, when you update an association, the system runs it immediately after it is updated and then according to the schedule you specified. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code> if you want the association to run only according to the schedule you specified.</p>
374    /// <p>If you chose this option when you created an association and later you edit that association or you make changes to the Automation runbook or SSM document on which that association is based, State Manager applies the association at the next specified cron interval. For example, if you chose the <code>Latest</code> version of an SSM document when you created an association and you edit the association by choosing a different document version on the Documents page, State Manager applies the association at the next specified cron interval if you previously set <code>ApplyOnlyAtCronInterval</code> to <code>true</code>. If this option wasn't selected, State Manager immediately runs the association.</p>
375    /// <p>For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#state-manager-about-scheduling">Understanding when associations are applied to resources</a> and <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#runbook-target-updates">About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
376    /// <p>This parameter isn't supported for rate expressions.</p>
377    /// <p>You can reset this parameter. To do so, specify the <code>no-apply-only-at-cron-interval</code> parameter when you update the association from the command line. This parameter forces the association to run immediately after updating it and according to the interval specified.</p>
378    pub fn set_apply_only_at_cron_interval(mut self, input: ::std::option::Option<bool>) -> Self {
379        self.inner = self.inner.set_apply_only_at_cron_interval(input);
380        self
381    }
382    /// <p>By default, when you update an association, the system runs it immediately after it is updated and then according to the schedule you specified. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code> if you want the association to run only according to the schedule you specified.</p>
383    /// <p>If you chose this option when you created an association and later you edit that association or you make changes to the Automation runbook or SSM document on which that association is based, State Manager applies the association at the next specified cron interval. For example, if you chose the <code>Latest</code> version of an SSM document when you created an association and you edit the association by choosing a different document version on the Documents page, State Manager applies the association at the next specified cron interval if you previously set <code>ApplyOnlyAtCronInterval</code> to <code>true</code>. If this option wasn't selected, State Manager immediately runs the association.</p>
384    /// <p>For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#state-manager-about-scheduling">Understanding when associations are applied to resources</a> and <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/state-manager-about.html#runbook-target-updates">About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
385    /// <p>This parameter isn't supported for rate expressions.</p>
386    /// <p>You can reset this parameter. To do so, specify the <code>no-apply-only-at-cron-interval</code> parameter when you update the association from the command line. This parameter forces the association to run immediately after updating it and according to the interval specified.</p>
387    pub fn get_apply_only_at_cron_interval(&self) -> &::std::option::Option<bool> {
388        self.inner.get_apply_only_at_cron_interval()
389    }
390    ///
391    /// Appends an item to `CalendarNames`.
392    ///
393    /// To override the contents of this collection use [`set_calendar_names`](Self::set_calendar_names).
394    ///
395    /// <p>The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar">Amazon Web Services Systems Manager Change Calendar</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
396    pub fn calendar_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
397        self.inner = self.inner.calendar_names(input.into());
398        self
399    }
400    /// <p>The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar">Amazon Web Services Systems Manager Change Calendar</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
401    pub fn set_calendar_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
402        self.inner = self.inner.set_calendar_names(input);
403        self
404    }
405    /// <p>The names or Amazon Resource Names (ARNs) of the Change Calendar type documents you want to gate your associations under. The associations only run when that change calendar is open. For more information, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-change-calendar">Amazon Web Services Systems Manager Change Calendar</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
406    pub fn get_calendar_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
407        self.inner.get_calendar_names()
408    }
409    ///
410    /// Appends an item to `TargetLocations`.
411    ///
412    /// To override the contents of this collection use [`set_target_locations`](Self::set_target_locations).
413    ///
414    /// <p>A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to update an association in multiple Regions and multiple accounts.</p><note>
415    /// <p>The <code>IncludeChildOrganizationUnits</code> parameter is not supported by State Manager.</p>
416    /// </note>
417    pub fn target_locations(mut self, input: crate::types::TargetLocation) -> Self {
418        self.inner = self.inner.target_locations(input);
419        self
420    }
421    /// <p>A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to update an association in multiple Regions and multiple accounts.</p><note>
422    /// <p>The <code>IncludeChildOrganizationUnits</code> parameter is not supported by State Manager.</p>
423    /// </note>
424    pub fn set_target_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>) -> Self {
425        self.inner = self.inner.set_target_locations(input);
426        self
427    }
428    /// <p>A location is a combination of Amazon Web Services Regions and Amazon Web Services accounts where you want to run the association. Use this action to update an association in multiple Regions and multiple accounts.</p><note>
429    /// <p>The <code>IncludeChildOrganizationUnits</code> parameter is not supported by State Manager.</p>
430    /// </note>
431    pub fn get_target_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>> {
432        self.inner.get_target_locations()
433    }
434    /// <p>Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of <code>cron(0 0 ? * THU#2 *)</code>, you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html">Reference: Cron and rate expressions for Systems Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
435    /// <p>To use offsets, you must specify the <code>ApplyOnlyAtCronInterval</code> parameter. This option tells the system not to run an association immediately after you create it.</p>
436    /// </note>
437    pub fn schedule_offset(mut self, input: i32) -> Self {
438        self.inner = self.inner.schedule_offset(input);
439        self
440    }
441    /// <p>Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of <code>cron(0 0 ? * THU#2 *)</code>, you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html">Reference: Cron and rate expressions for Systems Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
442    /// <p>To use offsets, you must specify the <code>ApplyOnlyAtCronInterval</code> parameter. This option tells the system not to run an association immediately after you create it.</p>
443    /// </note>
444    pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
445        self.inner = self.inner.set_schedule_offset(input);
446        self
447    }
448    /// <p>Number of days to wait after the scheduled day to run an association. For example, if you specified a cron schedule of <code>cron(0 0 ? * THU#2 *)</code>, you could specify an offset of 3 to run the association each Sunday after the second Thursday of the month. For more information about cron schedules for associations, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/reference-cron-and-rate-expressions.html">Reference: Cron and rate expressions for Systems Manager</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p><note>
449    /// <p>To use offsets, you must specify the <code>ApplyOnlyAtCronInterval</code> parameter. This option tells the system not to run an association immediately after you create it.</p>
450    /// </note>
451    pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
452        self.inner.get_schedule_offset()
453    }
454    /// <p>The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.</p>
455    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
456    /// <ul>
457    /// <li>
458    /// <p>The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.</p></li>
459    /// <li>
460    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_UpdateAssociation.html#systemsmanager-UpdateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is updated, but only according to the specified schedule.</p></li>
461    /// </ul>
462    pub fn duration(mut self, input: i32) -> Self {
463        self.inner = self.inner.duration(input);
464        self
465    }
466    /// <p>The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.</p>
467    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
468    /// <ul>
469    /// <li>
470    /// <p>The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.</p></li>
471    /// <li>
472    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_UpdateAssociation.html#systemsmanager-UpdateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is updated, but only according to the specified schedule.</p></li>
473    /// </ul>
474    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
475        self.inner = self.inner.set_duration(input);
476        self
477    }
478    /// <p>The number of hours the association can run before it is canceled. Duration applies to associations that are currently running, and any pending and in progress commands on all targets. If a target was taken offline for the association to run, it is made available again immediately, without a reboot.</p>
479    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
480    /// <ul>
481    /// <li>
482    /// <p>The association for which you specify a duration is cancelable according to the parameters of the SSM command document or Automation runbook associated with this execution.</p></li>
483    /// <li>
484    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_UpdateAssociation.html#systemsmanager-UpdateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is updated, but only according to the specified schedule.</p></li>
485    /// </ul>
486    pub fn get_duration(&self) -> &::std::option::Option<i32> {
487        self.inner.get_duration()
488    }
489    ///
490    /// Appends an item to `TargetMaps`.
491    ///
492    /// To override the contents of this collection use [`set_target_maps`](Self::set_target_maps).
493    ///
494    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
495    pub fn target_maps(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>) -> Self {
496        self.inner = self.inner.target_maps(input);
497        self
498    }
499    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
500    pub fn set_target_maps(
501        mut self,
502        input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
503    ) -> Self {
504        self.inner = self.inner.set_target_maps(input);
505        self
506    }
507    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
508    pub fn get_target_maps(
509        &self,
510    ) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>> {
511        self.inner.get_target_maps()
512    }
513    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
514    pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
515        self.inner = self.inner.alarm_configuration(input);
516        self
517    }
518    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
519    pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
520        self.inner = self.inner.set_alarm_configuration(input);
521        self
522    }
523    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
524    pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
525        self.inner.get_alarm_configuration()
526    }
527}