Class Nodegroup

java.lang.Object
software.amazon.awssdk.services.eks.model.Nodegroup
All Implemented Interfaces:
Serializable, SdkPojo, ToCopyableBuilder<Nodegroup.Builder,Nodegroup>

@Generated("software.amazon.awssdk:codegen") public final class Nodegroup extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Nodegroup.Builder,Nodegroup>

An object representing an Amazon EKS managed node group.

See Also:
  • Method Details

    • nodegroupName

      public final String nodegroupName()

      The name associated with an Amazon EKS managed node group.

      Returns:
      The name associated with an Amazon EKS managed node group.
    • nodegroupArn

      public final String nodegroupArn()

      The Amazon Resource Name (ARN) associated with the managed node group.

      Returns:
      The Amazon Resource Name (ARN) associated with the managed node group.
    • clusterName

      public final String clusterName()

      The name of your cluster.

      Returns:
      The name of your cluster.
    • version

      public final String version()

      The Kubernetes version of the managed node group.

      Returns:
      The Kubernetes version of the managed node group.
    • releaseVersion

      public final String 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.

      Returns:
      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.
    • createdAt

      public final Instant createdAt()

      The Unix epoch timestamp at object creation.

      Returns:
      The Unix epoch timestamp at object creation.
    • modifiedAt

      public final Instant modifiedAt()

      The Unix epoch timestamp for the last modification to the object.

      Returns:
      The Unix epoch timestamp for the last modification to the object.
    • status

      public final NodegroupStatus status()

      The current status of the managed node group.

      If the service returns an enum value that is not available in the current SDK version, status will return NodegroupStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The current status of the managed node group.
      See Also:
    • statusAsString

      public final String statusAsString()

      The current status of the managed node group.

      If the service returns an enum value that is not available in the current SDK version, status will return NodegroupStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from statusAsString().

      Returns:
      The current status of the managed node group.
      See Also:
    • capacityType

      public final CapacityTypes capacityType()

      The capacity type of your managed node group.

      If the service returns an enum value that is not available in the current SDK version, capacityType will return CapacityTypes.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from capacityTypeAsString().

      Returns:
      The capacity type of your managed node group.
      See Also:
    • capacityTypeAsString

      public final String capacityTypeAsString()

      The capacity type of your managed node group.

      If the service returns an enum value that is not available in the current SDK version, capacityType will return CapacityTypes.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from capacityTypeAsString().

      Returns:
      The capacity type of your managed node group.
      See Also:
    • scalingConfig

      public final NodegroupScalingConfig scalingConfig()

      The scaling configuration details for the Auto Scaling group that is associated with your node group.

      Returns:
      The scaling configuration details for the Auto Scaling group that is associated with your node group.
    • hasInstanceTypes

      public final boolean hasInstanceTypes()
      For responses, this returns true if the service returned a value for the InstanceTypes property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • instanceTypes

      public final List<String> 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.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasInstanceTypes() method.

      Returns:
      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.
    • hasSubnets

      public final boolean hasSubnets()
      For responses, this returns true if the service returned a value for the Subnets property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • subnets

      public final List<String> subnets()

      The subnets that were specified for the Auto Scaling group that is associated with your node group.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasSubnets() method.

      Returns:
      The subnets that were specified for the Auto Scaling group that is associated with your node group.
    • remoteAccess

      public final RemoteAccessConfig 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.

      Returns:
      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.
    • amiType

      public final AMITypes 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.

      If the service returns an enum value that is not available in the current SDK version, amiType will return AMITypes.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from amiTypeAsString().

      Returns:
      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 Also:
    • amiTypeAsString

      public final String amiTypeAsString()

      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.

      If the service returns an enum value that is not available in the current SDK version, amiType will return AMITypes.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available from amiTypeAsString().

      Returns:
      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 Also:
    • nodeRole

      public final String 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.

      Returns:
      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.
    • hasLabels

      public final boolean hasLabels()
      For responses, this returns true if the service returned a value for the Labels property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • labels

      public final Map<String,String> 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.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasLabels() method.

      Returns:
      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.

    • hasTaints

      public final boolean hasTaints()
      For responses, this returns true if the service returned a value for the Taints property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • taints

      public final List<Taint> 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.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasTaints() method.

      Returns:
      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.
    • resources

      public final NodegroupResources resources()

      The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.

      Returns:
      The resources associated with the node group, such as Auto Scaling groups and security groups for remote access.
    • diskSize

      public final Integer 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.

      Returns:
      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.
    • health

      public final NodegroupHealth health()

      The health status of the node group. If there are issues with your node group's health, they are listed here.

      Returns:
      The health status of the node group. If there are issues with your node group's health, they are listed here.
    • updateConfig

      public final NodegroupUpdateConfig updateConfig()

      The node group update configuration.

      Returns:
      The node group update configuration.
    • launchTemplate

      public final LaunchTemplateSpecification launchTemplate()

      If a launch template was used to create the node group, then this is the launch template that was used.

      Returns:
      If a launch template was used to create the node group, then this is the launch template that was used.
    • hasTags

      public final boolean hasTags()
      For responses, this returns true if the service returned a value for the Tags property. This DOES NOT check that the value is non-empty (for which, you should check the isEmpty() method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified.
    • tags

      public final Map<String,String> 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.

      Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.

      This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the hasTags() method.

      Returns:
      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.
    • toBuilder

      public Nodegroup.Builder toBuilder()
      Description copied from interface: ToCopyableBuilder
      Take this object and create a builder that contains all of the current property values of this object.
      Specified by:
      toBuilder in interface ToCopyableBuilder<Nodegroup.Builder,Nodegroup>
      Returns:
      a builder for type T
    • builder

      public static Nodegroup.Builder builder()
    • serializableBuilderClass

      public static Class<? extends Nodegroup.Builder> serializableBuilderClass()
    • hashCode

      public final int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public final boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equalsBySdkFields

      public final boolean equalsBySdkFields(Object obj)
      Description copied from interface: SdkPojo
      Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in an SdkPojo class, and is generated based on a service model.

      If an SdkPojo class does not have any inherited fields, equalsBySdkFields and equals are essentially the same.

      Specified by:
      equalsBySdkFields in interface SdkPojo
      Parameters:
      obj - the object to be compared with
      Returns:
      true if the other object equals to this object by sdk fields, false otherwise.
    • toString

      public final String toString()
      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.
      Overrides:
      toString in class Object
    • getValueForField

      public final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz)
    • sdkFields

      public final List<SdkField<?>> sdkFields()
      Specified by:
      sdkFields in interface SdkPojo
      Returns:
      List of SdkField in this POJO. May be empty list but should never be null.