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

/// <p>The detailed description of the cluster.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Cluster {
    /// <p>The unique identifier for the cluster.</p>
    pub id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the cluster. This parameter can't contain the characters &lt;, &gt;, $, |, or ` (backtick).</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>The current status details about the cluster.</p>
    pub status: ::std::option::Option<crate::types::ClusterStatus>,
    /// <p>Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.</p>
    pub ec2_instance_attributes: ::std::option::Option<crate::types::Ec2InstanceAttributes>,
    /// <note>
    /// <p>The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.</p>
    /// </note>
    /// <p>The instance group configuration of the cluster. A value of <code>INSTANCE_GROUP</code> indicates a uniform instance group configuration. A value of <code>INSTANCE_FLEET</code> indicates an instance fleets configuration.</p>
    pub instance_collection_type: ::std::option::Option<crate::types::InstanceCollectionType>,
    /// <p>The path to the Amazon S3 location where logs for this cluster are stored.</p>
    pub log_uri: ::std::option::Option<::std::string::String>,
    /// <p>The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 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>The AMI version requested for this cluster.</p>
    pub requested_ami_version: ::std::option::Option<::std::string::String>,
    /// <p>The AMI version running on this cluster.</p>
    pub running_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>Specifies whether the cluster should terminate after completing all steps.</p>
    pub auto_terminate: ::std::option::Option<bool>,
    /// <p>Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.</p>
    pub termination_protected: ::std::option::Option<bool>,
    /// <p>Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded within the cluster.</p>
    pub unhealthy_node_replacement: ::std::option::Option<bool>,
    /// <p>Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When <code>true</code>, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster actions on the cluster that their IAM policies allow. When <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions policies attached to other IAM principals.</p>
    /// <p>The default value is <code>true</code> if a value is not provided when creating a cluster using the Amazon EMR API <code>RunJobFlow</code> command, the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command, or the Amazon Web Services Management Console.</p>
    pub visible_to_all_users: ::std::option::Option<bool>,
    /// <p>The applications installed on this cluster.</p>
    pub applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
    /// <p>A list of tags associated with a cluster.</p>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf.</p>
    pub service_role: ::std::option::Option<::std::string::String>,
    /// <p>An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.</p>
    pub normalized_instance_hours: ::std::option::Option<i32>,
    /// <p>The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.</p>
    pub master_public_dns_name: ::std::option::Option<::std::string::String>,
    /// <p>Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.</p>
    pub configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
    /// <p>The name of the security configuration applied 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>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> is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions 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 the cluster uses a custom AMI.</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 the type of updates that the Amazon Linux AMI package repositories apply when an instance boots using the AMI.</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>The Amazon Resource Name of the cluster.</p>
    pub cluster_arn: ::std::option::Option<::std::string::String>,
    /// <p>The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.</p>
    pub outpost_arn: ::std::option::Option<::std::string::String>,
    /// <p>Specifies the number of steps that can be executed concurrently.</p>
    pub step_concurrency_level: ::std::option::Option<i32>,
    /// <p>Placement group configured for an Amazon EMR cluster.</p>
    pub placement_groups: ::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>>,
    /// <p>The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.</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.</p>
    pub session_enabled: ::std::option::Option<bool>,
}
impl Cluster {
    /// <p>The unique identifier for the cluster.</p>
    pub fn id(&self) -> ::std::option::Option<&str> {
        self.id.as_deref()
    }
    /// <p>The name of the cluster. This parameter can't contain the characters &lt;, &gt;, $, |, or ` (backtick).</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>The current status details about the cluster.</p>
    pub fn status(&self) -> ::std::option::Option<&crate::types::ClusterStatus> {
        self.status.as_ref()
    }
    /// <p>Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.</p>
    pub fn ec2_instance_attributes(&self) -> ::std::option::Option<&crate::types::Ec2InstanceAttributes> {
        self.ec2_instance_attributes.as_ref()
    }
    /// <note>
    /// <p>The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.</p>
    /// </note>
    /// <p>The instance group configuration of the cluster. A value of <code>INSTANCE_GROUP</code> indicates a uniform instance group configuration. A value of <code>INSTANCE_FLEET</code> indicates an instance fleets configuration.</p>
    pub fn instance_collection_type(&self) -> ::std::option::Option<&crate::types::InstanceCollectionType> {
        self.instance_collection_type.as_ref()
    }
    /// <p>The path to the Amazon S3 location where logs for this cluster are stored.</p>
    pub fn log_uri(&self) -> ::std::option::Option<&str> {
        self.log_uri.as_deref()
    }
    /// <p>The KMS key used for encrypting log files. This attribute is only available with Amazon EMR 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>The AMI version requested for this cluster.</p>
    pub fn requested_ami_version(&self) -> ::std::option::Option<&str> {
        self.requested_ami_version.as_deref()
    }
    /// <p>The AMI version running on this cluster.</p>
    pub fn running_ami_version(&self) -> ::std::option::Option<&str> {
        self.running_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>Specifies whether the cluster should terminate after completing all steps.</p>
    pub fn auto_terminate(&self) -> ::std::option::Option<bool> {
        self.auto_terminate
    }
    /// <p>Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.</p>
    pub fn termination_protected(&self) -> ::std::option::Option<bool> {
        self.termination_protected
    }
    /// <p>Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded within the cluster.</p>
    pub fn unhealthy_node_replacement(&self) -> ::std::option::Option<bool> {
        self.unhealthy_node_replacement
    }
    /// <p>Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When <code>true</code>, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster actions on the cluster that their IAM policies allow. When <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions policies attached to other IAM principals.</p>
    /// <p>The default value is <code>true</code> if a value is not provided when creating a cluster using the Amazon EMR API <code>RunJobFlow</code> command, the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command, or the Amazon Web Services Management Console.</p>
    pub fn visible_to_all_users(&self) -> ::std::option::Option<bool> {
        self.visible_to_all_users
    }
    /// <p>The applications installed on this 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 `.applications.is_none()`.
    pub fn applications(&self) -> &[crate::types::Application] {
        self.applications.as_deref().unwrap_or_default()
    }
    /// <p>A list of tags associated with a 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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf.</p>
    pub fn service_role(&self) -> ::std::option::Option<&str> {
        self.service_role.as_deref()
    }
    /// <p>An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.</p>
    pub fn normalized_instance_hours(&self) -> ::std::option::Option<i32> {
        self.normalized_instance_hours
    }
    /// <p>The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.</p>
    pub fn master_public_dns_name(&self) -> ::std::option::Option<&str> {
        self.master_public_dns_name.as_deref()
    }
    /// <p>Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the 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 `.configurations.is_none()`.
    pub fn configurations(&self) -> &[crate::types::Configuration] {
        self.configurations.as_deref().unwrap_or_default()
    }
    /// <p>The name of the security configuration applied 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>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> is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions 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 the cluster uses a custom AMI.</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 the type of updates that the Amazon Linux AMI package repositories apply when an instance boots using the AMI.</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>The Amazon Resource Name of the cluster.</p>
    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
        self.cluster_arn.as_deref()
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.</p>
    pub fn outpost_arn(&self) -> ::std::option::Option<&str> {
        self.outpost_arn.as_deref()
    }
    /// <p>Specifies the number of steps that can be executed concurrently.</p>
    pub fn step_concurrency_level(&self) -> ::std::option::Option<i32> {
        self.step_concurrency_level
    }
    /// <p>Placement group configured 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_groups.is_none()`.
    pub fn placement_groups(&self) -> &[crate::types::PlacementGroupConfig] {
        self.placement_groups.as_deref().unwrap_or_default()
    }
    /// <p>The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.</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.</p>
    pub fn session_enabled(&self) -> ::std::option::Option<bool> {
        self.session_enabled
    }
}
impl Cluster {
    /// Creates a new builder-style object to manufacture [`Cluster`](crate::types::Cluster).
    pub fn builder() -> crate::types::builders::ClusterBuilder {
        crate::types::builders::ClusterBuilder::default()
    }
}

/// A builder for [`Cluster`](crate::types::Cluster).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ClusterBuilder {
    pub(crate) id: ::std::option::Option<::std::string::String>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) status: ::std::option::Option<crate::types::ClusterStatus>,
    pub(crate) ec2_instance_attributes: ::std::option::Option<crate::types::Ec2InstanceAttributes>,
    pub(crate) instance_collection_type: ::std::option::Option<crate::types::InstanceCollectionType>,
    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) requested_ami_version: ::std::option::Option<::std::string::String>,
    pub(crate) running_ami_version: ::std::option::Option<::std::string::String>,
    pub(crate) release_label: ::std::option::Option<::std::string::String>,
    pub(crate) auto_terminate: ::std::option::Option<bool>,
    pub(crate) termination_protected: ::std::option::Option<bool>,
    pub(crate) unhealthy_node_replacement: ::std::option::Option<bool>,
    pub(crate) visible_to_all_users: ::std::option::Option<bool>,
    pub(crate) applications: ::std::option::Option<::std::vec::Vec<crate::types::Application>>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) service_role: ::std::option::Option<::std::string::String>,
    pub(crate) normalized_instance_hours: ::std::option::Option<i32>,
    pub(crate) master_public_dns_name: ::std::option::Option<::std::string::String>,
    pub(crate) configurations: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>,
    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) cluster_arn: ::std::option::Option<::std::string::String>,
    pub(crate) outpost_arn: ::std::option::Option<::std::string::String>,
    pub(crate) step_concurrency_level: ::std::option::Option<i32>,
    pub(crate) placement_groups: ::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>>,
    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 ClusterBuilder {
    /// <p>The unique identifier for the cluster.</p>
    pub fn id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The unique identifier for the cluster.</p>
    pub fn set_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.id = input;
        self
    }
    /// <p>The unique identifier for the cluster.</p>
    pub fn get_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.id
    }
    /// <p>The name of the cluster. This parameter can't contain the characters &lt;, &gt;, $, |, or ` (backtick).</p>
    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 cluster. This parameter can't contain the characters &lt;, &gt;, $, |, or ` (backtick).</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name of the cluster. This parameter can't contain the characters &lt;, &gt;, $, |, or ` (backtick).</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>The current status details about the cluster.</p>
    pub fn status(mut self, input: crate::types::ClusterStatus) -> Self {
        self.status = ::std::option::Option::Some(input);
        self
    }
    /// <p>The current status details about the cluster.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::ClusterStatus>) -> Self {
        self.status = input;
        self
    }
    /// <p>The current status details about the cluster.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::ClusterStatus> {
        &self.status
    }
    /// <p>Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.</p>
    pub fn ec2_instance_attributes(mut self, input: crate::types::Ec2InstanceAttributes) -> Self {
        self.ec2_instance_attributes = ::std::option::Option::Some(input);
        self
    }
    /// <p>Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.</p>
    pub fn set_ec2_instance_attributes(mut self, input: ::std::option::Option<crate::types::Ec2InstanceAttributes>) -> Self {
        self.ec2_instance_attributes = input;
        self
    }
    /// <p>Provides information about the Amazon EC2 instances in a cluster grouped by category. For example, key name, subnet ID, IAM instance profile, and so on.</p>
    pub fn get_ec2_instance_attributes(&self) -> &::std::option::Option<crate::types::Ec2InstanceAttributes> {
        &self.ec2_instance_attributes
    }
    /// <note>
    /// <p>The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.</p>
    /// </note>
    /// <p>The instance group configuration of the cluster. A value of <code>INSTANCE_GROUP</code> indicates a uniform instance group configuration. A value of <code>INSTANCE_FLEET</code> indicates an instance fleets configuration.</p>
    pub fn instance_collection_type(mut self, input: crate::types::InstanceCollectionType) -> Self {
        self.instance_collection_type = ::std::option::Option::Some(input);
        self
    }
    /// <note>
    /// <p>The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.</p>
    /// </note>
    /// <p>The instance group configuration of the cluster. A value of <code>INSTANCE_GROUP</code> indicates a uniform instance group configuration. A value of <code>INSTANCE_FLEET</code> indicates an instance fleets configuration.</p>
    pub fn set_instance_collection_type(mut self, input: ::std::option::Option<crate::types::InstanceCollectionType>) -> Self {
        self.instance_collection_type = input;
        self
    }
    /// <note>
    /// <p>The instance fleet configuration is available only in Amazon EMR releases 4.8.0 and later, excluding 5.0.x versions.</p>
    /// </note>
    /// <p>The instance group configuration of the cluster. A value of <code>INSTANCE_GROUP</code> indicates a uniform instance group configuration. A value of <code>INSTANCE_FLEET</code> indicates an instance fleets configuration.</p>
    pub fn get_instance_collection_type(&self) -> &::std::option::Option<crate::types::InstanceCollectionType> {
        &self.instance_collection_type
    }
    /// <p>The path to the Amazon S3 location where logs for this cluster are stored.</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 path to the Amazon S3 location where logs for this cluster are stored.</p>
    pub fn set_log_uri(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.log_uri = input;
        self
    }
    /// <p>The path to the Amazon S3 location where logs for this cluster are stored.</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. This attribute is only available with Amazon EMR 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. This attribute is only available with Amazon EMR 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. This attribute is only available with Amazon EMR 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>The AMI version requested for this cluster.</p>
    pub fn requested_ami_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.requested_ami_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The AMI version requested for this cluster.</p>
    pub fn set_requested_ami_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.requested_ami_version = input;
        self
    }
    /// <p>The AMI version requested for this cluster.</p>
    pub fn get_requested_ami_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.requested_ami_version
    }
    /// <p>The AMI version running on this cluster.</p>
    pub fn running_ami_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.running_ami_version = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The AMI version running on this cluster.</p>
    pub fn set_running_ami_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.running_ami_version = input;
        self
    }
    /// <p>The AMI version running on this cluster.</p>
    pub fn get_running_ami_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.running_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>Specifies whether the cluster should terminate after completing all steps.</p>
    pub fn auto_terminate(mut self, input: bool) -> Self {
        self.auto_terminate = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies whether the cluster should terminate after completing all steps.</p>
    pub fn set_auto_terminate(mut self, input: ::std::option::Option<bool>) -> Self {
        self.auto_terminate = input;
        self
    }
    /// <p>Specifies whether the cluster should terminate after completing all steps.</p>
    pub fn get_auto_terminate(&self) -> &::std::option::Option<bool> {
        &self.auto_terminate
    }
    /// <p>Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.</p>
    pub fn termination_protected(mut self, input: bool) -> Self {
        self.termination_protected = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.</p>
    pub fn set_termination_protected(mut self, input: ::std::option::Option<bool>) -> Self {
        self.termination_protected = input;
        self
    }
    /// <p>Indicates whether Amazon EMR will lock the cluster to prevent the Amazon EC2 instances from being terminated by an API call or user intervention, or in the event of a cluster error.</p>
    pub fn get_termination_protected(&self) -> &::std::option::Option<bool> {
        &self.termination_protected
    }
    /// <p>Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded within the cluster.</p>
    pub fn unhealthy_node_replacement(mut self, input: bool) -> Self {
        self.unhealthy_node_replacement = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded within the cluster.</p>
    pub fn set_unhealthy_node_replacement(mut self, input: ::std::option::Option<bool>) -> Self {
        self.unhealthy_node_replacement = input;
        self
    }
    /// <p>Indicates whether Amazon EMR should gracefully replace Amazon EC2 core instances that have degraded within the cluster.</p>
    pub fn get_unhealthy_node_replacement(&self) -> &::std::option::Option<bool> {
        &self.unhealthy_node_replacement
    }
    /// <p>Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When <code>true</code>, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster actions on the cluster that their IAM policies allow. When <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions policies attached to other IAM principals.</p>
    /// <p>The default value is <code>true</code> if a value is not provided when creating a cluster using the Amazon EMR API <code>RunJobFlow</code> command, the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command, or the Amazon Web Services Management Console.</p>
    pub fn visible_to_all_users(mut self, input: bool) -> Self {
        self.visible_to_all_users = ::std::option::Option::Some(input);
        self
    }
    /// <p>Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When <code>true</code>, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster actions on the cluster that their IAM policies allow. When <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions policies attached to other IAM principals.</p>
    /// <p>The default value is <code>true</code> if a value is not provided when creating a cluster using the Amazon EMR API <code>RunJobFlow</code> command, the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command, or the Amazon Web Services Management Console.</p>
    pub fn set_visible_to_all_users(mut self, input: ::std::option::Option<bool>) -> Self {
        self.visible_to_all_users = input;
        self
    }
    /// <p>Indicates whether the cluster is visible to IAM principals in the Amazon Web Services account associated with the cluster. When <code>true</code>, IAM principals in the Amazon Web Services account can perform Amazon EMR cluster actions on the cluster that their IAM policies allow. When <code>false</code>, only the IAM principal that created the cluster and the Amazon Web Services account root user can perform Amazon EMR actions, regardless of IAM permissions policies attached to other IAM principals.</p>
    /// <p>The default value is <code>true</code> if a value is not provided when creating a cluster using the Amazon EMR API <code>RunJobFlow</code> command, the CLI <a href="https://docs.aws.amazon.com/cli/latest/reference/emr/create-cluster.html">create-cluster</a> command, or the Amazon Web Services Management Console.</p>
    pub fn get_visible_to_all_users(&self) -> &::std::option::Option<bool> {
        &self.visible_to_all_users
    }
    /// Appends an item to `applications`.
    ///
    /// To override the contents of this collection use [`set_applications`](Self::set_applications).
    ///
    /// <p>The applications installed on this cluster.</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>The applications installed on this cluster.</p>
    pub fn set_applications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Application>>) -> Self {
        self.applications = input;
        self
    }
    /// <p>The applications installed on this cluster.</p>
    pub fn get_applications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Application>> {
        &self.applications
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A list of tags associated with a cluster.</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 associated with a cluster.</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 associated with a cluster.</p>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// <p>The IAM role that Amazon EMR assumes in order to access Amazon Web Services resources on your behalf.</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.</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.</p>
    pub fn get_service_role(&self) -> &::std::option::Option<::std::string::String> {
        &self.service_role
    }
    /// <p>An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.</p>
    pub fn normalized_instance_hours(mut self, input: i32) -> Self {
        self.normalized_instance_hours = ::std::option::Option::Some(input);
        self
    }
    /// <p>An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.</p>
    pub fn set_normalized_instance_hours(mut self, input: ::std::option::Option<i32>) -> Self {
        self.normalized_instance_hours = input;
        self
    }
    /// <p>An approximation of the cost of the cluster, represented in m1.small/hours. This value is incremented one time for every hour an m1.small instance runs. Larger instances are weighted more, so an Amazon EC2 instance that is roughly four times more expensive would result in the normalized instance hours being incremented by four. This result is only an approximation and does not reflect the actual billing rate.</p>
    pub fn get_normalized_instance_hours(&self) -> &::std::option::Option<i32> {
        &self.normalized_instance_hours
    }
    /// <p>The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.</p>
    pub fn master_public_dns_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.master_public_dns_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.</p>
    pub fn set_master_public_dns_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.master_public_dns_name = input;
        self
    }
    /// <p>The DNS name of the master node. If the cluster is on a private subnet, this is the private DNS name. On a public subnet, this is the public DNS name.</p>
    pub fn get_master_public_dns_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.master_public_dns_name
    }
    /// Appends an item to `configurations`.
    ///
    /// To override the contents of this collection use [`set_configurations`](Self::set_configurations).
    ///
    /// <p>Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.</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>Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.</p>
    pub fn set_configurations(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Configuration>>) -> Self {
        self.configurations = input;
        self
    }
    /// <p>Applies only to Amazon EMR releases 4.x and later. The list of configurations that are supplied to the Amazon EMR cluster.</p>
    pub fn get_configurations(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Configuration>> {
        &self.configurations
    }
    /// <p>The name of the security configuration applied 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 the security configuration applied 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 the security configuration applied 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>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> is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions 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>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> is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions 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>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> is available only in Amazon EMR releases 4.1.0 and later, and is the default for versions 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 the cluster uses a custom AMI.</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 the cluster uses a custom AMI.</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 the cluster uses a custom AMI.</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 the type of updates that the Amazon Linux AMI package repositories apply when an instance boots using the AMI.</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 the type of updates that the Amazon Linux AMI package repositories apply when an instance boots using the AMI.</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 the type of updates that the Amazon Linux AMI package repositories apply when an instance boots using the AMI.</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>The Amazon Resource Name of the cluster.</p>
    pub fn cluster_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name of the cluster.</p>
    pub fn set_cluster_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_arn = input;
        self
    }
    /// <p>The Amazon Resource Name of the cluster.</p>
    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_arn
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.</p>
    pub fn outpost_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.outpost_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.</p>
    pub fn set_outpost_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.outpost_arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the Outpost where the cluster is launched.</p>
    pub fn get_outpost_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.outpost_arn
    }
    /// <p>Specifies the number of steps that can be executed concurrently.</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.</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.</p>
    pub fn get_step_concurrency_level(&self) -> &::std::option::Option<i32> {
        &self.step_concurrency_level
    }
    /// Appends an item to `placement_groups`.
    ///
    /// To override the contents of this collection use [`set_placement_groups`](Self::set_placement_groups).
    ///
    /// <p>Placement group configured for an Amazon EMR cluster.</p>
    pub fn placement_groups(mut self, input: crate::types::PlacementGroupConfig) -> Self {
        let mut v = self.placement_groups.unwrap_or_default();
        v.push(input);
        self.placement_groups = ::std::option::Option::Some(v);
        self
    }
    /// <p>Placement group configured for an Amazon EMR cluster.</p>
    pub fn set_placement_groups(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>>) -> Self {
        self.placement_groups = input;
        self
    }
    /// <p>Placement group configured for an Amazon EMR cluster.</p>
    pub fn get_placement_groups(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::PlacementGroupConfig>> {
        &self.placement_groups
    }
    /// <p>The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.</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>The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.</p>
    pub fn set_os_release_label(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.os_release_label = input;
        self
    }
    /// <p>The Amazon Linux release specified in a cluster launch RunJobFlow request. If no Amazon Linux release was specified, the default Amazon Linux release is shown in the response.</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.</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.</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.</p>
    pub fn get_session_enabled(&self) -> &::std::option::Option<bool> {
        &self.session_enabled
    }
    /// Consumes the builder and constructs a [`Cluster`](crate::types::Cluster).
    pub fn build(self) -> crate::types::Cluster {
        crate::types::Cluster {
            id: self.id,
            name: self.name,
            status: self.status,
            ec2_instance_attributes: self.ec2_instance_attributes,
            instance_collection_type: self.instance_collection_type,
            log_uri: self.log_uri,
            log_encryption_kms_key_id: self.log_encryption_kms_key_id,
            requested_ami_version: self.requested_ami_version,
            running_ami_version: self.running_ami_version,
            release_label: self.release_label,
            auto_terminate: self.auto_terminate,
            termination_protected: self.termination_protected,
            unhealthy_node_replacement: self.unhealthy_node_replacement,
            visible_to_all_users: self.visible_to_all_users,
            applications: self.applications,
            tags: self.tags,
            service_role: self.service_role,
            normalized_instance_hours: self.normalized_instance_hours,
            master_public_dns_name: self.master_public_dns_name,
            configurations: self.configurations,
            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,
            cluster_arn: self.cluster_arn,
            outpost_arn: self.outpost_arn,
            step_concurrency_level: self.step_concurrency_level,
            placement_groups: self.placement_groups,
            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,
        }
    }
}