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

com.pulumi.gcp.compute.kotlin.outputs.GetInstanceTemplateDisk.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.10.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.compute.kotlin.outputs

import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map

/**
 *
 * @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 diskEncryptionKeys Encrypts or decrypts a disk using a customer-supplied encryption key.
 * @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"`.
 * @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 (Optional) 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 map of resource manager tags. Resource manager tag keys and values have the same definition as resource manager tags. Keys must be in the format tagKeys/{tag_key_id}, and values are in the format tagValues/456. The field is ignored (both PUT & PATCH) when empty.
 * @property resourcePolicies (Optional) -- A list of short names 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` or `source_image` 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` or `source_image` 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 sourceImageEncryptionKeys 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.
 * @property sourceSnapshot The source snapshot to create this disk. When creating
 * a new instance, one of initializeParams.sourceSnapshot,
 * initializeParams.sourceImage, or disks.source is
 * required except for local SSD.
 * @property sourceSnapshotEncryptionKeys The customer-supplied encryption key of the source snapshot.
 * @property type The accelerator type resource to expose to this instance. E.g. `nvidia-tesla-k80`.
 */
public data class GetInstanceTemplateDisk(
    public val autoDelete: Boolean,
    public val boot: Boolean,
    public val deviceName: String,
    public val diskEncryptionKeys: List,
    public val diskName: String,
    public val diskSizeGb: Int,
    public val diskType: String,
    public val `interface`: String,
    public val labels: Map,
    public val mode: String,
    public val provisionedIops: Int,
    public val resourceManagerTags: Map,
    public val resourcePolicies: List,
    public val source: String,
    public val sourceImage: String,
    public val sourceImageEncryptionKeys: List,
    public val sourceSnapshot: String,
    public val sourceSnapshotEncryptionKeys: List,
    public val type: String,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.compute.outputs.GetInstanceTemplateDisk): GetInstanceTemplateDisk = GetInstanceTemplateDisk(
            autoDelete = javaType.autoDelete(),
            boot = javaType.boot(),
            deviceName = javaType.deviceName(),
            diskEncryptionKeys = javaType.diskEncryptionKeys().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.compute.kotlin.outputs.GetInstanceTemplateDiskDiskEncryptionKey.Companion.toKotlin(args0)
                })
            }),
            diskName = javaType.diskName(),
            diskSizeGb = javaType.diskSizeGb(),
            diskType = javaType.diskType(),
            `interface` = javaType.interface_(),
            labels = javaType.labels().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            mode = javaType.mode(),
            provisionedIops = javaType.provisionedIops(),
            resourceManagerTags = javaType.resourceManagerTags().map({ args0 ->
                args0.key.to(args0.value)
            }).toMap(),
            resourcePolicies = javaType.resourcePolicies().map({ args0 -> args0 }),
            source = javaType.source(),
            sourceImage = javaType.sourceImage(),
            sourceImageEncryptionKeys = javaType.sourceImageEncryptionKeys().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.compute.kotlin.outputs.GetInstanceTemplateDiskSourceImageEncryptionKey.Companion.toKotlin(args0)
                })
            }),
            sourceSnapshot = javaType.sourceSnapshot(),
            sourceSnapshotEncryptionKeys = javaType.sourceSnapshotEncryptionKeys().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.gcp.compute.kotlin.outputs.GetInstanceTemplateDiskSourceSnapshotEncryptionKey.Companion.toKotlin(args0)
                })
            }),
            type = javaType.type(),
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy