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

com.pulumi.awsnative.gamelift.kotlin.inputs.ContainerGroupDefinitionContainerDefinitionArgs.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: 1.24.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.gamelift.kotlin.inputs

import com.pulumi.awsnative.gamelift.inputs.ContainerGroupDefinitionContainerDefinitionArgs.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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Details about a container that is used in a container fleet
 * @property command The command that's passed to the container.
 * @property containerName A descriptive label for the container definition. Container definition names must be unique with a container group definition.
 * @property cpu The maximum number of CPU units reserved for this container. The value is expressed as an integer amount of CPU units. 1 vCPU is equal to 1024 CPU units
 * @property dependsOn A list of container dependencies that determines when this container starts up and shuts down. For container groups with multiple containers, dependencies let you define a startup/shutdown sequence across the containers.
 * @property entryPoint The entry point that's passed to the container so that it will run as an executable. If there are multiple arguments, each argument is a string in the array.
 * @property environment The environment variables to pass to a container.
 * @property essential Specifies if the container is essential. If an essential container fails a health check, then all containers in the container group will be restarted. You must specify exactly 1 essential container in a container group.
 * @property healthCheck Specifies how the health of the containers will be checked.
 * @property imageUri Specifies the image URI of this container.
 * @property memoryLimits Specifies how much memory is available to the container. You must specify at least this parameter or the TotalMemoryLimit parameter of the ContainerGroupDefinition.
 * @property portConfiguration Defines the ports on the container.
 * @property resolvedImageDigest The digest of the container image.
 * @property workingDirectory The working directory to run commands inside the container in.
 */
public data class ContainerGroupDefinitionContainerDefinitionArgs(
    public val command: Output>? = null,
    public val containerName: Output,
    public val cpu: Output? = null,
    public val dependsOn: Output>? = null,
    public val entryPoint: Output>? = null,
    public val environment: Output>? = null,
    public val essential: Output? = null,
    public val healthCheck: Output? = null,
    public val imageUri: Output,
    public val memoryLimits: Output? = null,
    public val portConfiguration: Output? = null,
    public val resolvedImageDigest: Output? = null,
    public val workingDirectory: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.gamelift.inputs.ContainerGroupDefinitionContainerDefinitionArgs =
        com.pulumi.awsnative.gamelift.inputs.ContainerGroupDefinitionContainerDefinitionArgs.builder()
            .command(command?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .containerName(containerName.applyValue({ args0 -> args0 }))
            .cpu(cpu?.applyValue({ args0 -> args0 }))
            .dependsOn(
                dependsOn?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .entryPoint(entryPoint?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .environment(
                environment?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .essential(essential?.applyValue({ args0 -> args0 }))
            .healthCheck(healthCheck?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .imageUri(imageUri.applyValue({ args0 -> args0 }))
            .memoryLimits(memoryLimits?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .portConfiguration(portConfiguration?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .resolvedImageDigest(resolvedImageDigest?.applyValue({ args0 -> args0 }))
            .workingDirectory(workingDirectory?.applyValue({ args0 -> args0 })).build()
}

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

    private var containerName: Output? = null

    private var cpu: Output? = null

    private var dependsOn: Output>? = null

    private var entryPoint: Output>? = null

    private var environment: Output>? = null

    private var essential: Output? = null

    private var healthCheck: Output? = null

    private var imageUri: Output? = null

    private var memoryLimits: Output? = null

    private var portConfiguration: Output? = null

    private var resolvedImageDigest: Output? = null

    private var workingDirectory: Output? = null

    /**
     * @param value The command that's passed to the container.
     */
    @JvmName("ecvqksqmoxubqhgm")
    public suspend fun command(`value`: Output>) {
        this.command = value
    }

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

    /**
     * @param values The command that's passed to the container.
     */
    @JvmName("ulpvygrfiltplvid")
    public suspend fun command(values: List>) {
        this.command = Output.all(values)
    }

    /**
     * @param value A descriptive label for the container definition. Container definition names must be unique with a container group definition.
     */
    @JvmName("ihactubbdvmlheeo")
    public suspend fun containerName(`value`: Output) {
        this.containerName = value
    }

    /**
     * @param value The maximum number of CPU units reserved for this container. The value is expressed as an integer amount of CPU units. 1 vCPU is equal to 1024 CPU units
     */
    @JvmName("lkoldjwnuhtsvthh")
    public suspend fun cpu(`value`: Output) {
        this.cpu = value
    }

    /**
     * @param value A list of container dependencies that determines when this container starts up and shuts down. For container groups with multiple containers, dependencies let you define a startup/shutdown sequence across the containers.
     */
    @JvmName("qitelrodbnpixaql")
    public suspend fun dependsOn(`value`: Output>) {
        this.dependsOn = value
    }

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

    /**
     * @param values A list of container dependencies that determines when this container starts up and shuts down. For container groups with multiple containers, dependencies let you define a startup/shutdown sequence across the containers.
     */
    @JvmName("wugwnxxlchtsinye")
    public suspend fun dependsOn(values: List>) {
        this.dependsOn = Output.all(values)
    }

    /**
     * @param value The entry point that's passed to the container so that it will run as an executable. If there are multiple arguments, each argument is a string in the array.
     */
    @JvmName("fpdrnyllbafjelht")
    public suspend fun entryPoint(`value`: Output>) {
        this.entryPoint = value
    }

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

    /**
     * @param values The entry point that's passed to the container so that it will run as an executable. If there are multiple arguments, each argument is a string in the array.
     */
    @JvmName("njlkvdytoshskawm")
    public suspend fun entryPoint(values: List>) {
        this.entryPoint = Output.all(values)
    }

    /**
     * @param value The environment variables to pass to a container.
     */
    @JvmName("rvhfmlugltwnbdbt")
    public suspend fun environment(`value`: Output>) {
        this.environment = value
    }

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

    /**
     * @param values The environment variables to pass to a container.
     */
    @JvmName("wthooydfydpbcoll")
    public suspend fun environment(values: List>) {
        this.environment = Output.all(values)
    }

    /**
     * @param value Specifies if the container is essential. If an essential container fails a health check, then all containers in the container group will be restarted. You must specify exactly 1 essential container in a container group.
     */
    @JvmName("tcorrxnkjwnbnudl")
    public suspend fun essential(`value`: Output) {
        this.essential = value
    }

    /**
     * @param value Specifies how the health of the containers will be checked.
     */
    @JvmName("oxddtwmekxpwdpaf")
    public suspend fun healthCheck(`value`: Output) {
        this.healthCheck = value
    }

    /**
     * @param value Specifies the image URI of this container.
     */
    @JvmName("hyovxemxkcylecej")
    public suspend fun imageUri(`value`: Output) {
        this.imageUri = value
    }

    /**
     * @param value Specifies how much memory is available to the container. You must specify at least this parameter or the TotalMemoryLimit parameter of the ContainerGroupDefinition.
     */
    @JvmName("besijpafbpnlwjox")
    public suspend fun memoryLimits(`value`: Output) {
        this.memoryLimits = value
    }

    /**
     * @param value Defines the ports on the container.
     */
    @JvmName("nvefhatbndtynofa")
    public suspend fun portConfiguration(`value`: Output) {
        this.portConfiguration = value
    }

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

    /**
     * @param value The working directory to run commands inside the container in.
     */
    @JvmName("oavihckfcoshrbho")
    public suspend fun workingDirectory(`value`: Output) {
        this.workingDirectory = value
    }

    /**
     * @param value The command that's passed to the container.
     */
    @JvmName("dywgrucrftfsxiqf")
    public suspend fun command(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.command = mapped
    }

    /**
     * @param values The command that's passed to the container.
     */
    @JvmName("ailtfrwfbtgxvqht")
    public suspend fun command(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.command = mapped
    }

    /**
     * @param value A descriptive label for the container definition. Container definition names must be unique with a container group definition.
     */
    @JvmName("eyfmpjoxiklbidjs")
    public suspend fun containerName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.containerName = mapped
    }

    /**
     * @param value The maximum number of CPU units reserved for this container. The value is expressed as an integer amount of CPU units. 1 vCPU is equal to 1024 CPU units
     */
    @JvmName("robtyltihjicutmm")
    public suspend fun cpu(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cpu = mapped
    }

    /**
     * @param value A list of container dependencies that determines when this container starts up and shuts down. For container groups with multiple containers, dependencies let you define a startup/shutdown sequence across the containers.
     */
    @JvmName("lqiwlesdktrxvcrd")
    public suspend fun dependsOn(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dependsOn = mapped
    }

    /**
     * @param argument A list of container dependencies that determines when this container starts up and shuts down. For container groups with multiple containers, dependencies let you define a startup/shutdown sequence across the containers.
     */
    @JvmName("dhbmqhgpgcttjsph")
    public suspend fun dependsOn(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ContainerGroupDefinitionContainerDependencyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.dependsOn = mapped
    }

    /**
     * @param argument A list of container dependencies that determines when this container starts up and shuts down. For container groups with multiple containers, dependencies let you define a startup/shutdown sequence across the containers.
     */
    @JvmName("xujwuajxficgqabw")
    public suspend fun dependsOn(vararg argument: suspend ContainerGroupDefinitionContainerDependencyArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ContainerGroupDefinitionContainerDependencyArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.dependsOn = mapped
    }

    /**
     * @param argument A list of container dependencies that determines when this container starts up and shuts down. For container groups with multiple containers, dependencies let you define a startup/shutdown sequence across the containers.
     */
    @JvmName("jrsicmvryjiaeudk")
    public suspend fun dependsOn(argument: suspend ContainerGroupDefinitionContainerDependencyArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ContainerGroupDefinitionContainerDependencyArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.dependsOn = mapped
    }

    /**
     * @param values A list of container dependencies that determines when this container starts up and shuts down. For container groups with multiple containers, dependencies let you define a startup/shutdown sequence across the containers.
     */
    @JvmName("jarvkqsbkdewefvi")
    public suspend fun dependsOn(vararg values: ContainerGroupDefinitionContainerDependencyArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dependsOn = mapped
    }

    /**
     * @param value The entry point that's passed to the container so that it will run as an executable. If there are multiple arguments, each argument is a string in the array.
     */
    @JvmName("xblbfktvuqetydqp")
    public suspend fun entryPoint(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.entryPoint = mapped
    }

    /**
     * @param values The entry point that's passed to the container so that it will run as an executable. If there are multiple arguments, each argument is a string in the array.
     */
    @JvmName("qwtuilhoflbvtawk")
    public suspend fun entryPoint(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.entryPoint = mapped
    }

    /**
     * @param value The environment variables to pass to a container.
     */
    @JvmName("fwbggokqovljeyfr")
    public suspend fun environment(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environment = mapped
    }

    /**
     * @param argument The environment variables to pass to a container.
     */
    @JvmName("lqyevrchrhjgfxps")
    public suspend fun environment(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ContainerGroupDefinitionContainerEnvironmentArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.environment = mapped
    }

    /**
     * @param argument The environment variables to pass to a container.
     */
    @JvmName("gepfkahvjiudyxyb")
    public suspend fun environment(vararg argument: suspend ContainerGroupDefinitionContainerEnvironmentArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ContainerGroupDefinitionContainerEnvironmentArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.environment = mapped
    }

    /**
     * @param argument The environment variables to pass to a container.
     */
    @JvmName("vlhouttgmgpwspey")
    public suspend fun environment(argument: suspend ContainerGroupDefinitionContainerEnvironmentArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ContainerGroupDefinitionContainerEnvironmentArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.environment = mapped
    }

    /**
     * @param values The environment variables to pass to a container.
     */
    @JvmName("mgkhnfjkcsuarclb")
    public suspend fun environment(vararg values: ContainerGroupDefinitionContainerEnvironmentArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environment = mapped
    }

    /**
     * @param value Specifies if the container is essential. If an essential container fails a health check, then all containers in the container group will be restarted. You must specify exactly 1 essential container in a container group.
     */
    @JvmName("cokcibsdepkgaxtd")
    public suspend fun essential(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.essential = mapped
    }

    /**
     * @param value Specifies how the health of the containers will be checked.
     */
    @JvmName("bsoufcucmxyvqcio")
    public suspend fun healthCheck(`value`: ContainerGroupDefinitionContainerHealthCheckArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.healthCheck = mapped
    }

    /**
     * @param argument Specifies how the health of the containers will be checked.
     */
    @JvmName("wbbvvywmohhtuopo")
    public suspend fun healthCheck(argument: suspend ContainerGroupDefinitionContainerHealthCheckArgsBuilder.() -> Unit) {
        val toBeMapped = ContainerGroupDefinitionContainerHealthCheckArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.healthCheck = mapped
    }

    /**
     * @param value Specifies the image URI of this container.
     */
    @JvmName("wojvrfutavjlvcgx")
    public suspend fun imageUri(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.imageUri = mapped
    }

    /**
     * @param value Specifies how much memory is available to the container. You must specify at least this parameter or the TotalMemoryLimit parameter of the ContainerGroupDefinition.
     */
    @JvmName("haiwqivqifpmkivr")
    public suspend fun memoryLimits(`value`: ContainerGroupDefinitionMemoryLimitsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.memoryLimits = mapped
    }

    /**
     * @param argument Specifies how much memory is available to the container. You must specify at least this parameter or the TotalMemoryLimit parameter of the ContainerGroupDefinition.
     */
    @JvmName("wbpcdinosagmmqwn")
    public suspend fun memoryLimits(argument: suspend ContainerGroupDefinitionMemoryLimitsArgsBuilder.() -> Unit) {
        val toBeMapped = ContainerGroupDefinitionMemoryLimitsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.memoryLimits = mapped
    }

    /**
     * @param value Defines the ports on the container.
     */
    @JvmName("acvlovmgedcdince")
    public suspend fun portConfiguration(`value`: ContainerGroupDefinitionPortConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.portConfiguration = mapped
    }

    /**
     * @param argument Defines the ports on the container.
     */
    @JvmName("saltscubbtnveybp")
    public suspend fun portConfiguration(argument: suspend ContainerGroupDefinitionPortConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ContainerGroupDefinitionPortConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.portConfiguration = mapped
    }

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

    /**
     * @param value The working directory to run commands inside the container in.
     */
    @JvmName("gpygcpngdspkvktp")
    public suspend fun workingDirectory(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workingDirectory = mapped
    }

    internal fun build(): ContainerGroupDefinitionContainerDefinitionArgs =
        ContainerGroupDefinitionContainerDefinitionArgs(
            command = command,
            containerName = containerName ?: throw PulumiNullFieldException("containerName"),
            cpu = cpu,
            dependsOn = dependsOn,
            entryPoint = entryPoint,
            environment = environment,
            essential = essential,
            healthCheck = healthCheck,
            imageUri = imageUri ?: throw PulumiNullFieldException("imageUri"),
            memoryLimits = memoryLimits,
            portConfiguration = portConfiguration,
            resolvedImageDigest = resolvedImageDigest,
            workingDirectory = workingDirectory,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy