![JAR search and dependency download from the Maven repository](/logo.png)
com.pulumi.awsnative.ec2.kotlin.inputs.SpotFleetLaunchTemplateOverridesArgs.kt Maven / Gradle / Ivy
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin.inputs
import com.pulumi.awsnative.ec2.inputs.SpotFleetLaunchTemplateOverridesArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
*
* @property availabilityZone The Availability Zone in which to launch the instances.
* @property instanceRequirements The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.
* > If you specify `InstanceRequirements` , you can't specify `InstanceType` .
* @property instanceType The instance type.
* @property priority The priority for the launch template override. The highest priority is launched first.
* If `OnDemandAllocationStrategy` is set to `prioritized` , Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
* If the Spot `AllocationStrategy` is set to `capacityOptimizedPrioritized` , Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.
* Valid values are whole numbers starting at `0` . The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.
* @property spotPrice The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
* > If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
* @property subnetId The ID of the subnet in which to launch the instances.
* @property weightedCapacity The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.
* If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
* > When specifying weights, the price used in the `lowestPrice` and `priceCapacityOptimized` allocation strategies is per *unit* hour (where the instance price is divided by the specified weight). However, if all the specified weights are above the requested `TargetCapacity` , resulting in only 1 instance being launched, the price used is per *instance* hour.
*/
public data class SpotFleetLaunchTemplateOverridesArgs(
public val availabilityZone: Output? = null,
public val instanceRequirements: Output? = null,
public val instanceType: Output? = null,
public val priority: Output? = null,
public val spotPrice: Output? = null,
public val subnetId: Output? = null,
public val weightedCapacity: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.ec2.inputs.SpotFleetLaunchTemplateOverridesArgs =
com.pulumi.awsnative.ec2.inputs.SpotFleetLaunchTemplateOverridesArgs.builder()
.availabilityZone(availabilityZone?.applyValue({ args0 -> args0 }))
.instanceRequirements(
instanceRequirements?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.instanceType(instanceType?.applyValue({ args0 -> args0 }))
.priority(priority?.applyValue({ args0 -> args0 }))
.spotPrice(spotPrice?.applyValue({ args0 -> args0 }))
.subnetId(subnetId?.applyValue({ args0 -> args0 }))
.weightedCapacity(weightedCapacity?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [SpotFleetLaunchTemplateOverridesArgs].
*/
@PulumiTagMarker
public class SpotFleetLaunchTemplateOverridesArgsBuilder internal constructor() {
private var availabilityZone: Output? = null
private var instanceRequirements: Output? = null
private var instanceType: Output? = null
private var priority: Output? = null
private var spotPrice: Output? = null
private var subnetId: Output? = null
private var weightedCapacity: Output? = null
/**
* @param value The Availability Zone in which to launch the instances.
*/
@JvmName("uunisfgiffxgcygh")
public suspend fun availabilityZone(`value`: Output) {
this.availabilityZone = value
}
/**
* @param value The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.
* > If you specify `InstanceRequirements` , you can't specify `InstanceType` .
*/
@JvmName("xyyjtnwwelmrufct")
public suspend fun instanceRequirements(`value`: Output) {
this.instanceRequirements = value
}
/**
* @param value The instance type.
*/
@JvmName("tvsatlciyviuvssj")
public suspend fun instanceType(`value`: Output) {
this.instanceType = value
}
/**
* @param value The priority for the launch template override. The highest priority is launched first.
* If `OnDemandAllocationStrategy` is set to `prioritized` , Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
* If the Spot `AllocationStrategy` is set to `capacityOptimizedPrioritized` , Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.
* Valid values are whole numbers starting at `0` . The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.
*/
@JvmName("lnkecseoiniegsak")
public suspend fun priority(`value`: Output) {
this.priority = value
}
/**
* @param value The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
* > If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
*/
@JvmName("lfdboyvfxdnhaxky")
public suspend fun spotPrice(`value`: Output) {
this.spotPrice = value
}
/**
* @param value The ID of the subnet in which to launch the instances.
*/
@JvmName("ibwuorprwcjsqufh")
public suspend fun subnetId(`value`: Output) {
this.subnetId = value
}
/**
* @param value The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.
* If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
* > When specifying weights, the price used in the `lowestPrice` and `priceCapacityOptimized` allocation strategies is per *unit* hour (where the instance price is divided by the specified weight). However, if all the specified weights are above the requested `TargetCapacity` , resulting in only 1 instance being launched, the price used is per *instance* hour.
*/
@JvmName("qxvxiqihmifqavxh")
public suspend fun weightedCapacity(`value`: Output) {
this.weightedCapacity = value
}
/**
* @param value The Availability Zone in which to launch the instances.
*/
@JvmName("ltjicratguiprqkq")
public suspend fun availabilityZone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.availabilityZone = mapped
}
/**
* @param value The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.
* > If you specify `InstanceRequirements` , you can't specify `InstanceType` .
*/
@JvmName("dhxklmbwmieysqin")
public suspend fun instanceRequirements(`value`: SpotFleetInstanceRequirementsRequestArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.instanceRequirements = mapped
}
/**
* @param argument The instance requirements. When you specify instance requirements, Amazon EC2 will identify instance types with the provided requirements, and then use your On-Demand and Spot allocation strategies to launch instances from these instance types, in the same way as when you specify a list of instance types.
* > If you specify `InstanceRequirements` , you can't specify `InstanceType` .
*/
@JvmName("okyaeyxyslgxxyac")
public suspend fun instanceRequirements(argument: suspend SpotFleetInstanceRequirementsRequestArgsBuilder.() -> Unit) {
val toBeMapped = SpotFleetInstanceRequirementsRequestArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.instanceRequirements = mapped
}
/**
* @param value The instance type.
*/
@JvmName("qqjbqshisddykuys")
public suspend fun instanceType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.instanceType = mapped
}
/**
* @param value The priority for the launch template override. The highest priority is launched first.
* If `OnDemandAllocationStrategy` is set to `prioritized` , Spot Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
* If the Spot `AllocationStrategy` is set to `capacityOptimizedPrioritized` , Spot Fleet uses priority on a best-effort basis to determine which launch template override to use in fulfilling Spot capacity, but optimizes for capacity first.
* Valid values are whole numbers starting at `0` . The lower the number, the higher the priority. If no number is set, the launch template override has the lowest priority. You can set the same priority for different launch template overrides.
*/
@JvmName("tsgdxcocqisauney")
public suspend fun priority(`value`: Double?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.priority = mapped
}
/**
* @param value The maximum price per unit hour that you are willing to pay for a Spot Instance. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
* > If you specify a maximum price, your instances will be interrupted more frequently than if you do not specify this parameter.
*/
@JvmName("htbwhketbxablqhr")
public suspend fun spotPrice(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.spotPrice = mapped
}
/**
* @param value The ID of the subnet in which to launch the instances.
*/
@JvmName("tltgflyrkmxkqmhn")
public suspend fun subnetId(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.subnetId = mapped
}
/**
* @param value The number of units provided by the specified instance type. These are the same units that you chose to set the target capacity in terms of instances, or a performance characteristic such as vCPUs, memory, or I/O.
* If the target capacity divided by this value is not a whole number, Amazon EC2 rounds the number of instances to the next whole number. If this value is not specified, the default is 1.
* > When specifying weights, the price used in the `lowestPrice` and `priceCapacityOptimized` allocation strategies is per *unit* hour (where the instance price is divided by the specified weight). However, if all the specified weights are above the requested `TargetCapacity` , resulting in only 1 instance being launched, the price used is per *instance* hour.
*/
@JvmName("vdunwmcsrqcmhjbu")
public suspend fun weightedCapacity(`value`: Double?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.weightedCapacity = mapped
}
internal fun build(): SpotFleetLaunchTemplateOverridesArgs = SpotFleetLaunchTemplateOverridesArgs(
availabilityZone = availabilityZone,
instanceRequirements = instanceRequirements,
instanceType = instanceType,
priority = priority,
spotPrice = spotPrice,
subnetId = subnetId,
weightedCapacity = weightedCapacity,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy