Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
com.pulumi.azure.batch.kotlin.inputs.PoolStartTaskArgs.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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.azure.batch.kotlin.inputs
import com.pulumi.azure.batch.inputs.PoolStartTaskArgs.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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName
/**
*
* @property commandLine The command line executed by the start task.
* @property commonEnvironmentProperties A map of strings (key,value) that represents the environment variables to set in the start task.
* @property containers A `container` block is the settings for the container under which the start task runs as defined below. When this is specified, all directories recursively below the `AZ_BATCH_NODE_ROOT_DIR` (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
* @property resourceFiles One or more `resource_file` blocks that describe the files to be downloaded to a compute node as defined below.
* @property taskRetryMaximum The number of retry count.
* @property userIdentity A `user_identity` block that describes the user identity under which the start task runs as defined below.
* @property waitForSuccess A flag that indicates if the Batch pool should wait for the start task to be completed. Default to `false`.
*/
public data class PoolStartTaskArgs(
public val commandLine: Output,
public val commonEnvironmentProperties: Output>? = null,
public val containers: Output>? = null,
public val resourceFiles: Output>? = null,
public val taskRetryMaximum: Output? = null,
public val userIdentity: Output,
public val waitForSuccess: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.batch.inputs.PoolStartTaskArgs =
com.pulumi.azure.batch.inputs.PoolStartTaskArgs.builder()
.commandLine(commandLine.applyValue({ args0 -> args0 }))
.commonEnvironmentProperties(
commonEnvironmentProperties?.applyValue({ args0 ->
args0.map({ args0 ->
args0.key.to(args0.value)
}).toMap()
}),
)
.containers(
containers?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.resourceFiles(
resourceFiles?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.taskRetryMaximum(taskRetryMaximum?.applyValue({ args0 -> args0 }))
.userIdentity(userIdentity.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.waitForSuccess(waitForSuccess?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [PoolStartTaskArgs].
*/
@PulumiTagMarker
public class PoolStartTaskArgsBuilder internal constructor() {
private var commandLine: Output? = null
private var commonEnvironmentProperties: Output>? = null
private var containers: Output>? = null
private var resourceFiles: Output>? = null
private var taskRetryMaximum: Output? = null
private var userIdentity: Output? = null
private var waitForSuccess: Output? = null
/**
* @param value The command line executed by the start task.
*/
@JvmName("hntkvgooanjfaroj")
public suspend fun commandLine(`value`: Output) {
this.commandLine = value
}
/**
* @param value A map of strings (key,value) that represents the environment variables to set in the start task.
*/
@JvmName("dvvydicaaenjrguw")
public suspend fun commonEnvironmentProperties(`value`: Output>) {
this.commonEnvironmentProperties = value
}
/**
* @param value A `container` block is the settings for the container under which the start task runs as defined below. When this is specified, all directories recursively below the `AZ_BATCH_NODE_ROOT_DIR` (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
*/
@JvmName("yhihpvpmkfkvmduo")
public suspend fun containers(`value`: Output>) {
this.containers = value
}
@JvmName("hshtvqqqwmegwgxv")
public suspend fun containers(vararg values: Output) {
this.containers = Output.all(values.asList())
}
/**
* @param values A `container` block is the settings for the container under which the start task runs as defined below. When this is specified, all directories recursively below the `AZ_BATCH_NODE_ROOT_DIR` (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
*/
@JvmName("idkboeumkjhrfdyv")
public suspend fun containers(values: List>) {
this.containers = Output.all(values)
}
/**
* @param value One or more `resource_file` blocks that describe the files to be downloaded to a compute node as defined below.
*/
@JvmName("unculfwngeljnurt")
public suspend fun resourceFiles(`value`: Output>) {
this.resourceFiles = value
}
@JvmName("tkdfqaxjxsbdakgh")
public suspend fun resourceFiles(vararg values: Output) {
this.resourceFiles = Output.all(values.asList())
}
/**
* @param values One or more `resource_file` blocks that describe the files to be downloaded to a compute node as defined below.
*/
@JvmName("orshrfuqyifqixte")
public suspend fun resourceFiles(values: List>) {
this.resourceFiles = Output.all(values)
}
/**
* @param value The number of retry count.
*/
@JvmName("ylddghxvoxxvoxxl")
public suspend fun taskRetryMaximum(`value`: Output) {
this.taskRetryMaximum = value
}
/**
* @param value A `user_identity` block that describes the user identity under which the start task runs as defined below.
*/
@JvmName("gqyihjxnpjjxpwhc")
public suspend fun userIdentity(`value`: Output) {
this.userIdentity = value
}
/**
* @param value A flag that indicates if the Batch pool should wait for the start task to be completed. Default to `false`.
*/
@JvmName("oyytonndwgotepkr")
public suspend fun waitForSuccess(`value`: Output) {
this.waitForSuccess = value
}
/**
* @param value The command line executed by the start task.
*/
@JvmName("ibtqbxhhkmqcqfoj")
public suspend fun commandLine(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.commandLine = mapped
}
/**
* @param value A map of strings (key,value) that represents the environment variables to set in the start task.
*/
@JvmName("bksyjwadbmiomono")
public suspend fun commonEnvironmentProperties(`value`: Map?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.commonEnvironmentProperties = mapped
}
/**
* @param values A map of strings (key,value) that represents the environment variables to set in the start task.
*/
@JvmName("yosgmvndthwmdpir")
public fun commonEnvironmentProperties(vararg values: Pair) {
val toBeMapped = values.toMap()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.commonEnvironmentProperties = mapped
}
/**
* @param value A `container` block is the settings for the container under which the start task runs as defined below. When this is specified, all directories recursively below the `AZ_BATCH_NODE_ROOT_DIR` (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
*/
@JvmName("wovrqsytylglyyes")
public suspend fun containers(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.containers = mapped
}
/**
* @param argument A `container` block is the settings for the container under which the start task runs as defined below. When this is specified, all directories recursively below the `AZ_BATCH_NODE_ROOT_DIR` (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
*/
@JvmName("fqxckmrtotnujajv")
public suspend fun containers(argument: List Unit>) {
val toBeMapped = argument.toList().map {
PoolStartTaskContainerArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.containers = mapped
}
/**
* @param argument A `container` block is the settings for the container under which the start task runs as defined below. When this is specified, all directories recursively below the `AZ_BATCH_NODE_ROOT_DIR` (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
*/
@JvmName("rlstukdjtythdtqt")
public suspend fun containers(vararg argument: suspend PoolStartTaskContainerArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
PoolStartTaskContainerArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.containers = mapped
}
/**
* @param argument A `container` block is the settings for the container under which the start task runs as defined below. When this is specified, all directories recursively below the `AZ_BATCH_NODE_ROOT_DIR` (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
*/
@JvmName("spxpwdslmitifeye")
public suspend fun containers(argument: suspend PoolStartTaskContainerArgsBuilder.() -> Unit) {
val toBeMapped = listOf(PoolStartTaskContainerArgsBuilder().applySuspend { argument() }.build())
val mapped = of(toBeMapped)
this.containers = mapped
}
/**
* @param values A `container` block is the settings for the container under which the start task runs as defined below. When this is specified, all directories recursively below the `AZ_BATCH_NODE_ROOT_DIR` (the root of Azure Batch directories on the node) are mapped into the container, all task environment variables are mapped into the container, and the task command line is executed in the container.
*/
@JvmName("ymbhqgxtdsclhvvk")
public suspend fun containers(vararg values: PoolStartTaskContainerArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.containers = mapped
}
/**
* @param value One or more `resource_file` blocks that describe the files to be downloaded to a compute node as defined below.
*/
@JvmName("vulyvyhmdthfnxio")
public suspend fun resourceFiles(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.resourceFiles = mapped
}
/**
* @param argument One or more `resource_file` blocks that describe the files to be downloaded to a compute node as defined below.
*/
@JvmName("vjhvenhereapukks")
public suspend fun resourceFiles(argument: List Unit>) {
val toBeMapped = argument.toList().map {
PoolStartTaskResourceFileArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.resourceFiles = mapped
}
/**
* @param argument One or more `resource_file` blocks that describe the files to be downloaded to a compute node as defined below.
*/
@JvmName("gjglivcwmwmenldn")
public suspend fun resourceFiles(vararg argument: suspend PoolStartTaskResourceFileArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
PoolStartTaskResourceFileArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.resourceFiles = mapped
}
/**
* @param argument One or more `resource_file` blocks that describe the files to be downloaded to a compute node as defined below.
*/
@JvmName("fbbigybrtroyqxac")
public suspend fun resourceFiles(argument: suspend PoolStartTaskResourceFileArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
PoolStartTaskResourceFileArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.resourceFiles = mapped
}
/**
* @param values One or more `resource_file` blocks that describe the files to be downloaded to a compute node as defined below.
*/
@JvmName("ijgxwwisnrjypvyu")
public suspend fun resourceFiles(vararg values: PoolStartTaskResourceFileArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.resourceFiles = mapped
}
/**
* @param value The number of retry count.
*/
@JvmName("onyxnvcfqymjrujn")
public suspend fun taskRetryMaximum(`value`: Int?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.taskRetryMaximum = mapped
}
/**
* @param value A `user_identity` block that describes the user identity under which the start task runs as defined below.
*/
@JvmName("onragkxfrbyohqxn")
public suspend fun userIdentity(`value`: PoolStartTaskUserIdentityArgs) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.userIdentity = mapped
}
/**
* @param argument A `user_identity` block that describes the user identity under which the start task runs as defined below.
*/
@JvmName("rkemgdmvqowkjjfs")
public suspend fun userIdentity(argument: suspend PoolStartTaskUserIdentityArgsBuilder.() -> Unit) {
val toBeMapped = PoolStartTaskUserIdentityArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.userIdentity = mapped
}
/**
* @param value A flag that indicates if the Batch pool should wait for the start task to be completed. Default to `false`.
*/
@JvmName("dneiiwyomufyargl")
public suspend fun waitForSuccess(`value`: Boolean?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.waitForSuccess = mapped
}
internal fun build(): PoolStartTaskArgs = PoolStartTaskArgs(
commandLine = commandLine ?: throw PulumiNullFieldException("commandLine"),
commonEnvironmentProperties = commonEnvironmentProperties,
containers = containers,
resourceFiles = resourceFiles,
taskRetryMaximum = taskRetryMaximum,
userIdentity = userIdentity ?: throw PulumiNullFieldException("userIdentity"),
waitForSuccess = waitForSuccess,
)
}