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

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

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

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

import com.pulumi.awsnative.lambda.inputs.FunctionRuntimeManagementConfigArgs.builder
import com.pulumi.awsnative.lambda.kotlin.enums.FunctionRuntimeManagementConfigUpdateRuntimeOn
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * Sets the runtime management configuration for a function's version. For more information, see [Runtime updates](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html).
 * @property runtimeVersionArn The ARN of the runtime version you want the function to use.
 *   This is only required if you're using the *Manual* runtime update mode.
 * @property updateRuntimeOn Specify the runtime update mode.
 *   +   *Auto (default)* - Automatically update to the most recent and secure runtime version using a [Two-phase runtime version rollout](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase). This is the best choice for most customers to ensure they always benefit from runtime updates.
 *   +   *FunctionUpdate* - LAM updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
 *   +   *Manual* - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see [Roll back a runtime version](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback).
 *   *Valid Values*: ``Auto`` | ``FunctionUpdate`` | ``Manual``
 */
public data class FunctionRuntimeManagementConfigArgs(
    public val runtimeVersionArn: Output? = null,
    public val updateRuntimeOn: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lambda.inputs.FunctionRuntimeManagementConfigArgs =
        com.pulumi.awsnative.lambda.inputs.FunctionRuntimeManagementConfigArgs.builder()
            .runtimeVersionArn(runtimeVersionArn?.applyValue({ args0 -> args0 }))
            .updateRuntimeOn(
                updateRuntimeOn.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            ).build()
}

/**
 * Builder for [FunctionRuntimeManagementConfigArgs].
 */
@PulumiTagMarker
public class FunctionRuntimeManagementConfigArgsBuilder internal constructor() {
    private var runtimeVersionArn: Output? = null

    private var updateRuntimeOn: Output? = null

    /**
     * @param value The ARN of the runtime version you want the function to use.
     *   This is only required if you're using the *Manual* runtime update mode.
     */
    @JvmName("ymwibytwtmlvltoh")
    public suspend fun runtimeVersionArn(`value`: Output) {
        this.runtimeVersionArn = value
    }

    /**
     * @param value Specify the runtime update mode.
     *   +   *Auto (default)* - Automatically update to the most recent and secure runtime version using a [Two-phase runtime version rollout](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase). This is the best choice for most customers to ensure they always benefit from runtime updates.
     *   +   *FunctionUpdate* - LAM updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
     *   +   *Manual* - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see [Roll back a runtime version](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback).
     *   *Valid Values*: ``Auto`` | ``FunctionUpdate`` | ``Manual``
     */
    @JvmName("pfnvlsjewhponnyh")
    public suspend fun updateRuntimeOn(`value`: Output) {
        this.updateRuntimeOn = value
    }

    /**
     * @param value The ARN of the runtime version you want the function to use.
     *   This is only required if you're using the *Manual* runtime update mode.
     */
    @JvmName("beclriqeniojehrj")
    public suspend fun runtimeVersionArn(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runtimeVersionArn = mapped
    }

    /**
     * @param value Specify the runtime update mode.
     *   +   *Auto (default)* - Automatically update to the most recent and secure runtime version using a [Two-phase runtime version rollout](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-two-phase). This is the best choice for most customers to ensure they always benefit from runtime updates.
     *   +   *FunctionUpdate* - LAM updates the runtime of you function to the most recent and secure runtime version when you update your function. This approach synchronizes runtime updates with function deployments, giving you control over when runtime updates are applied and allowing you to detect and mitigate rare runtime update incompatibilities early. When using this setting, you need to regularly update your functions to keep their runtime up-to-date.
     *   +   *Manual* - You specify a runtime version in your function configuration. The function will use this runtime version indefinitely. In the rare case where a new runtime version is incompatible with an existing function, this allows you to roll back your function to an earlier runtime version. For more information, see [Roll back a runtime version](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-update.html#runtime-management-rollback).
     *   *Valid Values*: ``Auto`` | ``FunctionUpdate`` | ``Manual``
     */
    @JvmName("atsqpompcwsniogw")
    public suspend fun updateRuntimeOn(`value`: FunctionRuntimeManagementConfigUpdateRuntimeOn) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.updateRuntimeOn = mapped
    }

    internal fun build(): FunctionRuntimeManagementConfigArgs = FunctionRuntimeManagementConfigArgs(
        runtimeVersionArn = runtimeVersionArn,
        updateRuntimeOn = updateRuntimeOn ?: throw PulumiNullFieldException("updateRuntimeOn"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy