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

com.pulumi.awsnative.greengrassv2.kotlin.ComponentVersionArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.greengrassv2.kotlin

import com.pulumi.awsnative.greengrassv2.ComponentVersionArgs.builder
import com.pulumi.awsnative.greengrassv2.kotlin.inputs.ComponentVersionLambdaFunctionRecipeSourceArgs
import com.pulumi.awsnative.greengrassv2.kotlin.inputs.ComponentVersionLambdaFunctionRecipeSourceArgsBuilder
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.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * Resource for Greengrass component version.
 * @property inlineRecipe The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.
 * You must specify either `InlineRecipe` or `LambdaFunction` .
 * @property lambdaFunction The parameters to create a component from a Lambda function.
 * You must specify either `InlineRecipe` or `LambdaFunction` .
 * @property tags Application-specific metadata to attach to the component version. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tag your AWS IoT Greengrass Version 2 resources](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) in the *AWS IoT Greengrass V2 Developer Guide* .
 * This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in AWS CloudFormation templates.
 * ```json
 * "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
 * }
 * ```
 */
public data class ComponentVersionArgs(
    public val inlineRecipe: Output? = null,
    public val lambdaFunction: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.greengrassv2.ComponentVersionArgs =
        com.pulumi.awsnative.greengrassv2.ComponentVersionArgs.builder()
            .inlineRecipe(inlineRecipe?.applyValue({ args0 -> args0 }))
            .lambdaFunction(lambdaFunction?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

/**
 * Builder for [ComponentVersionArgs].
 */
@PulumiTagMarker
public class ComponentVersionArgsBuilder internal constructor() {
    private var inlineRecipe: Output? = null

    private var lambdaFunction: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.
     * You must specify either `InlineRecipe` or `LambdaFunction` .
     */
    @JvmName("uogebqkjbalixtvd")
    public suspend fun inlineRecipe(`value`: Output) {
        this.inlineRecipe = value
    }

    /**
     * @param value The parameters to create a component from a Lambda function.
     * You must specify either `InlineRecipe` or `LambdaFunction` .
     */
    @JvmName("ynscuinnhcpysilt")
    public suspend fun lambdaFunction(`value`: Output) {
        this.lambdaFunction = value
    }

    /**
     * @param value Application-specific metadata to attach to the component version. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tag your AWS IoT Greengrass Version 2 resources](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) in the *AWS IoT Greengrass V2 Developer Guide* .
     * This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in AWS CloudFormation templates.
     * ```json
     * "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
     * }
     * ```
     */
    @JvmName("lrwmrubefnctapvq")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

    /**
     * @param value The recipe to use to create the component. The recipe defines the component's metadata, parameters, dependencies, lifecycle, artifacts, and platform compatibility.
     * You must specify either `InlineRecipe` or `LambdaFunction` .
     */
    @JvmName("gwdmwviqmkpakdht")
    public suspend fun inlineRecipe(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inlineRecipe = mapped
    }

    /**
     * @param value The parameters to create a component from a Lambda function.
     * You must specify either `InlineRecipe` or `LambdaFunction` .
     */
    @JvmName("fdxmpsmfujkvijjr")
    public suspend fun lambdaFunction(`value`: ComponentVersionLambdaFunctionRecipeSourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.lambdaFunction = mapped
    }

    /**
     * @param argument The parameters to create a component from a Lambda function.
     * You must specify either `InlineRecipe` or `LambdaFunction` .
     */
    @JvmName("cwvqsftwpijwourd")
    public suspend fun lambdaFunction(argument: suspend ComponentVersionLambdaFunctionRecipeSourceArgsBuilder.() -> Unit) {
        val toBeMapped = ComponentVersionLambdaFunctionRecipeSourceArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.lambdaFunction = mapped
    }

    /**
     * @param value Application-specific metadata to attach to the component version. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tag your AWS IoT Greengrass Version 2 resources](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) in the *AWS IoT Greengrass V2 Developer Guide* .
     * This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in AWS CloudFormation templates.
     * ```json
     * "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
     * }
     * ```
     */
    @JvmName("vhcbknveqvaylycl")
    public suspend fun tags(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param values Application-specific metadata to attach to the component version. You can use tags in IAM policies to control access to AWS IoT Greengrass resources. You can also use tags to categorize your resources. For more information, see [Tag your AWS IoT Greengrass Version 2 resources](https://docs.aws.amazon.com/greengrass/v2/developerguide/tag-resources.html) in the *AWS IoT Greengrass V2 Developer Guide* .
     * This `Json` property type is processed as a map of key-value pairs. It uses the following format, which is different from most `Tags` implementations in AWS CloudFormation templates.
     * ```json
     * "Tags": { "KeyName0": "value", "KeyName1": "value", "KeyName2": "value"
     * }
     * ```
     */
    @JvmName("hoejwvuhxuwdvvtw")
    public fun tags(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): ComponentVersionArgs = ComponentVersionArgs(
        inlineRecipe = inlineRecipe,
        lambdaFunction = lambdaFunction,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy