aws_sdk_eks/operation/create_nodegroup/_create_nodegroup_input.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct CreateNodegroupInput {
6 /// <p>The name of your cluster.</p>
7 pub cluster_name: ::std::option::Option<::std::string::String>,
8 /// <p>The unique name to give your node group.</p>
9 pub nodegroup_name: ::std::option::Option<::std::string::String>,
10 /// <p>The scaling configuration details for the Auto Scaling group that is created for your node group.</p>
11 pub scaling_config: ::std::option::Option<crate::types::NodegroupScalingConfig>,
12 /// <p>The root device disk size (in GiB) for your node group instances. The default disk size is 20 GiB for Linux and Bottlerocket. The default disk size is 50 GiB for Windows. If you specify <code>launchTemplate</code>, then don't specify <code>diskSize</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
13 pub disk_size: ::std::option::Option<i32>,
14 /// <p>The subnets to use for the Auto Scaling group that is created for your node group. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html">SubnetId</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
15 pub subnets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
16 /// <p>Specify the instance types for a node group. If you specify a GPU instance type, make sure to also specify an applicable GPU AMI type with the <code>amiType</code> parameter. If you specify <code>launchTemplate</code>, then you can specify zero or one instance type in your launch template <i>or</i> you can specify 0-20 instance types for <code>instanceTypes</code>. If however, you specify an instance type in your launch template <i>and</i> specify any <code>instanceTypes</code>, the node group deployment will fail. If you don't specify an instance type in a launch template or for <code>instanceTypes</code>, then <code>t3.medium</code> is used, by default. If you specify <code>Spot</code> for <code>capacityType</code>, then we recommend specifying multiple values for <code>instanceTypes</code>. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types">Managed node group capacity types</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
17 pub instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
18 /// <p>The AMI type for your node group. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>amiType</code>, or the node group deployment will fail. If your launch template uses a Windows custom AMI, then add <code>eks:kube-proxy-windows</code> to your Windows nodes <code>rolearn</code> in the <code>aws-auth</code> <code>ConfigMap</code>. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
19 pub ami_type: ::std::option::Option<crate::types::AmiTypes>,
20 /// <p>The remote access configuration to use with your node group. For Linux, the protocol is SSH. For Windows, the protocol is RDP. If you specify <code>launchTemplate</code>, then don't specify <code>remoteAccess</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
21 pub remote_access: ::std::option::Option<crate::types::RemoteAccessConfig>,
22 /// <p>The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker 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. Before you can launch nodes and register them into a cluster, you must create an IAM role for those nodes to use when they are launched. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html">Amazon EKS node IAM role</a> in the <i> <i>Amazon EKS User Guide</i> </i>. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html">IamInstanceProfile</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
23 pub node_role: ::std::option::Option<::std::string::String>,
24 /// <p>The Kubernetes <code>labels</code> to apply to the nodes in the node group when they are created.</p>
25 pub labels: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
26 /// <p>The Kubernetes taints to be applied to the nodes in the node group. 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>
27 pub taints: ::std::option::Option<::std::vec::Vec<crate::types::Taint>>,
28 /// <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>
29 pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
30 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
31 pub client_request_token: ::std::option::Option<::std::string::String>,
32 /// <p>An object representing a node group's launch template specification. When using this object, don't directly specify <code>instanceTypes</code>, <code>diskSize</code>, or <code>remoteAccess</code>. You cannot later specify a different launch template ID or name than what was used to create the node group.</p>
33 /// <p>Make sure that the launch template meets the requirements in <code>launchTemplateSpecification</code>. Also refer to <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
34 pub launch_template: ::std::option::Option<crate::types::LaunchTemplateSpecification>,
35 /// <p>The node group update configuration.</p>
36 pub update_config: ::std::option::Option<crate::types::NodegroupUpdateConfig>,
37 /// <p>The node auto repair configuration for the node group.</p>
38 pub node_repair_config: ::std::option::Option<crate::types::NodeRepairConfig>,
39 /// <p>The capacity type for your node group.</p>
40 pub capacity_type: ::std::option::Option<crate::types::CapacityTypes>,
41 /// <p>The Kubernetes version to use for your managed nodes. By default, the Kubernetes version of the cluster is used, and this is the only accepted specified value. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>version</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
42 pub version: ::std::option::Option<::std::string::String>,
43 /// <p>The AMI version of the Amazon EKS optimized AMI to use with your node group. By default, the latest available AMI version for the node group's current Kubernetes version is used. For information about Linux versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html">Amazon EKS optimized Amazon Linux AMI versions</a> in the <i>Amazon EKS User Guide</i>. Amazon EKS managed node groups support the November 2022 and later releases of the Windows AMIs. For information about Windows versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html">Amazon EKS optimized Windows AMI versions</a> in the <i>Amazon EKS User Guide</i>.</p>
44 /// <p>If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>releaseVersion</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
45 pub release_version: ::std::option::Option<::std::string::String>,
46}
47impl CreateNodegroupInput {
48 /// <p>The name of your cluster.</p>
49 pub fn cluster_name(&self) -> ::std::option::Option<&str> {
50 self.cluster_name.as_deref()
51 }
52 /// <p>The unique name to give your node group.</p>
53 pub fn nodegroup_name(&self) -> ::std::option::Option<&str> {
54 self.nodegroup_name.as_deref()
55 }
56 /// <p>The scaling configuration details for the Auto Scaling group that is created for your node group.</p>
57 pub fn scaling_config(&self) -> ::std::option::Option<&crate::types::NodegroupScalingConfig> {
58 self.scaling_config.as_ref()
59 }
60 /// <p>The root device disk size (in GiB) for your node group instances. The default disk size is 20 GiB for Linux and Bottlerocket. The default disk size is 50 GiB for Windows. If you specify <code>launchTemplate</code>, then don't specify <code>diskSize</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
61 pub fn disk_size(&self) -> ::std::option::Option<i32> {
62 self.disk_size
63 }
64 /// <p>The subnets to use for the Auto Scaling group that is created for your node group. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html">SubnetId</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
65 ///
66 /// 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()`.
67 pub fn subnets(&self) -> &[::std::string::String] {
68 self.subnets.as_deref().unwrap_or_default()
69 }
70 /// <p>Specify the instance types for a node group. If you specify a GPU instance type, make sure to also specify an applicable GPU AMI type with the <code>amiType</code> parameter. If you specify <code>launchTemplate</code>, then you can specify zero or one instance type in your launch template <i>or</i> you can specify 0-20 instance types for <code>instanceTypes</code>. If however, you specify an instance type in your launch template <i>and</i> specify any <code>instanceTypes</code>, the node group deployment will fail. If you don't specify an instance type in a launch template or for <code>instanceTypes</code>, then <code>t3.medium</code> is used, by default. If you specify <code>Spot</code> for <code>capacityType</code>, then we recommend specifying multiple values for <code>instanceTypes</code>. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types">Managed node group capacity types</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
71 ///
72 /// 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()`.
73 pub fn instance_types(&self) -> &[::std::string::String] {
74 self.instance_types.as_deref().unwrap_or_default()
75 }
76 /// <p>The AMI type for your node group. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>amiType</code>, or the node group deployment will fail. If your launch template uses a Windows custom AMI, then add <code>eks:kube-proxy-windows</code> to your Windows nodes <code>rolearn</code> in the <code>aws-auth</code> <code>ConfigMap</code>. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
77 pub fn ami_type(&self) -> ::std::option::Option<&crate::types::AmiTypes> {
78 self.ami_type.as_ref()
79 }
80 /// <p>The remote access configuration to use with your node group. For Linux, the protocol is SSH. For Windows, the protocol is RDP. If you specify <code>launchTemplate</code>, then don't specify <code>remoteAccess</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
81 pub fn remote_access(&self) -> ::std::option::Option<&crate::types::RemoteAccessConfig> {
82 self.remote_access.as_ref()
83 }
84 /// <p>The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker 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. Before you can launch nodes and register them into a cluster, you must create an IAM role for those nodes to use when they are launched. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html">Amazon EKS node IAM role</a> in the <i> <i>Amazon EKS User Guide</i> </i>. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html">IamInstanceProfile</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
85 pub fn node_role(&self) -> ::std::option::Option<&str> {
86 self.node_role.as_deref()
87 }
88 /// <p>The Kubernetes <code>labels</code> to apply to the nodes in the node group when they are created.</p>
89 pub fn labels(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
90 self.labels.as_ref()
91 }
92 /// <p>The Kubernetes taints to be applied to the nodes in the node group. 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>
93 ///
94 /// 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()`.
95 pub fn taints(&self) -> &[crate::types::Taint] {
96 self.taints.as_deref().unwrap_or_default()
97 }
98 /// <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>
99 pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
100 self.tags.as_ref()
101 }
102 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
103 pub fn client_request_token(&self) -> ::std::option::Option<&str> {
104 self.client_request_token.as_deref()
105 }
106 /// <p>An object representing a node group's launch template specification. When using this object, don't directly specify <code>instanceTypes</code>, <code>diskSize</code>, or <code>remoteAccess</code>. You cannot later specify a different launch template ID or name than what was used to create the node group.</p>
107 /// <p>Make sure that the launch template meets the requirements in <code>launchTemplateSpecification</code>. Also refer to <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
108 pub fn launch_template(&self) -> ::std::option::Option<&crate::types::LaunchTemplateSpecification> {
109 self.launch_template.as_ref()
110 }
111 /// <p>The node group update configuration.</p>
112 pub fn update_config(&self) -> ::std::option::Option<&crate::types::NodegroupUpdateConfig> {
113 self.update_config.as_ref()
114 }
115 /// <p>The node auto repair configuration for the node group.</p>
116 pub fn node_repair_config(&self) -> ::std::option::Option<&crate::types::NodeRepairConfig> {
117 self.node_repair_config.as_ref()
118 }
119 /// <p>The capacity type for your node group.</p>
120 pub fn capacity_type(&self) -> ::std::option::Option<&crate::types::CapacityTypes> {
121 self.capacity_type.as_ref()
122 }
123 /// <p>The Kubernetes version to use for your managed nodes. By default, the Kubernetes version of the cluster is used, and this is the only accepted specified value. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>version</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
124 pub fn version(&self) -> ::std::option::Option<&str> {
125 self.version.as_deref()
126 }
127 /// <p>The AMI version of the Amazon EKS optimized AMI to use with your node group. By default, the latest available AMI version for the node group's current Kubernetes version is used. For information about Linux versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html">Amazon EKS optimized Amazon Linux AMI versions</a> in the <i>Amazon EKS User Guide</i>. Amazon EKS managed node groups support the November 2022 and later releases of the Windows AMIs. For information about Windows versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html">Amazon EKS optimized Windows AMI versions</a> in the <i>Amazon EKS User Guide</i>.</p>
128 /// <p>If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>releaseVersion</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
129 pub fn release_version(&self) -> ::std::option::Option<&str> {
130 self.release_version.as_deref()
131 }
132}
133impl CreateNodegroupInput {
134 /// Creates a new builder-style object to manufacture [`CreateNodegroupInput`](crate::operation::create_nodegroup::CreateNodegroupInput).
135 pub fn builder() -> crate::operation::create_nodegroup::builders::CreateNodegroupInputBuilder {
136 crate::operation::create_nodegroup::builders::CreateNodegroupInputBuilder::default()
137 }
138}
139
140/// A builder for [`CreateNodegroupInput`](crate::operation::create_nodegroup::CreateNodegroupInput).
141#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
142#[non_exhaustive]
143pub struct CreateNodegroupInputBuilder {
144 pub(crate) cluster_name: ::std::option::Option<::std::string::String>,
145 pub(crate) nodegroup_name: ::std::option::Option<::std::string::String>,
146 pub(crate) scaling_config: ::std::option::Option<crate::types::NodegroupScalingConfig>,
147 pub(crate) disk_size: ::std::option::Option<i32>,
148 pub(crate) subnets: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
149 pub(crate) instance_types: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
150 pub(crate) ami_type: ::std::option::Option<crate::types::AmiTypes>,
151 pub(crate) remote_access: ::std::option::Option<crate::types::RemoteAccessConfig>,
152 pub(crate) node_role: ::std::option::Option<::std::string::String>,
153 pub(crate) labels: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
154 pub(crate) taints: ::std::option::Option<::std::vec::Vec<crate::types::Taint>>,
155 pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
156 pub(crate) client_request_token: ::std::option::Option<::std::string::String>,
157 pub(crate) launch_template: ::std::option::Option<crate::types::LaunchTemplateSpecification>,
158 pub(crate) update_config: ::std::option::Option<crate::types::NodegroupUpdateConfig>,
159 pub(crate) node_repair_config: ::std::option::Option<crate::types::NodeRepairConfig>,
160 pub(crate) capacity_type: ::std::option::Option<crate::types::CapacityTypes>,
161 pub(crate) version: ::std::option::Option<::std::string::String>,
162 pub(crate) release_version: ::std::option::Option<::std::string::String>,
163}
164impl CreateNodegroupInputBuilder {
165 /// <p>The name of your cluster.</p>
166 /// This field is required.
167 pub fn cluster_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
168 self.cluster_name = ::std::option::Option::Some(input.into());
169 self
170 }
171 /// <p>The name of your cluster.</p>
172 pub fn set_cluster_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
173 self.cluster_name = input;
174 self
175 }
176 /// <p>The name of your cluster.</p>
177 pub fn get_cluster_name(&self) -> &::std::option::Option<::std::string::String> {
178 &self.cluster_name
179 }
180 /// <p>The unique name to give your node group.</p>
181 /// This field is required.
182 pub fn nodegroup_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
183 self.nodegroup_name = ::std::option::Option::Some(input.into());
184 self
185 }
186 /// <p>The unique name to give your node group.</p>
187 pub fn set_nodegroup_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
188 self.nodegroup_name = input;
189 self
190 }
191 /// <p>The unique name to give your node group.</p>
192 pub fn get_nodegroup_name(&self) -> &::std::option::Option<::std::string::String> {
193 &self.nodegroup_name
194 }
195 /// <p>The scaling configuration details for the Auto Scaling group that is created for your node group.</p>
196 pub fn scaling_config(mut self, input: crate::types::NodegroupScalingConfig) -> Self {
197 self.scaling_config = ::std::option::Option::Some(input);
198 self
199 }
200 /// <p>The scaling configuration details for the Auto Scaling group that is created for your node group.</p>
201 pub fn set_scaling_config(mut self, input: ::std::option::Option<crate::types::NodegroupScalingConfig>) -> Self {
202 self.scaling_config = input;
203 self
204 }
205 /// <p>The scaling configuration details for the Auto Scaling group that is created for your node group.</p>
206 pub fn get_scaling_config(&self) -> &::std::option::Option<crate::types::NodegroupScalingConfig> {
207 &self.scaling_config
208 }
209 /// <p>The root device disk size (in GiB) for your node group instances. The default disk size is 20 GiB for Linux and Bottlerocket. The default disk size is 50 GiB for Windows. If you specify <code>launchTemplate</code>, then don't specify <code>diskSize</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
210 pub fn disk_size(mut self, input: i32) -> Self {
211 self.disk_size = ::std::option::Option::Some(input);
212 self
213 }
214 /// <p>The root device disk size (in GiB) for your node group instances. The default disk size is 20 GiB for Linux and Bottlerocket. The default disk size is 50 GiB for Windows. If you specify <code>launchTemplate</code>, then don't specify <code>diskSize</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
215 pub fn set_disk_size(mut self, input: ::std::option::Option<i32>) -> Self {
216 self.disk_size = input;
217 self
218 }
219 /// <p>The root device disk size (in GiB) for your node group instances. The default disk size is 20 GiB for Linux and Bottlerocket. The default disk size is 50 GiB for Windows. If you specify <code>launchTemplate</code>, then don't specify <code>diskSize</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
220 pub fn get_disk_size(&self) -> &::std::option::Option<i32> {
221 &self.disk_size
222 }
223 /// Appends an item to `subnets`.
224 ///
225 /// To override the contents of this collection use [`set_subnets`](Self::set_subnets).
226 ///
227 /// <p>The subnets to use for the Auto Scaling group that is created for your node group. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html">SubnetId</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
228 pub fn subnets(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
229 let mut v = self.subnets.unwrap_or_default();
230 v.push(input.into());
231 self.subnets = ::std::option::Option::Some(v);
232 self
233 }
234 /// <p>The subnets to use for the Auto Scaling group that is created for your node group. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html">SubnetId</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
235 pub fn set_subnets(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
236 self.subnets = input;
237 self
238 }
239 /// <p>The subnets to use for the Auto Scaling group that is created for your node group. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_CreateNetworkInterface.html">SubnetId</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
240 pub fn get_subnets(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
241 &self.subnets
242 }
243 /// Appends an item to `instance_types`.
244 ///
245 /// To override the contents of this collection use [`set_instance_types`](Self::set_instance_types).
246 ///
247 /// <p>Specify the instance types for a node group. If you specify a GPU instance type, make sure to also specify an applicable GPU AMI type with the <code>amiType</code> parameter. If you specify <code>launchTemplate</code>, then you can specify zero or one instance type in your launch template <i>or</i> you can specify 0-20 instance types for <code>instanceTypes</code>. If however, you specify an instance type in your launch template <i>and</i> specify any <code>instanceTypes</code>, the node group deployment will fail. If you don't specify an instance type in a launch template or for <code>instanceTypes</code>, then <code>t3.medium</code> is used, by default. If you specify <code>Spot</code> for <code>capacityType</code>, then we recommend specifying multiple values for <code>instanceTypes</code>. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types">Managed node group capacity types</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
248 pub fn instance_types(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
249 let mut v = self.instance_types.unwrap_or_default();
250 v.push(input.into());
251 self.instance_types = ::std::option::Option::Some(v);
252 self
253 }
254 /// <p>Specify the instance types for a node group. If you specify a GPU instance type, make sure to also specify an applicable GPU AMI type with the <code>amiType</code> parameter. If you specify <code>launchTemplate</code>, then you can specify zero or one instance type in your launch template <i>or</i> you can specify 0-20 instance types for <code>instanceTypes</code>. If however, you specify an instance type in your launch template <i>and</i> specify any <code>instanceTypes</code>, the node group deployment will fail. If you don't specify an instance type in a launch template or for <code>instanceTypes</code>, then <code>t3.medium</code> is used, by default. If you specify <code>Spot</code> for <code>capacityType</code>, then we recommend specifying multiple values for <code>instanceTypes</code>. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types">Managed node group capacity types</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
255 pub fn set_instance_types(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
256 self.instance_types = input;
257 self
258 }
259 /// <p>Specify the instance types for a node group. If you specify a GPU instance type, make sure to also specify an applicable GPU AMI type with the <code>amiType</code> parameter. If you specify <code>launchTemplate</code>, then you can specify zero or one instance type in your launch template <i>or</i> you can specify 0-20 instance types for <code>instanceTypes</code>. If however, you specify an instance type in your launch template <i>and</i> specify any <code>instanceTypes</code>, the node group deployment will fail. If you don't specify an instance type in a launch template or for <code>instanceTypes</code>, then <code>t3.medium</code> is used, by default. If you specify <code>Spot</code> for <code>capacityType</code>, then we recommend specifying multiple values for <code>instanceTypes</code>. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/managed-node-groups.html#managed-node-group-capacity-types">Managed node group capacity types</a> and <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
260 pub fn get_instance_types(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
261 &self.instance_types
262 }
263 /// <p>The AMI type for your node group. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>amiType</code>, or the node group deployment will fail. If your launch template uses a Windows custom AMI, then add <code>eks:kube-proxy-windows</code> to your Windows nodes <code>rolearn</code> in the <code>aws-auth</code> <code>ConfigMap</code>. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
264 pub fn ami_type(mut self, input: crate::types::AmiTypes) -> Self {
265 self.ami_type = ::std::option::Option::Some(input);
266 self
267 }
268 /// <p>The AMI type for your node group. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>amiType</code>, or the node group deployment will fail. If your launch template uses a Windows custom AMI, then add <code>eks:kube-proxy-windows</code> to your Windows nodes <code>rolearn</code> in the <code>aws-auth</code> <code>ConfigMap</code>. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
269 pub fn set_ami_type(mut self, input: ::std::option::Option<crate::types::AmiTypes>) -> Self {
270 self.ami_type = input;
271 self
272 }
273 /// <p>The AMI type for your node group. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>amiType</code>, or the node group deployment will fail. If your launch template uses a Windows custom AMI, then add <code>eks:kube-proxy-windows</code> to your Windows nodes <code>rolearn</code> in the <code>aws-auth</code> <code>ConfigMap</code>. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
274 pub fn get_ami_type(&self) -> &::std::option::Option<crate::types::AmiTypes> {
275 &self.ami_type
276 }
277 /// <p>The remote access configuration to use with your node group. For Linux, the protocol is SSH. For Windows, the protocol is RDP. If you specify <code>launchTemplate</code>, then don't specify <code>remoteAccess</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
278 pub fn remote_access(mut self, input: crate::types::RemoteAccessConfig) -> Self {
279 self.remote_access = ::std::option::Option::Some(input);
280 self
281 }
282 /// <p>The remote access configuration to use with your node group. For Linux, the protocol is SSH. For Windows, the protocol is RDP. If you specify <code>launchTemplate</code>, then don't specify <code>remoteAccess</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
283 pub fn set_remote_access(mut self, input: ::std::option::Option<crate::types::RemoteAccessConfig>) -> Self {
284 self.remote_access = input;
285 self
286 }
287 /// <p>The remote access configuration to use with your node group. For Linux, the protocol is SSH. For Windows, the protocol is RDP. If you specify <code>launchTemplate</code>, then don't specify <code>remoteAccess</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
288 pub fn get_remote_access(&self) -> &::std::option::Option<crate::types::RemoteAccessConfig> {
289 &self.remote_access
290 }
291 /// <p>The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker 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. Before you can launch nodes and register them into a cluster, you must create an IAM role for those nodes to use when they are launched. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html">Amazon EKS node IAM role</a> in the <i> <i>Amazon EKS User Guide</i> </i>. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html">IamInstanceProfile</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
292 /// This field is required.
293 pub fn node_role(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
294 self.node_role = ::std::option::Option::Some(input.into());
295 self
296 }
297 /// <p>The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker 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. Before you can launch nodes and register them into a cluster, you must create an IAM role for those nodes to use when they are launched. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html">Amazon EKS node IAM role</a> in the <i> <i>Amazon EKS User Guide</i> </i>. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html">IamInstanceProfile</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
298 pub fn set_node_role(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
299 self.node_role = input;
300 self
301 }
302 /// <p>The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker 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. Before you can launch nodes and register them into a cluster, you must create an IAM role for those nodes to use when they are launched. For more information, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/create-node-role.html">Amazon EKS node IAM role</a> in the <i> <i>Amazon EKS User Guide</i> </i>. If you specify <code>launchTemplate</code>, then don't specify <code> <a href="https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_IamInstanceProfile.html">IamInstanceProfile</a> </code> in your launch template, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
303 pub fn get_node_role(&self) -> &::std::option::Option<::std::string::String> {
304 &self.node_role
305 }
306 /// Adds a key-value pair to `labels`.
307 ///
308 /// To override the contents of this collection use [`set_labels`](Self::set_labels).
309 ///
310 /// <p>The Kubernetes <code>labels</code> to apply to the nodes in the node group when they are created.</p>
311 pub fn labels(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
312 let mut hash_map = self.labels.unwrap_or_default();
313 hash_map.insert(k.into(), v.into());
314 self.labels = ::std::option::Option::Some(hash_map);
315 self
316 }
317 /// <p>The Kubernetes <code>labels</code> to apply to the nodes in the node group when they are created.</p>
318 pub fn set_labels(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
319 self.labels = input;
320 self
321 }
322 /// <p>The Kubernetes <code>labels</code> to apply to the nodes in the node group when they are created.</p>
323 pub fn get_labels(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
324 &self.labels
325 }
326 /// Appends an item to `taints`.
327 ///
328 /// To override the contents of this collection use [`set_taints`](Self::set_taints).
329 ///
330 /// <p>The Kubernetes taints to be applied to the nodes in the node group. 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>
331 pub fn taints(mut self, input: crate::types::Taint) -> Self {
332 let mut v = self.taints.unwrap_or_default();
333 v.push(input);
334 self.taints = ::std::option::Option::Some(v);
335 self
336 }
337 /// <p>The Kubernetes taints to be applied to the nodes in the node group. 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>
338 pub fn set_taints(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Taint>>) -> Self {
339 self.taints = input;
340 self
341 }
342 /// <p>The Kubernetes taints to be applied to the nodes in the node group. 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>
343 pub fn get_taints(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Taint>> {
344 &self.taints
345 }
346 /// Adds a key-value pair to `tags`.
347 ///
348 /// To override the contents of this collection use [`set_tags`](Self::set_tags).
349 ///
350 /// <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>
351 pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
352 let mut hash_map = self.tags.unwrap_or_default();
353 hash_map.insert(k.into(), v.into());
354 self.tags = ::std::option::Option::Some(hash_map);
355 self
356 }
357 /// <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>
358 pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
359 self.tags = input;
360 self
361 }
362 /// <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>
363 pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
364 &self.tags
365 }
366 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
367 pub fn client_request_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
368 self.client_request_token = ::std::option::Option::Some(input.into());
369 self
370 }
371 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
372 pub fn set_client_request_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
373 self.client_request_token = input;
374 self
375 }
376 /// <p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p>
377 pub fn get_client_request_token(&self) -> &::std::option::Option<::std::string::String> {
378 &self.client_request_token
379 }
380 /// <p>An object representing a node group's launch template specification. When using this object, don't directly specify <code>instanceTypes</code>, <code>diskSize</code>, or <code>remoteAccess</code>. You cannot later specify a different launch template ID or name than what was used to create the node group.</p>
381 /// <p>Make sure that the launch template meets the requirements in <code>launchTemplateSpecification</code>. Also refer to <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
382 pub fn launch_template(mut self, input: crate::types::LaunchTemplateSpecification) -> Self {
383 self.launch_template = ::std::option::Option::Some(input);
384 self
385 }
386 /// <p>An object representing a node group's launch template specification. When using this object, don't directly specify <code>instanceTypes</code>, <code>diskSize</code>, or <code>remoteAccess</code>. You cannot later specify a different launch template ID or name than what was used to create the node group.</p>
387 /// <p>Make sure that the launch template meets the requirements in <code>launchTemplateSpecification</code>. Also refer to <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
388 pub fn set_launch_template(mut self, input: ::std::option::Option<crate::types::LaunchTemplateSpecification>) -> Self {
389 self.launch_template = input;
390 self
391 }
392 /// <p>An object representing a node group's launch template specification. When using this object, don't directly specify <code>instanceTypes</code>, <code>diskSize</code>, or <code>remoteAccess</code>. You cannot later specify a different launch template ID or name than what was used to create the node group.</p>
393 /// <p>Make sure that the launch template meets the requirements in <code>launchTemplateSpecification</code>. Also refer to <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
394 pub fn get_launch_template(&self) -> &::std::option::Option<crate::types::LaunchTemplateSpecification> {
395 &self.launch_template
396 }
397 /// <p>The node group update configuration.</p>
398 pub fn update_config(mut self, input: crate::types::NodegroupUpdateConfig) -> Self {
399 self.update_config = ::std::option::Option::Some(input);
400 self
401 }
402 /// <p>The node group update configuration.</p>
403 pub fn set_update_config(mut self, input: ::std::option::Option<crate::types::NodegroupUpdateConfig>) -> Self {
404 self.update_config = input;
405 self
406 }
407 /// <p>The node group update configuration.</p>
408 pub fn get_update_config(&self) -> &::std::option::Option<crate::types::NodegroupUpdateConfig> {
409 &self.update_config
410 }
411 /// <p>The node auto repair configuration for the node group.</p>
412 pub fn node_repair_config(mut self, input: crate::types::NodeRepairConfig) -> Self {
413 self.node_repair_config = ::std::option::Option::Some(input);
414 self
415 }
416 /// <p>The node auto repair configuration for the node group.</p>
417 pub fn set_node_repair_config(mut self, input: ::std::option::Option<crate::types::NodeRepairConfig>) -> Self {
418 self.node_repair_config = input;
419 self
420 }
421 /// <p>The node auto repair configuration for the node group.</p>
422 pub fn get_node_repair_config(&self) -> &::std::option::Option<crate::types::NodeRepairConfig> {
423 &self.node_repair_config
424 }
425 /// <p>The capacity type for your node group.</p>
426 pub fn capacity_type(mut self, input: crate::types::CapacityTypes) -> Self {
427 self.capacity_type = ::std::option::Option::Some(input);
428 self
429 }
430 /// <p>The capacity type for your node group.</p>
431 pub fn set_capacity_type(mut self, input: ::std::option::Option<crate::types::CapacityTypes>) -> Self {
432 self.capacity_type = input;
433 self
434 }
435 /// <p>The capacity type for your node group.</p>
436 pub fn get_capacity_type(&self) -> &::std::option::Option<crate::types::CapacityTypes> {
437 &self.capacity_type
438 }
439 /// <p>The Kubernetes version to use for your managed nodes. By default, the Kubernetes version of the cluster is used, and this is the only accepted specified value. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>version</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
440 pub fn version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
441 self.version = ::std::option::Option::Some(input.into());
442 self
443 }
444 /// <p>The Kubernetes version to use for your managed nodes. By default, the Kubernetes version of the cluster is used, and this is the only accepted specified value. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>version</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
445 pub fn set_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
446 self.version = input;
447 self
448 }
449 /// <p>The Kubernetes version to use for your managed nodes. By default, the Kubernetes version of the cluster is used, and this is the only accepted specified value. If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>version</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
450 pub fn get_version(&self) -> &::std::option::Option<::std::string::String> {
451 &self.version
452 }
453 /// <p>The AMI version of the Amazon EKS optimized AMI to use with your node group. By default, the latest available AMI version for the node group's current Kubernetes version is used. For information about Linux versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html">Amazon EKS optimized Amazon Linux AMI versions</a> in the <i>Amazon EKS User Guide</i>. Amazon EKS managed node groups support the November 2022 and later releases of the Windows AMIs. For information about Windows versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html">Amazon EKS optimized Windows AMI versions</a> in the <i>Amazon EKS User Guide</i>.</p>
454 /// <p>If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>releaseVersion</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
455 pub fn release_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
456 self.release_version = ::std::option::Option::Some(input.into());
457 self
458 }
459 /// <p>The AMI version of the Amazon EKS optimized AMI to use with your node group. By default, the latest available AMI version for the node group's current Kubernetes version is used. For information about Linux versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html">Amazon EKS optimized Amazon Linux AMI versions</a> in the <i>Amazon EKS User Guide</i>. Amazon EKS managed node groups support the November 2022 and later releases of the Windows AMIs. For information about Windows versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html">Amazon EKS optimized Windows AMI versions</a> in the <i>Amazon EKS User Guide</i>.</p>
460 /// <p>If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>releaseVersion</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
461 pub fn set_release_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
462 self.release_version = input;
463 self
464 }
465 /// <p>The AMI version of the Amazon EKS optimized AMI to use with your node group. By default, the latest available AMI version for the node group's current Kubernetes version is used. For information about Linux versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-linux-ami-versions.html">Amazon EKS optimized Amazon Linux AMI versions</a> in the <i>Amazon EKS User Guide</i>. Amazon EKS managed node groups support the November 2022 and later releases of the Windows AMIs. For information about Windows versions, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/eks-ami-versions-windows.html">Amazon EKS optimized Windows AMI versions</a> in the <i>Amazon EKS User Guide</i>.</p>
466 /// <p>If you specify <code>launchTemplate</code>, and your launch template uses a custom AMI, then don't specify <code>releaseVersion</code>, or the node group deployment will fail. For more information about using launch templates with Amazon EKS, see <a href="https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html">Customizing managed nodes with launch templates</a> in the <i>Amazon EKS User Guide</i>.</p>
467 pub fn get_release_version(&self) -> &::std::option::Option<::std::string::String> {
468 &self.release_version
469 }
470 /// Consumes the builder and constructs a [`CreateNodegroupInput`](crate::operation::create_nodegroup::CreateNodegroupInput).
471 pub fn build(
472 self,
473 ) -> ::std::result::Result<crate::operation::create_nodegroup::CreateNodegroupInput, ::aws_smithy_types::error::operation::BuildError> {
474 ::std::result::Result::Ok(crate::operation::create_nodegroup::CreateNodegroupInput {
475 cluster_name: self.cluster_name,
476 nodegroup_name: self.nodegroup_name,
477 scaling_config: self.scaling_config,
478 disk_size: self.disk_size,
479 subnets: self.subnets,
480 instance_types: self.instance_types,
481 ami_type: self.ami_type,
482 remote_access: self.remote_access,
483 node_role: self.node_role,
484 labels: self.labels,
485 taints: self.taints,
486 tags: self.tags,
487 client_request_token: self.client_request_token,
488 launch_template: self.launch_template,
489 update_config: self.update_config,
490 node_repair_config: self.node_repair_config,
491 capacity_type: self.capacity_type,
492 version: self.version,
493 release_version: self.release_version,
494 })
495 }
496}