alicloud.arms.PrometheusAlertRule
Explore with Pulumi AI
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.
NOTE: Available since v1.136.0.
Example Usage
Basic Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
import * as random from "@pulumi/random";
const config = new pulumi.Config();
const name = config.get("name") || "tf-example";
const _default = new random.index.Integer("default", {
min: 10000,
max: 99999,
});
const defaultPrometheus = new alicloud.arms.Prometheus("default", {
clusterType: "remote-write",
clusterName: `${name}-${_default.result}`,
grafanaInstanceId: "free",
});
const example = new alicloud.arms.PrometheusAlertRule("example", {
clusterId: defaultPrometheus.clusterId,
duration: "1",
expression: "node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10",
message: "node available memory is less than 10%",
prometheusAlertRuleName: name,
notifyType: "ALERT_MANAGER",
});
import pulumi
import pulumi_alicloud as alicloud
import pulumi_random as random
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "tf-example"
default = random.index.Integer("default",
min=10000,
max=99999)
default_prometheus = alicloud.arms.Prometheus("default",
cluster_type="remote-write",
cluster_name=f"{name}-{default['result']}",
grafana_instance_id="free")
example = alicloud.arms.PrometheusAlertRule("example",
cluster_id=default_prometheus.cluster_id,
duration="1",
expression="node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10",
message="node available memory is less than 10%",
prometheus_alert_rule_name=name,
notify_type="ALERT_MANAGER")
package main
import (
"fmt"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/arms"
"github.com/pulumi/pulumi-random/sdk/v4/go/random"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
cfg := config.New(ctx, "")
name := "tf-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_, err := random.NewInteger(ctx, "default", &random.IntegerArgs{
Min: 10000,
Max: 99999,
})
if err != nil {
return err
}
defaultPrometheus, err := arms.NewPrometheus(ctx, "default", &arms.PrometheusArgs{
ClusterType: pulumi.String("remote-write"),
ClusterName: pulumi.Sprintf("%v-%v", name, _default.Result),
GrafanaInstanceId: pulumi.String("free"),
})
if err != nil {
return err
}
_, err = arms.NewPrometheusAlertRule(ctx, "example", &arms.PrometheusAlertRuleArgs{
ClusterId: defaultPrometheus.ClusterId,
Duration: pulumi.String("1"),
Expression: pulumi.String("node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10"),
Message: pulumi.String("node available memory is less than 10%"),
PrometheusAlertRuleName: pulumi.String(name),
NotifyType: pulumi.String("ALERT_MANAGER"),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
using Random = Pulumi.Random;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "tf-example";
var @default = new Random.Index.Integer("default", new()
{
Min = 10000,
Max = 99999,
});
var defaultPrometheus = new AliCloud.Arms.Prometheus("default", new()
{
ClusterType = "remote-write",
ClusterName = $"{name}-{@default.Result}",
GrafanaInstanceId = "free",
});
var example = new AliCloud.Arms.PrometheusAlertRule("example", new()
{
ClusterId = defaultPrometheus.ClusterId,
Duration = "1",
Expression = "node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10",
Message = "node available memory is less than 10%",
PrometheusAlertRuleName = name,
NotifyType = "ALERT_MANAGER",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.random.integer;
import com.pulumi.random.IntegerArgs;
import com.pulumi.alicloud.arms.Prometheus;
import com.pulumi.alicloud.arms.PrometheusArgs;
import com.pulumi.alicloud.arms.PrometheusAlertRule;
import com.pulumi.alicloud.arms.PrometheusAlertRuleArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var config = ctx.config();
final var name = config.get("name").orElse("tf-example");
var default_ = new Integer("default", IntegerArgs.builder()
.min(10000)
.max(99999)
.build());
var defaultPrometheus = new Prometheus("defaultPrometheus", PrometheusArgs.builder()
.clusterType("remote-write")
.clusterName(String.format("%s-%s", name,default_.result()))
.grafanaInstanceId("free")
.build());
var example = new PrometheusAlertRule("example", PrometheusAlertRuleArgs.builder()
.clusterId(defaultPrometheus.clusterId())
.duration(1)
.expression("node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10")
.message("node available memory is less than 10%")
.prometheusAlertRuleName(name)
.notifyType("ALERT_MANAGER")
.build());
}
}
configuration:
name:
type: string
default: tf-example
resources:
default:
type: random:integer
properties:
min: 10000
max: 99999
defaultPrometheus:
type: alicloud:arms:Prometheus
name: default
properties:
clusterType: remote-write
clusterName: ${name}-${default.result}
grafanaInstanceId: free
example:
type: alicloud:arms:PrometheusAlertRule
properties:
clusterId: ${defaultPrometheus.clusterId}
duration: 1
expression: node_memory_MemAvailable_bytes / node_memory_MemTotal_bytes * 100 < 10
message: node available memory is less than 10%
prometheusAlertRuleName: ${name}
notifyType: ALERT_MANAGER
Create PrometheusAlertRule Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new PrometheusAlertRule(name: string, args: PrometheusAlertRuleArgs, opts?: CustomResourceOptions);
@overload
def PrometheusAlertRule(resource_name: str,
args: PrometheusAlertRuleArgs,
opts: Optional[ResourceOptions] = None)
@overload
def PrometheusAlertRule(resource_name: str,
opts: Optional[ResourceOptions] = None,
cluster_id: Optional[str] = None,
duration: Optional[str] = None,
expression: Optional[str] = None,
message: Optional[str] = None,
prometheus_alert_rule_name: Optional[str] = None,
annotations: Optional[Sequence[PrometheusAlertRuleAnnotationArgs]] = None,
dispatch_rule_id: Optional[str] = None,
labels: Optional[Sequence[PrometheusAlertRuleLabelArgs]] = None,
notify_type: Optional[str] = None,
type: Optional[str] = None)
func NewPrometheusAlertRule(ctx *Context, name string, args PrometheusAlertRuleArgs, opts ...ResourceOption) (*PrometheusAlertRule, error)
public PrometheusAlertRule(string name, PrometheusAlertRuleArgs args, CustomResourceOptions? opts = null)
public PrometheusAlertRule(String name, PrometheusAlertRuleArgs args)
public PrometheusAlertRule(String name, PrometheusAlertRuleArgs args, CustomResourceOptions options)
type: alicloud:arms:PrometheusAlertRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args PrometheusAlertRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args PrometheusAlertRuleArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args PrometheusAlertRuleArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args PrometheusAlertRuleArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args PrometheusAlertRuleArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var prometheusAlertRuleResource = new AliCloud.Arms.PrometheusAlertRule("prometheusAlertRuleResource", new()
{
ClusterId = "string",
Duration = "string",
Expression = "string",
Message = "string",
PrometheusAlertRuleName = "string",
Annotations = new[]
{
new AliCloud.Arms.Inputs.PrometheusAlertRuleAnnotationArgs
{
Name = "string",
Value = "string",
},
},
DispatchRuleId = "string",
Labels = new[]
{
new AliCloud.Arms.Inputs.PrometheusAlertRuleLabelArgs
{
Name = "string",
Value = "string",
},
},
NotifyType = "string",
Type = "string",
});
example, err := arms.NewPrometheusAlertRule(ctx, "prometheusAlertRuleResource", &arms.PrometheusAlertRuleArgs{
ClusterId: pulumi.String("string"),
Duration: pulumi.String("string"),
Expression: pulumi.String("string"),
Message: pulumi.String("string"),
PrometheusAlertRuleName: pulumi.String("string"),
Annotations: arms.PrometheusAlertRuleAnnotationArray{
&arms.PrometheusAlertRuleAnnotationArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
DispatchRuleId: pulumi.String("string"),
Labels: arms.PrometheusAlertRuleLabelArray{
&arms.PrometheusAlertRuleLabelArgs{
Name: pulumi.String("string"),
Value: pulumi.String("string"),
},
},
NotifyType: pulumi.String("string"),
Type: pulumi.String("string"),
})
var prometheusAlertRuleResource = new PrometheusAlertRule("prometheusAlertRuleResource", PrometheusAlertRuleArgs.builder()
.clusterId("string")
.duration("string")
.expression("string")
.message("string")
.prometheusAlertRuleName("string")
.annotations(PrometheusAlertRuleAnnotationArgs.builder()
.name("string")
.value("string")
.build())
.dispatchRuleId("string")
.labels(PrometheusAlertRuleLabelArgs.builder()
.name("string")
.value("string")
.build())
.notifyType("string")
.type("string")
.build());
prometheus_alert_rule_resource = alicloud.arms.PrometheusAlertRule("prometheusAlertRuleResource",
cluster_id="string",
duration="string",
expression="string",
message="string",
prometheus_alert_rule_name="string",
annotations=[{
"name": "string",
"value": "string",
}],
dispatch_rule_id="string",
labels=[{
"name": "string",
"value": "string",
}],
notify_type="string",
type="string")
const prometheusAlertRuleResource = new alicloud.arms.PrometheusAlertRule("prometheusAlertRuleResource", {
clusterId: "string",
duration: "string",
expression: "string",
message: "string",
prometheusAlertRuleName: "string",
annotations: [{
name: "string",
value: "string",
}],
dispatchRuleId: "string",
labels: [{
name: "string",
value: "string",
}],
notifyType: "string",
type: "string",
});
type: alicloud:arms:PrometheusAlertRule
properties:
annotations:
- name: string
value: string
clusterId: string
dispatchRuleId: string
duration: string
expression: string
labels:
- name: string
value: string
message: string
notifyType: string
prometheusAlertRuleName: string
type: string
PrometheusAlertRule Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The PrometheusAlertRule resource accepts the following input properties:
- Cluster
Id string - The ID of the cluster.
- Duration string
- The duration of the alert.
- Expression string
- The alert rule expression that follows the PromQL syntax.
- Message string
- The message of the alert notification.
- Prometheus
Alert stringRule Name - The name of the resource.
- Annotations
List<Pulumi.
Ali Cloud. Arms. Inputs. Prometheus Alert Rule Annotation> - The annotations of the alert rule. See
annotations
below. - Dispatch
Rule stringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - Labels
List<Pulumi.
Ali Cloud. Arms. Inputs. Prometheus Alert Rule Label> - The labels of the resource. See
labels
below. - Notify
Type string - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - Type string
- The type of the alert rule.
- Cluster
Id string - The ID of the cluster.
- Duration string
- The duration of the alert.
- Expression string
- The alert rule expression that follows the PromQL syntax.
- Message string
- The message of the alert notification.
- Prometheus
Alert stringRule Name - The name of the resource.
- Annotations
[]Prometheus
Alert Rule Annotation Args - The annotations of the alert rule. See
annotations
below. - Dispatch
Rule stringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - Labels
[]Prometheus
Alert Rule Label Args - The labels of the resource. See
labels
below. - Notify
Type string - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - Type string
- The type of the alert rule.
- cluster
Id String - The ID of the cluster.
- duration String
- The duration of the alert.
- expression String
- The alert rule expression that follows the PromQL syntax.
- message String
- The message of the alert notification.
- prometheus
Alert StringRule Name - The name of the resource.
- annotations
List<Prometheus
Alert Rule Annotation> - The annotations of the alert rule. See
annotations
below. - dispatch
Rule StringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - labels
List<Prometheus
Alert Rule Label> - The labels of the resource. See
labels
below. - notify
Type String - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - type String
- The type of the alert rule.
- cluster
Id string - The ID of the cluster.
- duration string
- The duration of the alert.
- expression string
- The alert rule expression that follows the PromQL syntax.
- message string
- The message of the alert notification.
- prometheus
Alert stringRule Name - The name of the resource.
- annotations
Prometheus
Alert Rule Annotation[] - The annotations of the alert rule. See
annotations
below. - dispatch
Rule stringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - labels
Prometheus
Alert Rule Label[] - The labels of the resource. See
labels
below. - notify
Type string - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - type string
- The type of the alert rule.
- cluster_
id str - The ID of the cluster.
- duration str
- The duration of the alert.
- expression str
- The alert rule expression that follows the PromQL syntax.
- message str
- The message of the alert notification.
- prometheus_
alert_ strrule_ name - The name of the resource.
- annotations
Sequence[Prometheus
Alert Rule Annotation Args] - The annotations of the alert rule. See
annotations
below. - dispatch_
rule_ strid - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - labels
Sequence[Prometheus
Alert Rule Label Args] - The labels of the resource. See
labels
below. - notify_
type str - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - type str
- The type of the alert rule.
- cluster
Id String - The ID of the cluster.
- duration String
- The duration of the alert.
- expression String
- The alert rule expression that follows the PromQL syntax.
- message String
- The message of the alert notification.
- prometheus
Alert StringRule Name - The name of the resource.
- annotations List<Property Map>
- The annotations of the alert rule. See
annotations
below. - dispatch
Rule StringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - labels List<Property Map>
- The labels of the resource. See
labels
below. - notify
Type String - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - type String
- The type of the alert rule.
Outputs
All input properties are implicitly available as output properties. Additionally, the PrometheusAlertRule resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Prometheus
Alert intRule Id - The first ID of the resource.
- Status int
- The status of the resource. Valid values:
0
,1
.
- Id string
- The provider-assigned unique ID for this managed resource.
- Prometheus
Alert intRule Id - The first ID of the resource.
- Status int
- The status of the resource. Valid values:
0
,1
.
- id String
- The provider-assigned unique ID for this managed resource.
- prometheus
Alert IntegerRule Id - The first ID of the resource.
- status Integer
- The status of the resource. Valid values:
0
,1
.
- id string
- The provider-assigned unique ID for this managed resource.
- prometheus
Alert numberRule Id - The first ID of the resource.
- status number
- The status of the resource. Valid values:
0
,1
.
- id str
- The provider-assigned unique ID for this managed resource.
- prometheus_
alert_ intrule_ id - The first ID of the resource.
- status int
- The status of the resource. Valid values:
0
,1
.
- id String
- The provider-assigned unique ID for this managed resource.
- prometheus
Alert NumberRule Id - The first ID of the resource.
- status Number
- The status of the resource. Valid values:
0
,1
.
Look up Existing PrometheusAlertRule Resource
Get an existing PrometheusAlertRule resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: PrometheusAlertRuleState, opts?: CustomResourceOptions): PrometheusAlertRule
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
annotations: Optional[Sequence[PrometheusAlertRuleAnnotationArgs]] = None,
cluster_id: Optional[str] = None,
dispatch_rule_id: Optional[str] = None,
duration: Optional[str] = None,
expression: Optional[str] = None,
labels: Optional[Sequence[PrometheusAlertRuleLabelArgs]] = None,
message: Optional[str] = None,
notify_type: Optional[str] = None,
prometheus_alert_rule_id: Optional[int] = None,
prometheus_alert_rule_name: Optional[str] = None,
status: Optional[int] = None,
type: Optional[str] = None) -> PrometheusAlertRule
func GetPrometheusAlertRule(ctx *Context, name string, id IDInput, state *PrometheusAlertRuleState, opts ...ResourceOption) (*PrometheusAlertRule, error)
public static PrometheusAlertRule Get(string name, Input<string> id, PrometheusAlertRuleState? state, CustomResourceOptions? opts = null)
public static PrometheusAlertRule get(String name, Output<String> id, PrometheusAlertRuleState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Annotations
List<Pulumi.
Ali Cloud. Arms. Inputs. Prometheus Alert Rule Annotation> - The annotations of the alert rule. See
annotations
below. - Cluster
Id string - The ID of the cluster.
- Dispatch
Rule stringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - Duration string
- The duration of the alert.
- Expression string
- The alert rule expression that follows the PromQL syntax.
- Labels
List<Pulumi.
Ali Cloud. Arms. Inputs. Prometheus Alert Rule Label> - The labels of the resource. See
labels
below. - Message string
- The message of the alert notification.
- Notify
Type string - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - Prometheus
Alert intRule Id - The first ID of the resource.
- Prometheus
Alert stringRule Name - The name of the resource.
- Status int
- The status of the resource. Valid values:
0
,1
. - Type string
- The type of the alert rule.
- Annotations
[]Prometheus
Alert Rule Annotation Args - The annotations of the alert rule. See
annotations
below. - Cluster
Id string - The ID of the cluster.
- Dispatch
Rule stringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - Duration string
- The duration of the alert.
- Expression string
- The alert rule expression that follows the PromQL syntax.
- Labels
[]Prometheus
Alert Rule Label Args - The labels of the resource. See
labels
below. - Message string
- The message of the alert notification.
- Notify
Type string - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - Prometheus
Alert intRule Id - The first ID of the resource.
- Prometheus
Alert stringRule Name - The name of the resource.
- Status int
- The status of the resource. Valid values:
0
,1
. - Type string
- The type of the alert rule.
- annotations
List<Prometheus
Alert Rule Annotation> - The annotations of the alert rule. See
annotations
below. - cluster
Id String - The ID of the cluster.
- dispatch
Rule StringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - duration String
- The duration of the alert.
- expression String
- The alert rule expression that follows the PromQL syntax.
- labels
List<Prometheus
Alert Rule Label> - The labels of the resource. See
labels
below. - message String
- The message of the alert notification.
- notify
Type String - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - prometheus
Alert IntegerRule Id - The first ID of the resource.
- prometheus
Alert StringRule Name - The name of the resource.
- status Integer
- The status of the resource. Valid values:
0
,1
. - type String
- The type of the alert rule.
- annotations
Prometheus
Alert Rule Annotation[] - The annotations of the alert rule. See
annotations
below. - cluster
Id string - The ID of the cluster.
- dispatch
Rule stringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - duration string
- The duration of the alert.
- expression string
- The alert rule expression that follows the PromQL syntax.
- labels
Prometheus
Alert Rule Label[] - The labels of the resource. See
labels
below. - message string
- The message of the alert notification.
- notify
Type string - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - prometheus
Alert numberRule Id - The first ID of the resource.
- prometheus
Alert stringRule Name - The name of the resource.
- status number
- The status of the resource. Valid values:
0
,1
. - type string
- The type of the alert rule.
- annotations
Sequence[Prometheus
Alert Rule Annotation Args] - The annotations of the alert rule. See
annotations
below. - cluster_
id str - The ID of the cluster.
- dispatch_
rule_ strid - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - duration str
- The duration of the alert.
- expression str
- The alert rule expression that follows the PromQL syntax.
- labels
Sequence[Prometheus
Alert Rule Label Args] - The labels of the resource. See
labels
below. - message str
- The message of the alert notification.
- notify_
type str - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - prometheus_
alert_ intrule_ id - The first ID of the resource.
- prometheus_
alert_ strrule_ name - The name of the resource.
- status int
- The status of the resource. Valid values:
0
,1
. - type str
- The type of the alert rule.
- annotations List<Property Map>
- The annotations of the alert rule. See
annotations
below. - cluster
Id String - The ID of the cluster.
- dispatch
Rule StringId - The ID of the notification policy. This parameter is required when the
notify_type
parameter is set toDISPATCH_RULE
. - duration String
- The duration of the alert.
- expression String
- The alert rule expression that follows the PromQL syntax.
- labels List<Property Map>
- The labels of the resource. See
labels
below. - message String
- The message of the alert notification.
- notify
Type String - The method of sending the alert notification. Valid values:
ALERT_MANAGER
,DISPATCH_RULE
. - prometheus
Alert NumberRule Id - The first ID of the resource.
- prometheus
Alert StringRule Name - The name of the resource.
- status Number
- The status of the resource. Valid values:
0
,1
. - type String
- The type of the alert rule.
Supporting Types
PrometheusAlertRuleAnnotation, PrometheusAlertRuleAnnotationArgs
PrometheusAlertRuleLabel, PrometheusAlertRuleLabelArgs
Import
Application Real-Time Monitoring Service (ARMS) Prometheus Alert Rule can be imported using the id, e.g.
$ pulumi import alicloud:arms/prometheusAlertRule:PrometheusAlertRule example <cluster_id>:<prometheus_alert_rule_id>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloud
Terraform Provider.