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.104.0 (build e79254c)",
date="2024-12-11T23:26:29.183Z")
@Stability(Stable)
public enum SpotAllocationStrategy
extends Enum<SpotAllocationStrategy>
Indicates how to allocate instance types to fulfill Spot capacity.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe Auto Scaling group launches instances using Spot pools that are optimally chosen based on the available Spot capacity.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).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.The price and capacity optimized allocation strategy looks at both price and capacity to select the Spot Instance pools that are the least likely to be interrupted and have the lowest possible price. -
Method Summary
Modifier and TypeMethodDescriptionstatic SpotAllocationStrategy
Returns the enum constant of this type with the specified name.static SpotAllocationStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
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
The Auto Scaling group launches instances using Spot pools that are optimally chosen based on the available Spot capacity.Recommended.
-
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.
-
PRICE_CAPACITY_OPTIMIZED
The price and capacity optimized allocation strategy looks at both price and capacity to select the Spot Instance pools that are the least likely to be interrupted and have the lowest possible price.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-