aws-sdk-ssm 1.133.0

AWS SDK for Amazon Simple Systems Manager (SSM)
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq)]
pub struct CreateAssociationInput {
    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another Amazon Web Services account.</p>
    /// <p>For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
    /// <p><code>arn:<i>partition</i>:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
    /// <p>For example:</p>
    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
    /// <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>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The document version you want to associate with the targets. Can be a specific version or the default version.</p><important>
    /// <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>
    /// </important>
    pub document_version: ::std::option::Option<::std::string::String>,
    /// <p>The managed node ID.</p><note>
    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
    /// </note>
    pub instance_id: ::std::option::Option<::std::string::String>,
    /// <p>The parameters for the runtime configuration of the document.</p>
    pub parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
    /// <p>The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>. For more information about choosing targets for an association, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html">Understanding targets and rate controls in State Manager associations</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
    /// <p>A cron expression when the association will be applied to the targets.</p>
    pub schedule_expression: ::std::option::Option<::std::string::String>,
    /// <p>An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the output details of the request.</p>
    pub output_location: ::std::option::Option<crate::types::InstanceAssociationOutputLocation>,
    /// <p>Specify a descriptive name for the association.</p>
    pub association_name: ::std::option::Option<::std::string::String>,
    /// <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>
    pub automation_target_parameter_name: ::std::option::Option<::std::string::String>,
    /// <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>
    /// <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>
    pub max_errors: ::std::option::Option<::std::string::String>,
    /// <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>
    /// <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>
    pub max_concurrency: ::std::option::Option<::std::string::String>,
    /// <p>The severity level to assign to the association.</p>
    pub compliance_severity: ::std::option::Option<crate::types::AssociationComplianceSeverity>,
    /// <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>
    /// <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. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
    pub sync_compliance: ::std::option::Option<crate::types::AssociationSyncCompliance>,
    /// <p>By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified and when target changes are detected. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code>if you want the association to run only according to the schedule you specified.</p>
    /// <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">&gt;About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    /// <p>This parameter isn't supported for rate expressions.</p>
    pub apply_only_at_cron_interval: ::std::option::Option<bool>,
    /// <p>The names of 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>
    pub calendar_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <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 create an association in multiple Regions and multiple accounts.</p><note>
    /// <p>The <code>TargetLocationAlarmConfiguration</code> parameter is not supported by State Manager.</p>
    /// </note>
    pub target_locations: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>,
    /// <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>
    /// <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>
    /// </note>
    pub schedule_offset: ::std::option::Option<i32>,
    /// <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>
    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
    /// <ul>
    /// <li>
    /// <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>
    /// <li>
    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.</p></li>
    /// </ul>
    pub duration: ::std::option::Option<i32>,
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
    pub target_maps:
        ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
    /// <p>Adds or overwrites one or more tags for a State Manager association. <i>Tags</i> are metadata that you can assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
    pub alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
    /// </note>
    pub association_dispatch_assume_role: ::std::option::Option<::std::string::String>,
}
impl CreateAssociationInput {
    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another Amazon Web Services account.</p>
    /// <p>For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
    /// <p><code>arn:<i>partition</i>:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
    /// <p>For example:</p>
    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
    /// <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>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The document version you want to associate with the targets. Can be a specific version or the default version.</p><important>
    /// <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>
    /// </important>
    pub fn document_version(&self) -> ::std::option::Option<&str> {
        self.document_version.as_deref()
    }
    /// <p>The managed node ID.</p><note>
    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
    /// </note>
    pub fn instance_id(&self) -> ::std::option::Option<&str> {
        self.instance_id.as_deref()
    }
    /// <p>The parameters for the runtime configuration of the document.</p>
    pub fn parameters(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
        self.parameters.as_ref()
    }
    /// <p>The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>. For more information about choosing targets for an association, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html">Understanding targets and rate controls in State Manager associations</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    ///
    /// 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()`.
    pub fn targets(&self) -> &[crate::types::Target] {
        self.targets.as_deref().unwrap_or_default()
    }
    /// <p>A cron expression when the association will be applied to the targets.</p>
    pub fn schedule_expression(&self) -> ::std::option::Option<&str> {
        self.schedule_expression.as_deref()
    }
    /// <p>An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the output details of the request.</p>
    pub fn output_location(&self) -> ::std::option::Option<&crate::types::InstanceAssociationOutputLocation> {
        self.output_location.as_ref()
    }
    /// <p>Specify a descriptive name for the association.</p>
    pub fn association_name(&self) -> ::std::option::Option<&str> {
        self.association_name.as_deref()
    }
    /// <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>
    pub fn automation_target_parameter_name(&self) -> ::std::option::Option<&str> {
        self.automation_target_parameter_name.as_deref()
    }
    /// <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>
    /// <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>
    pub fn max_errors(&self) -> ::std::option::Option<&str> {
        self.max_errors.as_deref()
    }
    /// <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>
    /// <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>
    pub fn max_concurrency(&self) -> ::std::option::Option<&str> {
        self.max_concurrency.as_deref()
    }
    /// <p>The severity level to assign to the association.</p>
    pub fn compliance_severity(&self) -> ::std::option::Option<&crate::types::AssociationComplianceSeverity> {
        self.compliance_severity.as_ref()
    }
    /// <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>
    /// <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. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
    pub fn sync_compliance(&self) -> ::std::option::Option<&crate::types::AssociationSyncCompliance> {
        self.sync_compliance.as_ref()
    }
    /// <p>By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified and when target changes are detected. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code>if you want the association to run only according to the schedule you specified.</p>
    /// <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">&gt;About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    /// <p>This parameter isn't supported for rate expressions.</p>
    pub fn apply_only_at_cron_interval(&self) -> ::std::option::Option<bool> {
        self.apply_only_at_cron_interval
    }
    /// <p>The names of 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>
    ///
    /// 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()`.
    pub fn calendar_names(&self) -> &[::std::string::String] {
        self.calendar_names.as_deref().unwrap_or_default()
    }
    /// <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 create an association in multiple Regions and multiple accounts.</p><note>
    /// <p>The <code>TargetLocationAlarmConfiguration</code> parameter is not supported by State Manager.</p>
    /// </note>
    ///
    /// 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()`.
    pub fn target_locations(&self) -> &[crate::types::TargetLocation] {
        self.target_locations.as_deref().unwrap_or_default()
    }
    /// <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>
    /// <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>
    /// </note>
    pub fn schedule_offset(&self) -> ::std::option::Option<i32> {
        self.schedule_offset
    }
    /// <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>
    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
    /// <ul>
    /// <li>
    /// <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>
    /// <li>
    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.</p></li>
    /// </ul>
    pub fn duration(&self) -> ::std::option::Option<i32> {
        self.duration
    }
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
    ///
    /// 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()`.
    pub fn target_maps(&self) -> &[::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>] {
        self.target_maps.as_deref().unwrap_or_default()
    }
    /// <p>Adds or overwrites one or more tags for a State Manager association. <i>Tags</i> are metadata that you can assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.</p>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
    pub fn alarm_configuration(&self) -> ::std::option::Option<&crate::types::AlarmConfiguration> {
        self.alarm_configuration.as_ref()
    }
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
    /// </note>
    pub fn association_dispatch_assume_role(&self) -> ::std::option::Option<&str> {
        self.association_dispatch_assume_role.as_deref()
    }
}
impl ::std::fmt::Debug for CreateAssociationInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAssociationInput");
        formatter.field("name", &self.name);
        formatter.field("document_version", &self.document_version);
        formatter.field("instance_id", &self.instance_id);
        formatter.field("parameters", &"*** Sensitive Data Redacted ***");
        formatter.field("targets", &self.targets);
        formatter.field("schedule_expression", &self.schedule_expression);
        formatter.field("output_location", &self.output_location);
        formatter.field("association_name", &self.association_name);
        formatter.field("automation_target_parameter_name", &self.automation_target_parameter_name);
        formatter.field("max_errors", &self.max_errors);
        formatter.field("max_concurrency", &self.max_concurrency);
        formatter.field("compliance_severity", &self.compliance_severity);
        formatter.field("sync_compliance", &self.sync_compliance);
        formatter.field("apply_only_at_cron_interval", &self.apply_only_at_cron_interval);
        formatter.field("calendar_names", &self.calendar_names);
        formatter.field("target_locations", &self.target_locations);
        formatter.field("schedule_offset", &self.schedule_offset);
        formatter.field("duration", &self.duration);
        formatter.field("target_maps", &self.target_maps);
        formatter.field("tags", &self.tags);
        formatter.field("alarm_configuration", &self.alarm_configuration);
        formatter.field("association_dispatch_assume_role", &self.association_dispatch_assume_role);
        formatter.finish()
    }
}
static CREATEASSOCIATIONINPUT_MEMBER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$Name",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "Name",
    0,
);
static CREATEASSOCIATIONINPUT_MEMBER_DOCUMENT_VERSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$DocumentVersion",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "DocumentVersion",
    1,
);
static CREATEASSOCIATIONINPUT_MEMBER_INSTANCE_ID: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$InstanceId",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "InstanceId",
    2,
);
static CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS_VALUE_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#ParameterValueList$member", "com.amazonaws.ssm", "ParameterValueList"),
    ::aws_smithy_schema::ShapeType::String,
    "member",
    0,
);
static CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameters$key", "com.amazonaws.ssm", "Parameters"),
    ::aws_smithy_schema::ShapeType::String,
    "key",
    0,
);
static CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Parameters$value", "com.amazonaws.ssm", "Parameters"),
    ::aws_smithy_schema::ShapeType::List,
    "value",
    1,
)
.with_list_member(&CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS_VALUE_MEMBER);
static CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$Parameters",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::Map,
    "Parameters",
    3,
)
.with_map_members(
    &CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS_KEY,
    &CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS_VALUE,
);
static CREATEASSOCIATIONINPUT_MEMBER_TARGETS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#Targets$member", "com.amazonaws.ssm", "Targets"),
    ::aws_smithy_schema::ShapeType::Structure,
    "member",
    0,
);
static CREATEASSOCIATIONINPUT_MEMBER_TARGETS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$Targets",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::List,
    "Targets",
    4,
)
.with_list_member(&CREATEASSOCIATIONINPUT_MEMBER_TARGETS_MEMBER);
static CREATEASSOCIATIONINPUT_MEMBER_SCHEDULE_EXPRESSION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$ScheduleExpression",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "ScheduleExpression",
    5,
);
static CREATEASSOCIATIONINPUT_MEMBER_OUTPUT_LOCATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$OutputLocation",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::Structure,
    "OutputLocation",
    6,
);
static CREATEASSOCIATIONINPUT_MEMBER_ASSOCIATION_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$AssociationName",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "AssociationName",
    7,
);
static CREATEASSOCIATIONINPUT_MEMBER_AUTOMATION_TARGET_PARAMETER_NAME: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$AutomationTargetParameterName",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "AutomationTargetParameterName",
    8,
);
static CREATEASSOCIATIONINPUT_MEMBER_MAX_ERRORS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$MaxErrors",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "MaxErrors",
    9,
);
static CREATEASSOCIATIONINPUT_MEMBER_MAX_CONCURRENCY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$MaxConcurrency",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "MaxConcurrency",
    10,
);
static CREATEASSOCIATIONINPUT_MEMBER_COMPLIANCE_SEVERITY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$ComplianceSeverity",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "ComplianceSeverity",
    11,
);
static CREATEASSOCIATIONINPUT_MEMBER_SYNC_COMPLIANCE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$SyncCompliance",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "SyncCompliance",
    12,
);
static CREATEASSOCIATIONINPUT_MEMBER_APPLY_ONLY_AT_CRON_INTERVAL: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$ApplyOnlyAtCronInterval",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::Boolean,
    "ApplyOnlyAtCronInterval",
    13,
);
static CREATEASSOCIATIONINPUT_MEMBER_CALENDAR_NAMES_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm#CalendarNameOrARNList$member",
        "com.amazonaws.ssm",
        "CalendarNameOrARNList",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "member",
    0,
);
static CREATEASSOCIATIONINPUT_MEMBER_CALENDAR_NAMES: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$CalendarNames",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::List,
    "CalendarNames",
    14,
)
.with_list_member(&CREATEASSOCIATIONINPUT_MEMBER_CALENDAR_NAMES_MEMBER);
static CREATEASSOCIATIONINPUT_MEMBER_TARGET_LOCATIONS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetLocations$member", "com.amazonaws.ssm", "TargetLocations"),
    ::aws_smithy_schema::ShapeType::Structure,
    "member",
    0,
);
static CREATEASSOCIATIONINPUT_MEMBER_TARGET_LOCATIONS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$TargetLocations",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::List,
    "TargetLocations",
    15,
)
.with_list_member(&CREATEASSOCIATIONINPUT_MEMBER_TARGET_LOCATIONS_MEMBER);
static CREATEASSOCIATIONINPUT_MEMBER_SCHEDULE_OFFSET: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$ScheduleOffset",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::Integer,
    "ScheduleOffset",
    16,
);
static CREATEASSOCIATIONINPUT_MEMBER_DURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$Duration",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::Integer,
    "Duration",
    17,
);
static CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER_VALUE_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMapValueList$member", "com.amazonaws.ssm", "TargetMapValueList"),
    ::aws_smithy_schema::ShapeType::String,
    "member",
    0,
);
static CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER_KEY: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMap$key", "com.amazonaws.ssm", "TargetMap"),
    ::aws_smithy_schema::ShapeType::String,
    "key",
    0,
);
static CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER_VALUE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMap$value", "com.amazonaws.ssm", "TargetMap"),
    ::aws_smithy_schema::ShapeType::List,
    "value",
    1,
)
.with_list_member(&CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER_VALUE_MEMBER);
static CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TargetMaps$member", "com.amazonaws.ssm", "TargetMaps"),
    ::aws_smithy_schema::ShapeType::Map,
    "member",
    0,
)
.with_map_members(
    &CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER_KEY,
    &CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER_VALUE,
);
static CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$TargetMaps",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::List,
    "TargetMaps",
    18,
)
.with_list_member(&CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER);
static CREATEASSOCIATIONINPUT_MEMBER_TAGS_MEMBER: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts("com.amazonaws.ssm#TagList$member", "com.amazonaws.ssm", "TagList"),
    ::aws_smithy_schema::ShapeType::Structure,
    "member",
    0,
);
static CREATEASSOCIATIONINPUT_MEMBER_TAGS: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$Tags",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::List,
    "Tags",
    19,
)
.with_list_member(&CREATEASSOCIATIONINPUT_MEMBER_TAGS_MEMBER);
static CREATEASSOCIATIONINPUT_MEMBER_ALARM_CONFIGURATION: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$AlarmConfiguration",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::Structure,
    "AlarmConfiguration",
    20,
);
static CREATEASSOCIATIONINPUT_MEMBER_ASSOCIATION_DISPATCH_ASSUME_ROLE: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_member(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput$AssociationDispatchAssumeRole",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::String,
    "AssociationDispatchAssumeRole",
    21,
);
static CREATEASSOCIATIONINPUT_SCHEMA: ::aws_smithy_schema::Schema<'static> = ::aws_smithy_schema::Schema::new_struct(
    ::aws_smithy_schema::ShapeId::from_parts(
        "com.amazonaws.ssm.synthetic#CreateAssociationInput",
        "com.amazonaws.ssm.synthetic",
        "CreateAssociationInput",
    ),
    ::aws_smithy_schema::ShapeType::Structure,
    &[
        &CREATEASSOCIATIONINPUT_MEMBER_NAME,
        &CREATEASSOCIATIONINPUT_MEMBER_DOCUMENT_VERSION,
        &CREATEASSOCIATIONINPUT_MEMBER_INSTANCE_ID,
        &CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS,
        &CREATEASSOCIATIONINPUT_MEMBER_TARGETS,
        &CREATEASSOCIATIONINPUT_MEMBER_SCHEDULE_EXPRESSION,
        &CREATEASSOCIATIONINPUT_MEMBER_OUTPUT_LOCATION,
        &CREATEASSOCIATIONINPUT_MEMBER_ASSOCIATION_NAME,
        &CREATEASSOCIATIONINPUT_MEMBER_AUTOMATION_TARGET_PARAMETER_NAME,
        &CREATEASSOCIATIONINPUT_MEMBER_MAX_ERRORS,
        &CREATEASSOCIATIONINPUT_MEMBER_MAX_CONCURRENCY,
        &CREATEASSOCIATIONINPUT_MEMBER_COMPLIANCE_SEVERITY,
        &CREATEASSOCIATIONINPUT_MEMBER_SYNC_COMPLIANCE,
        &CREATEASSOCIATIONINPUT_MEMBER_APPLY_ONLY_AT_CRON_INTERVAL,
        &CREATEASSOCIATIONINPUT_MEMBER_CALENDAR_NAMES,
        &CREATEASSOCIATIONINPUT_MEMBER_TARGET_LOCATIONS,
        &CREATEASSOCIATIONINPUT_MEMBER_SCHEDULE_OFFSET,
        &CREATEASSOCIATIONINPUT_MEMBER_DURATION,
        &CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS,
        &CREATEASSOCIATIONINPUT_MEMBER_TAGS,
        &CREATEASSOCIATIONINPUT_MEMBER_ALARM_CONFIGURATION,
        &CREATEASSOCIATIONINPUT_MEMBER_ASSOCIATION_DISPATCH_ASSUME_ROLE,
    ],
)
.with_payload_hint(::aws_smithy_schema::PayloadHint::NoStructPayload)
.with_original_name("CreateAssociationRequest");
impl CreateAssociationInput {
    /// The schema for this shape.
    pub const SCHEMA: &'static ::aws_smithy_schema::Schema<'static> = &CREATEASSOCIATIONINPUT_SCHEMA;
}
impl ::aws_smithy_schema::serde::SerializableStruct for CreateAssociationInput {
    fn schema(&self) -> &::aws_smithy_schema::Schema<'_> {
        Self::SCHEMA
    }

    #[allow(unused_variables, clippy::diverging_sub_expression)]
    fn serialize_members(
        &self,
        ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer,
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
        if let Some(ref val) = self.name {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_NAME, val)?;
        }
        if let Some(ref val) = self.document_version {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_DOCUMENT_VERSION, val)?;
        }
        if let Some(ref val) = self.instance_id {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_INSTANCE_ID, val)?;
        }
        if let Some(ref val) = self.parameters {
            ser.write_map(
                &CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS,
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
                    for (key, value) in val {
                        ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;

                        ser.write_list(
                            &CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS_VALUE,
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
                                for item in value {
                                    ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
                                }
                                Ok(())
                            },
                        )?;
                    }
                    Ok(())
                },
            )?;
        }
        if let Some(ref val) = self.targets {
            ser.write_list(
                &CREATEASSOCIATIONINPUT_MEMBER_TARGETS,
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
                    for item in val {
                        ser.write_struct(crate::types::Target::SCHEMA, item)?;
                    }
                    Ok(())
                },
            )?;
        }
        if let Some(ref val) = self.schedule_expression {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_SCHEDULE_EXPRESSION, val)?;
        }
        if let Some(ref val) = self.output_location {
            ser.write_struct(&CREATEASSOCIATIONINPUT_MEMBER_OUTPUT_LOCATION, val)?;
        }
        if let Some(ref val) = self.association_name {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_ASSOCIATION_NAME, val)?;
        }
        if let Some(ref val) = self.automation_target_parameter_name {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_AUTOMATION_TARGET_PARAMETER_NAME, val)?;
        }
        if let Some(ref val) = self.max_errors {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_MAX_ERRORS, val)?;
        }
        if let Some(ref val) = self.max_concurrency {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_MAX_CONCURRENCY, val)?;
        }
        if let Some(ref val) = self.compliance_severity {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_COMPLIANCE_SEVERITY, val.as_str())?;
        }
        if let Some(ref val) = self.sync_compliance {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_SYNC_COMPLIANCE, val.as_str())?;
        }
        if let Some(ref val) = self.apply_only_at_cron_interval {
            ser.write_boolean(&CREATEASSOCIATIONINPUT_MEMBER_APPLY_ONLY_AT_CRON_INTERVAL, *val)?;
        }
        if let Some(ref val) = self.calendar_names {
            ser.write_list(
                &CREATEASSOCIATIONINPUT_MEMBER_CALENDAR_NAMES,
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
                    for item in val {
                        ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
                    }
                    Ok(())
                },
            )?;
        }
        if let Some(ref val) = self.target_locations {
            ser.write_list(
                &CREATEASSOCIATIONINPUT_MEMBER_TARGET_LOCATIONS,
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
                    for item in val {
                        ser.write_struct(crate::types::TargetLocation::SCHEMA, item)?;
                    }
                    Ok(())
                },
            )?;
        }
        if let Some(ref val) = self.schedule_offset {
            ser.write_integer(&CREATEASSOCIATIONINPUT_MEMBER_SCHEDULE_OFFSET, *val)?;
        }
        if let Some(ref val) = self.duration {
            ser.write_integer(&CREATEASSOCIATIONINPUT_MEMBER_DURATION, *val)?;
        }
        if let Some(ref val) = self.target_maps {
            ser.write_list(
                &CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS,
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
                    for item in val {
                        ser.write_map(
                            &CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER,
                            &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
                                for (key, value) in item {
                                    ser.write_string(&::aws_smithy_schema::prelude::STRING, key)?;

                                    ser.write_list(
                                        &CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER_VALUE,
                                        &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
                                            for item in value {
                                                ser.write_string(&aws_smithy_schema::prelude::STRING, item)?;
                                            }
                                            Ok(())
                                        },
                                    )?;
                                }
                                Ok(())
                            },
                        )?;
                    }
                    Ok(())
                },
            )?;
        }
        if let Some(ref val) = self.tags {
            ser.write_list(
                &CREATEASSOCIATIONINPUT_MEMBER_TAGS,
                &|ser: &mut dyn ::aws_smithy_schema::serde::ShapeSerializer| {
                    for item in val {
                        ser.write_struct(crate::types::Tag::SCHEMA, item)?;
                    }
                    Ok(())
                },
            )?;
        }
        if let Some(ref val) = self.alarm_configuration {
            ser.write_struct(&CREATEASSOCIATIONINPUT_MEMBER_ALARM_CONFIGURATION, val)?;
        }
        if let Some(ref val) = self.association_dispatch_assume_role {
            ser.write_string(&CREATEASSOCIATIONINPUT_MEMBER_ASSOCIATION_DISPATCH_ASSUME_ROLE, val)?;
        }
        Ok(())
    }
}
impl crate::operation::create_association::builders::CreateAssociationInputBuilder {
    #[allow(
        unused_variables,
        unreachable_code,
        clippy::single_match,
        clippy::match_single_binding,
        clippy::diverging_sub_expression
    )]
    pub(crate) fn deserialize_members(
        &mut self,
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
    ) -> ::std::result::Result<(), ::aws_smithy_schema::serde::SerdeError> {
        deserializer.read_struct(&CREATEASSOCIATIONINPUT_SCHEMA, &mut |member, deser| {
            match member.member_index() {
                Some(0) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.name = Some(deser.read_string(member)?);
                    }
                }
                Some(1) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.document_version = Some(deser.read_string(member)?);
                    }
                }
                Some(2) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.instance_id = Some(deser.read_string(member)?);
                    }
                }
                Some(3) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.parameters = Some({
                            let mut container = std::collections::HashMap::new();
                            deser.read_map(member, &mut |key, deser| {
                                container.insert(key, {
                                    let mut list = Vec::new();
                                    deser.read_list(&CREATEASSOCIATIONINPUT_MEMBER_PARAMETERS_VALUE, &mut |deser| {
                                        list.push(deser.read_string(&::aws_smithy_schema::prelude::STRING)?);
                                        Ok(())
                                    })?;
                                    list
                                });
                                Ok(())
                            })?;
                            container
                        });
                    }
                }
                Some(4) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.targets = Some({
                            let mut container = Vec::new();
                            deser.read_list(member, &mut |deser| {
                                container.push(crate::types::Target::deserialize(deser)?);
                                Ok(())
                            })?;
                            container
                        });
                    }
                }
                Some(5) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.schedule_expression = Some(deser.read_string(member)?);
                    }
                }
                Some(6) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.output_location = Some(crate::types::InstanceAssociationOutputLocation::deserialize(deser)?);
                    }
                }
                Some(7) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.association_name = Some(deser.read_string(member)?);
                    }
                }
                Some(8) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.automation_target_parameter_name = Some(deser.read_string(member)?);
                    }
                }
                Some(9) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.max_errors = Some(deser.read_string(member)?);
                    }
                }
                Some(10) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.max_concurrency = Some(deser.read_string(member)?);
                    }
                }
                Some(11) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.compliance_severity = Some(crate::types::AssociationComplianceSeverity::from(deser.read_string(member)?.as_str()));
                    }
                }
                Some(12) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.sync_compliance = Some(crate::types::AssociationSyncCompliance::from(deser.read_string(member)?.as_str()));
                    }
                }
                Some(13) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.apply_only_at_cron_interval = Some(deser.read_boolean(member)?);
                    }
                }
                Some(14) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.calendar_names = Some(deser.read_string_list(member)?);
                    }
                }
                Some(15) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.target_locations = Some({
                            let mut container = Vec::new();
                            deser.read_list(member, &mut |deser| {
                                container.push(crate::types::TargetLocation::deserialize(deser)?);
                                Ok(())
                            })?;
                            container
                        });
                    }
                }
                Some(16) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.schedule_offset = Some(deser.read_integer(member)?);
                    }
                }
                Some(17) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.duration = Some(deser.read_integer(member)?);
                    }
                }
                Some(18) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.target_maps = Some({
                            let mut container = Vec::new();
                            deser.read_list(member, &mut |deser| {
                                container.push({
                                    let mut map = ::std::collections::HashMap::new();
                                    deser.read_map(&CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER, &mut |key, deser| {
                                        let value = {
                                            let mut list = Vec::new();
                                            deser.read_list(&CREATEASSOCIATIONINPUT_MEMBER_TARGET_MAPS_MEMBER_VALUE, &mut |deser| {
                                                list.push(deser.read_string(&::aws_smithy_schema::prelude::STRING)?);
                                                Ok(())
                                            })?;
                                            list
                                        };
                                        map.insert(key, value);
                                        Ok(())
                                    })?;
                                    map
                                });
                                Ok(())
                            })?;
                            container
                        });
                    }
                }
                Some(19) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.tags = Some({
                            let mut container = Vec::new();
                            deser.read_list(member, &mut |deser| {
                                container.push(crate::types::Tag::deserialize(deser)?);
                                Ok(())
                            })?;
                            container
                        });
                    }
                }
                Some(20) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.alarm_configuration = Some(crate::types::AlarmConfiguration::deserialize(deser)?);
                    }
                }
                Some(21) => {
                    if deser.is_null() {
                        deser.read_null()?;
                    } else {
                        self.association_dispatch_assume_role = Some(deser.read_string(member)?);
                    }
                }
                _ => {}
            }
            Ok(())
        })
    }
}

impl CreateAssociationInput {
    /// Deserializes this structure from a [`ShapeDeserializer`].
    pub fn deserialize(
        deserializer: &mut dyn ::aws_smithy_schema::serde::ShapeDeserializer,
    ) -> ::std::result::Result<Self, ::aws_smithy_schema::serde::SerdeError> {
        let mut builder = Self::builder();
        builder.deserialize_members(deserializer)?;
        builder.name = builder.name.or(Some(String::new()));
        builder.build().map_err(|e| aws_smithy_schema::serde::SerdeError::custom(e.to_string()))
    }
}
impl CreateAssociationInput {
    /// Creates a new builder-style object to manufacture [`CreateAssociationInput`](crate::operation::create_association::CreateAssociationInput).
    pub fn builder() -> crate::operation::create_association::builders::CreateAssociationInputBuilder {
        crate::operation::create_association::builders::CreateAssociationInputBuilder::default()
    }
}

/// A builder for [`CreateAssociationInput`](crate::operation::create_association::CreateAssociationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateAssociationInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) document_version: ::std::option::Option<::std::string::String>,
    pub(crate) instance_id: ::std::option::Option<::std::string::String>,
    pub(crate) parameters: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
    pub(crate) targets: ::std::option::Option<::std::vec::Vec<crate::types::Target>>,
    pub(crate) schedule_expression: ::std::option::Option<::std::string::String>,
    pub(crate) output_location: ::std::option::Option<crate::types::InstanceAssociationOutputLocation>,
    pub(crate) association_name: ::std::option::Option<::std::string::String>,
    pub(crate) automation_target_parameter_name: ::std::option::Option<::std::string::String>,
    pub(crate) max_errors: ::std::option::Option<::std::string::String>,
    pub(crate) max_concurrency: ::std::option::Option<::std::string::String>,
    pub(crate) compliance_severity: ::std::option::Option<crate::types::AssociationComplianceSeverity>,
    pub(crate) sync_compliance: ::std::option::Option<crate::types::AssociationSyncCompliance>,
    pub(crate) apply_only_at_cron_interval: ::std::option::Option<bool>,
    pub(crate) calendar_names: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) target_locations: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>,
    pub(crate) schedule_offset: ::std::option::Option<i32>,
    pub(crate) duration: ::std::option::Option<i32>,
    pub(crate) target_maps:
        ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) alarm_configuration: ::std::option::Option<crate::types::AlarmConfiguration>,
    pub(crate) association_dispatch_assume_role: ::std::option::Option<::std::string::String>,
}
impl CreateAssociationInputBuilder {
    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another Amazon Web Services account.</p>
    /// <p>For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
    /// <p><code>arn:<i>partition</i>:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
    /// <p>For example:</p>
    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
    /// <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>
    /// This field is required.
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another Amazon Web Services account.</p>
    /// <p>For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
    /// <p><code>arn:<i>partition</i>:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
    /// <p>For example:</p>
    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
    /// <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>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the SSM Command document or Automation runbook that contains the configuration information for the managed node.</p>
    /// <p>You can specify Amazon Web Services-predefined documents, documents you created, or a document that is shared with you from another Amazon Web Services account.</p>
    /// <p>For Systems Manager documents (SSM documents) that are shared with you from other Amazon Web Services accounts, you must specify the complete SSM document ARN, in the following format:</p>
    /// <p><code>arn:<i>partition</i>:ssm:<i>region</i>:<i>account-id</i>:document/<i>document-name</i> </code></p>
    /// <p>For example:</p>
    /// <p><code>arn:aws:ssm:us-east-2:12345678912:document/My-Shared-Document</code></p>
    /// <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>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The document version you want to associate with the targets. Can be a specific version or the default version.</p><important>
    /// <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>
    /// </important>
    pub fn document_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.document_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The document version you want to associate with the targets. Can be a specific version or the default version.</p><important>
    /// <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>
    /// </important>
    pub fn set_document_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.document_version = input;
        self
    }
    /// <p>The document version you want to associate with the targets. Can be a specific version or the default version.</p><important>
    /// <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>
    /// </important>
    pub fn get_document_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.document_version
    }
    /// <p>The managed node ID.</p><note>
    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
    /// </note>
    pub fn instance_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.instance_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The managed node ID.</p><note>
    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
    /// </note>
    pub fn set_instance_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.instance_id = input;
        self
    }
    /// <p>The managed node ID.</p><note>
    /// <p><code>InstanceId</code> has been deprecated. To specify a managed node ID for an association, use the <code>Targets</code> parameter. Requests that include the parameter <code>InstanceID</code> with Systems Manager documents (SSM documents) that use schema version 2.0 or later will fail. In addition, if you use the parameter <code>InstanceId</code>, you can't use the parameters <code>AssociationName</code>, <code>DocumentVersion</code>, <code>MaxErrors</code>, <code>MaxConcurrency</code>, <code>OutputLocation</code>, or <code>ScheduleExpression</code>. To use these parameters, you must use the <code>Targets</code> parameter.</p>
    /// </note>
    pub fn get_instance_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.instance_id
    }
    /// Adds a key-value pair to `parameters`.
    ///
    /// To override the contents of this collection use [`set_parameters`](Self::set_parameters).
    ///
    /// <p>The parameters for the runtime configuration of the document.</p>
    pub fn parameters(mut self, k: impl ::std::convert::Into<::std::string::String>, v: ::std::vec::Vec<::std::string::String>) -> Self {
        let mut hash_map = self.parameters.unwrap_or_default();
        hash_map.insert(k.into(), v);
        self.parameters = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The parameters for the runtime configuration of the document.</p>
    pub fn set_parameters(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>,
    ) -> Self {
        self.parameters = input;
        self
    }
    /// <p>The parameters for the runtime configuration of the document.</p>
    pub fn get_parameters(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>> {
        &self.parameters
    }
    /// Appends an item to `targets`.
    ///
    /// To override the contents of this collection use [`set_targets`](Self::set_targets).
    ///
    /// <p>The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>. For more information about choosing targets for an association, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html">Understanding targets and rate controls in State Manager associations</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn targets(mut self, input: crate::types::Target) -> Self {
        let mut v = self.targets.unwrap_or_default();
        v.push(input);
        self.targets = ::std::option::Option::Some(v);
        self
    }
    /// <p>The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>. For more information about choosing targets for an association, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html">Understanding targets and rate controls in State Manager associations</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn set_targets(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Target>>) -> Self {
        self.targets = input;
        self
    }
    /// <p>The targets for the association. You can target managed nodes by using tags, Amazon Web Services resource groups, all managed nodes in an Amazon Web Services account, or individual managed node IDs. You can target all managed nodes in an Amazon Web Services account by specifying the <code>InstanceIds</code> key with a value of <code>*</code>. For more information about choosing targets for an association, see <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/systems-manager-state-manager-targets-and-rate-controls.html">Understanding targets and rate controls in State Manager associations</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    pub fn get_targets(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Target>> {
        &self.targets
    }
    /// <p>A cron expression when the association will be applied to the targets.</p>
    pub fn schedule_expression(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.schedule_expression = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A cron expression when the association will be applied to the targets.</p>
    pub fn set_schedule_expression(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.schedule_expression = input;
        self
    }
    /// <p>A cron expression when the association will be applied to the targets.</p>
    pub fn get_schedule_expression(&self) -> &::std::option::Option<::std::string::String> {
        &self.schedule_expression
    }
    /// <p>An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the output details of the request.</p>
    pub fn output_location(mut self, input: crate::types::InstanceAssociationOutputLocation) -> Self {
        self.output_location = ::std::option::Option::Some(input);
        self
    }
    /// <p>An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the output details of the request.</p>
    pub fn set_output_location(mut self, input: ::std::option::Option<crate::types::InstanceAssociationOutputLocation>) -> Self {
        self.output_location = input;
        self
    }
    /// <p>An Amazon Simple Storage Service (Amazon S3) bucket where you want to store the output details of the request.</p>
    pub fn get_output_location(&self) -> &::std::option::Option<crate::types::InstanceAssociationOutputLocation> {
        &self.output_location
    }
    /// <p>Specify a descriptive name for the association.</p>
    pub fn association_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.association_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specify a descriptive name for the association.</p>
    pub fn set_association_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.association_name = input;
        self
    }
    /// <p>Specify a descriptive name for the association.</p>
    pub fn get_association_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.association_name
    }
    /// <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>
    pub fn automation_target_parameter_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.automation_target_parameter_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    pub fn set_automation_target_parameter_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.automation_target_parameter_name = input;
        self
    }
    /// <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>
    pub fn get_automation_target_parameter_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.automation_target_parameter_name
    }
    /// <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>
    /// <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>
    pub fn max_errors(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.max_errors = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    /// <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>
    pub fn set_max_errors(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.max_errors = input;
        self
    }
    /// <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>
    /// <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>
    pub fn get_max_errors(&self) -> &::std::option::Option<::std::string::String> {
        &self.max_errors
    }
    /// <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>
    /// <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>
    pub fn max_concurrency(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.max_concurrency = ::std::option::Option::Some(input.into());
        self
    }
    /// <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>
    /// <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>
    pub fn set_max_concurrency(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.max_concurrency = input;
        self
    }
    /// <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>
    /// <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>
    pub fn get_max_concurrency(&self) -> &::std::option::Option<::std::string::String> {
        &self.max_concurrency
    }
    /// <p>The severity level to assign to the association.</p>
    pub fn compliance_severity(mut self, input: crate::types::AssociationComplianceSeverity) -> Self {
        self.compliance_severity = ::std::option::Option::Some(input);
        self
    }
    /// <p>The severity level to assign to the association.</p>
    pub fn set_compliance_severity(mut self, input: ::std::option::Option<crate::types::AssociationComplianceSeverity>) -> Self {
        self.compliance_severity = input;
        self
    }
    /// <p>The severity level to assign to the association.</p>
    pub fn get_compliance_severity(&self) -> &::std::option::Option<crate::types::AssociationComplianceSeverity> {
        &self.compliance_severity
    }
    /// <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>
    /// <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. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
    pub fn sync_compliance(mut self, input: crate::types::AssociationSyncCompliance) -> Self {
        self.sync_compliance = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    /// <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. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
    pub fn set_sync_compliance(mut self, input: ::std::option::Option<crate::types::AssociationSyncCompliance>) -> Self {
        self.sync_compliance = input;
        self
    }
    /// <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>
    /// <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. It is managed by your direct call to the <code>PutComplianceItems</code> API operation.</p>
    /// <p>By default, all associations use <code>AUTO</code> mode.</p>
    pub fn get_sync_compliance(&self) -> &::std::option::Option<crate::types::AssociationSyncCompliance> {
        &self.sync_compliance
    }
    /// <p>By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified and when target changes are detected. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code>if you want the association to run only according to the schedule you specified.</p>
    /// <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">&gt;About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    /// <p>This parameter isn't supported for rate expressions.</p>
    pub fn apply_only_at_cron_interval(mut self, input: bool) -> Self {
        self.apply_only_at_cron_interval = ::std::option::Option::Some(input);
        self
    }
    /// <p>By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified and when target changes are detected. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code>if you want the association to run only according to the schedule you specified.</p>
    /// <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">&gt;About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    /// <p>This parameter isn't supported for rate expressions.</p>
    pub fn set_apply_only_at_cron_interval(mut self, input: ::std::option::Option<bool>) -> Self {
        self.apply_only_at_cron_interval = input;
        self
    }
    /// <p>By default, when you create a new association, the system runs it immediately after it is created and then according to the schedule you specified and when target changes are detected. Specify <code>true</code> for <code>ApplyOnlyAtCronInterval</code>if you want the association to run only according to the schedule you specified.</p>
    /// <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">&gt;About target updates with Automation runbooks</a> in the <i>Amazon Web Services Systems Manager User Guide</i>.</p>
    /// <p>This parameter isn't supported for rate expressions.</p>
    pub fn get_apply_only_at_cron_interval(&self) -> &::std::option::Option<bool> {
        &self.apply_only_at_cron_interval
    }
    /// Appends an item to `calendar_names`.
    ///
    /// To override the contents of this collection use [`set_calendar_names`](Self::set_calendar_names).
    ///
    /// <p>The names of 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>
    pub fn calendar_names(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.calendar_names.unwrap_or_default();
        v.push(input.into());
        self.calendar_names = ::std::option::Option::Some(v);
        self
    }
    /// <p>The names of 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>
    pub fn set_calendar_names(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.calendar_names = input;
        self
    }
    /// <p>The names of 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>
    pub fn get_calendar_names(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.calendar_names
    }
    /// Appends an item to `target_locations`.
    ///
    /// To override the contents of this collection use [`set_target_locations`](Self::set_target_locations).
    ///
    /// <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 create an association in multiple Regions and multiple accounts.</p><note>
    /// <p>The <code>TargetLocationAlarmConfiguration</code> parameter is not supported by State Manager.</p>
    /// </note>
    pub fn target_locations(mut self, input: crate::types::TargetLocation) -> Self {
        let mut v = self.target_locations.unwrap_or_default();
        v.push(input);
        self.target_locations = ::std::option::Option::Some(v);
        self
    }
    /// <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 create an association in multiple Regions and multiple accounts.</p><note>
    /// <p>The <code>TargetLocationAlarmConfiguration</code> parameter is not supported by State Manager.</p>
    /// </note>
    pub fn set_target_locations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>>) -> Self {
        self.target_locations = input;
        self
    }
    /// <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 create an association in multiple Regions and multiple accounts.</p><note>
    /// <p>The <code>TargetLocationAlarmConfiguration</code> parameter is not supported by State Manager.</p>
    /// </note>
    pub fn get_target_locations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::TargetLocation>> {
        &self.target_locations
    }
    /// <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>
    /// <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>
    /// </note>
    pub fn schedule_offset(mut self, input: i32) -> Self {
        self.schedule_offset = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    /// <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>
    /// </note>
    pub fn set_schedule_offset(mut self, input: ::std::option::Option<i32>) -> Self {
        self.schedule_offset = input;
        self
    }
    /// <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>
    /// <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>
    /// </note>
    pub fn get_schedule_offset(&self) -> &::std::option::Option<i32> {
        &self.schedule_offset
    }
    /// <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>
    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
    /// <ul>
    /// <li>
    /// <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>
    /// <li>
    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.</p></li>
    /// </ul>
    pub fn duration(mut self, input: i32) -> Self {
        self.duration = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
    /// <ul>
    /// <li>
    /// <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>
    /// <li>
    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.</p></li>
    /// </ul>
    pub fn set_duration(mut self, input: ::std::option::Option<i32>) -> Self {
        self.duration = input;
        self
    }
    /// <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>
    /// <p>The <code>Duration</code> parameter applies only when both these conditions are true:</p>
    /// <ul>
    /// <li>
    /// <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>
    /// <li>
    /// <p>The command specifies the <code> <a href="https://docs.aws.amazon.com/systems-manager/latest/APIReference/API_CreateAssociation.html#systemsmanager-CreateAssociation-request-ApplyOnlyAtCronInterval">ApplyOnlyAtCronInterval</a> </code> parameter, which means that the association doesn't run immediately after it is created, but only according to the specified schedule.</p></li>
    /// </ul>
    pub fn get_duration(&self) -> &::std::option::Option<i32> {
        &self.duration
    }
    /// Appends an item to `target_maps`.
    ///
    /// To override the contents of this collection use [`set_target_maps`](Self::set_target_maps).
    ///
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
    pub fn target_maps(mut self, input: ::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>) -> Self {
        let mut v = self.target_maps.unwrap_or_default();
        v.push(input);
        self.target_maps = ::std::option::Option::Some(v);
        self
    }
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
    pub fn set_target_maps(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>>,
    ) -> Self {
        self.target_maps = input;
        self
    }
    /// <p>A key-value mapping of document parameters to target resources. Both Targets and TargetMaps can't be specified together.</p>
    pub fn get_target_maps(
        &self,
    ) -> &::std::option::Option<::std::vec::Vec<::std::collections::HashMap<::std::string::String, ::std::vec::Vec<::std::string::String>>>> {
        &self.target_maps
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>Adds or overwrites one or more tags for a State Manager association. <i>Tags</i> are metadata that you can assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.</p>
    pub fn tags(mut self, input: crate::types::Tag) -> Self {
        let mut v = self.tags.unwrap_or_default();
        v.push(input);
        self.tags = ::std::option::Option::Some(v);
        self
    }
    /// <p>Adds or overwrites one or more tags for a State Manager association. <i>Tags</i> are metadata that you can assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>Adds or overwrites one or more tags for a State Manager association. <i>Tags</i> are metadata that you can assign to your Amazon Web Services resources. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment. Each tag consists of a key and an optional value, both of which you define.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
    pub fn alarm_configuration(mut self, input: crate::types::AlarmConfiguration) -> Self {
        self.alarm_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
    pub fn set_alarm_configuration(mut self, input: ::std::option::Option<crate::types::AlarmConfiguration>) -> Self {
        self.alarm_configuration = input;
        self
    }
    /// <p>The details for the CloudWatch alarm you want to apply to an automation or command.</p>
    pub fn get_alarm_configuration(&self) -> &::std::option::Option<crate::types::AlarmConfiguration> {
        &self.alarm_configuration
    }
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
    /// </note>
    pub fn association_dispatch_assume_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.association_dispatch_assume_role = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
    /// </note>
    pub fn set_association_dispatch_assume_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.association_dispatch_assume_role = input;
        self
    }
    /// <p>A role used by association to take actions on your behalf. State Manager will assume this role and call required APIs when dispatching configurations to nodes. If not specified, <a href="https://docs.aws.amazon.com/systems-manager/latest/userguide/using-service-linked-roles.html"> service-linked role for Systems Manager</a> will be used by default.</p><note>
    /// <p>It is recommended that you define a custom IAM role so that you have full control of the permissions that State Manager has when taking actions on your behalf.</p>
    /// <p>Service-linked role support in State Manager is being phased out. Associations relying on service-linked role may require updates in the future to continue functioning properly.</p>
    /// </note>
    pub fn get_association_dispatch_assume_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.association_dispatch_assume_role
    }
    /// Consumes the builder and constructs a [`CreateAssociationInput`](crate::operation::create_association::CreateAssociationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::create_association::CreateAssociationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::create_association::CreateAssociationInput {
            name: self.name,
            document_version: self.document_version,
            instance_id: self.instance_id,
            parameters: self.parameters,
            targets: self.targets,
            schedule_expression: self.schedule_expression,
            output_location: self.output_location,
            association_name: self.association_name,
            automation_target_parameter_name: self.automation_target_parameter_name,
            max_errors: self.max_errors,
            max_concurrency: self.max_concurrency,
            compliance_severity: self.compliance_severity,
            sync_compliance: self.sync_compliance,
            apply_only_at_cron_interval: self.apply_only_at_cron_interval,
            calendar_names: self.calendar_names,
            target_locations: self.target_locations,
            schedule_offset: self.schedule_offset,
            duration: self.duration,
            target_maps: self.target_maps,
            tags: self.tags,
            alarm_configuration: self.alarm_configuration,
            association_dispatch_assume_role: self.association_dispatch_assume_role,
        })
    }
}
impl ::std::fmt::Debug for CreateAssociationInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateAssociationInputBuilder");
        formatter.field("name", &self.name);
        formatter.field("document_version", &self.document_version);
        formatter.field("instance_id", &self.instance_id);
        formatter.field("parameters", &"*** Sensitive Data Redacted ***");
        formatter.field("targets", &self.targets);
        formatter.field("schedule_expression", &self.schedule_expression);
        formatter.field("output_location", &self.output_location);
        formatter.field("association_name", &self.association_name);
        formatter.field("automation_target_parameter_name", &self.automation_target_parameter_name);
        formatter.field("max_errors", &self.max_errors);
        formatter.field("max_concurrency", &self.max_concurrency);
        formatter.field("compliance_severity", &self.compliance_severity);
        formatter.field("sync_compliance", &self.sync_compliance);
        formatter.field("apply_only_at_cron_interval", &self.apply_only_at_cron_interval);
        formatter.field("calendar_names", &self.calendar_names);
        formatter.field("target_locations", &self.target_locations);
        formatter.field("schedule_offset", &self.schedule_offset);
        formatter.field("duration", &self.duration);
        formatter.field("target_maps", &self.target_maps);
        formatter.field("tags", &self.tags);
        formatter.field("alarm_configuration", &self.alarm_configuration);
        formatter.field("association_dispatch_assume_role", &self.association_dispatch_assume_role);
        formatter.finish()
    }
}