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

com.pulumi.gcp.compute.kotlin.inputs.InstanceBootDiskArgs.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: 8.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs.builder
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.jvm.JvmName

/**
 *
 * @property autoDelete Whether the disk will be auto-deleted when the instance
 * is deleted. Defaults to true.
 * @property deviceName Name with which attached disk will be accessible.
 * On the instance, this device will be `/dev/disk/by-id/google-{{device_name}}`.
 * @property diskEncryptionKeyRaw A 256-bit [customer-supplied encryption key]
 * (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption),
 * encoded in [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4)
 * to encrypt this disk. Only one of `kms_key_self_link` and `disk_encryption_key_raw`
 * may be set.
 * @property diskEncryptionKeySha256 The [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4)
 * encoded SHA-256 hash of the [customer-supplied encryption key]
 * (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption) that protects this resource.
 * @property initializeParams Parameters for a new disk that will be created
 * alongside the new instance. Either `initialize_params` or `source` must be set.
 * Structure is documented below.
 * @property kmsKeySelfLink The self_link of the encryption key that is
 * stored in Google Cloud KMS to encrypt this disk. Only one of `kms_key_self_link`
 * and `disk_encryption_key_raw` may be set.
 * @property mode The mode in which to attach this disk, either `READ_WRITE`
 * or `READ_ONLY`. If not specified, the default is to attach the disk in `READ_WRITE` mode.
 * @property source The name or self_link of the existing disk (such as those managed by
 * `gcp.compute.Disk`) or disk image. To create an instance from a snapshot, first create a
 * `gcp.compute.Disk` from a snapshot and reference it here.
 */
public data class InstanceBootDiskArgs(
    public val autoDelete: Output? = null,
    public val deviceName: Output? = null,
    public val diskEncryptionKeyRaw: Output? = null,
    public val diskEncryptionKeySha256: Output? = null,
    public val initializeParams: Output? = null,
    public val kmsKeySelfLink: Output? = null,
    public val mode: Output? = null,
    public val source: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs =
        com.pulumi.gcp.compute.inputs.InstanceBootDiskArgs.builder()
            .autoDelete(autoDelete?.applyValue({ args0 -> args0 }))
            .deviceName(deviceName?.applyValue({ args0 -> args0 }))
            .diskEncryptionKeyRaw(diskEncryptionKeyRaw?.applyValue({ args0 -> args0 }))
            .diskEncryptionKeySha256(diskEncryptionKeySha256?.applyValue({ args0 -> args0 }))
            .initializeParams(initializeParams?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .kmsKeySelfLink(kmsKeySelfLink?.applyValue({ args0 -> args0 }))
            .mode(mode?.applyValue({ args0 -> args0 }))
            .source(source?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [InstanceBootDiskArgs].
 */
@PulumiTagMarker
public class InstanceBootDiskArgsBuilder internal constructor() {
    private var autoDelete: Output? = null

    private var deviceName: Output? = null

    private var diskEncryptionKeyRaw: Output? = null

    private var diskEncryptionKeySha256: Output? = null

    private var initializeParams: Output? = null

    private var kmsKeySelfLink: Output? = null

    private var mode: Output? = null

    private var source: Output? = null

    /**
     * @param value Whether the disk will be auto-deleted when the instance
     * is deleted. Defaults to true.
     */
    @JvmName("nkpqnafwukhpbjar")
    public suspend fun autoDelete(`value`: Output) {
        this.autoDelete = value
    }

    /**
     * @param value Name with which attached disk will be accessible.
     * On the instance, this device will be `/dev/disk/by-id/google-{{device_name}}`.
     */
    @JvmName("vomhqedchbgpeydi")
    public suspend fun deviceName(`value`: Output) {
        this.deviceName = value
    }

    /**
     * @param value A 256-bit [customer-supplied encryption key]
     * (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption),
     * encoded in [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4)
     * to encrypt this disk. Only one of `kms_key_self_link` and `disk_encryption_key_raw`
     * may be set.
     */
    @JvmName("yvpurqjlxfqsuckb")
    public suspend fun diskEncryptionKeyRaw(`value`: Output) {
        this.diskEncryptionKeyRaw = value
    }

    /**
     * @param value The [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4)
     * encoded SHA-256 hash of the [customer-supplied encryption key]
     * (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption) that protects this resource.
     */
    @JvmName("rxnwnlaougjuyxrv")
    public suspend fun diskEncryptionKeySha256(`value`: Output) {
        this.diskEncryptionKeySha256 = value
    }

    /**
     * @param value Parameters for a new disk that will be created
     * alongside the new instance. Either `initialize_params` or `source` must be set.
     * Structure is documented below.
     */
    @JvmName("jqrousvudjvgrilp")
    public suspend fun initializeParams(`value`: Output) {
        this.initializeParams = value
    }

    /**
     * @param value The self_link of the encryption key that is
     * stored in Google Cloud KMS to encrypt this disk. Only one of `kms_key_self_link`
     * and `disk_encryption_key_raw` may be set.
     */
    @JvmName("meqccwtkeusqksvp")
    public suspend fun kmsKeySelfLink(`value`: Output) {
        this.kmsKeySelfLink = value
    }

    /**
     * @param value The mode in which to attach this disk, either `READ_WRITE`
     * or `READ_ONLY`. If not specified, the default is to attach the disk in `READ_WRITE` mode.
     */
    @JvmName("qicbujqbbhhfbsfe")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value The name or self_link of the existing disk (such as those managed by
     * `gcp.compute.Disk`) or disk image. To create an instance from a snapshot, first create a
     * `gcp.compute.Disk` from a snapshot and reference it here.
     */
    @JvmName("irhpsbjmqkxdwbdx")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value Whether the disk will be auto-deleted when the instance
     * is deleted. Defaults to true.
     */
    @JvmName("xprdfjhfvrfmjrot")
    public suspend fun autoDelete(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoDelete = mapped
    }

    /**
     * @param value Name with which attached disk will be accessible.
     * On the instance, this device will be `/dev/disk/by-id/google-{{device_name}}`.
     */
    @JvmName("pegfvgpupkmkseys")
    public suspend fun deviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deviceName = mapped
    }

    /**
     * @param value A 256-bit [customer-supplied encryption key]
     * (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption),
     * encoded in [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4)
     * to encrypt this disk. Only one of `kms_key_self_link` and `disk_encryption_key_raw`
     * may be set.
     */
    @JvmName("bkgyavrtqoudwxnm")
    public suspend fun diskEncryptionKeyRaw(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskEncryptionKeyRaw = mapped
    }

    /**
     * @param value The [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4)
     * encoded SHA-256 hash of the [customer-supplied encryption key]
     * (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption) that protects this resource.
     */
    @JvmName("fhoxaxekyxtyyeku")
    public suspend fun diskEncryptionKeySha256(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskEncryptionKeySha256 = mapped
    }

    /**
     * @param value Parameters for a new disk that will be created
     * alongside the new instance. Either `initialize_params` or `source` must be set.
     * Structure is documented below.
     */
    @JvmName("nlxwsxwfbiskaadt")
    public suspend fun initializeParams(`value`: InstanceBootDiskInitializeParamsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.initializeParams = mapped
    }

    /**
     * @param argument Parameters for a new disk that will be created
     * alongside the new instance. Either `initialize_params` or `source` must be set.
     * Structure is documented below.
     */
    @JvmName("ioveyhtgijwweyod")
    public suspend fun initializeParams(argument: suspend InstanceBootDiskInitializeParamsArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceBootDiskInitializeParamsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.initializeParams = mapped
    }

    /**
     * @param value The self_link of the encryption key that is
     * stored in Google Cloud KMS to encrypt this disk. Only one of `kms_key_self_link`
     * and `disk_encryption_key_raw` may be set.
     */
    @JvmName("mdiironypleqodpe")
    public suspend fun kmsKeySelfLink(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeySelfLink = mapped
    }

    /**
     * @param value The mode in which to attach this disk, either `READ_WRITE`
     * or `READ_ONLY`. If not specified, the default is to attach the disk in `READ_WRITE` mode.
     */
    @JvmName("rycstcnsxcokbygc")
    public suspend fun mode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value The name or self_link of the existing disk (such as those managed by
     * `gcp.compute.Disk`) or disk image. To create an instance from a snapshot, first create a
     * `gcp.compute.Disk` from a snapshot and reference it here.
     */
    @JvmName("qrbafmsbcmbmkatt")
    public suspend fun source(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.source = mapped
    }

    internal fun build(): InstanceBootDiskArgs = InstanceBootDiskArgs(
        autoDelete = autoDelete,
        deviceName = deviceName,
        diskEncryptionKeyRaw = diskEncryptionKeyRaw,
        diskEncryptionKeySha256 = diskEncryptionKeySha256,
        initializeParams = initializeParams,
        kmsKeySelfLink = kmsKeySelfLink,
        mode = mode,
        source = source,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy