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

com.pulumi.gcp.cloudrunv2.kotlin.inputs.JobTemplateTemplateArgs.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.13.1.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.JobTemplateTemplateArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property containers Holds the single container that defines the unit of execution for this task.
 * Structure is documented below.
 * @property encryptionKey A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
 * @property executionEnvironment The execution environment being used to host this Task.
 * Possible values are: `EXECUTION_ENVIRONMENT_GEN1`, `EXECUTION_ENVIRONMENT_GEN2`.
 * @property maxRetries Number of retries allowed per Task, before marking this Task failed.
 * @property serviceAccount Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.
 * @property timeout Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout.
 * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
 * @property volumes A list of Volumes to make available to containers.
 * Structure is documented below.
 * @property vpcAccess VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
 * Structure is documented below.
 */
public data class JobTemplateTemplateArgs(
    public val containers: Output>? = null,
    public val encryptionKey: Output? = null,
    public val executionEnvironment: Output? = null,
    public val maxRetries: Output? = null,
    public val serviceAccount: Output? = null,
    public val timeout: Output? = null,
    public val volumes: Output>? = null,
    public val vpcAccess: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateArgs =
        com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateArgs.builder()
            .containers(
                containers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .encryptionKey(encryptionKey?.applyValue({ args0 -> args0 }))
            .executionEnvironment(executionEnvironment?.applyValue({ args0 -> args0 }))
            .maxRetries(maxRetries?.applyValue({ args0 -> args0 }))
            .serviceAccount(serviceAccount?.applyValue({ args0 -> args0 }))
            .timeout(timeout?.applyValue({ args0 -> args0 }))
            .volumes(
                volumes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .vpcAccess(vpcAccess?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [JobTemplateTemplateArgs].
 */
@PulumiTagMarker
public class JobTemplateTemplateArgsBuilder internal constructor() {
    private var containers: Output>? = null

    private var encryptionKey: Output? = null

    private var executionEnvironment: Output? = null

    private var maxRetries: Output? = null

    private var serviceAccount: Output? = null

    private var timeout: Output? = null

    private var volumes: Output>? = null

    private var vpcAccess: Output? = null

    /**
     * @param value Holds the single container that defines the unit of execution for this task.
     * Structure is documented below.
     */
    @JvmName("ugnfybigxlfcuwbh")
    public suspend fun containers(`value`: Output>) {
        this.containers = value
    }

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

    /**
     * @param values Holds the single container that defines the unit of execution for this task.
     * Structure is documented below.
     */
    @JvmName("qooaajtntlgyqacq")
    public suspend fun containers(values: List>) {
        this.containers = Output.all(values)
    }

    /**
     * @param value A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
     */
    @JvmName("duuyrhoonkqksjjm")
    public suspend fun encryptionKey(`value`: Output) {
        this.encryptionKey = value
    }

    /**
     * @param value The execution environment being used to host this Task.
     * Possible values are: `EXECUTION_ENVIRONMENT_GEN1`, `EXECUTION_ENVIRONMENT_GEN2`.
     */
    @JvmName("mhkoryagboxqruvp")
    public suspend fun executionEnvironment(`value`: Output) {
        this.executionEnvironment = value
    }

    /**
     * @param value Number of retries allowed per Task, before marking this Task failed.
     */
    @JvmName("ondgltonsleckhji")
    public suspend fun maxRetries(`value`: Output) {
        this.maxRetries = value
    }

    /**
     * @param value Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.
     */
    @JvmName("iroktgumkrqsmcct")
    public suspend fun serviceAccount(`value`: Output) {
        this.serviceAccount = value
    }

    /**
     * @param value Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout.
     * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
     */
    @JvmName("rnvcneynntqtrwkm")
    public suspend fun timeout(`value`: Output) {
        this.timeout = value
    }

    /**
     * @param value A list of Volumes to make available to containers.
     * Structure is documented below.
     */
    @JvmName("twfqxyjsbjayxsni")
    public suspend fun volumes(`value`: Output>) {
        this.volumes = value
    }

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

    /**
     * @param values A list of Volumes to make available to containers.
     * Structure is documented below.
     */
    @JvmName("qsrjulhshpryyksn")
    public suspend fun volumes(values: List>) {
        this.volumes = Output.all(values)
    }

    /**
     * @param value VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
     * Structure is documented below.
     */
    @JvmName("nqrdbomrqtkqpwfx")
    public suspend fun vpcAccess(`value`: Output) {
        this.vpcAccess = value
    }

    /**
     * @param value Holds the single container that defines the unit of execution for this task.
     * Structure is documented below.
     */
    @JvmName("rvdbobwhqugfywam")
    public suspend fun containers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param argument Holds the single container that defines the unit of execution for this task.
     * Structure is documented below.
     */
    @JvmName("kjwdvtqdlacdkowp")
    public suspend fun containers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument Holds the single container that defines the unit of execution for this task.
     * Structure is documented below.
     */
    @JvmName("wiecaslhdsxoiusw")
    public suspend fun containers(vararg argument: suspend JobTemplateTemplateContainerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param argument Holds the single container that defines the unit of execution for this task.
     * Structure is documented below.
     */
    @JvmName("kmpqghiiifybluhp")
    public suspend fun containers(argument: suspend JobTemplateTemplateContainerArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobTemplateTemplateContainerArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param values Holds the single container that defines the unit of execution for this task.
     * Structure is documented below.
     */
    @JvmName("jydcufbvfpfitqcb")
    public suspend fun containers(vararg values: JobTemplateTemplateContainerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param value A reference to a customer managed encryption key (CMEK) to use to encrypt this container image. For more information, go to https://cloud.google.com/run/docs/securing/using-cmek
     */
    @JvmName("fpgvqlluxcvsonll")
    public suspend fun encryptionKey(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.encryptionKey = mapped
    }

    /**
     * @param value The execution environment being used to host this Task.
     * Possible values are: `EXECUTION_ENVIRONMENT_GEN1`, `EXECUTION_ENVIRONMENT_GEN2`.
     */
    @JvmName("xsqtnntmthcictdm")
    public suspend fun executionEnvironment(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.executionEnvironment = mapped
    }

    /**
     * @param value Number of retries allowed per Task, before marking this Task failed.
     */
    @JvmName("qcqpjfhwyigkadex")
    public suspend fun maxRetries(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxRetries = mapped
    }

    /**
     * @param value Email address of the IAM service account associated with the Task of a Job. The service account represents the identity of the running task, and determines what permissions the task has. If not provided, the task will use the project's default service account.
     */
    @JvmName("souwjugtsuufstnt")
    public suspend fun serviceAccount(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

    /**
     * @param value Max allowed time duration the Task may be active before the system will actively try to mark it failed and kill associated containers. This applies per attempt of a task, meaning each retry can run for the full timeout.
     * A duration in seconds with up to nine fractional digits, ending with 's'. Example: "3.5s".
     */
    @JvmName("uxqycidjkndueqoh")
    public suspend fun timeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeout = mapped
    }

    /**
     * @param value A list of Volumes to make available to containers.
     * Structure is documented below.
     */
    @JvmName("paiejfairajuyywp")
    public suspend fun volumes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param argument A list of Volumes to make available to containers.
     * Structure is documented below.
     */
    @JvmName("enwdkymjfyviucbo")
    public suspend fun volumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument A list of Volumes to make available to containers.
     * Structure is documented below.
     */
    @JvmName("chcrguualuqforpf")
    public suspend fun volumes(vararg argument: suspend JobTemplateTemplateVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateVolumeArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument A list of Volumes to make available to containers.
     * Structure is documented below.
     */
    @JvmName("acgmvmlcigqpwvex")
    public suspend fun volumes(argument: suspend JobTemplateTemplateVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobTemplateTemplateVolumeArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param values A list of Volumes to make available to containers.
     * Structure is documented below.
     */
    @JvmName("rlsuosbsgsbgtero")
    public suspend fun volumes(vararg values: JobTemplateTemplateVolumeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param value VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
     * Structure is documented below.
     */
    @JvmName("qgwopbsvrnxmapem")
    public suspend fun vpcAccess(`value`: JobTemplateTemplateVpcAccessArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcAccess = mapped
    }

    /**
     * @param argument VPC Access configuration to use for this Task. For more information, visit https://cloud.google.com/run/docs/configuring/connecting-vpc.
     * Structure is documented below.
     */
    @JvmName("rjrhpvffynjemkhl")
    public suspend fun vpcAccess(argument: suspend JobTemplateTemplateVpcAccessArgsBuilder.() -> Unit) {
        val toBeMapped = JobTemplateTemplateVpcAccessArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.vpcAccess = mapped
    }

    internal fun build(): JobTemplateTemplateArgs = JobTemplateTemplateArgs(
        containers = containers,
        encryptionKey = encryptionKey,
        executionEnvironment = executionEnvironment,
        maxRetries = maxRetries,
        serviceAccount = serviceAccount,
        timeout = timeout,
        volumes = volumes,
        vpcAccess = vpcAccess,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy