All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pulumi.awsnative.ec2.kotlin.enums.SpotFleetRequestConfigDataAllocationStrategy.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ec2.kotlin.enums

import com.pulumi.kotlin.ConvertibleToJava
import kotlin.Suppress

/**
 * The strategy that determines how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the Spot Fleet launch configuration. For more information, see [Allocation strategies for Spot Instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-fleet-allocation-strategy.html) in the *Amazon EC2 User Guide* .
 * - **priceCapacityOptimized (recommended)** - Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. Spot Fleet then requests Spot Instances from the lowest priced of these pools.
 * - **capacityOptimized** - Spot Fleet identifies the pools with the highest capacity availability for the number of instances that are launching. This means that we will request Spot Instances from the pools that we believe have the lowest chance of interruption in the near term. To give certain instance types a higher chance of launching first, use `capacityOptimizedPrioritized` . Set a priority for each instance type by using the `Priority` parameter for `LaunchTemplateOverrides` . You can assign the same priority to different `LaunchTemplateOverrides` . EC2 implements the priorities on a best-effort basis, but optimizes for capacity first. `capacityOptimizedPrioritized` is supported only if your Spot Fleet uses a launch template. Note that if the `OnDemandAllocationStrategy` is set to `prioritized` , the same priority is applied when fulfilling On-Demand capacity.
 * - **diversified** - Spot Fleet requests instances from all of the Spot Instance pools that you specify.
 * - **lowestPrice (not recommended)** - > We don't recommend the `lowestPrice` allocation strategy because it has the highest risk of interruption for your Spot Instances.
 * Spot Fleet requests instances from the lowest priced Spot Instance pool that has available capacity. If the lowest priced pool doesn't have available capacity, the Spot Instances come from the next lowest priced pool that has available capacity. If a pool runs out of capacity before fulfilling your desired capacity, Spot Fleet will continue to fulfill your request by drawing from the next lowest priced pool. To ensure that your desired capacity is met, you might receive Spot Instances from several pools. Because this strategy only considers instance price and not capacity availability, it might lead to high interruption rates.
 * Default: `lowestPrice`
 */
public enum class SpotFleetRequestConfigDataAllocationStrategy(
    public val javaValue: com.pulumi.awsnative.ec2.enums.SpotFleetRequestConfigDataAllocationStrategy,
) : ConvertibleToJava {
    CapacityOptimized(com.pulumi.awsnative.ec2.enums.SpotFleetRequestConfigDataAllocationStrategy.CapacityOptimized),
    CapacityOptimizedPrioritized(com.pulumi.awsnative.ec2.enums.SpotFleetRequestConfigDataAllocationStrategy.CapacityOptimizedPrioritized),
    Diversified(com.pulumi.awsnative.ec2.enums.SpotFleetRequestConfigDataAllocationStrategy.Diversified),
    LowestPrice(com.pulumi.awsnative.ec2.enums.SpotFleetRequestConfigDataAllocationStrategy.LowestPrice),
    PriceCapacityOptimized(com.pulumi.awsnative.ec2.enums.SpotFleetRequestConfigDataAllocationStrategy.PriceCapacityOptimized),
    ;

    override fun toJava(): com.pulumi.awsnative.ec2.enums.SpotFleetRequestConfigDataAllocationStrategy = javaValue

    public companion object {
        public fun toKotlin(javaType: com.pulumi.awsnative.ec2.enums.SpotFleetRequestConfigDataAllocationStrategy): SpotFleetRequestConfigDataAllocationStrategy =
            SpotFleetRequestConfigDataAllocationStrategy.values().first { it.javaValue == javaType }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy