com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetFleetLaunchTemplateOverridesRequestArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-aws-native-kotlin Show documentation
Show all versions of pulumi-aws-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.awsnative.ec2.kotlin.inputs
import com.pulumi.awsnative.ec2.inputs.Ec2FleetFleetLaunchTemplateOverridesRequestArgs.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 attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
* > If you specify `InstanceRequirements` , you can't specify `InstanceType` .
* @property instanceType The instance type.
* `mac1.metal` is not supported as a launch template override.
* > If you specify `InstanceType` , you can't specify `InstanceRequirements` .
* @property maxPrice 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 placement The location where the instance launched, if applicable.
* @property priority The priority for the launch template override. The highest priority is launched first.
* If the On-Demand `AllocationStrategy` is set to `prioritized` , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
* If the Spot `AllocationStrategy` is set to `capacity-optimized-prioritized` , EC2 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 subnetId The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, `subnet-1234abcdeexample1, subnet-0987cdef6example2` ). A request of type `instant` can have only one subnet ID.
* @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 `lowest-price` and `price-capacity-optimized` 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 Ec2FleetFleetLaunchTemplateOverridesRequestArgs(
public val availabilityZone: Output? = null,
public val instanceRequirements: Output? = null,
public val instanceType: Output? = null,
public val maxPrice: Output? = null,
public val placement: Output? = null,
public val priority: Output? = null,
public val subnetId: Output? = null,
public val weightedCapacity: Output? = null,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.ec2.inputs.Ec2FleetFleetLaunchTemplateOverridesRequestArgs =
com.pulumi.awsnative.ec2.inputs.Ec2FleetFleetLaunchTemplateOverridesRequestArgs.builder()
.availabilityZone(availabilityZone?.applyValue({ args0 -> args0 }))
.instanceRequirements(
instanceRequirements?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.instanceType(instanceType?.applyValue({ args0 -> args0 }))
.maxPrice(maxPrice?.applyValue({ args0 -> args0 }))
.placement(placement?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.priority(priority?.applyValue({ args0 -> args0 }))
.subnetId(subnetId?.applyValue({ args0 -> args0 }))
.weightedCapacity(weightedCapacity?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [Ec2FleetFleetLaunchTemplateOverridesRequestArgs].
*/
@PulumiTagMarker
public class Ec2FleetFleetLaunchTemplateOverridesRequestArgsBuilder internal constructor() {
private var availabilityZone: Output? = null
private var instanceRequirements: Output? = null
private var instanceType: Output? = null
private var maxPrice: Output? = null
private var placement: Output? = null
private var priority: Output? = null
private var subnetId: Output? = null
private var weightedCapacity: Output? = null
/**
* @param value The Availability Zone in which to launch the instances.
*/
@JvmName("wlggvrcskvoncqcl")
public suspend fun availabilityZone(`value`: Output) {
this.availabilityZone = value
}
/**
* @param value The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
* > If you specify `InstanceRequirements` , you can't specify `InstanceType` .
*/
@JvmName("mjqrqastldcfxycm")
public suspend fun instanceRequirements(`value`: Output) {
this.instanceRequirements = value
}
/**
* @param value The instance type.
* `mac1.metal` is not supported as a launch template override.
* > If you specify `InstanceType` , you can't specify `InstanceRequirements` .
*/
@JvmName("nvjtielpnihkrxja")
public suspend fun instanceType(`value`: Output) {
this.instanceType = 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("iflhtkmnldyxowpt")
public suspend fun maxPrice(`value`: Output) {
this.maxPrice = value
}
/**
* @param value The location where the instance launched, if applicable.
*/
@JvmName("peaqryiivkuvsqme")
public suspend fun placement(`value`: Output) {
this.placement = value
}
/**
* @param value The priority for the launch template override. The highest priority is launched first.
* If the On-Demand `AllocationStrategy` is set to `prioritized` , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
* If the Spot `AllocationStrategy` is set to `capacity-optimized-prioritized` , EC2 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("fkdwraouiqbmnocb")
public suspend fun priority(`value`: Output) {
this.priority = value
}
/**
* @param value The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, `subnet-1234abcdeexample1, subnet-0987cdef6example2` ). A request of type `instant` can have only one subnet ID.
*/
@JvmName("eowhiyjwodbtyqeh")
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 `lowest-price` and `price-capacity-optimized` 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("ryuaepnrexckvkho")
public suspend fun weightedCapacity(`value`: Output) {
this.weightedCapacity = value
}
/**
* @param value The Availability Zone in which to launch the instances.
*/
@JvmName("imwtxgcamndbmxwm")
public suspend fun availabilityZone(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.availabilityZone = mapped
}
/**
* @param value The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
* > If you specify `InstanceRequirements` , you can't specify `InstanceType` .
*/
@JvmName("fwrlrmwbtsqcnsjw")
public suspend fun instanceRequirements(`value`: Ec2FleetInstanceRequirementsRequestArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.instanceRequirements = mapped
}
/**
* @param argument The attributes for the instance types. When you specify instance attributes, Amazon EC2 will identify instance types with those attributes.
* > If you specify `InstanceRequirements` , you can't specify `InstanceType` .
*/
@JvmName("klktmcsxoexswswa")
public suspend fun instanceRequirements(argument: suspend Ec2FleetInstanceRequirementsRequestArgsBuilder.() -> Unit) {
val toBeMapped = Ec2FleetInstanceRequirementsRequestArgsBuilder().applySuspend {
argument()
}.build()
val mapped = of(toBeMapped)
this.instanceRequirements = mapped
}
/**
* @param value The instance type.
* `mac1.metal` is not supported as a launch template override.
* > If you specify `InstanceType` , you can't specify `InstanceRequirements` .
*/
@JvmName("sxtmksdsbudlbecp")
public suspend fun instanceType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.instanceType = 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("hkmcuqywobahnysh")
public suspend fun maxPrice(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.maxPrice = mapped
}
/**
* @param value The location where the instance launched, if applicable.
*/
@JvmName("rqpsusxaprirwbeu")
public suspend fun placement(`value`: Ec2FleetPlacementArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.placement = mapped
}
/**
* @param argument The location where the instance launched, if applicable.
*/
@JvmName("rnqwbgidmlniwvcy")
public suspend fun placement(argument: suspend Ec2FleetPlacementArgsBuilder.() -> Unit) {
val toBeMapped = Ec2FleetPlacementArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.placement = mapped
}
/**
* @param value The priority for the launch template override. The highest priority is launched first.
* If the On-Demand `AllocationStrategy` is set to `prioritized` , EC2 Fleet uses priority to determine which launch template override to use first in fulfilling On-Demand capacity.
* If the Spot `AllocationStrategy` is set to `capacity-optimized-prioritized` , EC2 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("tteoibnohmxiiuoy")
public suspend fun priority(`value`: Double?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.priority = mapped
}
/**
* @param value The IDs of the subnets in which to launch the instances. Separate multiple subnet IDs using commas (for example, `subnet-1234abcdeexample1, subnet-0987cdef6example2` ). A request of type `instant` can have only one subnet ID.
*/
@JvmName("efjfunpdfiqtaola")
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 `lowest-price` and `price-capacity-optimized` 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("skostsxynldvcrpt")
public suspend fun weightedCapacity(`value`: Double?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.weightedCapacity = mapped
}
internal fun build(): Ec2FleetFleetLaunchTemplateOverridesRequestArgs =
Ec2FleetFleetLaunchTemplateOverridesRequestArgs(
availabilityZone = availabilityZone,
instanceRequirements = instanceRequirements,
instanceType = instanceType,
maxPrice = maxPrice,
placement = placement,
priority = priority,
subnetId = subnetId,
weightedCapacity = weightedCapacity,
)
}