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

com.pulumi.awsnative.applicationautoscaling.kotlin.inputs.ScalingPolicyTargetTrackingMetricArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.applicationautoscaling.kotlin.inputs

import com.pulumi.awsnative.applicationautoscaling.inputs.ScalingPolicyTargetTrackingMetricArgs.builder
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.String
import kotlin.Suppress
import kotlin.Unit
import kotlin.collections.List
import kotlin.jvm.JvmName

/**
 * Represents a specific metric for a target tracking scaling policy for Application Auto Scaling.
 *  Metric is a property of the [AWS::ApplicationAutoScaling::ScalingPolicy TargetTrackingMetricStat](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-targettrackingmetricstat.html) property type.
 * @property dimensions The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
 *  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
 * @property metricName The name of the metric.
 * @property namespace The namespace of the metric. For more information, see the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
 */
public data class ScalingPolicyTargetTrackingMetricArgs(
    public val dimensions: Output>? = null,
    public val metricName: Output? = null,
    public val namespace: Output? = null,
) :
    ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.applicationautoscaling.inputs.ScalingPolicyTargetTrackingMetricArgs =
        com.pulumi.awsnative.applicationautoscaling.inputs.ScalingPolicyTargetTrackingMetricArgs.builder()
            .dimensions(
                dimensions?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.let({ args0 ->
                            args0.toJava()
                        })
                    })
                }),
            )
            .metricName(metricName?.applyValue({ args0 -> args0 }))
            .namespace(namespace?.applyValue({ args0 -> args0 })).build()
}

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

    private var metricName: Output? = null

    private var namespace: Output? = null

    /**
     * @param value The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
     *  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
     */
    @JvmName("ynbkppdbysuakreo")
    public suspend fun dimensions(`value`: Output>) {
        this.dimensions = value
    }

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

    /**
     * @param values The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
     *  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
     */
    @JvmName("fhlpduhsygmloqfs")
    public suspend fun dimensions(values: List>) {
        this.dimensions = Output.all(values)
    }

    /**
     * @param value The name of the metric.
     */
    @JvmName("perxsgryfqfkgnim")
    public suspend fun metricName(`value`: Output) {
        this.metricName = value
    }

    /**
     * @param value The namespace of the metric. For more information, see the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
     */
    @JvmName("scgfhvtxwfhyhcjp")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
     *  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
     */
    @JvmName("gdprraltcjllgrmo")
    public suspend fun dimensions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dimensions = mapped
    }

    /**
     * @param argument The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
     *  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
     */
    @JvmName("xqcwearrgvdhgtww")
    public suspend fun dimensions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ScalingPolicyTargetTrackingMetricDimensionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.dimensions = mapped
    }

    /**
     * @param argument The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
     *  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
     */
    @JvmName("jqejwuroqcdjrnxw")
    public suspend fun dimensions(vararg argument: suspend ScalingPolicyTargetTrackingMetricDimensionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ScalingPolicyTargetTrackingMetricDimensionArgsBuilder().applySuspend { it() }.build()
        }
        val mapped = of(toBeMapped)
        this.dimensions = mapped
    }

    /**
     * @param argument The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
     *  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
     */
    @JvmName("vkqsrrhbfetxwgqi")
    public suspend fun dimensions(argument: suspend ScalingPolicyTargetTrackingMetricDimensionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ScalingPolicyTargetTrackingMetricDimensionArgsBuilder().applySuspend {
                argument()
            }.build(),
        )
        val mapped = of(toBeMapped)
        this.dimensions = mapped
    }

    /**
     * @param values The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
     *  Conditional: If you published your metric with dimensions, you must specify the same dimensions in your scaling policy.
     */
    @JvmName("bcxpvkoohcokocbq")
    public suspend fun dimensions(vararg values: ScalingPolicyTargetTrackingMetricDimensionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dimensions = mapped
    }

    /**
     * @param value The name of the metric.
     */
    @JvmName("gxxwfvfywdtwesby")
    public suspend fun metricName(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.metricName = mapped
    }

    /**
     * @param value The namespace of the metric. For more information, see the table in [services that publish CloudWatch metrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/aws-services-cloudwatch-metrics.html) in the *Amazon CloudWatch User Guide*.
     */
    @JvmName("gvndbnpiwqlpuaea")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    internal fun build(): ScalingPolicyTargetTrackingMetricArgs =
        ScalingPolicyTargetTrackingMetricArgs(
            dimensions = dimensions,
            metricName = metricName,
            namespace = namespace,
        )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy