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

com.pulumi.googlenative.appengine.v1beta.kotlin.inputs.BasicScalingArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.googlenative.appengine.v1beta.kotlin.inputs

import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.googlenative.appengine.v1beta.inputs.BasicScalingArgs.builder
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.jvm.JvmName

/**
 * A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
 * @property idleTimeout Duration of time after the last request that an instance must wait before the instance is shut down.
 * @property maxInstances Maximum number of instances to create for this version.
 */
public data class BasicScalingArgs(
    public val idleTimeout: Output? = null,
    public val maxInstances: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.googlenative.appengine.v1beta.inputs.BasicScalingArgs =
        com.pulumi.googlenative.appengine.v1beta.inputs.BasicScalingArgs.builder()
            .idleTimeout(idleTimeout?.applyValue({ args0 -> args0 }))
            .maxInstances(maxInstances?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [BasicScalingArgs].
 */
@PulumiTagMarker
public class BasicScalingArgsBuilder internal constructor() {
    private var idleTimeout: Output? = null

    private var maxInstances: Output? = null

    /**
     * @param value Duration of time after the last request that an instance must wait before the instance is shut down.
     */
    @JvmName("sejgxupgmbhrcglf")
    public suspend fun idleTimeout(`value`: Output) {
        this.idleTimeout = value
    }

    /**
     * @param value Maximum number of instances to create for this version.
     */
    @JvmName("yrnkigufoiaaovvc")
    public suspend fun maxInstances(`value`: Output) {
        this.maxInstances = value
    }

    /**
     * @param value Duration of time after the last request that an instance must wait before the instance is shut down.
     */
    @JvmName("paxyemggdhlpyxhq")
    public suspend fun idleTimeout(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.idleTimeout = mapped
    }

    /**
     * @param value Maximum number of instances to create for this version.
     */
    @JvmName("hgiwkbviiylpnbrl")
    public suspend fun maxInstances(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxInstances = mapped
    }

    internal fun build(): BasicScalingArgs = BasicScalingArgs(
        idleTimeout = idleTimeout,
        maxInstances = maxInstances,
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy