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

com.pulumi.gcp.cloudfunctionsv2.kotlin.inputs.FunctionServiceConfigArgs.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.12.0.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.FunctionServiceConfigArgs.builder
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 allTrafficOnLatestRevision Whether 100% of traffic is routed to the latest revision. Defaults to true.
 * @property availableCpu The number of CPUs used in a single container instance. Default value is calculated from available memory.
 * @property availableMemory The amount of memory available for a function.
 * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is
 * supplied the value is interpreted as bytes.
 * @property environmentVariables Environment variables that shall be available during function execution.
 * @property gcfUri (Output)
 * URIs of the Service deployed
 * @property ingressSettings Available ingress settings. Defaults to "ALLOW_ALL" if unspecified.
 * Default value is `ALLOW_ALL`.
 * Possible values are: `ALLOW_ALL`, `ALLOW_INTERNAL_ONLY`, `ALLOW_INTERNAL_AND_GCLB`.
 * @property maxInstanceCount The limit on the maximum number of function instances that may coexist at a
 * given time.
 * @property maxInstanceRequestConcurrency Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
 * @property minInstanceCount The limit on the minimum number of function instances that may coexist at a
 * given time.
 * @property secretEnvironmentVariables Secret environment variables configuration.
 * Structure is documented below.
 * @property secretVolumes Secret volumes configuration.
 * Structure is documented below.
 * @property service Name of the service associated with a Function.
 * @property serviceAccountEmail The email of the service account for this function.
 * @property timeoutSeconds The function execution timeout. Execution is considered failed and
 * can be terminated if the function is not completed at the end of the
 * timeout period. Defaults to 60 seconds.
 * @property uri (Output)
 * URI of the Service deployed.
 * @property vpcConnector The Serverless VPC Access connector that this cloud function can connect to.
 * @property vpcConnectorEgressSettings Available egress settings.
 * Possible values are: `VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED`, `PRIVATE_RANGES_ONLY`, `ALL_TRAFFIC`.
 */
public data class FunctionServiceConfigArgs(
    public val allTrafficOnLatestRevision: Output? = null,
    public val availableCpu: Output? = null,
    public val availableMemory: Output? = null,
    public val environmentVariables: Output>? = null,
    public val gcfUri: Output? = null,
    public val ingressSettings: Output? = null,
    public val maxInstanceCount: Output? = null,
    public val maxInstanceRequestConcurrency: Output? = null,
    public val minInstanceCount: Output? = null,
    public val secretEnvironmentVariables: Output>? = null,
    public val secretVolumes: Output>? = null,
    public val service: Output? = null,
    public val serviceAccountEmail: Output? = null,
    public val timeoutSeconds: Output? = null,
    public val uri: Output? = null,
    public val vpcConnector: Output? = null,
    public val vpcConnectorEgressSettings: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionServiceConfigArgs =
        com.pulumi.gcp.cloudfunctionsv2.inputs.FunctionServiceConfigArgs.builder()
            .allTrafficOnLatestRevision(allTrafficOnLatestRevision?.applyValue({ args0 -> args0 }))
            .availableCpu(availableCpu?.applyValue({ args0 -> args0 }))
            .availableMemory(availableMemory?.applyValue({ args0 -> args0 }))
            .environmentVariables(
                environmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .gcfUri(gcfUri?.applyValue({ args0 -> args0 }))
            .ingressSettings(ingressSettings?.applyValue({ args0 -> args0 }))
            .maxInstanceCount(maxInstanceCount?.applyValue({ args0 -> args0 }))
            .maxInstanceRequestConcurrency(maxInstanceRequestConcurrency?.applyValue({ args0 -> args0 }))
            .minInstanceCount(minInstanceCount?.applyValue({ args0 -> args0 }))
            .secretEnvironmentVariables(
                secretEnvironmentVariables?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 -> args0.toJava() })
                    })
                }),
            )
            .secretVolumes(
                secretVolumes?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .service(service?.applyValue({ args0 -> args0 }))
            .serviceAccountEmail(serviceAccountEmail?.applyValue({ args0 -> args0 }))
            .timeoutSeconds(timeoutSeconds?.applyValue({ args0 -> args0 }))
            .uri(uri?.applyValue({ args0 -> args0 }))
            .vpcConnector(vpcConnector?.applyValue({ args0 -> args0 }))
            .vpcConnectorEgressSettings(vpcConnectorEgressSettings?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [FunctionServiceConfigArgs].
 */
@PulumiTagMarker
public class FunctionServiceConfigArgsBuilder internal constructor() {
    private var allTrafficOnLatestRevision: Output? = null

    private var availableCpu: Output? = null

    private var availableMemory: Output? = null

    private var environmentVariables: Output>? = null

    private var gcfUri: Output? = null

    private var ingressSettings: Output? = null

    private var maxInstanceCount: Output? = null

    private var maxInstanceRequestConcurrency: Output? = null

    private var minInstanceCount: Output? = null

    private var secretEnvironmentVariables:
        Output>? = null

    private var secretVolumes: Output>? = null

    private var service: Output? = null

    private var serviceAccountEmail: Output? = null

    private var timeoutSeconds: Output? = null

    private var uri: Output? = null

    private var vpcConnector: Output? = null

    private var vpcConnectorEgressSettings: Output? = null

    /**
     * @param value Whether 100% of traffic is routed to the latest revision. Defaults to true.
     */
    @JvmName("scwjphqhdymtooom")
    public suspend fun allTrafficOnLatestRevision(`value`: Output) {
        this.allTrafficOnLatestRevision = value
    }

    /**
     * @param value The number of CPUs used in a single container instance. Default value is calculated from available memory.
     */
    @JvmName("ytfnwnlwdbixasis")
    public suspend fun availableCpu(`value`: Output) {
        this.availableCpu = value
    }

    /**
     * @param value The amount of memory available for a function.
     * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is
     * supplied the value is interpreted as bytes.
     */
    @JvmName("eiajxvcsrvghsvcs")
    public suspend fun availableMemory(`value`: Output) {
        this.availableMemory = value
    }

    /**
     * @param value Environment variables that shall be available during function execution.
     */
    @JvmName("ooqwtqujhbikvilb")
    public suspend fun environmentVariables(`value`: Output>) {
        this.environmentVariables = value
    }

    /**
     * @param value (Output)
     * URIs of the Service deployed
     */
    @JvmName("liibmsiiigvcdqjq")
    public suspend fun gcfUri(`value`: Output) {
        this.gcfUri = value
    }

    /**
     * @param value Available ingress settings. Defaults to "ALLOW_ALL" if unspecified.
     * Default value is `ALLOW_ALL`.
     * Possible values are: `ALLOW_ALL`, `ALLOW_INTERNAL_ONLY`, `ALLOW_INTERNAL_AND_GCLB`.
     */
    @JvmName("cygeuhnixtxxfsaw")
    public suspend fun ingressSettings(`value`: Output) {
        this.ingressSettings = value
    }

    /**
     * @param value The limit on the maximum number of function instances that may coexist at a
     * given time.
     */
    @JvmName("hctifayarlaljyki")
    public suspend fun maxInstanceCount(`value`: Output) {
        this.maxInstanceCount = value
    }

    /**
     * @param value Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
     */
    @JvmName("jmbdolblaaafmtqv")
    public suspend fun maxInstanceRequestConcurrency(`value`: Output) {
        this.maxInstanceRequestConcurrency = value
    }

    /**
     * @param value The limit on the minimum number of function instances that may coexist at a
     * given time.
     */
    @JvmName("uwkorpvitqhenvhs")
    public suspend fun minInstanceCount(`value`: Output) {
        this.minInstanceCount = value
    }

    /**
     * @param value Secret environment variables configuration.
     * Structure is documented below.
     */
    @JvmName("aqvdvyxxbjrbgmqm")
    public suspend fun secretEnvironmentVariables(`value`: Output>) {
        this.secretEnvironmentVariables = value
    }

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

    /**
     * @param values Secret environment variables configuration.
     * Structure is documented below.
     */
    @JvmName("hjpebbkhpmqvpesw")
    public suspend fun secretEnvironmentVariables(values: List>) {
        this.secretEnvironmentVariables = Output.all(values)
    }

    /**
     * @param value Secret volumes configuration.
     * Structure is documented below.
     */
    @JvmName("gxjyodeyqgjctcab")
    public suspend fun secretVolumes(`value`: Output>) {
        this.secretVolumes = value
    }

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

    /**
     * @param values Secret volumes configuration.
     * Structure is documented below.
     */
    @JvmName("eapwrmdvikifujhw")
    public suspend fun secretVolumes(values: List>) {
        this.secretVolumes = Output.all(values)
    }

    /**
     * @param value Name of the service associated with a Function.
     */
    @JvmName("dkhtajablnepyhct")
    public suspend fun service(`value`: Output) {
        this.service = value
    }

    /**
     * @param value The email of the service account for this function.
     */
    @JvmName("qtjjpioortlkdqxl")
    public suspend fun serviceAccountEmail(`value`: Output) {
        this.serviceAccountEmail = value
    }

    /**
     * @param value The function execution timeout. Execution is considered failed and
     * can be terminated if the function is not completed at the end of the
     * timeout period. Defaults to 60 seconds.
     */
    @JvmName("skimslcfoyahffxw")
    public suspend fun timeoutSeconds(`value`: Output) {
        this.timeoutSeconds = value
    }

    /**
     * @param value (Output)
     * URI of the Service deployed.
     */
    @JvmName("iinhfxuaagymergk")
    public suspend fun uri(`value`: Output) {
        this.uri = value
    }

    /**
     * @param value The Serverless VPC Access connector that this cloud function can connect to.
     */
    @JvmName("xgsarmcoystmqpgn")
    public suspend fun vpcConnector(`value`: Output) {
        this.vpcConnector = value
    }

    /**
     * @param value Available egress settings.
     * Possible values are: `VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED`, `PRIVATE_RANGES_ONLY`, `ALL_TRAFFIC`.
     */
    @JvmName("yreojdolrylumrjj")
    public suspend fun vpcConnectorEgressSettings(`value`: Output) {
        this.vpcConnectorEgressSettings = value
    }

    /**
     * @param value Whether 100% of traffic is routed to the latest revision. Defaults to true.
     */
    @JvmName("xivajovoaapisnom")
    public suspend fun allTrafficOnLatestRevision(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.allTrafficOnLatestRevision = mapped
    }

    /**
     * @param value The number of CPUs used in a single container instance. Default value is calculated from available memory.
     */
    @JvmName("hrgudscqucdruwcj")
    public suspend fun availableCpu(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.availableCpu = mapped
    }

    /**
     * @param value The amount of memory available for a function.
     * Defaults to 256M. Supported units are k, M, G, Mi, Gi. If no unit is
     * supplied the value is interpreted as bytes.
     */
    @JvmName("tdsjfyuwkvcfdjcm")
    public suspend fun availableMemory(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.availableMemory = mapped
    }

    /**
     * @param value Environment variables that shall be available during function execution.
     */
    @JvmName("vyhvnkxulgvvsdun")
    public suspend fun environmentVariables(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param values Environment variables that shall be available during function execution.
     */
    @JvmName("ueemhxvhskiusrqs")
    public fun environmentVariables(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.environmentVariables = mapped
    }

    /**
     * @param value (Output)
     * URIs of the Service deployed
     */
    @JvmName("oewflxxhkqyqsuow")
    public suspend fun gcfUri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.gcfUri = mapped
    }

    /**
     * @param value Available ingress settings. Defaults to "ALLOW_ALL" if unspecified.
     * Default value is `ALLOW_ALL`.
     * Possible values are: `ALLOW_ALL`, `ALLOW_INTERNAL_ONLY`, `ALLOW_INTERNAL_AND_GCLB`.
     */
    @JvmName("whtdktmsydocjekt")
    public suspend fun ingressSettings(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ingressSettings = mapped
    }

    /**
     * @param value The limit on the maximum number of function instances that may coexist at a
     * given time.
     */
    @JvmName("ohdnimjnqgtcejhv")
    public suspend fun maxInstanceCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxInstanceCount = mapped
    }

    /**
     * @param value Sets the maximum number of concurrent requests that each instance can receive. Defaults to 1.
     */
    @JvmName("provknpbdfyjdiuy")
    public suspend fun maxInstanceRequestConcurrency(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxInstanceRequestConcurrency = mapped
    }

    /**
     * @param value The limit on the minimum number of function instances that may coexist at a
     * given time.
     */
    @JvmName("uohrohowumvhbkge")
    public suspend fun minInstanceCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minInstanceCount = mapped
    }

    /**
     * @param value Secret environment variables configuration.
     * Structure is documented below.
     */
    @JvmName("yiwdrylmhypdboym")
    public suspend fun secretEnvironmentVariables(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secretEnvironmentVariables = mapped
    }

    /**
     * @param argument Secret environment variables configuration.
     * Structure is documented below.
     */
    @JvmName("bnirerjpeejvdwak")
    public suspend fun secretEnvironmentVariables(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FunctionServiceConfigSecretEnvironmentVariableArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.secretEnvironmentVariables = mapped
    }

    /**
     * @param argument Secret environment variables configuration.
     * Structure is documented below.
     */
    @JvmName("arxoiyqwkxxjmpwm")
    public suspend fun secretEnvironmentVariables(vararg argument: suspend FunctionServiceConfigSecretEnvironmentVariableArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FunctionServiceConfigSecretEnvironmentVariableArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.secretEnvironmentVariables = mapped
    }

    /**
     * @param argument Secret environment variables configuration.
     * Structure is documented below.
     */
    @JvmName("qebjsbcsyephmamh")
    public suspend fun secretEnvironmentVariables(argument: suspend FunctionServiceConfigSecretEnvironmentVariableArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            FunctionServiceConfigSecretEnvironmentVariableArgsBuilder().applySuspend
                { argument() }.build(),
        )
        val mapped = of(toBeMapped)
        this.secretEnvironmentVariables = mapped
    }

    /**
     * @param values Secret environment variables configuration.
     * Structure is documented below.
     */
    @JvmName("fghkchnchipudjdq")
    public suspend fun secretEnvironmentVariables(vararg values: FunctionServiceConfigSecretEnvironmentVariableArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secretEnvironmentVariables = mapped
    }

    /**
     * @param value Secret volumes configuration.
     * Structure is documented below.
     */
    @JvmName("haunghxeoovhsdtm")
    public suspend fun secretVolumes(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.secretVolumes = mapped
    }

    /**
     * @param argument Secret volumes configuration.
     * Structure is documented below.
     */
    @JvmName("ksdiabvymulxcerg")
    public suspend fun secretVolumes(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            FunctionServiceConfigSecretVolumeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.secretVolumes = mapped
    }

    /**
     * @param argument Secret volumes configuration.
     * Structure is documented below.
     */
    @JvmName("cemvjktvefvkswwt")
    public suspend fun secretVolumes(vararg argument: suspend FunctionServiceConfigSecretVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            FunctionServiceConfigSecretVolumeArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.secretVolumes = mapped
    }

    /**
     * @param argument Secret volumes configuration.
     * Structure is documented below.
     */
    @JvmName("eydtvyagdvqitibw")
    public suspend fun secretVolumes(argument: suspend FunctionServiceConfigSecretVolumeArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            FunctionServiceConfigSecretVolumeArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.secretVolumes = mapped
    }

    /**
     * @param values Secret volumes configuration.
     * Structure is documented below.
     */
    @JvmName("flwiqtlodobwwcfw")
    public suspend fun secretVolumes(vararg values: FunctionServiceConfigSecretVolumeArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.secretVolumes = mapped
    }

    /**
     * @param value Name of the service associated with a Function.
     */
    @JvmName("jynokdflynxhjose")
    public suspend fun service(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.service = mapped
    }

    /**
     * @param value The email of the service account for this function.
     */
    @JvmName("wbbyoctilxjpbdel")
    public suspend fun serviceAccountEmail(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.serviceAccountEmail = mapped
    }

    /**
     * @param value The function execution timeout. Execution is considered failed and
     * can be terminated if the function is not completed at the end of the
     * timeout period. Defaults to 60 seconds.
     */
    @JvmName("sxtvxdevdposmkdu")
    public suspend fun timeoutSeconds(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.timeoutSeconds = mapped
    }

    /**
     * @param value (Output)
     * URI of the Service deployed.
     */
    @JvmName("aqgvtkrpriloixkx")
    public suspend fun uri(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.uri = mapped
    }

    /**
     * @param value The Serverless VPC Access connector that this cloud function can connect to.
     */
    @JvmName("unkvqrnfyngljmry")
    public suspend fun vpcConnector(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcConnector = mapped
    }

    /**
     * @param value Available egress settings.
     * Possible values are: `VPC_CONNECTOR_EGRESS_SETTINGS_UNSPECIFIED`, `PRIVATE_RANGES_ONLY`, `ALL_TRAFFIC`.
     */
    @JvmName("fombnpuxcrayhryv")
    public suspend fun vpcConnectorEgressSettings(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.vpcConnectorEgressSettings = mapped
    }

    internal fun build(): FunctionServiceConfigArgs = FunctionServiceConfigArgs(
        allTrafficOnLatestRevision = allTrafficOnLatestRevision,
        availableCpu = availableCpu,
        availableMemory = availableMemory,
        environmentVariables = environmentVariables,
        gcfUri = gcfUri,
        ingressSettings = ingressSettings,
        maxInstanceCount = maxInstanceCount,
        maxInstanceRequestConcurrency = maxInstanceRequestConcurrency,
        minInstanceCount = minInstanceCount,
        secretEnvironmentVariables = secretEnvironmentVariables,
        secretVolumes = secretVolumes,
        service = service,
        serviceAccountEmail = serviceAccountEmail,
        timeoutSeconds = timeoutSeconds,
        uri = uri,
        vpcConnector = vpcConnector,
        vpcConnectorEgressSettings = vpcConnectorEgressSettings,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy