
com.amazonaws.services.eks.model.Nodegroup Maven / Gradle / Ivy
/*
* Copyright 2019-2024 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.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* An object representing an Amazon EKS managed node group.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class Nodegroup implements Serializable, Cloneable, StructuredPojo {
/**
*
* The name associated with an Amazon EKS managed node group.
*
*/
private String nodegroupName;
/**
*
* The Amazon Resource Name (ARN) associated with the managed node group.
*
*/
private String nodegroupArn;
/**
*
* The name of your cluster.
*
*/
private String clusterName;
/**
*
* The Kubernetes version of the managed node group.
*
*/
private String version;
/**
*
* If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was
* specified in the launch template. For node groups that weren't deployed using a launch template, this is the
* version of the Amazon EKS optimized AMI that the node group was deployed with.
*
*/
private String releaseVersion;
/**
*
* The Unix epoch timestamp at object creation.
*
*/
private java.util.Date createdAt;
/**
*
* The Unix epoch timestamp for the last modification to the object.
*
*/
private java.util.Date modifiedAt;
/**
*
* The current status of the managed node group.
*
*/
private String status;
/**
*
* The capacity type of your managed node group.
*
*/
private String capacityType;
/**
*
* The scaling configuration details for the Auto Scaling group that is associated with your node group.
*
*/
private NodegroupScalingConfig scalingConfig;
/**
*
* If the node group wasn't deployed with a launch template, then this is the instance type that is associated with
* the node group. If the node group was deployed with a launch template, then this is null
.
*
*/
private java.util.List instanceTypes;
/**
*
* The subnets that were specified for the Auto Scaling group that is associated with your node group.
*
*/
private java.util.List subnets;
/**
*
* If the node group wasn't deployed with a launch template, then this is the remote access configuration that is
* associated with the node group. If the node group was deployed with a launch template, then this is
* null
.
*
*/
private RemoteAccessConfig remoteAccess;
/**
*
* If the node group was deployed using a launch template with a custom AMI, then this is CUSTOM
. For
* node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node
* group configuration.
*
*/
private String amiType;
/**
*
* The IAM role associated with your node group. The Amazon EKS 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.
*
*/
private String nodeRole;
/**
*
* The Kubernetes labels
applied to the nodes in the node group.
*
*
*
* Only labels
that are applied with the Amazon EKS API are shown here. There may be other Kubernetes
* labels
applied to the nodes in this group.
*
*
*/
private java.util.Map labels;
/**
*
* The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of
* No_Schedule
, Prefer_No_Schedule
, or No_Execute
. Kubernetes taints can be
* used together with tolerations to control how workloads are scheduled to your nodes. For more information, see Node taints on
* managed node groups.
*
*/
private java.util.List taints;
/**
*
* The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.
*
*/
private NodegroupResources resources;
/**
*
* If the node group wasn't deployed with a launch template, then this is the disk size in the node group
* configuration. If the node group was deployed with a launch template, then this is null
.
*
*/
private Integer diskSize;
/**
*
* The health status of the node group. If there are issues with your node group's health, they are listed here.
*
*/
private NodegroupHealth health;
/**
*
* The node group update configuration.
*
*/
private NodegroupUpdateConfig updateConfig;
/**
*
* If a launch template was used to create the node group, then this is the launch template that was used.
*
*/
private LaunchTemplateSpecification launchTemplate;
/**
*
* 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.
*
*/
private java.util.Map tags;
/**
*
* The name associated with an Amazon EKS managed node group.
*
*
* @param nodegroupName
* The name associated with an Amazon EKS managed node group.
*/
public void setNodegroupName(String nodegroupName) {
this.nodegroupName = nodegroupName;
}
/**
*
* The name associated with an Amazon EKS managed node group.
*
*
* @return The name associated with an Amazon EKS managed node group.
*/
public String getNodegroupName() {
return this.nodegroupName;
}
/**
*
* The name associated with an Amazon EKS managed node group.
*
*
* @param nodegroupName
* The name associated with an Amazon EKS managed node group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withNodegroupName(String nodegroupName) {
setNodegroupName(nodegroupName);
return this;
}
/**
*
* The Amazon Resource Name (ARN) associated with the managed node group.
*
*
* @param nodegroupArn
* The Amazon Resource Name (ARN) associated with the managed node group.
*/
public void setNodegroupArn(String nodegroupArn) {
this.nodegroupArn = nodegroupArn;
}
/**
*
* The Amazon Resource Name (ARN) associated with the managed node group.
*
*
* @return The Amazon Resource Name (ARN) associated with the managed node group.
*/
public String getNodegroupArn() {
return this.nodegroupArn;
}
/**
*
* The Amazon Resource Name (ARN) associated with the managed node group.
*
*
* @param nodegroupArn
* The Amazon Resource Name (ARN) associated with the managed node group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withNodegroupArn(String nodegroupArn) {
setNodegroupArn(nodegroupArn);
return this;
}
/**
*
* The name of your cluster.
*
*
* @param clusterName
* The name of your cluster.
*/
public void setClusterName(String clusterName) {
this.clusterName = clusterName;
}
/**
*
* The name of your cluster.
*
*
* @return The name of your cluster.
*/
public String getClusterName() {
return this.clusterName;
}
/**
*
* The name of your cluster.
*
*
* @param clusterName
* The name of your cluster.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withClusterName(String clusterName) {
setClusterName(clusterName);
return this;
}
/**
*
* The Kubernetes version of the managed node group.
*
*
* @param version
* The Kubernetes version of the managed node group.
*/
public void setVersion(String version) {
this.version = version;
}
/**
*
* The Kubernetes version of the managed node group.
*
*
* @return The Kubernetes version of the managed node group.
*/
public String getVersion() {
return this.version;
}
/**
*
* The Kubernetes version of the managed node group.
*
*
* @param version
* The Kubernetes version of the managed node group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withVersion(String version) {
setVersion(version);
return this;
}
/**
*
* If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was
* specified in the launch template. For node groups that weren't deployed using a launch template, this is the
* version of the Amazon EKS optimized AMI that the node group was deployed with.
*
*
* @param releaseVersion
* If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was
* specified in the launch template. For node groups that weren't deployed using a launch template, this is
* the version of the Amazon EKS optimized AMI that the node group was deployed with.
*/
public void setReleaseVersion(String releaseVersion) {
this.releaseVersion = releaseVersion;
}
/**
*
* If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was
* specified in the launch template. For node groups that weren't deployed using a launch template, this is the
* version of the Amazon EKS optimized AMI that the node group was deployed with.
*
*
* @return If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that
* was specified in the launch template. For node groups that weren't deployed using a launch template, this
* is the version of the Amazon EKS optimized AMI that the node group was deployed with.
*/
public String getReleaseVersion() {
return this.releaseVersion;
}
/**
*
* If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was
* specified in the launch template. For node groups that weren't deployed using a launch template, this is the
* version of the Amazon EKS optimized AMI that the node group was deployed with.
*
*
* @param releaseVersion
* If the node group was deployed using a launch template with a custom AMI, then this is the AMI ID that was
* specified in the launch template. For node groups that weren't deployed using a launch template, this is
* the version of the Amazon EKS optimized AMI that the node group was deployed with.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withReleaseVersion(String releaseVersion) {
setReleaseVersion(releaseVersion);
return this;
}
/**
*
* The Unix epoch timestamp at object creation.
*
*
* @param createdAt
* The Unix epoch timestamp at object creation.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The Unix epoch timestamp at object creation.
*
*
* @return The Unix epoch timestamp at object creation.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The Unix epoch timestamp at object creation.
*
*
* @param createdAt
* The Unix epoch timestamp at object creation.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The Unix epoch timestamp for the last modification to the object.
*
*
* @param modifiedAt
* The Unix epoch timestamp for the last modification to the object.
*/
public void setModifiedAt(java.util.Date modifiedAt) {
this.modifiedAt = modifiedAt;
}
/**
*
* The Unix epoch timestamp for the last modification to the object.
*
*
* @return The Unix epoch timestamp for the last modification to the object.
*/
public java.util.Date getModifiedAt() {
return this.modifiedAt;
}
/**
*
* The Unix epoch timestamp for the last modification to the object.
*
*
* @param modifiedAt
* The Unix epoch timestamp for the last modification to the object.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withModifiedAt(java.util.Date modifiedAt) {
setModifiedAt(modifiedAt);
return this;
}
/**
*
* The current status of the managed node group.
*
*
* @param status
* The current status of the managed node group.
* @see NodegroupStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The current status of the managed node group.
*
*
* @return The current status of the managed node group.
* @see NodegroupStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The current status of the managed node group.
*
*
* @param status
* The current status of the managed node group.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NodegroupStatus
*/
public Nodegroup withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The current status of the managed node group.
*
*
* @param status
* The current status of the managed node group.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NodegroupStatus
*/
public Nodegroup withStatus(NodegroupStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The capacity type of your managed node group.
*
*
* @param capacityType
* The capacity type of your managed node group.
* @see CapacityTypes
*/
public void setCapacityType(String capacityType) {
this.capacityType = capacityType;
}
/**
*
* The capacity type of your managed node group.
*
*
* @return The capacity type of your managed node group.
* @see CapacityTypes
*/
public String getCapacityType() {
return this.capacityType;
}
/**
*
* The capacity type of your managed node group.
*
*
* @param capacityType
* The capacity type of your managed node group.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CapacityTypes
*/
public Nodegroup withCapacityType(String capacityType) {
setCapacityType(capacityType);
return this;
}
/**
*
* The capacity type of your managed node group.
*
*
* @param capacityType
* The capacity type of your managed node group.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CapacityTypes
*/
public Nodegroup withCapacityType(CapacityTypes capacityType) {
this.capacityType = capacityType.toString();
return this;
}
/**
*
* The scaling configuration details for the Auto Scaling group that is associated with your node group.
*
*
* @param scalingConfig
* The scaling configuration details for the Auto Scaling group that is associated with your node group.
*/
public void setScalingConfig(NodegroupScalingConfig scalingConfig) {
this.scalingConfig = scalingConfig;
}
/**
*
* The scaling configuration details for the Auto Scaling group that is associated with your node group.
*
*
* @return The scaling configuration details for the Auto Scaling group that is associated with your node group.
*/
public NodegroupScalingConfig getScalingConfig() {
return this.scalingConfig;
}
/**
*
* The scaling configuration details for the Auto Scaling group that is associated with your node group.
*
*
* @param scalingConfig
* The scaling configuration details for the Auto Scaling group that is associated with your node group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withScalingConfig(NodegroupScalingConfig scalingConfig) {
setScalingConfig(scalingConfig);
return this;
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the instance type that is associated with
* the node group. If the node group was deployed with a launch template, then this is null
.
*
*
* @return If the node group wasn't deployed with a launch template, then this is the instance type that is
* associated with the node group. If the node group was deployed with a launch template, then this is
* null
.
*/
public java.util.List getInstanceTypes() {
return instanceTypes;
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the instance type that is associated with
* the node group. If the node group was deployed with a launch template, then this is null
.
*
*
* @param instanceTypes
* If the node group wasn't deployed with a launch template, then this is the instance type that is
* associated with the node group. If the node group was deployed with a launch template, then this is
* null
.
*/
public void setInstanceTypes(java.util.Collection instanceTypes) {
if (instanceTypes == null) {
this.instanceTypes = null;
return;
}
this.instanceTypes = new java.util.ArrayList(instanceTypes);
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the instance type that is associated with
* the node group. If the node group was deployed with a launch template, then this is null
.
*
*
* 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
* If the node group wasn't deployed with a launch template, then this is the instance type that is
* associated with the node group. If the node group was deployed with a launch template, then this is
* null
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withInstanceTypes(String... instanceTypes) {
if (this.instanceTypes == null) {
setInstanceTypes(new java.util.ArrayList(instanceTypes.length));
}
for (String ele : instanceTypes) {
this.instanceTypes.add(ele);
}
return this;
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the instance type that is associated with
* the node group. If the node group was deployed with a launch template, then this is null
.
*
*
* @param instanceTypes
* If the node group wasn't deployed with a launch template, then this is the instance type that is
* associated with the node group. If the node group was deployed with a launch template, then this is
* null
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withInstanceTypes(java.util.Collection instanceTypes) {
setInstanceTypes(instanceTypes);
return this;
}
/**
*
* The subnets that were specified for the Auto Scaling group that is associated with your node group.
*
*
* @return The subnets that were specified for the Auto Scaling group that is associated with your node group.
*/
public java.util.List getSubnets() {
return subnets;
}
/**
*
* The subnets that were specified for the Auto Scaling group that is associated with your node group.
*
*
* @param subnets
* The subnets that were specified for the Auto Scaling group that is associated with your node group.
*/
public void setSubnets(java.util.Collection subnets) {
if (subnets == null) {
this.subnets = null;
return;
}
this.subnets = new java.util.ArrayList(subnets);
}
/**
*
* The subnets that were specified for the Auto Scaling group that is associated with your node group.
*
*
* 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 that were specified for the Auto Scaling group that is associated with your node group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withSubnets(String... subnets) {
if (this.subnets == null) {
setSubnets(new java.util.ArrayList(subnets.length));
}
for (String ele : subnets) {
this.subnets.add(ele);
}
return this;
}
/**
*
* The subnets that were specified for the Auto Scaling group that is associated with your node group.
*
*
* @param subnets
* The subnets that were specified for the Auto Scaling group that is associated with your node group.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withSubnets(java.util.Collection subnets) {
setSubnets(subnets);
return this;
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the remote access configuration that is
* associated with the node group. If the node group was deployed with a launch template, then this is
* null
.
*
*
* @param remoteAccess
* If the node group wasn't deployed with a launch template, then this is the remote access configuration
* that is associated with the node group. If the node group was deployed with a launch template, then this
* is null
.
*/
public void setRemoteAccess(RemoteAccessConfig remoteAccess) {
this.remoteAccess = remoteAccess;
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the remote access configuration that is
* associated with the node group. If the node group was deployed with a launch template, then this is
* null
.
*
*
* @return If the node group wasn't deployed with a launch template, then this is the remote access configuration
* that is associated with the node group. If the node group was deployed with a launch template, then this
* is null
.
*/
public RemoteAccessConfig getRemoteAccess() {
return this.remoteAccess;
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the remote access configuration that is
* associated with the node group. If the node group was deployed with a launch template, then this is
* null
.
*
*
* @param remoteAccess
* If the node group wasn't deployed with a launch template, then this is the remote access configuration
* that is associated with the node group. If the node group was deployed with a launch template, then this
* is null
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withRemoteAccess(RemoteAccessConfig remoteAccess) {
setRemoteAccess(remoteAccess);
return this;
}
/**
*
* If the node group was deployed using a launch template with a custom AMI, then this is CUSTOM
. For
* node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node
* group configuration.
*
*
* @param amiType
* If the node group was deployed using a launch template with a custom AMI, then this is CUSTOM
* . For node groups that weren't deployed using a launch template, this is the AMI type that was specified
* in the node group configuration.
* @see AMITypes
*/
public void setAmiType(String amiType) {
this.amiType = amiType;
}
/**
*
* If the node group was deployed using a launch template with a custom AMI, then this is CUSTOM
. For
* node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node
* group configuration.
*
*
* @return If the node group was deployed using a launch template with a custom AMI, then this is
* CUSTOM
. For node groups that weren't deployed using a launch template, this is the AMI type
* that was specified in the node group configuration.
* @see AMITypes
*/
public String getAmiType() {
return this.amiType;
}
/**
*
* If the node group was deployed using a launch template with a custom AMI, then this is CUSTOM
. For
* node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node
* group configuration.
*
*
* @param amiType
* If the node group was deployed using a launch template with a custom AMI, then this is CUSTOM
* . For node groups that weren't deployed using a launch template, this is the AMI type that was specified
* in the node group configuration.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AMITypes
*/
public Nodegroup withAmiType(String amiType) {
setAmiType(amiType);
return this;
}
/**
*
* If the node group was deployed using a launch template with a custom AMI, then this is CUSTOM
. For
* node groups that weren't deployed using a launch template, this is the AMI type that was specified in the node
* group configuration.
*
*
* @param amiType
* If the node group was deployed using a launch template with a custom AMI, then this is CUSTOM
* . For node groups that weren't deployed using a launch template, this is the AMI type that was specified
* in the node group configuration.
* @return Returns a reference to this object so that method calls can be chained together.
* @see AMITypes
*/
public Nodegroup withAmiType(AMITypes amiType) {
this.amiType = amiType.toString();
return this;
}
/**
*
* The IAM role associated with your node group. The Amazon EKS 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.
*
*
* @param nodeRole
* The IAM role associated with your node group. The Amazon EKS 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.
*/
public void setNodeRole(String nodeRole) {
this.nodeRole = nodeRole;
}
/**
*
* The IAM role associated with your node group. The Amazon EKS 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.
*
*
* @return The IAM role associated with your node group. The Amazon EKS 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.
*/
public String getNodeRole() {
return this.nodeRole;
}
/**
*
* The IAM role associated with your node group. The Amazon EKS 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.
*
*
* @param nodeRole
* The IAM role associated with your node group. The Amazon EKS 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withNodeRole(String nodeRole) {
setNodeRole(nodeRole);
return this;
}
/**
*
* The Kubernetes labels
applied to the nodes in the node group.
*
*
*
* Only labels
that are applied with the Amazon EKS API are shown here. There may be other Kubernetes
* labels
applied to the nodes in this group.
*
*
*
* @return The Kubernetes labels
applied to the nodes in the node group.
*
* Only labels
that are applied with the Amazon EKS API are shown here. There may be other
* Kubernetes labels
applied to the nodes in this group.
*
*/
public java.util.Map getLabels() {
return labels;
}
/**
*
* The Kubernetes labels
applied to the nodes in the node group.
*
*
*
* Only labels
that are applied with the Amazon EKS API are shown here. There may be other Kubernetes
* labels
applied to the nodes in this group.
*
*
*
* @param labels
* The Kubernetes labels
applied to the nodes in the node group.
*
* Only labels
that are applied with the Amazon EKS API are shown here. There may be other
* Kubernetes labels
applied to the nodes in this group.
*
*/
public void setLabels(java.util.Map labels) {
this.labels = labels;
}
/**
*
* The Kubernetes labels
applied to the nodes in the node group.
*
*
*
* Only labels
that are applied with the Amazon EKS API are shown here. There may be other Kubernetes
* labels
applied to the nodes in this group.
*
*
*
* @param labels
* The Kubernetes labels
applied to the nodes in the node group.
*
* Only labels
that are applied with the Amazon EKS API are shown here. There may be other
* Kubernetes labels
applied to the nodes in this group.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withLabels(java.util.Map labels) {
setLabels(labels);
return this;
}
/**
* Add a single Labels entry
*
* @see Nodegroup#withLabels
* @returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup addLabelsEntry(String key, String value) {
if (null == this.labels) {
this.labels = new java.util.HashMap();
}
if (this.labels.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.labels.put(key, value);
return this;
}
/**
* Removes all the entries added into Labels.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup clearLabelsEntries() {
this.labels = null;
return this;
}
/**
*
* The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of
* No_Schedule
, Prefer_No_Schedule
, or No_Execute
. Kubernetes taints can be
* used together with tolerations to control how workloads are scheduled to your nodes. For more information, see Node taints on
* managed node groups.
*
*
* @return The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one
* of No_Schedule
, Prefer_No_Schedule
, or No_Execute
. Kubernetes
* taints can be used together with tolerations to control how workloads are scheduled to your nodes. For
* more information, see Node taints
* on managed node groups.
*/
public java.util.List getTaints() {
return taints;
}
/**
*
* The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of
* No_Schedule
, Prefer_No_Schedule
, or No_Execute
. Kubernetes taints can be
* used together with tolerations to control how workloads are scheduled to your nodes. 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 when they are created. Effect is one of
* No_Schedule
, Prefer_No_Schedule
, or No_Execute
. Kubernetes taints
* can be used together with tolerations to control how workloads are scheduled to your nodes. For more
* information, see Node taints
* on managed node groups.
*/
public void setTaints(java.util.Collection taints) {
if (taints == null) {
this.taints = null;
return;
}
this.taints = new java.util.ArrayList(taints);
}
/**
*
* The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of
* No_Schedule
, Prefer_No_Schedule
, or No_Execute
. Kubernetes taints can be
* used together with tolerations to control how workloads are scheduled to your nodes. 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 when they are created. Effect is one of
* No_Schedule
, Prefer_No_Schedule
, or No_Execute
. Kubernetes taints
* can be used together with tolerations to control how workloads are scheduled to your nodes. 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 Nodegroup withTaints(Taint... taints) {
if (this.taints == null) {
setTaints(new java.util.ArrayList(taints.length));
}
for (Taint ele : taints) {
this.taints.add(ele);
}
return this;
}
/**
*
* The Kubernetes taints to be applied to the nodes in the node group when they are created. Effect is one of
* No_Schedule
, Prefer_No_Schedule
, or No_Execute
. Kubernetes taints can be
* used together with tolerations to control how workloads are scheduled to your nodes. 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 when they are created. Effect is one of
* No_Schedule
, Prefer_No_Schedule
, or No_Execute
. Kubernetes taints
* can be used together with tolerations to control how workloads are scheduled to your nodes. 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 Nodegroup withTaints(java.util.Collection taints) {
setTaints(taints);
return this;
}
/**
*
* The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.
*
*
* @param resources
* The resources associated with the node group, such as Auto Scaling groups and security groups for remote
* access.
*/
public void setResources(NodegroupResources resources) {
this.resources = resources;
}
/**
*
* The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.
*
*
* @return The resources associated with the node group, such as Auto Scaling groups and security groups for remote
* access.
*/
public NodegroupResources getResources() {
return this.resources;
}
/**
*
* The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.
*
*
* @param resources
* The resources associated with the node group, such as Auto Scaling groups and security groups for remote
* access.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withResources(NodegroupResources resources) {
setResources(resources);
return this;
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the disk size in the node group
* configuration. If the node group was deployed with a launch template, then this is null
.
*
*
* @param diskSize
* If the node group wasn't deployed with a launch template, then this is the disk size in the node group
* configuration. If the node group was deployed with a launch template, then this is null
.
*/
public void setDiskSize(Integer diskSize) {
this.diskSize = diskSize;
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the disk size in the node group
* configuration. If the node group was deployed with a launch template, then this is null
.
*
*
* @return If the node group wasn't deployed with a launch template, then this is the disk size in the node group
* configuration. If the node group was deployed with a launch template, then this is null
.
*/
public Integer getDiskSize() {
return this.diskSize;
}
/**
*
* If the node group wasn't deployed with a launch template, then this is the disk size in the node group
* configuration. If the node group was deployed with a launch template, then this is null
.
*
*
* @param diskSize
* If the node group wasn't deployed with a launch template, then this is the disk size in the node group
* configuration. If the node group was deployed with a launch template, then this is null
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withDiskSize(Integer diskSize) {
setDiskSize(diskSize);
return this;
}
/**
*
* The health status of the node group. If there are issues with your node group's health, they are listed here.
*
*
* @param health
* The health status of the node group. If there are issues with your node group's health, they are listed
* here.
*/
public void setHealth(NodegroupHealth health) {
this.health = health;
}
/**
*
* The health status of the node group. If there are issues with your node group's health, they are listed here.
*
*
* @return The health status of the node group. If there are issues with your node group's health, they are listed
* here.
*/
public NodegroupHealth getHealth() {
return this.health;
}
/**
*
* The health status of the node group. If there are issues with your node group's health, they are listed here.
*
*
* @param health
* The health status of the node group. If there are issues with your node group's health, they are listed
* here.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withHealth(NodegroupHealth health) {
setHealth(health);
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 Nodegroup withUpdateConfig(NodegroupUpdateConfig updateConfig) {
setUpdateConfig(updateConfig);
return this;
}
/**
*
* If a launch template was used to create the node group, then this is the launch template that was used.
*
*
* @param launchTemplate
* If a launch template was used to create the node group, then this is the launch template that was used.
*/
public void setLaunchTemplate(LaunchTemplateSpecification launchTemplate) {
this.launchTemplate = launchTemplate;
}
/**
*
* If a launch template was used to create the node group, then this is the launch template that was used.
*
*
* @return If a launch template was used to create the node group, then this is the launch template that was used.
*/
public LaunchTemplateSpecification getLaunchTemplate() {
return this.launchTemplate;
}
/**
*
* If a launch template was used to create the node group, then this is the launch template that was used.
*
*
* @param launchTemplate
* If a launch template was used to create the node group, then this is the launch template that was used.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withLaunchTemplate(LaunchTemplateSpecification launchTemplate) {
setLaunchTemplate(launchTemplate);
return this;
}
/**
*
* 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.
*
*
* @return 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.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* 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.
*
*
* @param tags
* 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.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* 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.
*
*
* @param tags
* 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.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see Nodegroup#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public Nodegroup clearTagsEntries() {
this.tags = null;
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 (getNodegroupName() != null)
sb.append("NodegroupName: ").append(getNodegroupName()).append(",");
if (getNodegroupArn() != null)
sb.append("NodegroupArn: ").append(getNodegroupArn()).append(",");
if (getClusterName() != null)
sb.append("ClusterName: ").append(getClusterName()).append(",");
if (getVersion() != null)
sb.append("Version: ").append(getVersion()).append(",");
if (getReleaseVersion() != null)
sb.append("ReleaseVersion: ").append(getReleaseVersion()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getModifiedAt() != null)
sb.append("ModifiedAt: ").append(getModifiedAt()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getCapacityType() != null)
sb.append("CapacityType: ").append(getCapacityType()).append(",");
if (getScalingConfig() != null)
sb.append("ScalingConfig: ").append(getScalingConfig()).append(",");
if (getInstanceTypes() != null)
sb.append("InstanceTypes: ").append(getInstanceTypes()).append(",");
if (getSubnets() != null)
sb.append("Subnets: ").append(getSubnets()).append(",");
if (getRemoteAccess() != null)
sb.append("RemoteAccess: ").append(getRemoteAccess()).append(",");
if (getAmiType() != null)
sb.append("AmiType: ").append(getAmiType()).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 (getResources() != null)
sb.append("Resources: ").append(getResources()).append(",");
if (getDiskSize() != null)
sb.append("DiskSize: ").append(getDiskSize()).append(",");
if (getHealth() != null)
sb.append("Health: ").append(getHealth()).append(",");
if (getUpdateConfig() != null)
sb.append("UpdateConfig: ").append(getUpdateConfig()).append(",");
if (getLaunchTemplate() != null)
sb.append("LaunchTemplate: ").append(getLaunchTemplate()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof Nodegroup == false)
return false;
Nodegroup other = (Nodegroup) obj;
if (other.getNodegroupName() == null ^ this.getNodegroupName() == null)
return false;
if (other.getNodegroupName() != null && other.getNodegroupName().equals(this.getNodegroupName()) == false)
return false;
if (other.getNodegroupArn() == null ^ this.getNodegroupArn() == null)
return false;
if (other.getNodegroupArn() != null && other.getNodegroupArn().equals(this.getNodegroupArn()) == false)
return false;
if (other.getClusterName() == null ^ this.getClusterName() == null)
return false;
if (other.getClusterName() != null && other.getClusterName().equals(this.getClusterName()) == 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;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getModifiedAt() == null ^ this.getModifiedAt() == null)
return false;
if (other.getModifiedAt() != null && other.getModifiedAt().equals(this.getModifiedAt()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == 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.getScalingConfig() == null ^ this.getScalingConfig() == null)
return false;
if (other.getScalingConfig() != null && other.getScalingConfig().equals(this.getScalingConfig()) == 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.getSubnets() == null ^ this.getSubnets() == null)
return false;
if (other.getSubnets() != null && other.getSubnets().equals(this.getSubnets()) == 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.getAmiType() == null ^ this.getAmiType() == null)
return false;
if (other.getAmiType() != null && other.getAmiType().equals(this.getAmiType()) == 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.getResources() == null ^ this.getResources() == null)
return false;
if (other.getResources() != null && other.getResources().equals(this.getResources()) == 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.getHealth() == null ^ this.getHealth() == null)
return false;
if (other.getHealth() != null && other.getHealth().equals(this.getHealth()) == 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.getLaunchTemplate() == null ^ this.getLaunchTemplate() == null)
return false;
if (other.getLaunchTemplate() != null && other.getLaunchTemplate().equals(this.getLaunchTemplate()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getNodegroupName() == null) ? 0 : getNodegroupName().hashCode());
hashCode = prime * hashCode + ((getNodegroupArn() == null) ? 0 : getNodegroupArn().hashCode());
hashCode = prime * hashCode + ((getClusterName() == null) ? 0 : getClusterName().hashCode());
hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode());
hashCode = prime * hashCode + ((getReleaseVersion() == null) ? 0 : getReleaseVersion().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getModifiedAt() == null) ? 0 : getModifiedAt().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getCapacityType() == null) ? 0 : getCapacityType().hashCode());
hashCode = prime * hashCode + ((getScalingConfig() == null) ? 0 : getScalingConfig().hashCode());
hashCode = prime * hashCode + ((getInstanceTypes() == null) ? 0 : getInstanceTypes().hashCode());
hashCode = prime * hashCode + ((getSubnets() == null) ? 0 : getSubnets().hashCode());
hashCode = prime * hashCode + ((getRemoteAccess() == null) ? 0 : getRemoteAccess().hashCode());
hashCode = prime * hashCode + ((getAmiType() == null) ? 0 : getAmiType().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 + ((getResources() == null) ? 0 : getResources().hashCode());
hashCode = prime * hashCode + ((getDiskSize() == null) ? 0 : getDiskSize().hashCode());
hashCode = prime * hashCode + ((getHealth() == null) ? 0 : getHealth().hashCode());
hashCode = prime * hashCode + ((getUpdateConfig() == null) ? 0 : getUpdateConfig().hashCode());
hashCode = prime * hashCode + ((getLaunchTemplate() == null) ? 0 : getLaunchTemplate().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public Nodegroup clone() {
try {
return (Nodegroup) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.eks.model.transform.NodegroupMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}