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

com.pulumi.googlenative.notebooks.v1.kotlin.InstanceArgs.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.notebooks.v1.kotlin

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.notebooks.v1.InstanceArgs.builder
import com.pulumi.googlenative.notebooks.v1.kotlin.enums.InstanceBootDiskType
import com.pulumi.googlenative.notebooks.v1.kotlin.enums.InstanceDataDiskType
import com.pulumi.googlenative.notebooks.v1.kotlin.enums.InstanceDiskEncryption
import com.pulumi.googlenative.notebooks.v1.kotlin.enums.InstanceNicType
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.AcceleratorConfigArgs
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.AcceleratorConfigArgsBuilder
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.ContainerImageArgs
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.ContainerImageArgsBuilder
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.ReservationAffinityArgs
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.ReservationAffinityArgsBuilder
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.ShieldedInstanceConfigArgs
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.ShieldedInstanceConfigArgsBuilder
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.UpgradeHistoryEntryArgs
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.UpgradeHistoryEntryArgsBuilder
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.VmImageArgs
import com.pulumi.googlenative.notebooks.v1.kotlin.inputs.VmImageArgsBuilder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Creates a new Instance in a given project and location.
 * Auto-naming is currently not supported for this resource.
 * @property acceleratorConfig The hardware accelerator used on this instance. If you use accelerators, make sure that your configuration has [enough vCPUs and memory to support the `machine_type` you have selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
 * @property bootDiskSizeGb Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100.
 * @property bootDiskType Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).
 * @property canIpForward Optional. Flag to enable ip forwarding or not, default false/off. https://cloud.google.com/vpc/docs/using-routes#canipforward
 * @property containerImage Use a container image to start the notebook instance.
 * @property customGpuDriverPath Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.
 * @property dataDiskSizeGb Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100.
 * @property dataDiskType Input only. The type of the data disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).
 * @property diskEncryption Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
 * @property installGpuDriver Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.
 * @property instanceId Required. User-defined unique ID of this instance.
 * @property instanceOwners Input only. The owner of this instance after creation. Format: `[email protected]` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.
 * @property kmsKey Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` Learn more about [using your own encryption keys](/kms/docs/quickstart).
 * @property labels Labels to apply to this instance. These can be later modified by the setLabels method.
 * @property location
 * @property machineType The [Compute Engine machine type](https://cloud.google.com/compute/docs/machine-types) of this instance.
 * @property metadata Custom metadata to apply to this instance.
 * @property network The name of the VPC that this instance is in. Format: `projects/{project_id}/global/networks/{network_id}`
 * @property nicType Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
 * @property noProxyAccess If true, the notebook instance will not register with the proxy.
 * @property noPublicIp If true, no public IP will be assigned to this instance.
 * @property noRemoveDataDisk Input only. If true, the data disk will not be auto deleted when deleting the instance.
 * @property postStartupScript Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (`gs://path-to-file/file-name`).
 * @property project
 * @property reservationAffinity Optional. The optional reservation affinity. Setting this field will apply the specified [Zonal Compute Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) to this notebook instance.
 * @property serviceAccount The service account on this instance, giving access to other Google Cloud services. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.
 * @property serviceAccountScopes Optional. The URIs of service account scopes to be included in Compute Engine instances. If not specified, the following [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) are defined: - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute
 * @property shieldedInstanceConfig Optional. Shielded VM configuration. [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
 * @property subnet The name of the subnet that this instance is in. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
 * @property tags Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
 * @property upgradeHistory The upgrade history of this instance.
 * @property vmImage Use a Compute Engine VM image to start the notebook instance.
 */
public data class InstanceArgs(
    public val acceleratorConfig: Output? = null,
    public val bootDiskSizeGb: Output? = null,
    public val bootDiskType: Output? = null,
    public val canIpForward: Output? = null,
    public val containerImage: Output? = null,
    public val customGpuDriverPath: Output? = null,
    public val dataDiskSizeGb: Output? = null,
    public val dataDiskType: Output? = null,
    public val diskEncryption: Output? = null,
    public val installGpuDriver: Output? = null,
    public val instanceId: Output? = null,
    public val instanceOwners: Output>? = null,
    public val kmsKey: Output? = null,
    public val labels: Output>? = null,
    public val location: Output? = null,
    public val machineType: Output? = null,
    public val metadata: Output>? = null,
    public val network: Output? = null,
    public val nicType: Output? = null,
    public val noProxyAccess: Output? = null,
    public val noPublicIp: Output? = null,
    public val noRemoveDataDisk: Output? = null,
    public val postStartupScript: Output? = null,
    public val project: Output? = null,
    public val reservationAffinity: Output? = null,
    public val serviceAccount: Output? = null,
    public val serviceAccountScopes: Output>? = null,
    public val shieldedInstanceConfig: Output? = null,
    public val subnet: Output? = null,
    public val tags: Output>? = null,
    public val upgradeHistory: Output>? = null,
    public val vmImage: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.notebooks.v1.InstanceArgs =
        com.pulumi.googlenative.notebooks.v1.InstanceArgs.builder()
            .acceleratorConfig(acceleratorConfig?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .bootDiskSizeGb(bootDiskSizeGb?.applyValue({ args0 -> args0 }))
            .bootDiskType(bootDiskType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .canIpForward(canIpForward?.applyValue({ args0 -> args0 }))
            .containerImage(containerImage?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .customGpuDriverPath(customGpuDriverPath?.applyValue({ args0 -> args0 }))
            .dataDiskSizeGb(dataDiskSizeGb?.applyValue({ args0 -> args0 }))
            .dataDiskType(dataDiskType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .diskEncryption(diskEncryption?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .installGpuDriver(installGpuDriver?.applyValue({ args0 -> args0 }))
            .instanceId(instanceId?.applyValue({ args0 -> args0 }))
            .instanceOwners(instanceOwners?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .kmsKey(kmsKey?.applyValue({ args0 -> args0 }))
            .labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .location(location?.applyValue({ args0 -> args0 }))
            .machineType(machineType?.applyValue({ args0 -> args0 }))
            .metadata(
                metadata?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .network(network?.applyValue({ args0 -> args0 }))
            .nicType(nicType?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .noProxyAccess(noProxyAccess?.applyValue({ args0 -> args0 }))
            .noPublicIp(noPublicIp?.applyValue({ args0 -> args0 }))
            .noRemoveDataDisk(noRemoveDataDisk?.applyValue({ args0 -> args0 }))
            .postStartupScript(postStartupScript?.applyValue({ args0 -> args0 }))
            .project(project?.applyValue({ args0 -> args0 }))
            .reservationAffinity(
                reservationAffinity?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .serviceAccount(serviceAccount?.applyValue({ args0 -> args0 }))
            .serviceAccountScopes(serviceAccountScopes?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .shieldedInstanceConfig(
                shieldedInstanceConfig?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .subnet(subnet?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .upgradeHistory(
                upgradeHistory?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .vmImage(vmImage?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [InstanceArgs].
 */
@PulumiTagMarker
public class InstanceArgsBuilder internal constructor() {
    private var acceleratorConfig: Output? = null

    private var bootDiskSizeGb: Output? = null

    private var bootDiskType: Output? = null

    private var canIpForward: Output? = null

    private var containerImage: Output? = null

    private var customGpuDriverPath: Output? = null

    private var dataDiskSizeGb: Output? = null

    private var dataDiskType: Output? = null

    private var diskEncryption: Output? = null

    private var installGpuDriver: Output? = null

    private var instanceId: Output? = null

    private var instanceOwners: Output>? = null

    private var kmsKey: Output? = null

    private var labels: Output>? = null

    private var location: Output? = null

    private var machineType: Output? = null

    private var metadata: Output>? = null

    private var network: Output? = null

    private var nicType: Output? = null

    private var noProxyAccess: Output? = null

    private var noPublicIp: Output? = null

    private var noRemoveDataDisk: Output? = null

    private var postStartupScript: Output? = null

    private var project: Output? = null

    private var reservationAffinity: Output? = null

    private var serviceAccount: Output? = null

    private var serviceAccountScopes: Output>? = null

    private var shieldedInstanceConfig: Output? = null

    private var subnet: Output? = null

    private var tags: Output>? = null

    private var upgradeHistory: Output>? = null

    private var vmImage: Output? = null

    /**
     * @param value The hardware accelerator used on this instance. If you use accelerators, make sure that your configuration has [enough vCPUs and memory to support the `machine_type` you have selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     */
    @JvmName("ttahpxtxkalypskh")
    public suspend fun acceleratorConfig(`value`: Output) {
        this.acceleratorConfig = value
    }

    /**
     * @param value Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100.
     */
    @JvmName("uykhpgfqqwrijscp")
    public suspend fun bootDiskSizeGb(`value`: Output) {
        this.bootDiskSizeGb = value
    }

    /**
     * @param value Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).
     */
    @JvmName("fomtoialpxotwblk")
    public suspend fun bootDiskType(`value`: Output) {
        this.bootDiskType = value
    }

    /**
     * @param value Optional. Flag to enable ip forwarding or not, default false/off. https://cloud.google.com/vpc/docs/using-routes#canipforward
     */
    @JvmName("olmowbeuekujusts")
    public suspend fun canIpForward(`value`: Output) {
        this.canIpForward = value
    }

    /**
     * @param value Use a container image to start the notebook instance.
     */
    @JvmName("lgmnmaiohfwbhska")
    public suspend fun containerImage(`value`: Output) {
        this.containerImage = value
    }

    /**
     * @param value Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.
     */
    @JvmName("djnhbyrsfgvteldx")
    public suspend fun customGpuDriverPath(`value`: Output) {
        this.customGpuDriverPath = value
    }

    /**
     * @param value Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100.
     */
    @JvmName("swctdladoeyamggk")
    public suspend fun dataDiskSizeGb(`value`: Output) {
        this.dataDiskSizeGb = value
    }

    /**
     * @param value Input only. The type of the data disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).
     */
    @JvmName("dtlqnmhmpoubqrca")
    public suspend fun dataDiskType(`value`: Output) {
        this.dataDiskType = value
    }

    /**
     * @param value Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
     */
    @JvmName("llgfkysbaluvppkq")
    public suspend fun diskEncryption(`value`: Output) {
        this.diskEncryption = value
    }

    /**
     * @param value Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.
     */
    @JvmName("igrsujogefjgomds")
    public suspend fun installGpuDriver(`value`: Output) {
        this.installGpuDriver = value
    }

    /**
     * @param value Required. User-defined unique ID of this instance.
     */
    @JvmName("fmnbybeecuxxtksc")
    public suspend fun instanceId(`value`: Output) {
        this.instanceId = value
    }

    /**
     * @param value Input only. The owner of this instance after creation. Format: `[email protected]` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.
     */
    @JvmName("rvcnlbscvwpdxbsk")
    public suspend fun instanceOwners(`value`: Output>) {
        this.instanceOwners = value
    }

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

    /**
     * @param values Input only. The owner of this instance after creation. Format: `[email protected]` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.
     */
    @JvmName("qdksxrpmldqwvhcw")
    public suspend fun instanceOwners(values: List>) {
        this.instanceOwners = Output.all(values)
    }

    /**
     * @param value Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` Learn more about [using your own encryption keys](/kms/docs/quickstart).
     */
    @JvmName("bjabecyjlpindjbh")
    public suspend fun kmsKey(`value`: Output) {
        this.kmsKey = value
    }

    /**
     * @param value Labels to apply to this instance. These can be later modified by the setLabels method.
     */
    @JvmName("aubdxrgfibknvdon")
    public suspend fun labels(`value`: Output>) {
        this.labels = value
    }

    /**
     * @param value
     */
    @JvmName("mmkslvmvpjjpmedw")
    public suspend fun location(`value`: Output) {
        this.location = value
    }

    /**
     * @param value The [Compute Engine machine type](https://cloud.google.com/compute/docs/machine-types) of this instance.
     */
    @JvmName("uwbrnxfthsdabfow")
    public suspend fun machineType(`value`: Output) {
        this.machineType = value
    }

    /**
     * @param value Custom metadata to apply to this instance.
     */
    @JvmName("wjtrdkqlixhakatc")
    public suspend fun metadata(`value`: Output>) {
        this.metadata = value
    }

    /**
     * @param value The name of the VPC that this instance is in. Format: `projects/{project_id}/global/networks/{network_id}`
     */
    @JvmName("pitaakntjobofkml")
    public suspend fun network(`value`: Output) {
        this.network = value
    }

    /**
     * @param value Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
     */
    @JvmName("wjcsmaxlmtaiutkq")
    public suspend fun nicType(`value`: Output) {
        this.nicType = value
    }

    /**
     * @param value If true, the notebook instance will not register with the proxy.
     */
    @JvmName("rlbxjmgkaqwdrgnc")
    public suspend fun noProxyAccess(`value`: Output) {
        this.noProxyAccess = value
    }

    /**
     * @param value If true, no public IP will be assigned to this instance.
     */
    @JvmName("rejqarinsjidygfn")
    public suspend fun noPublicIp(`value`: Output) {
        this.noPublicIp = value
    }

    /**
     * @param value Input only. If true, the data disk will not be auto deleted when deleting the instance.
     */
    @JvmName("ngmnkrloubbgalbd")
    public suspend fun noRemoveDataDisk(`value`: Output) {
        this.noRemoveDataDisk = value
    }

    /**
     * @param value Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (`gs://path-to-file/file-name`).
     */
    @JvmName("wphteemblvrxjdig")
    public suspend fun postStartupScript(`value`: Output) {
        this.postStartupScript = value
    }

    /**
     * @param value
     */
    @JvmName("kfxrqtvekjltgenj")
    public suspend fun project(`value`: Output) {
        this.project = value
    }

    /**
     * @param value Optional. The optional reservation affinity. Setting this field will apply the specified [Zonal Compute Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) to this notebook instance.
     */
    @JvmName("mldlwvkqknefshbe")
    public suspend fun reservationAffinity(`value`: Output) {
        this.reservationAffinity = value
    }

    /**
     * @param value The service account on this instance, giving access to other Google Cloud services. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.
     */
    @JvmName("rnrexpwmmrmtwbkj")
    public suspend fun serviceAccount(`value`: Output) {
        this.serviceAccount = value
    }

    /**
     * @param value Optional. The URIs of service account scopes to be included in Compute Engine instances. If not specified, the following [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) are defined: - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute
     */
    @JvmName("drscoloqonyehqox")
    public suspend fun serviceAccountScopes(`value`: Output>) {
        this.serviceAccountScopes = value
    }

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

    /**
     * @param values Optional. The URIs of service account scopes to be included in Compute Engine instances. If not specified, the following [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) are defined: - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute
     */
    @JvmName("jtasawpjgjkmblff")
    public suspend fun serviceAccountScopes(values: List>) {
        this.serviceAccountScopes = Output.all(values)
    }

    /**
     * @param value Optional. Shielded VM configuration. [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     */
    @JvmName("rgtffkjeithpyanp")
    public suspend fun shieldedInstanceConfig(`value`: Output) {
        this.shieldedInstanceConfig = value
    }

    /**
     * @param value The name of the subnet that this instance is in. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
     */
    @JvmName("fgxpmywylgctwqjd")
    public suspend fun subnet(`value`: Output) {
        this.subnet = value
    }

    /**
     * @param value Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     */
    @JvmName("tutoxpdsyrvmgiot")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     */
    @JvmName("ibhkwkvymhucwmet")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The upgrade history of this instance.
     */
    @JvmName("klywmfypdjvkdyqt")
    public suspend fun upgradeHistory(`value`: Output>) {
        this.upgradeHistory = value
    }

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

    /**
     * @param values The upgrade history of this instance.
     */
    @JvmName("vwgyixrtfphomgrn")
    public suspend fun upgradeHistory(values: List>) {
        this.upgradeHistory = Output.all(values)
    }

    /**
     * @param value Use a Compute Engine VM image to start the notebook instance.
     */
    @JvmName("bgtfyootnhddxbcq")
    public suspend fun vmImage(`value`: Output) {
        this.vmImage = value
    }

    /**
     * @param value The hardware accelerator used on this instance. If you use accelerators, make sure that your configuration has [enough vCPUs and memory to support the `machine_type` you have selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     */
    @JvmName("jrbogymrqhejiaqk")
    public suspend fun acceleratorConfig(`value`: AcceleratorConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.acceleratorConfig = mapped
    }

    /**
     * @param argument The hardware accelerator used on this instance. If you use accelerators, make sure that your configuration has [enough vCPUs and memory to support the `machine_type` you have selected](https://cloud.google.com/compute/docs/gpus/#gpus-list).
     */
    @JvmName("aeuaoiokxshugfib")
    public suspend fun acceleratorConfig(argument: suspend AcceleratorConfigArgsBuilder.() -> Unit) {
        val toBeMapped = AcceleratorConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.acceleratorConfig = mapped
    }

    /**
     * @param value Input only. The size of the boot disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). The minimum recommended value is 100 GB. If not specified, this defaults to 100.
     */
    @JvmName("suspaqvnjteteaqa")
    public suspend fun bootDiskSizeGb(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bootDiskSizeGb = mapped
    }

    /**
     * @param value Input only. The type of the boot disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).
     */
    @JvmName("vdvkweswqbumfgsy")
    public suspend fun bootDiskType(`value`: InstanceBootDiskType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.bootDiskType = mapped
    }

    /**
     * @param value Optional. Flag to enable ip forwarding or not, default false/off. https://cloud.google.com/vpc/docs/using-routes#canipforward
     */
    @JvmName("gvmjxpraahtrusou")
    public suspend fun canIpForward(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.canIpForward = mapped
    }

    /**
     * @param value Use a container image to start the notebook instance.
     */
    @JvmName("nsyqpbpbjtrwbnuh")
    public suspend fun containerImage(`value`: ContainerImageArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerImage = mapped
    }

    /**
     * @param argument Use a container image to start the notebook instance.
     */
    @JvmName("vqsqntshyentmter")
    public suspend fun containerImage(argument: suspend ContainerImageArgsBuilder.() -> Unit) {
        val toBeMapped = ContainerImageArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.containerImage = mapped
    }

    /**
     * @param value Specify a custom Cloud Storage path where the GPU driver is stored. If not specified, we'll automatically choose from official GPU drivers.
     */
    @JvmName("jrcfpavonbwemoyf")
    public suspend fun customGpuDriverPath(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customGpuDriverPath = mapped
    }

    /**
     * @param value Input only. The size of the data disk in GB attached to this instance, up to a maximum of 64000 GB (64 TB). You can choose the size of the data disk based on how big your notebooks and data are. If not specified, this defaults to 100.
     */
    @JvmName("nicddougdagweund")
    public suspend fun dataDiskSizeGb(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataDiskSizeGb = mapped
    }

    /**
     * @param value Input only. The type of the data disk attached to this instance, defaults to standard persistent disk (`PD_STANDARD`).
     */
    @JvmName("sljrsgkdpwpdxrpa")
    public suspend fun dataDiskType(`value`: InstanceDataDiskType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dataDiskType = mapped
    }

    /**
     * @param value Input only. Disk encryption method used on the boot and data disks, defaults to GMEK.
     */
    @JvmName("bsafcmdioyannbij")
    public suspend fun diskEncryption(`value`: InstanceDiskEncryption?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.diskEncryption = mapped
    }

    /**
     * @param value Whether the end user authorizes Google Cloud to install GPU driver on this instance. If this field is empty or set to false, the GPU driver won't be installed. Only applicable to instances with GPUs.
     */
    @JvmName("bajdejcrsdujhovj")
    public suspend fun installGpuDriver(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.installGpuDriver = mapped
    }

    /**
     * @param value Required. User-defined unique ID of this instance.
     */
    @JvmName("nmfnbpuatxkijisb")
    public suspend fun instanceId(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceId = mapped
    }

    /**
     * @param value Input only. The owner of this instance after creation. Format: `[email protected]` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.
     */
    @JvmName("epjbwtblanwgdvow")
    public suspend fun instanceOwners(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceOwners = mapped
    }

    /**
     * @param values Input only. The owner of this instance after creation. Format: `[email protected]` Currently supports one owner only. If not specified, all of the service account users of your VM instance's service account can use the instance.
     */
    @JvmName("wdwyusklarlxbrar")
    public suspend fun instanceOwners(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.instanceOwners = mapped
    }

    /**
     * @param value Input only. The KMS key used to encrypt the disks, only applicable if disk_encryption is CMEK. Format: `projects/{project_id}/locations/{location}/keyRings/{key_ring_id}/cryptoKeys/{key_id}` Learn more about [using your own encryption keys](/kms/docs/quickstart).
     */
    @JvmName("cqxlwdusxqovwbee")
    public suspend fun kmsKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.kmsKey = mapped
    }

    /**
     * @param value Labels to apply to this instance. These can be later modified by the setLabels method.
     */
    @JvmName("bhkkbsgahusqtsaq")
    public suspend fun labels(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param values Labels to apply to this instance. These can be later modified by the setLabels method.
     */
    @JvmName("teegmkulxbytclwj")
    public fun labels(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.labels = mapped
    }

    /**
     * @param value
     */
    @JvmName("jymiuwgkolsrpiwk")
    public suspend fun location(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.location = mapped
    }

    /**
     * @param value The [Compute Engine machine type](https://cloud.google.com/compute/docs/machine-types) of this instance.
     */
    @JvmName("bfubkscfhjjvoojx")
    public suspend fun machineType(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.machineType = mapped
    }

    /**
     * @param value Custom metadata to apply to this instance.
     */
    @JvmName("eslefyurjanmfgxw")
    public suspend fun metadata(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param values Custom metadata to apply to this instance.
     */
    @JvmName("snfqdfsktgdeubfq")
    public fun metadata(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param value The name of the VPC that this instance is in. Format: `projects/{project_id}/global/networks/{network_id}`
     */
    @JvmName("vucsbldjtjiwvstk")
    public suspend fun network(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.network = mapped
    }

    /**
     * @param value Optional. The type of vNIC to be used on this interface. This may be gVNIC or VirtioNet.
     */
    @JvmName("assvrfofqdbknhhp")
    public suspend fun nicType(`value`: InstanceNicType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nicType = mapped
    }

    /**
     * @param value If true, the notebook instance will not register with the proxy.
     */
    @JvmName("opdtkwntpvmqvjqr")
    public suspend fun noProxyAccess(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noProxyAccess = mapped
    }

    /**
     * @param value If true, no public IP will be assigned to this instance.
     */
    @JvmName("oatfcihhvdmvwomg")
    public suspend fun noPublicIp(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noPublicIp = mapped
    }

    /**
     * @param value Input only. If true, the data disk will not be auto deleted when deleting the instance.
     */
    @JvmName("xhqyihxmbajowbec")
    public suspend fun noRemoveDataDisk(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.noRemoveDataDisk = mapped
    }

    /**
     * @param value Path to a Bash script that automatically runs after a notebook instance fully boots up. The path must be a URL or Cloud Storage path (`gs://path-to-file/file-name`).
     */
    @JvmName("dhgruhdoabfafycc")
    public suspend fun postStartupScript(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.postStartupScript = mapped
    }

    /**
     * @param value
     */
    @JvmName("uytghglhphdyttrp")
    public suspend fun project(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.project = mapped
    }

    /**
     * @param value Optional. The optional reservation affinity. Setting this field will apply the specified [Zonal Compute Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) to this notebook instance.
     */
    @JvmName("nyjqsdxgyketdyts")
    public suspend fun reservationAffinity(`value`: ReservationAffinityArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.reservationAffinity = mapped
    }

    /**
     * @param argument Optional. The optional reservation affinity. Setting this field will apply the specified [Zonal Compute Reservation](https://cloud.google.com/compute/docs/instances/reserving-zonal-resources) to this notebook instance.
     */
    @JvmName("nhcictqvxanojxwe")
    public suspend fun reservationAffinity(argument: suspend ReservationAffinityArgsBuilder.() -> Unit) {
        val toBeMapped = ReservationAffinityArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.reservationAffinity = mapped
    }

    /**
     * @param value The service account on this instance, giving access to other Google Cloud services. You can use any service account within the same project, but you must have the service account user permission to use the instance. If not specified, the [Compute Engine default service account](https://cloud.google.com/compute/docs/access/service-accounts#default_service_account) is used.
     */
    @JvmName("ovempariuoyavxjp")
    public suspend fun serviceAccount(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

    /**
     * @param value Optional. The URIs of service account scopes to be included in Compute Engine instances. If not specified, the following [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) are defined: - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute
     */
    @JvmName("nxooexmfbkyffeqm")
    public suspend fun serviceAccountScopes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccountScopes = mapped
    }

    /**
     * @param values Optional. The URIs of service account scopes to be included in Compute Engine instances. If not specified, the following [scopes](https://cloud.google.com/compute/docs/access/service-accounts#accesscopesiam) are defined: - https://www.googleapis.com/auth/cloud-platform - https://www.googleapis.com/auth/userinfo.email If not using default scopes, you need at least: https://www.googleapis.com/auth/compute
     */
    @JvmName("morueqtblcfgpfwv")
    public suspend fun serviceAccountScopes(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.serviceAccountScopes = mapped
    }

    /**
     * @param value Optional. Shielded VM configuration. [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     */
    @JvmName("pkdpdabotyqwnngh")
    public suspend fun shieldedInstanceConfig(`value`: ShieldedInstanceConfigArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shieldedInstanceConfig = mapped
    }

    /**
     * @param argument Optional. Shielded VM configuration. [Images using supported Shielded VM features](https://cloud.google.com/compute/docs/instances/modifying-shielded-vm).
     */
    @JvmName("kqewhvjcgnsmdbbe")
    public suspend fun shieldedInstanceConfig(argument: suspend ShieldedInstanceConfigArgsBuilder.() -> Unit) {
        val toBeMapped = ShieldedInstanceConfigArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.shieldedInstanceConfig = mapped
    }

    /**
     * @param value The name of the subnet that this instance is in. Format: `projects/{project_id}/regions/{region}/subnetworks/{subnetwork_id}`
     */
    @JvmName("laaiepfnfmftueuc")
    public suspend fun subnet(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.subnet = mapped
    }

    /**
     * @param value Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     */
    @JvmName("gleykiypsvbnscxp")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Optional. The Compute Engine tags to add to runtime (see [Tagging instances](https://cloud.google.com/compute/docs/label-or-tag-resources#tags)).
     */
    @JvmName("xddasnqtnytyltha")
    public suspend fun tags(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value The upgrade history of this instance.
     */
    @JvmName("elydrysoobrbtccb")
    public suspend fun upgradeHistory(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.upgradeHistory = mapped
    }

    /**
     * @param argument The upgrade history of this instance.
     */
    @JvmName("qxnwuslvthegrtnd")
    public suspend fun upgradeHistory(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            UpgradeHistoryEntryArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.upgradeHistory = mapped
    }

    /**
     * @param argument The upgrade history of this instance.
     */
    @JvmName("dnotfbggynjombdq")
    public suspend fun upgradeHistory(vararg argument: suspend UpgradeHistoryEntryArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            UpgradeHistoryEntryArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.upgradeHistory = mapped
    }

    /**
     * @param argument The upgrade history of this instance.
     */
    @JvmName("tnvdqouvduocedyw")
    public suspend fun upgradeHistory(argument: suspend UpgradeHistoryEntryArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(UpgradeHistoryEntryArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.upgradeHistory = mapped
    }

    /**
     * @param values The upgrade history of this instance.
     */
    @JvmName("lpqidxubdksrlbql")
    public suspend fun upgradeHistory(vararg values: UpgradeHistoryEntryArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.upgradeHistory = mapped
    }

    /**
     * @param value Use a Compute Engine VM image to start the notebook instance.
     */
    @JvmName("spwjnbnbhcutauul")
    public suspend fun vmImage(`value`: VmImageArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vmImage = mapped
    }

    /**
     * @param argument Use a Compute Engine VM image to start the notebook instance.
     */
    @JvmName("pttcntnmarriffbg")
    public suspend fun vmImage(argument: suspend VmImageArgsBuilder.() -> Unit) {
        val toBeMapped = VmImageArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.vmImage = mapped
    }

    internal fun build(): InstanceArgs = InstanceArgs(
        acceleratorConfig = acceleratorConfig,
        bootDiskSizeGb = bootDiskSizeGb,
        bootDiskType = bootDiskType,
        canIpForward = canIpForward,
        containerImage = containerImage,
        customGpuDriverPath = customGpuDriverPath,
        dataDiskSizeGb = dataDiskSizeGb,
        dataDiskType = dataDiskType,
        diskEncryption = diskEncryption,
        installGpuDriver = installGpuDriver,
        instanceId = instanceId,
        instanceOwners = instanceOwners,
        kmsKey = kmsKey,
        labels = labels,
        location = location,
        machineType = machineType,
        metadata = metadata,
        network = network,
        nicType = nicType,
        noProxyAccess = noProxyAccess,
        noPublicIp = noPublicIp,
        noRemoveDataDisk = noRemoveDataDisk,
        postStartupScript = postStartupScript,
        project = project,
        reservationAffinity = reservationAffinity,
        serviceAccount = serviceAccount,
        serviceAccountScopes = serviceAccountScopes,
        shieldedInstanceConfig = shieldedInstanceConfig,
        subnet = subnet,
        tags = tags,
        upgradeHistory = upgradeHistory,
        vmImage = vmImage,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy