aws_lite_rs/types/eks.rs
1//! Types for the Amazon Elastic Kubernetes Service API (v1).
2//!
3//! Auto-generated from the AWS Botocore Model.
4//! **Do not edit manually** — modify the manifest and re-run codegen.
5
6use serde::{Deserialize, Serialize};
7use std::collections::HashMap;
8
9///
10/// **AWS API**: `eks.v1.DescribeClusterRequest`
11/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//DescribeClusterRequest>
12#[derive(Debug, Clone, Default, Serialize, Deserialize)]
13#[serde(rename_all = "camelCase")]
14pub struct DescribeClusterRequest {
15 /// The name of your cluster.
16 pub name: String,
17}
18
19impl DescribeClusterRequest {
20 #[cfg(any(test, feature = "test-support"))]
21 /// Create a fixture instance for testing.
22 pub fn fixture() -> Self {
23 Self {
24 name: "test-describe_cluster_request".into(),
25 }
26 }
27}
28
29///
30/// **AWS API**: `eks.v1.DescribeClusterResponse`
31/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//DescribeClusterResponse>
32#[derive(Debug, Clone, Default, Serialize, Deserialize)]
33#[serde(rename_all = "camelCase")]
34pub struct DescribeClusterResponse {
35 /// The full description of your specified cluster.
36 #[serde(skip_serializing_if = "Option::is_none")]
37 pub cluster: Option<Cluster>,
38}
39
40impl DescribeClusterResponse {
41 #[cfg(any(test, feature = "test-support"))]
42 /// Create a fixture instance for testing.
43 pub fn fixture() -> Self {
44 Self {
45 cluster: Some(Cluster::fixture()),
46 }
47 }
48}
49
50/// An object representing an Amazon EKS cluster.
51///
52/// **AWS API**: `eks.v1.Cluster`
53/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//Cluster>
54///
55/// ## Coverage
56/// 9 of 28 fields included.
57/// Omitted fields:
58/// - `createdAt` — not selected in manifest
59/// - `kubernetesNetworkConfig` — not selected in manifest
60/// - `logging` — not selected in manifest
61/// - `identity` — not selected in manifest
62/// - `certificateAuthority` — not selected in manifest
63/// - `clientRequestToken` — not selected in manifest
64/// - `encryptionConfig` — not selected in manifest
65/// - `connectorConfig` — not selected in manifest
66/// - `id` — not selected in manifest
67/// - `health` — not selected in manifest
68/// - `outpostConfig` — not selected in manifest
69/// - `accessConfig` — not selected in manifest
70/// - `upgradePolicy` — not selected in manifest
71/// - `zonalShiftConfig` — not selected in manifest
72/// - `remoteNetworkConfig` — not selected in manifest
73/// - `computeConfig` — not selected in manifest
74/// - `storageConfig` — not selected in manifest
75/// - `deletionProtection` — not selected in manifest
76/// - `controlPlaneScalingConfig` — not selected in manifest
77#[derive(Debug, Clone, Default, Serialize, Deserialize)]
78#[serde(rename_all = "camelCase")]
79pub struct Cluster {
80 /// The name of your cluster.
81 #[serde(skip_serializing_if = "Option::is_none")]
82 pub name: Option<String>,
83
84 /// The Amazon Resource Name (ARN) of the cluster.
85 #[serde(skip_serializing_if = "Option::is_none")]
86 pub arn: Option<String>,
87
88 /// The Kubernetes server version for the cluster.
89 #[serde(skip_serializing_if = "Option::is_none")]
90 pub version: Option<String>,
91
92 /// The endpoint for your Kubernetes API server.
93 #[serde(skip_serializing_if = "Option::is_none")]
94 pub endpoint: Option<String>,
95
96 /// The Amazon Resource Name (ARN) of the IAM role that provides permissions for the
97 /// Kubernetes control plane to make calls to Amazon Web Services API operations on your
98 /// behalf.
99 #[serde(skip_serializing_if = "Option::is_none")]
100 pub role_arn: Option<String>,
101
102 /// The VPC configuration used by the cluster control plane. Amazon EKS VPC resources have
103 /// specific requirements to work properly with Kubernetes. For more information, see
104 /// Cluster VPC considerations and Cluster security group considerations in the Amazon EKS
105 /// User Guide.
106 #[serde(skip_serializing_if = "Option::is_none")]
107 pub resources_vpc_config: Option<VpcConfigResponse>,
108
109 /// The current status of the cluster.
110 #[serde(skip_serializing_if = "Option::is_none")]
111 pub status: Option<String>,
112
113 /// The platform version of your Amazon EKS cluster. For more information about clusters
114 /// deployed on the Amazon Web Services Cloud, see Platform versions in the Amazon EKS User
115 /// Guide . For more information about local clusters deployed on an Outpost, see Amazon EKS
116 /// local cluster platform versions in the Amazon EKS User Guide .
117 #[serde(skip_serializing_if = "Option::is_none")]
118 pub platform_version: Option<String>,
119
120 /// Metadata that assists with categorization and organization. Each tag consists of a key
121 /// and an optional value. You define both. Tags don't propagate to any other cluster or
122 /// Amazon Web Services resources.
123 #[serde(default)]
124 #[serde(skip_serializing_if = "HashMap::is_empty")]
125 pub tags: HashMap<String, String>,
126}
127
128impl Cluster {
129 #[cfg(any(test, feature = "test-support"))]
130 /// Create a fixture instance for testing.
131 pub fn fixture() -> Self {
132 Self {
133 name: Some("test-cluster".into()),
134 arn: Some("test-arn".into()),
135 version: Some("test-version".into()),
136 endpoint: Some("test-endpoint".into()),
137 role_arn: Some("test-role_arn".into()),
138 resources_vpc_config: Some(VpcConfigResponse::fixture()),
139 status: Some("test-status".into()),
140 platform_version: Some("test-platform_version".into()),
141 tags: Default::default(),
142 }
143 }
144}
145
146/// An object representing an Amazon EKS cluster VPC configuration response.
147///
148/// **AWS API**: `eks.v1.VpcConfigResponse`
149/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//VpcConfigResponse>
150#[derive(Debug, Clone, Default, Serialize, Deserialize)]
151#[serde(rename_all = "camelCase")]
152pub struct VpcConfigResponse {
153 /// The subnets associated with your cluster.
154 #[serde(default)]
155 #[serde(skip_serializing_if = "Vec::is_empty")]
156 pub subnet_ids: Vec<String>,
157
158 /// The security groups associated with the cross-account elastic network interfaces that
159 /// are used to allow communication between your nodes and the Kubernetes control plane.
160 #[serde(default)]
161 #[serde(skip_serializing_if = "Vec::is_empty")]
162 pub security_group_ids: Vec<String>,
163
164 /// The cluster security group that was created by Amazon EKS for the cluster. Managed node
165 /// groups use this security group for control-plane-to-data-plane communication.
166 #[serde(skip_serializing_if = "Option::is_none")]
167 pub cluster_security_group_id: Option<String>,
168
169 /// The VPC associated with your cluster.
170 #[serde(skip_serializing_if = "Option::is_none")]
171 pub vpc_id: Option<String>,
172
173 /// Whether the public API server endpoint is enabled.
174 #[serde(skip_serializing_if = "Option::is_none")]
175 pub endpoint_public_access: Option<bool>,
176
177 /// This parameter indicates whether the Amazon EKS private API server endpoint is enabled.
178 /// If the Amazon EKS private API server endpoint is enabled, Kubernetes API requests that
179 /// originate from within your cluster's VPC use the private VPC endpoint instead of
180 /// traversing the internet. If this value is disabled and you have nodes or Fargate pods in
181 /// the cluster, then ensure that publicAccessCidrs includes the necessary CIDR blocks for
182 /// communication with the nodes or Fargate pods. For more information, see Cluster API
183 /// server endpoint in the Amazon EKS User Guide .
184 #[serde(skip_serializing_if = "Option::is_none")]
185 pub endpoint_private_access: Option<bool>,
186
187 /// The CIDR blocks that are allowed access to your cluster's public Kubernetes API server
188 /// endpoint. Communication to the endpoint from addresses outside of the CIDR blocks that
189 /// you specify is denied. The default value is 0.0.0.0/0 and additionally ::/0 for dual-
190 /// stack `IPv6` clusters. If you've disabled private endpoint access, make sure that you
191 /// specify the necessary CIDR blocks for every node and Fargate Pod in the cluster. For
192 /// more information, see Cluster API server endpoint in the Amazon EKS User Guide . Note
193 /// that the public endpoints are dual-stack for only IPv6 clusters that are made after
194 /// October 2024. You can't add IPv6 CIDR blocks to IPv4 clusters or IPv6 clusters that were
195 /// made before October 2024.
196 #[serde(default)]
197 #[serde(skip_serializing_if = "Vec::is_empty")]
198 pub public_access_cidrs: Vec<String>,
199}
200
201impl VpcConfigResponse {
202 #[cfg(any(test, feature = "test-support"))]
203 /// Create a fixture instance for testing.
204 pub fn fixture() -> Self {
205 Self {
206 subnet_ids: vec![],
207 security_group_ids: vec![],
208 cluster_security_group_id: Some("test-cluster_security_group_id".into()),
209 vpc_id: Some("test-vpc_id".into()),
210 endpoint_public_access: Some(false),
211 endpoint_private_access: Some(false),
212 public_access_cidrs: vec![],
213 }
214 }
215}
216
217///
218/// **AWS API**: `eks.v1.ListNodegroupsRequest`
219/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//ListNodegroupsRequest>
220#[derive(Debug, Clone, Default, Serialize, Deserialize)]
221#[serde(rename_all = "camelCase")]
222pub struct ListNodegroupsRequest {
223 /// The name of your cluster.
224 pub cluster_name: String,
225
226 /// The maximum number of results, returned in paginated output. You receive maxResults in a
227 /// single page, along with a nextToken response element. You can see the remaining results
228 /// of the initial request by sending another request with the returned nextToken value.
229 /// This value can be between 1 and 100. If you don't use this parameter, 100 results and a
230 /// nextToken value, if applicable, are returned.
231 #[serde(skip_serializing_if = "Option::is_none")]
232 pub max_results: Option<i32>,
233
234 /// The nextToken value returned from a previous paginated request, where maxResults was
235 /// used and the results exceeded the value of that parameter. Pagination continues from the
236 /// end of the previous results that returned the nextToken value. This value is null when
237 /// there are no more results to return. This token should be treated as an opaque
238 /// identifier that is used only to retrieve the next items in a list and not for other
239 /// programmatic purposes.
240 #[serde(skip_serializing_if = "Option::is_none")]
241 pub next_token: Option<String>,
242}
243
244impl ListNodegroupsRequest {
245 #[cfg(any(test, feature = "test-support"))]
246 /// Create a fixture instance for testing.
247 pub fn fixture() -> Self {
248 Self {
249 cluster_name: "test-cluster_name".into(),
250 max_results: Some(100),
251 next_token: Some("test-next_token".into()),
252 }
253 }
254}
255
256///
257/// **AWS API**: `eks.v1.ListNodegroupsResponse`
258/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//ListNodegroupsResponse>
259#[derive(Debug, Clone, Default, Serialize, Deserialize)]
260#[serde(rename_all = "camelCase")]
261pub struct ListNodegroupsResponse {
262 /// A list of all of the node groups associated with the specified cluster.
263 #[serde(default)]
264 #[serde(skip_serializing_if = "Vec::is_empty")]
265 pub nodegroups: Vec<String>,
266
267 /// The nextToken value returned from a previous paginated request, where maxResults was
268 /// used and the results exceeded the value of that parameter. Pagination continues from the
269 /// end of the previous results that returned the nextToken value. This value is null when
270 /// there are no more results to return. This token should be treated as an opaque
271 /// identifier that is used only to retrieve the next items in a list and not for other
272 /// programmatic purposes.
273 #[serde(skip_serializing_if = "Option::is_none")]
274 pub next_token: Option<String>,
275}
276
277impl ListNodegroupsResponse {
278 #[cfg(any(test, feature = "test-support"))]
279 /// Create a fixture instance for testing.
280 pub fn fixture() -> Self {
281 Self {
282 nodegroups: vec![],
283 next_token: Some("test-next_token".into()),
284 }
285 }
286}
287
288///
289/// **AWS API**: `eks.v1.DescribeNodegroupRequest`
290/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//DescribeNodegroupRequest>
291#[derive(Debug, Clone, Default, Serialize, Deserialize)]
292#[serde(rename_all = "camelCase")]
293pub struct DescribeNodegroupRequest {
294 /// The name of your cluster.
295 pub cluster_name: String,
296
297 /// The name of the node group to describe.
298 pub nodegroup_name: String,
299}
300
301impl DescribeNodegroupRequest {
302 #[cfg(any(test, feature = "test-support"))]
303 /// Create a fixture instance for testing.
304 pub fn fixture() -> Self {
305 Self {
306 cluster_name: "test-cluster_name".into(),
307 nodegroup_name: "test-nodegroup_name".into(),
308 }
309 }
310}
311
312///
313/// **AWS API**: `eks.v1.DescribeNodegroupResponse`
314/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//DescribeNodegroupResponse>
315#[derive(Debug, Clone, Default, Serialize, Deserialize)]
316#[serde(rename_all = "camelCase")]
317pub struct DescribeNodegroupResponse {
318 /// The full description of your node group.
319 #[serde(skip_serializing_if = "Option::is_none")]
320 pub nodegroup: Option<Nodegroup>,
321}
322
323impl DescribeNodegroupResponse {
324 #[cfg(any(test, feature = "test-support"))]
325 /// Create a fixture instance for testing.
326 pub fn fixture() -> Self {
327 Self {
328 nodegroup: Some(Nodegroup::fixture()),
329 }
330 }
331}
332
333/// An object representing an Amazon EKS managed node group.
334///
335/// **AWS API**: `eks.v1.Nodegroup`
336/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//Nodegroup>
337///
338/// ## Coverage
339/// 17 of 24 fields included.
340/// Omitted fields:
341/// - `createdAt` — not selected in manifest
342/// - `modifiedAt` — not selected in manifest
343/// - `remoteAccess` — not selected in manifest
344/// - `taints` — not selected in manifest
345/// - `resources` — not selected in manifest
346/// - `nodeRepairConfig` — not selected in manifest
347/// - `launchTemplate` — not selected in manifest
348#[derive(Debug, Clone, Default, Serialize, Deserialize)]
349#[serde(rename_all = "camelCase")]
350pub struct Nodegroup {
351 /// The name associated with an Amazon EKS managed node group.
352 #[serde(skip_serializing_if = "Option::is_none")]
353 pub nodegroup_name: Option<String>,
354
355 /// The Amazon Resource Name (ARN) associated with the managed node group.
356 #[serde(skip_serializing_if = "Option::is_none")]
357 pub nodegroup_arn: Option<String>,
358
359 /// The name of your cluster.
360 #[serde(skip_serializing_if = "Option::is_none")]
361 pub cluster_name: Option<String>,
362
363 /// The Kubernetes version of the managed node group.
364 #[serde(skip_serializing_if = "Option::is_none")]
365 pub version: Option<String>,
366
367 /// If the node group was deployed using a launch template with a custom AMI, then this is
368 /// the AMI ID that was specified in the launch template. For node groups that weren't
369 /// deployed using a launch template, this is the version of the Amazon EKS optimized AMI
370 /// that the node group was deployed with.
371 #[serde(skip_serializing_if = "Option::is_none")]
372 pub release_version: Option<String>,
373
374 /// The current status of the managed node group.
375 #[serde(skip_serializing_if = "Option::is_none")]
376 pub status: Option<String>,
377
378 /// The capacity type of your managed node group.
379 #[serde(skip_serializing_if = "Option::is_none")]
380 pub capacity_type: Option<String>,
381
382 /// The scaling configuration details for the Auto Scaling group that is associated with
383 /// your node group.
384 #[serde(skip_serializing_if = "Option::is_none")]
385 pub scaling_config: Option<NodegroupScalingConfig>,
386
387 /// If the node group wasn't deployed with a launch template, then this is the instance type
388 /// that is associated with the node group. If the node group was deployed with a launch
389 /// template, then this is null.
390 #[serde(default)]
391 #[serde(skip_serializing_if = "Vec::is_empty")]
392 pub instance_types: Vec<String>,
393
394 /// The subnets that were specified for the Auto Scaling group that is associated with your
395 /// node group.
396 #[serde(default)]
397 #[serde(skip_serializing_if = "Vec::is_empty")]
398 pub subnets: Vec<String>,
399
400 /// If the node group was deployed using a launch template with a custom AMI, then this is
401 /// CUSTOM. For node groups that weren't deployed using a launch template, this is the AMI
402 /// type that was specified in the node group configuration.
403 #[serde(skip_serializing_if = "Option::is_none")]
404 pub ami_type: Option<String>,
405
406 /// The IAM role associated with your node group. The Amazon EKS node kubelet daemon makes
407 /// calls to Amazon Web Services APIs on your behalf. Nodes receive permissions for these
408 /// API calls through an IAM instance profile and associated policies.
409 #[serde(skip_serializing_if = "Option::is_none")]
410 pub node_role: Option<String>,
411
412 /// The Kubernetes labels applied to the nodes in the node group. Only labels that are
413 /// applied with the Amazon EKS API are shown here. There may be other Kubernetes labels
414 /// applied to the nodes in this group.
415 #[serde(default)]
416 #[serde(skip_serializing_if = "HashMap::is_empty")]
417 pub labels: HashMap<String, String>,
418
419 /// If the node group wasn't deployed with a launch template, then this is the disk size in
420 /// the node group configuration. If the node group was deployed with a launch template,
421 /// then this is null.
422 #[serde(skip_serializing_if = "Option::is_none")]
423 pub disk_size: Option<i32>,
424
425 /// The health status of the node group. If there are issues with your node group's health,
426 /// they are listed here.
427 #[serde(skip_serializing_if = "Option::is_none")]
428 pub health: Option<NodegroupHealth>,
429
430 /// The node group update configuration.
431 #[serde(skip_serializing_if = "Option::is_none")]
432 pub update_config: Option<NodegroupUpdateConfig>,
433
434 /// Metadata that assists with categorization and organization. Each tag consists of a key
435 /// and an optional value. You define both. Tags don't propagate to any other cluster or
436 /// Amazon Web Services resources.
437 #[serde(default)]
438 #[serde(skip_serializing_if = "HashMap::is_empty")]
439 pub tags: HashMap<String, String>,
440}
441
442impl Nodegroup {
443 #[cfg(any(test, feature = "test-support"))]
444 /// Create a fixture instance for testing.
445 pub fn fixture() -> Self {
446 Self {
447 nodegroup_name: Some("test-nodegroup_name".into()),
448 nodegroup_arn: Some("test-nodegroup_arn".into()),
449 cluster_name: Some("test-cluster_name".into()),
450 version: Some("test-version".into()),
451 release_version: Some("test-release_version".into()),
452 status: Some("test-status".into()),
453 capacity_type: Some("test-capacity_type".into()),
454 scaling_config: Some(NodegroupScalingConfig::fixture()),
455 instance_types: vec![],
456 subnets: vec![],
457 ami_type: Some("test-ami_type".into()),
458 node_role: Some("test-node_role".into()),
459 labels: Default::default(),
460 disk_size: Some(100),
461 health: Some(NodegroupHealth::fixture()),
462 update_config: Some(NodegroupUpdateConfig::fixture()),
463 tags: Default::default(),
464 }
465 }
466}
467
468/// An object representing the scaling configuration details for the Auto Scaling group that is
469/// associated with your node group. When creating a node group, you must specify all or none of
470/// the properties. When updating a node group, you can specify any or none of the properties.
471///
472/// **AWS API**: `eks.v1.NodegroupScalingConfig`
473/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//NodegroupScalingConfig>
474#[derive(Debug, Clone, Default, Serialize, Deserialize)]
475#[serde(rename_all = "camelCase")]
476pub struct NodegroupScalingConfig {
477 /// The minimum number of nodes that the managed node group can scale in to.
478 #[serde(skip_serializing_if = "Option::is_none")]
479 pub min_size: Option<i32>,
480
481 /// The maximum number of nodes that the managed node group can scale out to. For
482 /// information about the maximum number that you can specify, see Amazon EKS service quotas
483 /// in the Amazon EKS User Guide.
484 #[serde(skip_serializing_if = "Option::is_none")]
485 pub max_size: Option<i32>,
486
487 /// The current number of nodes that the managed node group should maintain. If you use the
488 /// Kubernetes Cluster Autoscaler, you shouldn't change the desiredSize value directly, as
489 /// this can cause the Cluster Autoscaler to suddenly scale up or scale down. Whenever this
490 /// parameter changes, the number of worker nodes in the node group is updated to the
491 /// specified size. If this parameter is given a value that is smaller than the current
492 /// number of running worker nodes, the necessary number of worker nodes are terminated to
493 /// match the given value. When using CloudFormation, no action occurs if you remove this
494 /// parameter from your CFN template. This parameter can be different from minSize in some
495 /// cases, such as when starting with extra hosts for testing. This parameter can also be
496 /// different when you want to start with an estimated number of needed hosts, but let the
497 /// Cluster Autoscaler reduce the number if there are too many. When the Cluster Autoscaler
498 /// is used, the desiredSize parameter is altered by the Cluster Autoscaler (but can be out-
499 /// of-date for short periods of time). the Cluster Autoscaler doesn't scale a managed node
500 /// group lower than minSize or higher than maxSize.
501 #[serde(skip_serializing_if = "Option::is_none")]
502 pub desired_size: Option<i32>,
503}
504
505impl NodegroupScalingConfig {
506 #[cfg(any(test, feature = "test-support"))]
507 /// Create a fixture instance for testing.
508 pub fn fixture() -> Self {
509 Self {
510 min_size: Some(100),
511 max_size: Some(100),
512 desired_size: Some(100),
513 }
514 }
515}
516
517/// The node group update configuration. An Amazon EKS managed node group updates by replacing
518/// nodes with new nodes of newer AMI versions in parallel. You choose the maximum unavailable
519/// and the update strategy.
520///
521/// **AWS API**: `eks.v1.NodegroupUpdateConfig`
522/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//NodegroupUpdateConfig>
523///
524/// ## Coverage
525/// 2 of 3 fields included.
526/// Omitted fields:
527/// - `updateStrategy` — not selected in manifest
528#[derive(Debug, Clone, Default, Serialize, Deserialize)]
529#[serde(rename_all = "camelCase")]
530pub struct NodegroupUpdateConfig {
531 /// The maximum number of nodes unavailable at once during a version update. Nodes are
532 /// updated in parallel. This value or maxUnavailablePercentage is required to have a
533 /// value.The maximum number is 100.
534 #[serde(skip_serializing_if = "Option::is_none")]
535 pub max_unavailable: Option<i32>,
536
537 /// The maximum percentage of nodes unavailable during a version update. This percentage of
538 /// nodes are updated in parallel, up to 100 nodes at once. This value or maxUnavailable is
539 /// required to have a value.
540 #[serde(skip_serializing_if = "Option::is_none")]
541 pub max_unavailable_percentage: Option<i32>,
542}
543
544impl NodegroupUpdateConfig {
545 #[cfg(any(test, feature = "test-support"))]
546 /// Create a fixture instance for testing.
547 pub fn fixture() -> Self {
548 Self {
549 max_unavailable: Some(100),
550 max_unavailable_percentage: Some(100),
551 }
552 }
553}
554
555/// An object representing the health status of the node group.
556///
557/// **AWS API**: `eks.v1.NodegroupHealth`
558/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//NodegroupHealth>
559#[derive(Debug, Clone, Default, Serialize, Deserialize)]
560#[serde(rename_all = "camelCase")]
561pub struct NodegroupHealth {
562 /// Any issues that are associated with the node group.
563 #[serde(default)]
564 #[serde(skip_serializing_if = "Vec::is_empty")]
565 pub issues: Vec<Issue>,
566}
567
568impl NodegroupHealth {
569 #[cfg(any(test, feature = "test-support"))]
570 /// Create a fixture instance for testing.
571 pub fn fixture() -> Self {
572 Self { issues: vec![] }
573 }
574}
575
576/// An object representing an issue with an Amazon EKS resource.
577///
578/// **AWS API**: `eks.v1.Issue`
579/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//Issue>
580#[derive(Debug, Clone, Default, Serialize, Deserialize)]
581#[serde(rename_all = "camelCase")]
582pub struct Issue {
583 /// A brief description of the error. AccessDenied: Amazon EKS or one or more of your
584 /// managed nodes is failing to authenticate or authorize with your Kubernetes cluster API
585 /// server. AsgInstanceLaunchFailures: Your Auto Scaling group is experiencing failures
586 /// while attempting to launch instances. AutoScalingGroupNotFound: We couldn't find the
587 /// Auto Scaling group associated with the managed node group. You may be able to recreate
588 /// an Auto Scaling group with the same settings to recover. ClusterUnreachable: Amazon EKS
589 /// or one or more of your managed nodes is unable to to communicate with your Kubernetes
590 /// cluster API server. This can happen if there are network disruptions or if API servers
591 /// are timing out processing requests. Ec2InstanceTypeDoesNotExist: One or more of the
592 /// supplied Amazon EC2 instance types do not exist. Amazon EKS checked for the instance
593 /// types that you provided in this Amazon Web Services Region, and one or more aren't
594 /// available. Ec2LaunchTemplateNotFound: We couldn't find the Amazon EC2 launch template
595 /// for your managed node group. You may be able to recreate a launch template with the same
596 /// settings to recover. Ec2LaunchTemplateVersionMismatch: The Amazon EC2 launch template
597 /// version for your managed node group does not match the version that Amazon EKS created.
598 /// You may be able to revert to the version that Amazon EKS created to recover.
599 /// Ec2SecurityGroupDeletionFailure: We could not delete the remote access security group
600 /// for your managed node group. Remove any dependencies from the security group.
601 /// Ec2SecurityGroupNotFound: We couldn't find the cluster security group for the cluster.
602 /// You must recreate your cluster. Ec2SubnetInvalidConfiguration: One or more Amazon EC2
603 /// subnets specified for a node group do not automatically assign public IP addresses to
604 /// instances launched into it. If you want your instances to be assigned a public IP
605 /// address, then you need to enable the auto-assign public IP address setting for the
606 /// subnet. See Modifying the public IPv4 addressing attribute for your subnet in the Amazon
607 /// VPC User Guide. IamInstanceProfileNotFound: We couldn't find the IAM instance profile
608 /// for your managed node group. You may be able to recreate an instance profile with the
609 /// same settings to recover. IamNodeRoleNotFound: We couldn't find the IAM role for your
610 /// managed node group. You may be able to recreate an IAM role with the same settings to
611 /// recover. InstanceLimitExceeded: Your Amazon Web Services account is unable to launch any
612 /// more instances of the specified instance type. You may be able to request an Amazon EC2
613 /// instance limit increase to recover. InsufficientFreeAddresses: One or more of the
614 /// subnets associated with your managed node group does not have enough available IP
615 /// addresses for new nodes. InternalFailure: These errors are usually caused by an Amazon
616 /// EKS server-side issue. NodeCreationFailure: Your launched instances are unable to
617 /// register with your Amazon EKS cluster. Common causes of this failure are insufficient
618 /// node IAM role permissions or lack of outbound internet access for the nodes.
619 #[serde(skip_serializing_if = "Option::is_none")]
620 pub code: Option<String>,
621
622 /// The error message associated with the issue.
623 #[serde(skip_serializing_if = "Option::is_none")]
624 pub message: Option<String>,
625
626 /// The Amazon Web Services resources that are afflicted by this issue.
627 #[serde(default)]
628 #[serde(skip_serializing_if = "Vec::is_empty")]
629 pub resource_ids: Vec<String>,
630}
631
632impl Issue {
633 #[cfg(any(test, feature = "test-support"))]
634 /// Create a fixture instance for testing.
635 pub fn fixture() -> Self {
636 Self {
637 code: Some("test-code".into()),
638 message: Some("test-message".into()),
639 resource_ids: vec![],
640 }
641 }
642}
643
644///
645/// **AWS API**: `eks.v1.UpdateNodegroupConfigRequest`
646/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//UpdateNodegroupConfigRequest>
647///
648/// ## Coverage
649/// 5 of 8 fields included.
650/// Omitted fields:
651/// - `labels` — not selected in manifest
652/// - `taints` — not selected in manifest
653/// - `nodeRepairConfig` — not selected in manifest
654#[derive(Debug, Clone, Default, Serialize, Deserialize)]
655#[serde(rename_all = "camelCase")]
656pub struct UpdateNodegroupConfigRequest {
657 /// The name of your cluster.
658 pub cluster_name: String,
659
660 /// The name of the managed node group to update.
661 pub nodegroup_name: String,
662
663 /// The scaling configuration details for the Auto Scaling group after the update.
664 #[serde(skip_serializing_if = "Option::is_none")]
665 pub scaling_config: Option<NodegroupScalingConfig>,
666
667 /// The node group update configuration.
668 #[serde(skip_serializing_if = "Option::is_none")]
669 pub update_config: Option<NodegroupUpdateConfig>,
670
671 /// A unique, case-sensitive identifier that you provide to ensure the idempotency of the
672 /// request.
673 #[serde(skip_serializing_if = "Option::is_none")]
674 pub client_request_token: Option<String>,
675}
676
677impl UpdateNodegroupConfigRequest {
678 #[cfg(any(test, feature = "test-support"))]
679 /// Create a fixture instance for testing.
680 pub fn fixture() -> Self {
681 Self {
682 cluster_name: "test-cluster_name".into(),
683 nodegroup_name: "test-nodegroup_name".into(),
684 scaling_config: Some(NodegroupScalingConfig::fixture()),
685 update_config: Some(NodegroupUpdateConfig::fixture()),
686 client_request_token: Some("test-client_request_token".into()),
687 }
688 }
689}
690
691///
692/// **AWS API**: `eks.v1.UpdateNodegroupConfigResponse`
693/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//UpdateNodegroupConfigResponse>
694#[derive(Debug, Clone, Default, Serialize, Deserialize)]
695#[serde(rename_all = "camelCase")]
696pub struct UpdateNodegroupConfigResponse {
697 /// The `update` field.
698 #[serde(skip_serializing_if = "Option::is_none")]
699 pub update: Option<Update>,
700}
701
702impl UpdateNodegroupConfigResponse {
703 #[cfg(any(test, feature = "test-support"))]
704 /// Create a fixture instance for testing.
705 pub fn fixture() -> Self {
706 Self {
707 update: Some(Update::fixture()),
708 }
709 }
710}
711
712/// An object representing an asynchronous update.
713///
714/// **AWS API**: `eks.v1.Update`
715/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//Update>
716///
717/// ## Coverage
718/// 4 of 6 fields included.
719/// Omitted fields:
720/// - `params` — not selected in manifest
721/// - `createdAt` — not selected in manifest
722#[derive(Debug, Clone, Default, Serialize, Deserialize)]
723#[serde(rename_all = "camelCase")]
724pub struct Update {
725 /// A UUID that is used to track the update.
726 #[serde(skip_serializing_if = "Option::is_none")]
727 pub id: Option<String>,
728
729 /// The current status of the update.
730 #[serde(skip_serializing_if = "Option::is_none")]
731 pub status: Option<String>,
732
733 /// The type of the update.
734 #[serde(rename = "type")]
735 #[serde(skip_serializing_if = "Option::is_none")]
736 pub r#type: Option<String>,
737
738 /// Any errors associated with a Failed update.
739 #[serde(default)]
740 #[serde(skip_serializing_if = "Vec::is_empty")]
741 pub errors: Vec<ErrorDetail>,
742}
743
744impl Update {
745 #[cfg(any(test, feature = "test-support"))]
746 /// Create a fixture instance for testing.
747 pub fn fixture() -> Self {
748 Self {
749 id: Some("test-id".into()),
750 status: Some("test-status".into()),
751 r#type: Some("test-type".into()),
752 errors: vec![],
753 }
754 }
755}
756
757/// An object representing an error when an asynchronous operation fails.
758///
759/// **AWS API**: `eks.v1.ErrorDetail`
760/// **Reference**: <https://docs.aws.amazon.com/eks/latest/APIReference//ErrorDetail>
761#[derive(Debug, Clone, Default, Serialize, Deserialize)]
762#[serde(rename_all = "camelCase")]
763pub struct ErrorDetail {
764 /// A brief description of the error. SubnetNotFound: We couldn't find one of the subnets
765 /// associated with the cluster. SecurityGroupNotFound: We couldn't find one of the security
766 /// groups associated with the cluster. EniLimitReached: You have reached the elastic
767 /// network interface limit for your account. IpNotAvailable: A subnet associated with the
768 /// cluster doesn't have any available IP addresses. AccessDenied: You don't have
769 /// permissions to perform the specified operation. OperationNotPermitted: The service role
770 /// associated with the cluster doesn't have the required access permissions for Amazon EKS.
771 /// VpcIdNotFound: We couldn't find the VPC associated with the cluster.
772 #[serde(skip_serializing_if = "Option::is_none")]
773 pub error_code: Option<String>,
774
775 /// A more complete description of the error.
776 #[serde(skip_serializing_if = "Option::is_none")]
777 pub error_message: Option<String>,
778
779 /// An optional field that contains the resource IDs associated with the error.
780 #[serde(default)]
781 #[serde(skip_serializing_if = "Vec::is_empty")]
782 pub resource_ids: Vec<String>,
783}
784
785impl ErrorDetail {
786 #[cfg(any(test, feature = "test-support"))]
787 /// Create a fixture instance for testing.
788 pub fn fixture() -> Self {
789 Self {
790 error_code: Some("test-error_code".into()),
791 error_message: Some("test-error_message".into()),
792 resource_ids: vec![],
793 }
794 }
795}