aws_sdk_ssm/operation/update_association/_update_association_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
5pub struct UpdateAssociationInput {
6 /// <p>The ID of the association you want to update.</p>
7 pub association_id: ::std::option::Option<::std::string::String>,
8 /// <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>
9 pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
10 /// <p>The document version you want update for the association.</p><important>
11 /// <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>
12 /// </important>
13 pub document_version: ::std::option::Option<::std::string::String>,
14 /// <p>The cron expression used to schedule the association that you want to update.</p>
15 pub schedule_expression: ::std::option::Option<::std::string::String>,
16 /// <p>An S3 bucket where you want to store the results of this request.</p>
17 pub output_location: ::std::option::Option<crate::types::InstanceAssociationOutputLocation>,
18 /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
19 /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
20 /// <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>
21 /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
22 /// <p>For example:</p>
23 /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
24 /// <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>
25 pub name: ::std::option::Option<::std::string::String>,
26 /// <p>The targets of the association.</p>
27 pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
28 /// <p>The name of the association that you want to update.</p>
29 pub association_name: ::std::option::Option<::std::string::String>,
30 /// <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>
31 pub association_version: ::std::option::Option<::std::string::String>,
32 /// <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>
33 pub automation_target_parameter_name: ::std::option::Option<::std::string::String>,
34 /// <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>
35 /// <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>
36 pub max_errors: ::std::option::Option<::std::string::String>,
37 /// <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>
38 /// <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>
39 pub max_concurrency: ::std::option::Option<::std::string::String>,
40 /// <p>The severity level to assign to the association.</p>
41 pub compliance_severity: ::std::option::Option<crate::types::AssociationComplianceSeverity>,
42 /// <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>
43 /// <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>
44 /// <p>By default, all associations use <code>AUTO</code> mode.</p>
45 pub sync_compliance: ::std::option::Option<crate::types::AssociationSyncCompliance>,
46 /// <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>
47 /// <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>
48 /// <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>
49 /// <p>This parameter isn't supported for rate expressions.</p>
50 /// <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>
51 pub apply_only_at_cron_interval: ::std::option::Option<bool>,
52 /// <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>
53 pub calendar_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
54 /// <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>
55 /// <p>The <code>IncludeChildOrganizationUnits</code> parameter is not supported by State Manager.</p>
56 /// </note>
57 pub target_locations: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>,
58 /// <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>
59 /// <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>
60 /// </note>
61 pub schedule_offset: ::std::option::Option<i32>,
62 /// <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>
63 /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
64 /// <ul>
65 /// <li>
66 /// <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>
67 /// <li>
68 /// <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>
69 /// </ul>
70 pub duration: ::std::option::Option<i32>,
71 /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
72 pub target_maps:
73 ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
74 /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
75 pub alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
76}
77impl UpdateAssociationInput {
78 /// <p>The ID of the association you want to update.</p>
79 pub fn association_id(&self) -> ::std::option::Option<&str> {
80 self.association_id.as_deref()
81 }
82 /// <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>
83 pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
84 self.parameters.as_ref()
85 }
86 /// <p>The document version you want update for the association.</p><important>
87 /// <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>
88 /// </important>
89 pub fn document_version(&self) -> ::std::option::Option<&str> {
90 self.document_version.as_deref()
91 }
92 /// <p>The cron expression used to schedule the association that you want to update.</p>
93 pub fn schedule_expression(&self) -> ::std::option::Option<&str> {
94 self.schedule_expression.as_deref()
95 }
96 /// <p>An S3 bucket where you want to store the results of this request.</p>
97 pub fn output_location(&self) -> ::std::option::Option<&crate::types::InstanceAssociationOutputLocation> {
98 self.output_location.as_ref()
99 }
100 /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
101 /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
102 /// <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>
103 /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
104 /// <p>For example:</p>
105 /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
106 /// <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>
107 pub fn name(&self) -> ::std::option::Option<&str> {
108 self.name.as_deref()
109 }
110 /// <p>The targets of the association.</p>
111 ///
112 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.targets.is_none()`.
113 pub fn targets(&self) -> &[crate::types::Target] {
114 self.targets.as_deref().unwrap_or_default()
115 }
116 /// <p>The name of the association that you want to update.</p>
117 pub fn association_name(&self) -> ::std::option::Option<&str> {
118 self.association_name.as_deref()
119 }
120 /// <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>
121 pub fn association_version(&self) -> ::std::option::Option<&str> {
122 self.association_version.as_deref()
123 }
124 /// <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>
125 pub fn automation_target_parameter_name(&self) -> ::std::option::Option<&str> {
126 self.automation_target_parameter_name.as_deref()
127 }
128 /// <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>
129 /// <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>
130 pub fn max_errors(&self) -> ::std::option::Option<&str> {
131 self.max_errors.as_deref()
132 }
133 /// <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>
134 /// <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>
135 pub fn max_concurrency(&self) -> ::std::option::Option<&str> {
136 self.max_concurrency.as_deref()
137 }
138 /// <p>The severity level to assign to the association.</p>
139 pub fn compliance_severity(&self) -> ::std::option::Option<&crate::types::AssociationComplianceSeverity> {
140 self.compliance_severity.as_ref()
141 }
142 /// <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>
143 /// <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>
144 /// <p>By default, all associations use <code>AUTO</code> mode.</p>
145 pub fn sync_compliance(&self) -> ::std::option::Option<&crate::types::AssociationSyncCompliance> {
146 self.sync_compliance.as_ref()
147 }
148 /// <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>
149 /// <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>
150 /// <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>
151 /// <p>This parameter isn't supported for rate expressions.</p>
152 /// <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>
153 pub fn apply_only_at_cron_interval(&self) -> ::std::option::Option<bool> {
154 self.apply_only_at_cron_interval
155 }
156 /// <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>
157 ///
158 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.calendar_names.is_none()`.
159 pub fn calendar_names(&self) -> &[::std::string::String] {
160 self.calendar_names.as_deref().unwrap_or_default()
161 }
162 /// <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>
163 /// <p>The <code>IncludeChildOrganizationUnits</code> parameter is not supported by State Manager.</p>
164 /// </note>
165 ///
166 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_locations.is_none()`.
167 pub fn target_locations(&self) -> &[crate::types::TargetLocation] {
168 self.target_locations.as_deref().unwrap_or_default()
169 }
170 /// <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>
171 /// <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>
172 /// </note>
173 pub fn schedule_offset(&self) -> ::std::option::Option<i32> {
174 self.schedule_offset
175 }
176 /// <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>
177 /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
178 /// <ul>
179 /// <li>
180 /// <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>
181 /// <li>
182 /// <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>
183 /// </ul>
184 pub fn duration(&self) -> ::std::option::Option<i32> {
185 self.duration
186 }
187 /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
188 ///
189 /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.target_maps.is_none()`.
190 pub fn target_maps(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>] {
191 self.target_maps.as_deref().unwrap_or_default()
192 }
193 /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
194 pub fn alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
195 self.alarm_configuration.as_ref()
196 }
197}
198impl ::std::fmt::Debug for UpdateAssociationInput {
199 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
200 let mut formatter = f.debug_struct("UpdateAssociationInput");
201 formatter.field("association_id", &self.association_id);
202 formatter.field("parameters", &"*** Sensitive Data Redacted ***");
203 formatter.field("document_version", &self.document_version);
204 formatter.field("schedule_expression", &self.schedule_expression);
205 formatter.field("output_location", &self.output_location);
206 formatter.field("name", &self.name);
207 formatter.field("targets", &self.targets);
208 formatter.field("association_name", &self.association_name);
209 formatter.field("association_version", &self.association_version);
210 formatter.field("automation_target_parameter_name", &self.automation_target_parameter_name);
211 formatter.field("max_errors", &self.max_errors);
212 formatter.field("max_concurrency", &self.max_concurrency);
213 formatter.field("compliance_severity", &self.compliance_severity);
214 formatter.field("sync_compliance", &self.sync_compliance);
215 formatter.field("apply_only_at_cron_interval", &self.apply_only_at_cron_interval);
216 formatter.field("calendar_names", &self.calendar_names);
217 formatter.field("target_locations", &self.target_locations);
218 formatter.field("schedule_offset", &self.schedule_offset);
219 formatter.field("duration", &self.duration);
220 formatter.field("target_maps", &self.target_maps);
221 formatter.field("alarm_configuration", &self.alarm_configuration);
222 formatter.finish()
223 }
224}
225impl UpdateAssociationInput {
226 /// Creates a new builder-style object to manufacture [`UpdateAssociationInput`](crate::operation::update_association::UpdateAssociationInput).
227 pub fn builder() -> crate::operation::update_association::builders::UpdateAssociationInputBuilder {
228 crate::operation::update_association::builders::UpdateAssociationInputBuilder::default()
229 }
230}
231
232/// A builder for [`UpdateAssociationInput`](crate::operation::update_association::UpdateAssociationInput).
233#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
234#[non_exhaustive]
235pub struct UpdateAssociationInputBuilder {
236 pub(crate) association_id: ::std::option::Option<::std::string::String>,
237 pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
238 pub(crate) document_version: ::std::option::Option<::std::string::String>,
239 pub(crate) schedule_expression: ::std::option::Option<::std::string::String>,
240 pub(crate) output_location: ::std::option::Option<crate::types::InstanceAssociationOutputLocation>,
241 pub(crate) name: ::std::option::Option<::std::string::String>,
242 pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
243 pub(crate) association_name: ::std::option::Option<::std::string::String>,
244 pub(crate) association_version: ::std::option::Option<::std::string::String>,
245 pub(crate) automation_target_parameter_name: ::std::option::Option<::std::string::String>,
246 pub(crate) max_errors: ::std::option::Option<::std::string::String>,
247 pub(crate) max_concurrency: ::std::option::Option<::std::string::String>,
248 pub(crate) compliance_severity: ::std::option::Option<crate::types::AssociationComplianceSeverity>,
249 pub(crate) sync_compliance: ::std::option::Option<crate::types::AssociationSyncCompliance>,
250 pub(crate) apply_only_at_cron_interval: ::std::option::Option<bool>,
251 pub(crate) calendar_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
252 pub(crate) target_locations: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>,
253 pub(crate) schedule_offset: ::std::option::Option<i32>,
254 pub(crate) duration: ::std::option::Option<i32>,
255 pub(crate) target_maps:
256 ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
257 pub(crate) alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
258}
259impl UpdateAssociationInputBuilder {
260 /// <p>The ID of the association you want to update.</p>
261 /// This field is required.
262 pub fn association_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
263 self.association_id = ::std::option::Option::Some(input.into());
264 self
265 }
266 /// <p>The ID of the association you want to update.</p>
267 pub fn set_association_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
268 self.association_id = input;
269 self
270 }
271 /// <p>The ID of the association you want to update.</p>
272 pub fn get_association_id(&self) -> &::std::option::Option<::std::string::String> {
273 &self.association_id
274 }
275 /// Adds a key-value pair to `parameters`.
276 ///
277 /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
278 ///
279 /// <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>
280 pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
281 let mut hash_map = self.parameters.unwrap_or_default();
282 hash_map.insert(k.into(), v);
283 self.parameters = ::std::option::Option::Some(hash_map);
284 self
285 }
286 /// <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>
287 pub fn set_parameters(
288 mut self,
289 input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
290 ) -> Self {
291 self.parameters = input;
292 self
293 }
294 /// <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>
295 pub fn get_parameters(
296 &self,
297 ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
298 &self.parameters
299 }
300 /// <p>The document version you want update for the association.</p><important>
301 /// <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>
302 /// </important>
303 pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
304 self.document_version = ::std::option::Option::Some(input.into());
305 self
306 }
307 /// <p>The document version you want update for the association.</p><important>
308 /// <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>
309 /// </important>
310 pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
311 self.document_version = input;
312 self
313 }
314 /// <p>The document version you want update for the association.</p><important>
315 /// <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>
316 /// </important>
317 pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
318 &self.document_version
319 }
320 /// <p>The cron expression used to schedule the association that you want to update.</p>
321 pub fn schedule_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
322 self.schedule_expression = ::std::option::Option::Some(input.into());
323 self
324 }
325 /// <p>The cron expression used to schedule the association that you want to update.</p>
326 pub fn set_schedule_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
327 self.schedule_expression = input;
328 self
329 }
330 /// <p>The cron expression used to schedule the association that you want to update.</p>
331 pub fn get_schedule_expression(&self) -> &::std::option::Option<::std::string::String> {
332 &self.schedule_expression
333 }
334 /// <p>An S3 bucket where you want to store the results of this request.</p>
335 pub fn output_location(mut self, input: crate::types::InstanceAssociationOutputLocation) -> Self {
336 self.output_location = ::std::option::Option::Some(input);
337 self
338 }
339 /// <p>An S3 bucket where you want to store the results of this request.</p>
340 pub fn set_output_location(mut self, input: ::std::option::Option<crate::types::InstanceAssociationOutputLocation>) -> Self {
341 self.output_location = input;
342 self
343 }
344 /// <p>An S3 bucket where you want to store the results of this request.</p>
345 pub fn get_output_location(&self) -> &::std::option::Option<crate::types::InstanceAssociationOutputLocation> {
346 &self.output_location
347 }
348 /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
349 /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
350 /// <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>
351 /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
352 /// <p>For example:</p>
353 /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
354 /// <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>
355 pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
356 self.name = ::std::option::Option::Some(input.into());
357 self
358 }
359 /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
360 /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
361 /// <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>
362 /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
363 /// <p>For example:</p>
364 /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
365 /// <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>
366 pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
367 self.name = input;
368 self
369 }
370 /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
371 /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another account.</p>
372 /// <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>
373 /// <p><code>arn:aws:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
374 /// <p>For example:</p>
375 /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
376 /// <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>
377 pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
378 &self.name
379 }
380 /// Appends an item to `targets`.
381 ///
382 /// To override the contents of this collection use [`set_targets`](Self::set_targets).
383 ///
384 /// <p>The targets of the association.</p>
385 pub fn targets(mut self, input: crate::types::Target) -> Self {
386 let mut v = self.targets.unwrap_or_default();
387 v.push(input);
388 self.targets = ::std::option::Option::Some(v);
389 self
390 }
391 /// <p>The targets of the association.</p>
392 pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
393 self.targets = input;
394 self
395 }
396 /// <p>The targets of the association.</p>
397 pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
398 &self.targets
399 }
400 /// <p>The name of the association that you want to update.</p>
401 pub fn association_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
402 self.association_name = ::std::option::Option::Some(input.into());
403 self
404 }
405 /// <p>The name of the association that you want to update.</p>
406 pub fn set_association_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
407 self.association_name = input;
408 self
409 }
410 /// <p>The name of the association that you want to update.</p>
411 pub fn get_association_name(&self) -> &::std::option::Option<::std::string::String> {
412 &self.association_name
413 }
414 /// <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>
415 pub fn association_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
416 self.association_version = ::std::option::Option::Some(input.into());
417 self
418 }
419 /// <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>
420 pub fn set_association_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
421 self.association_version = input;
422 self
423 }
424 /// <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>
425 pub fn get_association_version(&self) -> &::std::option::Option<::std::string::String> {
426 &self.association_version
427 }
428 /// <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>
429 pub fn automation_target_parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
430 self.automation_target_parameter_name = ::std::option::Option::Some(input.into());
431 self
432 }
433 /// <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>
434 pub fn set_automation_target_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
435 self.automation_target_parameter_name = input;
436 self
437 }
438 /// <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>
439 pub fn get_automation_target_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
440 &self.automation_target_parameter_name
441 }
442 /// <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>
443 /// <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>
444 pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
445 self.max_errors = ::std::option::Option::Some(input.into());
446 self
447 }
448 /// <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>
449 /// <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>
450 pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
451 self.max_errors = input;
452 self
453 }
454 /// <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>
455 /// <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>
456 pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
457 &self.max_errors
458 }
459 /// <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>
460 /// <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>
461 pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
462 self.max_concurrency = ::std::option::Option::Some(input.into());
463 self
464 }
465 /// <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>
466 /// <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>
467 pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
468 self.max_concurrency = input;
469 self
470 }
471 /// <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>
472 /// <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>
473 pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
474 &self.max_concurrency
475 }
476 /// <p>The severity level to assign to the association.</p>
477 pub fn compliance_severity(mut self, input: crate::types::AssociationComplianceSeverity) -> Self {
478 self.compliance_severity = ::std::option::Option::Some(input);
479 self
480 }
481 /// <p>The severity level to assign to the association.</p>
482 pub fn set_compliance_severity(mut self, input: ::std::option::Option<crate::types::AssociationComplianceSeverity>) -> Self {
483 self.compliance_severity = input;
484 self
485 }
486 /// <p>The severity level to assign to the association.</p>
487 pub fn get_compliance_severity(&self) -> &::std::option::Option<crate::types::AssociationComplianceSeverity> {
488 &self.compliance_severity
489 }
490 /// <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>
491 /// <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>
492 /// <p>By default, all associations use <code>AUTO</code> mode.</p>
493 pub fn sync_compliance(mut self, input: crate::types::AssociationSyncCompliance) -> Self {
494 self.sync_compliance = ::std::option::Option::Some(input);
495 self
496 }
497 /// <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>
498 /// <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>
499 /// <p>By default, all associations use <code>AUTO</code> mode.</p>
500 pub fn set_sync_compliance(mut self, input: ::std::option::Option<crate::types::AssociationSyncCompliance>) -> Self {
501 self.sync_compliance = input;
502 self
503 }
504 /// <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>
505 /// <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>
506 /// <p>By default, all associations use <code>AUTO</code> mode.</p>
507 pub fn get_sync_compliance(&self) -> &::std::option::Option<crate::types::AssociationSyncCompliance> {
508 &self.sync_compliance
509 }
510 /// <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>
511 /// <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>
512 /// <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>
513 /// <p>This parameter isn't supported for rate expressions.</p>
514 /// <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>
515 pub fn apply_only_at_cron_interval(mut self, input: bool) -> Self {
516 self.apply_only_at_cron_interval = ::std::option::Option::Some(input);
517 self
518 }
519 /// <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>
520 /// <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>
521 /// <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>
522 /// <p>This parameter isn't supported for rate expressions.</p>
523 /// <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>
524 pub fn set_apply_only_at_cron_interval(mut self, input: ::std::option::Option<bool>) -> Self {
525 self.apply_only_at_cron_interval = input;
526 self
527 }
528 /// <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>
529 /// <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>
530 /// <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>
531 /// <p>This parameter isn't supported for rate expressions.</p>
532 /// <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>
533 pub fn get_apply_only_at_cron_interval(&self) -> &::std::option::Option<bool> {
534 &self.apply_only_at_cron_interval
535 }
536 /// Appends an item to `calendar_names`.
537 ///
538 /// To override the contents of this collection use [`set_calendar_names`](Self::set_calendar_names).
539 ///
540 /// <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>
541 pub fn calendar_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
542 let mut v = self.calendar_names.unwrap_or_default();
543 v.push(input.into());
544 self.calendar_names = ::std::option::Option::Some(v);
545 self
546 }
547 /// <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>
548 pub fn set_calendar_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
549 self.calendar_names = input;
550 self
551 }
552 /// <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>
553 pub fn get_calendar_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
554 &self.calendar_names
555 }
556 /// Appends an item to `target_locations`.
557 ///
558 /// To override the contents of this collection use [`set_target_locations`](Self::set_target_locations).
559 ///
560 /// <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>
561 /// <p>The <code>IncludeChildOrganizationUnits</code> parameter is not supported by State Manager.</p>
562 /// </note>
563 pub fn target_locations(mut self, input: crate::types::TargetLocation) -> Self {
564 let mut v = self.target_locations.unwrap_or_default();
565 v.push(input);
566 self.target_locations = ::std::option::Option::Some(v);
567 self
568 }
569 /// <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>
570 /// <p>The <code>IncludeChildOrganizationUnits</code> parameter is not supported by State Manager.</p>
571 /// </note>
572 pub fn set_target_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>) -> Self {
573 self.target_locations = input;
574 self
575 }
576 /// <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>
577 /// <p>The <code>IncludeChildOrganizationUnits</code> parameter is not supported by State Manager.</p>
578 /// </note>
579 pub fn get_target_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>> {
580 &self.target_locations
581 }
582 /// <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>
583 /// <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>
584 /// </note>
585 pub fn schedule_offset(mut self, input: i32) -> Self {
586 self.schedule_offset = ::std::option::Option::Some(input);
587 self
588 }
589 /// <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>
590 /// <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>
591 /// </note>
592 pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
593 self.schedule_offset = input;
594 self
595 }
596 /// <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>
597 /// <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>
598 /// </note>
599 pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
600 &self.schedule_offset
601 }
602 /// <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>
603 /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
604 /// <ul>
605 /// <li>
606 /// <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>
607 /// <li>
608 /// <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>
609 /// </ul>
610 pub fn duration(mut self, input: i32) -> Self {
611 self.duration = ::std::option::Option::Some(input);
612 self
613 }
614 /// <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>
615 /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
616 /// <ul>
617 /// <li>
618 /// <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>
619 /// <li>
620 /// <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>
621 /// </ul>
622 pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
623 self.duration = input;
624 self
625 }
626 /// <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>
627 /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
628 /// <ul>
629 /// <li>
630 /// <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>
631 /// <li>
632 /// <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>
633 /// </ul>
634 pub fn get_duration(&self) -> &::std::option::Option<i32> {
635 &self.duration
636 }
637 /// Appends an item to `target_maps`.
638 ///
639 /// To override the contents of this collection use [`set_target_maps`](Self::set_target_maps).
640 ///
641 /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
642 pub fn target_maps(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>) -> Self {
643 let mut v = self.target_maps.unwrap_or_default();
644 v.push(input);
645 self.target_maps = ::std::option::Option::Some(v);
646 self
647 }
648 /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
649 pub fn set_target_maps(
650 mut self,
651 input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
652 ) -> Self {
653 self.target_maps = input;
654 self
655 }
656 /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
657 pub fn get_target_maps(
658 &self,
659 ) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>> {
660 &self.target_maps
661 }
662 /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
663 pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
664 self.alarm_configuration = ::std::option::Option::Some(input);
665 self
666 }
667 /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
668 pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
669 self.alarm_configuration = input;
670 self
671 }
672 /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
673 pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
674 &self.alarm_configuration
675 }
676 /// Consumes the builder and constructs a [`UpdateAssociationInput`](crate::operation::update_association::UpdateAssociationInput).
677 pub fn build(
678 self,
679 ) -> ::std::result::Result<crate::operation::update_association::UpdateAssociationInput, ::aws_smithy_types::error::operation::BuildError> {
680 ::std::result::Result::Ok(crate::operation::update_association::UpdateAssociationInput {
681 association_id: self.association_id,
682 parameters: self.parameters,
683 document_version: self.document_version,
684 schedule_expression: self.schedule_expression,
685 output_location: self.output_location,
686 name: self.name,
687 targets: self.targets,
688 association_name: self.association_name,
689 association_version: self.association_version,
690 automation_target_parameter_name: self.automation_target_parameter_name,
691 max_errors: self.max_errors,
692 max_concurrency: self.max_concurrency,
693 compliance_severity: self.compliance_severity,
694 sync_compliance: self.sync_compliance,
695 apply_only_at_cron_interval: self.apply_only_at_cron_interval,
696 calendar_names: self.calendar_names,
697 target_locations: self.target_locations,
698 schedule_offset: self.schedule_offset,
699 duration: self.duration,
700 target_maps: self.target_maps,
701 alarm_configuration: self.alarm_configuration,
702 })
703 }
704}
705impl ::std::fmt::Debug for UpdateAssociationInputBuilder {
706 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
707 let mut formatter = f.debug_struct("UpdateAssociationInputBuilder");
708 formatter.field("association_id", &self.association_id);
709 formatter.field("parameters", &"*** Sensitive Data Redacted ***");
710 formatter.field("document_version", &self.document_version);
711 formatter.field("schedule_expression", &self.schedule_expression);
712 formatter.field("output_location", &self.output_location);
713 formatter.field("name", &self.name);
714 formatter.field("targets", &self.targets);
715 formatter.field("association_name", &self.association_name);
716 formatter.field("association_version", &self.association_version);
717 formatter.field("automation_target_parameter_name", &self.automation_target_parameter_name);
718 formatter.field("max_errors", &self.max_errors);
719 formatter.field("max_concurrency", &self.max_concurrency);
720 formatter.field("compliance_severity", &self.compliance_severity);
721 formatter.field("sync_compliance", &self.sync_compliance);
722 formatter.field("apply_only_at_cron_interval", &self.apply_only_at_cron_interval);
723 formatter.field("calendar_names", &self.calendar_names);
724 formatter.field("target_locations", &self.target_locations);
725 formatter.field("schedule_offset", &self.schedule_offset);
726 formatter.field("duration", &self.duration);
727 formatter.field("target_maps", &self.target_maps);
728 formatter.field("alarm_configuration", &self.alarm_configuration);
729 formatter.finish()
730 }
731}