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

com.pulumi.awsnative.ec2.kotlin.Ec2FleetArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.ec2.kotlin

import com.pulumi.awsnative.ec2.Ec2FleetArgs.builder
import com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetExcessCapacityTerminationPolicy
import com.pulumi.awsnative.ec2.kotlin.enums.Ec2FleetType
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetFleetLaunchTemplateConfigRequestArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetFleetLaunchTemplateConfigRequestArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetOnDemandOptionsRequestArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetOnDemandOptionsRequestArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetSpotOptionsRequestArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetSpotOptionsRequestArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetTagSpecificationArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetTagSpecificationArgsBuilder
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetTargetCapacitySpecificationRequestArgs
import com.pulumi.awsnative.ec2.kotlin.inputs.Ec2FleetTargetCapacitySpecificationRequestArgsBuilder
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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::EC2::EC2Fleet
 * @property context Reserved.
 * @property excessCapacityTerminationPolicy Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
 * Supported only for fleets of type `maintain` .
 * @property launchTemplateConfigs The configuration for the EC2 Fleet.
 * @property onDemandOptions Describes the configuration of On-Demand Instances in an EC2 Fleet.
 * @property replaceUnhealthyInstances Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type `maintain` . For more information, see [EC2 Fleet health checks](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks) in the *Amazon EC2 User Guide* .
 * @property spotOptions Describes the configuration of Spot Instances in an EC2 Fleet.
 * @property tagSpecifications The key-value pair for tagging the EC2 Fleet request on creation. For more information, see [Tag your resources](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) .
 * If the fleet type is `instant` , specify a resource type of `fleet` to tag the fleet or `instance` to tag the instances at launch.
 * If the fleet type is `maintain` or `request` , specify a resource type of `fleet` to tag the fleet. You cannot specify a resource type of `instance` . To tag instances at launch, specify the tags in a [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) .
 * @property targetCapacitySpecification The number of units to request.
 * @property terminateInstancesWithExpiration Indicates whether running instances should be terminated when the EC2 Fleet expires.
 * @property type The fleet type. The default value is `maintain` .
 * - `maintain` - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
 * - `request` - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.
 * - `instant` - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.
 * For more information, see [EC2 Fleet request types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-request-type.html) in the *Amazon EC2 User Guide* .
 * @property validFrom The start date and time of the request, in UTC format (for example, *YYYY* - *MM* - *DD* T *HH* : *MM* : *SS* Z). The default is to start fulfilling the request immediately.
 * @property validUntil The end date and time of the request, in UTC format (for example, *YYYY* - *MM* - *DD* T *HH* : *MM* : *SS* Z). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.
 */
public data class Ec2FleetArgs(
    public val context: Output? = null,
    public val excessCapacityTerminationPolicy: Output? =
        null,
    public val launchTemplateConfigs: Output>? =
        null,
    public val onDemandOptions: Output? = null,
    public val replaceUnhealthyInstances: Output? = null,
    public val spotOptions: Output? = null,
    public val tagSpecifications: Output>? = null,
    public val targetCapacitySpecification: Output? =
        null,
    public val terminateInstancesWithExpiration: Output? = null,
    public val type: Output? = null,
    public val validFrom: Output? = null,
    public val validUntil: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.Ec2FleetArgs =
        com.pulumi.awsnative.ec2.Ec2FleetArgs.builder()
            .context(context?.applyValue({ args0 -> args0 }))
            .excessCapacityTerminationPolicy(
                excessCapacityTerminationPolicy?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .launchTemplateConfigs(
                launchTemplateConfigs?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .onDemandOptions(onDemandOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .replaceUnhealthyInstances(replaceUnhealthyInstances?.applyValue({ args0 -> args0 }))
            .spotOptions(spotOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tagSpecifications(
                tagSpecifications?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .targetCapacitySpecification(
                targetCapacitySpecification?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .terminateInstancesWithExpiration(terminateInstancesWithExpiration?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .validFrom(validFrom?.applyValue({ args0 -> args0 }))
            .validUntil(validUntil?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [Ec2FleetArgs].
 */
@PulumiTagMarker
public class Ec2FleetArgsBuilder internal constructor() {
    private var context: Output? = null

    private var excessCapacityTerminationPolicy: Output? =
        null

    private var launchTemplateConfigs: Output>? =
        null

    private var onDemandOptions: Output? = null

    private var replaceUnhealthyInstances: Output? = null

    private var spotOptions: Output? = null

    private var tagSpecifications: Output>? = null

    private var targetCapacitySpecification: Output? =
        null

    private var terminateInstancesWithExpiration: Output? = null

    private var type: Output? = null

    private var validFrom: Output? = null

    private var validUntil: Output? = null

    /**
     * @param value Reserved.
     */
    @JvmName("vqldbmmsnkbuosye")
    public suspend fun context(`value`: Output) {
        this.context = value
    }

    /**
     * @param value Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
     * Supported only for fleets of type `maintain` .
     */
    @JvmName("hrywyahvfmcbmjxd")
    public suspend fun excessCapacityTerminationPolicy(`value`: Output) {
        this.excessCapacityTerminationPolicy = value
    }

    /**
     * @param value The configuration for the EC2 Fleet.
     */
    @JvmName("rmvwkybilwtrxrmx")
    public suspend fun launchTemplateConfigs(`value`: Output>) {
        this.launchTemplateConfigs = value
    }

    @JvmName("uqynrnvnxpeyfbih")
    public suspend fun launchTemplateConfigs(vararg values: Output) {
        this.launchTemplateConfigs = Output.all(values.asList())
    }

    /**
     * @param values The configuration for the EC2 Fleet.
     */
    @JvmName("yhiwhrswvbyirkat")
    public suspend fun launchTemplateConfigs(values: List>) {
        this.launchTemplateConfigs = Output.all(values)
    }

    /**
     * @param value Describes the configuration of On-Demand Instances in an EC2 Fleet.
     */
    @JvmName("sqqulmubnglksnvt")
    public suspend fun onDemandOptions(`value`: Output) {
        this.onDemandOptions = value
    }

    /**
     * @param value Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type `maintain` . For more information, see [EC2 Fleet health checks](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks) in the *Amazon EC2 User Guide* .
     */
    @JvmName("hsxxvtuilxxxxqpl")
    public suspend fun replaceUnhealthyInstances(`value`: Output) {
        this.replaceUnhealthyInstances = value
    }

    /**
     * @param value Describes the configuration of Spot Instances in an EC2 Fleet.
     */
    @JvmName("isclcmjsnodgybie")
    public suspend fun spotOptions(`value`: Output) {
        this.spotOptions = value
    }

    /**
     * @param value The key-value pair for tagging the EC2 Fleet request on creation. For more information, see [Tag your resources](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) .
     * If the fleet type is `instant` , specify a resource type of `fleet` to tag the fleet or `instance` to tag the instances at launch.
     * If the fleet type is `maintain` or `request` , specify a resource type of `fleet` to tag the fleet. You cannot specify a resource type of `instance` . To tag instances at launch, specify the tags in a [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) .
     */
    @JvmName("vogmtpbyshbgpxek")
    public suspend fun tagSpecifications(`value`: Output>) {
        this.tagSpecifications = value
    }

    @JvmName("wyeasxqodrhuebow")
    public suspend fun tagSpecifications(vararg values: Output) {
        this.tagSpecifications = Output.all(values.asList())
    }

    /**
     * @param values The key-value pair for tagging the EC2 Fleet request on creation. For more information, see [Tag your resources](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) .
     * If the fleet type is `instant` , specify a resource type of `fleet` to tag the fleet or `instance` to tag the instances at launch.
     * If the fleet type is `maintain` or `request` , specify a resource type of `fleet` to tag the fleet. You cannot specify a resource type of `instance` . To tag instances at launch, specify the tags in a [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) .
     */
    @JvmName("hspexcfparpyxxkl")
    public suspend fun tagSpecifications(values: List>) {
        this.tagSpecifications = Output.all(values)
    }

    /**
     * @param value The number of units to request.
     */
    @JvmName("ykfeknivinhoeswg")
    public suspend fun targetCapacitySpecification(`value`: Output) {
        this.targetCapacitySpecification = value
    }

    /**
     * @param value Indicates whether running instances should be terminated when the EC2 Fleet expires.
     */
    @JvmName("flcpkwamnilrnxmx")
    public suspend fun terminateInstancesWithExpiration(`value`: Output) {
        this.terminateInstancesWithExpiration = value
    }

    /**
     * @param value The fleet type. The default value is `maintain` .
     * - `maintain` - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
     * - `request` - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.
     * - `instant` - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.
     * For more information, see [EC2 Fleet request types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-request-type.html) in the *Amazon EC2 User Guide* .
     */
    @JvmName("lqfhekmuxjmwamuc")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value The start date and time of the request, in UTC format (for example, *YYYY* - *MM* - *DD* T *HH* : *MM* : *SS* Z). The default is to start fulfilling the request immediately.
     */
    @JvmName("cejgqcjrhbvuiapa")
    public suspend fun validFrom(`value`: Output) {
        this.validFrom = value
    }

    /**
     * @param value The end date and time of the request, in UTC format (for example, *YYYY* - *MM* - *DD* T *HH* : *MM* : *SS* Z). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.
     */
    @JvmName("icpikmvecsxiggqn")
    public suspend fun validUntil(`value`: Output) {
        this.validUntil = value
    }

    /**
     * @param value Reserved.
     */
    @JvmName("jttdhkvpwekpbnmw")
    public suspend fun context(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.context = mapped
    }

    /**
     * @param value Indicates whether running instances should be terminated if the total target capacity of the EC2 Fleet is decreased below the current size of the EC2 Fleet.
     * Supported only for fleets of type `maintain` .
     */
    @JvmName("svgqqfrnvcnmrpvv")
    public suspend fun excessCapacityTerminationPolicy(`value`: Ec2FleetExcessCapacityTerminationPolicy?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.excessCapacityTerminationPolicy = mapped
    }

    /**
     * @param value The configuration for the EC2 Fleet.
     */
    @JvmName("askpmpxexlfhlqlu")
    public suspend fun launchTemplateConfigs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.launchTemplateConfigs = mapped
    }

    /**
     * @param argument The configuration for the EC2 Fleet.
     */
    @JvmName("mnbnhahsevxliisa")
    public suspend fun launchTemplateConfigs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            Ec2FleetFleetLaunchTemplateConfigRequestArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.launchTemplateConfigs = mapped
    }

    /**
     * @param argument The configuration for the EC2 Fleet.
     */
    @JvmName("ayfrljpgkusijims")
    public suspend fun launchTemplateConfigs(vararg argument: suspend Ec2FleetFleetLaunchTemplateConfigRequestArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            Ec2FleetFleetLaunchTemplateConfigRequestArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.launchTemplateConfigs = mapped
    }

    /**
     * @param argument The configuration for the EC2 Fleet.
     */
    @JvmName("ciriakkenodjyrak")
    public suspend fun launchTemplateConfigs(argument: suspend Ec2FleetFleetLaunchTemplateConfigRequestArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            Ec2FleetFleetLaunchTemplateConfigRequestArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.launchTemplateConfigs = mapped
    }

    /**
     * @param values The configuration for the EC2 Fleet.
     */
    @JvmName("ayrltmghylbljjeb")
    public suspend fun launchTemplateConfigs(vararg values: Ec2FleetFleetLaunchTemplateConfigRequestArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.launchTemplateConfigs = mapped
    }

    /**
     * @param value Describes the configuration of On-Demand Instances in an EC2 Fleet.
     */
    @JvmName("enivvfiqmrxlndfx")
    public suspend fun onDemandOptions(`value`: Ec2FleetOnDemandOptionsRequestArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.onDemandOptions = mapped
    }

    /**
     * @param argument Describes the configuration of On-Demand Instances in an EC2 Fleet.
     */
    @JvmName("hlqyglogsmwowxyt")
    public suspend fun onDemandOptions(argument: suspend Ec2FleetOnDemandOptionsRequestArgsBuilder.() -> Unit) {
        val toBeMapped = Ec2FleetOnDemandOptionsRequestArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.onDemandOptions = mapped
    }

    /**
     * @param value Indicates whether EC2 Fleet should replace unhealthy Spot Instances. Supported only for fleets of type `maintain` . For more information, see [EC2 Fleet health checks](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/manage-ec2-fleet.html#ec2-fleet-health-checks) in the *Amazon EC2 User Guide* .
     */
    @JvmName("qwfuwxtnscjmodun")
    public suspend fun replaceUnhealthyInstances(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.replaceUnhealthyInstances = mapped
    }

    /**
     * @param value Describes the configuration of Spot Instances in an EC2 Fleet.
     */
    @JvmName("tjmgavaeopmetrta")
    public suspend fun spotOptions(`value`: Ec2FleetSpotOptionsRequestArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.spotOptions = mapped
    }

    /**
     * @param argument Describes the configuration of Spot Instances in an EC2 Fleet.
     */
    @JvmName("qvvrrieejogatjyh")
    public suspend fun spotOptions(argument: suspend Ec2FleetSpotOptionsRequestArgsBuilder.() -> Unit) {
        val toBeMapped = Ec2FleetSpotOptionsRequestArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.spotOptions = mapped
    }

    /**
     * @param value The key-value pair for tagging the EC2 Fleet request on creation. For more information, see [Tag your resources](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) .
     * If the fleet type is `instant` , specify a resource type of `fleet` to tag the fleet or `instance` to tag the instances at launch.
     * If the fleet type is `maintain` or `request` , specify a resource type of `fleet` to tag the fleet. You cannot specify a resource type of `instance` . To tag instances at launch, specify the tags in a [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) .
     */
    @JvmName("ffwgaflqvrlivuel")
    public suspend fun tagSpecifications(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagSpecifications = mapped
    }

    /**
     * @param argument The key-value pair for tagging the EC2 Fleet request on creation. For more information, see [Tag your resources](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) .
     * If the fleet type is `instant` , specify a resource type of `fleet` to tag the fleet or `instance` to tag the instances at launch.
     * If the fleet type is `maintain` or `request` , specify a resource type of `fleet` to tag the fleet. You cannot specify a resource type of `instance` . To tag instances at launch, specify the tags in a [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) .
     */
    @JvmName("qqowojgvwjglbphr")
    public suspend fun tagSpecifications(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            Ec2FleetTagSpecificationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tagSpecifications = mapped
    }

    /**
     * @param argument The key-value pair for tagging the EC2 Fleet request on creation. For more information, see [Tag your resources](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) .
     * If the fleet type is `instant` , specify a resource type of `fleet` to tag the fleet or `instance` to tag the instances at launch.
     * If the fleet type is `maintain` or `request` , specify a resource type of `fleet` to tag the fleet. You cannot specify a resource type of `instance` . To tag instances at launch, specify the tags in a [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) .
     */
    @JvmName("yrdououcrqoluceq")
    public suspend fun tagSpecifications(vararg argument: suspend Ec2FleetTagSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            Ec2FleetTagSpecificationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tagSpecifications = mapped
    }

    /**
     * @param argument The key-value pair for tagging the EC2 Fleet request on creation. For more information, see [Tag your resources](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) .
     * If the fleet type is `instant` , specify a resource type of `fleet` to tag the fleet or `instance` to tag the instances at launch.
     * If the fleet type is `maintain` or `request` , specify a resource type of `fleet` to tag the fleet. You cannot specify a resource type of `instance` . To tag instances at launch, specify the tags in a [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) .
     */
    @JvmName("mkshlikmkamhieai")
    public suspend fun tagSpecifications(argument: suspend Ec2FleetTagSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            Ec2FleetTagSpecificationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.tagSpecifications = mapped
    }

    /**
     * @param values The key-value pair for tagging the EC2 Fleet request on creation. For more information, see [Tag your resources](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html#tag-resources) .
     * If the fleet type is `instant` , specify a resource type of `fleet` to tag the fleet or `instance` to tag the instances at launch.
     * If the fleet type is `maintain` or `request` , specify a resource type of `fleet` to tag the fleet. You cannot specify a resource type of `instance` . To tag instances at launch, specify the tags in a [launch template](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-templates.html#create-launch-template) .
     */
    @JvmName("agqttsmtcomxexfr")
    public suspend fun tagSpecifications(vararg values: Ec2FleetTagSpecificationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tagSpecifications = mapped
    }

    /**
     * @param value The number of units to request.
     */
    @JvmName("oloteuinugwrycwy")
    public suspend fun targetCapacitySpecification(`value`: Ec2FleetTargetCapacitySpecificationRequestArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.targetCapacitySpecification = mapped
    }

    /**
     * @param argument The number of units to request.
     */
    @JvmName("tgajsdruoobphsff")
    public suspend fun targetCapacitySpecification(argument: suspend Ec2FleetTargetCapacitySpecificationRequestArgsBuilder.() -> Unit) {
        val toBeMapped = Ec2FleetTargetCapacitySpecificationRequestArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.targetCapacitySpecification = mapped
    }

    /**
     * @param value Indicates whether running instances should be terminated when the EC2 Fleet expires.
     */
    @JvmName("ubipalygwcoxoeqe")
    public suspend fun terminateInstancesWithExpiration(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.terminateInstancesWithExpiration = mapped
    }

    /**
     * @param value The fleet type. The default value is `maintain` .
     * - `maintain` - The EC2 Fleet places an asynchronous request for your desired capacity, and continues to maintain your desired Spot capacity by replenishing interrupted Spot Instances.
     * - `request` - The EC2 Fleet places an asynchronous one-time request for your desired capacity, but does submit Spot requests in alternative capacity pools if Spot capacity is unavailable, and does not maintain Spot capacity if Spot Instances are interrupted.
     * - `instant` - The EC2 Fleet places a synchronous one-time request for your desired capacity, and returns errors for any instances that could not be launched.
     * For more information, see [EC2 Fleet request types](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-fleet-request-type.html) in the *Amazon EC2 User Guide* .
     */
    @JvmName("qtuugbpepnaagwrg")
    public suspend fun type(`value`: Ec2FleetType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    /**
     * @param value The start date and time of the request, in UTC format (for example, *YYYY* - *MM* - *DD* T *HH* : *MM* : *SS* Z). The default is to start fulfilling the request immediately.
     */
    @JvmName("vnvndeagevbrandn")
    public suspend fun validFrom(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validFrom = mapped
    }

    /**
     * @param value The end date and time of the request, in UTC format (for example, *YYYY* - *MM* - *DD* T *HH* : *MM* : *SS* Z). At this point, no new EC2 Fleet requests are placed or able to fulfill the request. If no value is specified, the request remains until you cancel it.
     */
    @JvmName("evqlpgnhmnhfpxft")
    public suspend fun validUntil(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.validUntil = mapped
    }

    internal fun build(): Ec2FleetArgs = Ec2FleetArgs(
        context = context,
        excessCapacityTerminationPolicy = excessCapacityTerminationPolicy,
        launchTemplateConfigs = launchTemplateConfigs,
        onDemandOptions = onDemandOptions,
        replaceUnhealthyInstances = replaceUnhealthyInstances,
        spotOptions = spotOptions,
        tagSpecifications = tagSpecifications,
        targetCapacitySpecification = targetCapacitySpecification,
        terminateInstancesWithExpiration = terminateInstancesWithExpiration,
        type = type,
        validFrom = validFrom,
        validUntil = validUntil,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy