
com.pulumi.googlenative.batch.v1.kotlin.inputs.LifecyclePolicyArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-google-native-kotlin Show documentation
Show all versions of pulumi-google-native-kotlin Show documentation
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
The newest version!
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.googlenative.batch.v1.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.batch.v1.inputs.LifecyclePolicyArgs.builder
import com.pulumi.googlenative.batch.v1.kotlin.enums.LifecyclePolicyAction
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* LifecyclePolicy describes how to deal with task failures based on different conditions.
* @property action Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.
* @property actionCondition Conditions that decide why a task failure is dealt with a specific action.
*/
public data class LifecyclePolicyArgs(
public val action: Output? = null,
public val actionCondition: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.googlenative.batch.v1.inputs.LifecyclePolicyArgs =
com.pulumi.googlenative.batch.v1.inputs.LifecyclePolicyArgs.builder()
.action(action?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.actionCondition(
actionCondition?.applyValue({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
}),
).build()
}
/**
* Builder for [LifecyclePolicyArgs].
*/
@PulumiTagMarker
public class LifecyclePolicyArgsBuilder internal constructor() {
private var action: Output? = null
private var actionCondition: Output? = null
/**
* @param value Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.
*/
@JvmName("xbkdpbjlfxjjknlr")
public suspend fun action(`value`: Output) {
this.action = value
}
/**
* @param value Conditions that decide why a task failure is dealt with a specific action.
*/
@JvmName("ulsnyhqhvqsotebb")
public suspend fun actionCondition(`value`: Output) {
this.actionCondition = value
}
/**
* @param value Action to execute when ActionCondition is true. When RETRY_TASK is specified, we will retry failed tasks if we notice any exit code match and fail tasks if no match is found. Likewise, when FAIL_TASK is specified, we will fail tasks if we notice any exit code match and retry tasks if no match is found.
*/
@JvmName("qeupreapddaxdqcx")
public suspend fun action(`value`: LifecyclePolicyAction?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.action = mapped
}
/**
* @param value Conditions that decide why a task failure is dealt with a specific action.
*/
@JvmName("lbsmoxaagusgsmgf")
public suspend fun actionCondition(`value`: ActionConditionArgs?) {
val toBeMapped = value
val mapped = toBeMapped?.let({ args0 -> of(args0) })
this.actionCondition = mapped
}
/**
* @param argument Conditions that decide why a task failure is dealt with a specific action.
*/
@JvmName("oxuqxiwpiqbkesdw")
public suspend fun actionCondition(argument: suspend ActionConditionArgsBuilder.() -> Unit) {
val toBeMapped = ActionConditionArgsBuilder().applySuspend { argument() }.build()
val mapped = of(toBeMapped)
this.actionCondition = mapped
}
internal fun build(): LifecyclePolicyArgs = LifecyclePolicyArgs(
action = action,
actionCondition = actionCondition,
)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy