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

com.pulumi.googlenative.batch.v1.kotlin.inputs.VolumeArgs.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.

The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.googlenative.batch.v1.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.batch.v1.inputs.VolumeArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Volume describes a volume and parameters for it to be mounted to a VM.
 * @property deviceName Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.
 * @property gcs A Google Cloud Storage (GCS) volume.
 * @property mountOptions For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html).
 * @property mountPath The mount path for the volume, e.g. /mnt/disks/share.
 * @property nfs A Network File System (NFS) volume. For example, a Filestore file share.
 */
public data class VolumeArgs(
    public val deviceName: Output? = null,
    public val gcs: Output? = null,
    public val mountOptions: Output>? = null,
    public val mountPath: Output? = null,
    public val nfs: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.batch.v1.inputs.VolumeArgs =
        com.pulumi.googlenative.batch.v1.inputs.VolumeArgs.builder()
            .deviceName(deviceName?.applyValue({ args0 -> args0 }))
            .gcs(gcs?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .mountOptions(mountOptions?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .mountPath(mountPath?.applyValue({ args0 -> args0 }))
            .nfs(nfs?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

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

    private var gcs: Output? = null

    private var mountOptions: Output>? = null

    private var mountPath: Output? = null

    private var nfs: Output? = null

    /**
     * @param value Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.
     */
    @JvmName("bhvsxbfuvdkvwerl")
    public suspend fun deviceName(`value`: Output) {
        this.deviceName = value
    }

    /**
     * @param value A Google Cloud Storage (GCS) volume.
     */
    @JvmName("kpvytxppyeknkoaw")
    public suspend fun gcs(`value`: Output) {
        this.gcs = value
    }

    /**
     * @param value For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html).
     */
    @JvmName("kjuudiifqrutdlyl")
    public suspend fun mountOptions(`value`: Output>) {
        this.mountOptions = value
    }

    @JvmName("blcuxmsmcmdsjspo")
    public suspend fun mountOptions(vararg values: Output) {
        this.mountOptions = Output.all(values.asList())
    }

    /**
     * @param values For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html).
     */
    @JvmName("hhdybddjonabnxol")
    public suspend fun mountOptions(values: List>) {
        this.mountOptions = Output.all(values)
    }

    /**
     * @param value The mount path for the volume, e.g. /mnt/disks/share.
     */
    @JvmName("vyeogvfddbleveyx")
    public suspend fun mountPath(`value`: Output) {
        this.mountPath = value
    }

    /**
     * @param value A Network File System (NFS) volume. For example, a Filestore file share.
     */
    @JvmName("awuychwhgimepetf")
    public suspend fun nfs(`value`: Output) {
        this.nfs = value
    }

    /**
     * @param value Device name of an attached disk volume, which should align with a device_name specified by job.allocation_policy.instances[0].policy.disks[i].device_name or defined by the given instance template in job.allocation_policy.instances[0].instance_template.
     */
    @JvmName("qkvmjcmtopjeuhrq")
    public suspend fun deviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deviceName = mapped
    }

    /**
     * @param value A Google Cloud Storage (GCS) volume.
     */
    @JvmName("chmlmkxgymcglysb")
    public suspend fun gcs(`value`: GCSArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gcs = mapped
    }

    /**
     * @param argument A Google Cloud Storage (GCS) volume.
     */
    @JvmName("ivaemcjqtlqpyusb")
    public suspend fun gcs(argument: suspend GCSArgsBuilder.() -> Unit) {
        val toBeMapped = GCSArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.gcs = mapped
    }

    /**
     * @param value For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html).
     */
    @JvmName("agcelimixpugxcgw")
    public suspend fun mountOptions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mountOptions = mapped
    }

    /**
     * @param values For Google Cloud Storage (GCS), mount options are the options supported by the gcsfuse tool (https://github.com/GoogleCloudPlatform/gcsfuse). For existing persistent disks, mount options provided by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html) except writing are supported. This is due to restrictions of multi-writer mode (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). For other attached disks and Network File System (NFS), mount options are these supported by the mount command (https://man7.org/linux/man-pages/man8/mount.8.html).
     */
    @JvmName("elnyarqycofkahpo")
    public suspend fun mountOptions(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.mountOptions = mapped
    }

    /**
     * @param value The mount path for the volume, e.g. /mnt/disks/share.
     */
    @JvmName("fllyekpptatnrukb")
    public suspend fun mountPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mountPath = mapped
    }

    /**
     * @param value A Network File System (NFS) volume. For example, a Filestore file share.
     */
    @JvmName("wwouvtrormipsvmd")
    public suspend fun nfs(`value`: NFSArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nfs = mapped
    }

    /**
     * @param argument A Network File System (NFS) volume. For example, a Filestore file share.
     */
    @JvmName("gpsernmcrsdjqpxa")
    public suspend fun nfs(argument: suspend NFSArgsBuilder.() -> Unit) {
        val toBeMapped = NFSArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.nfs = mapped
    }

    internal fun build(): VolumeArgs = VolumeArgs(
        deviceName = deviceName,
        gcs = gcs,
        mountOptions = mountOptions,
        mountPath = mountPath,
        nfs = nfs,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy