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

com.pulumi.awsnative.autoscaling.kotlin.LaunchConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.autoscaling.kotlin

import com.pulumi.awsnative.autoscaling.LaunchConfigurationArgs.builder
import com.pulumi.awsnative.autoscaling.kotlin.inputs.LaunchConfigurationBlockDeviceMappingArgs
import com.pulumi.awsnative.autoscaling.kotlin.inputs.LaunchConfigurationBlockDeviceMappingArgsBuilder
import com.pulumi.awsnative.autoscaling.kotlin.inputs.LaunchConfigurationMetadataOptionsArgs
import com.pulumi.awsnative.autoscaling.kotlin.inputs.LaunchConfigurationMetadataOptionsArgsBuilder
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

/**
 * The AWS::AutoScaling::LaunchConfiguration resource specifies the launch configuration that can be used by an Auto Scaling group to configure Amazon EC2 instances.
 * @property associatePublicIpAddress For Auto Scaling groups that are running in a virtual private cloud (VPC), specifies whether to assign a public IP address to the group's instances.
 * @property blockDeviceMappings Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
 * @property classicLinkVpcId The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
 * @property classicLinkVpcSecurityGroups The IDs of one or more security groups for the VPC that you specified in the ClassicLinkVPCId property.
 * @property ebsOptimized Specifies whether the launch configuration is optimized for EBS I/O (true) or not (false).
 * @property iamInstanceProfile Provides the name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The instance profile contains the IAM role.
 * @property imageId Provides the unique ID of the Amazon Machine Image (AMI) that was assigned during registration.
 * @property instanceId The ID of the Amazon EC2 instance you want to use to create the launch configuration.
 * @property instanceMonitoring Controls whether instances in this group are launched with detailed (true) or basic (false) monitoring.
 * @property instanceType Specifies the instance type of the EC2 instance.
 * @property kernelId Provides the ID of the kernel associated with the EC2 AMI.
 * @property keyName Provides the name of the EC2 key pair.
 * @property launchConfigurationName The name of the launch configuration. This name must be unique per Region per account.
 * @property metadataOptions The metadata options for the instances.
 * @property placementTenancy The tenancy of the instance, either default or dedicated.
 * @property ramDiskId The ID of the RAM disk to select.
 * @property securityGroups A list that contains the security groups to assign to the instances in the Auto Scaling group.
 * @property spotPrice The maximum hourly price you are willing to pay for any Spot Instances launched to fulfill the request.
 * @property userData The Base64-encoded user data to make available to the launched EC2 instances.
 */
public data class LaunchConfigurationArgs(
    public val associatePublicIpAddress: Output? = null,
    public val blockDeviceMappings: Output>? = null,
    public val classicLinkVpcId: Output? = null,
    public val classicLinkVpcSecurityGroups: Output>? = null,
    public val ebsOptimized: Output? = null,
    public val iamInstanceProfile: Output? = null,
    public val imageId: Output? = null,
    public val instanceId: Output? = null,
    public val instanceMonitoring: Output? = null,
    public val instanceType: Output? = null,
    public val kernelId: Output? = null,
    public val keyName: Output? = null,
    public val launchConfigurationName: Output? = null,
    public val metadataOptions: Output? = null,
    public val placementTenancy: Output? = null,
    public val ramDiskId: Output? = null,
    public val securityGroups: Output>? = null,
    public val spotPrice: Output? = null,
    public val userData: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.autoscaling.LaunchConfigurationArgs =
        com.pulumi.awsnative.autoscaling.LaunchConfigurationArgs.builder()
            .associatePublicIpAddress(associatePublicIpAddress?.applyValue({ args0 -> args0 }))
            .blockDeviceMappings(
                blockDeviceMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .classicLinkVpcId(classicLinkVpcId?.applyValue({ args0 -> args0 }))
            .classicLinkVpcSecurityGroups(
                classicLinkVpcSecurityGroups?.applyValue({ args0 ->
                    args0.map({ args0 -> args0 })
                }),
            )
            .ebsOptimized(ebsOptimized?.applyValue({ args0 -> args0 }))
            .iamInstanceProfile(iamInstanceProfile?.applyValue({ args0 -> args0 }))
            .imageId(imageId?.applyValue({ args0 -> args0 }))
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .instanceMonitoring(instanceMonitoring?.applyValue({ args0 -> args0 }))
            .instanceType(instanceType?.applyValue({ args0 -> args0 }))
            .kernelId(kernelId?.applyValue({ args0 -> args0 }))
            .keyName(keyName?.applyValue({ args0 -> args0 }))
            .launchConfigurationName(launchConfigurationName?.applyValue({ args0 -> args0 }))
            .metadataOptions(metadataOptions?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .placementTenancy(placementTenancy?.applyValue({ args0 -> args0 }))
            .ramDiskId(ramDiskId?.applyValue({ args0 -> args0 }))
            .securityGroups(securityGroups?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .spotPrice(spotPrice?.applyValue({ args0 -> args0 }))
            .userData(userData?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [LaunchConfigurationArgs].
 */
@PulumiTagMarker
public class LaunchConfigurationArgsBuilder internal constructor() {
    private var associatePublicIpAddress: Output? = null

    private var blockDeviceMappings: Output>? = null

    private var classicLinkVpcId: Output? = null

    private var classicLinkVpcSecurityGroups: Output>? = null

    private var ebsOptimized: Output? = null

    private var iamInstanceProfile: Output? = null

    private var imageId: Output? = null

    private var instanceId: Output? = null

    private var instanceMonitoring: Output? = null

    private var instanceType: Output? = null

    private var kernelId: Output? = null

    private var keyName: Output? = null

    private var launchConfigurationName: Output? = null

    private var metadataOptions: Output? = null

    private var placementTenancy: Output? = null

    private var ramDiskId: Output? = null

    private var securityGroups: Output>? = null

    private var spotPrice: Output? = null

    private var userData: Output? = null

    /**
     * @param value For Auto Scaling groups that are running in a virtual private cloud (VPC), specifies whether to assign a public IP address to the group's instances.
     */
    @JvmName("fngjqqjoclpxkyky")
    public suspend fun associatePublicIpAddress(`value`: Output) {
        this.associatePublicIpAddress = value
    }

    /**
     * @param value Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
     */
    @JvmName("gtyqdkdinltmuheh")
    public suspend fun blockDeviceMappings(`value`: Output>) {
        this.blockDeviceMappings = value
    }

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

    /**
     * @param values Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
     */
    @JvmName("cfpgfjycabhslcop")
    public suspend fun blockDeviceMappings(values: List>) {
        this.blockDeviceMappings = Output.all(values)
    }

    /**
     * @param value The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
     */
    @JvmName("vesxryxrysvytoer")
    public suspend fun classicLinkVpcId(`value`: Output) {
        this.classicLinkVpcId = value
    }

    /**
     * @param value The IDs of one or more security groups for the VPC that you specified in the ClassicLinkVPCId property.
     */
    @JvmName("ycmcdsvwqvbvuhlm")
    public suspend fun classicLinkVpcSecurityGroups(`value`: Output>) {
        this.classicLinkVpcSecurityGroups = value
    }

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

    /**
     * @param values The IDs of one or more security groups for the VPC that you specified in the ClassicLinkVPCId property.
     */
    @JvmName("hjnvbcofvqworlkh")
    public suspend fun classicLinkVpcSecurityGroups(values: List>) {
        this.classicLinkVpcSecurityGroups = Output.all(values)
    }

    /**
     * @param value Specifies whether the launch configuration is optimized for EBS I/O (true) or not (false).
     */
    @JvmName("vkrcnufjrxdwjrtk")
    public suspend fun ebsOptimized(`value`: Output) {
        this.ebsOptimized = value
    }

    /**
     * @param value Provides the name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The instance profile contains the IAM role.
     */
    @JvmName("lyxutuvacaxiowlo")
    public suspend fun iamInstanceProfile(`value`: Output) {
        this.iamInstanceProfile = value
    }

    /**
     * @param value Provides the unique ID of the Amazon Machine Image (AMI) that was assigned during registration.
     */
    @JvmName("iictjrivrbljsfvr")
    public suspend fun imageId(`value`: Output) {
        this.imageId = value
    }

    /**
     * @param value The ID of the Amazon EC2 instance you want to use to create the launch configuration.
     */
    @JvmName("icseckwetgpdchnu")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

    /**
     * @param value Controls whether instances in this group are launched with detailed (true) or basic (false) monitoring.
     */
    @JvmName("epqbipdxoftqryei")
    public suspend fun instanceMonitoring(`value`: Output) {
        this.instanceMonitoring = value
    }

    /**
     * @param value Specifies the instance type of the EC2 instance.
     */
    @JvmName("cemtkkwyswvtlwtc")
    public suspend fun instanceType(`value`: Output) {
        this.instanceType = value
    }

    /**
     * @param value Provides the ID of the kernel associated with the EC2 AMI.
     */
    @JvmName("hnjioreygoexluoe")
    public suspend fun kernelId(`value`: Output) {
        this.kernelId = value
    }

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

    /**
     * @param value The name of the launch configuration. This name must be unique per Region per account.
     */
    @JvmName("aytxlmwixqtxjxqm")
    public suspend fun launchConfigurationName(`value`: Output) {
        this.launchConfigurationName = value
    }

    /**
     * @param value The metadata options for the instances.
     */
    @JvmName("wmfsvqwkyniavoix")
    public suspend fun metadataOptions(`value`: Output) {
        this.metadataOptions = value
    }

    /**
     * @param value The tenancy of the instance, either default or dedicated.
     */
    @JvmName("knxwutrxrgidiqrc")
    public suspend fun placementTenancy(`value`: Output) {
        this.placementTenancy = value
    }

    /**
     * @param value The ID of the RAM disk to select.
     */
    @JvmName("rfycyljpttiavenj")
    public suspend fun ramDiskId(`value`: Output) {
        this.ramDiskId = value
    }

    /**
     * @param value A list that contains the security groups to assign to the instances in the Auto Scaling group.
     */
    @JvmName("xxdvhaqrgqweuvit")
    public suspend fun securityGroups(`value`: Output>) {
        this.securityGroups = value
    }

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

    /**
     * @param values A list that contains the security groups to assign to the instances in the Auto Scaling group.
     */
    @JvmName("kwdlymtlagjrlask")
    public suspend fun securityGroups(values: List>) {
        this.securityGroups = Output.all(values)
    }

    /**
     * @param value The maximum hourly price you are willing to pay for any Spot Instances launched to fulfill the request.
     */
    @JvmName("xvikrulynqyxsofi")
    public suspend fun spotPrice(`value`: Output) {
        this.spotPrice = value
    }

    /**
     * @param value The Base64-encoded user data to make available to the launched EC2 instances.
     */
    @JvmName("bavmxblypomobvkc")
    public suspend fun userData(`value`: Output) {
        this.userData = value
    }

    /**
     * @param value For Auto Scaling groups that are running in a virtual private cloud (VPC), specifies whether to assign a public IP address to the group's instances.
     */
    @JvmName("kdiopcejpubaynfo")
    public suspend fun associatePublicIpAddress(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.associatePublicIpAddress = mapped
    }

    /**
     * @param value Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
     */
    @JvmName("hxpmbmsvkwwniyre")
    public suspend fun blockDeviceMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blockDeviceMappings = mapped
    }

    /**
     * @param argument Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
     */
    @JvmName("egmurbwimwifewqm")
    public suspend fun blockDeviceMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            LaunchConfigurationBlockDeviceMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.blockDeviceMappings = mapped
    }

    /**
     * @param argument Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
     */
    @JvmName("wjaqodblpmyydvrg")
    public suspend fun blockDeviceMappings(vararg argument: suspend LaunchConfigurationBlockDeviceMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            LaunchConfigurationBlockDeviceMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.blockDeviceMappings = mapped
    }

    /**
     * @param argument Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
     */
    @JvmName("whvmpklpfwwvmjtg")
    public suspend fun blockDeviceMappings(argument: suspend LaunchConfigurationBlockDeviceMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            LaunchConfigurationBlockDeviceMappingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.blockDeviceMappings = mapped
    }

    /**
     * @param values Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
     */
    @JvmName("pveqrklfrnhejdoh")
    public suspend fun blockDeviceMappings(vararg values: LaunchConfigurationBlockDeviceMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.blockDeviceMappings = mapped
    }

    /**
     * @param value The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
     */
    @JvmName("rncdfibitieohqnn")
    public suspend fun classicLinkVpcId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.classicLinkVpcId = mapped
    }

    /**
     * @param value The IDs of one or more security groups for the VPC that you specified in the ClassicLinkVPCId property.
     */
    @JvmName("rnmsyvfripxilwxs")
    public suspend fun classicLinkVpcSecurityGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.classicLinkVpcSecurityGroups = mapped
    }

    /**
     * @param values The IDs of one or more security groups for the VPC that you specified in the ClassicLinkVPCId property.
     */
    @JvmName("eivdfcavhhegchck")
    public suspend fun classicLinkVpcSecurityGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.classicLinkVpcSecurityGroups = mapped
    }

    /**
     * @param value Specifies whether the launch configuration is optimized for EBS I/O (true) or not (false).
     */
    @JvmName("rcrvjgepasckbqsa")
    public suspend fun ebsOptimized(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ebsOptimized = mapped
    }

    /**
     * @param value Provides the name or the Amazon Resource Name (ARN) of the instance profile associated with the IAM role for the instance. The instance profile contains the IAM role.
     */
    @JvmName("yixumqdyowofvbfj")
    public suspend fun iamInstanceProfile(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.iamInstanceProfile = mapped
    }

    /**
     * @param value Provides the unique ID of the Amazon Machine Image (AMI) that was assigned during registration.
     */
    @JvmName("umxiqstshsyxjlgq")
    public suspend fun imageId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageId = mapped
    }

    /**
     * @param value The ID of the Amazon EC2 instance you want to use to create the launch configuration.
     */
    @JvmName("ghlgisentwcchang")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

    /**
     * @param value Controls whether instances in this group are launched with detailed (true) or basic (false) monitoring.
     */
    @JvmName("cnsddyrgagypwhkw")
    public suspend fun instanceMonitoring(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceMonitoring = mapped
    }

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

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

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

    /**
     * @param value The name of the launch configuration. This name must be unique per Region per account.
     */
    @JvmName("qwhbtxjxlctxufjj")
    public suspend fun launchConfigurationName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.launchConfigurationName = mapped
    }

    /**
     * @param value The metadata options for the instances.
     */
    @JvmName("wmubholtmheoixlu")
    public suspend fun metadataOptions(`value`: LaunchConfigurationMetadataOptionsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadataOptions = mapped
    }

    /**
     * @param argument The metadata options for the instances.
     */
    @JvmName("bwoafwycqabwdkma")
    public suspend fun metadataOptions(argument: suspend LaunchConfigurationMetadataOptionsArgsBuilder.() -> Unit) {
        val toBeMapped = LaunchConfigurationMetadataOptionsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.metadataOptions = mapped
    }

    /**
     * @param value The tenancy of the instance, either default or dedicated.
     */
    @JvmName("xoasmocmbupofcku")
    public suspend fun placementTenancy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.placementTenancy = mapped
    }

    /**
     * @param value The ID of the RAM disk to select.
     */
    @JvmName("lmuidxngatkhygko")
    public suspend fun ramDiskId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ramDiskId = mapped
    }

    /**
     * @param value A list that contains the security groups to assign to the instances in the Auto Scaling group.
     */
    @JvmName("grfgcusokahibkqr")
    public suspend fun securityGroups(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param values A list that contains the security groups to assign to the instances in the Auto Scaling group.
     */
    @JvmName("qagrvcopohifujqc")
    public suspend fun securityGroups(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.securityGroups = mapped
    }

    /**
     * @param value The maximum hourly price you are willing to pay for any Spot Instances launched to fulfill the request.
     */
    @JvmName("tlrmuladrkecxnoa")
    public suspend fun spotPrice(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.spotPrice = mapped
    }

    /**
     * @param value The Base64-encoded user data to make available to the launched EC2 instances.
     */
    @JvmName("ahtdtqiuytbytudx")
    public suspend fun userData(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.userData = mapped
    }

    internal fun build(): LaunchConfigurationArgs = LaunchConfigurationArgs(
        associatePublicIpAddress = associatePublicIpAddress,
        blockDeviceMappings = blockDeviceMappings,
        classicLinkVpcId = classicLinkVpcId,
        classicLinkVpcSecurityGroups = classicLinkVpcSecurityGroups,
        ebsOptimized = ebsOptimized,
        iamInstanceProfile = iamInstanceProfile,
        imageId = imageId,
        instanceId = instanceId,
        instanceMonitoring = instanceMonitoring,
        instanceType = instanceType,
        kernelId = kernelId,
        keyName = keyName,
        launchConfigurationName = launchConfigurationName,
        metadataOptions = metadataOptions,
        placementTenancy = placementTenancy,
        ramDiskId = ramDiskId,
        securityGroups = securityGroups,
        spotPrice = spotPrice,
        userData = userData,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy