aws_sdk_eks/client/create_nodegroup.rs
1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2impl super::Client {
3 /// Constructs a fluent builder for the [`CreateNodegroup`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder) operation.
4 ///
5 /// - The fluent builder is configurable:
6 /// - [`cluster_name(impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::cluster_name) / [`set_cluster_name(Option<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_cluster_name):<br>required: **true**<br><p>The name of your cluster.</p><br>
7 /// - [`nodegroup_name(impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::nodegroup_name) / [`set_nodegroup_name(Option<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_nodegroup_name):<br>required: **true**<br><p>The unique name to give your node group.</p><br>
8 /// - [`scaling_config(NodegroupScalingConfig)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::scaling_config) / [`set_scaling_config(Option<NodegroupScalingConfig>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_scaling_config):<br>required: **false**<br><p>The scaling configuration details for the Auto Scaling group that is created for your node group.</p><br>
9 /// - [`disk_size(i32)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::disk_size) / [`set_disk_size(Option<i32>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_disk_size):<br>required: **false**<br><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><br>
10 /// - [`subnets(impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::subnets) / [`set_subnets(Option<Vec::<String>>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_subnets):<br>required: **true**<br><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><br>
11 /// - [`instance_types(impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::instance_types) / [`set_instance_types(Option<Vec::<String>>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_instance_types):<br>required: **false**<br><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><br>
12 /// - [`ami_type(AmiTypes)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::ami_type) / [`set_ami_type(Option<AmiTypes>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_ami_type):<br>required: **false**<br><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><br>
13 /// - [`remote_access(RemoteAccessConfig)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::remote_access) / [`set_remote_access(Option<RemoteAccessConfig>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_remote_access):<br>required: **false**<br><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><br>
14 /// - [`node_role(impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::node_role) / [`set_node_role(Option<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_node_role):<br>required: **true**<br><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><br>
15 /// - [`labels(impl Into<String>, impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::labels) / [`set_labels(Option<HashMap::<String, String>>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_labels):<br>required: **false**<br><p>The Kubernetes <code>labels</code> to apply to the nodes in the node group when they are created.</p><br>
16 /// - [`taints(Taint)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::taints) / [`set_taints(Option<Vec::<Taint>>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_taints):<br>required: **false**<br><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><br>
17 /// - [`tags(impl Into<String>, impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::tags) / [`set_tags(Option<HashMap::<String, String>>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_tags):<br>required: **false**<br><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><br>
18 /// - [`client_request_token(impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::client_request_token) / [`set_client_request_token(Option<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_client_request_token):<br>required: **false**<br><p>A unique, case-sensitive identifier that you provide to ensure the idempotency of the request.</p><br>
19 /// - [`launch_template(LaunchTemplateSpecification)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::launch_template) / [`set_launch_template(Option<LaunchTemplateSpecification>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_launch_template):<br>required: **false**<br><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> <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><br>
20 /// - [`update_config(NodegroupUpdateConfig)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::update_config) / [`set_update_config(Option<NodegroupUpdateConfig>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_update_config):<br>required: **false**<br><p>The node group update configuration.</p><br>
21 /// - [`node_repair_config(NodeRepairConfig)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::node_repair_config) / [`set_node_repair_config(Option<NodeRepairConfig>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_node_repair_config):<br>required: **false**<br><p>The node auto repair configuration for the node group.</p><br>
22 /// - [`capacity_type(CapacityTypes)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::capacity_type) / [`set_capacity_type(Option<CapacityTypes>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_capacity_type):<br>required: **false**<br><p>The capacity type for your node group.</p><br>
23 /// - [`version(impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::version) / [`set_version(Option<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_version):<br>required: **false**<br><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><br>
24 /// - [`release_version(impl Into<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::release_version) / [`set_release_version(Option<String>)`](crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::set_release_version):<br>required: **false**<br><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> <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><br>
25 /// - On success, responds with [`CreateNodegroupOutput`](crate::operation::create_nodegroup::CreateNodegroupOutput) with field(s):
26 /// - [`nodegroup(Option<Nodegroup>)`](crate::operation::create_nodegroup::CreateNodegroupOutput::nodegroup): <p>The full description of your new node group.</p>
27 /// - On failure, responds with [`SdkError<CreateNodegroupError>`](crate::operation::create_nodegroup::CreateNodegroupError)
28 pub fn create_nodegroup(&self) -> crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder {
29 crate::operation::create_nodegroup::builders::CreateNodegroupFluentBuilder::new(self.handle.clone())
30 }
31}