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

com.pulumi.awsnative.ec2.kotlin.inputs.SpotFleetLaunchSpecificationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.ec2.kotlin.inputs

import com.pulumi.awsnative.ec2.inputs.SpotFleetLaunchSpecificationArgs.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 com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property blockDeviceMappings One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
 * @property ebsOptimized Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
 * Default: `false`
 * @property iamInstanceProfile The IAM instance profile.
 * @property imageId The ID of the AMI.
 * @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.
 * @property kernelId The ID of the kernel.
 * @property keyName The name of the key pair.
 * @property monitoring Enable or disable monitoring for the instances.
 * @property networkInterfaces The network interfaces.
 * @property placement The placement information.
 * @property ramdiskId The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the AWS Resource Center and search for the kernel ID.
 * @property securityGroups The security groups.
 * If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
 * @property spotPrice 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 subnetId The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
 * If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
 * @property tagSpecifications The tags to apply during creation.
 * @property userData The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.
 * @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 `lowestPrice` and `priceCapacityOptimized` 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 SpotFleetLaunchSpecificationArgs(
    public val blockDeviceMappings: Output>? = null,
    public val ebsOptimized: Output? = null,
    public val iamInstanceProfile: Output? = null,
    public val imageId: Output,
    public val instanceRequirements: Output? = null,
    public val instanceType: Output? = null,
    public val kernelId: Output? = null,
    public val keyName: Output? = null,
    public val monitoring: Output? = null,
    public val networkInterfaces: Output>? =
        null,
    public val placement: Output? = null,
    public val ramdiskId: Output? = null,
    public val securityGroups: Output>? = null,
    public val spotPrice: Output? = null,
    public val subnetId: Output? = null,
    public val tagSpecifications: Output>? = null,
    public val userData: Output? = null,
    public val weightedCapacity: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.inputs.SpotFleetLaunchSpecificationArgs =
        com.pulumi.awsnative.ec2.inputs.SpotFleetLaunchSpecificationArgs.builder()
            .blockDeviceMappings(
                blockDeviceMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .ebsOptimized(ebsOptimized?.applyValue({ args0 -> args0 }))
            .iamInstanceProfile(
                iamInstanceProfile?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .imageId(imageId.applyValue({ args0 -> args0 }))
            .instanceRequirements(
                instanceRequirements?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .instanceType(instanceType?.applyValue({ args0 -> args0 }))
            .kernelId(kernelId?.applyValue({ args0 -> args0 }))
            .keyName(keyName?.applyValue({ args0 -> args0 }))
            .monitoring(monitoring?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .networkInterfaces(
                networkInterfaces?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .placement(placement?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .ramdiskId(ramdiskId?.applyValue({ args0 -> args0 }))
            .securityGroups(
                securityGroups?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .spotPrice(spotPrice?.applyValue({ args0 -> args0 }))
            .subnetId(subnetId?.applyValue({ args0 -> args0 }))
            .tagSpecifications(
                tagSpecifications?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .userData(userData?.applyValue({ args0 -> args0 }))
            .weightedCapacity(weightedCapacity?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SpotFleetLaunchSpecificationArgs].
 */
@PulumiTagMarker
public class SpotFleetLaunchSpecificationArgsBuilder internal constructor() {
    private var blockDeviceMappings: Output>? = null

    private var ebsOptimized: Output? = null

    private var iamInstanceProfile: Output? = null

    private var imageId: Output? = null

    private var instanceRequirements: Output? = null

    private var instanceType: Output? = null

    private var kernelId: Output? = null

    private var keyName: Output? = null

    private var monitoring: Output? = null

    private var networkInterfaces: Output>? =
        null

    private var placement: Output? = null

    private var ramdiskId: Output? = null

    private var securityGroups: Output>? = null

    private var spotPrice: Output? = null

    private var subnetId: Output? = null

    private var tagSpecifications: Output>? = null

    private var userData: Output? = null

    private var weightedCapacity: Output? = null

    /**
     * @param value One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
     */
    @JvmName("hqikelyunnouxryk")
    public suspend fun blockDeviceMappings(`value`: Output>) {
        this.blockDeviceMappings = value
    }

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

    /**
     * @param values One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
     */
    @JvmName("atcysoevqxofdswv")
    public suspend fun blockDeviceMappings(values: List>) {
        this.blockDeviceMappings = Output.all(values)
    }

    /**
     * @param value Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
     * Default: `false`
     */
    @JvmName("etcpbclrnedytdpg")
    public suspend fun ebsOptimized(`value`: Output) {
        this.ebsOptimized = value
    }

    /**
     * @param value The IAM instance profile.
     */
    @JvmName("dveixhetclwgfscb")
    public suspend fun iamInstanceProfile(`value`: Output) {
        this.iamInstanceProfile = value
    }

    /**
     * @param value The ID of the AMI.
     */
    @JvmName("fscxulibdyqrygtp")
    public suspend fun imageId(`value`: Output) {
        this.imageId = 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("koyhconwnhmgmusi")
    public suspend fun instanceRequirements(`value`: Output) {
        this.instanceRequirements = value
    }

    /**
     * @param value The instance type.
     */
    @JvmName("fgjapktnjahblrbt")
    public suspend fun instanceType(`value`: Output) {
        this.instanceType = value
    }

    /**
     * @param value The ID of the kernel.
     */
    @JvmName("olsvvfyxfgyvgrpg")
    public suspend fun kernelId(`value`: Output) {
        this.kernelId = value
    }

    /**
     * @param value The name of the key pair.
     */
    @JvmName("qmcvltyqwocvqfid")
    public suspend fun keyName(`value`: Output) {
        this.keyName = value
    }

    /**
     * @param value Enable or disable monitoring for the instances.
     */
    @JvmName("qhdlewrncwfqdbhj")
    public suspend fun monitoring(`value`: Output) {
        this.monitoring = value
    }

    /**
     * @param value The network interfaces.
     */
    @JvmName("aejktvgpbinlsqkp")
    public suspend fun networkInterfaces(`value`: Output>) {
        this.networkInterfaces = value
    }

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

    /**
     * @param values The network interfaces.
     */
    @JvmName("sosafsgjeabbpfqw")
    public suspend fun networkInterfaces(values: List>) {
        this.networkInterfaces = Output.all(values)
    }

    /**
     * @param value The placement information.
     */
    @JvmName("lkebbflbvkhsolgn")
    public suspend fun placement(`value`: Output) {
        this.placement = value
    }

    /**
     * @param value The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the AWS Resource Center and search for the kernel ID.
     */
    @JvmName("fmwemuoutbnuvrpo")
    public suspend fun ramdiskId(`value`: Output) {
        this.ramdiskId = value
    }

    /**
     * @param value The security groups.
     * If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
     */
    @JvmName("vitktrifdbmrtotd")
    public suspend fun securityGroups(`value`: Output>) {
        this.securityGroups = value
    }

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

    /**
     * @param values The security groups.
     * If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
     */
    @JvmName("jrbjpbwyoyucgxxp")
    public suspend fun securityGroups(values: List>) {
        this.securityGroups = Output.all(values)
    }

    /**
     * @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("ecnnpwyfmdcvtqcm")
    public suspend fun spotPrice(`value`: Output) {
        this.spotPrice = value
    }

    /**
     * @param value The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
     * If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
     */
    @JvmName("etvxrurxlvmxqlkv")
    public suspend fun subnetId(`value`: Output) {
        this.subnetId = value
    }

    /**
     * @param value The tags to apply during creation.
     */
    @JvmName("jdeavhqwekupfpfp")
    public suspend fun tagSpecifications(`value`: Output>) {
        this.tagSpecifications = value
    }

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

    /**
     * @param values The tags to apply during creation.
     */
    @JvmName("meajfclfiflkhhot")
    public suspend fun tagSpecifications(values: List>) {
        this.tagSpecifications = Output.all(values)
    }

    /**
     * @param value The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.
     */
    @JvmName("jpmdaueaumbtdbis")
    public suspend fun userData(`value`: Output) {
        this.userData = 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 `lowestPrice` and `priceCapacityOptimized` 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("bimpsugaqbweghos")
    public suspend fun weightedCapacity(`value`: Output) {
        this.weightedCapacity = value
    }

    /**
     * @param value One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
     */
    @JvmName("juxkcwttgnvstpag")
    public suspend fun blockDeviceMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blockDeviceMappings = mapped
    }

    /**
     * @param argument One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
     */
    @JvmName("jiydrywdqepnyspw")
    public suspend fun blockDeviceMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SpotFleetBlockDeviceMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.blockDeviceMappings = mapped
    }

    /**
     * @param argument One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
     */
    @JvmName("hrwtwxipubtkbyqg")
    public suspend fun blockDeviceMappings(vararg argument: suspend SpotFleetBlockDeviceMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SpotFleetBlockDeviceMappingArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.blockDeviceMappings = mapped
    }

    /**
     * @param argument One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
     */
    @JvmName("oxuhbqccaggimwkn")
    public suspend fun blockDeviceMappings(argument: suspend SpotFleetBlockDeviceMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SpotFleetBlockDeviceMappingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.blockDeviceMappings = mapped
    }

    /**
     * @param values One or more block devices that are mapped to the Spot Instances. You can't specify both a snapshot ID and an encryption value. This is because only blank volumes can be encrypted on creation. If a snapshot is the basis for a volume, it is not blank and its encryption status is used for the volume encryption status.
     */
    @JvmName("cibofacdhdfdxcsy")
    public suspend fun blockDeviceMappings(vararg values: SpotFleetBlockDeviceMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.blockDeviceMappings = mapped
    }

    /**
     * @param value Indicates whether the instances are optimized for EBS I/O. This optimization provides dedicated throughput to Amazon EBS and an optimized configuration stack to provide optimal EBS I/O performance. This optimization isn't available with all instance types. Additional usage charges apply when using an EBS Optimized instance.
     * Default: `false`
     */
    @JvmName("ucfbftfnphxxpktk")
    public suspend fun ebsOptimized(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ebsOptimized = mapped
    }

    /**
     * @param value The IAM instance profile.
     */
    @JvmName("yydpvnyfufermctq")
    public suspend fun iamInstanceProfile(`value`: SpotFleetIamInstanceProfileSpecificationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.iamInstanceProfile = mapped
    }

    /**
     * @param argument The IAM instance profile.
     */
    @JvmName("delovjkyplkrycno")
    public suspend fun iamInstanceProfile(argument: suspend SpotFleetIamInstanceProfileSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = SpotFleetIamInstanceProfileSpecificationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.iamInstanceProfile = mapped
    }

    /**
     * @param value The ID of the AMI.
     */
    @JvmName("tdgebsscxjnapttu")
    public suspend fun imageId(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.imageId = 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("pqpcefchhdflikpl")
    public suspend fun instanceRequirements(`value`: SpotFleetInstanceRequirementsRequestArgs?) {
        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("ecpkievkqfkvxayc")
    public suspend fun instanceRequirements(argument: suspend SpotFleetInstanceRequirementsRequestArgsBuilder.() -> Unit) {
        val toBeMapped = SpotFleetInstanceRequirementsRequestArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.instanceRequirements = mapped
    }

    /**
     * @param value The instance type.
     */
    @JvmName("cquvxjojhtjcgony")
    public suspend fun instanceType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceType = mapped
    }

    /**
     * @param value The ID of the kernel.
     */
    @JvmName("qplkwksmwjueilgm")
    public suspend fun kernelId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kernelId = mapped
    }

    /**
     * @param value The name of the key pair.
     */
    @JvmName("qoyilqdkkyccqmvi")
    public suspend fun keyName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.keyName = mapped
    }

    /**
     * @param value Enable or disable monitoring for the instances.
     */
    @JvmName("ibbnmomtkqsmfhon")
    public suspend fun monitoring(`value`: SpotFleetMonitoringArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.monitoring = mapped
    }

    /**
     * @param argument Enable or disable monitoring for the instances.
     */
    @JvmName("fhtnkfgqekyooveu")
    public suspend fun monitoring(argument: suspend SpotFleetMonitoringArgsBuilder.() -> Unit) {
        val toBeMapped = SpotFleetMonitoringArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.monitoring = mapped
    }

    /**
     * @param value The network interfaces.
     */
    @JvmName("yxtqhumebkogaolv")
    public suspend fun networkInterfaces(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.networkInterfaces = mapped
    }

    /**
     * @param argument The network interfaces.
     */
    @JvmName("dsdsoparjolxmpou")
    public suspend fun networkInterfaces(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SpotFleetInstanceNetworkInterfaceSpecificationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.networkInterfaces = mapped
    }

    /**
     * @param argument The network interfaces.
     */
    @JvmName("xgooyeykidrnbhos")
    public suspend fun networkInterfaces(vararg argument: suspend SpotFleetInstanceNetworkInterfaceSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SpotFleetInstanceNetworkInterfaceSpecificationArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.networkInterfaces = mapped
    }

    /**
     * @param argument The network interfaces.
     */
    @JvmName("wvtagnpgjpptafoa")
    public suspend fun networkInterfaces(argument: suspend SpotFleetInstanceNetworkInterfaceSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SpotFleetInstanceNetworkInterfaceSpecificationArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.networkInterfaces = mapped
    }

    /**
     * @param values The network interfaces.
     */
    @JvmName("jljjgtvwkxcaekhf")
    public suspend fun networkInterfaces(vararg values: SpotFleetInstanceNetworkInterfaceSpecificationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.networkInterfaces = mapped
    }

    /**
     * @param value The placement information.
     */
    @JvmName("nprosoqxneyutmae")
    public suspend fun placement(`value`: SpotFleetSpotPlacementArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.placement = mapped
    }

    /**
     * @param argument The placement information.
     */
    @JvmName("wllbrqguvtgsbygg")
    public suspend fun placement(argument: suspend SpotFleetSpotPlacementArgsBuilder.() -> Unit) {
        val toBeMapped = SpotFleetSpotPlacementArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.placement = mapped
    }

    /**
     * @param value The ID of the RAM disk. Some kernels require additional drivers at launch. Check the kernel requirements for information about whether you need to specify a RAM disk. To find kernel requirements, refer to the AWS Resource Center and search for the kernel ID.
     */
    @JvmName("jptkcsoqjkgxnewp")
    public suspend fun ramdiskId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ramdiskId = mapped
    }

    /**
     * @param value The security groups.
     * If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
     */
    @JvmName("kbybrgosuajwsrob")
    public suspend fun securityGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param argument The security groups.
     * If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
     */
    @JvmName("gahidycyehiqhpte")
    public suspend fun securityGroups(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SpotFleetGroupIdentifierArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.securityGroups = mapped
    }

    /**
     * @param argument The security groups.
     * If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
     */
    @JvmName("cpfoyuryycaucdqg")
    public suspend fun securityGroups(vararg argument: suspend SpotFleetGroupIdentifierArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SpotFleetGroupIdentifierArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.securityGroups = mapped
    }

    /**
     * @param argument The security groups.
     * If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
     */
    @JvmName("dewaigritqnauqfo")
    public suspend fun securityGroups(argument: suspend SpotFleetGroupIdentifierArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SpotFleetGroupIdentifierArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.securityGroups = mapped
    }

    /**
     * @param values The security groups.
     * If you specify a network interface, you must specify any security groups as part of the network interface instead of using this parameter.
     */
    @JvmName("sbeammmcruldivkg")
    public suspend fun securityGroups(vararg values: SpotFleetGroupIdentifierArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroups = 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("uyvdltsnnbynvyjj")
    public suspend fun spotPrice(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.spotPrice = mapped
    }

    /**
     * @param value The IDs of the subnets in which to launch the instances. To specify multiple subnets, separate them using commas; for example, "subnet-1234abcdeexample1, subnet-0987cdef6example2".
     * If you specify a network interface, you must specify any subnets as part of the network interface instead of using this parameter.
     */
    @JvmName("xeexowiaunvrggom")
    public suspend fun subnetId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnetId = mapped
    }

    /**
     * @param value The tags to apply during creation.
     */
    @JvmName("kqhgqaqcheapxcqc")
    public suspend fun tagSpecifications(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagSpecifications = mapped
    }

    /**
     * @param argument The tags to apply during creation.
     */
    @JvmName("kcetqgeahpgftvde")
    public suspend fun tagSpecifications(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            SpotFleetTagSpecificationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tagSpecifications = mapped
    }

    /**
     * @param argument The tags to apply during creation.
     */
    @JvmName("dunufglkvkujxdxx")
    public suspend fun tagSpecifications(vararg argument: suspend SpotFleetTagSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            SpotFleetTagSpecificationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.tagSpecifications = mapped
    }

    /**
     * @param argument The tags to apply during creation.
     */
    @JvmName("biclcgqcsvjjaqsv")
    public suspend fun tagSpecifications(argument: suspend SpotFleetTagSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            SpotFleetTagSpecificationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.tagSpecifications = mapped
    }

    /**
     * @param values The tags to apply during creation.
     */
    @JvmName("prwlcfxehrybasbq")
    public suspend fun tagSpecifications(vararg values: SpotFleetTagSpecificationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tagSpecifications = mapped
    }

    /**
     * @param value The base64-encoded user data that instances use when starting up. User data is limited to 16 KB.
     */
    @JvmName("hpilshvfsuwhglpw")
    public suspend fun userData(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userData = 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 `lowestPrice` and `priceCapacityOptimized` 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("rqmsnmldhetlnyyq")
    public suspend fun weightedCapacity(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.weightedCapacity = mapped
    }

    internal fun build(): SpotFleetLaunchSpecificationArgs = SpotFleetLaunchSpecificationArgs(
        blockDeviceMappings = blockDeviceMappings,
        ebsOptimized = ebsOptimized,
        iamInstanceProfile = iamInstanceProfile,
        imageId = imageId ?: throw PulumiNullFieldException("imageId"),
        instanceRequirements = instanceRequirements,
        instanceType = instanceType,
        kernelId = kernelId,
        keyName = keyName,
        monitoring = monitoring,
        networkInterfaces = networkInterfaces,
        placement = placement,
        ramdiskId = ramdiskId,
        securityGroups = securityGroups,
        spotPrice = spotPrice,
        subnetId = subnetId,
        tagSpecifications = tagSpecifications,
        userData = userData,
        weightedCapacity = weightedCapacity,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy