Enum CapacityType

java.lang.Object
java.lang.Enum<CapacityType>
software.amazon.awscdk.services.eks.CapacityType
All Implemented Interfaces:
Serializable, Comparable<CapacityType>, java.lang.constant.Constable

@Generated(value="jsii-pacmak/1.96.0 (build 921e240)", date="2024-04-10T22:22:27.633Z") @Stability(Stable) public enum CapacityType extends Enum<CapacityType>
Capacity type of the managed node group.

Example:

 Cluster cluster;
 cluster.addNodegroupCapacity("extra-ng-spot", NodegroupOptions.builder()
         .instanceTypes(List.of(
             new InstanceType("c5.large"),
             new InstanceType("c5a.large"),
             new InstanceType("c5d.large")))
         .minSize(3)
         .capacityType(CapacityType.SPOT)
         .build());
 
  • Enum Constant Details

    • SPOT

      @Stability(Stable) public static final CapacityType SPOT
      spot instances.
    • ON_DEMAND

      @Stability(Stable) public static final CapacityType ON_DEMAND
      on-demand instances.
  • Method Details

    • values

      public static CapacityType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static CapacityType valueOf(String name)
      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum type has no constant with the specified name
      NullPointerException - if the argument is null