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

com.pulumi.awsnative.imagebuilder.kotlin.ImageArgs.kt Maven / Gradle / Ivy

@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.imagebuilder.kotlin

import com.pulumi.awsnative.imagebuilder.ImageArgs.builder
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.ImageScanningConfigurationArgs
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.ImageScanningConfigurationArgsBuilder
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.ImageTestsConfigurationArgs
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.ImageTestsConfigurationArgsBuilder
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.ImageWorkflowConfigurationArgs
import com.pulumi.awsnative.imagebuilder.kotlin.inputs.ImageWorkflowConfigurationArgsBuilder
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.Boolean
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource schema for AWS::ImageBuilder::Image
 * @property containerRecipeArn The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.
 * @property distributionConfigurationArn The Amazon Resource Name (ARN) of the distribution configuration.
 * @property enhancedImageMetadataEnabled Collects additional information about the image being created, including the operating system (OS) version and package list.
 * @property executionRole The execution role name/ARN for the image build, if provided
 * @property imageRecipeArn The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.
 * @property imageScanningConfiguration Contains settings for vulnerability scans.
 * @property imageTestsConfiguration The image tests configuration used when creating this image.
 * @property infrastructureConfigurationArn The Amazon Resource Name (ARN) of the infrastructure configuration.
 * @property tags The tags associated with the image.
 * @property workflows Workflows to define the image build process
 */
public data class ImageArgs(
    public val containerRecipeArn: Output? = null,
    public val distributionConfigurationArn: Output? = null,
    public val enhancedImageMetadataEnabled: Output? = null,
    public val executionRole: Output? = null,
    public val imageRecipeArn: Output? = null,
    public val imageScanningConfiguration: Output? = null,
    public val imageTestsConfiguration: Output? = null,
    public val infrastructureConfigurationArn: Output? = null,
    public val tags: Output>? = null,
    public val workflows: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.imagebuilder.ImageArgs =
        com.pulumi.awsnative.imagebuilder.ImageArgs.builder()
            .containerRecipeArn(containerRecipeArn?.applyValue({ args0 -> args0 }))
            .distributionConfigurationArn(distributionConfigurationArn?.applyValue({ args0 -> args0 }))
            .enhancedImageMetadataEnabled(enhancedImageMetadataEnabled?.applyValue({ args0 -> args0 }))
            .executionRole(executionRole?.applyValue({ args0 -> args0 }))
            .imageRecipeArn(imageRecipeArn?.applyValue({ args0 -> args0 }))
            .imageScanningConfiguration(
                imageScanningConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .imageTestsConfiguration(
                imageTestsConfiguration?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .infrastructureConfigurationArn(infrastructureConfigurationArn?.applyValue({ args0 -> args0 }))
            .tags(tags?.applyValue({ args0 -> args0.map({ args0 -> args0.key.to(args0.value) }).toMap() }))
            .workflows(
                workflows?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [ImageArgs].
 */
@PulumiTagMarker
public class ImageArgsBuilder internal constructor() {
    private var containerRecipeArn: Output? = null

    private var distributionConfigurationArn: Output? = null

    private var enhancedImageMetadataEnabled: Output? = null

    private var executionRole: Output? = null

    private var imageRecipeArn: Output? = null

    private var imageScanningConfiguration: Output? = null

    private var imageTestsConfiguration: Output? = null

    private var infrastructureConfigurationArn: Output? = null

    private var tags: Output>? = null

    private var workflows: Output>? = null

    /**
     * @param value The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.
     */
    @JvmName("dyprdeputbjeqnyk")
    public suspend fun containerRecipeArn(`value`: Output) {
        this.containerRecipeArn = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the distribution configuration.
     */
    @JvmName("atcnqgfulhmbwpab")
    public suspend fun distributionConfigurationArn(`value`: Output) {
        this.distributionConfigurationArn = value
    }

    /**
     * @param value Collects additional information about the image being created, including the operating system (OS) version and package list.
     */
    @JvmName("aqfbynqmcodgswfv")
    public suspend fun enhancedImageMetadataEnabled(`value`: Output) {
        this.enhancedImageMetadataEnabled = value
    }

    /**
     * @param value The execution role name/ARN for the image build, if provided
     */
    @JvmName("thuqbyiijngsxxys")
    public suspend fun executionRole(`value`: Output) {
        this.executionRole = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.
     */
    @JvmName("xavaopnepxdfisos")
    public suspend fun imageRecipeArn(`value`: Output) {
        this.imageRecipeArn = value
    }

    /**
     * @param value Contains settings for vulnerability scans.
     */
    @JvmName("nnqgigqinbdmyukw")
    public suspend fun imageScanningConfiguration(`value`: Output) {
        this.imageScanningConfiguration = value
    }

    /**
     * @param value The image tests configuration used when creating this image.
     */
    @JvmName("vejsitwedybkkilc")
    public suspend fun imageTestsConfiguration(`value`: Output) {
        this.imageTestsConfiguration = value
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the infrastructure configuration.
     */
    @JvmName("uslcdxqmglekfiqm")
    public suspend fun infrastructureConfigurationArn(`value`: Output) {
        this.infrastructureConfigurationArn = value
    }

    /**
     * @param value The tags associated with the image.
     */
    @JvmName("vmylodasecdroymd")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value Workflows to define the image build process
     */
    @JvmName("ahljhgnoyfxiojvq")
    public suspend fun workflows(`value`: Output>) {
        this.workflows = value
    }

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

    /**
     * @param values Workflows to define the image build process
     */
    @JvmName("skqbyinigpgkrdna")
    public suspend fun workflows(values: List>) {
        this.workflows = Output.all(values)
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the container recipe that defines how images are configured and tested.
     */
    @JvmName("ailegnkkpvweoecp")
    public suspend fun containerRecipeArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.containerRecipeArn = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the distribution configuration.
     */
    @JvmName("ikwymqbrqrgsnhjq")
    public suspend fun distributionConfigurationArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.distributionConfigurationArn = mapped
    }

    /**
     * @param value Collects additional information about the image being created, including the operating system (OS) version and package list.
     */
    @JvmName("hqqothjuyflfrmux")
    public suspend fun enhancedImageMetadataEnabled(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.enhancedImageMetadataEnabled = mapped
    }

    /**
     * @param value The execution role name/ARN for the image build, if provided
     */
    @JvmName("uuckiocffetnxwwg")
    public suspend fun executionRole(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.executionRole = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the image recipe that defines how images are configured, tested, and assessed.
     */
    @JvmName("kgauqodtknhgcvdh")
    public suspend fun imageRecipeArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageRecipeArn = mapped
    }

    /**
     * @param value Contains settings for vulnerability scans.
     */
    @JvmName("xkqgnavqbpnugdaj")
    public suspend fun imageScanningConfiguration(`value`: ImageScanningConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageScanningConfiguration = mapped
    }

    /**
     * @param argument Contains settings for vulnerability scans.
     */
    @JvmName("drapwqpexkbkrffj")
    public suspend fun imageScanningConfiguration(argument: suspend ImageScanningConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ImageScanningConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.imageScanningConfiguration = mapped
    }

    /**
     * @param value The image tests configuration used when creating this image.
     */
    @JvmName("dfglgpdourytrdcu")
    public suspend fun imageTestsConfiguration(`value`: ImageTestsConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.imageTestsConfiguration = mapped
    }

    /**
     * @param argument The image tests configuration used when creating this image.
     */
    @JvmName("ehoqwotwuexssxmt")
    public suspend fun imageTestsConfiguration(argument: suspend ImageTestsConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = ImageTestsConfigurationArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.imageTestsConfiguration = mapped
    }

    /**
     * @param value The Amazon Resource Name (ARN) of the infrastructure configuration.
     */
    @JvmName("lrwjjlttgfdqpodf")
    public suspend fun infrastructureConfigurationArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.infrastructureConfigurationArn = mapped
    }

    /**
     * @param value The tags associated with the image.
     */
    @JvmName("xokwsbypunoeniml")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values The tags associated with the image.
     */
    @JvmName("owcafxklduvajdnv")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param value Workflows to define the image build process
     */
    @JvmName("hqkcmdkjyibpvfxk")
    public suspend fun workflows(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workflows = mapped
    }

    /**
     * @param argument Workflows to define the image build process
     */
    @JvmName("tyanvlgjxvonwunr")
    public suspend fun workflows(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ImageWorkflowConfigurationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.workflows = mapped
    }

    /**
     * @param argument Workflows to define the image build process
     */
    @JvmName("vesjjaialgmslblg")
    public suspend fun workflows(vararg argument: suspend ImageWorkflowConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ImageWorkflowConfigurationArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.workflows = mapped
    }

    /**
     * @param argument Workflows to define the image build process
     */
    @JvmName("vtaygnsksqmgnkuy")
    public suspend fun workflows(argument: suspend ImageWorkflowConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ImageWorkflowConfigurationArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.workflows = mapped
    }

    /**
     * @param values Workflows to define the image build process
     */
    @JvmName("apgsjhyoavpvlcky")
    public suspend fun workflows(vararg values: ImageWorkflowConfigurationArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.workflows = mapped
    }

    internal fun build(): ImageArgs = ImageArgs(
        containerRecipeArn = containerRecipeArn,
        distributionConfigurationArn = distributionConfigurationArn,
        enhancedImageMetadataEnabled = enhancedImageMetadataEnabled,
        executionRole = executionRole,
        imageRecipeArn = imageRecipeArn,
        imageScanningConfiguration = imageScanningConfiguration,
        imageTestsConfiguration = imageTestsConfiguration,
        infrastructureConfigurationArn = infrastructureConfigurationArn,
        tags = tags,
        workflows = workflows,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy