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

com.pulumi.awsnative.cloudwatch.kotlin.inputs.AlarmMetricArgs.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: 1.11.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.awsnative.cloudwatch.kotlin.inputs

import com.pulumi.awsnative.cloudwatch.inputs.AlarmMetricArgs.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

/**
 * The ``Metric`` property type represents a specific metric. ``Metric`` is a property of the [MetricStat](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-cloudwatch-alarm-metricstat.html) property type.
 * @property dimensions The metric dimensions that you want to be used for the metric that the alarm will watch.
 * @property metricName The name of the metric that you want the alarm to watch. This is a required field.
 * @property namespace The namespace of the metric that the alarm will watch.
 */
public data class AlarmMetricArgs(
    public val dimensions: Output>? = null,
    public val metricName: Output? = null,
    public val namespace: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.awsnative.cloudwatch.inputs.AlarmMetricArgs =
        com.pulumi.awsnative.cloudwatch.inputs.AlarmMetricArgs.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 [AlarmMetricArgs].
 */
@PulumiTagMarker
public class AlarmMetricArgsBuilder internal constructor() {
    private var dimensions: Output>? = null

    private var metricName: Output? = null

    private var namespace: Output? = null

    /**
     * @param value The metric dimensions that you want to be used for the metric that the alarm will watch.
     */
    @JvmName("gffjqpojvqdnyapb")
    public suspend fun dimensions(`value`: Output>) {
        this.dimensions = value
    }

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

    /**
     * @param values The metric dimensions that you want to be used for the metric that the alarm will watch.
     */
    @JvmName("qsdqplyumtfekxpw")
    public suspend fun dimensions(values: List>) {
        this.dimensions = Output.all(values)
    }

    /**
     * @param value The name of the metric that you want the alarm to watch. This is a required field.
     */
    @JvmName("rjjuubcymirgvkks")
    public suspend fun metricName(`value`: Output) {
        this.metricName = value
    }

    /**
     * @param value The namespace of the metric that the alarm will watch.
     */
    @JvmName("vmoullmmqbbwmdep")
    public suspend fun namespace(`value`: Output) {
        this.namespace = value
    }

    /**
     * @param value The metric dimensions that you want to be used for the metric that the alarm will watch.
     */
    @JvmName("egeqgdfqjbkbgypr")
    public suspend fun dimensions(`value`: List?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.dimensions = mapped
    }

    /**
     * @param argument The metric dimensions that you want to be used for the metric that the alarm will watch.
     */
    @JvmName("scejmaqrvetfeiwi")
    public suspend fun dimensions(argument: List Unit>) {
        val toBeMapped = argument.toList().map {
            AlarmDimensionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dimensions = mapped
    }

    /**
     * @param argument The metric dimensions that you want to be used for the metric that the alarm will watch.
     */
    @JvmName("jdtlhtcrvhatbpgg")
    public suspend fun dimensions(vararg argument: suspend AlarmDimensionArgsBuilder.() -> Unit) {
        val toBeMapped = argument.toList().map {
            AlarmDimensionArgsBuilder().applySuspend {
                it()
            }.build()
        }
        val mapped = of(toBeMapped)
        this.dimensions = mapped
    }

    /**
     * @param argument The metric dimensions that you want to be used for the metric that the alarm will watch.
     */
    @JvmName("rhyqhrpraqtmuikb")
    public suspend fun dimensions(argument: suspend AlarmDimensionArgsBuilder.() -> Unit) {
        val toBeMapped = listOf(AlarmDimensionArgsBuilder().applySuspend { argument() }.build())
        val mapped = of(toBeMapped)
        this.dimensions = mapped
    }

    /**
     * @param values The metric dimensions that you want to be used for the metric that the alarm will watch.
     */
    @JvmName("nepltvxfdimvihjx")
    public suspend fun dimensions(vararg values: AlarmDimensionArgs) {
        val toBeMapped = values.toList()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.dimensions = mapped
    }

    /**
     * @param value The name of the metric that you want the alarm to watch. This is a required field.
     */
    @JvmName("iitniglrgtyvbtvt")
    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 that the alarm will watch.
     */
    @JvmName("lcsinxsjjnwjhwyc")
    public suspend fun namespace(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.namespace = mapped
    }

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy