1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. cms
  5. Alarm
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

alicloud.cms.Alarm

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi

    Provides a Cloud Monitor Service Alarm resource.

    For information about Cloud Monitor Service Alarm and how to use it, see What is Alarm.

    NOTE: Available since v1.9.1.

    Example Usage

    Basic Usage

    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 default = alicloud.getZones({
        availableDiskCategory: "cloud_efficiency",
        availableResourceCreation: "VSwitch",
    });
    const defaultGetImages = alicloud.ecs.getImages({
        mostRecent: true,
        owners: "system",
    });
    const defaultGetInstanceTypes = Promise.all([_default, defaultGetImages]).then(([_default, defaultGetImages]) => alicloud.ecs.getInstanceTypes({
        availabilityZone: _default.zones?.[0]?.id,
        imageId: defaultGetImages.images?.[0]?.id,
    }));
    const defaultNetwork = new alicloud.vpc.Network("default", {
        vpcName: name,
        cidrBlock: "10.4.0.0/16",
    });
    const defaultSwitch = new alicloud.vpc.Switch("default", {
        vswitchName: name,
        cidrBlock: "10.4.0.0/24",
        vpcId: defaultNetwork.id,
        zoneId: _default.then(_default => _default.zones?.[0]?.id),
    });
    const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
        name: name,
        vpcId: defaultNetwork.id,
    });
    const defaultInstance = new alicloud.ecs.Instance("default", {
        availabilityZone: _default.then(_default => _default.zones?.[0]?.id),
        instanceName: name,
        imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
        instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
        securityGroups: [defaultSecurityGroup.id],
        vswitchId: defaultSwitch.id,
    });
    const defaultAlarmContactGroup = new alicloud.cms.AlarmContactGroup("default", {alarmContactGroupName: name});
    const defaultAlarm = new alicloud.cms.Alarm("default", {
        name: name,
        project: "acs_ecs_dashboard",
        metric: "disk_writebytes",
        period: 900,
        contactGroups: [defaultAlarmContactGroup.alarmContactGroupName],
        effectiveInterval: "06:00-20:00",
        metricDimensions: pulumi.interpolate`  [
        {
          "instanceId": "${defaultInstance.id}",
          "device": "/dev/vda1"
        }
      ]
    `,
        escalationsCritical: {
            statistics: "Average",
            comparisonOperator: "<=",
            threshold: "35",
            times: 2,
        },
    });
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    default = alicloud.get_zones(available_disk_category="cloud_efficiency",
        available_resource_creation="VSwitch")
    default_get_images = alicloud.ecs.get_images(most_recent=True,
        owners="system")
    default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
        image_id=default_get_images.images[0].id)
    default_network = alicloud.vpc.Network("default",
        vpc_name=name,
        cidr_block="10.4.0.0/16")
    default_switch = alicloud.vpc.Switch("default",
        vswitch_name=name,
        cidr_block="10.4.0.0/24",
        vpc_id=default_network.id,
        zone_id=default.zones[0].id)
    default_security_group = alicloud.ecs.SecurityGroup("default",
        name=name,
        vpc_id=default_network.id)
    default_instance = alicloud.ecs.Instance("default",
        availability_zone=default.zones[0].id,
        instance_name=name,
        image_id=default_get_images.images[0].id,
        instance_type=default_get_instance_types.instance_types[0].id,
        security_groups=[default_security_group.id],
        vswitch_id=default_switch.id)
    default_alarm_contact_group = alicloud.cms.AlarmContactGroup("default", alarm_contact_group_name=name)
    default_alarm = alicloud.cms.Alarm("default",
        name=name,
        project="acs_ecs_dashboard",
        metric="disk_writebytes",
        period=900,
        contact_groups=[default_alarm_contact_group.alarm_contact_group_name],
        effective_interval="06:00-20:00",
        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,
        ))
    
    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
    		}
    		_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableDiskCategory:     pulumi.StringRef("cloud_efficiency"),
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
    			MostRecent: pulumi.BoolRef(true),
    			Owners:     pulumi.StringRef("system"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
    			AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
    			ImageId:          pulumi.StringRef(defaultGetImages.Images[0].Id),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		defaultNetwork, err := vpc.NewNetwork(ctx, "default", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(name),
    			CidrBlock: pulumi.String("10.4.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
    			VswitchName: pulumi.String(name),
    			CidrBlock:   pulumi.String("10.4.0.0/24"),
    			VpcId:       defaultNetwork.ID(),
    			ZoneId:      pulumi.String(_default.Zones[0].Id),
    		})
    		if err != nil {
    			return err
    		}
    		defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
    			Name:  pulumi.String(name),
    			VpcId: defaultNetwork.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
    			AvailabilityZone: pulumi.String(_default.Zones[0].Id),
    			InstanceName:     pulumi.String(name),
    			ImageId:          pulumi.String(defaultGetImages.Images[0].Id),
    			InstanceType:     pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
    			SecurityGroups: pulumi.StringArray{
    				defaultSecurityGroup.ID(),
    			},
    			VswitchId: defaultSwitch.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		defaultAlarmContactGroup, err := cms.NewAlarmContactGroup(ctx, "default", &cms.AlarmContactGroupArgs{
    			AlarmContactGroupName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = cms.NewAlarm(ctx, "default", &cms.AlarmArgs{
    			Name:    pulumi.String(name),
    			Project: pulumi.String("acs_ecs_dashboard"),
    			Metric:  pulumi.String("disk_writebytes"),
    			Period:  pulumi.Int(900),
    			ContactGroups: pulumi.StringArray{
    				defaultAlarmContactGroup.AlarmContactGroupName,
    			},
    			EffectiveInterval: pulumi.String("06:00-20:00"),
    			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),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var @default = AliCloud.GetZones.Invoke(new()
        {
            AvailableDiskCategory = "cloud_efficiency",
            AvailableResourceCreation = "VSwitch",
        });
    
        var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
        {
            MostRecent = true,
            Owners = "system",
        });
    
        var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
        {
            AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
        });
    
        var defaultNetwork = new AliCloud.Vpc.Network("default", new()
        {
            VpcName = name,
            CidrBlock = "10.4.0.0/16",
        });
    
        var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
        {
            VswitchName = name,
            CidrBlock = "10.4.0.0/24",
            VpcId = defaultNetwork.Id,
            ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
        });
    
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
        {
            Name = name,
            VpcId = defaultNetwork.Id,
        });
    
        var defaultInstance = new AliCloud.Ecs.Instance("default", new()
        {
            AvailabilityZone = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
            InstanceName = name,
            ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
            InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
            SecurityGroups = new[]
            {
                defaultSecurityGroup.Id,
            },
            VswitchId = defaultSwitch.Id,
        });
    
        var defaultAlarmContactGroup = new AliCloud.Cms.AlarmContactGroup("default", new()
        {
            AlarmContactGroupName = name,
        });
    
        var defaultAlarm = new AliCloud.Cms.Alarm("default", new()
        {
            Name = name,
            Project = "acs_ecs_dashboard",
            Metric = "disk_writebytes",
            Period = 900,
            ContactGroups = new[]
            {
                defaultAlarmContactGroup.AlarmContactGroupName,
            },
            EffectiveInterval = "06:00-20:00",
            MetricDimensions = defaultInstance.Id.Apply(id => @$"  [
        {{
          ""instanceId"": ""{id}"",
          ""device"": ""/dev/vda1""
        }}
      ]
    "),
            EscalationsCritical = new AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs
            {
                Statistics = "Average",
                ComparisonOperator = "<=",
                Threshold = "35",
                Times = 2,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.AlicloudFunctions;
    import com.pulumi.alicloud.inputs.GetZonesArgs;
    import com.pulumi.alicloud.ecs.EcsFunctions;
    import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
    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 default = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableDiskCategory("cloud_efficiency")
                .availableResourceCreation("VSwitch")
                .build());
    
            final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
                .mostRecent(true)
                .owners("system")
                .build());
    
            final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .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(default_.zones()[0].id())
                .build());
    
            var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
                .name(name)
                .vpcId(defaultNetwork.id())
                .build());
    
            var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
                .availabilityZone(default_.zones()[0].id())
                .instanceName(name)
                .imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(defaultGetInstanceTypes.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()
                .name(name)
                .project("acs_ecs_dashboard")
                .metric("disk_writebytes")
                .period(900)
                .contactGroups(defaultAlarmContactGroup.alarmContactGroupName())
                .effectiveInterval("06:00-20:00")
                .metricDimensions(defaultInstance.id().applyValue(id -> """
      [
        {
          "instanceId": "%s",
          "device": "/dev/vda1"
        }
      ]
    ", id)))
                .escalationsCritical(AlarmEscalationsCriticalArgs.builder()
                    .statistics("Average")
                    .comparisonOperator("<=")
                    .threshold(35)
                    .times(2)
                    .build())
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      defaultNetwork:
        type: alicloud:vpc:Network
        name: default
        properties:
          vpcName: ${name}
          cidrBlock: 10.4.0.0/16
      defaultSwitch:
        type: alicloud:vpc:Switch
        name: default
        properties:
          vswitchName: ${name}
          cidrBlock: 10.4.0.0/24
          vpcId: ${defaultNetwork.id}
          zoneId: ${default.zones[0].id}
      defaultSecurityGroup:
        type: alicloud:ecs:SecurityGroup
        name: default
        properties:
          name: ${name}
          vpcId: ${defaultNetwork.id}
      defaultInstance:
        type: alicloud:ecs:Instance
        name: default
        properties:
          availabilityZone: ${default.zones[0].id}
          instanceName: ${name}
          imageId: ${defaultGetImages.images[0].id}
          instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
          securityGroups:
            - ${defaultSecurityGroup.id}
          vswitchId: ${defaultSwitch.id}
      defaultAlarmContactGroup:
        type: alicloud:cms:AlarmContactGroup
        name: default
        properties:
          alarmContactGroupName: ${name}
      defaultAlarm:
        type: alicloud:cms:Alarm
        name: default
        properties:
          name: ${name}
          project: acs_ecs_dashboard
          metric: disk_writebytes
          period: 900
          contactGroups:
            - ${defaultAlarmContactGroup.alarmContactGroupName}
          effectiveInterval: 06:00-20:00
          metricDimensions: |2
              [
                {
                  "instanceId": "${defaultInstance.id}",
                  "device": "/dev/vda1"
                }
              ]
          escalationsCritical:
            statistics: Average
            comparisonOperator: <=
            threshold: 35
            times: 2
    variables:
      default:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableDiskCategory: cloud_efficiency
            availableResourceCreation: VSwitch
      defaultGetImages:
        fn::invoke:
          Function: alicloud:ecs:getImages
          Arguments:
            mostRecent: true
            owners: system
      defaultGetInstanceTypes:
        fn::invoke:
          Function: alicloud:ecs:getInstanceTypes
          Arguments:
            availabilityZone: ${default.zones[0].id}
            imageId: ${defaultGetImages.images[0].id}
    

    Create Alarm Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Alarm(name: string, args: AlarmArgs, opts?: CustomResourceOptions);
    @overload
    def Alarm(resource_name: str,
              args: AlarmArgs,
              opts: Optional[ResourceOptions] = None)
    
    @overload
    def Alarm(resource_name: str,
              opts: Optional[ResourceOptions] = None,
              project: Optional[str] = None,
              contact_groups: Optional[Sequence[str]] = None,
              metric: Optional[str] = None,
              webhook: Optional[str] = None,
              period: Optional[int] = None,
              escalations_critical: Optional[AlarmEscalationsCriticalArgs] = None,
              escalations_info: Optional[AlarmEscalationsInfoArgs] = None,
              escalations_warn: Optional[AlarmEscalationsWarnArgs] = None,
              effective_interval: Optional[str] = None,
              dimensions: Optional[Mapping[str, Any]] = None,
              end_time: Optional[int] = None,
              name: Optional[str] = None,
              enabled: Optional[bool] = None,
              prometheuses: Optional[Sequence[AlarmPrometheusArgs]] = None,
              silence_time: Optional[int] = None,
              start_time: Optional[int] = None,
              tags: Optional[Mapping[str, Any]] = None,
              targets: Optional[Sequence[AlarmTargetArgs]] = None,
              metric_dimensions: Optional[str] = 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.
    
    

    Parameters

    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.

    Example

    The following reference example uses placeholder values for all input properties.

    var alarmResource = new AliCloud.Cms.Alarm("alarmResource", new()
    {
        Project = "string",
        ContactGroups = new[]
        {
            "string",
        },
        Metric = "string",
        Webhook = "string",
        Period = 0,
        EscalationsCritical = new AliCloud.Cms.Inputs.AlarmEscalationsCriticalArgs
        {
            ComparisonOperator = "string",
            Statistics = "string",
            Threshold = "string",
            Times = 0,
        },
        EscalationsInfo = new AliCloud.Cms.Inputs.AlarmEscalationsInfoArgs
        {
            ComparisonOperator = "string",
            Statistics = "string",
            Threshold = "string",
            Times = 0,
        },
        EscalationsWarn = new AliCloud.Cms.Inputs.AlarmEscalationsWarnArgs
        {
            ComparisonOperator = "string",
            Statistics = "string",
            Threshold = "string",
            Times = 0,
        },
        EffectiveInterval = "string",
        Name = "string",
        Enabled = false,
        Prometheuses = new[]
        {
            new AliCloud.Cms.Inputs.AlarmPrometheusArgs
            {
                Annotations = 
                {
                    { "string", "any" },
                },
                Level = "string",
                PromQl = "string",
                Times = 0,
            },
        },
        SilenceTime = 0,
        Tags = 
        {
            { "string", "any" },
        },
        Targets = new[]
        {
            new AliCloud.Cms.Inputs.AlarmTargetArgs
            {
                Arn = "string",
                JsonParams = "string",
                Level = "string",
                TargetId = "string",
            },
        },
        MetricDimensions = "string",
    });
    
    example, err := cms.NewAlarm(ctx, "alarmResource", &cms.AlarmArgs{
    	Project: pulumi.String("string"),
    	ContactGroups: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Metric:  pulumi.String("string"),
    	Webhook: pulumi.String("string"),
    	Period:  pulumi.Int(0),
    	EscalationsCritical: &cms.AlarmEscalationsCriticalArgs{
    		ComparisonOperator: pulumi.String("string"),
    		Statistics:         pulumi.String("string"),
    		Threshold:          pulumi.String("string"),
    		Times:              pulumi.Int(0),
    	},
    	EscalationsInfo: &cms.AlarmEscalationsInfoArgs{
    		ComparisonOperator: pulumi.String("string"),
    		Statistics:         pulumi.String("string"),
    		Threshold:          pulumi.String("string"),
    		Times:              pulumi.Int(0),
    	},
    	EscalationsWarn: &cms.AlarmEscalationsWarnArgs{
    		ComparisonOperator: pulumi.String("string"),
    		Statistics:         pulumi.String("string"),
    		Threshold:          pulumi.String("string"),
    		Times:              pulumi.Int(0),
    	},
    	EffectiveInterval: pulumi.String("string"),
    	Name:              pulumi.String("string"),
    	Enabled:           pulumi.Bool(false),
    	Prometheuses: cms.AlarmPrometheusArray{
    		&cms.AlarmPrometheusArgs{
    			Annotations: pulumi.Map{
    				"string": pulumi.Any("any"),
    			},
    			Level:  pulumi.String("string"),
    			PromQl: pulumi.String("string"),
    			Times:  pulumi.Int(0),
    		},
    	},
    	SilenceTime: pulumi.Int(0),
    	Tags: pulumi.Map{
    		"string": pulumi.Any("any"),
    	},
    	Targets: cms.AlarmTargetArray{
    		&cms.AlarmTargetArgs{
    			Arn:        pulumi.String("string"),
    			JsonParams: pulumi.String("string"),
    			Level:      pulumi.String("string"),
    			TargetId:   pulumi.String("string"),
    		},
    	},
    	MetricDimensions: pulumi.String("string"),
    })
    
    var alarmResource = new Alarm("alarmResource", AlarmArgs.builder()
        .project("string")
        .contactGroups("string")
        .metric("string")
        .webhook("string")
        .period(0)
        .escalationsCritical(AlarmEscalationsCriticalArgs.builder()
            .comparisonOperator("string")
            .statistics("string")
            .threshold("string")
            .times(0)
            .build())
        .escalationsInfo(AlarmEscalationsInfoArgs.builder()
            .comparisonOperator("string")
            .statistics("string")
            .threshold("string")
            .times(0)
            .build())
        .escalationsWarn(AlarmEscalationsWarnArgs.builder()
            .comparisonOperator("string")
            .statistics("string")
            .threshold("string")
            .times(0)
            .build())
        .effectiveInterval("string")
        .name("string")
        .enabled(false)
        .prometheuses(AlarmPrometheusArgs.builder()
            .annotations(Map.of("string", "any"))
            .level("string")
            .promQl("string")
            .times(0)
            .build())
        .silenceTime(0)
        .tags(Map.of("string", "any"))
        .targets(AlarmTargetArgs.builder()
            .arn("string")
            .jsonParams("string")
            .level("string")
            .targetId("string")
            .build())
        .metricDimensions("string")
        .build());
    
    alarm_resource = alicloud.cms.Alarm("alarmResource",
        project="string",
        contact_groups=["string"],
        metric="string",
        webhook="string",
        period=0,
        escalations_critical=alicloud.cms.AlarmEscalationsCriticalArgs(
            comparison_operator="string",
            statistics="string",
            threshold="string",
            times=0,
        ),
        escalations_info=alicloud.cms.AlarmEscalationsInfoArgs(
            comparison_operator="string",
            statistics="string",
            threshold="string",
            times=0,
        ),
        escalations_warn=alicloud.cms.AlarmEscalationsWarnArgs(
            comparison_operator="string",
            statistics="string",
            threshold="string",
            times=0,
        ),
        effective_interval="string",
        name="string",
        enabled=False,
        prometheuses=[alicloud.cms.AlarmPrometheusArgs(
            annotations={
                "string": "any",
            },
            level="string",
            prom_ql="string",
            times=0,
        )],
        silence_time=0,
        tags={
            "string": "any",
        },
        targets=[alicloud.cms.AlarmTargetArgs(
            arn="string",
            json_params="string",
            level="string",
            target_id="string",
        )],
        metric_dimensions="string")
    
    const alarmResource = new alicloud.cms.Alarm("alarmResource", {
        project: "string",
        contactGroups: ["string"],
        metric: "string",
        webhook: "string",
        period: 0,
        escalationsCritical: {
            comparisonOperator: "string",
            statistics: "string",
            threshold: "string",
            times: 0,
        },
        escalationsInfo: {
            comparisonOperator: "string",
            statistics: "string",
            threshold: "string",
            times: 0,
        },
        escalationsWarn: {
            comparisonOperator: "string",
            statistics: "string",
            threshold: "string",
            times: 0,
        },
        effectiveInterval: "string",
        name: "string",
        enabled: false,
        prometheuses: [{
            annotations: {
                string: "any",
            },
            level: "string",
            promQl: "string",
            times: 0,
        }],
        silenceTime: 0,
        tags: {
            string: "any",
        },
        targets: [{
            arn: "string",
            jsonParams: "string",
            level: "string",
            targetId: "string",
        }],
        metricDimensions: "string",
    });
    
    type: alicloud:cms:Alarm
    properties:
        contactGroups:
            - string
        effectiveInterval: string
        enabled: false
        escalationsCritical:
            comparisonOperator: string
            statistics: string
            threshold: string
            times: 0
        escalationsInfo:
            comparisonOperator: string
            statistics: string
            threshold: string
            times: 0
        escalationsWarn:
            comparisonOperator: string
            statistics: string
            threshold: string
            times: 0
        metric: string
        metricDimensions: string
        name: string
        period: 0
        project: string
        prometheuses:
            - annotations:
                string: any
              level: string
              promQl: string
              times: 0
        silenceTime: 0
        tags:
            string: any
        targets:
            - arn: string
              jsonParams: string
              level: string
              targetId: string
        webhook: string
    

    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
    The name of the metric, such as CPUUtilization and networkin_rate. For more information, see Metrics Reference.
    Project string
    The namespace of the cloud service, 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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    EndTime int
    Field end_time has been deprecated from provider version 1.50.0. New field 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 name of the alert rule.
    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. Default value: 86400. Valid value range: [300, 86400].
    StartTime int
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    Targets List<Pulumi.AliCloud.Cms.Inputs.AlarmTarget>
    The information about the resource for which alerts are triggered. See targets below.
    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
    The name of the metric, such as CPUUtilization and networkin_rate. For more information, see Metrics Reference.
    Project string
    The namespace of the cloud service, 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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    EndTime int
    Field end_time has been deprecated from provider version 1.50.0. New field 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 name of the alert rule.
    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. Default value: 86400. Valid value range: [300, 86400].
    StartTime int
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    Targets []AlarmTargetArgs
    The information about the resource for which alerts are triggered. See targets below.
    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
    The name of the metric, such as CPUUtilization and networkin_rate. For more information, see Metrics Reference.
    project String
    The namespace of the cloud service, 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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    endTime Integer
    Field end_time has been deprecated from provider version 1.50.0. New field 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 name of the alert rule.
    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. Default value: 86400. Valid value range: [300, 86400].
    startTime Integer
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    targets List<AlarmTarget>
    The information about the resource for which alerts are triggered. See targets below.
    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
    The name of the metric, such as CPUUtilization and networkin_rate. For more information, see Metrics Reference.
    project string
    The namespace of the cloud service, 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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    endTime number
    Field end_time has been deprecated from provider version 1.50.0. New field 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 name of the alert rule.
    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. Default value: 86400. Valid value range: [300, 86400].
    startTime number
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    targets AlarmTarget[]
    The information about the resource for which alerts are triggered. See targets below.
    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
    The name of the metric, such as CPUUtilization and networkin_rate. For more information, see Metrics Reference.
    project str
    The namespace of the cloud service, 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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    end_time int
    Field end_time has been deprecated from provider version 1.50.0. New field 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 name of the alert rule.
    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. Default value: 86400. Valid value range: [300, 86400].
    start_time int
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    targets Sequence[AlarmTargetArgs]
    The information about the resource for which alerts are triggered. See targets below.
    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
    The name of the metric, such as CPUUtilization and networkin_rate. For more information, see Metrics Reference.
    project String
    The namespace of the cloud service, 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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    endTime Number
    Field end_time has been deprecated from provider version 1.50.0. New field 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 name of the alert rule.
    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. Default value: 86400. Valid value range: [300, 86400].
    startTime Number
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    tags Map<Any>
    A mapping of tags to assign to the resource.
    targets List<Property Map>
    The information about the resource for which alerts are triggered. See targets below.
    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 status of the Alarm.
    Id string
    The provider-assigned unique ID for this managed resource.
    Status string
    The status of the Alarm.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Alarm.
    id string
    The provider-assigned unique ID for this managed resource.
    status string
    The status of the Alarm.
    id str
    The provider-assigned unique ID for this managed resource.
    status str
    The status of the Alarm.
    id String
    The provider-assigned unique ID for this managed resource.
    status String
    The status of the Alarm.

    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,
            period: Optional[int] = None,
            project: Optional[str] = None,
            prometheuses: Optional[Sequence[AlarmPrometheusArgs]] = None,
            silence_time: Optional[int] = None,
            start_time: Optional[int] = None,
            status: Optional[str] = None,
            tags: Optional[Mapping[str, Any]] = None,
            targets: Optional[Sequence[AlarmTargetArgs]] = 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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    EndTime int
    Field end_time has been deprecated from provider version 1.50.0. New field 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
    The name of the metric, 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 name of the alert rule.
    Period int
    Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
    Project string
    The namespace of the cloud service, 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. Default value: 86400. Valid value range: [300, 86400].
    StartTime int
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    Status string
    The status of the Alarm.
    Tags Dictionary<string, object>
    A mapping of tags to assign to the resource.
    Targets List<Pulumi.AliCloud.Cms.Inputs.AlarmTarget>
    The information about the resource for which alerts are triggered. See targets below.
    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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    EndTime int
    Field end_time has been deprecated from provider version 1.50.0. New field 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
    The name of the metric, 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 name of the alert rule.
    Period int
    Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
    Project string
    The namespace of the cloud service, 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. Default value: 86400. Valid value range: [300, 86400].
    StartTime int
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    Status string
    The status of the Alarm.
    Tags map[string]interface{}
    A mapping of tags to assign to the resource.
    Targets []AlarmTargetArgs
    The information about the resource for which alerts are triggered. See targets below.
    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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    endTime Integer
    Field end_time has been deprecated from provider version 1.50.0. New field 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
    The name of the metric, 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 name of the alert rule.
    period Integer
    Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
    project String
    The namespace of the cloud service, 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. Default value: 86400. Valid value range: [300, 86400].
    startTime Integer
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    status String
    The status of the Alarm.
    tags Map<String,Object>
    A mapping of tags to assign to the resource.
    targets List<AlarmTarget>
    The information about the resource for which alerts are triggered. See targets below.
    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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    endTime number
    Field end_time has been deprecated from provider version 1.50.0. New field 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
    The name of the metric, 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 name of the alert rule.
    period number
    Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
    project string
    The namespace of the cloud service, 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. Default value: 86400. Valid value range: [300, 86400].
    startTime number
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    status string
    The status of the Alarm.
    tags {[key: string]: any}
    A mapping of tags to assign to the resource.
    targets AlarmTarget[]
    The information about the resource for which alerts are triggered. See targets below.
    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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    end_time int
    Field end_time has been deprecated from provider version 1.50.0. New field 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
    The name of the metric, 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 name of the alert rule.
    period int
    Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
    project str
    The namespace of the cloud service, 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. Default value: 86400. Valid value range: [300, 86400].
    start_time int
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    status str
    The status of the Alarm.
    tags Mapping[str, Any]
    A mapping of tags to assign to the resource.
    targets Sequence[AlarmTargetArgs]
    The information about the resource for which alerts are triggered. See targets below.
    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 provider version 1.173.0. New field metric_dimensions instead.

    Deprecated: Field dimensions has been deprecated from provider version 1.173.0. New field 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 value: true.
    endTime Number
    Field end_time has been deprecated from provider version 1.50.0. New field 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
    The name of the metric, 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 name of the alert rule.
    period Number
    Index query cycle, which must be consistent with that defined for metrics. Default to 300, in seconds.
    project String
    The namespace of the cloud service, 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. Default value: 86400. Valid value range: [300, 86400].
    startTime Number
    Field start_time has been deprecated from provider version 1.50.0. New field effective_interval instead.

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

    status String
    The status of the Alarm.
    tags Map<Any>
    A mapping of tags to assign to the resource.
    targets List<Property Map>
    The information about the resource for which alerts are triggered. See targets below.
    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. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set 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 value: 3.
    ComparisonOperator string
    Critical level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set 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 value: 3.
    comparisonOperator String
    Critical level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set 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 value: 3.
    comparisonOperator string
    Critical level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set 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 value: 3.
    comparison_operator str
    Critical level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set 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 value: 3.
    comparisonOperator String
    Critical level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set 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 value: 3.

    AlarmEscalationsInfo, AlarmEscalationsInfoArgs

    ComparisonOperator string
    Info level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    Statistics string
    Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    Threshold string
    Info level alarm threshold value, which must be a numeric value currently.
    Times int
    Info level alarm retry times. Default value: 3.
    ComparisonOperator string
    Info level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    Statistics string
    Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    Threshold string
    Info level alarm threshold value, which must be a numeric value currently.
    Times int
    Info level alarm retry times. Default value: 3.
    comparisonOperator String
    Info level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    statistics String
    Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    threshold String
    Info level alarm threshold value, which must be a numeric value currently.
    times Integer
    Info level alarm retry times. Default value: 3.
    comparisonOperator string
    Info level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    statistics string
    Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    threshold string
    Info level alarm threshold value, which must be a numeric value currently.
    times number
    Info level alarm retry times. Default value: 3.
    comparison_operator str
    Info level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    statistics str
    Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    threshold str
    Info level alarm threshold value, which must be a numeric value currently.
    times int
    Info level alarm retry times. Default value: 3.
    comparisonOperator String
    Info level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    statistics String
    Info level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    threshold String
    Info level alarm threshold value, which must be a numeric value currently.
    times Number
    Info level alarm retry times. Default value: 3.

    AlarmEscalationsWarn, AlarmEscalationsWarnArgs

    ComparisonOperator string
    Warn level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    Statistics string
    Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    Threshold string
    Warn level alarm threshold value, which must be a numeric value currently.
    Times int
    Warn level alarm retry times. Default value: 3.
    ComparisonOperator string
    Warn level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    Statistics string
    Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    Threshold string
    Warn level alarm threshold value, which must be a numeric value currently.
    Times int
    Warn level alarm retry times. Default value: 3.
    comparisonOperator String
    Warn level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    statistics String
    Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    threshold String
    Warn level alarm threshold value, which must be a numeric value currently.
    times Integer
    Warn level alarm retry times. Default value: 3.
    comparisonOperator string
    Warn level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    statistics string
    Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    threshold string
    Warn level alarm threshold value, which must be a numeric value currently.
    times number
    Warn level alarm retry times. Default value: 3.
    comparison_operator str
    Warn level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    statistics str
    Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    threshold str
    Warn level alarm threshold value, which must be a numeric value currently.
    times int
    Warn level alarm retry times. Default value: 3.
    comparisonOperator String
    Warn level alarm comparison operator. Default value: >. Valid values: >, >=, <, <=, !=, GreaterThanYesterday, LessThanYesterday, GreaterThanLastWeek, LessThanLastWeek, GreaterThanLastPeriod, LessThanLastPeriod. NOTE: From version 1.225.0, comparison_operator cannot be set to ==.
    statistics String
    Warn level alarm statistics method. It must be consistent with that defined for metrics. For more information, see How to use it.
    threshold String
    Warn level alarm threshold value, which must be a numeric value currently.
    times Number
    Warn level alarm retry times. Default value: 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.

    AlarmTarget, AlarmTargetArgs

    Arn string

    The Alibaba Cloud Resource Name (ARN) of the resource.

    NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.

    JsonParams string
    The parameters of the alert callback. The parameters are in the JSON format.
    Level string
    The level of the alert. Valid values: Critical, Warn, Info.
    TargetId string
    The ID of the resource for which alerts are triggered.
    Arn string

    The Alibaba Cloud Resource Name (ARN) of the resource.

    NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.

    JsonParams string
    The parameters of the alert callback. The parameters are in the JSON format.
    Level string
    The level of the alert. Valid values: Critical, Warn, Info.
    TargetId string
    The ID of the resource for which alerts are triggered.
    arn String

    The Alibaba Cloud Resource Name (ARN) of the resource.

    NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.

    jsonParams String
    The parameters of the alert callback. The parameters are in the JSON format.
    level String
    The level of the alert. Valid values: Critical, Warn, Info.
    targetId String
    The ID of the resource for which alerts are triggered.
    arn string

    The Alibaba Cloud Resource Name (ARN) of the resource.

    NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.

    jsonParams string
    The parameters of the alert callback. The parameters are in the JSON format.
    level string
    The level of the alert. Valid values: Critical, Warn, Info.
    targetId string
    The ID of the resource for which alerts are triggered.
    arn str

    The Alibaba Cloud Resource Name (ARN) of the resource.

    NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.

    json_params str
    The parameters of the alert callback. The parameters are in the JSON format.
    level str
    The level of the alert. Valid values: Critical, Warn, Info.
    target_id str
    The ID of the resource for which alerts are triggered.
    arn String

    The Alibaba Cloud Resource Name (ARN) of the resource.

    NOTE: Currently, the Alibaba Cloud Resource Name (ARN) of the resource. To use, please submit an application.

    jsonParams String
    The parameters of the alert callback. The parameters are in the JSON format.
    level String
    The level of the alert. Valid values: Critical, Warn, Info.
    targetId String
    The ID of the resource for which alerts are triggered.

    Import

    Cloud Monitor Service Alarm can be imported using the id, e.g.

    $ pulumi import alicloud:cms/alarm:Alarm example <id>
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.57.0 published on Saturday, Jun 15, 2024 by Pulumi