Enum SpotAllocationStrategy

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

@Generated(value="jsii-pacmak/1.84.0 (build 5404dcf)", date="2023-06-19T16:30:45.413Z") @Stability(Stable) public enum SpotAllocationStrategy extends Enum<SpotAllocationStrategy>
Indicates how to allocate instance types to fulfill Spot capacity.
  • Enum Constant Details

    • LOWEST_PRICE

      @Stability(Stable) public static final SpotAllocationStrategy LOWEST_PRICE
      The Auto Scaling group launches instances using the Spot pools with the lowest price, and evenly allocates your instances across the number of Spot pools that you specify.
    • CAPACITY_OPTIMIZED

      @Stability(Stable) public static final SpotAllocationStrategy CAPACITY_OPTIMIZED
      The Auto Scaling group launches instances using Spot pools that are optimally chosen based on the available Spot capacity.

      Recommended.

    • CAPACITY_OPTIMIZED_PRIORITIZED

      @Stability(Stable) public static final SpotAllocationStrategy CAPACITY_OPTIMIZED_PRIORITIZED
      When you use this strategy, you need to set the order of instance types in the list of launch template overrides from highest to lowest priority (from first to last in the list).

      Amazon EC2 Auto Scaling honors the instance type priorities on a best-effort basis but optimizes for capacity first.

  • Method Details

    • values

      public static SpotAllocationStrategy[] 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 SpotAllocationStrategy 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