Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.aws.ec2.kotlin.inputs.InstanceEbsBlockDeviceArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.aws.ec2.kotlin.inputs
import com.pulumi.aws.ec2.inputs.InstanceEbsBlockDeviceArgs.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 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 ID of the volume. For example, the ID can be accessed like this, `aws_instance.web.root_block_device.0.volume_id`.
* @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 InstanceEbsBlockDeviceArgs(
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.InstanceEbsBlockDeviceArgs =
com.pulumi.aws.ec2.inputs.InstanceEbsBlockDeviceArgs.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 [InstanceEbsBlockDeviceArgs].
*/
@PulumiTagMarker
public class InstanceEbsBlockDeviceArgsBuilder 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("cftkdteeahkvlafi")
public suspend fun deleteOnTermination(`value`: Output) {
this.deleteOnTermination = value
}
/**
* @param value Name of the device to mount.
*/
@JvmName("qatrchoqnqiekkuj")
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("nqbfehqwgmwglhht")
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("scxyjesdxurmfkey")
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("mfqxakpjrjkqthmd")
public suspend fun kmsKeyId(`value`: Output) {
this.kmsKeyId = value
}
/**
* @param value Snapshot ID to mount.
*/
@JvmName("cptwgmlxvixqlnsn")
public suspend fun snapshotId(`value`: Output) {
this.snapshotId = value
}
/**
* @param value Map of tags to assign to the device.
*/
@JvmName("lvmnpmhcaapwhljf")
public suspend fun tags(`value`: Output>) {
this.tags = value
}
/**
* @param value Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*/
@JvmName("brvnrnexqwxcdayt")
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("hdibpojdhhujgdcv")
public suspend fun throughput(`value`: Output) {
this.throughput = value
}
/**
* @param value ID of the volume. For example, the ID can be accessed like this, `aws_instance.web.root_block_device.0.volume_id`.
*/
@JvmName("rffoiihbbfdkbtqc")
public suspend fun volumeId(`value`: Output) {
this.volumeId = value
}
/**
* @param value Size of the volume in gibibytes (GiB).
*/
@JvmName("ffmywnjaryeqpsvd")
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("qelmxnlrighqrlle")
public suspend fun volumeType(`value`: Output) {
this.volumeType = value
}
/**
* @param value Whether the volume should be destroyed on instance termination. Defaults to `true`.
*/
@JvmName("ojympleqbayiwmyq")
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("yucmeturshrxekgy")
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("ugduhsqcmqfogict")
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("baaxbdsuwrfrhoia")
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("dorslhbcrglacpli")
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("mtwmbxpmusnkxuxq")
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("jggepnootlmgaseo")
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("fkvsuyvealmithde")
public fun tags(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.tags = mapped
}
/**
* @param value Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*/
@JvmName("xymikdqshukilsho")
public suspend fun tagsAll(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.tagsAll = mapped
}
/**
* @param values Map of tags assigned to the resource, including those inherited from the provider `default_tags` configuration block.
*/
@JvmName("wbbpmkyevulejxqb")
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("frlnplfhvexwkhyf")
public suspend fun throughput(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.throughput = mapped
}
/**
* @param value ID of the volume. For example, the ID can be accessed like this, `aws_instance.web.root_block_device.0.volume_id`.
*/
@JvmName("ouhxfospsaukedig")
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("wwuknuugulvdtjbg")
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("nmnpfvfaqvuqdwex")
public suspend fun volumeType(`value`: String?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.volumeType = mapped
}
internal fun build(): InstanceEbsBlockDeviceArgs = InstanceEbsBlockDeviceArgs(
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,
)
}