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

com.pulumi.azure.batch.kotlin.inputs.PoolStartTaskContainerArgs.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.batch.kotlin.inputs

import com.pulumi.azure.batch.inputs.PoolStartTaskContainerArgs.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 imageName The image to use to create the container in which the task will run. This is the full image reference, as would be specified to "docker pull". If no tag is provided as part of the image name, the tag ":latest" is used as a default.
 * @property registries The `container_registries` block defined as below.
 * @property runOptions Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.
 * @property workingDirectory A flag to indicate where the container task working directory is. Possible values are `TaskWorkingDirectory` and `ContainerImageDefault`.
 */
public data class PoolStartTaskContainerArgs(
    public val imageName: Output,
    public val registries: Output>? = null,
    public val runOptions: Output? = null,
    public val workingDirectory: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.azure.batch.inputs.PoolStartTaskContainerArgs =
        com.pulumi.azure.batch.inputs.PoolStartTaskContainerArgs.builder()
            .imageName(imageName.applyValue({ args0 -> args0 }))
            .registries(
                registries?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .runOptions(runOptions?.applyValue({ args0 -> args0 }))
            .workingDirectory(workingDirectory?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PoolStartTaskContainerArgs].
 */
@PulumiTagMarker
public class PoolStartTaskContainerArgsBuilder internal constructor() {
    private var imageName: Output? = null

    private var registries: Output>? = null

    private var runOptions: Output? = null

    private var workingDirectory: Output? = null

    /**
     * @param value The image to use to create the container in which the task will run. This is the full image reference, as would be specified to "docker pull". If no tag is provided as part of the image name, the tag ":latest" is used as a default.
     */
    @JvmName("etkpuuripuuvrnpd")
    public suspend fun imageName(`value`: Output) {
        this.imageName = value
    }

    /**
     * @param value The `container_registries` block defined as below.
     */
    @JvmName("squsvhhnkkcbwefo")
    public suspend fun registries(`value`: Output>) {
        this.registries = value
    }

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

    /**
     * @param values The `container_registries` block defined as below.
     */
    @JvmName("lpxovivfyrjyxegh")
    public suspend fun registries(values: List>) {
        this.registries = Output.all(values)
    }

    /**
     * @param value Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.
     */
    @JvmName("ecmyjqpsrpgqqrwq")
    public suspend fun runOptions(`value`: Output) {
        this.runOptions = value
    }

    /**
     * @param value A flag to indicate where the container task working directory is. Possible values are `TaskWorkingDirectory` and `ContainerImageDefault`.
     */
    @JvmName("aoakhtqtirvruoaq")
    public suspend fun workingDirectory(`value`: Output) {
        this.workingDirectory = value
    }

    /**
     * @param value The image to use to create the container in which the task will run. This is the full image reference, as would be specified to "docker pull". If no tag is provided as part of the image name, the tag ":latest" is used as a default.
     */
    @JvmName("nuxhtpfctfgsxnej")
    public suspend fun imageName(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.imageName = mapped
    }

    /**
     * @param value The `container_registries` block defined as below.
     */
    @JvmName("ftxlqlpdnyrmbfha")
    public suspend fun registries(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.registries = mapped
    }

    /**
     * @param argument The `container_registries` block defined as below.
     */
    @JvmName("evrdlnhanreulqbr")
    public suspend
    fun registries(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            PoolStartTaskContainerRegistryArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param argument The `container_registries` block defined as below.
     */
    @JvmName("avtjrcvgxvtgbmri")
    public suspend fun registries(
        vararg
        argument: suspend PoolStartTaskContainerRegistryArgsBuilder.() -> Unit,
    ) {
        val toBeMapped = argument.toList().map {
            PoolStartTaskContainerRegistryArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param argument The `container_registries` block defined as below.
     */
    @JvmName("hvbsjsenxqywmeik")
    public suspend
    fun registries(argument: suspend PoolStartTaskContainerRegistryArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            PoolStartTaskContainerRegistryArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.registries = mapped
    }

    /**
     * @param values The `container_registries` block defined as below.
     */
    @JvmName("kaiokijgbhijduep")
    public suspend fun registries(vararg values: PoolStartTaskContainerRegistryArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.registries = mapped
    }

    /**
     * @param value Additional options to the container create command. These additional options are supplied as arguments to the "docker create" command, in addition to those controlled by the Batch Service.
     */
    @JvmName("lltwyyxlpahfuepj")
    public suspend fun runOptions(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runOptions = mapped
    }

    /**
     * @param value A flag to indicate where the container task working directory is. Possible values are `TaskWorkingDirectory` and `ContainerImageDefault`.
     */
    @JvmName("immehdbwdqnefbpc")
    public suspend fun workingDirectory(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workingDirectory = mapped
    }

    internal fun build(): PoolStartTaskContainerArgs = PoolStartTaskContainerArgs(
        imageName = imageName ?: throw PulumiNullFieldException("imageName"),
        registries = registries,
        runOptions = runOptions,
        workingDirectory = workingDirectory,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy