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

com.pulumi.aws.batch.kotlin.inputs.JobDefinitionRetryStrategyArgs.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.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.batch.kotlin.inputs

import com.pulumi.aws.batch.inputs.JobDefinitionRetryStrategyArgs.builder
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 kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property attempts Number of times to move a job to the `RUNNABLE` status. You may specify between `1` and `10` attempts.
 * @property evaluateOnExits Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
 */
public data class JobDefinitionRetryStrategyArgs(
    public val attempts: Output? = null,
    public val evaluateOnExits: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.batch.inputs.JobDefinitionRetryStrategyArgs =
        com.pulumi.aws.batch.inputs.JobDefinitionRetryStrategyArgs.builder()
            .attempts(attempts?.applyValue({ args0 -> args0 }))
            .evaluateOnExits(
                evaluateOnExits?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [JobDefinitionRetryStrategyArgs].
 */
@PulumiTagMarker
public class JobDefinitionRetryStrategyArgsBuilder internal constructor() {
    private var attempts: Output? = null

    private var evaluateOnExits: Output>? = null

    /**
     * @param value Number of times to move a job to the `RUNNABLE` status. You may specify between `1` and `10` attempts.
     */
    @JvmName("tivrxutfbofhmgso")
    public suspend fun attempts(`value`: Output) {
        this.attempts = value
    }

    /**
     * @param value Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
     */
    @JvmName("pgmdalxfbpxpoukd")
    public suspend fun evaluateOnExits(`value`: Output>) {
        this.evaluateOnExits = value
    }

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

    /**
     * @param values Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
     */
    @JvmName("sujortvysffuwsbp")
    public suspend fun evaluateOnExits(values: List>) {
        this.evaluateOnExits = Output.all(values)
    }

    /**
     * @param value Number of times to move a job to the `RUNNABLE` status. You may specify between `1` and `10` attempts.
     */
    @JvmName("kdlogcunjrbvocys")
    public suspend fun attempts(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.attempts = mapped
    }

    /**
     * @param value Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
     */
    @JvmName("ugdhhghqjfshyjsi")
    public suspend fun evaluateOnExits(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.evaluateOnExits = mapped
    }

    /**
     * @param argument Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
     */
    @JvmName("jjicqcvxytuoqmdb")
    public suspend fun evaluateOnExits(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            JobDefinitionRetryStrategyEvaluateOnExitArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.evaluateOnExits = mapped
    }

    /**
     * @param argument Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
     */
    @JvmName("bvjjetfixicsfxsi")
    public suspend fun evaluateOnExits(vararg argument: suspend JobDefinitionRetryStrategyEvaluateOnExitArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            JobDefinitionRetryStrategyEvaluateOnExitArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.evaluateOnExits = mapped
    }

    /**
     * @param argument Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
     */
    @JvmName("oafrgjapwvllcaic")
    public suspend fun evaluateOnExits(argument: suspend JobDefinitionRetryStrategyEvaluateOnExitArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            JobDefinitionRetryStrategyEvaluateOnExitArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.evaluateOnExits = mapped
    }

    /**
     * @param values Evaluate on exit conditions under which the job should be retried or failed. If this parameter is specified, then the `attempts` parameter must also be specified. You may specify up to 5 configuration blocks.
     */
    @JvmName("ohlnuenhfxaplgij")
    public suspend fun evaluateOnExits(vararg values: JobDefinitionRetryStrategyEvaluateOnExitArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.evaluateOnExits = mapped
    }

    internal fun build(): JobDefinitionRetryStrategyArgs = JobDefinitionRetryStrategyArgs(
        attempts = attempts,
        evaluateOnExits = evaluateOnExits,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy