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

com.pulumi.gcp.compute.kotlin.inputs.PerInstanceConfigPreservedStateDiskArgs.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.12.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.PerInstanceConfigPreservedStateDiskArgs.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 deleteRule A value that prescribes what should happen to the stateful disk when the VM instance is deleted.
 * The available options are `NEVER` and `ON_PERMANENT_INSTANCE_DELETION`.
 * `NEVER` - detach the disk when the VM is deleted, but do not delete the disk.
 * `ON_PERMANENT_INSTANCE_DELETION` will delete the stateful disk when the VM is permanently
 * deleted from the instance group.
 * Default value is `NEVER`.
 * Possible values are: `NEVER`, `ON_PERMANENT_INSTANCE_DELETION`.
 * @property deviceName A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.
 * @property mode The mode of the disk.
 * Default value is `READ_WRITE`.
 * Possible values are: `READ_ONLY`, `READ_WRITE`.
 * @property source The URI of an existing persistent disk to attach under the specified device-name in the format
 * `projects/project-id/zones/zone/disks/disk-name`.
 */
public data class PerInstanceConfigPreservedStateDiskArgs(
    public val deleteRule: Output? = null,
    public val deviceName: Output,
    public val mode: Output? = null,
    public val source: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.PerInstanceConfigPreservedStateDiskArgs =
        com.pulumi.gcp.compute.inputs.PerInstanceConfigPreservedStateDiskArgs.builder()
            .deleteRule(deleteRule?.applyValue({ args0 -> args0 }))
            .deviceName(deviceName.applyValue({ args0 -> args0 }))
            .mode(mode?.applyValue({ args0 -> args0 }))
            .source(source.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PerInstanceConfigPreservedStateDiskArgs].
 */
@PulumiTagMarker
public class PerInstanceConfigPreservedStateDiskArgsBuilder internal constructor() {
    private var deleteRule: Output? = null

    private var deviceName: Output? = null

    private var mode: Output? = null

    private var source: Output? = null

    /**
     * @param value A value that prescribes what should happen to the stateful disk when the VM instance is deleted.
     * The available options are `NEVER` and `ON_PERMANENT_INSTANCE_DELETION`.
     * `NEVER` - detach the disk when the VM is deleted, but do not delete the disk.
     * `ON_PERMANENT_INSTANCE_DELETION` will delete the stateful disk when the VM is permanently
     * deleted from the instance group.
     * Default value is `NEVER`.
     * Possible values are: `NEVER`, `ON_PERMANENT_INSTANCE_DELETION`.
     */
    @JvmName("acdrpuopittnifvq")
    public suspend fun deleteRule(`value`: Output) {
        this.deleteRule = value
    }

    /**
     * @param value A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.
     */
    @JvmName("vdwcakhldjiyclbf")
    public suspend fun deviceName(`value`: Output) {
        this.deviceName = value
    }

    /**
     * @param value The mode of the disk.
     * Default value is `READ_WRITE`.
     * Possible values are: `READ_ONLY`, `READ_WRITE`.
     */
    @JvmName("lbidapbmipuwpkys")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value The URI of an existing persistent disk to attach under the specified device-name in the format
     * `projects/project-id/zones/zone/disks/disk-name`.
     */
    @JvmName("hdtefwajcywqjvrv")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value A value that prescribes what should happen to the stateful disk when the VM instance is deleted.
     * The available options are `NEVER` and `ON_PERMANENT_INSTANCE_DELETION`.
     * `NEVER` - detach the disk when the VM is deleted, but do not delete the disk.
     * `ON_PERMANENT_INSTANCE_DELETION` will delete the stateful disk when the VM is permanently
     * deleted from the instance group.
     * Default value is `NEVER`.
     * Possible values are: `NEVER`, `ON_PERMANENT_INSTANCE_DELETION`.
     */
    @JvmName("mwwivykuffagkmxl")
    public suspend fun deleteRule(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deleteRule = mapped
    }

    /**
     * @param value A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance.
     */
    @JvmName("yodkpkltyjhophfa")
    public suspend fun deviceName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.deviceName = mapped
    }

    /**
     * @param value The mode of the disk.
     * Default value is `READ_WRITE`.
     * Possible values are: `READ_ONLY`, `READ_WRITE`.
     */
    @JvmName("sbkgykugxrbnummj")
    public suspend fun mode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value The URI of an existing persistent disk to attach under the specified device-name in the format
     * `projects/project-id/zones/zone/disks/disk-name`.
     */
    @JvmName("vjrsjpkpunvvorfv")
    public suspend fun source(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.source = mapped
    }

    internal fun build(): PerInstanceConfigPreservedStateDiskArgs =
        PerInstanceConfigPreservedStateDiskArgs(
            deleteRule = deleteRule,
            deviceName = deviceName ?: throw PulumiNullFieldException("deviceName"),
            mode = mode,
            source = source ?: throw PulumiNullFieldException("source"),
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy