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

com.pulumi.aws.ec2.kotlin.inputs.SpotInstanceRequestEbsBlockDeviceArgs.kt Maven / Gradle / Ivy

Go to download

Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.

There is a newer version: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.ec2.kotlin.inputs

import com.pulumi.aws.ec2.inputs.SpotInstanceRequestEbsBlockDeviceArgs.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 kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property deleteOnTermination Whether the volume should be destroyed on instance termination. Defaults to `true`.
 * @property deviceName Name of the device to mount.
 * @property encrypted Enables [EBS encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) on the volume. Defaults to `false`. Cannot be used with `snapshot_id`. Must be configured to perform drift detection.
 * @property iops Amount of provisioned [IOPS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). Only valid for volume_type of `io1`, `io2` or `gp3`.
 * @property kmsKeyId Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
 * @property snapshotId Snapshot ID to mount.
 * @property tags Map of tags to assign to the device.
 * @property tagsAll A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
 * @property throughput Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for `volume_type` of `gp3`.
 * @property volumeId
 * @property volumeSize Size of the volume in gibibytes (GiB).
 * @property volumeType Type of volume. Valid values include `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1`, or `st1`. Defaults to `gp2`.
 * > **NOTE:** Currently, changes to the `ebs_block_device` configuration of _existing_ resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources instead. If you use `ebs_block_device` on an `aws.ec2.Instance`, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, `ebs_block_device` cannot be mixed with external `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources for a given instance.
 */
public data class SpotInstanceRequestEbsBlockDeviceArgs(
    public val deleteOnTermination: Output? = null,
    public val deviceName: Output,
    public val encrypted: Output? = null,
    public val iops: Output? = null,
    public val kmsKeyId: Output? = null,
    public val snapshotId: Output? = null,
    public val tags: Output>? = null,
    public val tagsAll: Output>? = null,
    public val throughput: Output? = null,
    public val volumeId: Output? = null,
    public val volumeSize: Output? = null,
    public val volumeType: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.ec2.inputs.SpotInstanceRequestEbsBlockDeviceArgs =
        com.pulumi.aws.ec2.inputs.SpotInstanceRequestEbsBlockDeviceArgs.builder()
            .deleteOnTermination(deleteOnTermination?.applyValue({ args0 -> args0 }))
            .deviceName(deviceName.applyValue({ args0 -> args0 }))
            .encrypted(encrypted?.applyValue({ args0 -> args0 }))
            .iops(iops?.applyValue({ args0 -> args0 }))
            .kmsKeyId(kmsKeyId?.applyValue({ args0 -> args0 }))
            .snapshotId(snapshotId?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .tagsAll(tagsAll?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .throughput(throughput?.applyValue({ args0 -> args0 }))
            .volumeId(volumeId?.applyValue({ args0 -> args0 }))
            .volumeSize(volumeSize?.applyValue({ args0 -> args0 }))
            .volumeType(volumeType?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [SpotInstanceRequestEbsBlockDeviceArgs].
 */
@PulumiTagMarker
public class SpotInstanceRequestEbsBlockDeviceArgsBuilder internal constructor() {
    private var deleteOnTermination: Output? = null

    private var deviceName: Output? = null

    private var encrypted: Output? = null

    private var iops: Output? = null

    private var kmsKeyId: Output? = null

    private var snapshotId: Output? = null

    private var tags: Output>? = null

    private var tagsAll: Output>? = null

    private var throughput: Output? = null

    private var volumeId: Output? = null

    private var volumeSize: Output? = null

    private var volumeType: Output? = null

    /**
     * @param value Whether the volume should be destroyed on instance termination. Defaults to `true`.
     */
    @JvmName("opnbwqbssvvhnugf")
    public suspend fun deleteOnTermination(`value`: Output) {
        this.deleteOnTermination = value
    }

    /**
     * @param value Name of the device to mount.
     */
    @JvmName("ekvxyaejlrxwwaky")
    public suspend fun deviceName(`value`: Output) {
        this.deviceName = value
    }

    /**
     * @param value Enables [EBS encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) on the volume. Defaults to `false`. Cannot be used with `snapshot_id`. Must be configured to perform drift detection.
     */
    @JvmName("sjosdnbtbxdmihra")
    public suspend fun encrypted(`value`: Output) {
        this.encrypted = value
    }

    /**
     * @param value Amount of provisioned [IOPS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). Only valid for volume_type of `io1`, `io2` or `gp3`.
     */
    @JvmName("httndmvlrgerftju")
    public suspend fun iops(`value`: Output) {
        this.iops = value
    }

    /**
     * @param value Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
     */
    @JvmName("khypcencwauvksyh")
    public suspend fun kmsKeyId(`value`: Output) {
        this.kmsKeyId = value
    }

    /**
     * @param value Snapshot ID to mount.
     */
    @JvmName("ppcbjsrbioldaclm")
    public suspend fun snapshotId(`value`: Output) {
        this.snapshotId = value
    }

    /**
     * @param value Map of tags to assign to the device.
     */
    @JvmName("grfvrjubnfjcpgjn")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
     */
    @JvmName("kmuqamnkpljfterf")
    public suspend fun tagsAll(`value`: Output>) {
        this.tagsAll = value
    }

    /**
     * @param value Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for `volume_type` of `gp3`.
     */
    @JvmName("sqgnbjyuwhovrhna")
    public suspend fun throughput(`value`: Output) {
        this.throughput = value
    }

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

    /**
     * @param value Size of the volume in gibibytes (GiB).
     */
    @JvmName("ibxsrseuggeegyve")
    public suspend fun volumeSize(`value`: Output) {
        this.volumeSize = value
    }

    /**
     * @param value Type of volume. Valid values include `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1`, or `st1`. Defaults to `gp2`.
     * > **NOTE:** Currently, changes to the `ebs_block_device` configuration of _existing_ resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources instead. If you use `ebs_block_device` on an `aws.ec2.Instance`, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, `ebs_block_device` cannot be mixed with external `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources for a given instance.
     */
    @JvmName("ggfdbcyyftruiehl")
    public suspend fun volumeType(`value`: Output) {
        this.volumeType = value
    }

    /**
     * @param value Whether the volume should be destroyed on instance termination. Defaults to `true`.
     */
    @JvmName("diixaksjplbbphwb")
    public suspend fun deleteOnTermination(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deleteOnTermination = mapped
    }

    /**
     * @param value Name of the device to mount.
     */
    @JvmName("jogodnfegoxsxryh")
    public suspend fun deviceName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deviceName = mapped
    }

    /**
     * @param value Enables [EBS encryption](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/EBSEncryption.html) on the volume. Defaults to `false`. Cannot be used with `snapshot_id`. Must be configured to perform drift detection.
     */
    @JvmName("cevgrtptibnybuuv")
    public suspend fun encrypted(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encrypted = mapped
    }

    /**
     * @param value Amount of provisioned [IOPS](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-io-characteristics.html). Only valid for volume_type of `io1`, `io2` or `gp3`.
     */
    @JvmName("ikrfykclmharcwnw")
    public suspend fun iops(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.iops = mapped
    }

    /**
     * @param value Amazon Resource Name (ARN) of the KMS Key to use when encrypting the volume. Must be configured to perform drift detection.
     */
    @JvmName("qtqolvxctbssgomp")
    public suspend fun kmsKeyId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeyId = mapped
    }

    /**
     * @param value Snapshot ID to mount.
     */
    @JvmName("ninflsmgsadbkjto")
    public suspend fun snapshotId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snapshotId = mapped
    }

    /**
     * @param value Map of tags to assign to the device.
     */
    @JvmName("kihyphulnubddwea")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Map of tags to assign to the device.
     */
    @JvmName("bxgwrmjnioxypgjw")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
     */
    @JvmName("vvyqfmqrukmkgavc")
    public suspend fun tagsAll(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tagsAll = mapped
    }

    /**
     * @param values A map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
     */
    @JvmName("yvruijopwrojafqa")
    public fun tagsAll(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tagsAll = mapped
    }

    /**
     * @param value Throughput to provision for a volume in mebibytes per second (MiB/s). This is only valid for `volume_type` of `gp3`.
     */
    @JvmName("wqqsjtfqoabyiwgt")
    public suspend fun throughput(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.throughput = mapped
    }

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

    /**
     * @param value Size of the volume in gibibytes (GiB).
     */
    @JvmName("lfavkqjyexduitna")
    public suspend fun volumeSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeSize = mapped
    }

    /**
     * @param value Type of volume. Valid values include `standard`, `gp2`, `gp3`, `io1`, `io2`, `sc1`, or `st1`. Defaults to `gp2`.
     * > **NOTE:** Currently, changes to the `ebs_block_device` configuration of _existing_ resources cannot be automatically detected by this provider. To manage changes and attachments of an EBS block to an instance, use the `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources instead. If you use `ebs_block_device` on an `aws.ec2.Instance`, this provider will assume management over the full set of non-root EBS block devices for the instance, treating additional block devices as drift. For this reason, `ebs_block_device` cannot be mixed with external `aws.ebs.Volume` and `aws.ec2.VolumeAttachment` resources for a given instance.
     */
    @JvmName("gqfdxfkabncwgmhb")
    public suspend fun volumeType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeType = mapped
    }

    internal fun build(): SpotInstanceRequestEbsBlockDeviceArgs =
        SpotInstanceRequestEbsBlockDeviceArgs(
            deleteOnTermination = deleteOnTermination,
            deviceName = deviceName ?: throw PulumiNullFieldException("deviceName"),
            encrypted = encrypted,
            iops = iops,
            kmsKeyId = kmsKeyId,
            snapshotId = snapshotId,
            tags = tags,
            tagsAll = tagsAll,
            throughput = throughput,
            volumeId = volumeId,
            volumeSize = volumeSize,
            volumeType = volumeType,
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy