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

com.pulumi.awsnative.lambda.kotlin.inputs.FunctionEnvironmentArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.lambda.kotlin.inputs

import com.pulumi.awsnative.lambda.inputs.FunctionEnvironmentArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 * A function's environment variable settings. You can use environment variables to adjust your function's behavior without updating code. An environment variable is a pair of strings that are stored in a function's version-specific configuration.
 * @property variables Environment variable key-value pairs. For more information, see [Using Lambda environment variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html).
 */
public data class FunctionEnvironmentArgs(
    public val variables: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lambda.inputs.FunctionEnvironmentArgs =
        com.pulumi.awsnative.lambda.inputs.FunctionEnvironmentArgs.builder()
            .variables(
                variables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            ).build()
}

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

    /**
     * @param value Environment variable key-value pairs. For more information, see [Using Lambda environment variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html).
     */
    @JvmName("bdqylwnenpwbtyab")
    public suspend fun variables(`value`: Output>) {
        this.variables = value
    }

    /**
     * @param value Environment variable key-value pairs. For more information, see [Using Lambda environment variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html).
     */
    @JvmName("vmltvaugbmbifisr")
    public suspend fun variables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.variables = mapped
    }

    /**
     * @param values Environment variable key-value pairs. For more information, see [Using Lambda environment variables](https://docs.aws.amazon.com/lambda/latest/dg/configuration-envvars.html).
     */
    @JvmName("skrganvrobymejdo")
    public fun variables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.variables = mapped
    }

    internal fun build(): FunctionEnvironmentArgs = FunctionEnvironmentArgs(
        variables = variables,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy