aws-sdk-emr 1.121.0

AWS SDK for Amazon EMR
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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Input to the <code>RunJobFlow</code> operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct RunJobFlowInput {
    /// <p>The name of the job flow.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
    pub log_uri: ::std::option::Option<::std::string::String>,
    /// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
    pub log_encryption_kms_key_id: ::std::option::Option<::std::string::String>,
    /// <p>A JSON string for selecting additional features.</p>
    pub additional_info: ::std::option::Option<::std::string::String>,
    /// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
    pub ami_version: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
    pub release_label: ::std::option::Option<::std::string::String>,
    /// <p>A specification of the number and type of Amazon EC2 instances.</p>
    pub instances: ::std::option::Option<crate::types::JobFlowInstancesConfig>,
    /// <p>A list of steps to run.</p>
    pub steps: ::std::option::Option<::std::vec::Vec<crate::types::StepConfig>>,
    /// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
    /// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
    /// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
    pub step_execution_role_arn: ::std::option::Option<::std::string::String>,
    /// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p>
    pub bootstrap_actions: ::std::option::Option<::std::vec::Vec<crate::types::BootstrapActionConfig>>,
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
    /// </ul>
    pub supported_products: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
    /// <li>
    /// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
    /// <li>
    /// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
    /// <li>
    /// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
    /// <li>
    /// <p>"hue"- launch the cluster with Hue installed.</p></li>
    /// <li>
    /// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
    /// <li>
    /// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
    /// </ul>
    pub new_supported_products: ::std::option::Option<::std::vec::Vec<crate::types::SupportedProductConfig>>,
    /// <p>Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</p>
    pub applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
    /// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</p>
    pub configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
    /// <important>
    /// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
    /// </important>
    /// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
    /// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub visible_to_all_users: ::std::option::Option<bool>,
    /// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
    pub job_flow_role: ::std::option::Option<::std::string::String>,
    /// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
    pub service_role: ::std::option::Option<::std::string::String>,
    /// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The name of a security configuration to apply to the cluster.</p>
    pub security_configuration: ::std::option::Option<::std::string::String>,
    /// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
    pub auto_scaling_role: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
    pub scale_down_behavior: ::std::option::Option<crate::types::ScaleDownBehavior>,
    /// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
    /// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
    pub custom_ami_id: ::std::option::Option<::std::string::String>,
    /// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
    pub ebs_root_volume_size: ::std::option::Option<i32>,
    /// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
    pub repo_upgrade_on_boot: ::std::option::Option<crate::types::RepoUpgradeOnBoot>,
    /// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub kerberos_attributes: ::std::option::Option<crate::types::KerberosAttributes>,
    /// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
    pub step_concurrency_level: ::std::option::Option<i32>,
    /// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
    pub managed_scaling_policy: ::std::option::Option<crate::types::ManagedScalingPolicy>,
    /// <p>The specified placement group configuration for an Amazon EMR cluster.</p>
    pub placement_group_configs: ::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>>,
    /// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
    pub auto_termination_policy: ::std::option::Option<crate::types::AutoTerminationPolicy>,
    /// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
    pub os_release_label: ::std::option::Option<::std::string::String>,
    /// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub ebs_root_volume_iops: ::std::option::Option<i32>,
    /// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub ebs_root_volume_throughput: ::std::option::Option<i32>,
    /// <p>Reserved.</p>
    pub extended_support: ::std::option::Option<bool>,
    /// <p>Contains CloudWatch log configuration metadata and settings.</p>
    pub monitoring_configuration: ::std::option::Option<crate::types::MonitoringConfiguration>,
    /// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
    pub session_enabled: ::std::option::Option<bool>,
}
impl RunJobFlowInput {
    /// <p>The name of the job flow.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
    pub fn log_uri(&self) -> ::std::option::Option<&str> {
        self.log_uri.as_deref()
    }
    /// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
    pub fn log_encryption_kms_key_id(&self) -> ::std::option::Option<&str> {
        self.log_encryption_kms_key_id.as_deref()
    }
    /// <p>A JSON string for selecting additional features.</p>
    pub fn additional_info(&self) -> ::std::option::Option<&str> {
        self.additional_info.as_deref()
    }
    /// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
    pub fn ami_version(&self) -> ::std::option::Option<&str> {
        self.ami_version.as_deref()
    }
    /// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
    pub fn release_label(&self) -> ::std::option::Option<&str> {
        self.release_label.as_deref()
    }
    /// <p>A specification of the number and type of Amazon EC2 instances.</p>
    pub fn instances(&self) -> ::std::option::Option<&crate::types::JobFlowInstancesConfig> {
        self.instances.as_ref()
    }
    /// <p>A list of steps to run.</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 `.steps.is_none()`.
    pub fn steps(&self) -> &[crate::types::StepConfig] {
        self.steps.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
    /// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
    /// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
    pub fn step_execution_role_arn(&self) -> ::std::option::Option<&str> {
        self.step_execution_role_arn.as_deref()
    }
    /// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</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 `.bootstrap_actions.is_none()`.
    pub fn bootstrap_actions(&self) -> &[crate::types::BootstrapActionConfig] {
        self.bootstrap_actions.as_deref().unwrap_or_default()
    }
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.supported_products.is_none()`.
    pub fn supported_products(&self) -> &[::std::string::String] {
        self.supported_products.as_deref().unwrap_or_default()
    }
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
    /// <li>
    /// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
    /// <li>
    /// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
    /// <li>
    /// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
    /// <li>
    /// <p>"hue"- launch the cluster with Hue installed.</p></li>
    /// <li>
    /// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
    /// <li>
    /// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
    /// </ul>
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.new_supported_products.is_none()`.
    pub fn new_supported_products(&self) -> &[crate::types::SupportedProductConfig] {
        self.new_supported_products.as_deref().unwrap_or_default()
    }
    /// <p>Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</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 `.applications.is_none()`.
    pub fn applications(&self) -> &[crate::types::Application] {
        self.applications.as_deref().unwrap_or_default()
    }
    /// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</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 `.configurations.is_none()`.
    pub fn configurations(&self) -> &[crate::types::Configuration] {
        self.configurations.as_deref().unwrap_or_default()
    }
    /// <important>
    /// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
    /// </important>
    /// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
    /// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub fn visible_to_all_users(&self) -> ::std::option::Option<bool> {
        self.visible_to_all_users
    }
    /// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
    pub fn job_flow_role(&self) -> ::std::option::Option<&str> {
        self.job_flow_role.as_deref()
    }
    /// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
    pub fn service_role(&self) -> ::std::option::Option<&str> {
        self.service_role.as_deref()
    }
    /// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</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 name of a security configuration to apply to the cluster.</p>
    pub fn security_configuration(&self) -> ::std::option::Option<&str> {
        self.security_configuration.as_deref()
    }
    /// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
    pub fn auto_scaling_role(&self) -> ::std::option::Option<&str> {
        self.auto_scaling_role.as_deref()
    }
    /// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
    pub fn scale_down_behavior(&self) -> ::std::option::Option<&crate::types::ScaleDownBehavior> {
        self.scale_down_behavior.as_ref()
    }
    /// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
    /// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
    pub fn custom_ami_id(&self) -> ::std::option::Option<&str> {
        self.custom_ami_id.as_deref()
    }
    /// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
    pub fn ebs_root_volume_size(&self) -> ::std::option::Option<i32> {
        self.ebs_root_volume_size
    }
    /// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
    pub fn repo_upgrade_on_boot(&self) -> ::std::option::Option<&crate::types::RepoUpgradeOnBoot> {
        self.repo_upgrade_on_boot.as_ref()
    }
    /// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub fn kerberos_attributes(&self) -> ::std::option::Option<&crate::types::KerberosAttributes> {
        self.kerberos_attributes.as_ref()
    }
    /// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
    pub fn step_concurrency_level(&self) -> ::std::option::Option<i32> {
        self.step_concurrency_level
    }
    /// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
    pub fn managed_scaling_policy(&self) -> ::std::option::Option<&crate::types::ManagedScalingPolicy> {
        self.managed_scaling_policy.as_ref()
    }
    /// <p>The specified placement group configuration for an Amazon EMR cluster.</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 `.placement_group_configs.is_none()`.
    pub fn placement_group_configs(&self) -> &[crate::types::PlacementGroupConfig] {
        self.placement_group_configs.as_deref().unwrap_or_default()
    }
    /// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
    pub fn auto_termination_policy(&self) -> ::std::option::Option<&crate::types::AutoTerminationPolicy> {
        self.auto_termination_policy.as_ref()
    }
    /// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
    pub fn os_release_label(&self) -> ::std::option::Option<&str> {
        self.os_release_label.as_deref()
    }
    /// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub fn ebs_root_volume_iops(&self) -> ::std::option::Option<i32> {
        self.ebs_root_volume_iops
    }
    /// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub fn ebs_root_volume_throughput(&self) -> ::std::option::Option<i32> {
        self.ebs_root_volume_throughput
    }
    /// <p>Reserved.</p>
    pub fn extended_support(&self) -> ::std::option::Option<bool> {
        self.extended_support
    }
    /// <p>Contains CloudWatch log configuration metadata and settings.</p>
    pub fn monitoring_configuration(&self) -> ::std::option::Option<&crate::types::MonitoringConfiguration> {
        self.monitoring_configuration.as_ref()
    }
    /// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
    pub fn session_enabled(&self) -> ::std::option::Option<bool> {
        self.session_enabled
    }
}
impl RunJobFlowInput {
    /// Creates a new builder-style object to manufacture [`RunJobFlowInput`](crate::operation::run_job_flow::RunJobFlowInput).
    pub fn builder() -> crate::operation::run_job_flow::builders::RunJobFlowInputBuilder {
        crate::operation::run_job_flow::builders::RunJobFlowInputBuilder::default()
    }
}

/// A builder for [`RunJobFlowInput`](crate::operation::run_job_flow::RunJobFlowInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct RunJobFlowInputBuilder {
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) log_uri: ::std::option::Option<::std::string::String>,
    pub(crate) log_encryption_kms_key_id: ::std::option::Option<::std::string::String>,
    pub(crate) additional_info: ::std::option::Option<::std::string::String>,
    pub(crate) ami_version: ::std::option::Option<::std::string::String>,
    pub(crate) release_label: ::std::option::Option<::std::string::String>,
    pub(crate) instances: ::std::option::Option<crate::types::JobFlowInstancesConfig>,
    pub(crate) steps: ::std::option::Option<::std::vec::Vec<crate::types::StepConfig>>,
    pub(crate) step_execution_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) bootstrap_actions: ::std::option::Option<::std::vec::Vec<crate::types::BootstrapActionConfig>>,
    pub(crate) supported_products: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) new_supported_products: ::std::option::Option<::std::vec::Vec<crate::types::SupportedProductConfig>>,
    pub(crate) applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
    pub(crate) configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
    pub(crate) visible_to_all_users: ::std::option::Option<bool>,
    pub(crate) job_flow_role: ::std::option::Option<::std::string::String>,
    pub(crate) service_role: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) security_configuration: ::std::option::Option<::std::string::String>,
    pub(crate) auto_scaling_role: ::std::option::Option<::std::string::String>,
    pub(crate) scale_down_behavior: ::std::option::Option<crate::types::ScaleDownBehavior>,
    pub(crate) custom_ami_id: ::std::option::Option<::std::string::String>,
    pub(crate) ebs_root_volume_size: ::std::option::Option<i32>,
    pub(crate) repo_upgrade_on_boot: ::std::option::Option<crate::types::RepoUpgradeOnBoot>,
    pub(crate) kerberos_attributes: ::std::option::Option<crate::types::KerberosAttributes>,
    pub(crate) step_concurrency_level: ::std::option::Option<i32>,
    pub(crate) managed_scaling_policy: ::std::option::Option<crate::types::ManagedScalingPolicy>,
    pub(crate) placement_group_configs: ::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>>,
    pub(crate) auto_termination_policy: ::std::option::Option<crate::types::AutoTerminationPolicy>,
    pub(crate) os_release_label: ::std::option::Option<::std::string::String>,
    pub(crate) ebs_root_volume_iops: ::std::option::Option<i32>,
    pub(crate) ebs_root_volume_throughput: ::std::option::Option<i32>,
    pub(crate) extended_support: ::std::option::Option<bool>,
    pub(crate) monitoring_configuration: ::std::option::Option<crate::types::MonitoringConfiguration>,
    pub(crate) session_enabled: ::std::option::Option<bool>,
}
impl RunJobFlowInputBuilder {
    /// <p>The name of the job flow.</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 job flow.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the job flow.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
    pub fn log_uri(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.log_uri = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
    pub fn set_log_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.log_uri = input;
        self
    }
    /// <p>The location in Amazon S3 to write the log files of the job flow. If a value is not provided, logs are not created.</p>
    pub fn get_log_uri(&self) -> &::std::option::Option<::std::string::String> {
        &self.log_uri
    }
    /// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
    pub fn log_encryption_kms_key_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.log_encryption_kms_key_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
    pub fn set_log_encryption_kms_key_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.log_encryption_kms_key_id = input;
        self
    }
    /// <p>The KMS key used for encrypting log files. If a value is not provided, the logs remain encrypted by AES-256. This attribute is only available with Amazon EMR releases 5.30.0 and later, excluding Amazon EMR 6.0.0.</p>
    pub fn get_log_encryption_kms_key_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.log_encryption_kms_key_id
    }
    /// <p>A JSON string for selecting additional features.</p>
    pub fn additional_info(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.additional_info = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A JSON string for selecting additional features.</p>
    pub fn set_additional_info(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.additional_info = input;
        self
    }
    /// <p>A JSON string for selecting additional features.</p>
    pub fn get_additional_info(&self) -> &::std::option::Option<::std::string::String> {
        &self.additional_info
    }
    /// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
    pub fn ami_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.ami_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
    pub fn set_ami_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.ami_version = input;
        self
    }
    /// <p>Applies only to Amazon EMR AMI versions 3.x and 2.x. For Amazon EMR releases 4.0 and later, <code>ReleaseLabel</code> is used. To specify a custom AMI, use <code>CustomAmiID</code>.</p>
    pub fn get_ami_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.ami_version
    }
    /// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
    pub fn release_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.release_label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
    pub fn set_release_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.release_label = input;
        self
    }
    /// <p>The Amazon EMR release label, which determines the version of open-source application packages installed on the cluster. Release labels are in the form <code>emr-x.x.x</code>, where x.x.x is an Amazon EMR release version such as <code>emr-5.14.0</code>. For more information about Amazon EMR release versions and included application versions and features, see <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">https://docs.aws.amazon.com/emr/latest/ReleaseGuide/</a>. The release label applies only to Amazon EMR releases version 4.0 and later. Earlier versions use <code>AmiVersion</code>.</p>
    pub fn get_release_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.release_label
    }
    /// <p>A specification of the number and type of Amazon EC2 instances.</p>
    /// This field is required.
    pub fn instances(mut self, input: crate::types::JobFlowInstancesConfig) -> Self {
        self.instances = ::std::option::Option::Some(input);
        self
    }
    /// <p>A specification of the number and type of Amazon EC2 instances.</p>
    pub fn set_instances(mut self, input: ::std::option::Option<crate::types::JobFlowInstancesConfig>) -> Self {
        self.instances = input;
        self
    }
    /// <p>A specification of the number and type of Amazon EC2 instances.</p>
    pub fn get_instances(&self) -> &::std::option::Option<crate::types::JobFlowInstancesConfig> {
        &self.instances
    }
    /// Appends an item to `steps`.
    ///
    /// To override the contents of this collection use [`set_steps`](Self::set_steps).
    ///
    /// <p>A list of steps to run.</p>
    pub fn steps(mut self, input: crate::types::StepConfig) -> Self {
        let mut v = self.steps.unwrap_or_default();
        v.push(input);
        self.steps = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of steps to run.</p>
    pub fn set_steps(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::StepConfig>>) -> Self {
        self.steps = input;
        self
    }
    /// <p>A list of steps to run.</p>
    pub fn get_steps(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::StepConfig>> {
        &self.steps
    }
    /// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
    /// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
    /// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
    pub fn step_execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.step_execution_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
    /// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
    /// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
    pub fn set_step_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.step_execution_role_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the runtime role for steps specified in the RunJobFlow request. The runtime role can be a cross-account IAM role. The runtime role ARN is a combination of account ID, role name, and role type using the following format: <code>arn:partition:iam::account-id:role/role-name</code>.</p>
    /// <p>For example, <code>arn:aws:iam::1234567890:role/ReadOnly</code> is a correctly formatted runtime role ARN.</p>
    /// <p>This parameter applies only to steps included in the <code>Steps</code> parameter of this RunJobFlow request. It does not apply to steps added later to the cluster.</p>
    pub fn get_step_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.step_execution_role_arn
    }
    /// Appends an item to `bootstrap_actions`.
    ///
    /// To override the contents of this collection use [`set_bootstrap_actions`](Self::set_bootstrap_actions).
    ///
    /// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p>
    pub fn bootstrap_actions(mut self, input: crate::types::BootstrapActionConfig) -> Self {
        let mut v = self.bootstrap_actions.unwrap_or_default();
        v.push(input);
        self.bootstrap_actions = ::std::option::Option::Some(v);
        self
    }
    /// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p>
    pub fn set_bootstrap_actions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::BootstrapActionConfig>>) -> Self {
        self.bootstrap_actions = input;
        self
    }
    /// <p>A list of bootstrap actions to run before Hadoop starts on the cluster nodes.</p>
    pub fn get_bootstrap_actions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::BootstrapActionConfig>> {
        &self.bootstrap_actions
    }
    /// Appends an item to `supported_products`.
    ///
    /// To override the contents of this collection use [`set_supported_products`](Self::set_supported_products).
    ///
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
    /// </ul>
    pub fn supported_products(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.supported_products.unwrap_or_default();
        v.push(input.into());
        self.supported_products = ::std::option::Option::Some(v);
        self
    }
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
    /// </ul>
    pub fn set_supported_products(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.supported_products = input;
        self
    }
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use. For more information, see the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Currently supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the job flow using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the job flow using MapR M5 Edition.</p></li>
    /// </ul>
    pub fn get_supported_products(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.supported_products
    }
    /// Appends an item to `new_supported_products`.
    ///
    /// To override the contents of this collection use [`set_new_supported_products`](Self::set_new_supported_products).
    ///
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
    /// <li>
    /// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
    /// <li>
    /// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
    /// <li>
    /// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
    /// <li>
    /// <p>"hue"- launch the cluster with Hue installed.</p></li>
    /// <li>
    /// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
    /// <li>
    /// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
    /// </ul>
    pub fn new_supported_products(mut self, input: crate::types::SupportedProductConfig) -> Self {
        let mut v = self.new_supported_products.unwrap_or_default();
        v.push(input);
        self.new_supported_products = ::std::option::Option::Some(v);
        self
    }
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
    /// <li>
    /// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
    /// <li>
    /// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
    /// <li>
    /// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
    /// <li>
    /// <p>"hue"- launch the cluster with Hue installed.</p></li>
    /// <li>
    /// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
    /// <li>
    /// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
    /// </ul>
    pub fn set_new_supported_products(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SupportedProductConfig>>) -> Self {
        self.new_supported_products = input;
        self
    }
    /// <note>
    /// <p>For Amazon EMR releases 3.x and 2.x. For Amazon EMR releases 4.x and later, use Applications.</p>
    /// </note>
    /// <p>A list of strings that indicates third-party software to use with the job flow that accepts a user argument list. Amazon EMR accepts and forwards the argument list to the corresponding installation script as bootstrap action arguments. For more information, see "Launch a Job Flow on the MapR Distribution for Hadoop" in the <a href="https://docs.aws.amazon.com/emr/latest/DeveloperGuide/emr-dg.pdf">Amazon EMR Developer Guide</a>. Supported values are:</p>
    /// <ul>
    /// <li>
    /// <p>"mapr-m3" - launch the cluster using MapR M3 Edition.</p></li>
    /// <li>
    /// <p>"mapr-m5" - launch the cluster using MapR M5 Edition.</p></li>
    /// <li>
    /// <p>"mapr" with the user arguments specifying "--edition,m3" or "--edition,m5" - launch the job flow using MapR M3 or M5 Edition respectively.</p></li>
    /// <li>
    /// <p>"mapr-m7" - launch the cluster using MapR M7 Edition.</p></li>
    /// <li>
    /// <p>"hunk" - launch the cluster with the Hunk Big Data Analytics Platform.</p></li>
    /// <li>
    /// <p>"hue"- launch the cluster with Hue installed.</p></li>
    /// <li>
    /// <p>"spark" - launch the cluster with Apache Spark installed.</p></li>
    /// <li>
    /// <p>"ganglia" - launch the cluster with the Ganglia Monitoring System installed.</p></li>
    /// </ul>
    pub fn get_new_supported_products(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SupportedProductConfig>> {
        &self.new_supported_products
    }
    /// Appends an item to `applications`.
    ///
    /// To override the contents of this collection use [`set_applications`](Self::set_applications).
    ///
    /// <p>Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</p>
    pub fn applications(mut self, input: crate::types::Application) -> Self {
        let mut v = self.applications.unwrap_or_default();
        v.push(input);
        self.applications = ::std::option::Option::Some(v);
        self
    }
    /// <p>Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</p>
    pub fn set_applications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Application>>) -> Self {
        self.applications = input;
        self
    }
    /// <p>Applies to Amazon EMR releases 4.0 and later. A case-insensitive list of applications for Amazon EMR to install and configure when launching the cluster. For a list of applications available for each Amazon EMR release version, see the <a href="https://docs.aws.amazon.com/emr/latest/ReleaseGuide/">Amazon EMRRelease Guide</a>.</p>
    pub fn get_applications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Application>> {
        &self.applications
    }
    /// Appends an item to `configurations`.
    ///
    /// To override the contents of this collection use [`set_configurations`](Self::set_configurations).
    ///
    /// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</p>
    pub fn configurations(mut self, input: crate::types::Configuration) -> Self {
        let mut v = self.configurations.unwrap_or_default();
        v.push(input);
        self.configurations = ::std::option::Option::Some(v);
        self
    }
    /// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</p>
    pub fn set_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>) -> Self {
        self.configurations = input;
        self
    }
    /// <p>For Amazon EMR releases 4.0 and later. The list of configurations supplied for the Amazon EMR cluster that you are creating.</p>
    pub fn get_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Configuration>> {
        &self.configurations
    }
    /// <important>
    /// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
    /// </important>
    /// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
    /// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub fn visible_to_all_users(mut self, input: bool) -> Self {
        self.visible_to_all_users = ::std::option::Option::Some(input);
        self
    }
    /// <important>
    /// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
    /// </important>
    /// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
    /// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub fn set_visible_to_all_users(mut self, input: ::std::option::Option<bool>) -> Self {
        self.visible_to_all_users = input;
        self
    }
    /// <important>
    /// <p>The VisibleToAllUsers parameter is no longer supported. By default, the value is set to <code>true</code>. Setting it to <code>false</code> now has no effect.</p>
    /// </important>
    /// <p>Set this value to <code>true</code> so that IAM principals in the Amazon Web Services account associated with the cluster can perform Amazon EMR actions on the cluster that their IAM policies allow. This value defaults to <code>true</code> for clusters created using the Amazon EMR API or the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command.</p>
    /// <p>When set to <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions for the cluster, regardless of the IAM permissions policies attached to other IAM principals. For more information, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/security_IAM_emr-with-IAM.html#security_set_visible_to_all_users">Understanding the Amazon EMR cluster VisibleToAllUsers setting</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub fn get_visible_to_all_users(&self) -> &::std::option::Option<bool> {
        &self.visible_to_all_users
    }
    /// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
    pub fn job_flow_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.job_flow_role = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
    pub fn set_job_flow_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.job_flow_role = input;
        self
    }
    /// <p>Also called instance profile and Amazon EC2 role. An IAM role for an Amazon EMR cluster. The Amazon EC2 instances of the cluster assume this role. The default role is <code>EMR_EC2_DefaultRole</code>. In order to use the default role, you must have already created it using the CLI or console.</p>
    pub fn get_job_flow_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.job_flow_role
    }
    /// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
    pub fn service_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.service_role = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
    pub fn set_service_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.service_role = input;
        self
    }
    /// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf. If you've created a custom service role path, you must specify it for the service role when you launch your cluster.</p>
    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_role
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</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>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</p>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A list of tags to associate with a cluster and propagate to Amazon EC2 instances.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The name of a security configuration to apply to the cluster.</p>
    pub fn security_configuration(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.security_configuration = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of a security configuration to apply to the cluster.</p>
    pub fn set_security_configuration(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.security_configuration = input;
        self
    }
    /// <p>The name of a security configuration to apply to the cluster.</p>
    pub fn get_security_configuration(&self) -> &::std::option::Option<::std::string::String> {
        &self.security_configuration
    }
    /// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
    pub fn auto_scaling_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.auto_scaling_role = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
    pub fn set_auto_scaling_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.auto_scaling_role = input;
        self
    }
    /// <p>An IAM role for automatic scaling policies. The default role is <code>EMR_AutoScaling_DefaultRole</code>. The IAM role provides permissions that the automatic scaling feature requires to launch and terminate Amazon EC2 instances in an instance group.</p>
    pub fn get_auto_scaling_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.auto_scaling_role
    }
    /// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
    pub fn scale_down_behavior(mut self, input: crate::types::ScaleDownBehavior) -> Self {
        self.scale_down_behavior = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
    pub fn set_scale_down_behavior(mut self, input: ::std::option::Option<crate::types::ScaleDownBehavior>) -> Self {
        self.scale_down_behavior = input;
        self
    }
    /// <p>Specifies the way that individual Amazon EC2 instances terminate when an automatic scale-in activity occurs or an instance group is resized. <code>TERMINATE_AT_INSTANCE_HOUR</code> indicates that Amazon EMR terminates nodes at the instance-hour boundary, regardless of when the request to terminate the instance was submitted. This option is only available with Amazon EMR 5.1.0 and later and is the default for clusters created using that version. <code>TERMINATE_AT_TASK_COMPLETION</code> indicates that Amazon EMR adds nodes to a deny list and drains tasks from nodes before terminating the Amazon EC2 instances, regardless of the instance-hour boundary. With either behavior, Amazon EMR removes the least active nodes first and blocks instance termination if it could lead to HDFS corruption. <code>TERMINATE_AT_TASK_COMPLETION</code> available only in Amazon EMR releases 4.1.0 and later, and is the default for releases of Amazon EMR earlier than 5.1.0.</p>
    pub fn get_scale_down_behavior(&self) -> &::std::option::Option<crate::types::ScaleDownBehavior> {
        &self.scale_down_behavior
    }
    /// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
    /// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
    pub fn custom_ami_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.custom_ami_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
    /// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
    pub fn set_custom_ami_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.custom_ami_id = input;
        self
    }
    /// <p>Available only in Amazon EMR releases 5.7.0 and later. The ID of a custom Amazon EBS-backed Linux AMI. If specified, Amazon EMR uses this AMI when it launches cluster Amazon EC2 instances. For more information about custom AMIs in Amazon EMR, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-custom-ami.html">Using a Custom AMI</a> in the <i>Amazon EMR Management Guide</i>. If omitted, the cluster uses the base Linux AMI for the <code>ReleaseLabel</code> specified. For Amazon EMR releases 2.x and 3.x, use <code>AmiVersion</code> instead.</p>
    /// <p>For information about creating a custom AMI, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/creating-an-ami-ebs.html">Creating an Amazon EBS-Backed Linux AMI</a> in the <i>Amazon Elastic Compute Cloud User Guide for Linux Instances</i>. For information about finding an AMI ID, see <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html">Finding a Linux AMI</a>.</p>
    pub fn get_custom_ami_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.custom_ami_id
    }
    /// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
    pub fn ebs_root_volume_size(mut self, input: i32) -> Self {
        self.ebs_root_volume_size = ::std::option::Option::Some(input);
        self
    }
    /// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
    pub fn set_ebs_root_volume_size(mut self, input: ::std::option::Option<i32>) -> Self {
        self.ebs_root_volume_size = input;
        self
    }
    /// <p>The size, in GiB, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 4.x and later.</p>
    pub fn get_ebs_root_volume_size(&self) -> &::std::option::Option<i32> {
        &self.ebs_root_volume_size
    }
    /// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
    pub fn repo_upgrade_on_boot(mut self, input: crate::types::RepoUpgradeOnBoot) -> Self {
        self.repo_upgrade_on_boot = ::std::option::Option::Some(input);
        self
    }
    /// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
    pub fn set_repo_upgrade_on_boot(mut self, input: ::std::option::Option<crate::types::RepoUpgradeOnBoot>) -> Self {
        self.repo_upgrade_on_boot = input;
        self
    }
    /// <p>Applies only when <code>CustomAmiID</code> is used. Specifies which updates from the Amazon Linux AMI package repositories to apply automatically when the instance boots using the AMI. If omitted, the default is <code>SECURITY</code>, which indicates that only security updates are applied. If <code>NONE</code> is specified, no updates are applied, and all updates must be applied manually.</p>
    pub fn get_repo_upgrade_on_boot(&self) -> &::std::option::Option<crate::types::RepoUpgradeOnBoot> {
        &self.repo_upgrade_on_boot
    }
    /// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub fn kerberos_attributes(mut self, input: crate::types::KerberosAttributes) -> Self {
        self.kerberos_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub fn set_kerberos_attributes(mut self, input: ::std::option::Option<crate::types::KerberosAttributes>) -> Self {
        self.kerberos_attributes = input;
        self
    }
    /// <p>Attributes for Kerberos configuration when Kerberos authentication is enabled using a security configuration. For more information see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-kerberos.html">Use Kerberos Authentication</a> in the <i>Amazon EMR Management Guide</i>.</p>
    pub fn get_kerberos_attributes(&self) -> &::std::option::Option<crate::types::KerberosAttributes> {
        &self.kerberos_attributes
    }
    /// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
    pub fn step_concurrency_level(mut self, input: i32) -> Self {
        self.step_concurrency_level = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
    pub fn set_step_concurrency_level(mut self, input: ::std::option::Option<i32>) -> Self {
        self.step_concurrency_level = input;
        self
    }
    /// <p>Specifies the number of steps that can be executed concurrently. The default value is <code>1</code>. The maximum value is <code>256</code>.</p>
    pub fn get_step_concurrency_level(&self) -> &::std::option::Option<i32> {
        &self.step_concurrency_level
    }
    /// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
    pub fn managed_scaling_policy(mut self, input: crate::types::ManagedScalingPolicy) -> Self {
        self.managed_scaling_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
    pub fn set_managed_scaling_policy(mut self, input: ::std::option::Option<crate::types::ManagedScalingPolicy>) -> Self {
        self.managed_scaling_policy = input;
        self
    }
    /// <p>The specified managed scaling policy for an Amazon EMR cluster.</p>
    pub fn get_managed_scaling_policy(&self) -> &::std::option::Option<crate::types::ManagedScalingPolicy> {
        &self.managed_scaling_policy
    }
    /// Appends an item to `placement_group_configs`.
    ///
    /// To override the contents of this collection use [`set_placement_group_configs`](Self::set_placement_group_configs).
    ///
    /// <p>The specified placement group configuration for an Amazon EMR cluster.</p>
    pub fn placement_group_configs(mut self, input: crate::types::PlacementGroupConfig) -> Self {
        let mut v = self.placement_group_configs.unwrap_or_default();
        v.push(input);
        self.placement_group_configs = ::std::option::Option::Some(v);
        self
    }
    /// <p>The specified placement group configuration for an Amazon EMR cluster.</p>
    pub fn set_placement_group_configs(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>>) -> Self {
        self.placement_group_configs = input;
        self
    }
    /// <p>The specified placement group configuration for an Amazon EMR cluster.</p>
    pub fn get_placement_group_configs(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>> {
        &self.placement_group_configs
    }
    /// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
    pub fn auto_termination_policy(mut self, input: crate::types::AutoTerminationPolicy) -> Self {
        self.auto_termination_policy = ::std::option::Option::Some(input);
        self
    }
    /// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
    pub fn set_auto_termination_policy(mut self, input: ::std::option::Option<crate::types::AutoTerminationPolicy>) -> Self {
        self.auto_termination_policy = input;
        self
    }
    /// <p>An auto-termination policy for an Amazon EMR cluster. An auto-termination policy defines the amount of idle time in seconds after which a cluster automatically terminates. For alternative cluster termination options, see <a href="https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-plan-termination.html">Control cluster termination</a>.</p>
    pub fn get_auto_termination_policy(&self) -> &::std::option::Option<crate::types::AutoTerminationPolicy> {
        &self.auto_termination_policy
    }
    /// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
    pub fn os_release_label(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.os_release_label = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
    pub fn set_os_release_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.os_release_label = input;
        self
    }
    /// <p>Specifies a particular Amazon Linux release for all nodes in a cluster launch RunJobFlow request. If a release is not specified, Amazon EMR uses the latest validated Amazon Linux release for cluster launch.</p>
    pub fn get_os_release_label(&self) -> &::std::option::Option<::std::string::String> {
        &self.os_release_label
    }
    /// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub fn ebs_root_volume_iops(mut self, input: i32) -> Self {
        self.ebs_root_volume_iops = ::std::option::Option::Some(input);
        self
    }
    /// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub fn set_ebs_root_volume_iops(mut self, input: ::std::option::Option<i32>) -> Self {
        self.ebs_root_volume_iops = input;
        self
    }
    /// <p>The IOPS, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub fn get_ebs_root_volume_iops(&self) -> &::std::option::Option<i32> {
        &self.ebs_root_volume_iops
    }
    /// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub fn ebs_root_volume_throughput(mut self, input: i32) -> Self {
        self.ebs_root_volume_throughput = ::std::option::Option::Some(input);
        self
    }
    /// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub fn set_ebs_root_volume_throughput(mut self, input: ::std::option::Option<i32>) -> Self {
        self.ebs_root_volume_throughput = input;
        self
    }
    /// <p>The throughput, in MiB/s, of the Amazon EBS root device volume of the Linux AMI that is used for each Amazon EC2 instance. Available in Amazon EMR releases 6.15.0 and later.</p>
    pub fn get_ebs_root_volume_throughput(&self) -> &::std::option::Option<i32> {
        &self.ebs_root_volume_throughput
    }
    /// <p>Reserved.</p>
    pub fn extended_support(mut self, input: bool) -> Self {
        self.extended_support = ::std::option::Option::Some(input);
        self
    }
    /// <p>Reserved.</p>
    pub fn set_extended_support(mut self, input: ::std::option::Option<bool>) -> Self {
        self.extended_support = input;
        self
    }
    /// <p>Reserved.</p>
    pub fn get_extended_support(&self) -> &::std::option::Option<bool> {
        &self.extended_support
    }
    /// <p>Contains CloudWatch log configuration metadata and settings.</p>
    pub fn monitoring_configuration(mut self, input: crate::types::MonitoringConfiguration) -> Self {
        self.monitoring_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains CloudWatch log configuration metadata and settings.</p>
    pub fn set_monitoring_configuration(mut self, input: ::std::option::Option<crate::types::MonitoringConfiguration>) -> Self {
        self.monitoring_configuration = input;
        self
    }
    /// <p>Contains CloudWatch log configuration metadata and settings.</p>
    pub fn get_monitoring_configuration(&self) -> &::std::option::Option<crate::types::MonitoringConfiguration> {
        &self.monitoring_configuration
    }
    /// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
    pub fn session_enabled(mut self, input: bool) -> Self {
        self.session_enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
    pub fn set_session_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.session_enabled = input;
        self
    }
    /// <p>Indicates whether Spark Connect sessions are enabled on the cluster. When set to <code>true</code>, you can start Spark Connect sessions using the <code>StartSession</code> operation.</p>
    pub fn get_session_enabled(&self) -> &::std::option::Option<bool> {
        &self.session_enabled
    }
    /// Consumes the builder and constructs a [`RunJobFlowInput`](crate::operation::run_job_flow::RunJobFlowInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::run_job_flow::RunJobFlowInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::run_job_flow::RunJobFlowInput {
            name: self.name,
            log_uri: self.log_uri,
            log_encryption_kms_key_id: self.log_encryption_kms_key_id,
            additional_info: self.additional_info,
            ami_version: self.ami_version,
            release_label: self.release_label,
            instances: self.instances,
            steps: self.steps,
            step_execution_role_arn: self.step_execution_role_arn,
            bootstrap_actions: self.bootstrap_actions,
            supported_products: self.supported_products,
            new_supported_products: self.new_supported_products,
            applications: self.applications,
            configurations: self.configurations,
            visible_to_all_users: self.visible_to_all_users,
            job_flow_role: self.job_flow_role,
            service_role: self.service_role,
            tags: self.tags,
            security_configuration: self.security_configuration,
            auto_scaling_role: self.auto_scaling_role,
            scale_down_behavior: self.scale_down_behavior,
            custom_ami_id: self.custom_ami_id,
            ebs_root_volume_size: self.ebs_root_volume_size,
            repo_upgrade_on_boot: self.repo_upgrade_on_boot,
            kerberos_attributes: self.kerberos_attributes,
            step_concurrency_level: self.step_concurrency_level,
            managed_scaling_policy: self.managed_scaling_policy,
            placement_group_configs: self.placement_group_configs,
            auto_termination_policy: self.auto_termination_policy,
            os_release_label: self.os_release_label,
            ebs_root_volume_iops: self.ebs_root_volume_iops,
            ebs_root_volume_throughput: self.ebs_root_volume_throughput,
            extended_support: self.extended_support,
            monitoring_configuration: self.monitoring_configuration,
            session_enabled: self.session_enabled,
        })
    }
}