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

com.pulumi.azure.containerapp.kotlin.inputs.AppTemplateInitContainerArgs.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: 6.15.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.containerapp.kotlin.inputs

import com.pulumi.azure.containerapp.inputs.AppTemplateInitContainerArgs.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.Double
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property args A list of extra arguments to pass to the container.
 * @property commands A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.
 * @property cpu The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. When there's a workload profile specified, there's no such constraint.
 * > **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`
 * @property envs One or more `env` blocks as detailed below.
 * @property ephemeralStorage The amount of ephemeral storage available to the Container App.
 * > **NOTE:** `ephemeral_storage` is currently in preview and not configurable at this time.
 * @property image The image to use to create the container.
 * @property memory The amount of memory to allocate to the container. Possible values are `0.5Gi`, `1Gi`, `1.5Gi`, `2Gi`, `2.5Gi`, `3Gi`, `3.5Gi` and `4Gi`. When there's a workload profile specified, there's no such constraint.
 * > **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`
 * @property name The name of the container
 * @property volumeMounts A `volume_mounts` block as detailed below.
 */
public data class AppTemplateInitContainerArgs(
    public val args: Output>? = null,
    public val commands: Output>? = null,
    public val cpu: Output? = null,
    public val envs: Output>? = null,
    public val ephemeralStorage: Output? = null,
    public val image: Output,
    public val memory: Output? = null,
    public val name: Output,
    public val volumeMounts: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.containerapp.inputs.AppTemplateInitContainerArgs =
        com.pulumi.azure.containerapp.inputs.AppTemplateInitContainerArgs.builder()
            .args(args?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .commands(commands?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .cpu(cpu?.applyValue({ args0 -> args0 }))
            .envs(envs?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
            .ephemeralStorage(ephemeralStorage?.applyValue({ args0 -> args0 }))
            .image(image.applyValue({ args0 -> args0 }))
            .memory(memory?.applyValue({ args0 -> args0 }))
            .name(name.applyValue({ args0 -> args0 }))
            .volumeMounts(
                volumeMounts?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

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

    private var commands: Output>? = null

    private var cpu: Output? = null

    private var envs: Output>? = null

    private var ephemeralStorage: Output? = null

    private var image: Output? = null

    private var memory: Output? = null

    private var name: Output? = null

    private var volumeMounts: Output>? = null

    /**
     * @param value A list of extra arguments to pass to the container.
     */
    @JvmName("brybqvkosnqgpqdy")
    public suspend fun args(`value`: Output>) {
        this.args = value
    }

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

    /**
     * @param values A list of extra arguments to pass to the container.
     */
    @JvmName("rcyconpsxyvrywev")
    public suspend fun args(values: List>) {
        this.args = Output.all(values)
    }

    /**
     * @param value A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.
     */
    @JvmName("woexinuhvphschpd")
    public suspend fun commands(`value`: Output>) {
        this.commands = value
    }

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

    /**
     * @param values A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.
     */
    @JvmName("gknhgrsrfonylsbm")
    public suspend fun commands(values: List>) {
        this.commands = Output.all(values)
    }

    /**
     * @param value The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. When there's a workload profile specified, there's no such constraint.
     * > **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`
     */
    @JvmName("gbflwfrvkmejclbt")
    public suspend fun cpu(`value`: Output) {
        this.cpu = value
    }

    /**
     * @param value One or more `env` blocks as detailed below.
     */
    @JvmName("cprhndwyvbnficsf")
    public suspend fun envs(`value`: Output>) {
        this.envs = value
    }

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

    /**
     * @param values One or more `env` blocks as detailed below.
     */
    @JvmName("mjokrrnhffhisnvm")
    public suspend fun envs(values: List>) {
        this.envs = Output.all(values)
    }

    /**
     * @param value The amount of ephemeral storage available to the Container App.
     * > **NOTE:** `ephemeral_storage` is currently in preview and not configurable at this time.
     */
    @JvmName("oneqjmyaqppmpioy")
    public suspend fun ephemeralStorage(`value`: Output) {
        this.ephemeralStorage = value
    }

    /**
     * @param value The image to use to create the container.
     */
    @JvmName("itsheaoshmpwlgot")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value The amount of memory to allocate to the container. Possible values are `0.5Gi`, `1Gi`, `1.5Gi`, `2Gi`, `2.5Gi`, `3Gi`, `3.5Gi` and `4Gi`. When there's a workload profile specified, there's no such constraint.
     * > **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`
     */
    @JvmName("cbsjqrsleymfdvnl")
    public suspend fun memory(`value`: Output) {
        this.memory = value
    }

    /**
     * @param value The name of the container
     */
    @JvmName("jhtylvwjwtkxmbqu")
    public suspend fun name(`value`: Output) {
        this.name = value
    }

    /**
     * @param value A `volume_mounts` block as detailed below.
     */
    @JvmName("gxrxiadcddoejlie")
    public suspend fun volumeMounts(`value`: Output>) {
        this.volumeMounts = value
    }

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

    /**
     * @param values A `volume_mounts` block as detailed below.
     */
    @JvmName("lfffrtxcjdburehb")
    public suspend fun volumeMounts(values: List>) {
        this.volumeMounts = Output.all(values)
    }

    /**
     * @param value A list of extra arguments to pass to the container.
     */
    @JvmName("qnrckmbkxtqscenc")
    public suspend fun args(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param values A list of extra arguments to pass to the container.
     */
    @JvmName("mtgqbgamwsrjnnxi")
    public suspend fun args(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.args = mapped
    }

    /**
     * @param value A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.
     */
    @JvmName("vmgixspppdhfvnaw")
    public suspend fun commands(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param values A command to pass to the container to override the default. This is provided as a list of command line elements without spaces.
     */
    @JvmName("doicbdacetpdkykt")
    public suspend fun commands(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.commands = mapped
    }

    /**
     * @param value The amount of vCPU to allocate to the container. Possible values include `0.25`, `0.5`, `0.75`, `1.0`, `1.25`, `1.5`, `1.75`, and `2.0`. When there's a workload profile specified, there's no such constraint.
     * > **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.0` / `2.0` or `0.5` / `1.0`
     */
    @JvmName("hfjubspchfvxogco")
    public suspend fun cpu(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cpu = mapped
    }

    /**
     * @param value One or more `env` blocks as detailed below.
     */
    @JvmName("ssyraqitawtkeefg")
    public suspend fun envs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param argument One or more `env` blocks as detailed below.
     */
    @JvmName("fycnedfidufvcllj")
    public suspend
    fun envs(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppTemplateInitContainerEnvArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument One or more `env` blocks as detailed below.
     */
    @JvmName("siwfmyvuxvvesdpl")
    public suspend fun envs(
        vararg
        argument: suspend AppTemplateInitContainerEnvArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AppTemplateInitContainerEnvArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param argument One or more `env` blocks as detailed below.
     */
    @JvmName("kbkrgbhjvvyomoet")
    public suspend fun envs(argument: suspend AppTemplateInitContainerEnvArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AppTemplateInitContainerEnvArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.envs = mapped
    }

    /**
     * @param values One or more `env` blocks as detailed below.
     */
    @JvmName("webcjmgsdngcuaht")
    public suspend fun envs(vararg values: AppTemplateInitContainerEnvArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.envs = mapped
    }

    /**
     * @param value The amount of ephemeral storage available to the Container App.
     * > **NOTE:** `ephemeral_storage` is currently in preview and not configurable at this time.
     */
    @JvmName("kmdddowyoscpouht")
    public suspend fun ephemeralStorage(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ephemeralStorage = mapped
    }

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

    /**
     * @param value The amount of memory to allocate to the container. Possible values are `0.5Gi`, `1Gi`, `1.5Gi`, `2Gi`, `2.5Gi`, `3Gi`, `3.5Gi` and `4Gi`. When there's a workload profile specified, there's no such constraint.
     * > **NOTE:** `cpu` and `memory` must be specified in `0.25'/'0.5Gi` combination increments. e.g. `1.25` / `2.5Gi` or `0.75` / `1.5Gi`
     */
    @JvmName("jfglkmyltlokmrbv")
    public suspend fun memory(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.memory = mapped
    }

    /**
     * @param value The name of the container
     */
    @JvmName("webdylcodhljfirs")
    public suspend fun name(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.name = mapped
    }

    /**
     * @param value A `volume_mounts` block as detailed below.
     */
    @JvmName("uthmwldacjyxxnju")
    public suspend fun volumeMounts(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    /**
     * @param argument A `volume_mounts` block as detailed below.
     */
    @JvmName("mqdulblfcaavsopx")
    public suspend
    fun volumeMounts(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AppTemplateInitContainerVolumeMountArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument A `volume_mounts` block as detailed below.
     */
    @JvmName("nrcivueyunkrqqqi")
    public suspend fun volumeMounts(
        vararg
        argument: suspend AppTemplateInitContainerVolumeMountArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            AppTemplateInitContainerVolumeMountArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param argument A `volume_mounts` block as detailed below.
     */
    @JvmName("hufyqwkrlbiulgqa")
    public suspend
    fun volumeMounts(argument: suspend AppTemplateInitContainerVolumeMountArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            AppTemplateInitContainerVolumeMountArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.volumeMounts = mapped
    }

    /**
     * @param values A `volume_mounts` block as detailed below.
     */
    @JvmName("gtftslihjlsrardt")
    public suspend fun volumeMounts(vararg values: AppTemplateInitContainerVolumeMountArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.volumeMounts = mapped
    }

    internal fun build(): AppTemplateInitContainerArgs = AppTemplateInitContainerArgs(
        args = args,
        commands = commands,
        cpu = cpu,
        envs = envs,
        ephemeralStorage = ephemeralStorage,
        image = image ?: throw PulumiNullFieldException("image"),
        memory = memory,
        name = name ?: throw PulumiNullFieldException("name"),
        volumeMounts = volumeMounts,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy