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

com.pulumi.awsnative.autoscaling.kotlin.inputs.ScalingPolicyMetricArgs.kt Maven / Gradle / Ivy

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

package com.pulumi.awsnative.autoscaling.kotlin.inputs

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

/**
 *
 * @property dimensions The dimensions for the metric. For the list of available dimensions, see the AWS documentation available from the table in [AWS 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 [AWS 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 ScalingPolicyMetricArgs(
    public val dimensions: Output>? = null,
    public val metricName: Output,
    public val namespace: Output,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.autoscaling.inputs.ScalingPolicyMetricArgs =
        com.pulumi.awsnative.autoscaling.inputs.ScalingPolicyMetricArgs.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 [ScalingPolicyMetricArgs].
 */
@PulumiTagMarker
public class ScalingPolicyMetricArgsBuilder 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 [AWS 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("njfskdaesougnobl")
    public suspend fun dimensions(`value`: Output>) {
        this.dimensions = value
    }

    @JvmName("kuhnjsxvhpcmgvhq")
    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 [AWS 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("uybuejewnstgrbcg")
    public suspend fun dimensions(values: List>) {
        this.dimensions = Output.all(values)
    }

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

    /**
     * @param value The namespace of the metric. For more information, see the table in [AWS 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("ddukywtjclrffqfn")
    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 [AWS 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("hhctusqkrwjrortk")
    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 [AWS 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("ctpqpacgpsjdddlo")
    public suspend fun dimensions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            ScalingPolicyMetricDimensionArgsBuilder().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 [AWS 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("evfassslrmbnfufj")
    public suspend fun dimensions(vararg argument: suspend ScalingPolicyMetricDimensionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            ScalingPolicyMetricDimensionArgsBuilder().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 [AWS 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("gsbmoprxikwtajnd")
    public suspend fun dimensions(argument: suspend ScalingPolicyMetricDimensionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(
            ScalingPolicyMetricDimensionArgsBuilder().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 [AWS 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("snsgaajrsdmalvua")
    public suspend fun dimensions(vararg values: ScalingPolicyMetricDimensionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dimensions = mapped
    }

    /**
     * @param value The name of the metric.
     */
    @JvmName("sjfpuvxeovfiyvuj")
    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 [AWS 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("ogujnukktcvohwmt")
    public suspend fun namespace(`value`: String) {
        val toBeMapped = value
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

    internal fun build(): ScalingPolicyMetricArgs = ScalingPolicyMetricArgs(
        dimensions = dimensions,
        metricName = metricName ?: throw PulumiNullFieldException("metricName"),
        namespace = namespace ?: throw PulumiNullFieldException("namespace"),
    )
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy