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

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

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

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

import com.pulumi.awsnative.ec2.inputs.LaunchTemplateBlockDeviceMappingArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Specifies a block device mapping for a launch template. You must specify ``DeviceName`` plus exactly one of the following properties: ``Ebs``, ``NoDevice``, or ``VirtualName``.
 *   ``BlockDeviceMapping`` is a property of [AWS::EC2::LaunchTemplate LaunchTemplateData](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata.html).
 * @property deviceName The device name (for example, /dev/sdh or xvdh).
 * @property ebs Parameters used to automatically set up EBS volumes when the instance is launched.
 * @property noDevice To omit the device from the block device mapping, specify an empty string.
 * @property virtualName The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
 */
public data class LaunchTemplateBlockDeviceMappingArgs(
    public val deviceName: Output? = null,
    public val ebs: Output? = null,
    public val noDevice: Output? = null,
    public val virtualName: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.ec2.inputs.LaunchTemplateBlockDeviceMappingArgs =
        com.pulumi.awsnative.ec2.inputs.LaunchTemplateBlockDeviceMappingArgs.builder()
            .deviceName(deviceName?.applyValue({ args0 -> args0 }))
            .ebs(ebs?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .noDevice(noDevice?.applyValue({ args0 -> args0 }))
            .virtualName(virtualName?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [LaunchTemplateBlockDeviceMappingArgs].
 */
@PulumiTagMarker
public class LaunchTemplateBlockDeviceMappingArgsBuilder internal constructor() {
    private var deviceName: Output? = null

    private var ebs: Output? = null

    private var noDevice: Output? = null

    private var virtualName: Output? = null

    /**
     * @param value The device name (for example, /dev/sdh or xvdh).
     */
    @JvmName("dixfpeuqjjlknnyh")
    public suspend fun deviceName(`value`: Output) {
        this.deviceName = value
    }

    /**
     * @param value Parameters used to automatically set up EBS volumes when the instance is launched.
     */
    @JvmName("yptombltquetfaxs")
    public suspend fun ebs(`value`: Output) {
        this.ebs = value
    }

    /**
     * @param value To omit the device from the block device mapping, specify an empty string.
     */
    @JvmName("lktdqbcxftfbsyky")
    public suspend fun noDevice(`value`: Output) {
        this.noDevice = value
    }

    /**
     * @param value The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
     */
    @JvmName("wygtpmimmaibyyxu")
    public suspend fun virtualName(`value`: Output) {
        this.virtualName = value
    }

    /**
     * @param value The device name (for example, /dev/sdh or xvdh).
     */
    @JvmName("tsgkoiwmiqveibqy")
    public suspend fun deviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deviceName = mapped
    }

    /**
     * @param value Parameters used to automatically set up EBS volumes when the instance is launched.
     */
    @JvmName("bxtatshkojyrhmxc")
    public suspend fun ebs(`value`: LaunchTemplateEbsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ebs = mapped
    }

    /**
     * @param argument Parameters used to automatically set up EBS volumes when the instance is launched.
     */
    @JvmName("impkycqixdahqwkw")
    public suspend fun ebs(argument: suspend LaunchTemplateEbsArgsBuilder.() -> Unit) {
        val toBeMapped = LaunchTemplateEbsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.ebs = mapped
    }

    /**
     * @param value To omit the device from the block device mapping, specify an empty string.
     */
    @JvmName("bnufsohuhntoluhe")
    public suspend fun noDevice(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noDevice = mapped
    }

    /**
     * @param value The virtual device name (ephemeralN). Instance store volumes are numbered starting from 0. An instance type with 2 available instance store volumes can specify mappings for ephemeral0 and ephemeral1. The number of available instance store volumes depends on the instance type. After you connect to the instance, you must mount the volume.
     */
    @JvmName("oensrxssskhjxsrh")
    public suspend fun virtualName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.virtualName = mapped
    }

    internal fun build(): LaunchTemplateBlockDeviceMappingArgs = LaunchTemplateBlockDeviceMappingArgs(
        deviceName = deviceName,
        ebs = ebs,
        noDevice = noDevice,
        virtualName = virtualName,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy