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

com.pulumi.alicloud.cms.kotlin.inputs.AlarmPrometheusArgs.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: 3.62.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.alicloud.cms.kotlin.inputs

import com.pulumi.alicloud.cms.inputs.AlarmPrometheusArgs.builder
import com.pulumi.core.Output
import com.pulumi.core.Output.of
import com.pulumi.kotlin.ConvertibleToJava
import com.pulumi.kotlin.PulumiTagMarker
import kotlin.Int
import kotlin.Pair
import kotlin.String
import kotlin.Suppress
import kotlin.collections.Map
import kotlin.jvm.JvmName

/**
 *
 * @property annotations The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
 * @property level The level of the alert. Valid values: `Critical`, `Warn`, `Info`.
 * @property promQl The PromQL query statement. **Note:** The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
 * @property times The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
 */
public data class AlarmPrometheusArgs(
    public val annotations: Output>? = null,
    public val level: Output? = null,
    public val promQl: Output? = null,
    public val times: Output? = null,
) : ConvertibleToJava {
    override fun toJava(): com.pulumi.alicloud.cms.inputs.AlarmPrometheusArgs =
        com.pulumi.alicloud.cms.inputs.AlarmPrometheusArgs.builder()
            .annotations(
                annotations?.applyValue({ args0 ->
                    args0.map({ args0 ->
                        args0.key.to(args0.value)
                    }).toMap()
                }),
            )
            .level(level?.applyValue({ args0 -> args0 }))
            .promQl(promQl?.applyValue({ args0 -> args0 }))
            .times(times?.applyValue({ args0 -> args0 })).build()
}

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

    private var level: Output? = null

    private var promQl: Output? = null

    private var times: Output? = null

    /**
     * @param value The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
     */
    @JvmName("ilskwmjopcqplqrt")
    public suspend fun annotations(`value`: Output>) {
        this.annotations = value
    }

    /**
     * @param value The level of the alert. Valid values: `Critical`, `Warn`, `Info`.
     */
    @JvmName("rqdolloafoipwmbk")
    public suspend fun level(`value`: Output) {
        this.level = value
    }

    /**
     * @param value The PromQL query statement. **Note:** The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
     */
    @JvmName("mjivxcdccieouiva")
    public suspend fun promQl(`value`: Output) {
        this.promQl = value
    }

    /**
     * @param value The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
     */
    @JvmName("ilorqbxxsmoiqchj")
    public suspend fun times(`value`: Output) {
        this.times = value
    }

    /**
     * @param value The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
     */
    @JvmName("jdsfwhpertqfkdhy")
    public suspend fun annotations(`value`: Map?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param values The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.
     */
    @JvmName("lufrmqyryhytuuvy")
    public fun annotations(vararg values: Pair) {
        val toBeMapped = values.toMap()
        val mapped = toBeMapped.let({ args0 -> of(args0) })
        this.annotations = mapped
    }

    /**
     * @param value The level of the alert. Valid values: `Critical`, `Warn`, `Info`.
     */
    @JvmName("cgienukogisgrjfo")
    public suspend fun level(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.level = mapped
    }

    /**
     * @param value The PromQL query statement. **Note:** The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.
     */
    @JvmName("picovwnvhonjncvy")
    public suspend fun promQl(`value`: String?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.promQl = mapped
    }

    /**
     * @param value The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.
     */
    @JvmName("ahktjlxspsrsqhjy")
    public suspend fun times(`value`: Int?) {
        val toBeMapped = value
        val mapped = toBeMapped?.let({ args0 -> of(args0) })
        this.times = mapped
    }

    internal fun build(): AlarmPrometheusArgs = AlarmPrometheusArgs(
        annotations = annotations,
        level = level,
        promQl = promQl,
        times = times,
    )
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy