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

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

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

package com.pulumi.awsnative.autoscaling.kotlin

import com.pulumi.awsnative.autoscaling.kotlin.outputs.LaunchConfigurationBlockDeviceMapping
import com.pulumi.awsnative.autoscaling.kotlin.outputs.LaunchConfigurationMetadataOptions
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import com.pulumi.awsnative.autoscaling.kotlin.outputs.LaunchConfigurationBlockDeviceMapping.Companion.toKotlin as launchConfigurationBlockDeviceMappingToKotlin
import com.pulumi.awsnative.autoscaling.kotlin.outputs.LaunchConfigurationMetadataOptions.Companion.toKotlin as launchConfigurationMetadataOptionsToKotlin

/**
 * Builder for [LaunchConfiguration].
 */
@PulumiTagMarker
public class LaunchConfigurationResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: LaunchConfigurationArgs = LaunchConfigurationArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend LaunchConfigurationArgsBuilder.() -> Unit) {
        val builder = LaunchConfigurationArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): LaunchConfiguration {
        val builtJavaResource =
            com.pulumi.awsnative.autoscaling.LaunchConfiguration(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return LaunchConfiguration(builtJavaResource)
    }
}

/**
 * The AWS::AutoScaling::LaunchConfiguration resource specifies the launch configuration that can be used by an Auto Scaling group to configure Amazon EC2 instances.
 */
public class LaunchConfiguration internal constructor(
    override val javaResource: com.pulumi.awsnative.autoscaling.LaunchConfiguration,
) : KotlinCustomResource(javaResource, LaunchConfigurationMapper) {
    /**
     * 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.
     */
    public val associatePublicIpAddress: Output?
        get() = javaResource.associatePublicIpAddress().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies how block devices are exposed to the instance. You can specify virtual devices and EBS volumes.
     */
    public val blockDeviceMappings: Output>?
        get() = javaResource.blockDeviceMappings().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        launchConfigurationBlockDeviceMappingToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * The ID of a ClassicLink-enabled VPC to link your EC2-Classic instances to.
     */
    public val classicLinkVpcId: Output?
        get() = javaResource.classicLinkVpcId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The IDs of one or more security groups for the VPC that you specified in the ClassicLinkVPCId property.
     */
    public val classicLinkVpcSecurityGroups: Output>?
        get() = javaResource.classicLinkVpcSecurityGroups().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * Specifies whether the launch configuration is optimized for EBS I/O (true) or not (false).
     */
    public val ebsOptimized: Output?
        get() = javaResource.ebsOptimized().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * 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.
     */
    public val iamInstanceProfile: Output?
        get() = javaResource.iamInstanceProfile().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Provides the unique ID of the Amazon Machine Image (AMI) that was assigned during registration.
     */
    public val imageId: Output
        get() = javaResource.imageId().applyValue({ args0 -> args0 })

    /**
     * The ID of the Amazon EC2 instance you want to use to create the launch configuration.
     */
    public val instanceId: Output?
        get() = javaResource.instanceId().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Controls whether instances in this group are launched with detailed (true) or basic (false) monitoring.
     */
    public val instanceMonitoring: Output?
        get() = javaResource.instanceMonitoring().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies the instance type of the EC2 instance.
     */
    public val instanceType: Output
        get() = javaResource.instanceType().applyValue({ args0 -> args0 })

    /**
     * Provides the ID of the kernel associated with the EC2 AMI.
     */
    public val kernelId: Output?
        get() = javaResource.kernelId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * Provides the name of the EC2 key pair.
     */
    public val keyName: Output?
        get() = javaResource.keyName().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The name of the launch configuration. This name must be unique per Region per account.
     */
    public val launchConfigurationName: Output?
        get() = javaResource.launchConfigurationName().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The metadata options for the instances.
     */
    public val metadataOptions: Output?
        get() = javaResource.metadataOptions().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> launchConfigurationMetadataOptionsToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The tenancy of the instance, either default or dedicated.
     */
    public val placementTenancy: Output?
        get() = javaResource.placementTenancy().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The ID of the RAM disk to select.
     */
    public val ramDiskId: Output?
        get() = javaResource.ramDiskId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * A list that contains the security groups to assign to the instances in the Auto Scaling group.
     */
    public val securityGroups: Output>?
        get() = javaResource.securityGroups().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 -> args0 })
            }).orElse(null)
        })

    /**
     * The maximum hourly price you are willing to pay for any Spot Instances launched to fulfill the request.
     */
    public val spotPrice: Output?
        get() = javaResource.spotPrice().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The Base64-encoded user data to make available to the launched EC2 instances.
     */
    public val userData: Output?
        get() = javaResource.userData().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })
}

public object LaunchConfigurationMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.autoscaling.LaunchConfiguration::class == javaResource::class

    override fun map(javaResource: Resource): LaunchConfiguration = LaunchConfiguration(
        javaResource
            as com.pulumi.awsnative.autoscaling.LaunchConfiguration,
    )
}

/**
 * @see [LaunchConfiguration].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [LaunchConfiguration].
 */
public suspend fun launchConfiguration(
    name: String,
    block: suspend LaunchConfigurationResourceBuilder.() -> Unit,
): LaunchConfiguration {
    val builder = LaunchConfigurationResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [LaunchConfiguration].
 * @param name The _unique_ name of the resulting resource.
 */
public fun launchConfiguration(name: String): LaunchConfiguration {
    val builder = LaunchConfigurationResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy