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

com.pulumi.aws.autoscaling.kotlin.inputs.PolicyTargetTrackingConfigurationArgs.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: 6.57.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.aws.autoscaling.kotlin.inputs

import com.pulumi.aws.autoscaling.inputs.PolicyTargetTrackingConfigurationArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiNullFieldException
import com.pulumi.kotlin.PulumiTagMarker
import com.pulumi.kotlin.applySuspend
import kotlin.Boolean
import kotlin.Double
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName

/**
 *
 * @property customizedMetricSpecification Customized metric. Conflicts with `predefined_metric_specification`.
 * @property disableScaleIn Whether scale in by the target tracking policy is disabled.
 * @property predefinedMetricSpecification Predefined metric. Conflicts with `customized_metric_specification`.
 * @property targetValue Target value for the metric.
 */
public data class PolicyTargetTrackingConfigurationArgs(
    public val customizedMetricSpecification: Output? = null,
    public val disableScaleIn: Output? = null,
    public val predefinedMetricSpecification: Output? = null,
    public val targetValue: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.aws.autoscaling.inputs.PolicyTargetTrackingConfigurationArgs =
        com.pulumi.aws.autoscaling.inputs.PolicyTargetTrackingConfigurationArgs.builder()
            .customizedMetricSpecification(
                customizedMetricSpecification?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .disableScaleIn(disableScaleIn?.applyValue({ args0 -> args0 }))
            .predefinedMetricSpecification(
                predefinedMetricSpecification?.applyValue({ args0 ->
                    args0.let({ args0 -> args0.toJava() })
                }),
            )
            .targetValue(targetValue.applyValue({ args0 -> args0 })).build()
}

/**
 * Builder for [PolicyTargetTrackingConfigurationArgs].
 */
@PulumiTagMarker
public class PolicyTargetTrackingConfigurationArgsBuilder internal constructor() {
    private var customizedMetricSpecification:
        Output? = null

    private var disableScaleIn: Output? = null

    private var predefinedMetricSpecification:
        Output? = null

    private var targetValue: Output? = null

    /**
     * @param value Customized metric. Conflicts with `predefined_metric_specification`.
     */
    @JvmName("utibxibgllsfhlvr")
    public suspend fun customizedMetricSpecification(`value`: Output) {
        this.customizedMetricSpecification = value
    }

    /**
     * @param value Whether scale in by the target tracking policy is disabled.
     */
    @JvmName("mlrhgshwlhpgpgvr")
    public suspend fun disableScaleIn(`value`: Output) {
        this.disableScaleIn = value
    }

    /**
     * @param value Predefined metric. Conflicts with `customized_metric_specification`.
     */
    @JvmName("hngamhlclxhwasyx")
    public suspend fun predefinedMetricSpecification(`value`: Output) {
        this.predefinedMetricSpecification = value
    }

    /**
     * @param value Target value for the metric.
     */
    @JvmName("snnwgglqpnxoaulm")
    public suspend fun targetValue(`value`: Output) {
        this.targetValue = value
    }

    /**
     * @param value Customized metric. Conflicts with `predefined_metric_specification`.
     */
    @JvmName("tnfnvfauwlaycdex")
    public suspend fun customizedMetricSpecification(`value`: PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.customizedMetricSpecification = mapped
    }

    /**
     * @param argument Customized metric. Conflicts with `predefined_metric_specification`.
     */
    @JvmName("rkmqanmsacpgoeof")
    public suspend fun customizedMetricSpecification(argument: suspend PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped =
            PolicyTargetTrackingConfigurationCustomizedMetricSpecificationArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.customizedMetricSpecification = mapped
    }

    /**
     * @param value Whether scale in by the target tracking policy is disabled.
     */
    @JvmName("arememlfaesweqsf")
    public suspend fun disableScaleIn(`value`: Boolean?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.disableScaleIn = mapped
    }

    /**
     * @param value Predefined metric. Conflicts with `customized_metric_specification`.
     */
    @JvmName("xuphrrhbfslprshm")
    public suspend fun predefinedMetricSpecification(`value`: PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgs?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.predefinedMetricSpecification = mapped
    }

    /**
     * @param argument Predefined metric. Conflicts with `customized_metric_specification`.
     */
    @JvmName("mtuevudtogfrlabg")
    public suspend fun predefinedMetricSpecification(argument: suspend PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgsBuilder.() -> Unit) {
        val toBeMapped =
            PolicyTargetTrackingConfigurationPredefinedMetricSpecificationArgsBuilder().applySuspend {
                argument()
            }.build()
        val mapped = of(toBeMapped)
        this.predefinedMetricSpecification = mapped
    }

    /**
     * @param value Target value for the metric.
     */
    @JvmName("dpresvruosmwqynv")
    public suspend fun targetValue(`value`: Double) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.targetValue = mapped
    }

    internal fun build(): PolicyTargetTrackingConfigurationArgs =
        PolicyTargetTrackingConfigurationArgs(
            customizedMetricSpecification = customizedMetricSpecification,
            disableScaleIn = disableScaleIn,
            predefinedMetricSpecification = predefinedMetricSpecification,
            targetValue = targetValue ?: throw PulumiNullFieldException("targetValue"),
        )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy