published on Thursday, Jul 16, 2026 by Pulumi
published on Thursday, Jul 16, 2026 by Pulumi
This data source provides Cloud Monitor Service Metric Alarm Rule available to the user.What is Metric Alarm Rule
NOTE: Available since v1.256.0.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const _default = alicloud.ecs.getInstances({
status: "Running",
});
const defaultAlarmContactGroup = new alicloud.cms.AlarmContactGroup("default", {alarmContactGroupName: name});
const defaultAlarm = new alicloud.cms.Alarm("default", {
name: name,
project: "acs_ecs_dashboard",
metric: "disk_writebytes",
period: 900,
silenceTime: 300,
webhook: "https://www.aliyun.com",
enabled: true,
contactGroups: [defaultAlarmContactGroup.alarmContactGroupName],
effectiveInterval: "06:00-20:00",
metricDimensions: _default.then(_default => ` [
{
\"instanceId\": \"${_default.ids?.[0]}\",
\"device\": \"/dev/vda1\"
}
]
`),
escalationsCritical: {
statistics: "Average",
comparisonOperator: "<=",
threshold: "90",
times: 1,
},
escalationsInfo: {
statistics: "Minimum",
comparisonOperator: "!=",
threshold: "20",
times: 3,
},
escalationsWarn: {
statistics: "Average",
comparisonOperator: "==",
threshold: "30",
times: 5,
},
});
const ids = alicloud.cloudmonitor.getServiceMetricAlarmRulesOutput({
ids: [defaultAlarm.id],
});
export const cloudMonitorServiceMetricAlarmRulesId0 = ids.apply(ids => ids.rules?.[0]?.id);
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
default = alicloud.ecs.get_instances(status="Running")
default_alarm_contact_group = alicloud.cms.AlarmContactGroup("default", alarm_contact_group_name=name)
default_alarm = alicloud.cms.Alarm("default",
name=name,
project="acs_ecs_dashboard",
metric="disk_writebytes",
period=900,
silence_time=300,
webhook="https://www.aliyun.com",
enabled=True,
contact_groups=[default_alarm_contact_group.alarm_contact_group_name],
effective_interval="06:00-20:00",
metric_dimensions=f""" [
{{
\"instanceId\": \"{default.ids[0]}\",
\"device\": \"/dev/vda1\"
}}
]
""",
escalations_critical={
"statistics": "Average",
"comparison_operator": "<=",
"threshold": "90",
"times": 1,
},
escalations_info={
"statistics": "Minimum",
"comparison_operator": "!=",
"threshold": "20",
"times": 3,
},
escalations_warn={
"statistics": "Average",
"comparison_operator": "==",
"threshold": "30",
"times": 5,
})
ids = alicloud.cloudmonitor.get_service_metric_alarm_rules_output(ids=[default_alarm.id])
pulumi.export("cloudMonitorServiceMetricAlarmRulesId0", ids.rules[0].id)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cloudmonitor"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"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 := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := ecs.GetInstances(ctx, &ecs.GetInstancesArgs{
Status: pulumi.StringRef("Running"),
}, nil)
if err != nil {
return err
}
defaultAlarmContactGroup, err := cms.NewAlarmContactGroup(ctx, "default", &cms.AlarmContactGroupArgs{
AlarmContactGroupName: pulumi.String(name),
})
if err != nil {
return err
}
defaultAlarm, err := cms.NewAlarm(ctx, "default", &cms.AlarmArgs{
Name: pulumi.String(name),
Project: pulumi.String("acs_ecs_dashboard"),
Metric: pulumi.String("disk_writebytes"),
Period: pulumi.Int(900),
SilenceTime: pulumi.Int(300),
Webhook: pulumi.String("https://www.aliyun.com"),
Enabled: pulumi.Bool(true),
ContactGroups: pulumi.StringArray{
defaultAlarmContactGroup.AlarmContactGroupName,
},
EffectiveInterval: pulumi.String("06:00-20:00"),
MetricDimensions: pulumi.Sprintf(` [
{
\"instanceId\": \"%v\",
\"device\": \"/dev/vda1\"
}
]
`, _default.Ids[0]),
EscalationsCritical: &cms.AlarmEscalationsCriticalArgs{
Statistics: pulumi.String("Average"),
ComparisonOperator: pulumi.String("<="),
Threshold: pulumi.String("90"),
Times: pulumi.Int(1),
},
EscalationsInfo: &cms.AlarmEscalationsInfoArgs{
Statistics: pulumi.String("Minimum"),
ComparisonOperator: pulumi.String("!="),
Threshold: pulumi.String("20"),
Times: pulumi.Int(3),
},
EscalationsWarn: &cms.AlarmEscalationsWarnArgs{
Statistics: pulumi.String("Average"),
ComparisonOperator: pulumi.String("=="),
Threshold: pulumi.String("30"),
Times: pulumi.Int(5),
},
})
if err != nil {
return err
}
ids := cloudmonitor.GetServiceMetricAlarmRulesOutput(ctx, cloudmonitor.GetServiceMetricAlarmRulesOutputArgs{
Ids: pulumi.StringArray{
defaultAlarm.ID(),
},
}, nil)
ctx.Export("cloudMonitorServiceMetricAlarmRulesId0", ids.ApplyT(func(ids cloudmonitor.GetServiceMetricAlarmRulesResult) (*string, error) {
return ids.Rules[0].Id, nil
}).(pulumi.StringPtrOutput))
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var @default = AliCloud.Ecs.GetInstances.Invoke(new()
{
Status = "Running",
});
var defaultAlarmContactGroup = new AliCloud.Cms.AlarmContactGroup("default", new()
{
AlarmContactGroupName = name,
});
var defaultAlarm = new AliCloud.Cms.Alarm("default", new()
{
Name = name,
Project = "acs_ecs_dashboard",
Metric = "disk_writebytes",
Period = 900,
SilenceTime = 300,
Webhook = "https://www.aliyun.com",
Enabled = true,
ContactGroups = new[]
{
defaultAlarmContactGroup.AlarmContactGroupName,
},
EffectiveInterval = "06:00-20:00",
MetricDimensions = @default.Apply(@default => @$" [
{{
\""instanceId\"": \""{@default.Apply(getInstancesResult => getInstancesResult.Ids[0])}\"",
\""device\"": \""/dev/vda1\""
}}
]
"),
EscalationsCritical = new AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs
{
Statistics = "Average",
ComparisonOperator = "<=",
Threshold = "90",
Times = 1,
},
EscalationsInfo = new AliCloud.Cms.Inputs.AlarmEscalationsInfoArgs
{
Statistics = "Minimum",
ComparisonOperator = "!=",
Threshold = "20",
Times = 3,
},
EscalationsWarn = new AliCloud.Cms.Inputs.AlarmEscalationsWarnArgs
{
Statistics = "Average",
ComparisonOperator = "==",
Threshold = "30",
Times = 5,
},
});
var ids = AliCloud.CloudMonitor.GetServiceMetricAlarmRules.Invoke(new()
{
Ids = new[]
{
defaultAlarm.Id,
},
});
return new Dictionary<string, object?>
{
["cloudMonitorServiceMetricAlarmRulesId0"] = ids.Apply(getServiceMetricAlarmRulesResult => getServiceMetricAlarmRulesResult.Rules[0]?.Id),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.inputs.GetInstancesArgs;
import com.pulumi.alicloud.cms.AlarmContactGroup;
import com.pulumi.alicloud.cms.AlarmContactGroupArgs;
import com.pulumi.alicloud.cms.Alarm;
import com.pulumi.alicloud.cms.AlarmArgs;
import com.pulumi.alicloud.cms.inputs.AlarmEscalationsCriticalArgs;
import com.pulumi.alicloud.cms.inputs.AlarmEscalationsInfoArgs;
import com.pulumi.alicloud.cms.inputs.AlarmEscalationsWarnArgs;
import com.pulumi.alicloud.cloudmonitor.CloudmonitorFunctions;
import com.pulumi.alicloud.cloudmonitor.inputs.GetServiceMetricAlarmRulesArgs;
import java.util.ArrayList;
import java.util.Arrays;
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("terraform-example");
final var default = EcsFunctions.getInstances(GetInstancesArgs.builder()
.status("Running")
.build());
var defaultAlarmContactGroup = new AlarmContactGroup("defaultAlarmContactGroup", AlarmContactGroupArgs.builder()
.alarmContactGroupName(name)
.build());
var defaultAlarm = new Alarm("defaultAlarm", AlarmArgs.builder()
.name(name)
.project("acs_ecs_dashboard")
.metric("disk_writebytes")
.period(900)
.silenceTime(300)
.webhook("https://www.aliyun.com")
.enabled(true)
.contactGroups(defaultAlarmContactGroup.alarmContactGroupName())
.effectiveInterval("06:00-20:00")
.metricDimensions("""
[
{
\"instanceId\": \"%s\",
\"device\": \"/dev/vda1\"
}
]
", default_.ids()[0]))
.escalationsCritical(AlarmEscalationsCriticalArgs.builder()
.statistics("Average")
.comparisonOperator("<=")
.threshold("90")
.times(1)
.build())
.escalationsInfo(AlarmEscalationsInfoArgs.builder()
.statistics("Minimum")
.comparisonOperator("!=")
.threshold("20")
.times(3)
.build())
.escalationsWarn(AlarmEscalationsWarnArgs.builder()
.statistics("Average")
.comparisonOperator("==")
.threshold("30")
.times(5)
.build())
.build());
final var ids = CloudmonitorFunctions.getServiceMetricAlarmRules(GetServiceMetricAlarmRulesArgs.builder()
.ids(defaultAlarm.id())
.build());
ctx.export("cloudMonitorServiceMetricAlarmRulesId0", ids.applyValue(_ids -> _ids.rules()[0].id()));
}
}
configuration:
name:
type: string
default: terraform-example
resources:
defaultAlarmContactGroup:
type: alicloud:cms:AlarmContactGroup
name: default
properties:
alarmContactGroupName: ${name}
defaultAlarm:
type: alicloud:cms:Alarm
name: default
properties:
name: ${name}
project: acs_ecs_dashboard
metric: disk_writebytes
period: 900
silenceTime: 300
webhook: https://www.aliyun.com
enabled: true
contactGroups:
- ${defaultAlarmContactGroup.alarmContactGroupName}
effectiveInterval: 06:00-20:00
metricDimensions: |2
[
{
\"instanceId\": \"${default.ids[0]}\",
\"device\": \"/dev/vda1\"
}
]
escalationsCritical:
statistics: Average
comparisonOperator: <=
threshold: 90
times: 1
escalationsInfo:
statistics: Minimum
comparisonOperator: '!='
threshold: 20
times: 3
escalationsWarn:
statistics: Average
comparisonOperator: ==
threshold: 30
times: 5
variables:
default:
fn::invoke:
function: alicloud:ecs:getInstances
arguments:
status: Running
ids:
fn::invoke:
function: alicloud:cloudmonitor:getServiceMetricAlarmRules
arguments:
ids:
- ${defaultAlarm.id}
outputs:
cloudMonitorServiceMetricAlarmRulesId0: ${ids.rules[0].id}
pulumi {
required_providers {
alicloud = {
source = "pulumi/alicloud"
}
}
}
data "alicloud_ecs_getinstances" "default" {
status = "Running"
}
data "alicloud_cloudmonitor_getservicemetricalarmrules" "ids" {
ids = [alicloud_cms_alarm.default.id]
}
resource "alicloud_cms_alarmcontactgroup" "default" {
alarm_contact_group_name = var.name
}
resource "alicloud_cms_alarm" "default" {
name = var.name
project = "acs_ecs_dashboard"
metric = "disk_writebytes"
period = 900
silence_time = 300
webhook = "https://www.aliyun.com"
enabled = true
contact_groups = [alicloud_cms_alarmcontactgroup.default.alarm_contact_group_name]
effective_interval = "06:00-20:00"
metric_dimensions =" [
{
\"instanceId\": \"${data.alicloud_ecs_getinstances.default.ids[0]}\",
\"device\": \"/dev/vda1\"
}
]
"
escalations_critical = {
statistics = "Average"
comparison_operator = "<="
threshold = 90
times = 1
}
escalations_info = {
statistics = "Minimum"
comparison_operator = "!="
threshold = 20
times = 3
}
escalations_warn = {
statistics = "Average"
comparison_operator = "=="
threshold = 30
times = 5
}
}
variable "name" {
type = string
default = "terraform-example"
}
output "cloudMonitorServiceMetricAlarmRulesId0" {
value = data.alicloud_cloudmonitor_getservicemetricalarmrules.ids.rules[0].id
}
Using getServiceMetricAlarmRules
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getServiceMetricAlarmRules(args: GetServiceMetricAlarmRulesArgs, opts?: InvokeOptions): Promise<GetServiceMetricAlarmRulesResult>
function getServiceMetricAlarmRulesOutput(args: GetServiceMetricAlarmRulesOutputArgs, opts?: InvokeOptions): Output<GetServiceMetricAlarmRulesResult>def get_service_metric_alarm_rules(dimensions: Optional[str] = None,
enable_details: Optional[bool] = None,
ids: Optional[Sequence[str]] = None,
metric_alarm_rule_id: Optional[str] = None,
metric_name: Optional[str] = None,
namespace: Optional[str] = None,
output_file: Optional[str] = None,
rule_name: Optional[str] = None,
status: Optional[bool] = None,
opts: Optional[InvokeOptions] = None) -> GetServiceMetricAlarmRulesResult
def get_service_metric_alarm_rules_output(dimensions: pulumi.Input[Optional[str]] = None,
enable_details: pulumi.Input[Optional[bool]] = None,
ids: pulumi.Input[Optional[Sequence[pulumi.Input[str]]]] = None,
metric_alarm_rule_id: pulumi.Input[Optional[str]] = None,
metric_name: pulumi.Input[Optional[str]] = None,
namespace: pulumi.Input[Optional[str]] = None,
output_file: pulumi.Input[Optional[str]] = None,
rule_name: pulumi.Input[Optional[str]] = None,
status: pulumi.Input[Optional[bool]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetServiceMetricAlarmRulesResult]func GetServiceMetricAlarmRules(ctx *Context, args *GetServiceMetricAlarmRulesArgs, opts ...InvokeOption) (*GetServiceMetricAlarmRulesResult, error)
func GetServiceMetricAlarmRulesOutput(ctx *Context, args *GetServiceMetricAlarmRulesOutputArgs, opts ...InvokeOption) GetServiceMetricAlarmRulesResultOutput> Note: This function is named GetServiceMetricAlarmRules in the Go SDK.
public static class GetServiceMetricAlarmRules
{
public static Task<GetServiceMetricAlarmRulesResult> InvokeAsync(GetServiceMetricAlarmRulesArgs args, InvokeOptions? opts = null)
public static Output<GetServiceMetricAlarmRulesResult> Invoke(GetServiceMetricAlarmRulesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetServiceMetricAlarmRulesResult> getServiceMetricAlarmRules(GetServiceMetricAlarmRulesArgs args, InvokeOptions options)
public static Output<GetServiceMetricAlarmRulesResult> getServiceMetricAlarmRules(GetServiceMetricAlarmRulesArgs args, InvokeOptions options)
fn::invoke:
function: alicloud:cloudmonitor/getServiceMetricAlarmRules:getServiceMetricAlarmRules
arguments:
# arguments dictionarydata "alicloud_cloudmonitor_getservicemetricalarmrules" "name" {
# arguments
}The following arguments are supported:
- Dimensions string
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - Enable
Details bool - Default to
false. Set it totruecan output more details about resource attributes. - Ids List<string>
- A list of Metric Alarm Rule IDs.
- Metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- Output
File string - File name where to save data source results (after running
pulumi preview). - Rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- Status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- Dimensions string
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - Enable
Details bool - Default to
false. Set it totruecan output more details about resource attributes. - Ids []string
- A list of Metric Alarm Rule IDs.
- Metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- Output
File string - File name where to save data source results (after running
pulumi preview). - Rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- Status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- dimensions string
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - enable_
details bool - Default to
false. Set it totruecan output more details about resource attributes. - ids list(string)
- A list of Metric Alarm Rule IDs.
- metric_
alarm_ stringrule_ id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric_
name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- output_
file string - File name where to save data source results (after running
pulumi preview). - rule_
name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- dimensions String
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - enable
Details Boolean - Default to
false. Set it totruecan output more details about resource attributes. - ids List<String>
- A list of Metric Alarm Rule IDs.
- metric
Alarm StringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace String
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- output
File String - File name where to save data source results (after running
pulumi preview). - rule
Name String Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- status Boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- dimensions string
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - enable
Details boolean - Default to
false. Set it totruecan output more details about resource attributes. - ids string[]
- A list of Metric Alarm Rule IDs.
- metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- output
File string - File name where to save data source results (after running
pulumi preview). - rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- status boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- dimensions str
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - enable_
details bool - Default to
false. Set it totruecan output more details about resource attributes. - ids Sequence[str]
- A list of Metric Alarm Rule IDs.
- metric_
alarm_ strrule_ id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric_
name str The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace str
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- output_
file str - File name where to save data source results (after running
pulumi preview). - rule_
name str Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- dimensions String
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - enable
Details Boolean - Default to
false. Set it totruecan output more details about resource attributes. - ids List<String>
- A list of Metric Alarm Rule IDs.
- metric
Alarm StringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace String
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- output
File String - File name where to save data source results (after running
pulumi preview). - rule
Name String Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- status Boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
getServiceMetricAlarmRules Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids List<string>
- A list of Metric Alarm Rule IDs.
- Rules
List<Pulumi.
Ali Cloud. Cloud Monitor. Outputs. Get Service Metric Alarm Rules Rule> - A list of Metric Alarm Rule Entries. Each element contains the following attributes:
- Dimensions string
- The monitoring dimensions for the specified resource.
- Enable
Details bool - Metric
Alarm stringRule Id - The ID of the alarm rule.
- Metric
Name string - The name of the metric.
- Namespace string
- The namespace of the cloud service metric data.
- Output
File string - Rule
Name string - Alert rule name.
- Status bool
- The enabled status of the alarm rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Ids []string
- A list of Metric Alarm Rule IDs.
- Rules
[]Get
Service Metric Alarm Rules Rule - A list of Metric Alarm Rule Entries. Each element contains the following attributes:
- Dimensions string
- The monitoring dimensions for the specified resource.
- Enable
Details bool - Metric
Alarm stringRule Id - The ID of the alarm rule.
- Metric
Name string - The name of the metric.
- Namespace string
- The namespace of the cloud service metric data.
- Output
File string - Rule
Name string - Alert rule name.
- Status bool
- The enabled status of the alarm rule.
- id string
- The provider-assigned unique ID for this managed resource.
- ids list(string)
- A list of Metric Alarm Rule IDs.
- rules list(object)
- A list of Metric Alarm Rule Entries. Each element contains the following attributes:
- dimensions string
- The monitoring dimensions for the specified resource.
- enable_
details bool - metric_
alarm_ stringrule_ id - The ID of the alarm rule.
- metric_
name string - The name of the metric.
- namespace string
- The namespace of the cloud service metric data.
- output_
file string - rule_
name string - Alert rule name.
- status bool
- The enabled status of the alarm rule.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Metric Alarm Rule IDs.
- rules
List<Get
Service Metric Alarm Rules Rule> - A list of Metric Alarm Rule Entries. Each element contains the following attributes:
- dimensions String
- The monitoring dimensions for the specified resource.
- enable
Details Boolean - metric
Alarm StringRule Id - The ID of the alarm rule.
- metric
Name String - The name of the metric.
- namespace String
- The namespace of the cloud service metric data.
- output
File String - rule
Name String - Alert rule name.
- status Boolean
- The enabled status of the alarm rule.
- id string
- The provider-assigned unique ID for this managed resource.
- ids string[]
- A list of Metric Alarm Rule IDs.
- rules
Get
Service Metric Alarm Rules Rule[] - A list of Metric Alarm Rule Entries. Each element contains the following attributes:
- dimensions string
- The monitoring dimensions for the specified resource.
- enable
Details boolean - metric
Alarm stringRule Id - The ID of the alarm rule.
- metric
Name string - The name of the metric.
- namespace string
- The namespace of the cloud service metric data.
- output
File string - rule
Name string - Alert rule name.
- status boolean
- The enabled status of the alarm rule.
- id str
- The provider-assigned unique ID for this managed resource.
- ids Sequence[str]
- A list of Metric Alarm Rule IDs.
- rules
Sequence[Get
Service Metric Alarm Rules Rule] - A list of Metric Alarm Rule Entries. Each element contains the following attributes:
- dimensions str
- The monitoring dimensions for the specified resource.
- enable_
details bool - metric_
alarm_ strrule_ id - The ID of the alarm rule.
- metric_
name str - The name of the metric.
- namespace str
- The namespace of the cloud service metric data.
- output_
file str - rule_
name str - Alert rule name.
- status bool
- The enabled status of the alarm rule.
- id String
- The provider-assigned unique ID for this managed resource.
- ids List<String>
- A list of Metric Alarm Rule IDs.
- rules List<Property Map>
- A list of Metric Alarm Rule Entries. Each element contains the following attributes:
- dimensions String
- The monitoring dimensions for the specified resource.
- enable
Details Boolean - metric
Alarm StringRule Id - The ID of the alarm rule.
- metric
Name String - The name of the metric.
- namespace String
- The namespace of the cloud service metric data.
- output
File String - rule
Name String - Alert rule name.
- status Boolean
- The enabled status of the alarm rule.
Supporting Types
GetServiceMetricAlarmRulesRule
- Composite
Expression Pulumi.Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Composite Expression - Alert condition for multiple metrics.
- Contact
Groups string - Alarm contact groups.
- Dimensions string
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - Effective
Interval string - The time range during which the alert rule is effective.
- Email
Subject string - Subject of alert emails.
- Escalations
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Escalations - The trigger conditions for alert levels.
- Id string
- The ID of the resource supplied above.
- Labels
List<Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Label> - When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
- Metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- No
Data stringPolicy - The policy to apply when no monitoring data is available.
- No
Effective stringInterval - The time range during which the alarm rule is inactive.
- Period string
- The statistical period of the metric.
- Prometheus
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Prometheus - Prometheus alert.
- Resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. - Rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- Send
Ok bool - Specifies whether to send recovery notifications.
- Silence
Time string - Channel silence period.
- Source
Type string - The type of the alarm rule.
- Status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- Webhook string
- The URL address specified for callback when an alert is triggered.
- Composite
Expression GetService Metric Alarm Rules Rule Composite Expression - Alert condition for multiple metrics.
- Contact
Groups string - Alarm contact groups.
- Dimensions string
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - Effective
Interval string - The time range during which the alert rule is effective.
- Email
Subject string - Subject of alert emails.
- Escalations
Get
Service Metric Alarm Rules Rule Escalations - The trigger conditions for alert levels.
- Id string
- The ID of the resource supplied above.
- Labels
[]Get
Service Metric Alarm Rules Rule Label - When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
- Metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- No
Data stringPolicy - The policy to apply when no monitoring data is available.
- No
Effective stringInterval - The time range during which the alarm rule is inactive.
- Period string
- The statistical period of the metric.
- Prometheus
Get
Service Metric Alarm Rules Rule Prometheus - Prometheus alert.
- Resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. - Rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- Send
Ok bool - Specifies whether to send recovery notifications.
- Silence
Time string - Channel silence period.
- Source
Type string - The type of the alarm rule.
- Status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- Webhook string
- The URL address specified for callback when an alert is triggered.
- composite_
expression object - Alert condition for multiple metrics.
- contact_
groups string - Alarm contact groups.
- dimensions string
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - effective_
interval string - The time range during which the alert rule is effective.
- email_
subject string - Subject of alert emails.
- escalations object
- The trigger conditions for alert levels.
- id string
- The ID of the resource supplied above.
- labels list(object)
- When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
- metric_
alarm_ stringrule_ id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric_
name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no_
data_ stringpolicy - The policy to apply when no monitoring data is available.
- no_
effective_ stringinterval - The time range during which the alarm rule is inactive.
- period string
- The statistical period of the metric.
- prometheus object
- Prometheus alert.
- resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. - rule_
name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send_
ok bool - Specifies whether to send recovery notifications.
- silence_
time string - Channel silence period.
- source_
type string - The type of the alarm rule.
- status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook string
- The URL address specified for callback when an alert is triggered.
- composite
Expression GetService Metric Alarm Rules Rule Composite Expression - Alert condition for multiple metrics.
- contact
Groups String - Alarm contact groups.
- dimensions String
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - effective
Interval String - The time range during which the alert rule is effective.
- email
Subject String - Subject of alert emails.
- escalations
Get
Service Metric Alarm Rules Rule Escalations - The trigger conditions for alert levels.
- id String
- The ID of the resource supplied above.
- labels
List<Get
Service Metric Alarm Rules Rule Label> - When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
- metric
Alarm StringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace String
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no
Data StringPolicy - The policy to apply when no monitoring data is available.
- no
Effective StringInterval - The time range during which the alarm rule is inactive.
- period String
- The statistical period of the metric.
- prometheus
Get
Service Metric Alarm Rules Rule Prometheus - Prometheus alert.
- resources String
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. - rule
Name String Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send
Ok Boolean - Specifies whether to send recovery notifications.
- silence
Time String - Channel silence period.
- source
Type String - The type of the alarm rule.
- status Boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook String
- The URL address specified for callback when an alert is triggered.
- composite
Expression GetService Metric Alarm Rules Rule Composite Expression - Alert condition for multiple metrics.
- contact
Groups string - Alarm contact groups.
- dimensions string
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - effective
Interval string - The time range during which the alert rule is effective.
- email
Subject string - Subject of alert emails.
- escalations
Get
Service Metric Alarm Rules Rule Escalations - The trigger conditions for alert levels.
- id string
- The ID of the resource supplied above.
- labels
Get
Service Metric Alarm Rules Rule Label[] - When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
- metric
Alarm stringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace string
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no
Data stringPolicy - The policy to apply when no monitoring data is available.
- no
Effective stringInterval - The time range during which the alarm rule is inactive.
- period string
- The statistical period of the metric.
- prometheus
Get
Service Metric Alarm Rules Rule Prometheus - Prometheus alert.
- resources string
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. - rule
Name string Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send
Ok boolean - Specifies whether to send recovery notifications.
- silence
Time string - Channel silence period.
- source
Type string - The type of the alarm rule.
- status boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook string
- The URL address specified for callback when an alert is triggered.
- composite_
expression GetService Metric Alarm Rules Rule Composite Expression - Alert condition for multiple metrics.
- contact_
groups str - Alarm contact groups.
- dimensions str
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - effective_
interval str - The time range during which the alert rule is effective.
- email_
subject str - Subject of alert emails.
- escalations
Get
Service Metric Alarm Rules Rule Escalations - The trigger conditions for alert levels.
- id str
- The ID of the resource supplied above.
- labels
Sequence[Get
Service Metric Alarm Rules Rule Label] - When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
- metric_
alarm_ strrule_ id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric_
name str The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace str
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no_
data_ strpolicy - The policy to apply when no monitoring data is available.
- no_
effective_ strinterval - The time range during which the alarm rule is inactive.
- period str
- The statistical period of the metric.
- prometheus
Get
Service Metric Alarm Rules Rule Prometheus - Prometheus alert.
- resources str
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. - rule_
name str Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send_
ok bool - Specifies whether to send recovery notifications.
- silence_
time str - Channel silence period.
- source_
type str - The type of the alarm rule.
- status bool
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook str
- The URL address specified for callback when an alert is triggered.
- composite
Expression Property Map - Alert condition for multiple metrics.
- contact
Groups String - Alarm contact groups.
- dimensions String
- The monitoring dimensions for the specified resource.
Format: a set of key:value pairs, for example:
{"userId":"120886317861****"}and{"instanceId":"i-2ze2d6j5uhg20x47****"}. - effective
Interval String - The time range during which the alert rule is effective.
- email
Subject String - Subject of alert emails.
- escalations Property Map
- The trigger conditions for alert levels.
- id String
- The ID of the resource supplied above.
- labels List<Property Map>
- When a metric meets the alert condition and an alert is triggered, the labels are written to the metric and displayed in the alert notification.
- metric
Alarm StringRule Id The ID of the alarm rule.
You can specify a new alarm rule ID or use an existing alarm rule ID from CloudMonitor. For information about how to query alarm rule IDs, see DescribeMetricRuleList.
NOTE: Specifying a new alarm rule ID creates a threshold-based alarm rule.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- namespace String
The namespace of the cloud service metric data. For information about how to query the namespace of a cloud service, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter must be set to
acsPrometheus.- no
Data StringPolicy - The policy to apply when no monitoring data is available.
- no
Effective StringInterval - The time range during which the alarm rule is inactive.
- period String
- The statistical period of the metric.
- prometheus Property Map
- Prometheus alert.
- resources String
- Resource information, for example:
[{"instanceId":"i-uf6j91r34rnwawoo****"}],[{"userId":"100931896542****"}]. - rule
Name String Alert rule name.
You can enter a new alert rule name or use an existing alert rule name in CloudMonitor. For information about how to query alert rule names, see DescribeMetricRuleList.
NOTE: Entering a new alert rule name creates a threshold-based alert rule.
- send
Ok Boolean - Specifies whether to send recovery notifications.
- silence
Time String - Channel silence period.
- source
Type String - The type of the alarm rule.
- status Boolean
- The enabled status of the alarm rule. Valid values:
- true: enabled.
- false: disabled.
- webhook String
- The URL address specified for callback when an alert is triggered.
GetServiceMetricAlarmRulesRuleCompositeExpression
- Expression
List stringJoin - The logical relationship between multiple metric-based alert conditions.
- Expression
Lists List<Pulumi.Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Composite Expression Expression List> - A list of alert conditions created using standard expressions.
- Expression
Raw string - The alert condition created by an expression.
- Level string
- Alert severity level.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- Expression
List stringJoin - The logical relationship between multiple metric-based alert conditions.
- Expression
Lists []GetService Metric Alarm Rules Rule Composite Expression Expression List - A list of alert conditions created using standard expressions.
- Expression
Raw string - The alert condition created by an expression.
- Level string
- Alert severity level.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- expression_
list_ stringjoin - The logical relationship between multiple metric-based alert conditions.
- expression_
lists list(object) - A list of alert conditions created using standard expressions.
- expression_
raw string - The alert condition created by an expression.
- level string
- Alert severity level.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- expression
List StringJoin - The logical relationship between multiple metric-based alert conditions.
- expression
Lists List<GetService Metric Alarm Rules Rule Composite Expression Expression List> - A list of alert conditions created using standard expressions.
- expression
Raw String - The alert condition created by an expression.
- level String
- Alert severity level.
- times Integer
- The number of times the alert condition must be met before an alert notification is sent.
- expression
List stringJoin - The logical relationship between multiple metric-based alert conditions.
- expression
Lists GetService Metric Alarm Rules Rule Composite Expression Expression List[] - A list of alert conditions created using standard expressions.
- expression
Raw string - The alert condition created by an expression.
- level string
- Alert severity level.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- expression_
list_ strjoin - The logical relationship between multiple metric-based alert conditions.
- expression_
lists Sequence[GetService Metric Alarm Rules Rule Composite Expression Expression List] - A list of alert conditions created using standard expressions.
- expression_
raw str - The alert condition created by an expression.
- level str
- Alert severity level.
- times int
- The number of times the alert condition must be met before an alert notification is sent.
- expression
List StringJoin - The logical relationship between multiple metric-based alert conditions.
- expression
Lists List<Property Map> - A list of alert conditions created using standard expressions.
- expression
Raw String - The alert condition created by an expression.
- level String
- Alert severity level.
- times Number
- The number of times the alert condition must be met before an alert notification is sent.
GetServiceMetricAlarmRulesRuleCompositeExpressionExpressionList
- Comparison
Operator string - Comparison operator for the Warn-level threshold.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Period int
- The statistical period of the metric.
- Statistics string
- Statistical method for Warn-level alerts.
- Threshold string
- Threshold for Warn-level alerts.
- Comparison
Operator string - Comparison operator for the Warn-level threshold.
- Metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- Period int
- The statistical period of the metric.
- Statistics string
- Statistical method for Warn-level alerts.
- Threshold string
- Threshold for Warn-level alerts.
- comparison_
operator string - Comparison operator for the Warn-level threshold.
- metric_
name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period number
- The statistical period of the metric.
- statistics string
- Statistical method for Warn-level alerts.
- threshold string
- Threshold for Warn-level alerts.
- comparison
Operator String - Comparison operator for the Warn-level threshold.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period Integer
- The statistical period of the metric.
- statistics String
- Statistical method for Warn-level alerts.
- threshold String
- Threshold for Warn-level alerts.
- comparison
Operator string - Comparison operator for the Warn-level threshold.
- metric
Name string The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period number
- The statistical period of the metric.
- statistics string
- Statistical method for Warn-level alerts.
- threshold string
- Threshold for Warn-level alerts.
- comparison_
operator str - Comparison operator for the Warn-level threshold.
- metric_
name str The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period int
- The statistical period of the metric.
- statistics str
- Statistical method for Warn-level alerts.
- threshold str
- Threshold for Warn-level alerts.
- comparison
Operator String - Comparison operator for the Warn-level threshold.
- metric
Name String The name of the metric. For information about how to query metric names, see Cloud Service Metrics.
NOTE: When you create a Prometheus alert rule for Enterprise Cloud Monitoring, this parameter specifies the metric store name. For information about how to obtain the metric store name, see DescribeHybridMonitorNamespaceList.
- period Number
- The statistical period of the metric.
- statistics String
- Statistical method for Warn-level alerts.
- threshold String
- Threshold for Warn-level alerts.
GetServiceMetricAlarmRulesRuleEscalations
- Critical
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Escalations Critical - The trigger condition for Critical-level alerts.
- Info
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Escalations Info - Trigger conditions for Info-level alerts.
- Warn
Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Escalations Warn - Trigger condition for Warn-level alerts.
- Critical
Get
Service Metric Alarm Rules Rule Escalations Critical - The trigger condition for Critical-level alerts.
- Info
Get
Service Metric Alarm Rules Rule Escalations Info - Trigger conditions for Info-level alerts.
- Warn
Get
Service Metric Alarm Rules Rule Escalations Warn - Trigger condition for Warn-level alerts.
- critical
Get
Service Metric Alarm Rules Rule Escalations Critical - The trigger condition for Critical-level alerts.
- info
Get
Service Metric Alarm Rules Rule Escalations Info - Trigger conditions for Info-level alerts.
- warn
Get
Service Metric Alarm Rules Rule Escalations Warn - Trigger condition for Warn-level alerts.
- critical
Get
Service Metric Alarm Rules Rule Escalations Critical - The trigger condition for Critical-level alerts.
- info
Get
Service Metric Alarm Rules Rule Escalations Info - Trigger conditions for Info-level alerts.
- warn
Get
Service Metric Alarm Rules Rule Escalations Warn - Trigger condition for Warn-level alerts.
- critical
Get
Service Metric Alarm Rules Rule Escalations Critical - The trigger condition for Critical-level alerts.
- info
Get
Service Metric Alarm Rules Rule Escalations Info - Trigger conditions for Info-level alerts.
- warn
Get
Service Metric Alarm Rules Rule Escalations Warn - Trigger condition for Warn-level alerts.
- critical Property Map
- The trigger condition for Critical-level alerts.
- info Property Map
- Trigger conditions for Info-level alerts.
- warn Property Map
- Trigger condition for Warn-level alerts.
GetServiceMetricAlarmRulesRuleEscalationsCritical
- Comparison
Operator string - Comparison operator for the Warn-level threshold.
- Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Statistical method for Warn-level alerts.
- Threshold string
- Threshold for Warn-level alerts.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- Comparison
Operator string - Comparison operator for the Warn-level threshold.
- Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Statistical method for Warn-level alerts.
- Threshold string
- Threshold for Warn-level alerts.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- comparison_
operator string - Comparison operator for the Warn-level threshold.
- pre_
condition string - Precondition for triggering a Warn-level alert.
- statistics string
- Statistical method for Warn-level alerts.
- threshold string
- Threshold for Warn-level alerts.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- comparison
Operator String - Comparison operator for the Warn-level threshold.
- pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- Statistical method for Warn-level alerts.
- threshold String
- Threshold for Warn-level alerts.
- times Integer
- The number of times the alert condition must be met before an alert notification is sent.
- comparison
Operator string - Comparison operator for the Warn-level threshold.
- pre
Condition string - Precondition for triggering a Warn-level alert.
- statistics string
- Statistical method for Warn-level alerts.
- threshold string
- Threshold for Warn-level alerts.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- comparison_
operator str - Comparison operator for the Warn-level threshold.
- pre_
condition str - Precondition for triggering a Warn-level alert.
- statistics str
- Statistical method for Warn-level alerts.
- threshold str
- Threshold for Warn-level alerts.
- times int
- The number of times the alert condition must be met before an alert notification is sent.
- comparison
Operator String - Comparison operator for the Warn-level threshold.
- pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- Statistical method for Warn-level alerts.
- threshold String
- Threshold for Warn-level alerts.
- times Number
- The number of times the alert condition must be met before an alert notification is sent.
GetServiceMetricAlarmRulesRuleEscalationsInfo
- Comparison
Operator string - Comparison operator for the Warn-level threshold.
- Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Statistical method for Warn-level alerts.
- Threshold string
- Threshold for Warn-level alerts.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- Comparison
Operator string - Comparison operator for the Warn-level threshold.
- Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Statistical method for Warn-level alerts.
- Threshold string
- Threshold for Warn-level alerts.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- comparison_
operator string - Comparison operator for the Warn-level threshold.
- pre_
condition string - Precondition for triggering a Warn-level alert.
- statistics string
- Statistical method for Warn-level alerts.
- threshold string
- Threshold for Warn-level alerts.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- comparison
Operator String - Comparison operator for the Warn-level threshold.
- pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- Statistical method for Warn-level alerts.
- threshold String
- Threshold for Warn-level alerts.
- times Integer
- The number of times the alert condition must be met before an alert notification is sent.
- comparison
Operator string - Comparison operator for the Warn-level threshold.
- pre
Condition string - Precondition for triggering a Warn-level alert.
- statistics string
- Statistical method for Warn-level alerts.
- threshold string
- Threshold for Warn-level alerts.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- comparison_
operator str - Comparison operator for the Warn-level threshold.
- pre_
condition str - Precondition for triggering a Warn-level alert.
- statistics str
- Statistical method for Warn-level alerts.
- threshold str
- Threshold for Warn-level alerts.
- times int
- The number of times the alert condition must be met before an alert notification is sent.
- comparison
Operator String - Comparison operator for the Warn-level threshold.
- pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- Statistical method for Warn-level alerts.
- threshold String
- Threshold for Warn-level alerts.
- times Number
- The number of times the alert condition must be met before an alert notification is sent.
GetServiceMetricAlarmRulesRuleEscalationsWarn
- Comparison
Operator string - Comparison operator for the Warn-level threshold.
- Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Statistical method for Warn-level alerts.
- Threshold string
- Threshold for Warn-level alerts.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- Comparison
Operator string - Comparison operator for the Warn-level threshold.
- Pre
Condition string - Precondition for triggering a Warn-level alert.
- Statistics string
- Statistical method for Warn-level alerts.
- Threshold string
- Threshold for Warn-level alerts.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- comparison_
operator string - Comparison operator for the Warn-level threshold.
- pre_
condition string - Precondition for triggering a Warn-level alert.
- statistics string
- Statistical method for Warn-level alerts.
- threshold string
- Threshold for Warn-level alerts.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- comparison
Operator String - Comparison operator for the Warn-level threshold.
- pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- Statistical method for Warn-level alerts.
- threshold String
- Threshold for Warn-level alerts.
- times Integer
- The number of times the alert condition must be met before an alert notification is sent.
- comparison
Operator string - Comparison operator for the Warn-level threshold.
- pre
Condition string - Precondition for triggering a Warn-level alert.
- statistics string
- Statistical method for Warn-level alerts.
- threshold string
- Threshold for Warn-level alerts.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- comparison_
operator str - Comparison operator for the Warn-level threshold.
- pre_
condition str - Precondition for triggering a Warn-level alert.
- statistics str
- Statistical method for Warn-level alerts.
- threshold str
- Threshold for Warn-level alerts.
- times int
- The number of times the alert condition must be met before an alert notification is sent.
- comparison
Operator String - Comparison operator for the Warn-level threshold.
- pre
Condition String - Precondition for triggering a Warn-level alert.
- statistics String
- Statistical method for Warn-level alerts.
- threshold String
- Threshold for Warn-level alerts.
- times Number
- The number of times the alert condition must be met before an alert notification is sent.
GetServiceMetricAlarmRulesRuleLabel
GetServiceMetricAlarmRulesRulePrometheus
- Annotations
List<Pulumi.
Ali Cloud. Cloud Monitor. Inputs. Get Service Metric Alarm Rules Rule Prometheus Annotation> - When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
- Level string
- Alert severity level.
- Prom
Ql string - The PromQL query statement.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- Annotations
[]Get
Service Metric Alarm Rules Rule Prometheus Annotation - When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
- Level string
- Alert severity level.
- Prom
Ql string - The PromQL query statement.
- Times int
- The number of times the alert condition must be met before an alert notification is sent.
- annotations list(object)
- When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
- level string
- Alert severity level.
- prom_
ql string - The PromQL query statement.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- annotations
List<Get
Service Metric Alarm Rules Rule Prometheus Annotation> - When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
- level String
- Alert severity level.
- prom
Ql String - The PromQL query statement.
- times Integer
- The number of times the alert condition must be met before an alert notification is sent.
- annotations
Get
Service Metric Alarm Rules Rule Prometheus Annotation[] - When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
- level string
- Alert severity level.
- prom
Ql string - The PromQL query statement.
- times number
- The number of times the alert condition must be met before an alert notification is sent.
- annotations
Sequence[Get
Service Metric Alarm Rules Rule Prometheus Annotation] - When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
- level str
- Alert severity level.
- prom_
ql str - The PromQL query statement.
- times int
- The number of times the alert condition must be met before an alert notification is sent.
- annotations List<Property Map>
- When a Prometheus alert is triggered, the key-value pairs of annotations are rendered to help you better understand the metric or alert rule.
- level String
- Alert severity level.
- prom
Ql String - The PromQL query statement.
- times Number
- The number of times the alert condition must be met before an alert notification is sent.
GetServiceMetricAlarmRulesRulePrometheusAnnotation
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
alicloudTerraform Provider.
published on Thursday, Jul 16, 2026 by Pulumi