com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetCapacityRebalanceArgs.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.Ec2FleetCapacityRebalanceArgs.builder
import com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetCapacityRebalanceReplacementStrategy
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Suppress
import kotlin.jvm.JvmName
/**
*
* @property replacementStrategy The replacement strategy to use. Only available for fleets of type `maintain` .
* `launch` - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.
* `launch-before-terminate` - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in `TerminationDelay` ), terminates the instances that received a rebalance notification.
* @property terminationDelay The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.
* Required when `ReplacementStrategy` is set to `launch-before-terminate` .
* Not valid when `ReplacementStrategy` is set to `launch` .
* Valid values: Minimum value of `120` seconds. Maximum value of `7200` seconds.
*/
public data class Ec2FleetCapacityRebalanceArgs(
public val replacementStrategy: Output? = null,
public val terminationDelay: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.awsnative.ec2.inputs.Ec2FleetCapacityRebalanceArgs =
com.pulumi.awsnative.ec2.inputs.Ec2FleetCapacityRebalanceArgs.builder()
.replacementStrategy(
replacementStrategy?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
)
.terminationDelay(terminationDelay?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [Ec2FleetCapacityRebalanceArgs].
*/
@PulumiTagMarker
public class Ec2FleetCapacityRebalanceArgsBuilder internal constructor() {
private var replacementStrategy: Output? = null
private var terminationDelay: Output? = null
/**
* @param value The replacement strategy to use. Only available for fleets of type `maintain` .
* `launch` - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.
* `launch-before-terminate` - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in `TerminationDelay` ), terminates the instances that received a rebalance notification.
*/
@JvmName("uevfduydrscnstqh")
public suspend fun replacementStrategy(`value`: Output) {
this.replacementStrategy = value
}
/**
* @param value The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.
* Required when `ReplacementStrategy` is set to `launch-before-terminate` .
* Not valid when `ReplacementStrategy` is set to `launch` .
* Valid values: Minimum value of `120` seconds. Maximum value of `7200` seconds.
*/
@JvmName("pmhqtuovgoyxlxee")
public suspend fun terminationDelay(`value`: Output) {
this.terminationDelay = value
}
/**
* @param value The replacement strategy to use. Only available for fleets of type `maintain` .
* `launch` - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet. EC2 Fleet does not terminate the instances that receive a rebalance notification. You can terminate the old instances, or you can leave them running. You are charged for all instances while they are running.
* `launch-before-terminate` - EC2 Fleet launches a replacement Spot Instance when a rebalance notification is emitted for an existing Spot Instance in the fleet, and then, after a delay that you specify (in `TerminationDelay` ), terminates the instances that received a rebalance notification.
*/
@JvmName("uhxwtqggjbvlueoy")
public suspend fun replacementStrategy(`value`: Ec2FleetCapacityRebalanceReplacementStrategy?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.replacementStrategy = mapped
}
/**
* @param value The amount of time (in seconds) that Amazon EC2 waits before terminating the old Spot Instance after launching a new replacement Spot Instance.
* Required when `ReplacementStrategy` is set to `launch-before-terminate` .
* Not valid when `ReplacementStrategy` is set to `launch` .
* Valid values: Minimum value of `120` seconds. Maximum value of `7200` seconds.
*/
@JvmName("ucxjcqjamddfkhjg")
public suspend fun terminationDelay(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.terminationDelay = mapped
}
internal fun build(): Ec2FleetCapacityRebalanceArgs = Ec2FleetCapacityRebalanceArgs(
replacementStrategy = replacementStrategy,
terminationDelay = terminationDelay,
)
}