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

com.pulumi.gcp.compute.kotlin.outputs.InstanceAttachedDisk.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.outputs

import kotlin.String
import kotlin.Suppress

/**
 *
 * @property deviceName Name with which the attached disk will be accessible
 * under `/dev/disk/by-id/google-*`
 * @property diskEncryptionKeyRaw A 256-bit [customer-supplied encryption key]
 * (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption),
 * encoded in [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4)
 * to encrypt this disk. Only one of `kms_key_self_link` and `disk_encryption_key_raw` may be set.
 * @property diskEncryptionKeySha256 The [RFC 4648 base64](https://tools.ietf.org/html/rfc4648#section-4)
 * encoded SHA-256 hash of the [customer-supplied encryption key]
 * (https://cloud.google.com/compute/docs/disks/customer-supplied-encryption) that protects this resource.
 * @property kmsKeySelfLink The self_link of the encryption key that is
 * stored in Google Cloud KMS to encrypt this disk. Only one of `kms_key_self_link`
 * and `disk_encryption_key_raw` may be set.
 * @property mode Either "READ_ONLY" or "READ_WRITE", defaults to "READ_WRITE"
 * If you have a persistent disk with data that you want to share
 * between multiple instances, detach it from any read-write instances and
 * attach it to one or more instances in read-only mode.
 * @property source The name or self_link of the disk to attach to this instance.
 */
public data class InstanceAttachedDisk(
    public val deviceName: String? = null,
    public val diskEncryptionKeyRaw: String? = null,
    public val diskEncryptionKeySha256: String? = null,
    public val kmsKeySelfLink: String? = null,
    public val mode: String? = null,
    public val source: String,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.gcp.compute.outputs.InstanceAttachedDisk): InstanceAttachedDisk = InstanceAttachedDisk(
            deviceName = javaType.deviceName().map({ args0 -> args0 }).orElse(null),
            diskEncryptionKeyRaw = javaType.diskEncryptionKeyRaw().map({ args0 -> args0 }).orElse(null),
            diskEncryptionKeySha256 = javaType.diskEncryptionKeySha256().map({ args0 -> args0 }).orElse(null),
            kmsKeySelfLink = javaType.kmsKeySelfLink().map({ args0 -> args0 }).orElse(null),
            mode = javaType.mode().map({ args0 -> args0 }).orElse(null),
            source = javaType.source(),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy