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

com.pulumi.aws.batch.kotlin.inputs.JobDefinitionEksPropertiesPodPropertiesContainersArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.batch.kotlin.inputs

import com.pulumi.aws.batch.inputs.JobDefinitionEksPropertiesPodPropertiesContainersArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
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 Array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is used. This corresponds to the args member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment.
 * @property commands Entrypoint for the container. This isn't run within a shell. If this isn't specified, the ENTRYPOINT of the container image is used. Environment variable references are expanded using the container's environment.
 * @property envs Environment variables to pass to a container. See EKS Environment below.
 * @property image Docker image used to start the container.
 * @property imagePullPolicy Image pull policy for the container. Supported values are `Always`, `IfNotPresent`, and `Never`.
 * @property name Name of the container. If the name isn't specified, the default name "Default" is used. Each container in a pod must have a unique name.
 * @property resources Type and amount of resources to assign to a container. The supported resources include `memory`, `cpu`, and `nvidia.com/gpu`.
 * @property securityContext Security context for a job.
 * @property volumeMounts Volume mounts for the container.
 */
public data class JobDefinitionEksPropertiesPodPropertiesContainersArgs(
    public val args: Output>? = null,
    public val commands: Output>? = null,
    public val envs: Output>? = null,
    public val image: Output,
    public val imagePullPolicy: Output? = null,
    public val name: Output? = null,
    public val resources: Output? =
        null,
    public val securityContext: Output? = null,
    public val volumeMounts: Output>? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.batch.inputs.JobDefinitionEksPropertiesPodPropertiesContainersArgs =
        com.pulumi.aws.batch.inputs.JobDefinitionEksPropertiesPodPropertiesContainersArgs.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 }))
            .imagePullPolicy(imagePullPolicy?.applyValue({ args0 -> args0 }))
            .name(name?.applyValue({ args0 -> args0 }))
            .resources(resources?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .securityContext(securityContext?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .volumeMounts(
                volumeMounts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var commands: Output>? = null

    private var envs: Output>? = null

    private var image: Output? = null

    private var imagePullPolicy: Output? = null

    private var name: Output? = null

    private var resources: Output? =
        null

    private var securityContext:
        Output? = null

    private var volumeMounts:
        Output>? = null

    /**
     * @param value Array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is used. This corresponds to the args member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment.
     */
    @JvmName("xybqmjjqrmowltbi")
    public suspend fun args(`value`: Output>) {
        this.args = value
    }

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

    /**
     * @param values Array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is used. This corresponds to the args member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment.
     */
    @JvmName("nkwgudxwmhgiogqy")
    public suspend fun args(values: List>) {
        this.args = Output.all(values)
    }

    /**
     * @param value Entrypoint for the container. This isn't run within a shell. If this isn't specified, the ENTRYPOINT of the container image is used. Environment variable references are expanded using the container's environment.
     */
    @JvmName("fvkqupcyhnaqbiws")
    public suspend fun commands(`value`: Output>) {
        this.commands = value
    }

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

    /**
     * @param values Entrypoint for the container. This isn't run within a shell. If this isn't specified, the ENTRYPOINT of the container image is used. Environment variable references are expanded using the container's environment.
     */
    @JvmName("nfiivaexowspiloc")
    public suspend fun commands(values: List>) {
        this.commands = Output.all(values)
    }

    /**
     * @param value Environment variables to pass to a container. See EKS Environment below.
     */
    @JvmName("bpahynlynsqucayi")
    public suspend fun envs(`value`: Output>) {
        this.envs = value
    }

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

    /**
     * @param values Environment variables to pass to a container. See EKS Environment below.
     */
    @JvmName("lsxjuxwjnckhvxjp")
    public suspend fun envs(values: List>) {
        this.envs = Output.all(values)
    }

    /**
     * @param value Docker image used to start the container.
     */
    @JvmName("sadrbhixyramkupj")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value Image pull policy for the container. Supported values are `Always`, `IfNotPresent`, and `Never`.
     */
    @JvmName("yekvukwcxbvxvgyf")
    public suspend fun imagePullPolicy(`value`: Output) {
        this.imagePullPolicy = value
    }

    /**
     * @param value Name of the container. If the name isn't specified, the default name "Default" is used. Each container in a pod must have a unique name.
     */
    @JvmName("dgnobqcwythoxdrw")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value Type and amount of resources to assign to a container. The supported resources include `memory`, `cpu`, and `nvidia.com/gpu`.
     */
    @JvmName("ppnjtnlujpgqyjqn")
    public suspend fun resources(`value`: Output) {
        this.resources = value
    }

    /**
     * @param value Security context for a job.
     */
    @JvmName("iwdjvknblpcxibjr")
    public suspend fun securityContext(`value`: Output) {
        this.securityContext = value
    }

    /**
     * @param value Volume mounts for the container.
     */
    @JvmName("urgsgosoodcfgtha")
    public suspend fun volumeMounts(`value`: Output>) {
        this.volumeMounts = value
    }

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

    /**
     * @param values Volume mounts for the container.
     */
    @JvmName("vradkkmghaojqtcd")
    public suspend fun volumeMounts(values: List>) {
        this.volumeMounts = Output.all(values)
    }

    /**
     * @param value Array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is used. This corresponds to the args member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment.
     */
    @JvmName("vefsykgovrshnigc")
    public suspend fun args(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param values Array of arguments to the entrypoint. If this isn't specified, the CMD of the container image is used. This corresponds to the args member in the Entrypoint portion of the Pod in Kubernetes. Environment variable references are expanded using the container's environment.
     */
    @JvmName("nqtlfufowdeuixjq")
    public suspend fun args(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param value Entrypoint for the container. This isn't run within a shell. If this isn't specified, the ENTRYPOINT of the container image is used. Environment variable references are expanded using the container's environment.
     */
    @JvmName("qtstdxouapiouvbs")
    public suspend fun commands(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param values Entrypoint for the container. This isn't run within a shell. If this isn't specified, the ENTRYPOINT of the container image is used. Environment variable references are expanded using the container's environment.
     */
    @JvmName("kgbnwekrslujofqw")
    public suspend fun commands(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param value Environment variables to pass to a container. See EKS Environment below.
     */
    @JvmName("albepevtgbfcspil")
    public suspend fun envs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param argument Environment variables to pass to a container. See EKS Environment below.
     */
    @JvmName("tukitiehxquuysxp")
    public suspend fun envs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesContainersEnvArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument Environment variables to pass to a container. See EKS Environment below.
     */
    @JvmName("muujknsebavabcpc")
    public suspend fun envs(vararg argument: suspend JobDefinitionEksPropertiesPodPropertiesContainersEnvArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesContainersEnvArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument Environment variables to pass to a container. See EKS Environment below.
     */
    @JvmName("brasbswtqdmetvyy")
    public suspend fun envs(argument: suspend JobDefinitionEksPropertiesPodPropertiesContainersEnvArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                JobDefinitionEksPropertiesPodPropertiesContainersEnvArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param values Environment variables to pass to a container. See EKS Environment below.
     */
    @JvmName("qhbibplmkdyuajxu")
    public suspend fun envs(vararg values: JobDefinitionEksPropertiesPodPropertiesContainersEnvArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param value Docker image used to start the container.
     */
    @JvmName("ytmqstaafnlhfkjo")
    public suspend fun image(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.image = mapped
    }

    /**
     * @param value Image pull policy for the container. Supported values are `Always`, `IfNotPresent`, and `Never`.
     */
    @JvmName("csnrwntbtfklqsfh")
    public suspend fun imagePullPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imagePullPolicy = mapped
    }

    /**
     * @param value Name of the container. If the name isn't specified, the default name "Default" is used. Each container in a pod must have a unique name.
     */
    @JvmName("jbpxtflqrsnayidu")
    public suspend fun name(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value Type and amount of resources to assign to a container. The supported resources include `memory`, `cpu`, and `nvidia.com/gpu`.
     */
    @JvmName("ekmgwovahopxujrn")
    public suspend fun resources(`value`: JobDefinitionEksPropertiesPodPropertiesContainersResourcesArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.resources = mapped
    }

    /**
     * @param argument Type and amount of resources to assign to a container. The supported resources include `memory`, `cpu`, and `nvidia.com/gpu`.
     */
    @JvmName("dbmqrmxkjemvimbg")
    public suspend fun resources(argument: suspend JobDefinitionEksPropertiesPodPropertiesContainersResourcesArgsBuilder.() -> Unit) {
        val toBeMapped =
            JobDefinitionEksPropertiesPodPropertiesContainersResourcesArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.resources = mapped
    }

    /**
     * @param value Security context for a job.
     */
    @JvmName("ntkcioafgvhxogkk")
    public suspend fun securityContext(`value`: JobDefinitionEksPropertiesPodPropertiesContainersSecurityContextArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.securityContext = mapped
    }

    /**
     * @param argument Security context for a job.
     */
    @JvmName("uyyuyatheinvvult")
    public suspend fun securityContext(argument: suspend JobDefinitionEksPropertiesPodPropertiesContainersSecurityContextArgsBuilder.() -> Unit) {
        val toBeMapped =
            JobDefinitionEksPropertiesPodPropertiesContainersSecurityContextArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.securityContext = mapped
    }

    /**
     * @param value Volume mounts for the container.
     */
    @JvmName("tedgtyirojrgiskx")
    public suspend fun volumeMounts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    /**
     * @param argument Volume mounts for the container.
     */
    @JvmName("smtdudbfufhywfwj")
    public suspend fun volumeMounts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesContainersVolumeMountArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument Volume mounts for the container.
     */
    @JvmName("bvkvkohmpjbormxk")
    public suspend fun volumeMounts(vararg argument: suspend JobDefinitionEksPropertiesPodPropertiesContainersVolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesContainersVolumeMountArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument Volume mounts for the container.
     */
    @JvmName("whclrlkfhcavkwjw")
    public suspend fun volumeMounts(argument: suspend JobDefinitionEksPropertiesPodPropertiesContainersVolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                JobDefinitionEksPropertiesPodPropertiesContainersVolumeMountArgsBuilder().applySuspend
                    { argument() }.build(),
            )
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param values Volume mounts for the container.
     */
    @JvmName("redkocempxnyvxdn")
    public suspend fun volumeMounts(vararg values: JobDefinitionEksPropertiesPodPropertiesContainersVolumeMountArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    internal fun build(): JobDefinitionEksPropertiesPodPropertiesContainersArgs =
        JobDefinitionEksPropertiesPodPropertiesContainersArgs(
            args = args,
            commands = commands,
            envs = envs,
            image = image ?: throw PulumiNullFieldException("image"),
            imagePullPolicy = imagePullPolicy,
            name = name,
            resources = resources,
            securityContext = securityContext,
            volumeMounts = volumeMounts,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy