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

com.pulumi.gcp.cloudrunv2.kotlin.inputs.ServiceTemplateVolumeArgs.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.cloudrunv2.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateVolumeArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property cloudSqlInstance For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.
 * Structure is documented below.
 * @property emptyDir Ephemeral storage used as a shared volume.
 * Structure is documented below.
 * @property gcs Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment and requires launch-stage to be set to ALPHA or BETA.
 * Structure is documented below.
 * @property name Volume's name.
 * @property nfs Represents an NFS mount.
 * Structure is documented below.
 * @property secret Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
 * Structure is documented below.
 */
public data class ServiceTemplateVolumeArgs(
    public val cloudSqlInstance: Output? = null,
    public val emptyDir: Output? = null,
    public val gcs: Output? = null,
    public val name: Output,
    public val nfs: Output? = null,
    public val secret: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateVolumeArgs =
        com.pulumi.gcp.cloudrunv2.inputs.ServiceTemplateVolumeArgs.builder()
            .cloudSqlInstance(cloudSqlInstance?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .emptyDir(emptyDir?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .gcs(gcs?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .name(name.applyValue({ args0 -> args0 }))
            .nfs(nfs?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .secret(secret?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [ServiceTemplateVolumeArgs].
 */
@PulumiTagMarker
public class ServiceTemplateVolumeArgsBuilder internal constructor() {
    private var cloudSqlInstance: Output? = null

    private var emptyDir: Output? = null

    private var gcs: Output? = null

    private var name: Output? = null

    private var nfs: Output? = null

    private var secret: Output? = null

    /**
     * @param value For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.
     * Structure is documented below.
     */
    @JvmName("iehsyyjjivxudmnd")
    public suspend fun cloudSqlInstance(`value`: Output) {
        this.cloudSqlInstance = value
    }

    /**
     * @param value Ephemeral storage used as a shared volume.
     * Structure is documented below.
     */
    @JvmName("ehugyhpjamwafbiu")
    public suspend fun emptyDir(`value`: Output) {
        this.emptyDir = value
    }

    /**
     * @param value Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment and requires launch-stage to be set to ALPHA or BETA.
     * Structure is documented below.
     */
    @JvmName("aistnfatmurfmfnh")
    public suspend fun gcs(`value`: Output) {
        this.gcs = value
    }

    /**
     * @param value Volume's name.
     */
    @JvmName("whmxrkemshplmiuc")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Represents an NFS mount.
     * Structure is documented below.
     */
    @JvmName("yakjgtbnembujkvw")
    public suspend fun nfs(`value`: Output) {
        this.nfs = value
    }

    /**
     * @param value Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
     * Structure is documented below.
     */
    @JvmName("ixlmihjfnjyxsryo")
    public suspend fun secret(`value`: Output) {
        this.secret = value
    }

    /**
     * @param value For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.
     * Structure is documented below.
     */
    @JvmName("kqrfnwslguleajrx")
    public suspend fun cloudSqlInstance(`value`: ServiceTemplateVolumeCloudSqlInstanceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cloudSqlInstance = mapped
    }

    /**
     * @param argument For Cloud SQL volumes, contains the specific instances that should be mounted. Visit https://cloud.google.com/sql/docs/mysql/connect-run for more information on how to connect Cloud SQL and Cloud Run.
     * Structure is documented below.
     */
    @JvmName("owuyosgxnuugoomw")
    public suspend fun cloudSqlInstance(argument: suspend ServiceTemplateVolumeCloudSqlInstanceArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceTemplateVolumeCloudSqlInstanceArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.cloudSqlInstance = mapped
    }

    /**
     * @param value Ephemeral storage used as a shared volume.
     * Structure is documented below.
     */
    @JvmName("djcnsbolwcbgnjxu")
    public suspend fun emptyDir(`value`: ServiceTemplateVolumeEmptyDirArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.emptyDir = mapped
    }

    /**
     * @param argument Ephemeral storage used as a shared volume.
     * Structure is documented below.
     */
    @JvmName("fjyiytbkjrymrmdn")
    public suspend fun emptyDir(argument: suspend ServiceTemplateVolumeEmptyDirArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceTemplateVolumeEmptyDirArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.emptyDir = mapped
    }

    /**
     * @param value Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment and requires launch-stage to be set to ALPHA or BETA.
     * Structure is documented below.
     */
    @JvmName("upuuhceuvfvgdnab")
    public suspend fun gcs(`value`: ServiceTemplateVolumeGcsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gcs = mapped
    }

    /**
     * @param argument Cloud Storage bucket mounted as a volume using GCSFuse. This feature is only supported in the gen2 execution environment and requires launch-stage to be set to ALPHA or BETA.
     * Structure is documented below.
     */
    @JvmName("elyhexievrvbagua")
    public suspend fun gcs(argument: suspend ServiceTemplateVolumeGcsArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceTemplateVolumeGcsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.gcs = mapped
    }

    /**
     * @param value Volume's name.
     */
    @JvmName("bqwtigywdbdwcqdq")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Represents an NFS mount.
     * Structure is documented below.
     */
    @JvmName("ajlfablhweneadcl")
    public suspend fun nfs(`value`: ServiceTemplateVolumeNfsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.nfs = mapped
    }

    /**
     * @param argument Represents an NFS mount.
     * Structure is documented below.
     */
    @JvmName("qghvwvxywykgqfii")
    public suspend fun nfs(argument: suspend ServiceTemplateVolumeNfsArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceTemplateVolumeNfsArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.nfs = mapped
    }

    /**
     * @param value Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
     * Structure is documented below.
     */
    @JvmName("eknfljvliptihkos")
    public suspend fun secret(`value`: ServiceTemplateVolumeSecretArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secret = mapped
    }

    /**
     * @param argument Secret represents a secret that should populate this volume. More info: https://kubernetes.io/docs/concepts/storage/volumes#secret
     * Structure is documented below.
     */
    @JvmName("uorhywccjphetcgh")
    public suspend fun secret(argument: suspend ServiceTemplateVolumeSecretArgsBuilder.() -> Unit) {
        val toBeMapped = ServiceTemplateVolumeSecretArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.secret = mapped
    }

    internal fun build(): ServiceTemplateVolumeArgs = ServiceTemplateVolumeArgs(
        cloudSqlInstance = cloudSqlInstance,
        emptyDir = emptyDir,
        gcs = gcs,
        name = name ?: throw PulumiNullFieldException("name"),
        nfs = nfs,
        secret = secret,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy