/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.eks.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateNodegroupRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name of the cluster to create the node group in. *
*/ private String clusterName; /** ** The unique name to give your node group. *
*/ private String nodegroupName; /** ** The scaling configuration details for the Auto Scaling group that is created for your node group. *
*/ private NodegroupScalingConfig scalingConfig; /** *
* 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 launchTemplate
, then don't
* specify diskSize
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* The subnets to use for the Auto Scaling group that is created for your node group. If you specify
* launchTemplate
, then don't specify
* SubnetId
in your launch template, or the node group deployment will fail. For more information
* about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* 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 amiType
parameter. If you specify launchTemplate
, then
* you can specify zero or one instance type in your launch template or you can specify 0-20 instance types
* for instanceTypes
. If however, you specify an instance type in your launch template and
* specify any instanceTypes
, the node group deployment will fail. If you don't specify an instance
* type in a launch template or for instanceTypes
, then t3.medium
is used, by default. If
* you specify Spot
for capacityType
, then we recommend specifying multiple values for
* instanceTypes
. For more information, see Managed node group capacity types and Launch template support in the
* Amazon EKS User Guide.
*
* The AMI type for your node group. If you specify launchTemplate
, and your launch template uses a
* custom AMI, then don't specify amiType
, or the node group deployment will fail. If your launch
* template uses a Windows custom AMI, then add eks:kube-proxy-windows
to your Windows nodes
* rolearn
in the aws-auth
ConfigMap
. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* 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 launchTemplate
, then don't specify remoteAccess
, or the
* node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker node
* kubelet
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 Amazon EKS node
* IAM role in the Amazon EKS User Guide . If you specify launchTemplate
, then don't
* specify
* IamInstanceProfile
in your launch template, or the node group deployment will fail. For more
* information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* The Kubernetes labels to be applied to the nodes in the node group when they are created. *
*/ private java.util.Map* The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints on * managed node groups. *
*/ private java.util.List* The metadata to apply to the node group to assist with categorization and organization. Each tag consists of a * key and an optional value. You define both. Node group tags do not propagate to any other resources associated * with the node group, such as the Amazon EC2 instances or subnets. *
*/ private java.util.Map* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
*/ private String clientRequestToken; /** *
* An object representing a node group's launch template specification. If specified, then do not specify
* instanceTypes
, diskSize
, or remoteAccess
and make sure that the launch
* template meets the requirements in launchTemplateSpecification
.
*
* The node group update configuration. *
*/ private NodegroupUpdateConfig updateConfig; /** ** The capacity type for your node group. *
*/ private String capacityType; /** *
* 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 launchTemplate
, and your launch
* template uses a custom AMI, then don't specify version
, or the node group deployment will fail. For
* more information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* 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 Amazon EKS optimized Amazon * Linux AMI versions in the Amazon EKS User Guide. Amazon EKS managed node groups support the November * 2022 and later releases of the Windows AMIs. For information about Windows versions, see Amazon EKS optimized * Windows AMI versions in the Amazon EKS User Guide. *
*
* If you specify launchTemplate
, and your launch template uses a custom AMI, then don't specify
* releaseVersion
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* The name of the cluster to create the node group in. *
* * @param clusterName * The name of the cluster to create the node group in. */ public void setClusterName(String clusterName) { this.clusterName = clusterName; } /** ** The name of the cluster to create the node group in. *
* * @return The name of the cluster to create the node group in. */ public String getClusterName() { return this.clusterName; } /** ** The name of the cluster to create the node group in. *
* * @param clusterName * The name of the cluster to create the node group in. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNodegroupRequest withClusterName(String clusterName) { setClusterName(clusterName); return this; } /** ** The unique name to give your node group. *
* * @param nodegroupName * The unique name to give your node group. */ public void setNodegroupName(String nodegroupName) { this.nodegroupName = nodegroupName; } /** ** The unique name to give your node group. *
* * @return The unique name to give your node group. */ public String getNodegroupName() { return this.nodegroupName; } /** ** The unique name to give your node group. *
* * @param nodegroupName * The unique name to give your node group. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNodegroupRequest withNodegroupName(String nodegroupName) { setNodegroupName(nodegroupName); return this; } /** ** The scaling configuration details for the Auto Scaling group that is created for your node group. *
* * @param scalingConfig * The scaling configuration details for the Auto Scaling group that is created for your node group. */ public void setScalingConfig(NodegroupScalingConfig scalingConfig) { this.scalingConfig = scalingConfig; } /** ** The scaling configuration details for the Auto Scaling group that is created for your node group. *
* * @return The scaling configuration details for the Auto Scaling group that is created for your node group. */ public NodegroupScalingConfig getScalingConfig() { return this.scalingConfig; } /** ** The scaling configuration details for the Auto Scaling group that is created for your node group. *
* * @param scalingConfig * The scaling configuration details for the Auto Scaling group that is created for your node group. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNodegroupRequest withScalingConfig(NodegroupScalingConfig scalingConfig) { setScalingConfig(scalingConfig); return this; } /** *
* 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 launchTemplate
, then don't
* specify diskSize
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, then don't specify diskSize
, or the node group deployment will
* fail. For more information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public void setDiskSize(Integer diskSize) {
this.diskSize = diskSize;
}
/**
*
* 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 launchTemplate
, then don't
* specify diskSize
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, then don't specify diskSize
, or the node group deployment will
* fail. For more information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public Integer getDiskSize() {
return this.diskSize;
}
/**
*
* 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 launchTemplate
, then don't
* specify diskSize
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, then don't specify diskSize
, or the node group deployment will
* fail. For more information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withDiskSize(Integer diskSize) {
setDiskSize(diskSize);
return this;
}
/**
*
* The subnets to use for the Auto Scaling group that is created for your node group. If you specify
* launchTemplate
, then don't specify
* SubnetId
in your launch template, or the node group deployment will fail. For more information
* about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, then don't specify
* SubnetId
in your launch template, or the node group deployment will fail. For more
* information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public java.util.List
* The subnets to use for the Auto Scaling group that is created for your node group. If you specify
* launchTemplate
, then don't specify
* SubnetId
in your launch template, or the node group deployment will fail. For more information
* about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, then don't specify
* SubnetId
in your launch template, or the node group deployment will fail. For more
* information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public void setSubnets(java.util.Collection
* The subnets to use for the Auto Scaling group that is created for your node group. If you specify
* launchTemplate
, then don't specify
* SubnetId
in your launch template, or the node group deployment will fail. For more information
* about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setSubnets(java.util.Collection)} or {@link #withSubnets(java.util.Collection)} if you want to override * the existing values. *
* * @param subnets * The subnets to use for the Auto Scaling group that is created for your node group. If you specify *launchTemplate
, then don't specify
* SubnetId
in your launch template, or the node group deployment will fail. For more
* information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withSubnets(String... subnets) {
if (this.subnets == null) {
setSubnets(new java.util.ArrayList
* The subnets to use for the Auto Scaling group that is created for your node group. If you specify
* launchTemplate
, then don't specify
* SubnetId
in your launch template, or the node group deployment will fail. For more information
* about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, then don't specify
* SubnetId
in your launch template, or the node group deployment will fail. For more
* information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withSubnets(java.util.Collection
* 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 amiType
parameter. If you specify launchTemplate
, then
* you can specify zero or one instance type in your launch template or you can specify 0-20 instance types
* for instanceTypes
. If however, you specify an instance type in your launch template and
* specify any instanceTypes
, the node group deployment will fail. If you don't specify an instance
* type in a launch template or for instanceTypes
, then t3.medium
is used, by default. If
* you specify Spot
for capacityType
, then we recommend specifying multiple values for
* instanceTypes
. For more information, see Managed node group capacity types and Launch template support in the
* Amazon EKS User Guide.
*
amiType
parameter. If you specify
* launchTemplate
, then you can specify zero or one instance type in your launch template
* or you can specify 0-20 instance types for instanceTypes
. If however, you specify an
* instance type in your launch template and specify any instanceTypes
, the node group
* deployment will fail. If you don't specify an instance type in a launch template or for
* instanceTypes
, then t3.medium
is used, by default. If you specify
* Spot
for capacityType
, then we recommend specifying multiple values for
* instanceTypes
. For more information, see Managed node group capacity types and Launch template support
* in the Amazon EKS User Guide.
*/
public java.util.List
* 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 amiType
parameter. If you specify launchTemplate
, then
* you can specify zero or one instance type in your launch template or you can specify 0-20 instance types
* for instanceTypes
. If however, you specify an instance type in your launch template and
* specify any instanceTypes
, the node group deployment will fail. If you don't specify an instance
* type in a launch template or for instanceTypes
, then t3.medium
is used, by default. If
* you specify Spot
for capacityType
, then we recommend specifying multiple values for
* instanceTypes
. For more information, see Managed node group capacity types and Launch template support in the
* Amazon EKS User Guide.
*
amiType
parameter. If you specify
* launchTemplate
, then you can specify zero or one instance type in your launch template
* or you can specify 0-20 instance types for instanceTypes
. If however, you specify an
* instance type in your launch template and specify any instanceTypes
, the node group
* deployment will fail. If you don't specify an instance type in a launch template or for
* instanceTypes
, then t3.medium
is used, by default. If you specify
* Spot
for capacityType
, then we recommend specifying multiple values for
* instanceTypes
. For more information, see Managed node group capacity types and Launch template support
* in the Amazon EKS User Guide.
*/
public void setInstanceTypes(java.util.Collection
* 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 amiType
parameter. If you specify launchTemplate
, then
* you can specify zero or one instance type in your launch template or you can specify 0-20 instance types
* for instanceTypes
. If however, you specify an instance type in your launch template and
* specify any instanceTypes
, the node group deployment will fail. If you don't specify an instance
* type in a launch template or for instanceTypes
, then t3.medium
is used, by default. If
* you specify Spot
for capacityType
, then we recommend specifying multiple values for
* instanceTypes
. For more information, see Managed node group capacity types and Launch template support in the
* Amazon EKS User Guide.
*
* NOTE: This method appends the values to the existing list (if any). Use * {@link #setInstanceTypes(java.util.Collection)} or {@link #withInstanceTypes(java.util.Collection)} if you want * to override the existing values. *
* * @param instanceTypes * 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 theamiType
parameter. If you specify
* launchTemplate
, then you can specify zero or one instance type in your launch template
* or you can specify 0-20 instance types for instanceTypes
. If however, you specify an
* instance type in your launch template and specify any instanceTypes
, the node group
* deployment will fail. If you don't specify an instance type in a launch template or for
* instanceTypes
, then t3.medium
is used, by default. If you specify
* Spot
for capacityType
, then we recommend specifying multiple values for
* instanceTypes
. For more information, see Managed node group capacity types and Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withInstanceTypes(String... instanceTypes) {
if (this.instanceTypes == null) {
setInstanceTypes(new java.util.ArrayList
* 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 amiType
parameter. If you specify launchTemplate
, then
* you can specify zero or one instance type in your launch template or you can specify 0-20 instance types
* for instanceTypes
. If however, you specify an instance type in your launch template and
* specify any instanceTypes
, the node group deployment will fail. If you don't specify an instance
* type in a launch template or for instanceTypes
, then t3.medium
is used, by default. If
* you specify Spot
for capacityType
, then we recommend specifying multiple values for
* instanceTypes
. For more information, see Managed node group capacity types and Launch template support in the
* Amazon EKS User Guide.
*
amiType
parameter. If you specify
* launchTemplate
, then you can specify zero or one instance type in your launch template
* or you can specify 0-20 instance types for instanceTypes
. If however, you specify an
* instance type in your launch template and specify any instanceTypes
, the node group
* deployment will fail. If you don't specify an instance type in a launch template or for
* instanceTypes
, then t3.medium
is used, by default. If you specify
* Spot
for capacityType
, then we recommend specifying multiple values for
* instanceTypes
. For more information, see Managed node group capacity types and Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withInstanceTypes(java.util.Collection
* The AMI type for your node group. If you specify launchTemplate
, and your launch template uses a
* custom AMI, then don't specify amiType
, or the node group deployment will fail. If your launch
* template uses a Windows custom AMI, then add eks:kube-proxy-windows
to your Windows nodes
* rolearn
in the aws-auth
ConfigMap
. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, and your launch template
* uses a custom AMI, then don't specify amiType
, or the node group deployment will fail. If
* your launch template uses a Windows custom AMI, then add eks:kube-proxy-windows
to your
* Windows nodes rolearn
in the aws-auth
ConfigMap
. For more
* information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @see AMITypes
*/
public void setAmiType(String amiType) {
this.amiType = amiType;
}
/**
*
* The AMI type for your node group. If you specify launchTemplate
, and your launch template uses a
* custom AMI, then don't specify amiType
, or the node group deployment will fail. If your launch
* template uses a Windows custom AMI, then add eks:kube-proxy-windows
to your Windows nodes
* rolearn
in the aws-auth
ConfigMap
. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, and your launch template
* uses a custom AMI, then don't specify amiType
, or the node group deployment will fail. If
* your launch template uses a Windows custom AMI, then add eks:kube-proxy-windows
to your
* Windows nodes rolearn
in the aws-auth
ConfigMap
. For more
* information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @see AMITypes
*/
public String getAmiType() {
return this.amiType;
}
/**
*
* The AMI type for your node group. If you specify launchTemplate
, and your launch template uses a
* custom AMI, then don't specify amiType
, or the node group deployment will fail. If your launch
* template uses a Windows custom AMI, then add eks:kube-proxy-windows
to your Windows nodes
* rolearn
in the aws-auth
ConfigMap
. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, and your launch template
* uses a custom AMI, then don't specify amiType
, or the node group deployment will fail. If
* your launch template uses a Windows custom AMI, then add eks:kube-proxy-windows
to your
* Windows nodes rolearn
in the aws-auth
ConfigMap
. For more
* information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AMITypes
*/
public CreateNodegroupRequest withAmiType(String amiType) {
setAmiType(amiType);
return this;
}
/**
*
* The AMI type for your node group. If you specify launchTemplate
, and your launch template uses a
* custom AMI, then don't specify amiType
, or the node group deployment will fail. If your launch
* template uses a Windows custom AMI, then add eks:kube-proxy-windows
to your Windows nodes
* rolearn
in the aws-auth
ConfigMap
. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, and your launch template
* uses a custom AMI, then don't specify amiType
, or the node group deployment will fail. If
* your launch template uses a Windows custom AMI, then add eks:kube-proxy-windows
to your
* Windows nodes rolearn
in the aws-auth
ConfigMap
. For more
* information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AMITypes
*/
public CreateNodegroupRequest withAmiType(AMITypes amiType) {
this.amiType = amiType.toString();
return this;
}
/**
*
* 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 launchTemplate
, then don't specify remoteAccess
, or the
* node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, then don't specify
* remoteAccess
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public void setRemoteAccess(RemoteAccessConfig remoteAccess) {
this.remoteAccess = remoteAccess;
}
/**
*
* 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 launchTemplate
, then don't specify remoteAccess
, or the
* node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, then don't specify
* remoteAccess
, or the node group deployment will fail. For more information about using
* launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public RemoteAccessConfig getRemoteAccess() {
return this.remoteAccess;
}
/**
*
* 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 launchTemplate
, then don't specify remoteAccess
, or the
* node group deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, then don't specify
* remoteAccess
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withRemoteAccess(RemoteAccessConfig remoteAccess) {
setRemoteAccess(remoteAccess);
return this;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker node
* kubelet
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 Amazon EKS node
* IAM role in the Amazon EKS User Guide . If you specify launchTemplate
, then don't
* specify
* IamInstanceProfile
in your launch template, or the node group deployment will fail. For more
* information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
kubelet
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 Amazon EKS node IAM role
* in the Amazon EKS User Guide . If you specify launchTemplate
, then don't
* specify
* IamInstanceProfile
in your launch template, or the node group deployment will fail. For
* more information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public void setNodeRole(String nodeRole) {
this.nodeRole = nodeRole;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker node
* kubelet
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 Amazon EKS node
* IAM role in the Amazon EKS User Guide . If you specify launchTemplate
, then don't
* specify
* IamInstanceProfile
in your launch template, or the node group deployment will fail. For more
* information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
kubelet
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 Amazon EKS node IAM
* role in the Amazon EKS User Guide . If you specify launchTemplate
, then
* don't specify
* IamInstanceProfile
in your launch template, or the node group deployment will fail. For
* more information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public String getNodeRole() {
return this.nodeRole;
}
/**
*
* The Amazon Resource Name (ARN) of the IAM role to associate with your node group. The Amazon EKS worker node
* kubelet
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 Amazon EKS node
* IAM role in the Amazon EKS User Guide . If you specify launchTemplate
, then don't
* specify
* IamInstanceProfile
in your launch template, or the node group deployment will fail. For more
* information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
kubelet
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 Amazon EKS node IAM role
* in the Amazon EKS User Guide . If you specify launchTemplate
, then don't
* specify
* IamInstanceProfile
in your launch template, or the node group deployment will fail. For
* more information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withNodeRole(String nodeRole) {
setNodeRole(nodeRole);
return this;
}
/**
* * The Kubernetes labels to be applied to the nodes in the node group when they are created. *
* * @return The Kubernetes labels to be applied to the nodes in the node group when they are created. */ public java.util.Map* The Kubernetes labels to be applied to the nodes in the node group when they are created. *
* * @param labels * The Kubernetes labels to be applied to the nodes in the node group when they are created. */ public void setLabels(java.util.Map* The Kubernetes labels to be applied to the nodes in the node group when they are created. *
* * @param labels * The Kubernetes labels to be applied to the nodes in the node group when they are created. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNodegroupRequest withLabels(java.util.Map* The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints on * managed node groups. *
* * @return The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints * on managed node groups. */ public java.util.List* The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints on * managed node groups. *
* * @param taints * The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints * on managed node groups. */ public void setTaints(java.util.Collection* The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints on * managed node groups. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setTaints(java.util.Collection)} or {@link #withTaints(java.util.Collection)} if you want to override the * existing values. *
* * @param taints * The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints * on managed node groups. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNodegroupRequest withTaints(Taint... taints) { if (this.taints == null) { setTaints(new java.util.ArrayList* The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints on * managed node groups. *
* * @param taints * The Kubernetes taints to be applied to the nodes in the node group. For more information, see Node taints * on managed node groups. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNodegroupRequest withTaints(java.util.Collection* The metadata to apply to the node group to assist with categorization and organization. Each tag consists of a * key and an optional value. You define both. Node group tags do not propagate to any other resources associated * with the node group, such as the Amazon EC2 instances or subnets. *
* * @return The metadata to apply to the node group to assist with categorization and organization. Each tag consists * of a key and an optional value. You define both. Node group tags do not propagate to any other resources * associated with the node group, such as the Amazon EC2 instances or subnets. */ public java.util.Map* The metadata to apply to the node group to assist with categorization and organization. Each tag consists of a * key and an optional value. You define both. Node group tags do not propagate to any other resources associated * with the node group, such as the Amazon EC2 instances or subnets. *
* * @param tags * The metadata to apply to the node group to assist with categorization and organization. Each tag consists * of a key and an optional value. You define both. Node group tags do not propagate to any other resources * associated with the node group, such as the Amazon EC2 instances or subnets. */ public void setTags(java.util.Map* The metadata to apply to the node group to assist with categorization and organization. Each tag consists of a * key and an optional value. You define both. Node group tags do not propagate to any other resources associated * with the node group, such as the Amazon EC2 instances or subnets. *
* * @param tags * The metadata to apply to the node group to assist with categorization and organization. Each tag consists * of a key and an optional value. You define both. Node group tags do not propagate to any other resources * associated with the node group, such as the Amazon EC2 instances or subnets. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNodegroupRequest withTags(java.util.Map* Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
* * @param clientRequestToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
* * @return Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. */ public String getClientRequestToken() { return this.clientRequestToken; } /** ** Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. *
* * @param clientRequestToken * Unique, case-sensitive identifier that you provide to ensure the idempotency of the request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNodegroupRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** *
* An object representing a node group's launch template specification. If specified, then do not specify
* instanceTypes
, diskSize
, or remoteAccess
and make sure that the launch
* template meets the requirements in launchTemplateSpecification
.
*
instanceTypes
, diskSize
, or remoteAccess
and make sure that the
* launch template meets the requirements in launchTemplateSpecification
.
*/
public void setLaunchTemplate(LaunchTemplateSpecification launchTemplate) {
this.launchTemplate = launchTemplate;
}
/**
*
* An object representing a node group's launch template specification. If specified, then do not specify
* instanceTypes
, diskSize
, or remoteAccess
and make sure that the launch
* template meets the requirements in launchTemplateSpecification
.
*
instanceTypes
, diskSize
, or remoteAccess
and make sure that the
* launch template meets the requirements in launchTemplateSpecification
.
*/
public LaunchTemplateSpecification getLaunchTemplate() {
return this.launchTemplate;
}
/**
*
* An object representing a node group's launch template specification. If specified, then do not specify
* instanceTypes
, diskSize
, or remoteAccess
and make sure that the launch
* template meets the requirements in launchTemplateSpecification
.
*
instanceTypes
, diskSize
, or remoteAccess
and make sure that the
* launch template meets the requirements in launchTemplateSpecification
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withLaunchTemplate(LaunchTemplateSpecification launchTemplate) {
setLaunchTemplate(launchTemplate);
return this;
}
/**
* * The node group update configuration. *
* * @param updateConfig * The node group update configuration. */ public void setUpdateConfig(NodegroupUpdateConfig updateConfig) { this.updateConfig = updateConfig; } /** ** The node group update configuration. *
* * @return The node group update configuration. */ public NodegroupUpdateConfig getUpdateConfig() { return this.updateConfig; } /** ** The node group update configuration. *
* * @param updateConfig * The node group update configuration. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateNodegroupRequest withUpdateConfig(NodegroupUpdateConfig updateConfig) { setUpdateConfig(updateConfig); return this; } /** ** The capacity type for your node group. *
* * @param capacityType * The capacity type for your node group. * @see CapacityTypes */ public void setCapacityType(String capacityType) { this.capacityType = capacityType; } /** ** The capacity type for your node group. *
* * @return The capacity type for your node group. * @see CapacityTypes */ public String getCapacityType() { return this.capacityType; } /** ** The capacity type for your node group. *
* * @param capacityType * The capacity type for your node group. * @return Returns a reference to this object so that method calls can be chained together. * @see CapacityTypes */ public CreateNodegroupRequest withCapacityType(String capacityType) { setCapacityType(capacityType); return this; } /** ** The capacity type for your node group. *
* * @param capacityType * The capacity type for your node group. * @return Returns a reference to this object so that method calls can be chained together. * @see CapacityTypes */ public CreateNodegroupRequest withCapacityType(CapacityTypes capacityType) { this.capacityType = capacityType.toString(); return this; } /** *
* 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 launchTemplate
, and your launch
* template uses a custom AMI, then don't specify version
, or the node group deployment will fail. For
* more information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, and your
* launch template uses a custom AMI, then don't specify version
, or the node group deployment
* will fail. For more information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public void setVersion(String version) {
this.version = version;
}
/**
*
* 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 launchTemplate
, and your launch
* template uses a custom AMI, then don't specify version
, or the node group deployment will fail. For
* more information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, and
* your launch template uses a custom AMI, then don't specify version
, or the node group
* deployment will fail. For more information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public String getVersion() {
return this.version;
}
/**
*
* 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 launchTemplate
, and your launch
* template uses a custom AMI, then don't specify version
, or the node group deployment will fail. For
* more information about using launch templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
launchTemplate
, and your
* launch template uses a custom AMI, then don't specify version
, or the node group deployment
* will fail. For more information about using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withVersion(String version) {
setVersion(version);
return this;
}
/**
* * 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 Amazon EKS optimized Amazon * Linux AMI versions in the Amazon EKS User Guide. Amazon EKS managed node groups support the November * 2022 and later releases of the Windows AMIs. For information about Windows versions, see Amazon EKS optimized * Windows AMI versions in the Amazon EKS User Guide. *
*
* If you specify launchTemplate
, and your launch template uses a custom AMI, then don't specify
* releaseVersion
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* If you specify launchTemplate
, and your launch template uses a custom AMI, then don't specify
* releaseVersion
, or the node group deployment will fail. For more information about using
* launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public void setReleaseVersion(String releaseVersion) {
this.releaseVersion = releaseVersion;
}
/**
*
* 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 Amazon EKS optimized Amazon * Linux AMI versions in the Amazon EKS User Guide. Amazon EKS managed node groups support the November * 2022 and later releases of the Windows AMIs. For information about Windows versions, see Amazon EKS optimized * Windows AMI versions in the Amazon EKS User Guide. *
*
* If you specify launchTemplate
, and your launch template uses a custom AMI, then don't specify
* releaseVersion
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* If you specify launchTemplate
, and your launch template uses a custom AMI, then don't
* specify releaseVersion
, or the node group deployment will fail. For more information about
* using launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
*/
public String getReleaseVersion() {
return this.releaseVersion;
}
/**
*
* 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 Amazon EKS optimized Amazon * Linux AMI versions in the Amazon EKS User Guide. Amazon EKS managed node groups support the November * 2022 and later releases of the Windows AMIs. For information about Windows versions, see Amazon EKS optimized * Windows AMI versions in the Amazon EKS User Guide. *
*
* If you specify launchTemplate
, and your launch template uses a custom AMI, then don't specify
* releaseVersion
, or the node group deployment will fail. For more information about using launch
* templates with Amazon EKS, see Launch template support in the
* Amazon EKS User Guide.
*
* If you specify launchTemplate
, and your launch template uses a custom AMI, then don't specify
* releaseVersion
, or the node group deployment will fail. For more information about using
* launch templates with Amazon EKS, see Launch template support
* in the Amazon EKS User Guide.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateNodegroupRequest withReleaseVersion(String releaseVersion) {
setReleaseVersion(releaseVersion);
return this;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getClusterName() != null)
sb.append("ClusterName: ").append(getClusterName()).append(",");
if (getNodegroupName() != null)
sb.append("NodegroupName: ").append(getNodegroupName()).append(",");
if (getScalingConfig() != null)
sb.append("ScalingConfig: ").append(getScalingConfig()).append(",");
if (getDiskSize() != null)
sb.append("DiskSize: ").append(getDiskSize()).append(",");
if (getSubnets() != null)
sb.append("Subnets: ").append(getSubnets()).append(",");
if (getInstanceTypes() != null)
sb.append("InstanceTypes: ").append(getInstanceTypes()).append(",");
if (getAmiType() != null)
sb.append("AmiType: ").append(getAmiType()).append(",");
if (getRemoteAccess() != null)
sb.append("RemoteAccess: ").append(getRemoteAccess()).append(",");
if (getNodeRole() != null)
sb.append("NodeRole: ").append(getNodeRole()).append(",");
if (getLabels() != null)
sb.append("Labels: ").append(getLabels()).append(",");
if (getTaints() != null)
sb.append("Taints: ").append(getTaints()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getClientRequestToken() != null)
sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(",");
if (getLaunchTemplate() != null)
sb.append("LaunchTemplate: ").append(getLaunchTemplate()).append(",");
if (getUpdateConfig() != null)
sb.append("UpdateConfig: ").append(getUpdateConfig()).append(",");
if (getCapacityType() != null)
sb.append("CapacityType: ").append(getCapacityType()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion()).append(",");
if (getReleaseVersion() != null)
sb.append("ReleaseVersion: ").append(getReleaseVersion());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateNodegroupRequest == false)
return false;
CreateNodegroupRequest other = (CreateNodegroupRequest) obj;
if (other.getClusterName() == null ^ this.getClusterName() == null)
return false;
if (other.getClusterName() != null && other.getClusterName().equals(this.getClusterName()) == false)
return false;
if (other.getNodegroupName() == null ^ this.getNodegroupName() == null)
return false;
if (other.getNodegroupName() != null && other.getNodegroupName().equals(this.getNodegroupName()) == false)
return false;
if (other.getScalingConfig() == null ^ this.getScalingConfig() == null)
return false;
if (other.getScalingConfig() != null && other.getScalingConfig().equals(this.getScalingConfig()) == false)
return false;
if (other.getDiskSize() == null ^ this.getDiskSize() == null)
return false;
if (other.getDiskSize() != null && other.getDiskSize().equals(this.getDiskSize()) == false)
return false;
if (other.getSubnets() == null ^ this.getSubnets() == null)
return false;
if (other.getSubnets() != null && other.getSubnets().equals(this.getSubnets()) == false)
return false;
if (other.getInstanceTypes() == null ^ this.getInstanceTypes() == null)
return false;
if (other.getInstanceTypes() != null && other.getInstanceTypes().equals(this.getInstanceTypes()) == false)
return false;
if (other.getAmiType() == null ^ this.getAmiType() == null)
return false;
if (other.getAmiType() != null && other.getAmiType().equals(this.getAmiType()) == false)
return false;
if (other.getRemoteAccess() == null ^ this.getRemoteAccess() == null)
return false;
if (other.getRemoteAccess() != null && other.getRemoteAccess().equals(this.getRemoteAccess()) == false)
return false;
if (other.getNodeRole() == null ^ this.getNodeRole() == null)
return false;
if (other.getNodeRole() != null && other.getNodeRole().equals(this.getNodeRole()) == false)
return false;
if (other.getLabels() == null ^ this.getLabels() == null)
return false;
if (other.getLabels() != null && other.getLabels().equals(this.getLabels()) == false)
return false;
if (other.getTaints() == null ^ this.getTaints() == null)
return false;
if (other.getTaints() != null && other.getTaints().equals(this.getTaints()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null)
return false;
if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false)
return false;
if (other.getLaunchTemplate() == null ^ this.getLaunchTemplate() == null)
return false;
if (other.getLaunchTemplate() != null && other.getLaunchTemplate().equals(this.getLaunchTemplate()) == false)
return false;
if (other.getUpdateConfig() == null ^ this.getUpdateConfig() == null)
return false;
if (other.getUpdateConfig() != null && other.getUpdateConfig().equals(this.getUpdateConfig()) == false)
return false;
if (other.getCapacityType() == null ^ this.getCapacityType() == null)
return false;
if (other.getCapacityType() != null && other.getCapacityType().equals(this.getCapacityType()) == false)
return false;
if (other.getVersion() == null ^ this.getVersion() == null)
return false;
if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false)
return false;
if (other.getReleaseVersion() == null ^ this.getReleaseVersion() == null)
return false;
if (other.getReleaseVersion() != null && other.getReleaseVersion().equals(this.getReleaseVersion()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getClusterName() == null) ? 0 : getClusterName().hashCode());
hashCode = prime * hashCode + ((getNodegroupName() == null) ? 0 : getNodegroupName().hashCode());
hashCode = prime * hashCode + ((getScalingConfig() == null) ? 0 : getScalingConfig().hashCode());
hashCode = prime * hashCode + ((getDiskSize() == null) ? 0 : getDiskSize().hashCode());
hashCode = prime * hashCode + ((getSubnets() == null) ? 0 : getSubnets().hashCode());
hashCode = prime * hashCode + ((getInstanceTypes() == null) ? 0 : getInstanceTypes().hashCode());
hashCode = prime * hashCode + ((getAmiType() == null) ? 0 : getAmiType().hashCode());
hashCode = prime * hashCode + ((getRemoteAccess() == null) ? 0 : getRemoteAccess().hashCode());
hashCode = prime * hashCode + ((getNodeRole() == null) ? 0 : getNodeRole().hashCode());
hashCode = prime * hashCode + ((getLabels() == null) ? 0 : getLabels().hashCode());
hashCode = prime * hashCode + ((getTaints() == null) ? 0 : getTaints().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode());
hashCode = prime * hashCode + ((getLaunchTemplate() == null) ? 0 : getLaunchTemplate().hashCode());
hashCode = prime * hashCode + ((getUpdateConfig() == null) ? 0 : getUpdateConfig().hashCode());
hashCode = prime * hashCode + ((getCapacityType() == null) ? 0 : getCapacityType().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getReleaseVersion() == null) ? 0 : getReleaseVersion().hashCode());
return hashCode;
}
@Override
public CreateNodegroupRequest clone() {
return (CreateNodegroupRequest) super.clone();
}
}