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

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

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

package com.pulumi.awsnative.imagebuilder.kotlin

import com.pulumi.awsnative.imagebuilder.kotlin.enums.ContainerRecipeContainerType
import com.pulumi.awsnative.imagebuilder.kotlin.enums.ContainerRecipePlatformOverride
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ContainerRecipeComponentConfiguration
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ContainerRecipeInstanceConfiguration
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ContainerRecipeTargetContainerRepository
import com.pulumi.core.Output
import com.pulumi.kotlin.KotlinCustomResource
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.ResourceMapper
import com.pulumi.kotlin.options.CustomResourceOptions
import com.pulumi.kotlin.options.CustomResourceOptionsBuilder
import com.pulumi.resources.Resource
import kotlin.Boolean
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import com.pulumi.awsnative.imagebuilder.kotlin.enums.ContainerRecipeContainerType.Companion.toKotlin as containerRecipeContainerTypeToKotlin
import com.pulumi.awsnative.imagebuilder.kotlin.enums.ContainerRecipePlatformOverride.Companion.toKotlin as containerRecipePlatformOverrideToKotlin
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ContainerRecipeComponentConfiguration.Companion.toKotlin as containerRecipeComponentConfigurationToKotlin
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ContainerRecipeInstanceConfiguration.Companion.toKotlin as containerRecipeInstanceConfigurationToKotlin
import com.pulumi.awsnative.imagebuilder.kotlin.outputs.ContainerRecipeTargetContainerRepository.Companion.toKotlin as containerRecipeTargetContainerRepositoryToKotlin

/**
 * Builder for [ContainerRecipe].
 */
@PulumiTagMarker
public class ContainerRecipeResourceBuilder internal constructor() {
    public var name: String? = null

    public var args: ContainerRecipeArgs = ContainerRecipeArgs()

    public var opts: CustomResourceOptions = CustomResourceOptions()

    /**
     * @param name The _unique_ name of the resulting resource.
     */
    public fun name(`value`: String) {
        this.name = value
    }

    /**
     * @param block The arguments to use to populate this resource's properties.
     */
    public suspend fun args(block: suspend ContainerRecipeArgsBuilder.() -> Unit) {
        val builder = ContainerRecipeArgsBuilder()
        block(builder)
        this.args = builder.build()
    }

    /**
     * @param block A bag of options that control this resource's behavior.
     */
    public suspend fun opts(block: suspend CustomResourceOptionsBuilder.() -> Unit) {
        this.opts = com.pulumi.kotlin.options.CustomResourceOptions.opts(block)
    }

    internal fun build(): ContainerRecipe {
        val builtJavaResource =
            com.pulumi.awsnative.imagebuilder.ContainerRecipe(
                this.name,
                this.args.toJava(),
                this.opts.toJava(),
            )
        return ContainerRecipe(builtJavaResource)
    }
}

/**
 * Resource schema for AWS::ImageBuilder::ContainerRecipe
 */
public class ContainerRecipe internal constructor(
    override val javaResource: com.pulumi.awsnative.imagebuilder.ContainerRecipe,
) : KotlinCustomResource(javaResource, ContainerRecipeMapper) {
    /**
     * The Amazon Resource Name (ARN) of the container recipe.
     */
    public val arn: Output
        get() = javaResource.arn().applyValue({ args0 -> args0 })

    /**
     * Components for build and test that are included in the container recipe.
     */
    public val components: Output>?
        get() = javaResource.components().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.let({ args0 ->
                        containerRecipeComponentConfigurationToKotlin(args0)
                    })
                })
            }).orElse(null)
        })

    /**
     * Specifies the type of container, such as Docker.
     */
    public val containerType: Output?
        get() = javaResource.containerType().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> containerRecipeContainerTypeToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * The description of the container recipe.
     */
    public val description: Output?
        get() = javaResource.description().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Dockerfiles are text documents that are used to build Docker containers, and ensure that they contain all of the elements required by the application running inside. The template data consists of contextual variables where Image Builder places build information or scripts, based on your container image recipe.
     */
    public val dockerfileTemplateData: Output?
        get() = javaResource.dockerfileTemplateData().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * The S3 URI for the Dockerfile that will be used to build your container image.
     */
    public val dockerfileTemplateUri: Output?
        get() = javaResource.dockerfileTemplateUri().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies the operating system version for the source image.
     */
    public val imageOsVersionOverride: Output?
        get() = javaResource.imageOsVersionOverride().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * A group of options that can be used to configure an instance for building and testing container images.
     */
    public val instanceConfiguration: Output?
        get() = javaResource.instanceConfiguration().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> containerRecipeInstanceConfigurationToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Identifies which KMS key is used to encrypt the container image.
     */
    public val kmsKeyId: Output?
        get() = javaResource.kmsKeyId().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The name of the container recipe.
     */
    public val name: Output?
        get() = javaResource.name().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The source image for the container recipe.
     */
    public val parentImage: Output?
        get() = javaResource.parentImage().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })

    /**
     * Specifies the operating system platform when you use a custom source image.
     */
    public val platformOverride: Output?
        get() = javaResource.platformOverride().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 -> containerRecipePlatformOverrideToKotlin(args0) })
            }).orElse(null)
        })

    /**
     * Tags that are attached to the container recipe.
     */
    public val tags: Output>?
        get() = javaResource.tags().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.map({ args0 ->
                    args0.key.to(args0.value)
                }).toMap()
            }).orElse(null)
        })

    /**
     * The destination repository for the container image.
     */
    public val targetRepository: Output?
        get() = javaResource.targetRepository().applyValue({ args0 ->
            args0.map({ args0 ->
                args0.let({ args0 ->
                    containerRecipeTargetContainerRepositoryToKotlin(args0)
                })
            }).orElse(null)
        })

    /**
     * The semantic version of the container recipe (..).
     */
    public val version: Output?
        get() = javaResource.version().applyValue({ args0 -> args0.map({ args0 -> args0 }).orElse(null) })

    /**
     * The working directory to be used during build and test workflows.
     */
    public val workingDirectory: Output?
        get() = javaResource.workingDirectory().applyValue({ args0 ->
            args0.map({ args0 ->
                args0
            }).orElse(null)
        })
}

public object ContainerRecipeMapper : ResourceMapper {
    override fun supportsMappingOfType(javaResource: Resource): Boolean =
        com.pulumi.awsnative.imagebuilder.ContainerRecipe::class == javaResource::class

    override fun map(javaResource: Resource): ContainerRecipe = ContainerRecipe(
        javaResource as
            com.pulumi.awsnative.imagebuilder.ContainerRecipe,
    )
}

/**
 * @see [ContainerRecipe].
 * @param name The _unique_ name of the resulting resource.
 * @param block Builder for [ContainerRecipe].
 */
public suspend fun containerRecipe(
    name: String,
    block: suspend ContainerRecipeResourceBuilder.() -> Unit,
): ContainerRecipe {
    val builder = ContainerRecipeResourceBuilder()
    builder.name(name)
    block(builder)
    return builder.build()
}

/**
 * @see [ContainerRecipe].
 * @param name The _unique_ name of the resulting resource.
 */
public fun containerRecipe(name: String): ContainerRecipe {
    val builder = ContainerRecipeResourceBuilder()
    builder.name(name)
    return builder.build()
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy