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

com.pulumi.gcp.compute.kotlin.inputs.InstanceTemplateDiskArgs.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.InstanceTemplateDiskArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property autoDelete Whether or not the disk should be auto-deleted.
 * This defaults to true.
 * @property boot Indicates that this is a boot disk.
 * @property deviceName A unique device name that is reflected into the
 * /dev/  tree of a Linux operating system running within the instance. If not
 * specified, the server chooses a default device name to apply to this disk.
 * @property diskEncryptionKey Encrypts or decrypts a disk using a customer-supplied encryption key.
 * If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
 * If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
 * If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
 * Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.
 * @property diskName Name of the disk. When not provided, this defaults
 * to the name of the instance.
 * @property diskSizeGb The size of the image in gigabytes. If not
 * specified, it will inherit the size of its base image. For SCRATCH disks,
 * the size must be exactly 375GB.
 * @property diskType The GCE disk type. Such as `"pd-ssd"`, `"local-ssd"`,
 * `"pd-balanced"` or `"pd-standard"`, `"hyperdisk-balanced"`, `"hyperdisk-throughput"` or `"hyperdisk-extreme"`.
 * @property interface Specifies the disk interface to use for attaching this disk,
 * which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI
 * and the request will fail if you attempt to attach a persistent disk in any other format
 * than SCSI. Local SSDs can use either NVME or SCSI.
 * @property labels A set of ket/value label pairs to assign to disk created from
 * this template
 * @property mode The mode in which to attach this disk, either READ_WRITE
 * or READ_ONLY. If you are attaching or creating a boot disk, this must
 * read-write mode.
 * @property provisionedIops Indicates how many IOPS to provision for the disk. This
 * sets the number of I/O operations per second that the disk can handle.
 * Values must be between 10,000 and 120,000. For more details, see the
 * [Extreme persistent disk documentation](https://cloud.google.com/compute/docs/disks/extreme-persistent-disk).
 * @property resourceManagerTags A set of key/value resource manager tag pairs to bind to this disk. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
 * @property resourcePolicies - A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
 * @property source The name (**not self_link**)
 * of the disk (such as those managed by `gcp.compute.Disk`) to attach.
 * > **Note:** Either `source`, `source_image`, or `source_snapshot` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
 * @property sourceImage The image from which to
 * initialize this disk. This can be one of: the image's `self_link`,
 * `projects/{project}/global/images/{image}`,
 * `projects/{project}/global/images/family/{family}`, `global/images/{image}`,
 * `global/images/family/{family}`, `family/{family}`, `{project}/{family}`,
 * `{project}/{image}`, `{family}`, or `{image}`.
 * > **Note:** Either `source`, `source_image`, or `source_snapshot` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
 * @property sourceImageEncryptionKey The customer-supplied encryption
 * key of the source image. Required if the source image is protected by a
 * customer-supplied encryption key.
 * Instance templates do not store customer-supplied encryption keys, so you
 * cannot create disks for instances in a managed instance group if the source
 * images are encrypted with your own keys. Structure
 * documented below.
 * @property sourceSnapshot The source snapshot to create this disk.
 * > **Note:** Either `source`, `source_image`, or `source_snapshot` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
 * @property sourceSnapshotEncryptionKey The customer-supplied encryption
 * key of the source snapshot. Structure
 * documented below.
 * @property type The type of GCE disk, can be either `"SCRATCH"` or
 * `"PERSISTENT"`.
 */
public data class InstanceTemplateDiskArgs(
    public val autoDelete: Output? = null,
    public val boot: Output? = null,
    public val deviceName: Output? = null,
    public val diskEncryptionKey: Output? = null,
    public val diskName: Output? = null,
    public val diskSizeGb: Output? = null,
    public val diskType: Output? = null,
    public val `interface`: Output? = null,
    public val labels: Output>? = null,
    public val mode: Output? = null,
    public val provisionedIops: Output? = null,
    public val resourceManagerTags: Output>? = null,
    public val resourcePolicies: Output? = null,
    public val source: Output? = null,
    public val sourceImage: Output? = null,
    public val sourceImageEncryptionKey: Output? =
        null,
    public val sourceSnapshot: Output? = null,
    public val sourceSnapshotEncryptionKey: Output? = null,
    public val type: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs =
        com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs.builder()
            .autoDelete(autoDelete?.applyValue({ args0 -> args0 }))
            .boot(boot?.applyValue({ args0 -> args0 }))
            .deviceName(deviceName?.applyValue({ args0 -> args0 }))
            .diskEncryptionKey(diskEncryptionKey?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .diskName(diskName?.applyValue({ args0 -> args0 }))
            .diskSizeGb(diskSizeGb?.applyValue({ args0 -> args0 }))
            .diskType(diskType?.applyValue({ args0 -> args0 }))
            .interface_(`interface`?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .mode(mode?.applyValue({ args0 -> args0 }))
            .provisionedIops(provisionedIops?.applyValue({ args0 -> args0 }))
            .resourceManagerTags(
                resourceManagerTags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .resourcePolicies(resourcePolicies?.applyValue({ args0 -> args0 }))
            .source(source?.applyValue({ args0 -> args0 }))
            .sourceImage(sourceImage?.applyValue({ args0 -> args0 }))
            .sourceImageEncryptionKey(
                sourceImageEncryptionKey?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .sourceSnapshot(sourceSnapshot?.applyValue({ args0 -> args0 }))
            .sourceSnapshotEncryptionKey(
                sourceSnapshotEncryptionKey?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .type(type?.applyValue({ args0 -> args0 })).build()
}

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

    private var boot: Output? = null

    private var deviceName: Output? = null

    private var diskEncryptionKey: Output? = null

    private var diskName: Output? = null

    private var diskSizeGb: Output? = null

    private var diskType: Output? = null

    private var `interface`: Output? = null

    private var labels: Output>? = null

    private var mode: Output? = null

    private var provisionedIops: Output? = null

    private var resourceManagerTags: Output>? = null

    private var resourcePolicies: Output? = null

    private var source: Output? = null

    private var sourceImage: Output? = null

    private var sourceImageEncryptionKey: Output? =
        null

    private var sourceSnapshot: Output? = null

    private var sourceSnapshotEncryptionKey:
        Output? = null

    private var type: Output? = null

    /**
     * @param value Whether or not the disk should be auto-deleted.
     * This defaults to true.
     */
    @JvmName("guninkevnkvxmaox")
    public suspend fun autoDelete(`value`: Output) {
        this.autoDelete = value
    }

    /**
     * @param value Indicates that this is a boot disk.
     */
    @JvmName("rxltvkvmyfyoxnmb")
    public suspend fun boot(`value`: Output) {
        this.boot = value
    }

    /**
     * @param value A unique device name that is reflected into the
     * /dev/  tree of a Linux operating system running within the instance. If not
     * specified, the server chooses a default device name to apply to this disk.
     */
    @JvmName("efobfqwgveidnoev")
    public suspend fun deviceName(`value`: Output) {
        this.deviceName = value
    }

    /**
     * @param value Encrypts or decrypts a disk using a customer-supplied encryption key.
     * If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
     * If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
     * If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
     * Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.
     */
    @JvmName("bfpxasuqjofrvlgg")
    public suspend fun diskEncryptionKey(`value`: Output) {
        this.diskEncryptionKey = value
    }

    /**
     * @param value Name of the disk. When not provided, this defaults
     * to the name of the instance.
     */
    @JvmName("ibpexioiaxlncfwl")
    public suspend fun diskName(`value`: Output) {
        this.diskName = value
    }

    /**
     * @param value The size of the image in gigabytes. If not
     * specified, it will inherit the size of its base image. For SCRATCH disks,
     * the size must be exactly 375GB.
     */
    @JvmName("fbvhfmykefkpbfcd")
    public suspend fun diskSizeGb(`value`: Output) {
        this.diskSizeGb = value
    }

    /**
     * @param value The GCE disk type. Such as `"pd-ssd"`, `"local-ssd"`,
     * `"pd-balanced"` or `"pd-standard"`, `"hyperdisk-balanced"`, `"hyperdisk-throughput"` or `"hyperdisk-extreme"`.
     */
    @JvmName("jtspukhvcggtswer")
    public suspend fun diskType(`value`: Output) {
        this.diskType = value
    }

    /**
     * @param value Specifies the disk interface to use for attaching this disk,
     * which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI
     * and the request will fail if you attempt to attach a persistent disk in any other format
     * than SCSI. Local SSDs can use either NVME or SCSI.
     */
    @JvmName("krycivfihtmbuuvx")
    public suspend fun `interface`(`value`: Output) {
        this.`interface` = value
    }

    /**
     * @param value A set of ket/value label pairs to assign to disk created from
     * this template
     */
    @JvmName("hsrujgenxsugnffk")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value The mode in which to attach this disk, either READ_WRITE
     * or READ_ONLY. If you are attaching or creating a boot disk, this must
     * read-write mode.
     */
    @JvmName("ikeuyrerrnfaaokx")
    public suspend fun mode(`value`: Output) {
        this.mode = value
    }

    /**
     * @param value Indicates how many IOPS to provision for the disk. This
     * sets the number of I/O operations per second that the disk can handle.
     * Values must be between 10,000 and 120,000. For more details, see the
     * [Extreme persistent disk documentation](https://cloud.google.com/compute/docs/disks/extreme-persistent-disk).
     */
    @JvmName("qwxllweyopjbfxeh")
    public suspend fun provisionedIops(`value`: Output) {
        this.provisionedIops = value
    }

    /**
     * @param value A set of key/value resource manager tag pairs to bind to this disk. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
     */
    @JvmName("rctixcluunpnvmrl")
    public suspend fun resourceManagerTags(`value`: Output>) {
        this.resourceManagerTags = value
    }

    /**
     * @param value - A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
     */
    @JvmName("egbejehsmgqskxhm")
    public suspend fun resourcePolicies(`value`: Output) {
        this.resourcePolicies = value
    }

    /**
     * @param value The name (**not self_link**)
     * of the disk (such as those managed by `gcp.compute.Disk`) to attach.
     * > **Note:** Either `source`, `source_image`, or `source_snapshot` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     */
    @JvmName("mtgbtcuiqalmyxel")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value The image from which to
     * initialize this disk. This can be one of: the image's `self_link`,
     * `projects/{project}/global/images/{image}`,
     * `projects/{project}/global/images/family/{family}`, `global/images/{image}`,
     * `global/images/family/{family}`, `family/{family}`, `{project}/{family}`,
     * `{project}/{image}`, `{family}`, or `{image}`.
     * > **Note:** Either `source`, `source_image`, or `source_snapshot` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     */
    @JvmName("qvxfelhxgvbukkmp")
    public suspend fun sourceImage(`value`: Output) {
        this.sourceImage = value
    }

    /**
     * @param value The customer-supplied encryption
     * key of the source image. Required if the source image is protected by a
     * customer-supplied encryption key.
     * Instance templates do not store customer-supplied encryption keys, so you
     * cannot create disks for instances in a managed instance group if the source
     * images are encrypted with your own keys. Structure
     * documented below.
     */
    @JvmName("pgxjfmyllgruysmg")
    public suspend fun sourceImageEncryptionKey(`value`: Output) {
        this.sourceImageEncryptionKey = value
    }

    /**
     * @param value The source snapshot to create this disk.
     * > **Note:** Either `source`, `source_image`, or `source_snapshot` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     */
    @JvmName("kiwubdlslwrjsnwa")
    public suspend fun sourceSnapshot(`value`: Output) {
        this.sourceSnapshot = value
    }

    /**
     * @param value The customer-supplied encryption
     * key of the source snapshot. Structure
     * documented below.
     */
    @JvmName("wkndnaikyqkvafyo")
    public suspend fun sourceSnapshotEncryptionKey(`value`: Output) {
        this.sourceSnapshotEncryptionKey = value
    }

    /**
     * @param value The type of GCE disk, can be either `"SCRATCH"` or
     * `"PERSISTENT"`.
     */
    @JvmName("nnfdgcngdtapdkvf")
    public suspend fun type(`value`: Output) {
        this.type = value
    }

    /**
     * @param value Whether or not the disk should be auto-deleted.
     * This defaults to true.
     */
    @JvmName("hjsgxlbncfgeuthq")
    public suspend fun autoDelete(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoDelete = mapped
    }

    /**
     * @param value Indicates that this is a boot disk.
     */
    @JvmName("egaokiktuenlxvyh")
    public suspend fun boot(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.boot = mapped
    }

    /**
     * @param value A unique device name that is reflected into the
     * /dev/  tree of a Linux operating system running within the instance. If not
     * specified, the server chooses a default device name to apply to this disk.
     */
    @JvmName("atntfocjjgwdaxgk")
    public suspend fun deviceName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.deviceName = mapped
    }

    /**
     * @param value Encrypts or decrypts a disk using a customer-supplied encryption key.
     * If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
     * If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
     * If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
     * Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.
     */
    @JvmName("eanvikvjgjafbjxk")
    public suspend fun diskEncryptionKey(`value`: InstanceTemplateDiskDiskEncryptionKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskEncryptionKey = mapped
    }

    /**
     * @param argument Encrypts or decrypts a disk using a customer-supplied encryption key.
     * If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.
     * If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.
     * If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.
     * Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.
     */
    @JvmName("fjjtxchpvjdweaaw")
    public suspend fun diskEncryptionKey(argument: suspend InstanceTemplateDiskDiskEncryptionKeyArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceTemplateDiskDiskEncryptionKeyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.diskEncryptionKey = mapped
    }

    /**
     * @param value Name of the disk. When not provided, this defaults
     * to the name of the instance.
     */
    @JvmName("vricqvelfdybxrge")
    public suspend fun diskName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskName = mapped
    }

    /**
     * @param value The size of the image in gigabytes. If not
     * specified, it will inherit the size of its base image. For SCRATCH disks,
     * the size must be exactly 375GB.
     */
    @JvmName("trakwrhrcrvnjmap")
    public suspend fun diskSizeGb(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskSizeGb = mapped
    }

    /**
     * @param value The GCE disk type. Such as `"pd-ssd"`, `"local-ssd"`,
     * `"pd-balanced"` or `"pd-standard"`, `"hyperdisk-balanced"`, `"hyperdisk-throughput"` or `"hyperdisk-extreme"`.
     */
    @JvmName("qpfahotxscxitpbk")
    public suspend fun diskType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskType = mapped
    }

    /**
     * @param value Specifies the disk interface to use for attaching this disk,
     * which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI
     * and the request will fail if you attempt to attach a persistent disk in any other format
     * than SCSI. Local SSDs can use either NVME or SCSI.
     */
    @JvmName("owyffbefxrnslchh")
    public suspend fun `interface`(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.`interface` = mapped
    }

    /**
     * @param value A set of ket/value label pairs to assign to disk created from
     * this template
     */
    @JvmName("qpfnoqfnqomyjlji")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values A set of ket/value label pairs to assign to disk created from
     * this template
     */
    @JvmName("hgprdeloxjqunkxk")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value The mode in which to attach this disk, either READ_WRITE
     * or READ_ONLY. If you are attaching or creating a boot disk, this must
     * read-write mode.
     */
    @JvmName("ehrtyolaoygwyxiw")
    public suspend fun mode(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.mode = mapped
    }

    /**
     * @param value Indicates how many IOPS to provision for the disk. This
     * sets the number of I/O operations per second that the disk can handle.
     * Values must be between 10,000 and 120,000. For more details, see the
     * [Extreme persistent disk documentation](https://cloud.google.com/compute/docs/disks/extreme-persistent-disk).
     */
    @JvmName("lovpdmowtadkmryd")
    public suspend fun provisionedIops(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.provisionedIops = mapped
    }

    /**
     * @param value A set of key/value resource manager tag pairs to bind to this disk. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
     */
    @JvmName("cpbwhurfrgbaqsqi")
    public suspend fun resourceManagerTags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourceManagerTags = mapped
    }

    /**
     * @param values A set of key/value resource manager tag pairs to bind to this disk. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456.
     */
    @JvmName("puosvrwqnyymodxx")
    public fun resourceManagerTags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.resourceManagerTags = mapped
    }

    /**
     * @param value - A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
     */
    @JvmName("ulcikjkkvrdsffcp")
    public suspend fun resourcePolicies(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resourcePolicies = mapped
    }

    /**
     * @param value The name (**not self_link**)
     * of the disk (such as those managed by `gcp.compute.Disk`) to attach.
     * > **Note:** Either `source`, `source_image`, or `source_snapshot` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     */
    @JvmName("dlxvvjljldmtqmxq")
    public suspend fun source(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param value The image from which to
     * initialize this disk. This can be one of: the image's `self_link`,
     * `projects/{project}/global/images/{image}`,
     * `projects/{project}/global/images/family/{family}`, `global/images/{image}`,
     * `global/images/family/{family}`, `family/{family}`, `{project}/{family}`,
     * `{project}/{image}`, `{family}`, or `{image}`.
     * > **Note:** Either `source`, `source_image`, or `source_snapshot` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     */
    @JvmName("bfltjxuwjujffhcl")
    public suspend fun sourceImage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceImage = mapped
    }

    /**
     * @param value The customer-supplied encryption
     * key of the source image. Required if the source image is protected by a
     * customer-supplied encryption key.
     * Instance templates do not store customer-supplied encryption keys, so you
     * cannot create disks for instances in a managed instance group if the source
     * images are encrypted with your own keys. Structure
     * documented below.
     */
    @JvmName("ytyxvnpibcdrkhnb")
    public suspend fun sourceImageEncryptionKey(`value`: InstanceTemplateDiskSourceImageEncryptionKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceImageEncryptionKey = mapped
    }

    /**
     * @param argument The customer-supplied encryption
     * key of the source image. Required if the source image is protected by a
     * customer-supplied encryption key.
     * Instance templates do not store customer-supplied encryption keys, so you
     * cannot create disks for instances in a managed instance group if the source
     * images are encrypted with your own keys. Structure
     * documented below.
     */
    @JvmName("vqthevirpogyrets")
    public suspend fun sourceImageEncryptionKey(argument: suspend InstanceTemplateDiskSourceImageEncryptionKeyArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceTemplateDiskSourceImageEncryptionKeyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.sourceImageEncryptionKey = mapped
    }

    /**
     * @param value The source snapshot to create this disk.
     * > **Note:** Either `source`, `source_image`, or `source_snapshot` is **required** in a disk block unless the disk type is `local-ssd`. Check the API [docs](https://cloud.google.com/compute/docs/reference/rest/v1/instanceTemplates/insert) for details.
     */
    @JvmName("wdiiougojfoyjmjr")
    public suspend fun sourceSnapshot(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceSnapshot = mapped
    }

    /**
     * @param value The customer-supplied encryption
     * key of the source snapshot. Structure
     * documented below.
     */
    @JvmName("mmdcaxxefwgudauq")
    public suspend fun sourceSnapshotEncryptionKey(`value`: InstanceTemplateDiskSourceSnapshotEncryptionKeyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.sourceSnapshotEncryptionKey = mapped
    }

    /**
     * @param argument The customer-supplied encryption
     * key of the source snapshot. Structure
     * documented below.
     */
    @JvmName("fogareuargenhdbr")
    public suspend fun sourceSnapshotEncryptionKey(argument: suspend InstanceTemplateDiskSourceSnapshotEncryptionKeyArgsBuilder.() -> Unit) {
        val toBeMapped = InstanceTemplateDiskSourceSnapshotEncryptionKeyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.sourceSnapshotEncryptionKey = mapped
    }

    /**
     * @param value The type of GCE disk, can be either `"SCRATCH"` or
     * `"PERSISTENT"`.
     */
    @JvmName("nbfcvporroqfujoa")
    public suspend fun type(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.type = mapped
    }

    internal fun build(): InstanceTemplateDiskArgs = InstanceTemplateDiskArgs(
        autoDelete = autoDelete,
        boot = boot,
        deviceName = deviceName,
        diskEncryptionKey = diskEncryptionKey,
        diskName = diskName,
        diskSizeGb = diskSizeGb,
        diskType = diskType,
        `interface` = `interface`,
        labels = labels,
        mode = mode,
        provisionedIops = provisionedIops,
        resourceManagerTags = resourceManagerTags,
        resourcePolicies = resourcePolicies,
        source = source,
        sourceImage = sourceImage,
        sourceImageEncryptionKey = sourceImageEncryptionKey,
        sourceSnapshot = sourceSnapshot,
        sourceSnapshotEncryptionKey = sourceSnapshotEncryptionKey,
        type = type,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy