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

com.pulumi.gcp.compute.kotlin.inputs.InstanceAttachedDiskArgs.kt Maven / Gradle / Ivy

@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.InstanceAttachedDiskArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 *
 * @property deviceName Name with which the attached disk will be accessible
 * under `/dev/disk/by-id/google-*`
 * @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 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 Either "READ_ONLY" or "READ_WRITE", defaults to "READ_WRITE"
 * If you have a persistent disk with data that you want to share
 * between multiple instances, detach it from any read-write instances and
 * attach it to one or more instances in read-only mode.
 * @property source The name or self_link of the disk to attach to this instance.
 */
public data class InstanceAttachedDiskArgs(
    public val deviceName: Output? = null,
    public val diskEncryptionKeyRaw: Output? = null,
    public val diskEncryptionKeySha256: Output? = null,
    public val kmsKeySelfLink: Output? = null,
    public val mode: Output? = null,
    public val source: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.InstanceAttachedDiskArgs =
        com.pulumi.gcp.compute.inputs.InstanceAttachedDiskArgs.builder()
            .deviceName(deviceName?.applyValue({ args0 -> args0 }))
            .diskEncryptionKeyRaw(diskEncryptionKeyRaw?.applyValue({ args0 -> args0 }))
            .diskEncryptionKeySha256(diskEncryptionKeySha256?.applyValue({ args0 -> args0 }))
            .kmsKeySelfLink(kmsKeySelfLink?.applyValue({ args0 -> args0 }))
            .mode(mode?.applyValue({ args0 -> args0 }))
            .source(source.applyValue({ args0 -> args0 })).build()
}

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

    private var diskEncryptionKeyRaw: Output? = null

    private var diskEncryptionKeySha256: Output? = null

    private var kmsKeySelfLink: Output? = null

    private var mode: Output? = null

    private var source: Output? = null

    /**
     * @param value Name with which the attached disk will be accessible
     * under `/dev/disk/by-id/google-*`
     */
    @JvmName("psoetmwjblhlalov")
    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("jutqqbueyntfwbso")
    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("unqcvjjkvmbujhhq")
    public suspend fun diskEncryptionKeySha256(`value`: Output) {
        this.diskEncryptionKeySha256 = 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("lrtrritbyslgfxae")
    public suspend fun kmsKeySelfLink(`value`: Output) {
        this.kmsKeySelfLink = value
    }

    /**
     * @param value Either "READ_ONLY" or "READ_WRITE", defaults to "READ_WRITE"
     * If you have a persistent disk with data that you want to share
     * between multiple instances, detach it from any read-write instances and
     * attach it to one or more instances in read-only mode.
     */
    @JvmName("oxdchsignijmtgmg")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value The name or self_link of the disk to attach to this instance.
     */
    @JvmName("aiuhvouunjgveejf")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value Name with which the attached disk will be accessible
     * under `/dev/disk/by-id/google-*`
     */
    @JvmName("hrewbjvjqwyhqfui")
    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("lgucktjfarefikkj")
    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("orstoyamhnlfoypc")
    public suspend fun diskEncryptionKeySha256(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskEncryptionKeySha256 = 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("ylyyiekkpkjuajwf")
    public suspend fun kmsKeySelfLink(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKeySelfLink = mapped
    }

    /**
     * @param value Either "READ_ONLY" or "READ_WRITE", defaults to "READ_WRITE"
     * If you have a persistent disk with data that you want to share
     * between multiple instances, detach it from any read-write instances and
     * attach it to one or more instances in read-only mode.
     */
    @JvmName("qxvvtsergkvwboyp")
    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 disk to attach to this instance.
     */
    @JvmName("jxqotmfefloswino")
    public suspend fun source(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.source = mapped
    }

    internal fun build(): InstanceAttachedDiskArgs = InstanceAttachedDiskArgs(
        deviceName = deviceName,
        diskEncryptionKeyRaw = diskEncryptionKeyRaw,
        diskEncryptionKeySha256 = diskEncryptionKeySha256,
        kmsKeySelfLink = kmsKeySelfLink,
        mode = mode,
        source = source ?: throw PulumiNullFieldException("source"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy