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

com.pulumi.azure.monitoring.kotlin.outputs.AlertPrometheusRuleGroupRule.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.14.0.0
Show newest version
@file:Suppress("NAME_SHADOWING", "DEPRECATION")

package com.pulumi.azure.monitoring.kotlin.outputs

import kotlin.Boolean
import kotlin.Int
import kotlin.String
import kotlin.Suppress
import kotlin.collections.List
import kotlin.collections.Map

/**
 *
 * @property actions An `action` block as defined below.
 * @property alert Specifies the Alert rule name.
 * @property alertResolution An `alert_resolution` block as defined below.
 * @property annotations Specifies a set of informational labels that can be used to store longer additional information such as alert descriptions or runbook links.
 * @property enabled Is this rule enabled? Possible values are `true` and `false`.
 * @property expression Specifies the Prometheus Query Language expression to evaluate. For more details see [this doc](https://prometheus.io/docs/prometheus/latest/querying/basics). Evaluate at the period given by `interval` and record the result as a new set of time series with the metric name given by `record`.
 * @property for Specifies the amount of time alert must be active before firing, represented in ISO 8601 duration format.
 * @property labels Specifies the labels to add or overwrite before storing the result.
 * @property record Specifies the recorded metrics name.
 * @property severity Specifies the severity of the alerts fired by the rule. Possible values are between 0 and 4.
 */
public data class AlertPrometheusRuleGroupRule(
    public val actions: List? = null,
    public val alert: String? = null,
    public val alertResolution: AlertPrometheusRuleGroupRuleAlertResolution? = null,
    public val annotations: Map? = null,
    public val enabled: Boolean? = null,
    public val expression: String,
    public val `for`: String? = null,
    public val labels: Map? = null,
    public val record: String? = null,
    public val severity: Int? = null,
) {
    public companion object {
        public fun toKotlin(javaType: com.pulumi.azure.monitoring.outputs.AlertPrometheusRuleGroupRule):
            AlertPrometheusRuleGroupRule = AlertPrometheusRuleGroupRule(
            actions = javaType.actions().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.azure.monitoring.kotlin.outputs.AlertPrometheusRuleGroupRuleAction.Companion.toKotlin(args0)
                })
            }),
            alert = javaType.alert().map({ args0 -> args0 }).orElse(null),
            alertResolution = javaType.alertResolution().map({ args0 ->
                args0.let({ args0 ->
                    com.pulumi.azure.monitoring.kotlin.outputs.AlertPrometheusRuleGroupRuleAlertResolution.Companion.toKotlin(args0)
                })
            }).orElse(null),
            annotations = javaType.annotations().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            enabled = javaType.enabled().map({ args0 -> args0 }).orElse(null),
            expression = javaType.expression(),
            `for` = javaType.for_().map({ args0 -> args0 }).orElse(null),
            labels = javaType.labels().map({ args0 -> args0.key.to(args0.value) }).toMap(),
            record = javaType.record().map({ args0 -> args0 }).orElse(null),
            severity = javaType.severity().map({ args0 -> args0 }).orElse(null),
        )
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy