Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Build cloud applications and infrastructure by combining the safety and reliability of infrastructure as code with the power of the Kotlin programming language.
@file:Suppress("NAME_SHADOWING", "DEPRECATION")
package com.pulumi.alicloud.arms.kotlin
import com.pulumi.alicloud.arms.PrometheusAlertRuleArgs.builder
import com.pulumi.alicloud.arms.kotlin.inputs.PrometheusAlertRuleAnnotationArgs
import com.pulumi.alicloud.arms.kotlin.inputs.PrometheusAlertRuleAnnotationArgsBuilder
import com.pulumi.alicloud.arms.kotlin.inputs.PrometheusAlertRuleLabelArgs
import com.pulumi.alicloud.arms.kotlin.inputs.PrometheusAlertRuleLabelArgsBuilder
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
/**
* Provides a Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule resource.
* For information about Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule and how to use it, see [What is Prometheus Alert Rule](https://www.alibabacloud.com/help/en/doc-detail/212056.htm).
* > **NOTE:** Available since v1.136.0.
* ## Import
* Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule can be imported using the id, e.g.
* ```sh
* $ pulumi import alicloud:arms/prometheusAlertRule:PrometheusAlertRule example :
* ```
* @property annotations The annotations of the alert rule. See `annotations` below.
* @property clusterId The ID of the cluster.
* @property dispatchRuleId The ID of the notification policy. This parameter is required when the `notify_type` parameter is set to `DISPATCH_RULE`.
* @property duration The duration of the alert.
* @property expression The alert rule expression that follows the PromQL syntax.
* @property labels The labels of the resource. See `labels` below.
* @property message The message of the alert notification.
* @property notifyType The method of sending the alert notification. Valid values: `ALERT_MANAGER`, `DISPATCH_RULE`.
* @property prometheusAlertRuleName The name of the resource.
* @property type The type of the alert rule.
*/
public data class PrometheusAlertRuleArgs(
public val annotations: Output>? = null,
public val clusterId: Output? = null,
public val dispatchRuleId: Output? = null,
public val duration: Output? = null,
public val expression: Output? = null,
public val labels: Output>? = null,
public val message: Output? = null,
public val notifyType: Output? = null,
public val prometheusAlertRuleName: Output? = null,
public val type: Output? = null,
) : ConvertibleToJava {
override fun toJava(): com.pulumi.alicloud.arms.PrometheusAlertRuleArgs =
com.pulumi.alicloud.arms.PrometheusAlertRuleArgs.builder()
.annotations(
annotations?.applyValue({ args0 ->
args0.map({ args0 ->
args0.let({ args0 ->
args0.toJava()
})
})
}),
)
.clusterId(clusterId?.applyValue({ args0 -> args0 }))
.dispatchRuleId(dispatchRuleId?.applyValue({ args0 -> args0 }))
.duration(duration?.applyValue({ args0 -> args0 }))
.expression(expression?.applyValue({ args0 -> args0 }))
.labels(labels?.applyValue({ args0 -> args0.map({ args0 -> args0.let({ args0 -> args0.toJava() }) }) }))
.message(message?.applyValue({ args0 -> args0 }))
.notifyType(notifyType?.applyValue({ args0 -> args0 }))
.prometheusAlertRuleName(prometheusAlertRuleName?.applyValue({ args0 -> args0 }))
.type(type?.applyValue({ args0 -> args0 })).build()
}
/**
* Builder for [PrometheusAlertRuleArgs].
*/
@PulumiTagMarker
public class PrometheusAlertRuleArgsBuilder internal constructor() {
private var annotations: Output>? = null
private var clusterId: Output? = null
private var dispatchRuleId: Output? = null
private var duration: Output? = null
private var expression: Output? = null
private var labels: Output>? = null
private var message: Output? = null
private var notifyType: Output? = null
private var prometheusAlertRuleName: Output? = null
private var type: Output? = null
/**
* @param value The annotations of the alert rule. See `annotations` below.
*/
@JvmName("cbeauyefkrsvnstj")
public suspend fun annotations(`value`: Output>) {
this.annotations = value
}
@JvmName("vtwoerscriaxxdly")
public suspend fun annotations(vararg values: Output) {
this.annotations = Output.all(values.asList())
}
/**
* @param values The annotations of the alert rule. See `annotations` below.
*/
@JvmName("wqymvxmbpvbbcbuk")
public suspend fun annotations(values: List