com.pulumi.kubernetes.batch.v1.kotlin.inputs.PodFailurePolicyRulePatchArgs.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pulumi-kubernetes-kotlin Show documentation
Show all versions of pulumi-kubernetes-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.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.kubernetes.batch.v1.kotlin.inputs
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import com.pulumi.kubernetes.batch.v1.inputs.PodFailurePolicyRulePatchArgs.builder
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName
/**
* PodFailurePolicyRule describes how a pod failure is handled when the requirements are met. One of onExitCodes and onPodConditions, but not both, can be used in each rule.
* @property action Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:
* - FailJob: indicates that the pod's job is marked as Failed and all
* running pods are terminated.
* - FailIndex: indicates that the pod's index is marked as Failed and will
* not be restarted.
* This value is beta-level. It can be used when the
* `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).
* - Ignore: indicates that the counter towards the .backoffLimit is not
* incremented and a replacement pod is created.
* - Count: indicates that the pod is handled in the default way - the
* counter towards the .backoffLimit is incremented.
* Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.
* @property onExitCodes Represents the requirement on the container exit codes.
* @property onPodConditions Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed.
*/
public data class PodFailurePolicyRulePatchArgs(
public val action: Output? = null,
public val onExitCodes: Output? = null,
public val onPodConditions: Output>? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.kubernetes.batch.v1.inputs.PodFailurePolicyRulePatchArgs =
com.pulumi.kubernetes.batch.v1.inputs.PodFailurePolicyRulePatchArgs.builder()
.action(action?.applyValue({ args0 -> args0 }))
.onExitCodes(onExitCodes?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
.onPodConditions(
onPodConditions?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
).build()
}
/**
* Builder for [PodFailurePolicyRulePatchArgs].
*/
@PulumiTagMarker
public class PodFailurePolicyRulePatchArgsBuilder internal constructor() {
private var action: Output? = null
private var onExitCodes: Output? = null
private var onPodConditions: Output>? = null
/**
* @param value Specifies the action taken on a pod failure when the requirements are satisfied. Possible values are:
* - FailJob: indicates that the pod's job is marked as Failed and all
* running pods are terminated.
* - FailIndex: indicates that the pod's index is marked as Failed and will
* not be restarted.
* This value is beta-level. It can be used when the
* `JobBackoffLimitPerIndex` feature gate is enabled (enabled by default).
* - Ignore: indicates that the counter towards the .backoffLimit is not
* incremented and a replacement pod is created.
* - Count: indicates that the pod is handled in the default way - the
* counter towards the .backoffLimit is incremented.
* Additional values are considered to be added in the future. Clients should react to an unknown action by skipping the rule.
*/
@JvmName("cdetywkoveghqhlo")
public suspend fun action(`value`: Output) {
this.action = value
}
/**
* @param value Represents the requirement on the container exit codes.
*/
@JvmName("hfoaiyprkfvgonko")
public suspend fun onExitCodes(`value`: Output) {
this.onExitCodes = value
}
/**
* @param value Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed.
*/
@JvmName("njfrhytdkwpcrcyd")
public suspend fun onPodConditions(`value`: Output>) {
this.onPodConditions = value
}
@JvmName("qqiynyokhchalrgh")
public suspend fun onPodConditions(vararg values: Output) {
this.onPodConditions = Output.all(values.asList())
}
/**
* @param values Represents the requirement on the pod conditions. The requirement is represented as a list of pod condition patterns. The requirement is satisfied if at least one pattern matches an actual pod condition. At most 20 elements are allowed.
*/
@JvmName("rdcnbovyruhdiwls")
public suspend fun onPodConditions(values: List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy