aws-sdk-ecs 1.124.0

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

/// <p>A regional grouping of one or more container instances where you can run task requests. Each account receives a default cluster the first time you use the Amazon ECS service, but you may also create other clusters. Clusters may contain more than one instance type simultaneously.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Cluster {
    /// <p>The Amazon Resource Name (ARN) that identifies the cluster. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>
    pub cluster_arn: ::std::option::Option<::std::string::String>,
    /// <p>A user-generated string that you use to identify your cluster.</p>
    pub cluster_name: ::std::option::Option<::std::string::String>,
    /// <p>The execute command and managed storage configuration for the cluster.</p>
    pub configuration: ::std::option::Option<crate::types::ClusterConfiguration>,
    /// <p>The status of the cluster. The following are the possible states that are returned.</p>
    /// <dl>
    /// <dt>
    /// ACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.</p>
    /// </dd>
    /// <dt>
    /// PROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.</p>
    /// </dd>
    /// <dt>
    /// DEPROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.</p>
    /// </dd>
    /// <dt>
    /// FAILED
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.</p>
    /// </dd>
    /// <dt>
    /// INACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster has been deleted. Clusters with an <code>INACTIVE</code> status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on <code>INACTIVE</code> clusters persisting.</p>
    /// </dd>
    /// </dl>
    pub status: ::std::option::Option<::std::string::String>,
    /// <p>The number of container instances registered into the cluster. This includes container instances in both <code>ACTIVE</code> and <code>DRAINING</code> status.</p>
    pub registered_container_instances_count: i32,
    /// <p>The number of tasks in the cluster that are in the <code>RUNNING</code> state.</p>
    pub running_tasks_count: i32,
    /// <p>The number of tasks in the cluster that are in the <code>PENDING</code> state.</p>
    pub pending_tasks_count: i32,
    /// <p>The number of services that are running on the cluster in an <code>ACTIVE</code> state. You can view these services with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    pub active_services_count: i32,
    /// <p>Additional information about your clusters that are separated by launch type. They include the following:</p>
    /// <ul>
    /// <li>
    /// <p>runningEC2TasksCount</p></li>
    /// <li>
    /// <p>RunningFargateTasksCount</p></li>
    /// <li>
    /// <p>pendingEC2TasksCount</p></li>
    /// <li>
    /// <p>pendingFargateTasksCount</p></li>
    /// <li>
    /// <p>activeEC2ServiceCount</p></li>
    /// <li>
    /// <p>activeFargateServiceCount</p></li>
    /// <li>
    /// <p>drainingEC2ServiceCount</p></li>
    /// <li>
    /// <p>drainingFargateServiceCount</p></li>
    /// </ul>
    pub statistics: ::std::option::Option<::std::vec::Vec<crate::types::KeyValuePair>>,
    /// <p>The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    /// <p>The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.</p>
    pub settings: ::std::option::Option<::std::vec::Vec<crate::types::ClusterSetting>>,
    /// <p>The capacity providers associated with the cluster.</p>
    pub capacity_providers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    /// <p>The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.</p>
    pub default_capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
    /// <p>The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.</p>
    pub attachments: ::std::option::Option<::std::vec::Vec<crate::types::Attachment>>,
    /// <p>The status of the capacity providers associated with the cluster. The following are the states that are returned.</p>
    /// <dl>
    /// <dt>
    /// UPDATE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The available capacity providers for the cluster are updating.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity providers have successfully updated.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider updates failed.</p>
    /// </dd>
    /// </dl>
    pub attachments_status: ::std::option::Option<::std::string::String>,
    /// <p>Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the <code>enabled</code> parameter to <code>true</code> in the <code>ServiceConnectConfiguration</code>. You can set the namespace of each service individually in the <code>ServiceConnectConfiguration</code> to override this default parameter.</p>
    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub service_connect_defaults: ::std::option::Option<crate::types::ClusterServiceConnectDefaults>,
}
impl Cluster {
    /// <p>The Amazon Resource Name (ARN) that identifies the cluster. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>
    pub fn cluster_arn(&self) -> ::std::option::Option<&str> {
        self.cluster_arn.as_deref()
    }
    /// <p>A user-generated string that you use to identify your cluster.</p>
    pub fn cluster_name(&self) -> ::std::option::Option<&str> {
        self.cluster_name.as_deref()
    }
    /// <p>The execute command and managed storage configuration for the cluster.</p>
    pub fn configuration(&self) -> ::std::option::Option<&crate::types::ClusterConfiguration> {
        self.configuration.as_ref()
    }
    /// <p>The status of the cluster. The following are the possible states that are returned.</p>
    /// <dl>
    /// <dt>
    /// ACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.</p>
    /// </dd>
    /// <dt>
    /// PROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.</p>
    /// </dd>
    /// <dt>
    /// DEPROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.</p>
    /// </dd>
    /// <dt>
    /// FAILED
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.</p>
    /// </dd>
    /// <dt>
    /// INACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster has been deleted. Clusters with an <code>INACTIVE</code> status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on <code>INACTIVE</code> clusters persisting.</p>
    /// </dd>
    /// </dl>
    pub fn status(&self) -> ::std::option::Option<&str> {
        self.status.as_deref()
    }
    /// <p>The number of container instances registered into the cluster. This includes container instances in both <code>ACTIVE</code> and <code>DRAINING</code> status.</p>
    pub fn registered_container_instances_count(&self) -> i32 {
        self.registered_container_instances_count
    }
    /// <p>The number of tasks in the cluster that are in the <code>RUNNING</code> state.</p>
    pub fn running_tasks_count(&self) -> i32 {
        self.running_tasks_count
    }
    /// <p>The number of tasks in the cluster that are in the <code>PENDING</code> state.</p>
    pub fn pending_tasks_count(&self) -> i32 {
        self.pending_tasks_count
    }
    /// <p>The number of services that are running on the cluster in an <code>ACTIVE</code> state. You can view these services with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    pub fn active_services_count(&self) -> i32 {
        self.active_services_count
    }
    /// <p>Additional information about your clusters that are separated by launch type. They include the following:</p>
    /// <ul>
    /// <li>
    /// <p>runningEC2TasksCount</p></li>
    /// <li>
    /// <p>RunningFargateTasksCount</p></li>
    /// <li>
    /// <p>pendingEC2TasksCount</p></li>
    /// <li>
    /// <p>pendingFargateTasksCount</p></li>
    /// <li>
    /// <p>activeEC2ServiceCount</p></li>
    /// <li>
    /// <p>activeFargateServiceCount</p></li>
    /// <li>
    /// <p>drainingEC2ServiceCount</p></li>
    /// <li>
    /// <p>drainingFargateServiceCount</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 `.statistics.is_none()`.
    pub fn statistics(&self) -> &[crate::types::KeyValuePair] {
        self.statistics.as_deref().unwrap_or_default()
    }
    /// <p>The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</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 `.tags.is_none()`.
    pub fn tags(&self) -> &[crate::types::Tag] {
        self.tags.as_deref().unwrap_or_default()
    }
    /// <p>The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for 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 `.settings.is_none()`.
    pub fn settings(&self) -> &[crate::types::ClusterSetting] {
        self.settings.as_deref().unwrap_or_default()
    }
    /// <p>The capacity providers associated with the 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 `.capacity_providers.is_none()`.
    pub fn capacity_providers(&self) -> &[::std::string::String] {
        self.capacity_providers.as_deref().unwrap_or_default()
    }
    /// <p>The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.</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 `.default_capacity_provider_strategy.is_none()`.
    pub fn default_capacity_provider_strategy(&self) -> &[crate::types::CapacityProviderStrategyItem] {
        self.default_capacity_provider_strategy.as_deref().unwrap_or_default()
    }
    /// <p>The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.</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 `.attachments.is_none()`.
    pub fn attachments(&self) -> &[crate::types::Attachment] {
        self.attachments.as_deref().unwrap_or_default()
    }
    /// <p>The status of the capacity providers associated with the cluster. The following are the states that are returned.</p>
    /// <dl>
    /// <dt>
    /// UPDATE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The available capacity providers for the cluster are updating.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity providers have successfully updated.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider updates failed.</p>
    /// </dd>
    /// </dl>
    pub fn attachments_status(&self) -> ::std::option::Option<&str> {
        self.attachments_status.as_deref()
    }
    /// <p>Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the <code>enabled</code> parameter to <code>true</code> in the <code>ServiceConnectConfiguration</code>. You can set the namespace of each service individually in the <code>ServiceConnectConfiguration</code> to override this default parameter.</p>
    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn service_connect_defaults(&self) -> ::std::option::Option<&crate::types::ClusterServiceConnectDefaults> {
        self.service_connect_defaults.as_ref()
    }
}
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) cluster_arn: ::std::option::Option<::std::string::String>,
    pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
    pub(crate) configuration: ::std::option::Option<crate::types::ClusterConfiguration>,
    pub(crate) status: ::std::option::Option<::std::string::String>,
    pub(crate) registered_container_instances_count: ::std::option::Option<i32>,
    pub(crate) running_tasks_count: ::std::option::Option<i32>,
    pub(crate) pending_tasks_count: ::std::option::Option<i32>,
    pub(crate) active_services_count: ::std::option::Option<i32>,
    pub(crate) statistics: ::std::option::Option<::std::vec::Vec<crate::types::KeyValuePair>>,
    pub(crate) tags: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>,
    pub(crate) settings: ::std::option::Option<::std::vec::Vec<crate::types::ClusterSetting>>,
    pub(crate) capacity_providers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
    pub(crate) default_capacity_provider_strategy: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
    pub(crate) attachments: ::std::option::Option<::std::vec::Vec<crate::types::Attachment>>,
    pub(crate) attachments_status: ::std::option::Option<::std::string::String>,
    pub(crate) service_connect_defaults: ::std::option::Option<crate::types::ClusterServiceConnectDefaults>,
}
impl ClusterBuilder {
    /// <p>The Amazon Resource Name (ARN) that identifies the cluster. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</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 (ARN) that identifies the cluster. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</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 (ARN) that identifies the cluster. For more information about the ARN format, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-account-settings.html#ecs-resource-ids">Amazon Resource Name (ARN)</a> in the <i>Amazon ECS Developer Guide</i>.</p>
    pub fn get_cluster_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_arn
    }
    /// <p>A user-generated string that you use to identify your cluster.</p>
    pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.cluster_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>A user-generated string that you use to identify your cluster.</p>
    pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.cluster_name = input;
        self
    }
    /// <p>A user-generated string that you use to identify your cluster.</p>
    pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.cluster_name
    }
    /// <p>The execute command and managed storage configuration for the cluster.</p>
    pub fn configuration(mut self, input: crate::types::ClusterConfiguration) -> Self {
        self.configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The execute command and managed storage configuration for the cluster.</p>
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ClusterConfiguration>) -> Self {
        self.configuration = input;
        self
    }
    /// <p>The execute command and managed storage configuration for the cluster.</p>
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ClusterConfiguration> {
        &self.configuration
    }
    /// <p>The status of the cluster. The following are the possible states that are returned.</p>
    /// <dl>
    /// <dt>
    /// ACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.</p>
    /// </dd>
    /// <dt>
    /// PROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.</p>
    /// </dd>
    /// <dt>
    /// DEPROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.</p>
    /// </dd>
    /// <dt>
    /// FAILED
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.</p>
    /// </dd>
    /// <dt>
    /// INACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster has been deleted. Clusters with an <code>INACTIVE</code> status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on <code>INACTIVE</code> clusters persisting.</p>
    /// </dd>
    /// </dl>
    pub fn status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status of the cluster. The following are the possible states that are returned.</p>
    /// <dl>
    /// <dt>
    /// ACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.</p>
    /// </dd>
    /// <dt>
    /// PROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.</p>
    /// </dd>
    /// <dt>
    /// DEPROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.</p>
    /// </dd>
    /// <dt>
    /// FAILED
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.</p>
    /// </dd>
    /// <dt>
    /// INACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster has been deleted. Clusters with an <code>INACTIVE</code> status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on <code>INACTIVE</code> clusters persisting.</p>
    /// </dd>
    /// </dl>
    pub fn set_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.status = input;
        self
    }
    /// <p>The status of the cluster. The following are the possible states that are returned.</p>
    /// <dl>
    /// <dt>
    /// ACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster is ready to accept tasks and if applicable you can register container instances with the cluster.</p>
    /// </dd>
    /// <dt>
    /// PROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being created.</p>
    /// </dd>
    /// <dt>
    /// DEPROVISIONING
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider are being deleted.</p>
    /// </dd>
    /// <dt>
    /// FAILED
    /// </dt>
    /// <dd>
    /// <p>The cluster has capacity providers that are associated with it and the resources needed for the capacity provider have failed to create.</p>
    /// </dd>
    /// <dt>
    /// INACTIVE
    /// </dt>
    /// <dd>
    /// <p>The cluster has been deleted. Clusters with an <code>INACTIVE</code> status may remain discoverable in your account for a period of time. However, this behavior is subject to change in the future. We don't recommend that you rely on <code>INACTIVE</code> clusters persisting.</p>
    /// </dd>
    /// </dl>
    pub fn get_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.status
    }
    /// <p>The number of container instances registered into the cluster. This includes container instances in both <code>ACTIVE</code> and <code>DRAINING</code> status.</p>
    pub fn registered_container_instances_count(mut self, input: i32) -> Self {
        self.registered_container_instances_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of container instances registered into the cluster. This includes container instances in both <code>ACTIVE</code> and <code>DRAINING</code> status.</p>
    pub fn set_registered_container_instances_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.registered_container_instances_count = input;
        self
    }
    /// <p>The number of container instances registered into the cluster. This includes container instances in both <code>ACTIVE</code> and <code>DRAINING</code> status.</p>
    pub fn get_registered_container_instances_count(&self) -> &::std::option::Option<i32> {
        &self.registered_container_instances_count
    }
    /// <p>The number of tasks in the cluster that are in the <code>RUNNING</code> state.</p>
    pub fn running_tasks_count(mut self, input: i32) -> Self {
        self.running_tasks_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of tasks in the cluster that are in the <code>RUNNING</code> state.</p>
    pub fn set_running_tasks_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.running_tasks_count = input;
        self
    }
    /// <p>The number of tasks in the cluster that are in the <code>RUNNING</code> state.</p>
    pub fn get_running_tasks_count(&self) -> &::std::option::Option<i32> {
        &self.running_tasks_count
    }
    /// <p>The number of tasks in the cluster that are in the <code>PENDING</code> state.</p>
    pub fn pending_tasks_count(mut self, input: i32) -> Self {
        self.pending_tasks_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of tasks in the cluster that are in the <code>PENDING</code> state.</p>
    pub fn set_pending_tasks_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.pending_tasks_count = input;
        self
    }
    /// <p>The number of tasks in the cluster that are in the <code>PENDING</code> state.</p>
    pub fn get_pending_tasks_count(&self) -> &::std::option::Option<i32> {
        &self.pending_tasks_count
    }
    /// <p>The number of services that are running on the cluster in an <code>ACTIVE</code> state. You can view these services with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    pub fn active_services_count(mut self, input: i32) -> Self {
        self.active_services_count = ::std::option::Option::Some(input);
        self
    }
    /// <p>The number of services that are running on the cluster in an <code>ACTIVE</code> state. You can view these services with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    pub fn set_active_services_count(mut self, input: ::std::option::Option<i32>) -> Self {
        self.active_services_count = input;
        self
    }
    /// <p>The number of services that are running on the cluster in an <code>ACTIVE</code> state. You can view these services with <a href="https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_ListServices.html">ListServices</a>.</p>
    pub fn get_active_services_count(&self) -> &::std::option::Option<i32> {
        &self.active_services_count
    }
    /// Appends an item to `statistics`.
    ///
    /// To override the contents of this collection use [`set_statistics`](Self::set_statistics).
    ///
    /// <p>Additional information about your clusters that are separated by launch type. They include the following:</p>
    /// <ul>
    /// <li>
    /// <p>runningEC2TasksCount</p></li>
    /// <li>
    /// <p>RunningFargateTasksCount</p></li>
    /// <li>
    /// <p>pendingEC2TasksCount</p></li>
    /// <li>
    /// <p>pendingFargateTasksCount</p></li>
    /// <li>
    /// <p>activeEC2ServiceCount</p></li>
    /// <li>
    /// <p>activeFargateServiceCount</p></li>
    /// <li>
    /// <p>drainingEC2ServiceCount</p></li>
    /// <li>
    /// <p>drainingFargateServiceCount</p></li>
    /// </ul>
    pub fn statistics(mut self, input: crate::types::KeyValuePair) -> Self {
        let mut v = self.statistics.unwrap_or_default();
        v.push(input);
        self.statistics = ::std::option::Option::Some(v);
        self
    }
    /// <p>Additional information about your clusters that are separated by launch type. They include the following:</p>
    /// <ul>
    /// <li>
    /// <p>runningEC2TasksCount</p></li>
    /// <li>
    /// <p>RunningFargateTasksCount</p></li>
    /// <li>
    /// <p>pendingEC2TasksCount</p></li>
    /// <li>
    /// <p>pendingFargateTasksCount</p></li>
    /// <li>
    /// <p>activeEC2ServiceCount</p></li>
    /// <li>
    /// <p>activeFargateServiceCount</p></li>
    /// <li>
    /// <p>drainingEC2ServiceCount</p></li>
    /// <li>
    /// <p>drainingFargateServiceCount</p></li>
    /// </ul>
    pub fn set_statistics(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::KeyValuePair>>) -> Self {
        self.statistics = input;
        self
    }
    /// <p>Additional information about your clusters that are separated by launch type. They include the following:</p>
    /// <ul>
    /// <li>
    /// <p>runningEC2TasksCount</p></li>
    /// <li>
    /// <p>RunningFargateTasksCount</p></li>
    /// <li>
    /// <p>pendingEC2TasksCount</p></li>
    /// <li>
    /// <p>pendingFargateTasksCount</p></li>
    /// <li>
    /// <p>activeEC2ServiceCount</p></li>
    /// <li>
    /// <p>activeFargateServiceCount</p></li>
    /// <li>
    /// <p>drainingEC2ServiceCount</p></li>
    /// <li>
    /// <p>drainingFargateServiceCount</p></li>
    /// </ul>
    pub fn get_statistics(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::KeyValuePair>> {
        &self.statistics
    }
    /// Appends an item to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    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>The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub fn set_tags(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Tag>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>The metadata that you apply to the cluster to help you categorize and organize them. Each tag consists of a key and an optional value. You define both.</p>
    /// <p>The following basic restrictions apply to tags:</p>
    /// <ul>
    /// <li>
    /// <p>Maximum number of tags per resource - 50</p></li>
    /// <li>
    /// <p>For each resource, each tag key must be unique, and each tag key can have only one value.</p></li>
    /// <li>
    /// <p>Maximum key length - 128 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>Maximum value length - 256 Unicode characters in UTF-8</p></li>
    /// <li>
    /// <p>If your tagging schema is used across multiple services and resources, remember that other services may have restrictions on allowed characters. Generally allowed characters are: letters, numbers, and spaces representable in UTF-8, and the following characters: + - = . _ : / @.</p></li>
    /// <li>
    /// <p>Tag keys and values are case-sensitive.</p></li>
    /// <li>
    /// <p>Do not use <code>aws:</code>, <code>AWS:</code>, or any upper or lowercase combination of such as a prefix for either keys or values as it is reserved for Amazon Web Services use. You cannot edit or delete tag keys or values with this prefix. Tags with this prefix do not count against your tags per resource limit.</p></li>
    /// </ul>
    pub fn get_tags(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Tag>> {
        &self.tags
    }
    /// Appends an item to `settings`.
    ///
    /// To override the contents of this collection use [`set_settings`](Self::set_settings).
    ///
    /// <p>The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.</p>
    pub fn settings(mut self, input: crate::types::ClusterSetting) -> Self {
        let mut v = self.settings.unwrap_or_default();
        v.push(input);
        self.settings = ::std::option::Option::Some(v);
        self
    }
    /// <p>The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.</p>
    pub fn set_settings(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::ClusterSetting>>) -> Self {
        self.settings = input;
        self
    }
    /// <p>The settings for the cluster. This parameter indicates whether CloudWatch Container Insights is on or off for a cluster.</p>
    pub fn get_settings(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::ClusterSetting>> {
        &self.settings
    }
    /// Appends an item to `capacity_providers`.
    ///
    /// To override the contents of this collection use [`set_capacity_providers`](Self::set_capacity_providers).
    ///
    /// <p>The capacity providers associated with the cluster.</p>
    pub fn capacity_providers(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut v = self.capacity_providers.unwrap_or_default();
        v.push(input.into());
        self.capacity_providers = ::std::option::Option::Some(v);
        self
    }
    /// <p>The capacity providers associated with the cluster.</p>
    pub fn set_capacity_providers(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.capacity_providers = input;
        self
    }
    /// <p>The capacity providers associated with the cluster.</p>
    pub fn get_capacity_providers(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        &self.capacity_providers
    }
    /// Appends an item to `default_capacity_provider_strategy`.
    ///
    /// To override the contents of this collection use [`set_default_capacity_provider_strategy`](Self::set_default_capacity_provider_strategy).
    ///
    /// <p>The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.</p>
    pub fn default_capacity_provider_strategy(mut self, input: crate::types::CapacityProviderStrategyItem) -> Self {
        let mut v = self.default_capacity_provider_strategy.unwrap_or_default();
        v.push(input);
        self.default_capacity_provider_strategy = ::std::option::Option::Some(v);
        self
    }
    /// <p>The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.</p>
    pub fn set_default_capacity_provider_strategy(
        mut self,
        input: ::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>>,
    ) -> Self {
        self.default_capacity_provider_strategy = input;
        self
    }
    /// <p>The default capacity provider strategy for the cluster. When services or tasks are run in the cluster with no launch type or capacity provider strategy specified, the default capacity provider strategy is used.</p>
    pub fn get_default_capacity_provider_strategy(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::CapacityProviderStrategyItem>> {
        &self.default_capacity_provider_strategy
    }
    /// Appends an item to `attachments`.
    ///
    /// To override the contents of this collection use [`set_attachments`](Self::set_attachments).
    ///
    /// <p>The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.</p>
    pub fn attachments(mut self, input: crate::types::Attachment) -> Self {
        let mut v = self.attachments.unwrap_or_default();
        v.push(input);
        self.attachments = ::std::option::Option::Some(v);
        self
    }
    /// <p>The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.</p>
    pub fn set_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Attachment>>) -> Self {
        self.attachments = input;
        self
    }
    /// <p>The resources attached to a cluster. When using a capacity provider with a cluster, the capacity provider and associated resources are returned as cluster attachments.</p>
    pub fn get_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Attachment>> {
        &self.attachments
    }
    /// <p>The status of the capacity providers associated with the cluster. The following are the states that are returned.</p>
    /// <dl>
    /// <dt>
    /// UPDATE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The available capacity providers for the cluster are updating.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity providers have successfully updated.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider updates failed.</p>
    /// </dd>
    /// </dl>
    pub fn attachments_status(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.attachments_status = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The status of the capacity providers associated with the cluster. The following are the states that are returned.</p>
    /// <dl>
    /// <dt>
    /// UPDATE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The available capacity providers for the cluster are updating.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity providers have successfully updated.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider updates failed.</p>
    /// </dd>
    /// </dl>
    pub fn set_attachments_status(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.attachments_status = input;
        self
    }
    /// <p>The status of the capacity providers associated with the cluster. The following are the states that are returned.</p>
    /// <dl>
    /// <dt>
    /// UPDATE_IN_PROGRESS
    /// </dt>
    /// <dd>
    /// <p>The available capacity providers for the cluster are updating.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_COMPLETE
    /// </dt>
    /// <dd>
    /// <p>The capacity providers have successfully updated.</p>
    /// </dd>
    /// <dt>
    /// UPDATE_FAILED
    /// </dt>
    /// <dd>
    /// <p>The capacity provider updates failed.</p>
    /// </dd>
    /// </dl>
    pub fn get_attachments_status(&self) -> &::std::option::Option<::std::string::String> {
        &self.attachments_status
    }
    /// <p>Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the <code>enabled</code> parameter to <code>true</code> in the <code>ServiceConnectConfiguration</code>. You can set the namespace of each service individually in the <code>ServiceConnectConfiguration</code> to override this default parameter.</p>
    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn service_connect_defaults(mut self, input: crate::types::ClusterServiceConnectDefaults) -> Self {
        self.service_connect_defaults = ::std::option::Option::Some(input);
        self
    }
    /// <p>Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the <code>enabled</code> parameter to <code>true</code> in the <code>ServiceConnectConfiguration</code>. You can set the namespace of each service individually in the <code>ServiceConnectConfiguration</code> to override this default parameter.</p>
    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn set_service_connect_defaults(mut self, input: ::std::option::Option<crate::types::ClusterServiceConnectDefaults>) -> Self {
        self.service_connect_defaults = input;
        self
    }
    /// <p>Use this parameter to set a default Service Connect namespace. After you set a default Service Connect namespace, any new services with Service Connect turned on that are created in the cluster are added as client services in the namespace. This setting only applies to new services that set the <code>enabled</code> parameter to <code>true</code> in the <code>ServiceConnectConfiguration</code>. You can set the namespace of each service individually in the <code>ServiceConnectConfiguration</code> to override this default parameter.</p>
    /// <p>Tasks that run in a namespace can use short names to connect to services in the namespace. Tasks can connect to services across all of the clusters in the namespace. Tasks connect through a managed proxy container that collects logs and metrics for increased visibility. Only the tasks that Amazon ECS services create are supported with Service Connect. For more information, see <a href="https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-connect.html">Service Connect</a> in the <i>Amazon Elastic Container Service Developer Guide</i>.</p>
    pub fn get_service_connect_defaults(&self) -> &::std::option::Option<crate::types::ClusterServiceConnectDefaults> {
        &self.service_connect_defaults
    }
    /// Consumes the builder and constructs a [`Cluster`](crate::types::Cluster).
    pub fn build(self) -> crate::types::Cluster {
        crate::types::Cluster {
            cluster_arn: self.cluster_arn,
            cluster_name: self.cluster_name,
            configuration: self.configuration,
            status: self.status,
            registered_container_instances_count: self.registered_container_instances_count.unwrap_or_default(),
            running_tasks_count: self.running_tasks_count.unwrap_or_default(),
            pending_tasks_count: self.pending_tasks_count.unwrap_or_default(),
            active_services_count: self.active_services_count.unwrap_or_default(),
            statistics: self.statistics,
            tags: self.tags,
            settings: self.settings,
            capacity_providers: self.capacity_providers,
            default_capacity_provider_strategy: self.default_capacity_provider_strategy,
            attachments: self.attachments,
            attachments_status: self.attachments_status,
            service_connect_defaults: self.service_connect_defaults,
        }
    }
}