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

com.pulumi.aws.imagebuilder.kotlin.inputs.ImageWorkflowArgs.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.imagebuilder.kotlin.inputs

import com.pulumi.aws.imagebuilder.inputs.ImageWorkflowArgs.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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property onFailure The action to take if the workflow fails. Must be one of `CONTINUE` or `ABORT`.
 * @property parallelGroup The parallel group in which to run a test Workflow.
 * @property parameters Configuration block for the workflow parameters. Detailed below.
 * @property workflowArn Amazon Resource Name (ARN) of the Image Builder Workflow.
 * The following arguments are optional:
 */
public data class ImageWorkflowArgs(
    public val onFailure: Output? = null,
    public val parallelGroup: Output? = null,
    public val parameters: Output>? = null,
    public val workflowArn: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.imagebuilder.inputs.ImageWorkflowArgs =
        com.pulumi.aws.imagebuilder.inputs.ImageWorkflowArgs.builder()
            .onFailure(onFailure?.applyValue({ args0 -> args0 }))
            .parallelGroup(parallelGroup?.applyValue({ args0 -> args0 }))
            .parameters(
                parameters?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .workflowArn(workflowArn.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ImageWorkflowArgs].
 */
@PulumiTagMarker
public class ImageWorkflowArgsBuilder internal constructor() {
    private var onFailure: Output? = null

    private var parallelGroup: Output? = null

    private var parameters: Output>? = null

    private var workflowArn: Output? = null

    /**
     * @param value The action to take if the workflow fails. Must be one of `CONTINUE` or `ABORT`.
     */
    @JvmName("pkhpftnrqjlvarlt")
    public suspend fun onFailure(`value`: Output) {
        this.onFailure = value
    }

    /**
     * @param value The parallel group in which to run a test Workflow.
     */
    @JvmName("vkrbiauksdukfsbu")
    public suspend fun parallelGroup(`value`: Output) {
        this.parallelGroup = value
    }

    /**
     * @param value Configuration block for the workflow parameters. Detailed below.
     */
    @JvmName("ghsunytqkhwehebj")
    public suspend fun parameters(`value`: Output>) {
        this.parameters = value
    }

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

    /**
     * @param values Configuration block for the workflow parameters. Detailed below.
     */
    @JvmName("qwoclipjdoneppar")
    public suspend fun parameters(values: List>) {
        this.parameters = Output.all(values)
    }

    /**
     * @param value Amazon Resource Name (ARN) of the Image Builder Workflow.
     * The following arguments are optional:
     */
    @JvmName("inmiguqntmmtqjbi")
    public suspend fun workflowArn(`value`: Output) {
        this.workflowArn = value
    }

    /**
     * @param value The action to take if the workflow fails. Must be one of `CONTINUE` or `ABORT`.
     */
    @JvmName("ucffhlhdqhatskir")
    public suspend fun onFailure(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.onFailure = mapped
    }

    /**
     * @param value The parallel group in which to run a test Workflow.
     */
    @JvmName("dhfuwpcmisyhbhcx")
    public suspend fun parallelGroup(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parallelGroup = mapped
    }

    /**
     * @param value Configuration block for the workflow parameters. Detailed below.
     */
    @JvmName("pknprsuqpjhdhecc")
    public suspend fun parameters(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param argument Configuration block for the workflow parameters. Detailed below.
     */
    @JvmName("tekgsvjnguvsmsyk")
    public suspend fun parameters(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ImageWorkflowParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument Configuration block for the workflow parameters. Detailed below.
     */
    @JvmName("nfoqymxxkfxauwxh")
    public suspend fun parameters(vararg argument: suspend ImageWorkflowParameterArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ImageWorkflowParameterArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param argument Configuration block for the workflow parameters. Detailed below.
     */
    @JvmName("bicjrlhsfuxqedqv")
    public suspend fun parameters(argument: suspend ImageWorkflowParameterArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(ImageWorkflowParameterArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.parameters = mapped
    }

    /**
     * @param values Configuration block for the workflow parameters. Detailed below.
     */
    @JvmName("pederlmsaahcfgry")
    public suspend fun parameters(vararg values: ImageWorkflowParameterArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.parameters = mapped
    }

    /**
     * @param value Amazon Resource Name (ARN) of the Image Builder Workflow.
     * The following arguments are optional:
     */
    @JvmName("hsvmcygdhtwuquca")
    public suspend fun workflowArn(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.workflowArn = mapped
    }

    internal fun build(): ImageWorkflowArgs = ImageWorkflowArgs(
        onFailure = onFailure,
        parallelGroup = parallelGroup,
        parameters = parameters,
        workflowArn = workflowArn ?: throw PulumiNullFieldException("workflowArn"),
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy