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.containerapp.kotlin.inputs.JobTemplateContainerArgs.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.containerapp.kotlin.inputs
import com.pulumi.azure.containerapp.inputs.JobTemplateContainerArgs.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`.
* > **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 livenessProbes A `liveness_probe` block as detailed below.
* @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`.
* > **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 readinessProbes A `readiness_probe` block as detailed below.
* @property startupProbes A `startup_probe` block as detailed below.
* @property volumeMounts A `volume_mounts` block as detailed below.
*/
public data class JobTemplateContainerArgs(
public val args: Output>? = null,
public val commands: Output>? = null,
public val cpu: Output,
public val envs: Output>? = null,
public val ephemeralStorage: Output? = null,
public val image: Output,
public val livenessProbes: Output>? = null,
public val memory: Output,
public val name: Output,
public val readinessProbes: Output>? = null,
public val startupProbes: Output>? = null,
public val volumeMounts: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.azure.containerapp.inputs.JobTemplateContainerArgs =
com.pulumi.azure.containerapp.inputs.JobTemplateContainerArgs.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 }))
.livenessProbes(
livenessProbes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.memory(memory.applyValue({ args0 -> args0 }))
.name(name.applyValue({ args0 -> args0 }))
.readinessProbes(
readinessProbes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.startupProbes(
startupProbes?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.volumeMounts(
volumeMounts?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [JobTemplateContainerArgs].
*/
@PulumiTagMarker
public class JobTemplateContainerArgsBuilder 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 livenessProbes: Output>? = null
private var memory: Output? = null
private var name: Output? = null
private var readinessProbes: Output>? = null
private var startupProbes: Output>? = null
private var volumeMounts: Output>? = null
/**
* @param value A list of extra arguments to pass to the container.
*/
@JvmName("gerumwjtsvjgqbwu")
public suspend fun args(`value`: Output>) {
this.args = value
}
@JvmName("lyffnfgrxuuohlbo")
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("equmvxfvdmgpakaa")
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("pnwvfgmtrwbcuohy")
public suspend fun commands(`value`: Output>) {
this.commands = value
}
@JvmName("afjdbtmrtbonhjen")
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("ixpgmoipeejrbows")
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`.
* > **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("agkghfiuqgkifwti")
public suspend fun cpu(`value`: Output) {
this.cpu = value
}
/**
* @param value One or more `env` blocks as detailed below.
*/
@JvmName("imjdeplcraeoyaqk")
public suspend fun envs(`value`: Output>) {
this.envs = value
}
@JvmName("jdqtxtbfpksnuvsw")
public suspend fun envs(vararg values: Output) {
this.envs = Output.all(values.asList())
}
/**
* @param values One or more `env` blocks as detailed below.
*/
@JvmName("gmqqkuqhvioicjgo")
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("ijutcrmtiuqckdhq")
public suspend fun ephemeralStorage(`value`: Output) {
this.ephemeralStorage = value
}
/**
* @param value The image to use to create the container.
*/
@JvmName("kavvojwamnowhigb")
public suspend fun image(`value`: Output) {
this.image = value
}
/**
* @param value A `liveness_probe` block as detailed below.
*/
@JvmName("pkraolnaebexkelv")
public suspend fun livenessProbes(`value`: Output>) {
this.livenessProbes = value
}
@JvmName("jgnlwpaokoeptmao")
public suspend fun livenessProbes(vararg values: Output) {
this.livenessProbes = Output.all(values.asList())
}
/**
* @param values A `liveness_probe` block as detailed below.
*/
@JvmName("yxapkxfjobbukwov")
public suspend fun livenessProbes(values: List>) {
this.livenessProbes = Output.all(values)
}
/**
* @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`.
* > **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("ltyvxhpjnsgtydeq")
public suspend fun memory(`value`: Output) {
this.memory = value
}
/**
* @param value The name of the container.
*/
@JvmName("wtthwekdvuuukhip")
public suspend fun name(`value`: Output) {
this.name = value
}
/**
* @param value A `readiness_probe` block as detailed below.
*/
@JvmName("shxjjtajjsptnrro")
public suspend fun readinessProbes(`value`: Output>) {
this.readinessProbes = value
}
@JvmName("awpukrexhnawlmbh")
public suspend fun readinessProbes(vararg values: Output) {
this.readinessProbes = Output.all(values.asList())
}
/**
* @param values A `readiness_probe` block as detailed below.
*/
@JvmName("pkvnygkqdveautoe")
public suspend fun readinessProbes(values: List>) {
this.readinessProbes = Output.all(values)
}
/**
* @param value A `startup_probe` block as detailed below.
*/
@JvmName("cpbdhiawiesakmis")
public suspend fun startupProbes(`value`: Output>) {
this.startupProbes = value
}
@JvmName("yqywqydsnrylepnk")
public suspend fun startupProbes(vararg values: Output) {
this.startupProbes = Output.all(values.asList())
}
/**
* @param values A `startup_probe` block as detailed below.
*/
@JvmName("aiseqnxseexvorgy")
public suspend fun startupProbes(values: List>) {
this.startupProbes = Output.all(values)
}
/**
* @param value A `volume_mounts` block as detailed below.
*/
@JvmName("qxbjajsvikxtxthl")
public suspend fun volumeMounts(`value`: Output>) {
this.volumeMounts = value
}
@JvmName("tpmfbicbgonhffxk")
public suspend fun volumeMounts(vararg values: Output) {
this.volumeMounts = Output.all(values.asList())
}
/**
* @param values A `volume_mounts` block as detailed below.
*/
@JvmName("jqmlhducxxqxvept")
public suspend fun volumeMounts(values: List>) {
this.volumeMounts = Output.all(values)
}
/**
* @param value A list of extra arguments to pass to the container.
*/
@JvmName("hcytbgaskpyjesen")
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("nkxwmmkohkjhegdu")
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("uhijcsytnmmqhyyw")
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("hytllhqurdggetmd")
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`.
* > **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("hxulcslxwijootav")
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("gpquekhoqwylvvdu")
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("gkommnsbmdscprrk")
public suspend fun envs(argument: List Unit>) {
val toBeMapped = argument.toList().map {
JobTemplateContainerEnvArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.envs = mapped
}
/**
* @param argument One or more `env` blocks as detailed below.
*/
@JvmName("uhlubhcekleniusq")
public suspend fun envs(vararg argument: suspend JobTemplateContainerEnvArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
JobTemplateContainerEnvArgsBuilder().applySuspend {
it()
}.build()
}
val mapped = of(toBeMapped)
this.envs = mapped
}
/**
* @param argument One or more `env` blocks as detailed below.
*/
@JvmName("ncwkbsmlwsscadig")
public suspend fun envs(argument: suspend JobTemplateContainerEnvArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
JobTemplateContainerEnvArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.envs = mapped
}
/**
* @param values One or more `env` blocks as detailed below.
*/
@JvmName("eghyywhojxrtwkij")
public suspend fun envs(vararg values: JobTemplateContainerEnvArgs) {
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("qpeydsiydylcnted")
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("mieekwbsqqvblvmf")
public suspend fun image(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.image = mapped
}
/**
* @param value A `liveness_probe` block as detailed below.
*/
@JvmName("otbypiwnslkqroon")
public suspend fun livenessProbes(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.livenessProbes = mapped
}
/**
* @param argument A `liveness_probe` block as detailed below.
*/
@JvmName("yourfmylkmevugqm")
public suspend fun livenessProbes(argument: List Unit>) {
val toBeMapped = argument.toList().map {
JobTemplateContainerLivenessProbeArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.livenessProbes = mapped
}
/**
* @param argument A `liveness_probe` block as detailed below.
*/
@JvmName("uwueevbrwymuedvu")
public suspend fun livenessProbes(vararg argument: suspend JobTemplateContainerLivenessProbeArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
JobTemplateContainerLivenessProbeArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.livenessProbes = mapped
}
/**
* @param argument A `liveness_probe` block as detailed below.
*/
@JvmName("yhjgetvjpxxvdmxv")
public suspend fun livenessProbes(argument: suspend JobTemplateContainerLivenessProbeArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
JobTemplateContainerLivenessProbeArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.livenessProbes = mapped
}
/**
* @param values A `liveness_probe` block as detailed below.
*/
@JvmName("bpyqfoffnuwmhxcw")
public suspend fun livenessProbes(vararg values: JobTemplateContainerLivenessProbeArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.livenessProbes = 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`.
* > **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("baslmurrpputqxnd")
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("emgndgsdogqfupoy")
public suspend fun name(`value`: String) {
val toBeMapped = value
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.name = mapped
}
/**
* @param value A `readiness_probe` block as detailed below.
*/
@JvmName("thudexwfertfkmor")
public suspend fun readinessProbes(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.readinessProbes = mapped
}
/**
* @param argument A `readiness_probe` block as detailed below.
*/
@JvmName("dlibauopigolpnwa")
public suspend fun readinessProbes(argument: List Unit>) {
val toBeMapped = argument.toList().map {
JobTemplateContainerReadinessProbeArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.readinessProbes = mapped
}
/**
* @param argument A `readiness_probe` block as detailed below.
*/
@JvmName("qrxpdpabujmhpaxu")
public suspend fun readinessProbes(vararg argument: suspend JobTemplateContainerReadinessProbeArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
JobTemplateContainerReadinessProbeArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.readinessProbes = mapped
}
/**
* @param argument A `readiness_probe` block as detailed below.
*/
@JvmName("tbyfvlywpknvuvyq")
public suspend fun readinessProbes(argument: suspend JobTemplateContainerReadinessProbeArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
JobTemplateContainerReadinessProbeArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.readinessProbes = mapped
}
/**
* @param values A `readiness_probe` block as detailed below.
*/
@JvmName("nhohkyyuejswvldf")
public suspend fun readinessProbes(vararg values: JobTemplateContainerReadinessProbeArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.readinessProbes = mapped
}
/**
* @param value A `startup_probe` block as detailed below.
*/
@JvmName("kgdtohbpbweqrdfb")
public suspend fun startupProbes(`value`: List?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.startupProbes = mapped
}
/**
* @param argument A `startup_probe` block as detailed below.
*/
@JvmName("qrdaqcndatthoisy")
public suspend fun startupProbes(argument: List Unit>) {
val toBeMapped = argument.toList().map {
JobTemplateContainerStartupProbeArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.startupProbes = mapped
}
/**
* @param argument A `startup_probe` block as detailed below.
*/
@JvmName("qrobjatmfqwldnlq")
public suspend fun startupProbes(vararg argument: suspend JobTemplateContainerStartupProbeArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
JobTemplateContainerStartupProbeArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.startupProbes = mapped
}
/**
* @param argument A `startup_probe` block as detailed below.
*/
@JvmName("ksljaphpgavboxoc")
public suspend fun startupProbes(argument: suspend JobTemplateContainerStartupProbeArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
JobTemplateContainerStartupProbeArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.startupProbes = mapped
}
/**
* @param values A `startup_probe` block as detailed below.
*/
@JvmName("bjiqlpctwhpauevg")
public suspend fun startupProbes(vararg values: JobTemplateContainerStartupProbeArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.startupProbes = mapped
}
/**
* @param value A `volume_mounts` block as detailed below.
*/
@JvmName("kqwudaqfqvgkesai")
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("hdsxoflkpdkcqinc")
public suspend fun volumeMounts(argument: List Unit>) {
val toBeMapped = argument.toList().map {
JobTemplateContainerVolumeMountArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.volumeMounts = mapped
}
/**
* @param argument A `volume_mounts` block as detailed below.
*/
@JvmName("ovqxuldoqaqmpmqx")
public suspend fun volumeMounts(vararg argument: suspend JobTemplateContainerVolumeMountArgsBuilder.() -> Unit) {
val toBeMapped = argument.toList().map {
JobTemplateContainerVolumeMountArgsBuilder().applySuspend { it() }.build()
}
val mapped = of(toBeMapped)
this.volumeMounts = mapped
}
/**
* @param argument A `volume_mounts` block as detailed below.
*/
@JvmName("lrfeudnlvwgyffdb")
public suspend fun volumeMounts(argument: suspend JobTemplateContainerVolumeMountArgsBuilder.() -> Unit) {
val toBeMapped = listOf(
JobTemplateContainerVolumeMountArgsBuilder().applySuspend {
argument()
}.build(),
)
val mapped = of(toBeMapped)
this.volumeMounts = mapped
}
/**
* @param values A `volume_mounts` block as detailed below.
*/
@JvmName("mxkuohogqcuduquq")
public suspend fun volumeMounts(vararg values: JobTemplateContainerVolumeMountArgs) {
val toBeMapped = values.toList()
val mapped = toBeMapped.let({ args0 -> of(args0) })
this.volumeMounts = mapped
}
internal fun build(): JobTemplateContainerArgs = JobTemplateContainerArgs(
args = args,
commands = commands,
cpu = cpu ?: throw PulumiNullFieldException("cpu"),
envs = envs,
ephemeralStorage = ephemeralStorage,
image = image ?: throw PulumiNullFieldException("image"),
livenessProbes = livenessProbes,
memory = memory ?: throw PulumiNullFieldException("memory"),
name = name ?: throw PulumiNullFieldException("name"),
readinessProbes = readinessProbes,
startupProbes = startupProbes,
volumeMounts = volumeMounts,
)
}