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

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

package com.pulumi.awsnative.apprunner.kotlin

import com.pulumi.awsnative.apprunner.AutoScalingConfigurationArgs.builder
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgs
import com.pulumi.awsnative.kotlin.inputs.CreateOnlyTagArgsBuilder
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.Int
import kotlin.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Describes an AWS App Runner automatic configuration resource that enables automatic scaling of instances used to process web requests. You can share an auto scaling configuration across multiple services.
 * @property autoScalingConfigurationName The customer-provided auto scaling configuration name.  When you use it for the first time in an AWS Region, App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration. The auto scaling configuration name can be used in multiple revisions of a configuration.
 * @property maxConcurrency The maximum number of concurrent requests that an instance processes. If the number of concurrent requests exceeds this limit, App Runner scales the service up to use more instances to process the requests.
 * @property maxSize The maximum number of instances that an App Runner service scales up to. At most MaxSize instances actively serve traffic for your service.
 * @property minSize The minimum number of instances that App Runner provisions for a service. The service always has at least MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset.
 * @property tags A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair.
 */
public data class AutoScalingConfigurationArgs(
    public val autoScalingConfigurationName: Output? = null,
    public val maxConcurrency: Output? = null,
    public val maxSize: Output? = null,
    public val minSize: Output? = null,
    public val tags: Output>? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.apprunner.AutoScalingConfigurationArgs =
        com.pulumi.awsnative.apprunner.AutoScalingConfigurationArgs.builder()
            .autoScalingConfigurationName(autoScalingConfigurationName?.applyValue({ args0 -> args0 }))
            .maxConcurrency(maxConcurrency?.applyValue({ args0 -> args0 }))
            .maxSize(maxSize?.applyValue({ args0 -> args0 }))
            .minSize(minSize?.applyValue({ args0 -> args0 }))
            .tags(
                tags?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            ).build()
}

/**
 * Builder for [AutoScalingConfigurationArgs].
 */
@PulumiTagMarker
public class AutoScalingConfigurationArgsBuilder internal constructor() {
    private var autoScalingConfigurationName: Output? = null

    private var maxConcurrency: Output? = null

    private var maxSize: Output? = null

    private var minSize: Output? = null

    private var tags: Output>? = null

    /**
     * @param value The customer-provided auto scaling configuration name.  When you use it for the first time in an AWS Region, App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration. The auto scaling configuration name can be used in multiple revisions of a configuration.
     */
    @JvmName("pwkflsnewcjfhimv")
    public suspend fun autoScalingConfigurationName(`value`: Output) {
        this.autoScalingConfigurationName = value
    }

    /**
     * @param value The maximum number of concurrent requests that an instance processes. If the number of concurrent requests exceeds this limit, App Runner scales the service up to use more instances to process the requests.
     */
    @JvmName("fntulkkjgulmpsbm")
    public suspend fun maxConcurrency(`value`: Output) {
        this.maxConcurrency = value
    }

    /**
     * @param value The maximum number of instances that an App Runner service scales up to. At most MaxSize instances actively serve traffic for your service.
     */
    @JvmName("dtlcexsdljcjlqqg")
    public suspend fun maxSize(`value`: Output) {
        this.maxSize = value
    }

    /**
     * @param value The minimum number of instances that App Runner provisions for a service. The service always has at least MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset.
     */
    @JvmName("gyssfsnjgvknutqo")
    public suspend fun minSize(`value`: Output) {
        this.minSize = value
    }

    /**
     * @param value A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair.
     */
    @JvmName("usryjmtkborftrpp")
    public suspend fun tags(`value`: Output>) {
        this.tags = value
    }

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

    /**
     * @param values A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair.
     */
    @JvmName("biiigsvnnvrxhxua")
    public suspend fun tags(values: List>) {
        this.tags = Output.all(values)
    }

    /**
     * @param value The customer-provided auto scaling configuration name.  When you use it for the first time in an AWS Region, App Runner creates revision number 1 of this name. When you use the same name in subsequent calls, App Runner creates incremental revisions of the configuration. The auto scaling configuration name can be used in multiple revisions of a configuration.
     */
    @JvmName("qqiejsvkudkocbfa")
    public suspend fun autoScalingConfigurationName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.autoScalingConfigurationName = mapped
    }

    /**
     * @param value The maximum number of concurrent requests that an instance processes. If the number of concurrent requests exceeds this limit, App Runner scales the service up to use more instances to process the requests.
     */
    @JvmName("bqoguhmjscryhqyb")
    public suspend fun maxConcurrency(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxConcurrency = mapped
    }

    /**
     * @param value The maximum number of instances that an App Runner service scales up to. At most MaxSize instances actively serve traffic for your service.
     */
    @JvmName("jmgwymkwspbtudke")
    public suspend fun maxSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.maxSize = mapped
    }

    /**
     * @param value The minimum number of instances that App Runner provisions for a service. The service always has at least MinSize provisioned instances. Some of them actively serve traffic. The rest of them (provisioned and inactive instances) are a cost-effective compute capacity reserve and are ready to be quickly activated. You pay for memory usage of all the provisioned instances. You pay for CPU usage of only the active subset.
     */
    @JvmName("utdmvqjvtxnsanuu")
    public suspend fun minSize(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.minSize = mapped
    }

    /**
     * @param value A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair.
     */
    @JvmName("cywluwhmyrlmnwlf")
    public suspend fun tags(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    /**
     * @param argument A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair.
     */
    @JvmName("avlpojrldhdfjfgg")
    public suspend fun tags(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair.
     */
    @JvmName("xjohhemepvujicsp")
    public suspend fun tags(vararg argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            CreateOnlyTagArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param argument A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair.
     */
    @JvmName("ckklaqsfilbyflcb")
    public suspend fun tags(argument: suspend CreateOnlyTagArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(CreateOnlyTagArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.tags = mapped
    }

    /**
     * @param values A list of metadata items that you can associate with your auto scaling configuration resource. A tag is a key-value pair.
     */
    @JvmName("tfiscwmemxkyikat")
    public suspend fun tags(vararg values: CreateOnlyTagArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.tags = mapped
    }

    internal fun build(): AutoScalingConfigurationArgs = AutoScalingConfigurationArgs(
        autoScalingConfigurationName = autoScalingConfigurationName,
        maxConcurrency = maxConcurrency,
        maxSize = maxSize,
        minSize = minSize,
        tags = tags,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy