Enum OnDemandAllocationStrategy

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

@Generated(value="jsii-pacmak/1.103.1 (build bef2dea)", date="2024-10-25T14:21:10.667Z") @Stability(Stable) public enum OnDemandAllocationStrategy extends Enum<OnDemandAllocationStrategy>
Indicates how to allocate instance types to fulfill On-Demand capacity.
  • Enum Constant Details

    • PRIORITIZED

      @Stability(Stable) public static final OnDemandAllocationStrategy PRIORITIZED
      This strategy uses the order of instance types in the LaunchTemplateOverrides to define the launch priority of each instance type.

      The first instance type in the array is prioritized higher than the last. If all your On-Demand capacity cannot be fulfilled using your highest priority instance, then the Auto Scaling group launches the remaining capacity using the second priority instance type, and so on.

    • LOWEST_PRICE

      @Stability(Stable) public static final OnDemandAllocationStrategy LOWEST_PRICE
      This strategy uses the lowest-price instance types in each Availability Zone based on the current On-Demand instance price.

      To meet your desired capacity, you might receive On-Demand Instances of more than one instance type in each Availability Zone. This depends on how much capacity you request.

  • Method Details

    • values

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