com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetTargetCapacitySpecificationRequestArgs.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.Ec2FleetTargetCapacitySpecificationRequestArgs.builder
import com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetTargetCapacitySpecificationRequestDefaultTargetCapacityType
import com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetTargetCapacitySpecificationRequestTargetCapacityUnitType
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property defaultTargetCapacityType The default target capacity type.
* @property onDemandTargetCapacity The number of On-Demand units to request.
* @property spotTargetCapacity The number of Spot units to request.
* @property targetCapacityUnitType The unit for the target capacity. You can specify this parameter only when using attributed-based instance type selection.
* Default: `units` (the number of instances)
* @property totalTargetCapacity The number of units to request, filled using the default target capacity type.
*/
public data class Ec2FleetTargetCapacitySpecificationRequestArgs(
public val defaultTargetCapacityType: Output? = null,
public val onDemandTargetCapacity: Output? = null,
public val spotTargetCapacity: Output? = null,
public val targetCapacityUnitType: Output? = null,
public val totalTargetCapacity: Output,
) :
ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.ec2.inputs.Ec2FleetTargetCapacitySpecificationRequestArgs =
com.pulumi.awsnative.ec2.inputs.Ec2FleetTargetCapacitySpecificationRequestArgs.builder()
.defaultTargetCapacityType(
defaultTargetCapacityType?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.onDemandTargetCapacity(onDemandTargetCapacity?.applyValue({ args0 -> args0 }))
.spotTargetCapacity(spotTargetCapacity?.applyValue({ args0 -> args0 }))
.targetCapacityUnitType(
targetCapacityUnitType?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.totalTargetCapacity(totalTargetCapacity.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [Ec2FleetTargetCapacitySpecificationRequestArgs].
*/
@PulumiTagMarker
public class Ec2FleetTargetCapacitySpecificationRequestArgsBuilder internal constructor() {
private var defaultTargetCapacityType:
Output? = null
private var onDemandTargetCapacity: Output? = null
private var spotTargetCapacity: Output? = null
private var targetCapacityUnitType:
Output? = null
private var totalTargetCapacity: Output? = null
/**
* @param value The default target capacity type.
*/
@JvmName("opqcwklvjsnddxmg")
public suspend fun defaultTargetCapacityType(`value`: Output) {
this.defaultTargetCapacityType = value
}
/**
* @param value The number of On-Demand units to request.
*/
@JvmName("hpjsmptktyavheeh")
public suspend fun onDemandTargetCapacity(`value`: Output) {
this.onDemandTargetCapacity = value
}
/**
* @param value The number of Spot units to request.
*/
@JvmName("rwlnbiginfhncsxx")
public suspend fun spotTargetCapacity(`value`: Output) {
this.spotTargetCapacity = value
}
/**
* @param value The unit for the target capacity. You can specify this parameter only when using attributed-based instance type selection.
* Default: `units` (the number of instances)
*/
@JvmName("rihcnaewmsaqekud")
public suspend fun targetCapacityUnitType(`value`: Output) {
this.targetCapacityUnitType = value
}
/**
* @param value The number of units to request, filled using the default target capacity type.
*/
@JvmName("puckfcwrdaddpcgv")
public suspend fun totalTargetCapacity(`value`: Output) {
this.totalTargetCapacity = value
}
/**
* @param value The default target capacity type.
*/
@JvmName("axmemislakpvhjos")
public suspend fun defaultTargetCapacityType(`value`: Ec2FleetTargetCapacitySpecificationRequestDefaultTargetCapacityType?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.defaultTargetCapacityType = mapped
}
/**
* @param value The number of On-Demand units to request.
*/
@JvmName("qnhyxdphinukvwoa")
public suspend fun onDemandTargetCapacity(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.onDemandTargetCapacity = mapped
}
/**
* @param value The number of Spot units to request.
*/
@JvmName("puwmuxnljxvyjqar")
public suspend fun spotTargetCapacity(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.spotTargetCapacity = mapped
}
/**
* @param value The unit for the target capacity. You can specify this parameter only when using attributed-based instance type selection.
* Default: `units` (the number of instances)
*/
@JvmName("wyilgpisdfldluwp")
public suspend fun targetCapacityUnitType(`value`: Ec2FleetTargetCapacitySpecificationRequestTargetCapacityUnitType?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.targetCapacityUnitType = mapped
}
/**
* @param value The number of units to request, filled using the default target capacity type.
*/
@JvmName("teyvpagwbkeqfnbw")
public suspend fun totalTargetCapacity(`value`: Int) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.totalTargetCapacity = mapped
}
internal fun build(): Ec2FleetTargetCapacitySpecificationRequestArgs =
Ec2FleetTargetCapacitySpecificationRequestArgs(
defaultTargetCapacityType = defaultTargetCapacityType,
onDemandTargetCapacity = onDemandTargetCapacity,
spotTargetCapacity = spotTargetCapacity,
targetCapacityUnitType = targetCapacityUnitType,
totalTargetCapacity = totalTargetCapacity ?: throw PulumiNullFieldException("totalTargetCapacity"),
)
}