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

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

package com.pulumi.awsnative.lambda.kotlin

import com.pulumi.awsnative.lambda.VersionArgs.builder
import com.pulumi.awsnative.lambda.kotlin.inputs.VersionProvisionedConcurrencyConfigurationArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.VersionProvisionedConcurrencyConfigurationArgsBuilder
import com.pulumi.awsnative.lambda.kotlin.inputs.VersionRuntimePolicyArgs
import com.pulumi.awsnative.lambda.kotlin.inputs.VersionRuntimePolicyArgsBuilder
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.Any
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 * Resource Type definition for AWS::Lambda::Version
 * @property codeSha256 Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing a version if the function code has changed since you last updated it. Updates are not supported for this property.
 * @property description A description for the version to override the description in the function configuration. Updates are not supported for this property.
 * @property functionName The name of the Lambda function.
 * @property policy The resource policy of your function
 * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Lambda::Version` for more information about the expected schema for this property.
 * @property provisionedConcurrencyConfig Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.
 * @property runtimePolicy Specifies the runtime management configuration of a function. Displays runtimeVersionArn only for Manual.
 */
public data class VersionArgs(
    public val codeSha256: Output? = null,
    public val description: Output? = null,
    public val functionName: Output? = null,
    public val policy: Output? = null,
    public val provisionedConcurrencyConfig: Output? =
        null,
    public val runtimePolicy: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.lambda.VersionArgs =
        com.pulumi.awsnative.lambda.VersionArgs.builder()
            .codeSha256(codeSha256?.applyValue({ args0 -> args0 }))
            .description(description?.applyValue({ args0 -> args0 }))
            .functionName(functionName?.applyValue({ args0 -> args0 }))
            .policy(policy?.applyValue({ args0 -> args0 }))
            .provisionedConcurrencyConfig(
                provisionedConcurrencyConfig?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .runtimePolicy(runtimePolicy?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) })).build()
}

/**
 * Builder for [VersionArgs].
 */
@PulumiTagMarker
public class VersionArgsBuilder internal constructor() {
    private var codeSha256: Output? = null

    private var description: Output? = null

    private var functionName: Output? = null

    private var policy: Output? = null

    private var provisionedConcurrencyConfig: Output? =
        null

    private var runtimePolicy: Output? = null

    /**
     * @param value Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing a version if the function code has changed since you last updated it. Updates are not supported for this property.
     */
    @JvmName("addixwpcxfocnadg")
    public suspend fun codeSha256(`value`: Output) {
        this.codeSha256 = value
    }

    /**
     * @param value A description for the version to override the description in the function configuration. Updates are not supported for this property.
     */
    @JvmName("vchcyhthnenfjscd")
    public suspend fun description(`value`: Output) {
        this.description = value
    }

    /**
     * @param value The name of the Lambda function.
     */
    @JvmName("bpqukwdsncjvwubt")
    public suspend fun functionName(`value`: Output) {
        this.functionName = value
    }

    /**
     * @param value The resource policy of your function
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Lambda::Version` for more information about the expected schema for this property.
     */
    @JvmName("hfdduhkwxvhupwua")
    public suspend fun policy(`value`: Output) {
        this.policy = value
    }

    /**
     * @param value Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.
     */
    @JvmName("piltbvcpvrxsygbo")
    public suspend fun provisionedConcurrencyConfig(`value`: Output) {
        this.provisionedConcurrencyConfig = value
    }

    /**
     * @param value Specifies the runtime management configuration of a function. Displays runtimeVersionArn only for Manual.
     */
    @JvmName("ndstddjkpldusyhe")
    public suspend fun runtimePolicy(`value`: Output) {
        this.runtimePolicy = value
    }

    /**
     * @param value Only publish a version if the hash value matches the value that's specified. Use this option to avoid publishing a version if the function code has changed since you last updated it. Updates are not supported for this property.
     */
    @JvmName("mxnsossxvswlimwc")
    public suspend fun codeSha256(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.codeSha256 = mapped
    }

    /**
     * @param value A description for the version to override the description in the function configuration. Updates are not supported for this property.
     */
    @JvmName("gaicwvebqnlnqglb")
    public suspend fun description(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.description = mapped
    }

    /**
     * @param value The name of the Lambda function.
     */
    @JvmName("vgnxdvukwsqvclox")
    public suspend fun functionName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.functionName = mapped
    }

    /**
     * @param value The resource policy of your function
     * Search the [CloudFormation User Guide](https://docs.aws.amazon.com/cloudformation/) for `AWS::Lambda::Version` for more information about the expected schema for this property.
     */
    @JvmName("fopxvgjdvpophodg")
    public suspend fun policy(`value`: Any?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.policy = mapped
    }

    /**
     * @param value Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.
     */
    @JvmName("nrmjylmjmnbbyotw")
    public suspend fun provisionedConcurrencyConfig(`value`: VersionProvisionedConcurrencyConfigurationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.provisionedConcurrencyConfig = mapped
    }

    /**
     * @param argument Specifies a provisioned concurrency configuration for a function's version. Updates are not supported for this property.
     */
    @JvmName("ficqsvxgrfjhqeik")
    public suspend fun provisionedConcurrencyConfig(argument: suspend VersionProvisionedConcurrencyConfigurationArgsBuilder.() -> Unit) {
        val toBeMapped = VersionProvisionedConcurrencyConfigurationArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.provisionedConcurrencyConfig = mapped
    }

    /**
     * @param value Specifies the runtime management configuration of a function. Displays runtimeVersionArn only for Manual.
     */
    @JvmName("diqtbcdkcrcacxof")
    public suspend fun runtimePolicy(`value`: VersionRuntimePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runtimePolicy = mapped
    }

    /**
     * @param argument Specifies the runtime management configuration of a function. Displays runtimeVersionArn only for Manual.
     */
    @JvmName("duqatbfyldieipuh")
    public suspend fun runtimePolicy(argument: suspend VersionRuntimePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = VersionRuntimePolicyArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.runtimePolicy = mapped
    }

    internal fun build(): VersionArgs = VersionArgs(
        codeSha256 = codeSha256,
        description = description,
        functionName = functionName,
        policy = policy,
        provisionedConcurrencyConfig = provisionedConcurrencyConfig,
        runtimePolicy = runtimePolicy,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy