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
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
/// <p>An object representing an Amazon EKS managed node group.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Nodegroup {
/// <p>The name associated with an Amazon EKS managed node group.</p>
pub nodegroup_name: ::std::option::Option<::std::string::String>,
/// <p>The Amazon Resource Name (ARN) associated with the managed node group.</p>
pub nodegroup_arn: ::std::option::Option<::std::string::String>,
/// <p>The name of your cluster.</p>
pub cluster_name: ::std::option::Option<::std::string::String>,
/// <p>The Kubernetes version of the managed node group.</p>
pub version: ::std::option::Option<::std::string::String>,
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was specified in the launch template. For node groups that weren't deployed using a launch template, this is the version of the Amazon EKS optimized AMI that the node group was deployed with.</p>
pub release_version: ::std::option::Option<::std::string::String>,
/// <p>The Unix epoch timestamp at object creation.</p>
pub created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The Unix epoch timestamp for the last modification to the object.</p>
pub modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
/// <p>The current status of the managed node group.</p>
pub status: ::std::option::Option<crate::types::NodegroupStatus>,
/// <p>The capacity type of your managed node group.</p>
pub capacity_type: ::std::option::Option<crate::types::CapacityTypes>,
/// <p>The scaling configuration details for the Auto Scaling group that is associated with your node group.</p>
pub scaling_config: ::std::option::Option<crate::types::NodegroupScalingConfig>,
/// <p>If the node group wasn't deployed with a launch template, then this is the instance type that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>The subnets that were specified for the Auto Scaling group that is associated with your node group.</p>
pub subnets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
/// <p>If the node group wasn't deployed with a launch template, then this is the remote access configuration that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub remote_access: ::std::option::Option<crate::types::RemoteAccessConfig>,
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is <code>CUSTOM</code>. For node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node group configuration.</p>
pub ami_type: ::std::option::Option<crate::types::AmiTypes>,
/// <p>The IAM role associated with your node group. The Amazon EKS node <code>kubelet</code> daemon makes calls to Amazon Web Services APIs on your behalf. Nodes receive permissions for these API calls through an IAM instance profile and associated policies.</p>
pub node_role: ::std::option::Option<::std::string::String>,
/// <p>The Kubernetes <code>labels</code> applied to the nodes in the node group.</p><note>
/// <p>Only <code>labels</code> that are applied with the Amazon EKS API are shown here. There may be other Kubernetes <code>labels</code> applied to the nodes in this group.</p>
/// </note>
pub labels: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of <code>No_Schedule</code>, <code>Prefer_No_Schedule</code>, or <code>No_Execute</code>. Kubernetes taints can be used together with tolerations to control how workloads are scheduled to your nodes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html">Node taints on managed node groups</a>.</p>
pub taints: ::std::option::Option<::std::vec::Vec<crate::types::Taint>>,
/// <p>The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.</p>
pub resources: ::std::option::Option<crate::types::NodegroupResources>,
/// <p>If the node group wasn't deployed with a launch template, then this is the disk size in the node group configuration. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub disk_size: ::std::option::Option<i32>,
/// <p>The health status of the node group. If there are issues with your node group's health, they are listed here.</p>
pub health: ::std::option::Option<crate::types::NodegroupHealth>,
/// <p>The node group update configuration.</p>
pub update_config: ::std::option::Option<crate::types::NodegroupUpdateConfig>,
/// <p>The node auto repair configuration for the node group.</p>
pub node_repair_config: ::std::option::Option<crate::types::NodeRepairConfig>,
/// <p>If a launch template was used to create the node group, then this is the launch template that was used.</p>
pub launch_template: ::std::option::Option<crate::types::LaunchTemplateSpecification>,
/// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
/// <p>The warm pool configuration attached to the node group. Amazon EKS manages warm pools throughout the node group lifecycle using the <code>AWSServiceRoleForAmazonEKSNodegroup</code> service-linked role to create, update, and delete warm pool resources.</p>
pub warm_pool_config: ::std::option::Option<crate::types::WarmPoolConfig>,
}
impl Nodegroup {
/// <p>The name associated with an Amazon EKS managed node group.</p>
pub fn nodegroup_name(&self) -> ::std::option::Option<&str> {
self.nodegroup_name.as_deref()
}
/// <p>The Amazon Resource Name (ARN) associated with the managed node group.</p>
pub fn nodegroup_arn(&self) -> ::std::option::Option<&str> {
self.nodegroup_arn.as_deref()
}
/// <p>The name of your cluster.</p>
pub fn cluster_name(&self) -> ::std::option::Option<&str> {
self.cluster_name.as_deref()
}
/// <p>The Kubernetes version of the managed node group.</p>
pub fn version(&self) -> ::std::option::Option<&str> {
self.version.as_deref()
}
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was specified in the launch template. For node groups that weren't deployed using a launch template, this is the version of the Amazon EKS optimized AMI that the node group was deployed with.</p>
pub fn release_version(&self) -> ::std::option::Option<&str> {
self.release_version.as_deref()
}
/// <p>The Unix epoch timestamp at object creation.</p>
pub fn created_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.created_at.as_ref()
}
/// <p>The Unix epoch timestamp for the last modification to the object.</p>
pub fn modified_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
self.modified_at.as_ref()
}
/// <p>The current status of the managed node group.</p>
pub fn status(&self) -> ::std::option::Option<&crate::types::NodegroupStatus> {
self.status.as_ref()
}
/// <p>The capacity type of your managed node group.</p>
pub fn capacity_type(&self) -> ::std::option::Option<&crate::types::CapacityTypes> {
self.capacity_type.as_ref()
}
/// <p>The scaling configuration details for the Auto Scaling group that is associated with your node group.</p>
pub fn scaling_config(&self) -> ::std::option::Option<&crate::types::NodegroupScalingConfig> {
self.scaling_config.as_ref()
}
/// <p>If the node group wasn't deployed with a launch template, then this is the instance type that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</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 `.instance_types.is_none()`.
pub fn instance_types(&self) -> &[::std::string::String] {
self.instance_types.as_deref().unwrap_or_default()
}
/// <p>The subnets that were specified for the Auto Scaling group that is associated with your node group.</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 `.subnets.is_none()`.
pub fn subnets(&self) -> &[::std::string::String] {
self.subnets.as_deref().unwrap_or_default()
}
/// <p>If the node group wasn't deployed with a launch template, then this is the remote access configuration that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn remote_access(&self) -> ::std::option::Option<&crate::types::RemoteAccessConfig> {
self.remote_access.as_ref()
}
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is <code>CUSTOM</code>. For node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node group configuration.</p>
pub fn ami_type(&self) -> ::std::option::Option<&crate::types::AmiTypes> {
self.ami_type.as_ref()
}
/// <p>The IAM role associated with your node group. The Amazon EKS node <code>kubelet</code> daemon makes calls to Amazon Web Services APIs on your behalf. Nodes receive permissions for these API calls through an IAM instance profile and associated policies.</p>
pub fn node_role(&self) -> ::std::option::Option<&str> {
self.node_role.as_deref()
}
/// <p>The Kubernetes <code>labels</code> applied to the nodes in the node group.</p><note>
/// <p>Only <code>labels</code> that are applied with the Amazon EKS API are shown here. There may be other Kubernetes <code>labels</code> applied to the nodes in this group.</p>
/// </note>
pub fn labels(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.labels.as_ref()
}
/// <p>The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of <code>No_Schedule</code>, <code>Prefer_No_Schedule</code>, or <code>No_Execute</code>. Kubernetes taints can be used together with tolerations to control how workloads are scheduled to your nodes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html">Node taints on managed node groups</a>.</p>
///
/// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.taints.is_none()`.
pub fn taints(&self) -> &[crate::types::Taint] {
self.taints.as_deref().unwrap_or_default()
}
/// <p>The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.</p>
pub fn resources(&self) -> ::std::option::Option<&crate::types::NodegroupResources> {
self.resources.as_ref()
}
/// <p>If the node group wasn't deployed with a launch template, then this is the disk size in the node group configuration. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn disk_size(&self) -> ::std::option::Option<i32> {
self.disk_size
}
/// <p>The health status of the node group. If there are issues with your node group's health, they are listed here.</p>
pub fn health(&self) -> ::std::option::Option<&crate::types::NodegroupHealth> {
self.health.as_ref()
}
/// <p>The node group update configuration.</p>
pub fn update_config(&self) -> ::std::option::Option<&crate::types::NodegroupUpdateConfig> {
self.update_config.as_ref()
}
/// <p>The node auto repair configuration for the node group.</p>
pub fn node_repair_config(&self) -> ::std::option::Option<&crate::types::NodeRepairConfig> {
self.node_repair_config.as_ref()
}
/// <p>If a launch template was used to create the node group, then this is the launch template that was used.</p>
pub fn launch_template(&self) -> ::std::option::Option<&crate::types::LaunchTemplateSpecification> {
self.launch_template.as_ref()
}
/// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
self.tags.as_ref()
}
/// <p>The warm pool configuration attached to the node group. Amazon EKS manages warm pools throughout the node group lifecycle using the <code>AWSServiceRoleForAmazonEKSNodegroup</code> service-linked role to create, update, and delete warm pool resources.</p>
pub fn warm_pool_config(&self) -> ::std::option::Option<&crate::types::WarmPoolConfig> {
self.warm_pool_config.as_ref()
}
}
impl Nodegroup {
/// Creates a new builder-style object to manufacture [`Nodegroup`](crate::types::Nodegroup).
pub fn builder() -> crate::types::builders::NodegroupBuilder {
crate::types::builders::NodegroupBuilder::default()
}
}
/// A builder for [`Nodegroup`](crate::types::Nodegroup).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct NodegroupBuilder {
pub(crate) nodegroup_name: ::std::option::Option<::std::string::String>,
pub(crate) nodegroup_arn: ::std::option::Option<::std::string::String>,
pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
pub(crate) version: ::std::option::Option<::std::string::String>,
pub(crate) release_version: ::std::option::Option<::std::string::String>,
pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) modified_at: ::std::option::Option<::aws_smithy_types::DateTime>,
pub(crate) status: ::std::option::Option<crate::types::NodegroupStatus>,
pub(crate) capacity_type: ::std::option::Option<crate::types::CapacityTypes>,
pub(crate) scaling_config: ::std::option::Option<crate::types::NodegroupScalingConfig>,
pub(crate) instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) subnets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
pub(crate) remote_access: ::std::option::Option<crate::types::RemoteAccessConfig>,
pub(crate) ami_type: ::std::option::Option<crate::types::AmiTypes>,
pub(crate) node_role: ::std::option::Option<::std::string::String>,
pub(crate) labels: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) taints: ::std::option::Option<::std::vec::Vec<crate::types::Taint>>,
pub(crate) resources: ::std::option::Option<crate::types::NodegroupResources>,
pub(crate) disk_size: ::std::option::Option<i32>,
pub(crate) health: ::std::option::Option<crate::types::NodegroupHealth>,
pub(crate) update_config: ::std::option::Option<crate::types::NodegroupUpdateConfig>,
pub(crate) node_repair_config: ::std::option::Option<crate::types::NodeRepairConfig>,
pub(crate) launch_template: ::std::option::Option<crate::types::LaunchTemplateSpecification>,
pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
pub(crate) warm_pool_config: ::std::option::Option<crate::types::WarmPoolConfig>,
}
impl NodegroupBuilder {
/// <p>The name associated with an Amazon EKS managed node group.</p>
pub fn nodegroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.nodegroup_name = ::std::option::Option::Some(input.into());
self
}
/// <p>The name associated with an Amazon EKS managed node group.</p>
pub fn set_nodegroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.nodegroup_name = input;
self
}
/// <p>The name associated with an Amazon EKS managed node group.</p>
pub fn get_nodegroup_name(&self) -> &::std::option::Option<::std::string::String> {
&self.nodegroup_name
}
/// <p>The Amazon Resource Name (ARN) associated with the managed node group.</p>
pub fn nodegroup_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.nodegroup_arn = ::std::option::Option::Some(input.into());
self
}
/// <p>The Amazon Resource Name (ARN) associated with the managed node group.</p>
pub fn set_nodegroup_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.nodegroup_arn = input;
self
}
/// <p>The Amazon Resource Name (ARN) associated with the managed node group.</p>
pub fn get_nodegroup_arn(&self) -> &::std::option::Option<::std::string::String> {
&self.nodegroup_arn
}
/// <p>The name of 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>The name of your cluster.</p>
pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.cluster_name = input;
self
}
/// <p>The name of your cluster.</p>
pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
&self.cluster_name
}
/// <p>The Kubernetes version of the managed node group.</p>
pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.version = ::std::option::Option::Some(input.into());
self
}
/// <p>The Kubernetes version of the managed node group.</p>
pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.version = input;
self
}
/// <p>The Kubernetes version of the managed node group.</p>
pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
&self.version
}
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was specified in the launch template. For node groups that weren't deployed using a launch template, this is the version of the Amazon EKS optimized AMI that the node group was deployed with.</p>
pub fn release_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.release_version = ::std::option::Option::Some(input.into());
self
}
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was specified in the launch template. For node groups that weren't deployed using a launch template, this is the version of the Amazon EKS optimized AMI that the node group was deployed with.</p>
pub fn set_release_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.release_version = input;
self
}
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was specified in the launch template. For node groups that weren't deployed using a launch template, this is the version of the Amazon EKS optimized AMI that the node group was deployed with.</p>
pub fn get_release_version(&self) -> &::std::option::Option<::std::string::String> {
&self.release_version
}
/// <p>The Unix epoch timestamp at object creation.</p>
pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.created_at = ::std::option::Option::Some(input);
self
}
/// <p>The Unix epoch timestamp at object creation.</p>
pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.created_at = input;
self
}
/// <p>The Unix epoch timestamp at object creation.</p>
pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.created_at
}
/// <p>The Unix epoch timestamp for the last modification to the object.</p>
pub fn modified_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
self.modified_at = ::std::option::Option::Some(input);
self
}
/// <p>The Unix epoch timestamp for the last modification to the object.</p>
pub fn set_modified_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
self.modified_at = input;
self
}
/// <p>The Unix epoch timestamp for the last modification to the object.</p>
pub fn get_modified_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
&self.modified_at
}
/// <p>The current status of the managed node group.</p>
pub fn status(mut self, input: crate::types::NodegroupStatus) -> Self {
self.status = ::std::option::Option::Some(input);
self
}
/// <p>The current status of the managed node group.</p>
pub fn set_status(mut self, input: ::std::option::Option<crate::types::NodegroupStatus>) -> Self {
self.status = input;
self
}
/// <p>The current status of the managed node group.</p>
pub fn get_status(&self) -> &::std::option::Option<crate::types::NodegroupStatus> {
&self.status
}
/// <p>The capacity type of your managed node group.</p>
pub fn capacity_type(mut self, input: crate::types::CapacityTypes) -> Self {
self.capacity_type = ::std::option::Option::Some(input);
self
}
/// <p>The capacity type of your managed node group.</p>
pub fn set_capacity_type(mut self, input: ::std::option::Option<crate::types::CapacityTypes>) -> Self {
self.capacity_type = input;
self
}
/// <p>The capacity type of your managed node group.</p>
pub fn get_capacity_type(&self) -> &::std::option::Option<crate::types::CapacityTypes> {
&self.capacity_type
}
/// <p>The scaling configuration details for the Auto Scaling group that is associated with your node group.</p>
pub fn scaling_config(mut self, input: crate::types::NodegroupScalingConfig) -> Self {
self.scaling_config = ::std::option::Option::Some(input);
self
}
/// <p>The scaling configuration details for the Auto Scaling group that is associated with your node group.</p>
pub fn set_scaling_config(mut self, input: ::std::option::Option<crate::types::NodegroupScalingConfig>) -> Self {
self.scaling_config = input;
self
}
/// <p>The scaling configuration details for the Auto Scaling group that is associated with your node group.</p>
pub fn get_scaling_config(&self) -> &::std::option::Option<crate::types::NodegroupScalingConfig> {
&self.scaling_config
}
/// Appends an item to `instance_types`.
///
/// To override the contents of this collection use [`set_instance_types`](Self::set_instance_types).
///
/// <p>If the node group wasn't deployed with a launch template, then this is the instance type that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn instance_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.instance_types.unwrap_or_default();
v.push(input.into());
self.instance_types = ::std::option::Option::Some(v);
self
}
/// <p>If the node group wasn't deployed with a launch template, then this is the instance type that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn set_instance_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.instance_types = input;
self
}
/// <p>If the node group wasn't deployed with a launch template, then this is the instance type that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn get_instance_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.instance_types
}
/// Appends an item to `subnets`.
///
/// To override the contents of this collection use [`set_subnets`](Self::set_subnets).
///
/// <p>The subnets that were specified for the Auto Scaling group that is associated with your node group.</p>
pub fn subnets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut v = self.subnets.unwrap_or_default();
v.push(input.into());
self.subnets = ::std::option::Option::Some(v);
self
}
/// <p>The subnets that were specified for the Auto Scaling group that is associated with your node group.</p>
pub fn set_subnets(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
self.subnets = input;
self
}
/// <p>The subnets that were specified for the Auto Scaling group that is associated with your node group.</p>
pub fn get_subnets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
&self.subnets
}
/// <p>If the node group wasn't deployed with a launch template, then this is the remote access configuration that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn remote_access(mut self, input: crate::types::RemoteAccessConfig) -> Self {
self.remote_access = ::std::option::Option::Some(input);
self
}
/// <p>If the node group wasn't deployed with a launch template, then this is the remote access configuration that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn set_remote_access(mut self, input: ::std::option::Option<crate::types::RemoteAccessConfig>) -> Self {
self.remote_access = input;
self
}
/// <p>If the node group wasn't deployed with a launch template, then this is the remote access configuration that is associated with the node group. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn get_remote_access(&self) -> &::std::option::Option<crate::types::RemoteAccessConfig> {
&self.remote_access
}
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is <code>CUSTOM</code>. For node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node group configuration.</p>
pub fn ami_type(mut self, input: crate::types::AmiTypes) -> Self {
self.ami_type = ::std::option::Option::Some(input);
self
}
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is <code>CUSTOM</code>. For node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node group configuration.</p>
pub fn set_ami_type(mut self, input: ::std::option::Option<crate::types::AmiTypes>) -> Self {
self.ami_type = input;
self
}
/// <p>If the node group was deployed using a launch template with a custom AMI, then this is <code>CUSTOM</code>. For node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node group configuration.</p>
pub fn get_ami_type(&self) -> &::std::option::Option<crate::types::AmiTypes> {
&self.ami_type
}
/// <p>The IAM role associated with your node group. The Amazon EKS node <code>kubelet</code> daemon makes calls to Amazon Web Services APIs on your behalf. Nodes receive permissions for these API calls through an IAM instance profile and associated policies.</p>
pub fn node_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.node_role = ::std::option::Option::Some(input.into());
self
}
/// <p>The IAM role associated with your node group. The Amazon EKS node <code>kubelet</code> daemon makes calls to Amazon Web Services APIs on your behalf. Nodes receive permissions for these API calls through an IAM instance profile and associated policies.</p>
pub fn set_node_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.node_role = input;
self
}
/// <p>The IAM role associated with your node group. The Amazon EKS node <code>kubelet</code> daemon makes calls to Amazon Web Services APIs on your behalf. Nodes receive permissions for these API calls through an IAM instance profile and associated policies.</p>
pub fn get_node_role(&self) -> &::std::option::Option<::std::string::String> {
&self.node_role
}
/// Adds a key-value pair to `labels`.
///
/// To override the contents of this collection use [`set_labels`](Self::set_labels).
///
/// <p>The Kubernetes <code>labels</code> applied to the nodes in the node group.</p><note>
/// <p>Only <code>labels</code> that are applied with the Amazon EKS API are shown here. There may be other Kubernetes <code>labels</code> applied to the nodes in this group.</p>
/// </note>
pub fn labels(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.labels.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.labels = ::std::option::Option::Some(hash_map);
self
}
/// <p>The Kubernetes <code>labels</code> applied to the nodes in the node group.</p><note>
/// <p>Only <code>labels</code> that are applied with the Amazon EKS API are shown here. There may be other Kubernetes <code>labels</code> applied to the nodes in this group.</p>
/// </note>
pub fn set_labels(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.labels = input;
self
}
/// <p>The Kubernetes <code>labels</code> applied to the nodes in the node group.</p><note>
/// <p>Only <code>labels</code> that are applied with the Amazon EKS API are shown here. There may be other Kubernetes <code>labels</code> applied to the nodes in this group.</p>
/// </note>
pub fn get_labels(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.labels
}
/// Appends an item to `taints`.
///
/// To override the contents of this collection use [`set_taints`](Self::set_taints).
///
/// <p>The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of <code>No_Schedule</code>, <code>Prefer_No_Schedule</code>, or <code>No_Execute</code>. Kubernetes taints can be used together with tolerations to control how workloads are scheduled to your nodes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html">Node taints on managed node groups</a>.</p>
pub fn taints(mut self, input: crate::types::Taint) -> Self {
let mut v = self.taints.unwrap_or_default();
v.push(input);
self.taints = ::std::option::Option::Some(v);
self
}
/// <p>The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of <code>No_Schedule</code>, <code>Prefer_No_Schedule</code>, or <code>No_Execute</code>. Kubernetes taints can be used together with tolerations to control how workloads are scheduled to your nodes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html">Node taints on managed node groups</a>.</p>
pub fn set_taints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Taint>>) -> Self {
self.taints = input;
self
}
/// <p>The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of <code>No_Schedule</code>, <code>Prefer_No_Schedule</code>, or <code>No_Execute</code>. Kubernetes taints can be used together with tolerations to control how workloads are scheduled to your nodes. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/node-taints-managed-node-groups.html">Node taints on managed node groups</a>.</p>
pub fn get_taints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Taint>> {
&self.taints
}
/// <p>The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.</p>
pub fn resources(mut self, input: crate::types::NodegroupResources) -> Self {
self.resources = ::std::option::Option::Some(input);
self
}
/// <p>The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.</p>
pub fn set_resources(mut self, input: ::std::option::Option<crate::types::NodegroupResources>) -> Self {
self.resources = input;
self
}
/// <p>The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.</p>
pub fn get_resources(&self) -> &::std::option::Option<crate::types::NodegroupResources> {
&self.resources
}
/// <p>If the node group wasn't deployed with a launch template, then this is the disk size in the node group configuration. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn disk_size(mut self, input: i32) -> Self {
self.disk_size = ::std::option::Option::Some(input);
self
}
/// <p>If the node group wasn't deployed with a launch template, then this is the disk size in the node group configuration. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn set_disk_size(mut self, input: ::std::option::Option<i32>) -> Self {
self.disk_size = input;
self
}
/// <p>If the node group wasn't deployed with a launch template, then this is the disk size in the node group configuration. If the node group was deployed with a launch template, then this is <code>null</code>.</p>
pub fn get_disk_size(&self) -> &::std::option::Option<i32> {
&self.disk_size
}
/// <p>The health status of the node group. If there are issues with your node group's health, they are listed here.</p>
pub fn health(mut self, input: crate::types::NodegroupHealth) -> Self {
self.health = ::std::option::Option::Some(input);
self
}
/// <p>The health status of the node group. If there are issues with your node group's health, they are listed here.</p>
pub fn set_health(mut self, input: ::std::option::Option<crate::types::NodegroupHealth>) -> Self {
self.health = input;
self
}
/// <p>The health status of the node group. If there are issues with your node group's health, they are listed here.</p>
pub fn get_health(&self) -> &::std::option::Option<crate::types::NodegroupHealth> {
&self.health
}
/// <p>The node group update configuration.</p>
pub fn update_config(mut self, input: crate::types::NodegroupUpdateConfig) -> Self {
self.update_config = ::std::option::Option::Some(input);
self
}
/// <p>The node group update configuration.</p>
pub fn set_update_config(mut self, input: ::std::option::Option<crate::types::NodegroupUpdateConfig>) -> Self {
self.update_config = input;
self
}
/// <p>The node group update configuration.</p>
pub fn get_update_config(&self) -> &::std::option::Option<crate::types::NodegroupUpdateConfig> {
&self.update_config
}
/// <p>The node auto repair configuration for the node group.</p>
pub fn node_repair_config(mut self, input: crate::types::NodeRepairConfig) -> Self {
self.node_repair_config = ::std::option::Option::Some(input);
self
}
/// <p>The node auto repair configuration for the node group.</p>
pub fn set_node_repair_config(mut self, input: ::std::option::Option<crate::types::NodeRepairConfig>) -> Self {
self.node_repair_config = input;
self
}
/// <p>The node auto repair configuration for the node group.</p>
pub fn get_node_repair_config(&self) -> &::std::option::Option<crate::types::NodeRepairConfig> {
&self.node_repair_config
}
/// <p>If a launch template was used to create the node group, then this is the launch template that was used.</p>
pub fn launch_template(mut self, input: crate::types::LaunchTemplateSpecification) -> Self {
self.launch_template = ::std::option::Option::Some(input);
self
}
/// <p>If a launch template was used to create the node group, then this is the launch template that was used.</p>
pub fn set_launch_template(mut self, input: ::std::option::Option<crate::types::LaunchTemplateSpecification>) -> Self {
self.launch_template = input;
self
}
/// <p>If a launch template was used to create the node group, then this is the launch template that was used.</p>
pub fn get_launch_template(&self) -> &::std::option::Option<crate::types::LaunchTemplateSpecification> {
&self.launch_template
}
/// Adds a key-value pair to `tags`.
///
/// To override the contents of this collection use [`set_tags`](Self::set_tags).
///
/// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
let mut hash_map = self.tags.unwrap_or_default();
hash_map.insert(k.into(), v.into());
self.tags = ::std::option::Option::Some(hash_map);
self
}
/// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
self.tags = input;
self
}
/// <p>Metadata that assists with categorization and organization. Each tag consists of a key and an optional value. You define both. Tags don't propagate to any other cluster or Amazon Web Services resources.</p>
pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
&self.tags
}
/// <p>The warm pool configuration attached to the node group. Amazon EKS manages warm pools throughout the node group lifecycle using the <code>AWSServiceRoleForAmazonEKSNodegroup</code> service-linked role to create, update, and delete warm pool resources.</p>
pub fn warm_pool_config(mut self, input: crate::types::WarmPoolConfig) -> Self {
self.warm_pool_config = ::std::option::Option::Some(input);
self
}
/// <p>The warm pool configuration attached to the node group. Amazon EKS manages warm pools throughout the node group lifecycle using the <code>AWSServiceRoleForAmazonEKSNodegroup</code> service-linked role to create, update, and delete warm pool resources.</p>
pub fn set_warm_pool_config(mut self, input: ::std::option::Option<crate::types::WarmPoolConfig>) -> Self {
self.warm_pool_config = input;
self
}
/// <p>The warm pool configuration attached to the node group. Amazon EKS manages warm pools throughout the node group lifecycle using the <code>AWSServiceRoleForAmazonEKSNodegroup</code> service-linked role to create, update, and delete warm pool resources.</p>
pub fn get_warm_pool_config(&self) -> &::std::option::Option<crate::types::WarmPoolConfig> {
&self.warm_pool_config
}
/// Consumes the builder and constructs a [`Nodegroup`](crate::types::Nodegroup).
pub fn build(self) -> crate::types::Nodegroup {
crate::types::Nodegroup {
nodegroup_name: self.nodegroup_name,
nodegroup_arn: self.nodegroup_arn,
cluster_name: self.cluster_name,
version: self.version,
release_version: self.release_version,
created_at: self.created_at,
modified_at: self.modified_at,
status: self.status,
capacity_type: self.capacity_type,
scaling_config: self.scaling_config,
instance_types: self.instance_types,
subnets: self.subnets,
remote_access: self.remote_access,
ami_type: self.ami_type,
node_role: self.node_role,
labels: self.labels,
taints: self.taints,
resources: self.resources,
disk_size: self.disk_size,
health: self.health,
update_config: self.update_config,
node_repair_config: self.node_repair_config,
launch_template: self.launch_template,
tags: self.tags,
warm_pool_config: self.warm_pool_config,
}
}
}