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

com.pulumi.googlenative.batch.v1.kotlin.inputs.DiskArgs.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.DiskArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * A new persistent disk or a local ssd. A VM can only have one local SSD setting but multiple local SSD partitions. See https://cloud.google.com/compute/docs/disks#pdspecs and https://cloud.google.com/compute/docs/disks#localssds.
 * @property diskInterface Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not indicated, "NVMe" will be the default one for local ssds. We only support "SCSI" for persistent disks now.
 * @property image Name of a public or custom image used as the data source. For example, the following are all valid URLs: * Specify the image by its family name: projects/{project}/global/images/family/{image_family} * Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short names. The following image values are supported for a boot disk: * "batch-debian": use Batch Debian images. * "batch-centos": use Batch CentOS images. * "batch-cos": use Batch Container-Optimized images.
 * @property sizeGb Disk size in GB. For persistent disk, this field is ignored if `data_source` is `image` or `snapshot`. For local SSD, size_gb should be a multiple of 375GB, otherwise, the final size will be the next greater multiple of 375 GB. For boot disk, Batch will calculate the boot disk size based on source image and task requirements if you do not speicify the size. If both this field and the boot_disk_mib field in task spec's compute_resource are defined, Batch will only honor this field.
 * @property snapshot Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
 * @property type Disk type as shown in `gcloud compute disk-types list`. For example, local SSD uses type "local-ssd". Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" or "pd-standard".
 */
public data class DiskArgs(
    public val diskInterface: Output? = null,
    public val image: Output? = null,
    public val sizeGb: Output? = null,
    public val snapshot: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.batch.v1.inputs.DiskArgs =
        com.pulumi.googlenative.batch.v1.inputs.DiskArgs.builder()
            .diskInterface(diskInterface?.applyValue({ args0 -> args0 }))
            .image(image?.applyValue({ args0 -> args0 }))
            .sizeGb(sizeGb?.applyValue({ args0 -> args0 }))
            .snapshot(snapshot?.applyValue({ args0 -> args0 }))
            .type(type?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [DiskArgs].
 */
@PulumiTagMarker
public class DiskArgsBuilder internal constructor() {
    private var diskInterface: Output? = null

    private var image: Output? = null

    private var sizeGb: Output? = null

    private var snapshot: Output? = null

    private var type: Output? = null

    /**
     * @param value Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not indicated, "NVMe" will be the default one for local ssds. We only support "SCSI" for persistent disks now.
     */
    @JvmName("kekgqsyfpvwvhfgu")
    public suspend fun diskInterface(`value`: Output) {
        this.diskInterface = value
    }

    /**
     * @param value Name of a public or custom image used as the data source. For example, the following are all valid URLs: * Specify the image by its family name: projects/{project}/global/images/family/{image_family} * Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short names. The following image values are supported for a boot disk: * "batch-debian": use Batch Debian images. * "batch-centos": use Batch CentOS images. * "batch-cos": use Batch Container-Optimized images.
     */
    @JvmName("jfexjfiwgxxbpije")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value Disk size in GB. For persistent disk, this field is ignored if `data_source` is `image` or `snapshot`. For local SSD, size_gb should be a multiple of 375GB, otherwise, the final size will be the next greater multiple of 375 GB. For boot disk, Batch will calculate the boot disk size based on source image and task requirements if you do not speicify the size. If both this field and the boot_disk_mib field in task spec's compute_resource are defined, Batch will only honor this field.
     */
    @JvmName("kpbmflxvgvkqowqv")
    public suspend fun sizeGb(`value`: Output) {
        this.sizeGb = value
    }

    /**
     * @param value Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
     */
    @JvmName("ktylfwfoustbplvs")
    public suspend fun snapshot(`value`: Output) {
        this.snapshot = value
    }

    /**
     * @param value Disk type as shown in `gcloud compute disk-types list`. For example, local SSD uses type "local-ssd". Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" or "pd-standard".
     */
    @JvmName("rtoocxdfxjoejmll")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Local SSDs are available through both "SCSI" and "NVMe" interfaces. If not indicated, "NVMe" will be the default one for local ssds. We only support "SCSI" for persistent disks now.
     */
    @JvmName("rbjebrowfskfiwgp")
    public suspend fun diskInterface(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskInterface = mapped
    }

    /**
     * @param value Name of a public or custom image used as the data source. For example, the following are all valid URLs: * Specify the image by its family name: projects/{project}/global/images/family/{image_family} * Specify the image version: projects/{project}/global/images/{image_version} You can also use Batch customized image in short names. The following image values are supported for a boot disk: * "batch-debian": use Batch Debian images. * "batch-centos": use Batch CentOS images. * "batch-cos": use Batch Container-Optimized images.
     */
    @JvmName("qwwjcbkctervcovp")
    public suspend fun image(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param value Disk size in GB. For persistent disk, this field is ignored if `data_source` is `image` or `snapshot`. For local SSD, size_gb should be a multiple of 375GB, otherwise, the final size will be the next greater multiple of 375 GB. For boot disk, Batch will calculate the boot disk size based on source image and task requirements if you do not speicify the size. If both this field and the boot_disk_mib field in task spec's compute_resource are defined, Batch will only honor this field.
     */
    @JvmName("kwfroossjgbcfwbv")
    public suspend fun sizeGb(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sizeGb = mapped
    }

    /**
     * @param value Name of a snapshot used as the data source. Snapshot is not supported as boot disk now.
     */
    @JvmName("xntrpkrbmmsavqvy")
    public suspend fun snapshot(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.snapshot = mapped
    }

    /**
     * @param value Disk type as shown in `gcloud compute disk-types list`. For example, local SSD uses type "local-ssd". Persistent disks and boot disks use "pd-balanced", "pd-extreme", "pd-ssd" or "pd-standard".
     */
    @JvmName("tlavvdwcbpahanoi")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): DiskArgs = DiskArgs(
        diskInterface = diskInterface,
        image = image,
        sizeGb = sizeGb,
        snapshot = snapshot,
        type = type,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy