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

com.pulumi.awsnative.imagebuilder.kotlin.inputs.ContainerRecipeInstanceConfigurationArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.imagebuilder.kotlin.inputs

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

/**
 * A group of options that can be used to configure an instance for building and testing container images.
 * @property blockDeviceMappings Defines the block devices to attach for building an instance from this Image Builder AMI.
 * @property image The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will use the appropriate ECS-optimized AMI as a base image.
 */
public data class ContainerRecipeInstanceConfigurationArgs(
    public val blockDeviceMappings: Output>? =
        null,
    public val image: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.imagebuilder.inputs.ContainerRecipeInstanceConfigurationArgs =
        com.pulumi.awsnative.imagebuilder.inputs.ContainerRecipeInstanceConfigurationArgs.builder()
            .blockDeviceMappings(
                blockDeviceMappings?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .image(image?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [ContainerRecipeInstanceConfigurationArgs].
 */
@PulumiTagMarker
public class ContainerRecipeInstanceConfigurationArgsBuilder internal constructor() {
    private var blockDeviceMappings: Output>? =
        null

    private var image: Output? = null

    /**
     * @param value Defines the block devices to attach for building an instance from this Image Builder AMI.
     */
    @JvmName("qfxcjgdjxogalkwv")
    public suspend fun blockDeviceMappings(`value`: Output>) {
        this.blockDeviceMappings = value
    }

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

    /**
     * @param values Defines the block devices to attach for building an instance from this Image Builder AMI.
     */
    @JvmName("cnsawapndctvgeyo")
    public suspend fun blockDeviceMappings(values: List>) {
        this.blockDeviceMappings = Output.all(values)
    }

    /**
     * @param value The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will use the appropriate ECS-optimized AMI as a base image.
     */
    @JvmName("haniqqvqltianxgt")
    public suspend fun image(`value`: Output) {
        this.image = value
    }

    /**
     * @param value Defines the block devices to attach for building an instance from this Image Builder AMI.
     */
    @JvmName("snfxovghkyvfbrli")
    public suspend fun blockDeviceMappings(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.blockDeviceMappings = mapped
    }

    /**
     * @param argument Defines the block devices to attach for building an instance from this Image Builder AMI.
     */
    @JvmName("wiipoxhbsodngarc")
    public suspend fun blockDeviceMappings(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ContainerRecipeInstanceBlockDeviceMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.blockDeviceMappings = mapped
    }

    /**
     * @param argument Defines the block devices to attach for building an instance from this Image Builder AMI.
     */
    @JvmName("eqgyjdkkdoekvwkr")
    public suspend fun blockDeviceMappings(vararg argument: suspend ContainerRecipeInstanceBlockDeviceMappingArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ContainerRecipeInstanceBlockDeviceMappingArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.blockDeviceMappings = mapped
    }

    /**
     * @param argument Defines the block devices to attach for building an instance from this Image Builder AMI.
     */
    @JvmName("jebauxcksokjgfrt")
    public suspend fun blockDeviceMappings(argument: suspend ContainerRecipeInstanceBlockDeviceMappingArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ContainerRecipeInstanceBlockDeviceMappingArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.blockDeviceMappings = mapped
    }

    /**
     * @param values Defines the block devices to attach for building an instance from this Image Builder AMI.
     */
    @JvmName("brsitvffpteipold")
    public suspend fun blockDeviceMappings(vararg values: ContainerRecipeInstanceBlockDeviceMappingArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.blockDeviceMappings = mapped
    }

    /**
     * @param value The AMI ID to use as the base image for a container build and test instance. If not specified, Image Builder will use the appropriate ECS-optimized AMI as a base image.
     */
    @JvmName("jrdurxxwopqdfylw")
    public suspend fun image(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.image = mapped
    }

    internal fun build(): ContainerRecipeInstanceConfigurationArgs =
        ContainerRecipeInstanceConfigurationArgs(
            blockDeviceMappings = blockDeviceMappings,
            image = image,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy