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

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

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

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

import com.pulumi.aws.batch.inputs.JobDefinitionEksPropertiesPodPropertiesArgs.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.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property containers Properties of the container that's used on the Amazon EKS pod. See containers below.
 * @property dnsPolicy DNS policy for the pod. The default value is `ClusterFirst`. If the `host_network` argument is not specified, the default is `ClusterFirstWithHostNet`. `ClusterFirst` indicates that any DNS query that does not match the configured cluster domain suffix is forwarded to the upstream nameserver inherited from the node. For more information, see Pod's DNS policy in the Kubernetes documentation.
 * @property hostNetwork Whether the pod uses the hosts' network IP address. The default value is `true`. Setting this to `false` enables the Kubernetes pod networking model. Most AWS Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections.
 * @property imagePullSecrets List of Kubernetes secret resources. See `image_pull_secret` below.
 * @property initContainers Containers which run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. See containers below.
 * @property metadata Metadata about the Kubernetes pod.
 * @property serviceAccountName Name of the service account that's used to run the pod.
 * @property shareProcessNamespace Indicates if the processes in a container are shared, or visible, to other containers in the same pod.
 * @property volumes Volumes for a job definition that uses Amazon EKS resources. AWS Batch supports emptyDir, hostPath, and secret volume types.
 */
public data class JobDefinitionEksPropertiesPodPropertiesArgs(
    public val containers: Output,
    public val dnsPolicy: Output? = null,
    public val hostNetwork: Output? = null,
    public val imagePullSecrets: Output>? = null,
    public val initContainers: Output>? =
        null,
    public val metadata: Output? = null,
    public val serviceAccountName: Output? = null,
    public val shareProcessNamespace: Output? = null,
    public val volumes: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.batch.inputs.JobDefinitionEksPropertiesPodPropertiesArgs =
        com.pulumi.aws.batch.inputs.JobDefinitionEksPropertiesPodPropertiesArgs.builder()
            .containers(containers.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .dnsPolicy(dnsPolicy?.applyValue({ args0 -> args0 }))
            .hostNetwork(hostNetwork?.applyValue({ args0 -> args0 }))
            .imagePullSecrets(
                imagePullSecrets?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .initContainers(
                initContainers?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .metadata(metadata?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .serviceAccountName(serviceAccountName?.applyValue({ args0 -> args0 }))
            .shareProcessNamespace(shareProcessNamespace?.applyValue({ args0 -> args0 }))
            .volumes(
                volumes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var dnsPolicy: Output? = null

    private var hostNetwork: Output? = null

    private var imagePullSecrets:
        Output>? = null

    private var initContainers:
        Output>? = null

    private var metadata: Output? = null

    private var serviceAccountName: Output? = null

    private var shareProcessNamespace: Output? = null

    private var volumes: Output>? = null

    /**
     * @param value Properties of the container that's used on the Amazon EKS pod. See containers below.
     */
    @JvmName("bdjmouwtqrthvcqf")
    public suspend fun containers(`value`: Output) {
        this.containers = value
    }

    /**
     * @param value DNS policy for the pod. The default value is `ClusterFirst`. If the `host_network` argument is not specified, the default is `ClusterFirstWithHostNet`. `ClusterFirst` indicates that any DNS query that does not match the configured cluster domain suffix is forwarded to the upstream nameserver inherited from the node. For more information, see Pod's DNS policy in the Kubernetes documentation.
     */
    @JvmName("kuiqnbkpekinphou")
    public suspend fun dnsPolicy(`value`: Output) {
        this.dnsPolicy = value
    }

    /**
     * @param value Whether the pod uses the hosts' network IP address. The default value is `true`. Setting this to `false` enables the Kubernetes pod networking model. Most AWS Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections.
     */
    @JvmName("rynuuoqrornbmrqt")
    public suspend fun hostNetwork(`value`: Output) {
        this.hostNetwork = value
    }

    /**
     * @param value List of Kubernetes secret resources. See `image_pull_secret` below.
     */
    @JvmName("kcpcvmhaefqxrbfl")
    public suspend fun imagePullSecrets(`value`: Output>) {
        this.imagePullSecrets = value
    }

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

    /**
     * @param values List of Kubernetes secret resources. See `image_pull_secret` below.
     */
    @JvmName("tamrmudewbmybnnv")
    public suspend fun imagePullSecrets(values: List>) {
        this.imagePullSecrets = Output.all(values)
    }

    /**
     * @param value Containers which run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. See containers below.
     */
    @JvmName("wemsxcvxluydoqwj")
    public suspend fun initContainers(`value`: Output>) {
        this.initContainers = value
    }

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

    /**
     * @param values Containers which run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. See containers below.
     */
    @JvmName("rrypiyacekeoeybp")
    public suspend fun initContainers(values: List>) {
        this.initContainers = Output.all(values)
    }

    /**
     * @param value Metadata about the Kubernetes pod.
     */
    @JvmName("ovapkontiyvkpjid")
    public suspend fun metadata(`value`: Output) {
        this.metadata = value
    }

    /**
     * @param value Name of the service account that's used to run the pod.
     */
    @JvmName("tdqffplcegxxsugg")
    public suspend fun serviceAccountName(`value`: Output) {
        this.serviceAccountName = value
    }

    /**
     * @param value Indicates if the processes in a container are shared, or visible, to other containers in the same pod.
     */
    @JvmName("wriokiepocqsjibs")
    public suspend fun shareProcessNamespace(`value`: Output) {
        this.shareProcessNamespace = value
    }

    /**
     * @param value Volumes for a job definition that uses Amazon EKS resources. AWS Batch supports emptyDir, hostPath, and secret volume types.
     */
    @JvmName("ujbueirudytovnan")
    public suspend fun volumes(`value`: Output>) {
        this.volumes = value
    }

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

    /**
     * @param values Volumes for a job definition that uses Amazon EKS resources. AWS Batch supports emptyDir, hostPath, and secret volume types.
     */
    @JvmName("fhaxckhewffdoqpo")
    public suspend fun volumes(values: List>) {
        this.volumes = Output.all(values)
    }

    /**
     * @param value Properties of the container that's used on the Amazon EKS pod. See containers below.
     */
    @JvmName("xjkqletbvkhqofok")
    public suspend fun containers(`value`: JobDefinitionEksPropertiesPodPropertiesContainersArgs) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containers = mapped
    }

    /**
     * @param argument Properties of the container that's used on the Amazon EKS pod. See containers below.
     */
    @JvmName("qjbpwpnmtleryayr")
    public suspend fun containers(argument: suspend JobDefinitionEksPropertiesPodPropertiesContainersArgsBuilder.() -> Unit) {
        val toBeMapped = JobDefinitionEksPropertiesPodPropertiesContainersArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.containers = mapped
    }

    /**
     * @param value DNS policy for the pod. The default value is `ClusterFirst`. If the `host_network` argument is not specified, the default is `ClusterFirstWithHostNet`. `ClusterFirst` indicates that any DNS query that does not match the configured cluster domain suffix is forwarded to the upstream nameserver inherited from the node. For more information, see Pod's DNS policy in the Kubernetes documentation.
     */
    @JvmName("yjsrlwpmkwsdcbkd")
    public suspend fun dnsPolicy(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dnsPolicy = mapped
    }

    /**
     * @param value Whether the pod uses the hosts' network IP address. The default value is `true`. Setting this to `false` enables the Kubernetes pod networking model. Most AWS Batch workloads are egress-only and don't require the overhead of IP allocation for each pod for incoming connections.
     */
    @JvmName("pgbidjlnraykyuod")
    public suspend fun hostNetwork(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.hostNetwork = mapped
    }

    /**
     * @param value List of Kubernetes secret resources. See `image_pull_secret` below.
     */
    @JvmName("gdwigkfgnyjvhtnu")
    public suspend fun imagePullSecrets(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imagePullSecrets = mapped
    }

    /**
     * @param argument List of Kubernetes secret resources. See `image_pull_secret` below.
     */
    @JvmName("mvdirxjfewhvndlq")
    public suspend fun imagePullSecrets(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesImagePullSecretArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.imagePullSecrets = mapped
    }

    /**
     * @param argument List of Kubernetes secret resources. See `image_pull_secret` below.
     */
    @JvmName("nqkfwbmofyffxbdc")
    public suspend fun imagePullSecrets(vararg argument: suspend JobDefinitionEksPropertiesPodPropertiesImagePullSecretArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesImagePullSecretArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.imagePullSecrets = mapped
    }

    /**
     * @param argument List of Kubernetes secret resources. See `image_pull_secret` below.
     */
    @JvmName("vyhjahtlngeqeqwg")
    public suspend fun imagePullSecrets(argument: suspend JobDefinitionEksPropertiesPodPropertiesImagePullSecretArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                JobDefinitionEksPropertiesPodPropertiesImagePullSecretArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.imagePullSecrets = mapped
    }

    /**
     * @param values List of Kubernetes secret resources. See `image_pull_secret` below.
     */
    @JvmName("jcffpiyagxhrrgjx")
    public suspend fun imagePullSecrets(vararg values: JobDefinitionEksPropertiesPodPropertiesImagePullSecretArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.imagePullSecrets = mapped
    }

    /**
     * @param value Containers which run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. See containers below.
     */
    @JvmName("lxrnwjprbucghrsr")
    public suspend fun initContainers(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.initContainers = mapped
    }

    /**
     * @param argument Containers which run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. See containers below.
     */
    @JvmName("ctxgpwghhrnvrfdi")
    public suspend fun initContainers(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesInitContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.initContainers = mapped
    }

    /**
     * @param argument Containers which run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. See containers below.
     */
    @JvmName("diorspyfvanndwrs")
    public suspend fun initContainers(vararg argument: suspend JobDefinitionEksPropertiesPodPropertiesInitContainerArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesInitContainerArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.initContainers = mapped
    }

    /**
     * @param argument Containers which run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. See containers below.
     */
    @JvmName("eqwsdthqrhtkjyik")
    public suspend fun initContainers(argument: suspend JobDefinitionEksPropertiesPodPropertiesInitContainerArgsBuilder.() -> Unit) {
        val toBeMapped =
            listOf(
                JobDefinitionEksPropertiesPodPropertiesInitContainerArgsBuilder().applySuspend {
                    argument()
                }.build(),
            )
        val mapped = of(toBeMapped)
        this.initContainers = mapped
    }

    /**
     * @param values Containers which run before application containers, always runs to completion, and must complete successfully before the next container starts. These containers are registered with the Amazon EKS Connector agent and persists the registration information in the Kubernetes backend data store. See containers below.
     */
    @JvmName("hdvlorlnfhsxnlsc")
    public suspend fun initContainers(vararg values: JobDefinitionEksPropertiesPodPropertiesInitContainerArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.initContainers = mapped
    }

    /**
     * @param value Metadata about the Kubernetes pod.
     */
    @JvmName("daksnvuqoxdtkjic")
    public suspend fun metadata(`value`: JobDefinitionEksPropertiesPodPropertiesMetadataArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metadata = mapped
    }

    /**
     * @param argument Metadata about the Kubernetes pod.
     */
    @JvmName("rkogqmaopamnupmh")
    public suspend fun metadata(argument: suspend JobDefinitionEksPropertiesPodPropertiesMetadataArgsBuilder.() -> Unit) {
        val toBeMapped = JobDefinitionEksPropertiesPodPropertiesMetadataArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.metadata = mapped
    }

    /**
     * @param value Name of the service account that's used to run the pod.
     */
    @JvmName("usjolomaalyvkpmu")
    public suspend fun serviceAccountName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccountName = mapped
    }

    /**
     * @param value Indicates if the processes in a container are shared, or visible, to other containers in the same pod.
     */
    @JvmName("fpqlhppospmfwmmt")
    public suspend fun shareProcessNamespace(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.shareProcessNamespace = mapped
    }

    /**
     * @param value Volumes for a job definition that uses Amazon EKS resources. AWS Batch supports emptyDir, hostPath, and secret volume types.
     */
    @JvmName("nbiordvbgtkmbkpb")
    public suspend fun volumes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    /**
     * @param argument Volumes for a job definition that uses Amazon EKS resources. AWS Batch supports emptyDir, hostPath, and secret volume types.
     */
    @JvmName("caygyofbvhcvbndn")
    public suspend fun volumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesVolumeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Volumes for a job definition that uses Amazon EKS resources. AWS Batch supports emptyDir, hostPath, and secret volume types.
     */
    @JvmName("slslftqaubmkfkqg")
    public suspend fun volumes(vararg argument: suspend JobDefinitionEksPropertiesPodPropertiesVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobDefinitionEksPropertiesPodPropertiesVolumeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param argument Volumes for a job definition that uses Amazon EKS resources. AWS Batch supports emptyDir, hostPath, and secret volume types.
     */
    @JvmName("qpffgwxunmmoboot")
    public suspend fun volumes(argument: suspend JobDefinitionEksPropertiesPodPropertiesVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobDefinitionEksPropertiesPodPropertiesVolumeArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.volumes = mapped
    }

    /**
     * @param values Volumes for a job definition that uses Amazon EKS resources. AWS Batch supports emptyDir, hostPath, and secret volume types.
     */
    @JvmName("ofvuysxpilwdmsey")
    public suspend fun volumes(vararg values: JobDefinitionEksPropertiesPodPropertiesVolumeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumes = mapped
    }

    internal fun build(): JobDefinitionEksPropertiesPodPropertiesArgs =
        JobDefinitionEksPropertiesPodPropertiesArgs(
            containers = containers ?: throw PulumiNullFieldException("containers"),
            dnsPolicy = dnsPolicy,
            hostNetwork = hostNetwork,
            imagePullSecrets = imagePullSecrets,
            initContainers = initContainers,
            metadata = metadata,
            serviceAccountName = serviceAccountName,
            shareProcessNamespace = shareProcessNamespace,
            volumes = volumes,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy