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

com.pulumi.awsnative.greengrassv2.kotlin.inputs.ComponentVersionLambdaExecutionParametersArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.greengrassv2.kotlin.inputs

import com.pulumi.awsnative.greengrassv2.inputs.ComponentVersionLambdaExecutionParametersArgs.builder
import com.pulumi.awsnative.greengrassv2.kotlin.enums.ComponentVersionLambdaExecutionParametersInputPayloadEncodingType
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.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property environmentVariables The map of environment variables that are available to the Lambda function when it runs.
 * @property eventSources The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.
 * @property execArgs The list of arguments to pass to the Lambda function when it runs.
 * @property inputPayloadEncodingType The encoding type that the Lambda function supports.
 * Default: `json`
 * @property linuxProcessParams The parameters for the Linux process that contains the Lambda function.
 * @property maxIdleTimeInSeconds The maximum amount of time in seconds that a non-pinned Lambda function can idle before the AWS IoT Greengrass Core software stops its process.
 * @property maxInstancesCount The maximum number of instances that a non-pinned Lambda function can run at the same time.
 * @property maxQueueSize The maximum size of the message queue for the Lambda function component. The AWS IoT Greengrass core device stores messages in a FIFO (first-in-first-out) queue until it can run the Lambda function to consume each message.
 * @property pinned Whether or not the Lambda function is pinned, or long-lived.
 * - A pinned Lambda function starts when the AWS IoT Greengrass Core starts and keeps running in its own container.
 * - A non-pinned Lambda function starts only when it receives a work item and exists after it idles for `maxIdleTimeInSeconds` . If the function has multiple work items, the AWS IoT Greengrass Core software creates multiple instances of the function.
 * Default: `true`
 * @property statusTimeoutInSeconds The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.
 * @property timeoutInSeconds The maximum amount of time in seconds that the Lambda function can process a work item.
 */
public data class ComponentVersionLambdaExecutionParametersArgs(
    public val environmentVariables: Output>? = null,
    public val eventSources: Output>? = null,
    public val execArgs: Output>? = null,
    public val inputPayloadEncodingType: Output? = null,
    public val linuxProcessParams: Output? = null,
    public val maxIdleTimeInSeconds: Output? = null,
    public val maxInstancesCount: Output? = null,
    public val maxQueueSize: Output? = null,
    public val pinned: Output? = null,
    public val statusTimeoutInSeconds: Output? = null,
    public val timeoutInSeconds: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.greengrassv2.inputs.ComponentVersionLambdaExecutionParametersArgs =
        com.pulumi.awsnative.greengrassv2.inputs.ComponentVersionLambdaExecutionParametersArgs.builder()
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .eventSources(
                eventSources?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .execArgs(execArgs?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
            .inputPayloadEncodingType(
                inputPayloadEncodingType?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .linuxProcessParams(
                linuxProcessParams?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .maxIdleTimeInSeconds(maxIdleTimeInSeconds?.applyValue({ args0 -> args0 }))
            .maxInstancesCount(maxInstancesCount?.applyValue({ args0 -> args0 }))
            .maxQueueSize(maxQueueSize?.applyValue({ args0 -> args0 }))
            .pinned(pinned?.applyValue({ args0 -> args0 }))
            .statusTimeoutInSeconds(statusTimeoutInSeconds?.applyValue({ args0 -> args0 }))
            .timeoutInSeconds(timeoutInSeconds?.applyValue({ args0 -> args0 })).build()
}

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

    private var eventSources: Output>? = null

    private var execArgs: Output>? = null

    private var inputPayloadEncodingType:
        Output? = null

    private var linuxProcessParams: Output? = null

    private var maxIdleTimeInSeconds: Output? = null

    private var maxInstancesCount: Output? = null

    private var maxQueueSize: Output? = null

    private var pinned: Output? = null

    private var statusTimeoutInSeconds: Output? = null

    private var timeoutInSeconds: Output? = null

    /**
     * @param value The map of environment variables that are available to the Lambda function when it runs.
     */
    @JvmName("tdwybwasaboxlrit")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    /**
     * @param value The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.
     */
    @JvmName("dwmirdfmromddkgs")
    public suspend fun eventSources(`value`: Output>) {
        this.eventSources = value
    }

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

    /**
     * @param values The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.
     */
    @JvmName("ayhhahnpmnlucbhf")
    public suspend fun eventSources(values: List>) {
        this.eventSources = Output.all(values)
    }

    /**
     * @param value The list of arguments to pass to the Lambda function when it runs.
     */
    @JvmName("kyqoqarhecnliqnc")
    public suspend fun execArgs(`value`: Output>) {
        this.execArgs = value
    }

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

    /**
     * @param values The list of arguments to pass to the Lambda function when it runs.
     */
    @JvmName("ofytojtahkennfyr")
    public suspend fun execArgs(values: List>) {
        this.execArgs = Output.all(values)
    }

    /**
     * @param value The encoding type that the Lambda function supports.
     * Default: `json`
     */
    @JvmName("oiobrotpqljutqso")
    public suspend fun inputPayloadEncodingType(`value`: Output) {
        this.inputPayloadEncodingType = value
    }

    /**
     * @param value The parameters for the Linux process that contains the Lambda function.
     */
    @JvmName("faamgromfbxwkrgr")
    public suspend fun linuxProcessParams(`value`: Output) {
        this.linuxProcessParams = value
    }

    /**
     * @param value The maximum amount of time in seconds that a non-pinned Lambda function can idle before the AWS IoT Greengrass Core software stops its process.
     */
    @JvmName("sfglcgblsapllxpv")
    public suspend fun maxIdleTimeInSeconds(`value`: Output) {
        this.maxIdleTimeInSeconds = value
    }

    /**
     * @param value The maximum number of instances that a non-pinned Lambda function can run at the same time.
     */
    @JvmName("hmlkselxbefgsmeg")
    public suspend fun maxInstancesCount(`value`: Output) {
        this.maxInstancesCount = value
    }

    /**
     * @param value The maximum size of the message queue for the Lambda function component. The AWS IoT Greengrass core device stores messages in a FIFO (first-in-first-out) queue until it can run the Lambda function to consume each message.
     */
    @JvmName("cybqjfswmxddikgo")
    public suspend fun maxQueueSize(`value`: Output) {
        this.maxQueueSize = value
    }

    /**
     * @param value Whether or not the Lambda function is pinned, or long-lived.
     * - A pinned Lambda function starts when the AWS IoT Greengrass Core starts and keeps running in its own container.
     * - A non-pinned Lambda function starts only when it receives a work item and exists after it idles for `maxIdleTimeInSeconds` . If the function has multiple work items, the AWS IoT Greengrass Core software creates multiple instances of the function.
     * Default: `true`
     */
    @JvmName("ptvlquiihucnkumq")
    public suspend fun pinned(`value`: Output) {
        this.pinned = value
    }

    /**
     * @param value The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.
     */
    @JvmName("wwlkjgjcikofscnu")
    public suspend fun statusTimeoutInSeconds(`value`: Output) {
        this.statusTimeoutInSeconds = value
    }

    /**
     * @param value The maximum amount of time in seconds that the Lambda function can process a work item.
     */
    @JvmName("stnlannrsjqcgmbx")
    public suspend fun timeoutInSeconds(`value`: Output) {
        this.timeoutInSeconds = value
    }

    /**
     * @param value The map of environment variables that are available to the Lambda function when it runs.
     */
    @JvmName("uglofjdahtplrjpk")
    public suspend fun environmentVariables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param values The map of environment variables that are available to the Lambda function when it runs.
     */
    @JvmName("bmfhiwjseltwsrix")
    public fun environmentVariables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.
     */
    @JvmName("ltchamrqeyxvckqb")
    public suspend fun eventSources(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.eventSources = mapped
    }

    /**
     * @param argument The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.
     */
    @JvmName("odbfimyoenvnfytm")
    public suspend fun eventSources(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ComponentVersionLambdaEventSourceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.eventSources = mapped
    }

    /**
     * @param argument The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.
     */
    @JvmName("bqalmvlelflsbpik")
    public suspend fun eventSources(vararg argument: suspend ComponentVersionLambdaEventSourceArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ComponentVersionLambdaEventSourceArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.eventSources = mapped
    }

    /**
     * @param argument The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.
     */
    @JvmName("kwbrkrkctjqlhgwt")
    public suspend fun eventSources(argument: suspend ComponentVersionLambdaEventSourceArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ComponentVersionLambdaEventSourceArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.eventSources = mapped
    }

    /**
     * @param values The list of event sources to which to subscribe to receive work messages. The Lambda function runs when it receives a message from an event source. You can subscribe this function to local publish/subscribe messages and AWS IoT Core MQTT messages.
     */
    @JvmName("gtasluenvkowfphw")
    public suspend fun eventSources(vararg values: ComponentVersionLambdaEventSourceArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.eventSources = mapped
    }

    /**
     * @param value The list of arguments to pass to the Lambda function when it runs.
     */
    @JvmName("pqhyxmlcyhudodkc")
    public suspend fun execArgs(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.execArgs = mapped
    }

    /**
     * @param values The list of arguments to pass to the Lambda function when it runs.
     */
    @JvmName("mngdpfhttbtwbukp")
    public suspend fun execArgs(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.execArgs = mapped
    }

    /**
     * @param value The encoding type that the Lambda function supports.
     * Default: `json`
     */
    @JvmName("gxtvtpgwjfkdoxbp")
    public suspend fun inputPayloadEncodingType(`value`: ComponentVersionLambdaExecutionParametersInputPayloadEncodingType?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.inputPayloadEncodingType = mapped
    }

    /**
     * @param value The parameters for the Linux process that contains the Lambda function.
     */
    @JvmName("pktsedfepehgbpcw")
    public suspend fun linuxProcessParams(`value`: ComponentVersionLambdaLinuxProcessParamsArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.linuxProcessParams = mapped
    }

    /**
     * @param argument The parameters for the Linux process that contains the Lambda function.
     */
    @JvmName("iwsvkujfywqfxwam")
    public suspend fun linuxProcessParams(argument: suspend ComponentVersionLambdaLinuxProcessParamsArgsBuilder.() -> Unit) {
        val toBeMapped = ComponentVersionLambdaLinuxProcessParamsArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.linuxProcessParams = mapped
    }

    /**
     * @param value The maximum amount of time in seconds that a non-pinned Lambda function can idle before the AWS IoT Greengrass Core software stops its process.
     */
    @JvmName("fcfbxlnlpuevyhth")
    public suspend fun maxIdleTimeInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxIdleTimeInSeconds = mapped
    }

    /**
     * @param value The maximum number of instances that a non-pinned Lambda function can run at the same time.
     */
    @JvmName("koxkwfvvcwrydbea")
    public suspend fun maxInstancesCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxInstancesCount = mapped
    }

    /**
     * @param value The maximum size of the message queue for the Lambda function component. The AWS IoT Greengrass core device stores messages in a FIFO (first-in-first-out) queue until it can run the Lambda function to consume each message.
     */
    @JvmName("tgtkdoavwwamdysy")
    public suspend fun maxQueueSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxQueueSize = mapped
    }

    /**
     * @param value Whether or not the Lambda function is pinned, or long-lived.
     * - A pinned Lambda function starts when the AWS IoT Greengrass Core starts and keeps running in its own container.
     * - A non-pinned Lambda function starts only when it receives a work item and exists after it idles for `maxIdleTimeInSeconds` . If the function has multiple work items, the AWS IoT Greengrass Core software creates multiple instances of the function.
     * Default: `true`
     */
    @JvmName("cmufyheflainvkja")
    public suspend fun pinned(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.pinned = mapped
    }

    /**
     * @param value The interval in seconds at which a pinned (also known as long-lived) Lambda function component sends status updates to the Lambda manager component.
     */
    @JvmName("ecewouqqkrobprfm")
    public suspend fun statusTimeoutInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.statusTimeoutInSeconds = mapped
    }

    /**
     * @param value The maximum amount of time in seconds that the Lambda function can process a work item.
     */
    @JvmName("ydbihdxhnebocqjn")
    public suspend fun timeoutInSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeoutInSeconds = mapped
    }

    internal fun build(): ComponentVersionLambdaExecutionParametersArgs =
        ComponentVersionLambdaExecutionParametersArgs(
            environmentVariables = environmentVariables,
            eventSources = eventSources,
            execArgs = execArgs,
            inputPayloadEncodingType = inputPayloadEncodingType,
            linuxProcessParams = linuxProcessParams,
            maxIdleTimeInSeconds = maxIdleTimeInSeconds,
            maxInstancesCount = maxInstancesCount,
            maxQueueSize = maxQueueSize,
            pinned = pinned,
            statusTimeoutInSeconds = statusTimeoutInSeconds,
            timeoutInSeconds = timeoutInSeconds,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy