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

com.pulumi.gcp.cloudrunv2.kotlin.inputs.JobTemplateTemplateContainerArgs.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.JobTemplateTemplateContainerArgs.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.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property args Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
 * @property commands Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
 * @property envs List of environment variables to set in the container.
 * Structure is documented below.
 * @property image URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images
 * @property name Name of the container specified as a DNS_LABEL.
 * @property ports List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
 * If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on
 * Structure is documented below.
 * @property resources Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
 * Structure is documented below.
 * @property volumeMounts Volume to mount into the container's filesystem.
 * Structure is documented below.
 * @property workingDir Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
 */
public data class JobTemplateTemplateContainerArgs(
    public val args: Output>? = null,
    public val commands: Output>? = null,
    public val envs: Output>? = null,
    public val image: Output,
    public val name: Output? = null,
    public val ports: Output>? = null,
    public val resources: Output? = null,
    public val volumeMounts: Output>? = null,
    public val workingDir: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateContainerArgs =
        com.pulumi.gcp.cloudrunv2.inputs.JobTemplateTemplateContainerArgs.builder()
            .args(args?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .commands(commands?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .envs(envs?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .image(image.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .ports(ports?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .resources(resources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .volumeMounts(
                volumeMounts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .workingDir(workingDir?.applyValue({ args0 -> args0 })).build()
}

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

    private var commands: Output>? = null

    private var envs: Output>? = null

    private var image: Output? = null

    private var name: Output? = null

    private var ports: Output>? = null

    private var resources: Output? = null

    private var volumeMounts: Output>? = null

    private var workingDir: Output? = null

    /**
     * @param value Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
     */
    @JvmName("ttttcshdtnjjeity")
    public suspend fun args(`value`: Output>) {
        this.args = value
    }

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

    /**
     * @param values Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
     */
    @JvmName("oijswihdspkclysx")
    public suspend fun args(values: List>) {
        this.args = Output.all(values)
    }

    /**
     * @param value Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
     */
    @JvmName("fougogteajgbwxtd")
    public suspend fun commands(`value`: Output>) {
        this.commands = value
    }

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

    /**
     * @param values Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
     */
    @JvmName("kcefgglockfbpmrk")
    public suspend fun commands(values: List>) {
        this.commands = Output.all(values)
    }

    /**
     * @param value List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("wiqvdmbonpanphou")
    public suspend fun envs(`value`: Output>) {
        this.envs = value
    }

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

    /**
     * @param values List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("acaexayalrwwbceo")
    public suspend fun envs(values: List>) {
        this.envs = Output.all(values)
    }

    /**
     * @param value URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images
     */
    @JvmName("cluhwhaepgulndja")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value Name of the container specified as a DNS_LABEL.
     */
    @JvmName("yjrqewpkpphdostb")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
     * If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on
     * Structure is documented below.
     */
    @JvmName("huuponvvaixilrpw")
    public suspend fun ports(`value`: Output>) {
        this.ports = value
    }

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

    /**
     * @param values List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
     * If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on
     * Structure is documented below.
     */
    @JvmName("ycoqdgotnlbltnwu")
    public suspend fun ports(values: List>) {
        this.ports = Output.all(values)
    }

    /**
     * @param value Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
     * Structure is documented below.
     */
    @JvmName("csbosdbhrnunrknk")
    public suspend fun resources(`value`: Output) {
        this.resources = value
    }

    /**
     * @param value Volume to mount into the container's filesystem.
     * Structure is documented below.
     */
    @JvmName("cfnftlahkexvgcvd")
    public suspend fun volumeMounts(`value`: Output>) {
        this.volumeMounts = value
    }

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

    /**
     * @param values Volume to mount into the container's filesystem.
     * Structure is documented below.
     */
    @JvmName("cekvpfhwqjnhdeeu")
    public suspend fun volumeMounts(values: List>) {
        this.volumeMounts = Output.all(values)
    }

    /**
     * @param value Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
     */
    @JvmName("kiofaovexeiqehvx")
    public suspend fun workingDir(`value`: Output) {
        this.workingDir = value
    }

    /**
     * @param value Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
     */
    @JvmName("raaqcyibcodkajhj")
    public suspend fun args(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param values Arguments to the entrypoint. The docker image's CMD is used if this is not provided. Variable references are not supported in Cloud Run.
     */
    @JvmName("acihotsssehtdwmh")
    public suspend fun args(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param value Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
     */
    @JvmName("soqcvoyoeimuilas")
    public suspend fun commands(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param values Entrypoint array. Not executed within a shell. The docker image's ENTRYPOINT is used if this is not provided. Variable references $(VAR_NAME) are expanded using the container's environment. If a variable cannot be resolved, the reference in the input string will be unchanged. The $(VAR_NAME) syntax can be escaped with a double $$, ie: $$(VAR_NAME). Escaped references will never be expanded, regardless of whether the variable exists or not. More info: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#running-a-command-in-a-shell
     */
    @JvmName("ktnynqqruekixcsu")
    public suspend fun commands(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param value List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("rnvhthleqqacfbhs")
    public suspend fun envs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param argument List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("hkqqtfrjgfcnajlp")
    public suspend fun envs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateContainerEnvArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("wwpdjoyebkautopv")
    public suspend fun envs(vararg argument: suspend JobTemplateTemplateContainerEnvArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateContainerEnvArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("mgsilvfwuwnqbskf")
    public suspend fun envs(argument: suspend JobTemplateTemplateContainerEnvArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobTemplateTemplateContainerEnvArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param values List of environment variables to set in the container.
     * Structure is documented below.
     */
    @JvmName("udqwhmbpntjjdlbp")
    public suspend fun envs(vararg values: JobTemplateTemplateContainerEnvArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param value URL of the Container image in Google Container Registry or Google Artifact Registry. More info: https://kubernetes.io/docs/concepts/containers/images
     */
    @JvmName("arojewmnpmrucjkp")
    public suspend fun image(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param value Name of the container specified as a DNS_LABEL.
     */
    @JvmName("pxfqhhbooqxcqhsv")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
     * If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on
     * Structure is documented below.
     */
    @JvmName("hfkjdmnhioksvmhj")
    public suspend fun ports(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    /**
     * @param argument List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
     * If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on
     * Structure is documented below.
     */
    @JvmName("fjairfkhxmpvhmrg")
    public suspend fun ports(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateContainerPortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
     * If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on
     * Structure is documented below.
     */
    @JvmName("kfvolxorindrqlyb")
    public suspend fun ports(vararg argument: suspend JobTemplateTemplateContainerPortArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateContainerPortArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param argument List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
     * If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on
     * Structure is documented below.
     */
    @JvmName("sditefvbycdjacga")
    public suspend fun ports(argument: suspend JobTemplateTemplateContainerPortArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobTemplateTemplateContainerPortArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.ports = mapped
    }

    /**
     * @param values List of ports to expose from the container. Only a single port can be specified. The specified ports must be listening on all interfaces (0.0.0.0) within the container to be accessible.
     * If omitted, a port number will be chosen and passed to the container through the PORT environment variable for the container to listen on
     * Structure is documented below.
     */
    @JvmName("plkeygtoxecpkfre")
    public suspend fun ports(vararg values: JobTemplateTemplateContainerPortArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.ports = mapped
    }

    /**
     * @param value Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
     * Structure is documented below.
     */
    @JvmName("mqelyudyrhskxgdr")
    public suspend fun resources(`value`: JobTemplateTemplateContainerResourcesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    /**
     * @param argument Compute Resource requirements by this container. More info: https://kubernetes.io/docs/concepts/storage/persistent-volumes#resources
     * Structure is documented below.
     */
    @JvmName("prgywoqtjlgdseqx")
    public suspend fun resources(argument: suspend JobTemplateTemplateContainerResourcesArgsBuilder.() -> Unit) {
        val toBeMapped = JobTemplateTemplateContainerResourcesArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.resources = mapped
    }

    /**
     * @param value Volume to mount into the container's filesystem.
     * Structure is documented below.
     */
    @JvmName("vsioubjecewqbylg")
    public suspend fun volumeMounts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    /**
     * @param argument Volume to mount into the container's filesystem.
     * Structure is documented below.
     */
    @JvmName("xuskqvlvihybmfnu")
    public suspend fun volumeMounts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateContainerVolumeMountArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument Volume to mount into the container's filesystem.
     * Structure is documented below.
     */
    @JvmName("ptqdpogmcmwyjghw")
    public suspend fun volumeMounts(vararg argument: suspend JobTemplateTemplateContainerVolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobTemplateTemplateContainerVolumeMountArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument Volume to mount into the container's filesystem.
     * Structure is documented below.
     */
    @JvmName("ldeqtyaprnhumvfy")
    public suspend fun volumeMounts(argument: suspend JobTemplateTemplateContainerVolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobTemplateTemplateContainerVolumeMountArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param values Volume to mount into the container's filesystem.
     * Structure is documented below.
     */
    @JvmName("sfbkgikgvlbmovfd")
    public suspend fun volumeMounts(vararg values: JobTemplateTemplateContainerVolumeMountArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    /**
     * @param value Container's working directory. If not specified, the container runtime's default will be used, which might be configured in the container image.
     */
    @JvmName("giiosabsfyukhypk")
    public suspend fun workingDir(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workingDir = mapped
    }

    internal fun build(): JobTemplateTemplateContainerArgs = JobTemplateTemplateContainerArgs(
        args = args,
        commands = commands,
        envs = envs,
        image = image ?: throw PulumiNullFieldException("image"),
        name = name,
        ports = ports,
        resources = resources,
        volumeMounts = volumeMounts,
        workingDir = workingDir,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy