1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cms
  5. Alarm
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

alicloud.cms.Alarm

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi

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

    NOTE: Available since v1.9.1.

    Example Usage

    Basic Usage

    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") ?? "tf-example";
        var defaultImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            NameRegex = "^ubuntu_[0-9]+_[0-9]+_x64*",
            Owners = "system",
        });
    
        var defaultZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "Instance",
        });
    
        var defaultInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            CpuCoreCount = 1,
            MemorySize = 2,
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
        {
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Ecs.Instance("defaultInstance", new()
        {
            AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            InstanceName = name,
            ImageId = defaultImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            SecurityGroups = new[]
            {
                defaultSecurityGroup.Id,
            },
            VswitchId = defaultSwitch.Id,
        });
    
        var defaultAlarmContactGroup = new AliCloud.Cms.AlarmContactGroup("defaultAlarmContactGroup", new()
        {
            AlarmContactGroupName = name,
        });
    
        var defaultAlarm = new AliCloud.Cms.Alarm("defaultAlarm", new()
        {
            Project = "acs_ecs_dashboard",
            Metric = "disk_writebytes",
            MetricDimensions = defaultInstance.Id.Apply(id => $"[{{\"instanceId\":\"{id}\",\"device\":\"/dev/vda1\"}}]"),
            EscalationsCritical = new AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs
            {
                Statistics = "Average",
                ComparisonOperator = "<=",
                Threshold = "35",
                Times = 2,
            },
            Period = 900,
            ContactGroups = new[]
            {
                defaultAlarmContactGroup.AlarmContactGroupName,
            },
            EffectiveInterval = "06:00-20:00",
        });
    
    });
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/cms"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		defaultImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			NameRegex: pulumi.StringRef("^ubuntu_[0-9]+_[0-9]+_x64*"),
    			Owners:    pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("Instance"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone: pulumi.StringRef(defaultZones.Zones[0].Id),
    			CpuCoreCount:     pulumi.IntRef(1),
    			MemorySize:       pulumi.Float64Ref(2),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      *pulumi.String(defaultZones.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ecs.NewInstance(ctx, "defaultInstance", &ecs.InstanceArgs{
    			AvailabilityZone: *pulumi.String(defaultZones.Zones[0].Id),
    			InstanceName:     pulumi.String(name),
    			ImageId:          *pulumi.String(defaultImages.Images[0].Id),
    			InstanceType:     *pulumi.String(defaultInstanceTypes.InstanceTypes[0].Id),
    			SecurityGroups: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    			VswitchId: defaultSwitch.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultAlarmContactGroup, err := cms.NewAlarmContactGroup(ctx, "defaultAlarmContactGroup", &cms.AlarmContactGroupArgs{
    			AlarmContactGroupName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cms.NewAlarm(ctx, "defaultAlarm", &cms.AlarmArgs{
    			Project: pulumi.String("acs_ecs_dashboard"),
    			Metric:  pulumi.String("disk_writebytes"),
    			MetricDimensions: defaultInstance.ID().ApplyT(func(id string) (string, error) {
    				return fmt.Sprintf("[{\"instanceId\":\"%v\",\"device\":\"/dev/vda1\"}]", id), nil
    			}).(pulumi.StringOutput),
    			EscalationsCritical: &cms.AlarmEscalationsCriticalArgs{
    				Statistics:         pulumi.String("Average"),
    				ComparisonOperator: pulumi.String("<="),
    				Threshold:          pulumi.String("35"),
    				Times:              pulumi.Int(2),
    			},
    			Period: pulumi.Int(900),
    			ContactGroups: pulumi.StringArray{
    				defaultAlarmContactGroup.AlarmContactGroupName,
    			},
    			EffectiveInterval: pulumi.String("06:00-20:00"),
    		})
    		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.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.inputs.GetInstanceTypesArgs;
    import com.pulumi.alicloud.vpc.Network;
    import com.pulumi.alicloud.vpc.NetworkArgs;
    import com.pulumi.alicloud.vpc.Switch;
    import com.pulumi.alicloud.vpc.SwitchArgs;
    import com.pulumi.alicloud.ecs.SecurityGroup;
    import com.pulumi.alicloud.ecs.SecurityGroupArgs;
    import com.pulumi.alicloud.ecs.Instance;
    import com.pulumi.alicloud.ecs.InstanceArgs;
    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 java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            final var config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            final var defaultImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .nameRegex("^ubuntu_[0-9]+_[0-9]+_x64*")
                .owners("system")
                .build());
    
            final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("Instance")
                .build());
    
            final var defaultInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .cpuCoreCount(1)
                .memorySize(2)
                .build());
    
            var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()        
                .vpcName(name)
                .cidrBlock("10.4.0.0/16")
                .build());
    
            var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()        
                .vswitchName(name)
                .cidrBlock("10.4.0.0/24")
                .vpcId(defaultNetwork.id())
                .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()        
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()        
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceName(name)
                .imageId(defaultImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .securityGroups(defaultSecurityGroup.id())
                .vswitchId(defaultSwitch.id())
                .build());
    
            var defaultAlarmContactGroup = new AlarmContactGroup("defaultAlarmContactGroup", AlarmContactGroupArgs.builder()        
                .alarmContactGroupName(name)
                .build());
    
            var defaultAlarm = new Alarm("defaultAlarm", AlarmArgs.builder()        
                .project("acs_ecs_dashboard")
                .metric("disk_writebytes")
                .metricDimensions(defaultInstance.id().applyValue(id -> String.format("[{{\"instanceId\":\"%s\",\"device\":\"/dev/vda1\"}}]", id)))
                .escalationsCritical(AlarmEscalationsCriticalArgs.builder()
                    .statistics("Average")
                    .comparisonOperator("<=")
                    .threshold(35)
                    .times(2)
                    .build())
                .period(900)
                .contactGroups(defaultAlarmContactGroup.alarmContactGroupName())
                .effectiveInterval("06:00-20:00")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default_images = alicloud.ecs.get_images(name_regex="^ubuntu_[0-9]+_[0-9]+_x64*",
        owners="system")
    default_zones = alicloud.get_zones(available_resource_creation="Instance")
    default_instance_types = alicloud.ecs.get_instance_types(availability_zone=default_zones.zones[0].id,
        cpu_core_count=1,
        memory_size=2)
    default_network = alicloud.vpc.Network("defaultNetwork",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("defaultSwitch",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default_zones.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_network.id)
    default_instance = alicloud.ecs.Instance("defaultInstance",
        availability_zone=default_zones.zones[0].id,
        instance_name=name,
        image_id=default_images.images[0].id,
        instance_type=default_instance_types.instance_types[0].id,
        security_groups=[default_security_group.id],
        vswitch_id=default_switch.id)
    default_alarm_contact_group = alicloud.cms.AlarmContactGroup("defaultAlarmContactGroup", alarm_contact_group_name=name)
    default_alarm = alicloud.cms.Alarm("defaultAlarm",
        project="acs_ecs_dashboard",
        metric="disk_writebytes",
        metric_dimensions=default_instance.id.apply(lambda id: f"[{{\"instanceId\":\"{id}\",\"device\":\"/dev/vda1\"}}]"),
        escalations_critical=alicloud.cms.AlarmEscalationsCriticalArgs(
            statistics="Average",
            comparison_operator="<=",
            threshold="35",
            times=2,
        ),
        period=900,
        contact_groups=[default_alarm_contact_group.alarm_contact_group_name],
        effective_interval="06:00-20:00")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const defaultImages = alicloud.ecs.getImages({
        nameRegex: "^ubuntu_[0-9]+_[0-9]+_x64*",
        owners: "system",
    });
    const defaultZones = alicloud.getZones({
        availableResourceCreation: "Instance",
    });
    const defaultInstanceTypes = defaultZones.then(defaultZones => alicloud.ecs.getInstanceTypes({
        availabilityZone: defaultZones.zones?.[0]?.id,
        cpuCoreCount: 1,
        memorySize: 2,
    }));
    const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {vpcId: defaultNetwork.id});
    const defaultInstance = new alicloud.ecs.Instance("defaultInstance", {
        availabilityZone: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
        instanceName: name,
        imageId: defaultImages.then(defaultImages => defaultImages.images?.[0]?.id),
        instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?.[0]?.id),
        securityGroups: [defaultSecurityGroup.id],
        vswitchId: defaultSwitch.id,
    });
    const defaultAlarmContactGroup = new alicloud.cms.AlarmContactGroup("defaultAlarmContactGroup", {alarmContactGroupName: name});
    const defaultAlarm = new alicloud.cms.Alarm("defaultAlarm", {
        project: "acs_ecs_dashboard",
        metric: "disk_writebytes",
        metricDimensions: pulumi.interpolate`[{"instanceId":"${defaultInstance.id}","device":"/dev/vda1"}]`,
        escalationsCritical: {
            statistics: "Average",
            comparisonOperator: "<=",
            threshold: "35",
            times: 2,
        },
        period: 900,
        contactGroups: [defaultAlarmContactGroup.alarmContactGroupName],
        effectiveInterval: "06:00-20:00",
    });
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${defaultZones.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        properties:
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:ecs:Instance
        properties:
          availabilityZone: ${defaultZones.zones[0].id}
          instanceName: ${name}
          imageId: ${defaultImages.images[0].id}
          instanceType: ${defaultInstanceTypes.instanceTypes[0].id}
          securityGroups:
            - ${defaultSecurityGroup.id}
          vswitchId: ${defaultSwitch.id}
      defaultAlarmContactGroup:
        type: alicloud:cms:AlarmContactGroup
        properties:
          alarmContactGroupName: ${name}
      defaultAlarm:
        type: alicloud:cms:Alarm
        properties:
          project: acs_ecs_dashboard
          metric: disk_writebytes
          metricDimensions: '[{"instanceId":"${defaultInstance.id}","device":"/dev/vda1"}]'
          escalationsCritical:
            statistics: Average
            comparisonOperator: <=
            threshold: 35
            times: 2
          period: 900
          contactGroups:
            - ${defaultAlarmContactGroup.alarmContactGroupName}
          effectiveInterval: 06:00-20:00
    variables:
      defaultImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            nameRegex: ^ubuntu_[0-9]+_[0-9]+_x64*
            owners: system
      defaultZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: Instance
      defaultInstanceTypes:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            availabilityZone: ${defaultZones.zones[0].id}
            cpuCoreCount: 1
            memorySize: 2
    

    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.AlarmEscalationsCritical

    A configuration of critical alarm. See escalations_critical below.

    EscalationsInfo Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsInfo

    A configuration of critical info. See escalations_info below.

    EscalationsWarn Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsWarn

    A configuration of critical warn. See escalations_warn 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.AlarmPrometheus>

    The Prometheus alert rule. See prometheus below. 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. See escalations_critical below.

    EscalationsInfo AlarmEscalationsInfoArgs

    A configuration of critical info. See escalations_info below.

    EscalationsWarn AlarmEscalationsWarnArgs

    A configuration of critical warn. See escalations_warn 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 prometheus below. 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 AlarmEscalationsCritical

    A configuration of critical alarm. See escalations_critical below.

    escalationsInfo AlarmEscalationsInfo

    A configuration of critical info. See escalations_info below.

    escalationsWarn AlarmEscalationsWarn

    A configuration of critical warn. See escalations_warn 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<AlarmPrometheus>

    The Prometheus alert rule. See prometheus below. 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 AlarmEscalationsCritical

    A configuration of critical alarm. See escalations_critical below.

    escalationsInfo AlarmEscalationsInfo

    A configuration of critical info. See escalations_info below.

    escalationsWarn AlarmEscalationsWarn

    A configuration of critical warn. See escalations_warn 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 AlarmPrometheus[]

    The Prometheus alert rule. See prometheus below. 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. See escalations_critical below.

    escalations_info AlarmEscalationsInfoArgs

    A configuration of critical info. See escalations_info below.

    escalations_warn AlarmEscalationsWarnArgs

    A configuration of critical warn. See escalations_warn 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 prometheus below. 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. See escalations_critical below.

    escalationsInfo Property Map

    A configuration of critical info. See escalations_info below.

    escalationsWarn Property Map

    A configuration of critical warn. See escalations_warn 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 prometheus below. 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.AlarmEscalationsCritical

    A configuration of critical alarm. See escalations_critical below.

    EscalationsInfo Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsInfo

    A configuration of critical info. See escalations_info below.

    EscalationsWarn Pulumi.AliCloud.Cms.Inputs.AlarmEscalationsWarn

    A configuration of critical warn. See escalations_warn 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.AlarmPrometheus>

    The Prometheus alert rule. See prometheus below. 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. See escalations_critical below.

    EscalationsInfo AlarmEscalationsInfoArgs

    A configuration of critical info. See escalations_info below.

    EscalationsWarn AlarmEscalationsWarnArgs

    A configuration of critical warn. See escalations_warn 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 prometheus below. 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 AlarmEscalationsCritical

    A configuration of critical alarm. See escalations_critical below.

    escalationsInfo AlarmEscalationsInfo

    A configuration of critical info. See escalations_info below.

    escalationsWarn AlarmEscalationsWarn

    A configuration of critical warn. See escalations_warn 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<AlarmPrometheus>

    The Prometheus alert rule. See prometheus below. 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 AlarmEscalationsCritical

    A configuration of critical alarm. See escalations_critical below.

    escalationsInfo AlarmEscalationsInfo

    A configuration of critical info. See escalations_info below.

    escalationsWarn AlarmEscalationsWarn

    A configuration of critical warn. See escalations_warn 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 AlarmPrometheus[]

    The Prometheus alert rule. See prometheus below. 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. See escalations_critical below.

    escalations_info AlarmEscalationsInfoArgs

    A configuration of critical info. See escalations_info below.

    escalations_warn AlarmEscalationsWarnArgs

    A configuration of critical warn. See escalations_warn 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 prometheus below. 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. See escalations_critical below.

    escalationsInfo Property Map

    A configuration of critical info. See escalations_info below.

    escalationsWarn Property Map

    A configuration of critical warn. See escalations_warn 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 prometheus below. 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, AlarmEscalationsCriticalArgs

    ComparisonOperator string

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

    Statistics string

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    Threshold string

    Critical level alarm threshold value, which must be a numeric value currently.

    Times int

    Critical level alarm retry times. Default to 3.

    ComparisonOperator string

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

    Statistics string

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    Threshold string

    Critical level alarm threshold value, which must be a numeric value currently.

    Times int

    Critical level alarm retry times. Default to 3.

    comparisonOperator String

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

    statistics String

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold String

    Critical level alarm threshold value, which must be a numeric value currently.

    times Integer

    Critical level alarm retry times. Default to 3.

    comparisonOperator string

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

    statistics string

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold string

    Critical level alarm threshold value, which must be a numeric value currently.

    times number

    Critical level alarm retry times. Default to 3.

    comparison_operator str

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

    statistics str

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold str

    Critical level alarm threshold value, which must be a numeric value currently.

    times int

    Critical level alarm retry times. Default to 3.

    comparisonOperator String

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

    statistics String

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold String

    Critical level alarm threshold value, which must be a numeric value currently.

    times Number

    Critical level alarm retry times. Default to 3.

    AlarmEscalationsInfo, AlarmEscalationsInfoArgs

    ComparisonOperator string

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

    Statistics string

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    Threshold string

    Critical level alarm threshold value, which must be a numeric value currently.

    Times int

    Critical level alarm retry times. Default to 3.

    ComparisonOperator string

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

    Statistics string

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    Threshold string

    Critical level alarm threshold value, which must be a numeric value currently.

    Times int

    Critical level alarm retry times. Default to 3.

    comparisonOperator String

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

    statistics String

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold String

    Critical level alarm threshold value, which must be a numeric value currently.

    times Integer

    Critical level alarm retry times. Default to 3.

    comparisonOperator string

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

    statistics string

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold string

    Critical level alarm threshold value, which must be a numeric value currently.

    times number

    Critical level alarm retry times. Default to 3.

    comparison_operator str

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

    statistics str

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold str

    Critical level alarm threshold value, which must be a numeric value currently.

    times int

    Critical level alarm retry times. Default to 3.

    comparisonOperator String

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

    statistics String

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold String

    Critical level alarm threshold value, which must be a numeric value currently.

    times Number

    Critical level alarm retry times. Default to 3.

    AlarmEscalationsWarn, AlarmEscalationsWarnArgs

    ComparisonOperator string

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

    Statistics string

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    Threshold string

    Critical level alarm threshold value, which must be a numeric value currently.

    Times int

    Critical level alarm retry times. Default to 3.

    ComparisonOperator string

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

    Statistics string

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    Threshold string

    Critical level alarm threshold value, which must be a numeric value currently.

    Times int

    Critical level alarm retry times. Default to 3.

    comparisonOperator String

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

    statistics String

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold String

    Critical level alarm threshold value, which must be a numeric value currently.

    times Integer

    Critical level alarm retry times. Default to 3.

    comparisonOperator string

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

    statistics string

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold string

    Critical level alarm threshold value, which must be a numeric value currently.

    times number

    Critical level alarm retry times. Default to 3.

    comparison_operator str

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

    statistics str

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold str

    Critical level alarm threshold value, which must be a numeric value currently.

    times int

    Critical level alarm retry times. Default to 3.

    comparisonOperator String

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

    statistics String

    Critical level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.

    threshold String

    Critical level alarm threshold value, which must be a numeric value currently.

    times Number

    Critical level alarm retry times. Default to 3.

    AlarmPrometheus, AlarmPrometheusArgs

    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

    The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.

    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

    The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.

    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

    The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.

    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

    The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.

    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

    The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.

    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

    The number of consecutive triggers. If the number of times that the metric values meet the trigger conditions reaches the value of this parameter, CloudMonitor sends alert notifications.

    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.

    alicloud logo
    Alibaba Cloud v3.43.1 published on Monday, Sep 11, 2023 by Pulumi