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

com.pulumi.gcp.cloudfunctionsv2.kotlin.inputs.FunctionBuildConfigArgs.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: 8.13.1.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.gcp.cloudfunctionsv2.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigArgs.builder
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

/**
 *
 * @property automaticUpdatePolicy Security patches are applied automatically to the runtime without requiring
 * the function to be redeployed.
 * @property build (Output)
 * The Cloud Build name of the latest successful
 * deployment of the function.
 * @property dockerRepository User managed repository created in Artifact Registry optionally with a customer managed encryption key.
 * @property entryPoint The name of the function (as defined in source code) that will be executed.
 * Defaults to the resource name suffix, if not specified. For backward
 * compatibility, if function with given name is not found, then the system
 * will try to use function named "function". For Node.js this is name of a
 * function exported by the module specified in source_location.
 * @property environmentVariables User-provided build-time environment variables for the function.
 * @property onDeployUpdatePolicy Security patches are only applied when a function is redeployed.
 * Structure is documented below.
 * @property runtime The runtime in which to run the function. Required when deploying a new
 * function, optional when updating an existing function.
 * @property serviceAccount The fully-qualified name of the service account to be used for building the container.
 * @property source The location of the function source code.
 * Structure is documented below.
 * @property workerPool Name of the Cloud Build Custom Worker Pool that should be used to build the function.
 */
public data class FunctionBuildConfigArgs(
    public val automaticUpdatePolicy: Output? = null,
    public val build: Output? = null,
    public val dockerRepository: Output? = null,
    public val entryPoint: Output? = null,
    public val environmentVariables: Output>? = null,
    public val onDeployUpdatePolicy: Output? = null,
    public val runtime: Output? = null,
    public val serviceAccount: Output? = null,
    public val source: Output? = null,
    public val workerPool: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigArgs =
        com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionBuildConfigArgs.builder()
            .automaticUpdatePolicy(
                automaticUpdatePolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .build(build?.applyValue({ args0 -> args0 }))
            .dockerRepository(dockerRepository?.applyValue({ args0 -> args0 }))
            .entryPoint(entryPoint?.applyValue({ args0 -> args0 }))
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .onDeployUpdatePolicy(
                onDeployUpdatePolicy?.applyValue({ args0 ->
                    args0.let({ args0 ->
                        args0.toJava()
                    })
                }),
            )
            .runtime(runtime?.applyValue({ args0 -> args0 }))
            .serviceAccount(serviceAccount?.applyValue({ args0 -> args0 }))
            .source(source?.applyValue({ args0 -> args0.let({ args0 -> args0.toJava() }) }))
            .workerPool(workerPool?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FunctionBuildConfigArgs].
 */
@PulumiTagMarker
public class FunctionBuildConfigArgsBuilder internal constructor() {
    private var automaticUpdatePolicy: Output? = null

    private var build: Output? = null

    private var dockerRepository: Output? = null

    private var entryPoint: Output? = null

    private var environmentVariables: Output>? = null

    private var onDeployUpdatePolicy: Output? = null

    private var runtime: Output? = null

    private var serviceAccount: Output? = null

    private var source: Output? = null

    private var workerPool: Output? = null

    /**
     * @param value Security patches are applied automatically to the runtime without requiring
     * the function to be redeployed.
     */
    @JvmName("yyxetkyanwskvqkt")
    public suspend fun automaticUpdatePolicy(`value`: Output) {
        this.automaticUpdatePolicy = value
    }

    /**
     * @param value (Output)
     * The Cloud Build name of the latest successful
     * deployment of the function.
     */
    @JvmName("wovccpstwkueemvt")
    public suspend fun build(`value`: Output) {
        this.build = value
    }

    /**
     * @param value User managed repository created in Artifact Registry optionally with a customer managed encryption key.
     */
    @JvmName("qmrjvdgfaulaecoq")
    public suspend fun dockerRepository(`value`: Output) {
        this.dockerRepository = value
    }

    /**
     * @param value The name of the function (as defined in source code) that will be executed.
     * Defaults to the resource name suffix, if not specified. For backward
     * compatibility, if function with given name is not found, then the system
     * will try to use function named "function". For Node.js this is name of a
     * function exported by the module specified in source_location.
     */
    @JvmName("mxljcqewhjmducom")
    public suspend fun entryPoint(`value`: Output) {
        this.entryPoint = value
    }

    /**
     * @param value User-provided build-time environment variables for the function.
     */
    @JvmName("elhhfuwumbwiokew")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    /**
     * @param value Security patches are only applied when a function is redeployed.
     * Structure is documented below.
     */
    @JvmName("flcsvqdjimwovgba")
    public suspend fun onDeployUpdatePolicy(`value`: Output) {
        this.onDeployUpdatePolicy = value
    }

    /**
     * @param value The runtime in which to run the function. Required when deploying a new
     * function, optional when updating an existing function.
     */
    @JvmName("rkmnbdwxubrgqfvs")
    public suspend fun runtime(`value`: Output) {
        this.runtime = value
    }

    /**
     * @param value The fully-qualified name of the service account to be used for building the container.
     */
    @JvmName("mufdoiwxyuqvduea")
    public suspend fun serviceAccount(`value`: Output) {
        this.serviceAccount = value
    }

    /**
     * @param value The location of the function source code.
     * Structure is documented below.
     */
    @JvmName("vbmxpjkkrrgyfdlp")
    public suspend fun source(`value`: Output) {
        this.source = value
    }

    /**
     * @param value Name of the Cloud Build Custom Worker Pool that should be used to build the function.
     */
    @JvmName("mbrdajdsmxmjokii")
    public suspend fun workerPool(`value`: Output) {
        this.workerPool = value
    }

    /**
     * @param value Security patches are applied automatically to the runtime without requiring
     * the function to be redeployed.
     */
    @JvmName("jqhkdmfuhuatcobx")
    public suspend fun automaticUpdatePolicy(`value`: FunctionBuildConfigAutomaticUpdatePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.automaticUpdatePolicy = mapped
    }

    /**
     * @param argument Security patches are applied automatically to the runtime without requiring
     * the function to be redeployed.
     */
    @JvmName("uiovpbntleggqydt")
    public suspend fun automaticUpdatePolicy(argument: suspend FunctionBuildConfigAutomaticUpdatePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = FunctionBuildConfigAutomaticUpdatePolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.automaticUpdatePolicy = mapped
    }

    /**
     * @param value (Output)
     * The Cloud Build name of the latest successful
     * deployment of the function.
     */
    @JvmName("lcfkppjnxwrbmyys")
    public suspend fun build(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.build = mapped
    }

    /**
     * @param value User managed repository created in Artifact Registry optionally with a customer managed encryption key.
     */
    @JvmName("ntkixfohlrsulnsm")
    public suspend fun dockerRepository(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dockerRepository = mapped
    }

    /**
     * @param value The name of the function (as defined in source code) that will be executed.
     * Defaults to the resource name suffix, if not specified. For backward
     * compatibility, if function with given name is not found, then the system
     * will try to use function named "function". For Node.js this is name of a
     * function exported by the module specified in source_location.
     */
    @JvmName("xpluexdhqhshdiuc")
    public suspend fun entryPoint(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.entryPoint = mapped
    }

    /**
     * @param value User-provided build-time environment variables for the function.
     */
    @JvmName("oeptsscbgmnpetyj")
    public suspend fun environmentVariables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param values User-provided build-time environment variables for the function.
     */
    @JvmName("txdvsuqgdrsrteom")
    public fun environmentVariables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value Security patches are only applied when a function is redeployed.
     * Structure is documented below.
     */
    @JvmName("iecuhqcvmgisavij")
    public suspend fun onDeployUpdatePolicy(`value`: FunctionBuildConfigOnDeployUpdatePolicyArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.onDeployUpdatePolicy = mapped
    }

    /**
     * @param argument Security patches are only applied when a function is redeployed.
     * Structure is documented below.
     */
    @JvmName("nregbkjbhptmxvng")
    public suspend fun onDeployUpdatePolicy(argument: suspend FunctionBuildConfigOnDeployUpdatePolicyArgsBuilder.() -> Unit) {
        val toBeMapped = FunctionBuildConfigOnDeployUpdatePolicyArgsBuilder().applySuspend {
            argument()
        }.build()
        val mapped = of(toBeMapped)
        this.onDeployUpdatePolicy = mapped
    }

    /**
     * @param value The runtime in which to run the function. Required when deploying a new
     * function, optional when updating an existing function.
     */
    @JvmName("lxiinuaguapmaboq")
    public suspend fun runtime(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.runtime = mapped
    }

    /**
     * @param value The fully-qualified name of the service account to be used for building the container.
     */
    @JvmName("ssioweduifohtfau")
    public suspend fun serviceAccount(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccount = mapped
    }

    /**
     * @param value The location of the function source code.
     * Structure is documented below.
     */
    @JvmName("nebgjvgjekkjjhyh")
    public suspend fun source(`value`: FunctionBuildConfigSourceArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.source = mapped
    }

    /**
     * @param argument The location of the function source code.
     * Structure is documented below.
     */
    @JvmName("ldshvhiafkastjfn")
    public suspend fun source(argument: suspend FunctionBuildConfigSourceArgsBuilder.() -> Unit) {
        val toBeMapped = FunctionBuildConfigSourceArgsBuilder().applySuspend { argument() }.build()
        val mapped = of(toBeMapped)
        this.source = mapped
    }

    /**
     * @param value Name of the Cloud Build Custom Worker Pool that should be used to build the function.
     */
    @JvmName("xldgrrftpnrhlyma")
    public suspend fun workerPool(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.workerPool = mapped
    }

    internal fun build(): FunctionBuildConfigArgs = FunctionBuildConfigArgs(
        automaticUpdatePolicy = automaticUpdatePolicy,
        build = build,
        dockerRepository = dockerRepository,
        entryPoint = entryPoint,
        environmentVariables = environmentVariables,
        onDeployUpdatePolicy = onDeployUpdatePolicy,
        runtime = runtime,
        serviceAccount = serviceAccount,
        source = source,
        workerPool = workerPool,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy