alicloud logo
Alibaba Cloud v3.37.0, May 15 23

alicloud.cms.Alarm

Explore with Pulumi AI

This resource provides a alarm rule resource and it can be used to monitor several cloud services according different metrics. Details for alarm rule.

Example Usage

Basic Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

return await Deployment.RunAsync(() => 
{
    var basic = new AliCloud.Cms.Alarm("basic", new()
    {
        ContactGroups = new[]
        {
            "test-group",
        },
        EffectiveInterval = "0:00-2:00",
        EscalationsCritical = new AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs
        {
            ComparisonOperator = "<=",
            Statistics = "Average",
            Threshold = "35",
            Times = 2,
        },
        MetricDimensions = "[{\"instanceId\":\"i-bp1247jeep0y53nu3bnk\",\"device\":\"/dev/vda1\"},{\"instanceId\":\"i-bp11gdcik8z6dl5jm84p\",\"device\":\"/dev/vdb1\"}]",
        Period = 900,
        Project = "acs_ecs_dashboard",
        Webhook = $"https://{data.Alicloud_account.Current.Id}.eu-central-1.fc.aliyuncs.com/2016-08-15/proxy/Terraform/AlarmEndpointMock/",
    });

});
package main

import (
	"fmt"

	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := cms.NewAlarm(ctx, "basic", &cms.AlarmArgs{
			ContactGroups: pulumi.StringArray{
				pulumi.String("test-group"),
			},
			EffectiveInterval: pulumi.String("0:00-2:00"),
			EscalationsCritical: &cms.AlarmEscalationsCriticalArgs{
				ComparisonOperator: pulumi.String("<="),
				Statistics:         pulumi.String("Average"),
				Threshold:          pulumi.String("35"),
				Times:              pulumi.Int(2),
			},
			MetricDimensions: pulumi.String("[{\"instanceId\":\"i-bp1247jeep0y53nu3bnk\",\"device\":\"/dev/vda1\"},{\"instanceId\":\"i-bp11gdcik8z6dl5jm84p\",\"device\":\"/dev/vdb1\"}]"),
			Period:           pulumi.Int(900),
			Project:          pulumi.String("acs_ecs_dashboard"),
			Webhook:          pulumi.String(fmt.Sprintf("https://%v.eu-central-1.fc.aliyuncs.com/2016-08-15/proxy/Terraform/AlarmEndpointMock/", data.Alicloud_account.Current.Id)),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.cms.Alarm;
import com.pulumi.alicloud.cms.AlarmArgs;
import com.pulumi.alicloud.cms.inputs.AlarmEscalationsCriticalArgs;
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) {
        var basic = new Alarm("basic", AlarmArgs.builder()        
            .contactGroups("test-group")
            .effectiveInterval("0:00-2:00")
            .escalationsCritical(AlarmEscalationsCriticalArgs.builder()
                .comparisonOperator("<=")
                .statistics("Average")
                .threshold(35)
                .times(2)
                .build())
            .metricDimensions("[{\"instanceId\":\"i-bp1247jeep0y53nu3bnk\",\"device\":\"/dev/vda1\"},{\"instanceId\":\"i-bp11gdcik8z6dl5jm84p\",\"device\":\"/dev/vdb1\"}]")
            .period(900)
            .project("acs_ecs_dashboard")
            .webhook(String.format("https://%s.eu-central-1.fc.aliyuncs.com/2016-08-15/proxy/Terraform/AlarmEndpointMock/", data.alicloud_account().current().id()))
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

basic = alicloud.cms.Alarm("basic",
    contact_groups=["test-group"],
    effective_interval="0:00-2:00",
    escalations_critical=alicloud.cms.AlarmEscalationsCriticalArgs(
        comparison_operator="<=",
        statistics="Average",
        threshold="35",
        times=2,
    ),
    metric_dimensions="[{\"instanceId\":\"i-bp1247jeep0y53nu3bnk\",\"device\":\"/dev/vda1\"},{\"instanceId\":\"i-bp11gdcik8z6dl5jm84p\",\"device\":\"/dev/vdb1\"}]",
    period=900,
    project="acs_ecs_dashboard",
    webhook=f"https://{data['alicloud_account']['current']['id']}.eu-central-1.fc.aliyuncs.com/2016-08-15/proxy/Terraform/AlarmEndpointMock/")
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const basic = new alicloud.cms.Alarm("basic", {
    contactGroups: ["test-group"],
    effectiveInterval: "0:00-2:00",
    escalationsCritical: {
        comparisonOperator: "<=",
        statistics: "Average",
        threshold: "35",
        times: 2,
    },
    metricDimensions: "[{\"instanceId\":\"i-bp1247jeep0y53nu3bnk\",\"device\":\"/dev/vda1\"},{\"instanceId\":\"i-bp11gdcik8z6dl5jm84p\",\"device\":\"/dev/vdb1\"}]",
    period: 900,
    project: "acs_ecs_dashboard",
    webhook: `https://${data.alicloud_account.current.id}.eu-central-1.fc.aliyuncs.com/2016-08-15/proxy/Terraform/AlarmEndpointMock/`,
});
resources:
  basic:
    type: alicloud:cms:Alarm
    properties:
      contactGroups:
        - test-group
      effectiveInterval: 0:00-2:00
      escalationsCritical:
        comparisonOperator: <=
        statistics: Average
        threshold: 35
        times: 2
      metricDimensions: '[{"instanceId":"i-bp1247jeep0y53nu3bnk","device":"/dev/vda1"},{"instanceId":"i-bp11gdcik8z6dl5jm84p","device":"/dev/vdb1"}]'
      period: 900
      project: acs_ecs_dashboard
      webhook: https://${data.alicloud_account.current.id}.eu-central-1.fc.aliyuncs.com/2016-08-15/proxy/Terraform/AlarmEndpointMock/

Create Alarm Resource

new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);
@overload
def Alarm(resource_name: str,
          opts: Optional[ResourceOptions] = None,
          contact_groups: Optional[Sequence[str]] = None,
          dimensions: Optional[Mapping[str, Any]] = None,
          effective_interval: Optional[str] = None,
          enabled: Optional[bool] = None,
          end_time: Optional[int] = None,
          escalations_critical: Optional[AlarmEscalationsCriticalArgs] = None,
          escalations_info: Optional[AlarmEscalationsInfoArgs] = None,
          escalations_warn: Optional[AlarmEscalationsWarnArgs] = None,
          metric: Optional[str] = None,
          metric_dimensions: Optional[str] = None,
          name: Optional[str] = None,
          operator: Optional[str] = None,
          period: Optional[int] = None,
          project: Optional[str] = None,
          prometheuses: Optional[Sequence[AlarmPrometheusArgs]] = None,
          silence_time: Optional[int] = None,
          start_time: Optional[int] = None,
          statistics: Optional[str] = None,
          tags: Optional[Mapping[str, Any]] = None,
          threshold: Optional[str] = None,
          triggered_count: Optional[int] = None,
          webhook: Optional[str] = None)
@overload
def Alarm(resource_name: str,
          args: AlarmArgs,
          opts: Optional[ResourceOptions] = None)
func NewAlarm(ctx *Context, name string, args AlarmArgs, opts ...ResourceOption) (*Alarm, error)
public Alarm(string name, AlarmArgs args, CustomResourceOptions? opts = null)
public Alarm(String name, AlarmArgs args)
public Alarm(String name, AlarmArgs args, CustomResourceOptions options)
type: alicloud:cms:Alarm
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args AlarmArgs
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 AlarmArgs
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 AlarmArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args AlarmArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args AlarmArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Alarm Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The Alarm resource accepts the following input properties:

ContactGroups List<string>

List contact groups of the alarm rule, which must have been created on the console.

Metric string

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

Project string

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

Dimensions Dictionary<string, object>

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

EffectiveInterval string

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

Enabled bool

Whether to enable alarm rule. Default to true.

EndTime int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

EscalationsCritical Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

EscalationsInfo Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

EscalationsWarn Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

MetricDimensions string

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

Name string

The alarm rule name.

Operator string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

Period int

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

Prometheuses List<Pulumi.AliCloud.Cms.Inputs.AlarmPrometheusArgs>

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

SilenceTime int

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

StartTime int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

TriggeredCount int

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

Webhook string

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

ContactGroups []string

List contact groups of the alarm rule, which must have been created on the console.

Metric string

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

Project string

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

Dimensions map[string]interface{}

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

EffectiveInterval string

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

Enabled bool

Whether to enable alarm rule. Default to true.

EndTime int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

EscalationsCritical AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

EscalationsInfo AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

EscalationsWarn AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

MetricDimensions string

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

Name string

The alarm rule name.

Operator string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

Period int

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

Prometheuses []AlarmPrometheusArgs

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

SilenceTime int

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

StartTime int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

TriggeredCount int

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

Webhook string

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

contactGroups List<String>

List contact groups of the alarm rule, which must have been created on the console.

metric String

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

project String

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

dimensions Map<String,Object>

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

effectiveInterval String

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

enabled Boolean

Whether to enable alarm rule. Default to true.

endTime Integer

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

escalationsCritical AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

escalationsInfo AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

escalationsWarn AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

metricDimensions String

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

name String

The alarm rule name.

operator String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

period Integer

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

prometheuses List<AlarmPrometheusArgs>

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

silenceTime Integer

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

startTime Integer

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

tags Map<String,Object>

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

triggeredCount Integer

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

webhook String

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

contactGroups string[]

List contact groups of the alarm rule, which must have been created on the console.

metric string

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

project string

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

dimensions {[key: string]: any}

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

effectiveInterval string

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

enabled boolean

Whether to enable alarm rule. Default to true.

endTime number

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

escalationsCritical AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

escalationsInfo AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

escalationsWarn AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

metricDimensions string

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

name string

The alarm rule name.

operator string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

period number

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

prometheuses AlarmPrometheusArgs[]

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

silenceTime number

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

startTime number

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

triggeredCount number

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

webhook string

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

contact_groups Sequence[str]

List contact groups of the alarm rule, which must have been created on the console.

metric str

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

project str

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

dimensions Mapping[str, Any]

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

effective_interval str

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

enabled bool

Whether to enable alarm rule. Default to true.

end_time int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

escalations_critical AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

escalations_info AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

escalations_warn AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

metric_dimensions str

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

name str

The alarm rule name.

operator str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

period int

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

prometheuses Sequence[AlarmPrometheusArgs]

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

silence_time int

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

start_time int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

statistics str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

threshold str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

triggered_count int

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

webhook str

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

contactGroups List<String>

List contact groups of the alarm rule, which must have been created on the console.

metric String

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

project String

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

dimensions Map<Any>

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

effectiveInterval String

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

enabled Boolean

Whether to enable alarm rule. Default to true.

endTime Number

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

escalationsCritical Property Map

A configuration of critical alarm (documented below).

escalationsInfo Property Map

A configuration of critical info (documented below).

escalationsWarn Property Map

A configuration of critical warn (documented below).

metricDimensions String

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

name String

The alarm rule name.

operator String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

period Number

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

prometheuses List<Property Map>

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

silenceTime Number

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

startTime Number

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

tags Map<Any>

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

triggeredCount Number

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

webhook String

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

Outputs

All input properties are implicitly available as output properties. Additionally, the Alarm resource produces the following output properties:

Id string

The provider-assigned unique ID for this managed resource.

Status string

The current alarm rule status.

Id string

The provider-assigned unique ID for this managed resource.

Status string

The current alarm rule status.

id String

The provider-assigned unique ID for this managed resource.

status String

The current alarm rule status.

id string

The provider-assigned unique ID for this managed resource.

status string

The current alarm rule status.

id str

The provider-assigned unique ID for this managed resource.

status str

The current alarm rule status.

id String

The provider-assigned unique ID for this managed resource.

status String

The current alarm rule status.

Look up Existing Alarm Resource

Get an existing Alarm 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?: AlarmState, opts?: CustomResourceOptions): Alarm
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        contact_groups: Optional[Sequence[str]] = None,
        dimensions: Optional[Mapping[str, Any]] = None,
        effective_interval: Optional[str] = None,
        enabled: Optional[bool] = None,
        end_time: Optional[int] = None,
        escalations_critical: Optional[AlarmEscalationsCriticalArgs] = None,
        escalations_info: Optional[AlarmEscalationsInfoArgs] = None,
        escalations_warn: Optional[AlarmEscalationsWarnArgs] = None,
        metric: Optional[str] = None,
        metric_dimensions: Optional[str] = None,
        name: Optional[str] = None,
        operator: Optional[str] = None,
        period: Optional[int] = None,
        project: Optional[str] = None,
        prometheuses: Optional[Sequence[AlarmPrometheusArgs]] = None,
        silence_time: Optional[int] = None,
        start_time: Optional[int] = None,
        statistics: Optional[str] = None,
        status: Optional[str] = None,
        tags: Optional[Mapping[str, Any]] = None,
        threshold: Optional[str] = None,
        triggered_count: Optional[int] = None,
        webhook: Optional[str] = None) -> Alarm
func GetAlarm(ctx *Context, name string, id IDInput, state *AlarmState, opts ...ResourceOption) (*Alarm, error)
public static Alarm Get(string name, Input<string> id, AlarmState? state, CustomResourceOptions? opts = null)
public static Alarm get(String name, Output<String> id, AlarmState 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.
The following state arguments are supported:
ContactGroups List<string>

List contact groups of the alarm rule, which must have been created on the console.

Dimensions Dictionary<string, object>

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

EffectiveInterval string

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

Enabled bool

Whether to enable alarm rule. Default to true.

EndTime int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

EscalationsCritical Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

EscalationsInfo Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

EscalationsWarn Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

Metric string

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

MetricDimensions string

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

Name string

The alarm rule name.

Operator string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

Period int

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

Project string

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

Prometheuses List<Pulumi.AliCloud.Cms.Inputs.AlarmPrometheusArgs>

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

SilenceTime int

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

StartTime int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

Status string

The current alarm rule status.

Tags Dictionary<string, object>

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

TriggeredCount int

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

Webhook string

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

ContactGroups []string

List contact groups of the alarm rule, which must have been created on the console.

Dimensions map[string]interface{}

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

EffectiveInterval string

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

Enabled bool

Whether to enable alarm rule. Default to true.

EndTime int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

EscalationsCritical AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

EscalationsInfo AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

EscalationsWarn AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

Metric string

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

MetricDimensions string

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

Name string

The alarm rule name.

Operator string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

Period int

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

Project string

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

Prometheuses []AlarmPrometheusArgs

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

SilenceTime int

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

StartTime int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

Status string

The current alarm rule status.

Tags map[string]interface{}

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

TriggeredCount int

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

Webhook string

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

contactGroups List<String>

List contact groups of the alarm rule, which must have been created on the console.

dimensions Map<String,Object>

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

effectiveInterval String

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

enabled Boolean

Whether to enable alarm rule. Default to true.

endTime Integer

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

escalationsCritical AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

escalationsInfo AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

escalationsWarn AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

metric String

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

metricDimensions String

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

name String

The alarm rule name.

operator String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

period Integer

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

project String

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

prometheuses List<AlarmPrometheusArgs>

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

silenceTime Integer

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

startTime Integer

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

status String

The current alarm rule status.

tags Map<String,Object>

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

triggeredCount Integer

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

webhook String

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

contactGroups string[]

List contact groups of the alarm rule, which must have been created on the console.

dimensions {[key: string]: any}

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

effectiveInterval string

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

enabled boolean

Whether to enable alarm rule. Default to true.

endTime number

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

escalationsCritical AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

escalationsInfo AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

escalationsWarn AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

metric string

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

metricDimensions string

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

name string

The alarm rule name.

operator string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

period number

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

project string

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

prometheuses AlarmPrometheusArgs[]

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

silenceTime number

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

startTime number

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

status string

The current alarm rule status.

tags {[key: string]: any}

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

triggeredCount number

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

webhook string

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

contact_groups Sequence[str]

List contact groups of the alarm rule, which must have been created on the console.

dimensions Mapping[str, Any]

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

effective_interval str

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

enabled bool

Whether to enable alarm rule. Default to true.

end_time int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

escalations_critical AlarmEscalationsCriticalArgs

A configuration of critical alarm (documented below).

escalations_info AlarmEscalationsInfoArgs

A configuration of critical info (documented below).

escalations_warn AlarmEscalationsWarnArgs

A configuration of critical warn (documented below).

metric str

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

metric_dimensions str

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

name str

The alarm rule name.

operator str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

period int

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

project str

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

prometheuses Sequence[AlarmPrometheusArgs]

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

silence_time int

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

start_time int

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

statistics str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

status str

The current alarm rule status.

tags Mapping[str, Any]

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

threshold str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

triggered_count int

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

webhook str

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

contactGroups List<String>

List contact groups of the alarm rule, which must have been created on the console.

dimensions Map<Any>

Field dimensions has been deprecated from version 1.95.0. Use metric_dimensions instead.

Deprecated:

Field 'dimensions' has been deprecated from version 1.173.0. Use 'metric_dimensions' instead.

effectiveInterval String

The interval of effecting alarm rule. It format as "hh:mm-hh:mm", like "0:00-4:00". Default to "00:00-23:59".

enabled Boolean

Whether to enable alarm rule. Default to true.

endTime Number

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'end_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

escalationsCritical Property Map

A configuration of critical alarm (documented below).

escalationsInfo Property Map

A configuration of critical info (documented below).

escalationsWarn Property Map

A configuration of critical warn (documented below).

metric String

Name of the monitoring metrics corresponding to a project, such as "CPUUtilization" and "networkin_rate". For more information, see Metrics Reference.

metricDimensions String

Map of the resources associated with the alarm rule, such as "instanceId", "device" and "port". Each key's value is a string, and it uses comma to split multiple items. For more information, see Metrics Reference.

name String

The alarm rule name.

operator String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.comparison_operator' instead.

Deprecated:

Field 'operator' has been deprecated from provider version 1.94.0. New field 'escalations_critical.comparison_operator' instead.

period Number

Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.

project String

Monitor project name, such as "acs_ecs_dashboard" and "acs_rds_dashboard". For more information, see Metrics Reference. NOTE: The dimensions and metric_dimensions must be empty when project is acs_prometheus, otherwise, one of them must be set.

prometheuses List<Property Map>

The Prometheus alert rule. See the following Block prometheus. Note: This parameter is required only when you create a Prometheus alert rule for Hybrid Cloud Monitoring.

silenceTime Number

Notification silence period in the alarm state, in seconds. Valid value range: [300, 86400]. Default to 86400

startTime Number

It has been deprecated from provider version 1.50.0 and 'effective_interval' instead.

Deprecated:

Field 'start_time' has been deprecated from provider version 1.50.0. New field 'effective_interval' instead.

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Deprecated:

Field 'statistics' has been deprecated from provider version 1.94.0. New field 'escalations_critical.statistics' instead.

status String

The current alarm rule status.

tags Map<Any>

A mapping of tags to assign to the resource.

NOTE: Each resource supports the creation of one of the following three levels.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Deprecated:

Field 'threshold' has been deprecated from provider version 1.94.0. New field 'escalations_critical.threshold' instead.

triggeredCount Number

It has been deprecated from provider version 1.94.0 and 'escalations_critical.times' instead.

Deprecated:

Field 'triggered_count' has been deprecated from provider version 1.94.0. New field 'escalations_critical.times' instead.

webhook String

The webhook that should be called when the alarm is triggered. Currently, only http protocol is supported. Default is empty string.

Supporting Types

AlarmEscalationsCritical

ComparisonOperator string

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Times int

Critical level alarm retry times. Default to 3.

ComparisonOperator string

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Times int

Critical level alarm retry times. Default to 3.

comparisonOperator String

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times Integer

Critical level alarm retry times. Default to 3.

comparisonOperator string

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times number

Critical level alarm retry times. Default to 3.

comparison_operator str

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times int

Critical level alarm retry times. Default to 3.

comparisonOperator String

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times Number

Critical level alarm retry times. Default to 3.

AlarmEscalationsInfo

ComparisonOperator string

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Times int

Critical level alarm retry times. Default to 3.

ComparisonOperator string

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Times int

Critical level alarm retry times. Default to 3.

comparisonOperator String

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times Integer

Critical level alarm retry times. Default to 3.

comparisonOperator string

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times number

Critical level alarm retry times. Default to 3.

comparison_operator str

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times int

Critical level alarm retry times. Default to 3.

comparisonOperator String

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times Number

Critical level alarm retry times. Default to 3.

AlarmEscalationsWarn

ComparisonOperator string

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Times int

Critical level alarm retry times. Default to 3.

ComparisonOperator string

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

Statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

Threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

Times int

Critical level alarm retry times. Default to 3.

comparisonOperator String

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times Integer

Critical level alarm retry times. Default to 3.

comparisonOperator string

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold string

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times number

Critical level alarm retry times. Default to 3.

comparison_operator str

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold str

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times int

Critical level alarm retry times. Default to 3.

comparisonOperator String

Critical level alarm comparison operator. Valid values: ["<=", "<", ">", ">=", "==", "!="]. Default to "==".

statistics String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.statistics' instead.

threshold String

It has been deprecated from provider version 1.94.0 and 'escalations_critical.threshold' instead.

times Number

Critical level alarm retry times. Default to 3.

AlarmPrometheus

Annotations Dictionary<string, object>

The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.

Level string

The level of the alert. Valid values: Critical, Warn, Info.

PromQl string

The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.

Times int

Critical level alarm retry times. Default to 3.

Annotations map[string]interface{}

The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.

Level string

The level of the alert. Valid values: Critical, Warn, Info.

PromQl string

The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.

Times int

Critical level alarm retry times. Default to 3.

annotations Map<String,Object>

The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.

level String

The level of the alert. Valid values: Critical, Warn, Info.

promQl String

The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.

times Integer

Critical level alarm retry times. Default to 3.

annotations {[key: string]: any}

The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.

level string

The level of the alert. Valid values: Critical, Warn, Info.

promQl string

The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.

times number

Critical level alarm retry times. Default to 3.

annotations Mapping[str, Any]

The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.

level str

The level of the alert. Valid values: Critical, Warn, Info.

prom_ql str

The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.

times int

Critical level alarm retry times. Default to 3.

annotations Map<Any>

The annotations of the Prometheus alert rule. When a Prometheus alert is triggered, the system renders the annotated keys and values to help you understand the metrics and alert rule.

level String

The level of the alert. Valid values: Critical, Warn, Info.

promQl String

The PromQL query statement. Note: The data obtained by using the PromQL query statement is the monitoring data. You must include the alert threshold in this statement.

times Number

Critical level alarm retry times. Default to 3.

Import

Alarm rule can be imported using the id, e.g.

 $ pulumi import alicloud:cms/alarm:Alarm alarm abc12345

Package Details

Repository
Alibaba Cloud pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.