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

com.pulumi.aws.opsworks.kotlin.inputs.CustomLayerLoadBasedAutoScalingUpscalingArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.aws.opsworks.kotlin.inputs

import com.pulumi.aws.opsworks.inputs.CustomLayerLoadBasedAutoScalingUpscalingArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Double
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 *
 * @property alarms Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
 * @property cpuThreshold The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
 * @property ignoreMetricsTime The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and suppress additional scaling events.
 * @property instanceCount The number of instances to add or remove when the load exceeds a threshold.
 * @property loadThreshold The load threshold. A value of -1 disables the threshold.
 * @property memoryThreshold The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
 * @property thresholdsWaitTime The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
 */
public data class CustomLayerLoadBasedAutoScalingUpscalingArgs(
    public val alarms: Output>? = null,
    public val cpuThreshold: Output? = null,
    public val ignoreMetricsTime: Output? = null,
    public val instanceCount: Output? = null,
    public val loadThreshold: Output? = null,
    public val memoryThreshold: Output? = null,
    public val thresholdsWaitTime: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.opsworks.inputs.CustomLayerLoadBasedAutoScalingUpscalingArgs = com.pulumi.aws.opsworks.inputs.CustomLayerLoadBasedAutoScalingUpscalingArgs.builder()
        .alarms(alarms?.applyValue({ args0 -> args0.map({ args0 -> args0 }) }))
        .cpuThreshold(cpuThreshold?.applyValue({ args0 -> args0 }))
        .ignoreMetricsTime(ignoreMetricsTime?.applyValue({ args0 -> args0 }))
        .instanceCount(instanceCount?.applyValue({ args0 -> args0 }))
        .loadThreshold(loadThreshold?.applyValue({ args0 -> args0 }))
        .memoryThreshold(memoryThreshold?.applyValue({ args0 -> args0 }))
        .thresholdsWaitTime(thresholdsWaitTime?.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [CustomLayerLoadBasedAutoScalingUpscalingArgs].
 */
@PulumiTagMarker
public class CustomLayerLoadBasedAutoScalingUpscalingArgsBuilder internal constructor() {
    private var alarms: Output>? = null

    private var cpuThreshold: Output? = null

    private var ignoreMetricsTime: Output? = null

    private var instanceCount: Output? = null

    private var loadThreshold: Output? = null

    private var memoryThreshold: Output? = null

    private var thresholdsWaitTime: Output? = null

    /**
     * @param value Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
     */
    @JvmName("cbsmteqtsiojujaa")
    public suspend fun alarms(`value`: Output>) {
        this.alarms = value
    }

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

    /**
     * @param values Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
     */
    @JvmName("ajmbflqkvkpwaqoh")
    public suspend fun alarms(values: List>) {
        this.alarms = Output.all(values)
    }

    /**
     * @param value The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
     */
    @JvmName("ruttqtkhwmfkpywm")
    public suspend fun cpuThreshold(`value`: Output) {
        this.cpuThreshold = value
    }

    /**
     * @param value The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and suppress additional scaling events.
     */
    @JvmName("mvtjbpwjcikslvla")
    public suspend fun ignoreMetricsTime(`value`: Output) {
        this.ignoreMetricsTime = value
    }

    /**
     * @param value The number of instances to add or remove when the load exceeds a threshold.
     */
    @JvmName("nsdshvtgihlyqxvp")
    public suspend fun instanceCount(`value`: Output) {
        this.instanceCount = value
    }

    /**
     * @param value The load threshold. A value of -1 disables the threshold.
     */
    @JvmName("syjomsqorfbcauvy")
    public suspend fun loadThreshold(`value`: Output) {
        this.loadThreshold = value
    }

    /**
     * @param value The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
     */
    @JvmName("lisotswshffrcnns")
    public suspend fun memoryThreshold(`value`: Output) {
        this.memoryThreshold = value
    }

    /**
     * @param value The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
     */
    @JvmName("aavgqoqpvtftkqcr")
    public suspend fun thresholdsWaitTime(`value`: Output) {
        this.thresholdsWaitTime = value
    }

    /**
     * @param value Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
     */
    @JvmName("nyfkqbadyitmolly")
    public suspend fun alarms(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.alarms = mapped
    }

    /**
     * @param values Custom Cloudwatch auto scaling alarms, to be used as thresholds. This parameter takes a list of up to five alarm names, which are case sensitive and must be in the same region as the stack.
     */
    @JvmName("bojukuhvlwrssijr")
    public suspend fun alarms(vararg values: String) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.alarms = mapped
    }

    /**
     * @param value The CPU utilization threshold, as a percent of the available CPU. A value of -1 disables the threshold.
     */
    @JvmName("vnxlvgmqdnwmfadf")
    public suspend fun cpuThreshold(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.cpuThreshold = mapped
    }

    /**
     * @param value The amount of time (in minutes) after a scaling event occurs that AWS OpsWorks Stacks should ignore metrics and suppress additional scaling events.
     */
    @JvmName("wjarnqcupfyxvlft")
    public suspend fun ignoreMetricsTime(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.ignoreMetricsTime = mapped
    }

    /**
     * @param value The number of instances to add or remove when the load exceeds a threshold.
     */
    @JvmName("baabmgdkrlacbojv")
    public suspend fun instanceCount(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.instanceCount = mapped
    }

    /**
     * @param value The load threshold. A value of -1 disables the threshold.
     */
    @JvmName("bxuuaontuphxwjhh")
    public suspend fun loadThreshold(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.loadThreshold = mapped
    }

    /**
     * @param value The memory utilization threshold, as a percent of the available memory. A value of -1 disables the threshold.
     */
    @JvmName("ooehxyccvyvgaoxy")
    public suspend fun memoryThreshold(`value`: Double?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.memoryThreshold = mapped
    }

    /**
     * @param value The amount of time, in minutes, that the load must exceed a threshold before more instances are added or removed.
     */
    @JvmName("cwjretlvqlnmfllu")
    public suspend fun thresholdsWaitTime(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.thresholdsWaitTime = mapped
    }

    internal fun build(): CustomLayerLoadBasedAutoScalingUpscalingArgs =
        CustomLayerLoadBasedAutoScalingUpscalingArgs(
            alarms = alarms,
            cpuThreshold = cpuThreshold,
            ignoreMetricsTime = ignoreMetricsTime,
            instanceCount = instanceCount,
            loadThreshold = loadThreshold,
            memoryThreshold = memoryThreshold,
            thresholdsWaitTime = thresholdsWaitTime,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy