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

com.pulumi.aws.emr.kotlin.inputs.ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecificationArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.66.3.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.emr.kotlin.inputs

import com.pulumi.aws.emr.inputs.ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecificationArgs.builder
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.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property allocationStrategy Specifies the strategy to use in launching Spot instance fleets. Valid values include `capacity-optimized`, `diversified`, `lowest-price`, `price-capacity-optimized`. See the [AWS documentation](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html#emr-instance-fleet-allocation-strategy) for details on each strategy type.
 * @property blockDurationMinutes Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
 * @property timeoutAction Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are `TERMINATE_CLUSTER` and `SWITCH_TO_ON_DEMAND`. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.
 * @property timeoutDurationMinutes Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.
 */
public data class ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecificationArgs(
    public val allocationStrategy: Output,
    public val blockDurationMinutes: Output? = null,
    public val timeoutAction: Output,
    public val timeoutDurationMinutes: Output,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.emr.inputs.ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecificationArgs =
        com.pulumi.aws.emr.inputs.ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecificationArgs.builder()
            .allocationStrategy(allocationStrategy.applyValue({ args0 -> args0 }))
            .blockDurationMinutes(blockDurationMinutes?.applyValue({ args0 -> args0 }))
            .timeoutAction(timeoutAction.applyValue({ args0 -> args0 }))
            .timeoutDurationMinutes(timeoutDurationMinutes.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecificationArgs].
 */
@PulumiTagMarker
public class ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecificationArgsBuilder internal constructor() {
    private var allocationStrategy: Output? = null

    private var blockDurationMinutes: Output? = null

    private var timeoutAction: Output? = null

    private var timeoutDurationMinutes: Output? = null

    /**
     * @param value Specifies the strategy to use in launching Spot instance fleets. Valid values include `capacity-optimized`, `diversified`, `lowest-price`, `price-capacity-optimized`. See the [AWS documentation](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html#emr-instance-fleet-allocation-strategy) for details on each strategy type.
     */
    @JvmName("pebfdtcpvqakteqt")
    public suspend fun allocationStrategy(`value`: Output) {
        this.allocationStrategy = value
    }

    /**
     * @param value Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
     */
    @JvmName("qhihffppceeawcdt")
    public suspend fun blockDurationMinutes(`value`: Output) {
        this.blockDurationMinutes = value
    }

    /**
     * @param value Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are `TERMINATE_CLUSTER` and `SWITCH_TO_ON_DEMAND`. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.
     */
    @JvmName("ylposbhronflqenk")
    public suspend fun timeoutAction(`value`: Output) {
        this.timeoutAction = value
    }

    /**
     * @param value Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.
     */
    @JvmName("wodumeskbxvrfjxa")
    public suspend fun timeoutDurationMinutes(`value`: Output) {
        this.timeoutDurationMinutes = value
    }

    /**
     * @param value Specifies the strategy to use in launching Spot instance fleets. Valid values include `capacity-optimized`, `diversified`, `lowest-price`, `price-capacity-optimized`. See the [AWS documentation](https://docs.aws.amazon.com/emr/latest/ManagementGuide/emr-instance-fleet.html#emr-instance-fleet-allocation-strategy) for details on each strategy type.
     */
    @JvmName("ongkxktwhcidauew")
    public suspend fun allocationStrategy(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.allocationStrategy = mapped
    }

    /**
     * @param value Defined duration for Spot instances (also known as Spot blocks) in minutes. When specified, the Spot instance does not terminate before the defined duration expires, and defined duration pricing for Spot instances applies. Valid values are 60, 120, 180, 240, 300, or 360. The duration period starts as soon as a Spot instance receives its instance ID. At the end of the duration, Amazon EC2 marks the Spot instance for termination and provides a Spot instance termination notice, which gives the instance a two-minute warning before it terminates.
     */
    @JvmName("qxcgxbkrnoyhevwd")
    public suspend fun blockDurationMinutes(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blockDurationMinutes = mapped
    }

    /**
     * @param value Action to take when TargetSpotCapacity has not been fulfilled when the TimeoutDurationMinutes has expired; that is, when all Spot instances could not be provisioned within the Spot provisioning timeout. Valid values are `TERMINATE_CLUSTER` and `SWITCH_TO_ON_DEMAND`. SWITCH_TO_ON_DEMAND specifies that if no Spot instances are available, On-Demand Instances should be provisioned to fulfill any remaining Spot capacity.
     */
    @JvmName("muyvuhbffcugiqaj")
    public suspend fun timeoutAction(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.timeoutAction = mapped
    }

    /**
     * @param value Spot provisioning timeout period in minutes. If Spot instances are not provisioned within this time period, the TimeOutAction is taken. Minimum value is 5 and maximum value is 1440. The timeout applies only during initial provisioning, when the cluster is first created.
     */
    @JvmName("fkjxtsrqfpgdkmxv")
    public suspend fun timeoutDurationMinutes(`value`: Int) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.timeoutDurationMinutes = mapped
    }

    internal fun build(): ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecificationArgs =
        ClusterMasterInstanceFleetLaunchSpecificationsSpotSpecificationArgs(
            allocationStrategy = allocationStrategy ?: throw PulumiNullFieldException("allocationStrategy"),
            blockDurationMinutes = blockDurationMinutes,
            timeoutAction = timeoutAction ?: throw PulumiNullFieldException("timeoutAction"),
            timeoutDurationMinutes = timeoutDurationMinutes ?: throw
                PulumiNullFieldException("timeoutDurationMinutes"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy