1. Packages
  2. Azure Classic
  3. API Docs
  4. monitoring
  5. ScheduledQueryRulesAlertV2

We recommend using Azure Native.

Azure Classic v5.67.1 published on Tuesday, Feb 27, 2024 by Pulumi

azure.monitoring.ScheduledQueryRulesAlertV2

Explore with Pulumi AI

azure logo

We recommend using Azure Native.

Azure Classic v5.67.1 published on Tuesday, Feb 27, 2024 by Pulumi

    Manages an AlertingAction Scheduled Query Rules Version 2 resource within Azure Monitor

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Azure = Pulumi.Azure;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Azure.Core.ResourceGroup("example", new()
        {
            Name = "example-resources",
            Location = "West Europe",
        });
    
        var exampleInsights = new Azure.AppInsights.Insights("example", new()
        {
            Name = "example-ai",
            Location = example.Location,
            ResourceGroupName = example.Name,
            ApplicationType = "web",
        });
    
        var exampleActionGroup = new Azure.Monitoring.ActionGroup("example", new()
        {
            Name = "example-mag",
            ResourceGroupName = example.Name,
            ShortName = "test mag",
        });
    
        var exampleScheduledQueryRulesAlertV2 = new Azure.Monitoring.ScheduledQueryRulesAlertV2("example", new()
        {
            Name = "example-msqrv2",
            ResourceGroupName = example.Name,
            Location = example.Location,
            EvaluationFrequency = "PT10M",
            WindowDuration = "PT10M",
            Scopes = exampleInsights.Id,
            Severity = 4,
            Criterias = new[]
            {
                new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2CriteriaArgs
                {
                    Query = @"requests
      | summarize CountByCountry=count() by client_CountryOrRegion
    ",
                    TimeAggregationMethod = "Maximum",
                    Threshold = 17.5,
                    Operator = "LessThan",
                    ResourceIdColumn = "client_CountryOrRegion",
                    MetricMeasureColumn = "CountByCountry",
                    Dimensions = new[]
                    {
                        new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2CriteriaDimensionArgs
                        {
                            Name = "client_CountryOrRegion",
                            Operator = "Exclude",
                            Values = new[]
                            {
                                "123",
                            },
                        },
                    },
                    FailingPeriods = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs
                    {
                        MinimumFailingPeriodsToTriggerAlert = 1,
                        NumberOfEvaluationPeriods = 1,
                    },
                },
            },
            AutoMitigationEnabled = true,
            WorkspaceAlertsStorageEnabled = false,
            Description = "example sqr",
            DisplayName = "example-sqr",
            Enabled = true,
            QueryTimeRangeOverride = "PT1H",
            SkipQueryValidation = true,
            Action = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2ActionArgs
            {
                ActionGroups = new[]
                {
                    exampleActionGroup.Id,
                },
                CustomProperties = 
                {
                    { "key", "value" },
                    { "key2", "value2" },
                },
            },
            Tags = 
            {
                { "key", "value" },
                { "key2", "value2" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/appinsights"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/core"
    	"github.com/pulumi/pulumi-azure/sdk/v5/go/azure/monitoring"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
    			Name:     pulumi.String("example-resources"),
    			Location: pulumi.String("West Europe"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
    			Name:              pulumi.String("example-ai"),
    			Location:          example.Location,
    			ResourceGroupName: example.Name,
    			ApplicationType:   pulumi.String("web"),
    		})
    		if err != nil {
    			return err
    		}
    		exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{
    			Name:              pulumi.String("example-mag"),
    			ResourceGroupName: example.Name,
    			ShortName:         pulumi.String("test mag"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = monitoring.NewScheduledQueryRulesAlertV2(ctx, "example", &monitoring.ScheduledQueryRulesAlertV2Args{
    			Name:                pulumi.String("example-msqrv2"),
    			ResourceGroupName:   example.Name,
    			Location:            example.Location,
    			EvaluationFrequency: pulumi.String("PT10M"),
    			WindowDuration:      pulumi.String("PT10M"),
    			Scopes:              exampleInsights.ID(),
    			Severity:            pulumi.Int(4),
    			Criterias: monitoring.ScheduledQueryRulesAlertV2CriteriaArray{
    				&monitoring.ScheduledQueryRulesAlertV2CriteriaArgs{
    					Query:                 pulumi.String("requests\n  | summarize CountByCountry=count() by client_CountryOrRegion\n"),
    					TimeAggregationMethod: pulumi.String("Maximum"),
    					Threshold:             pulumi.Float64(17.5),
    					Operator:              pulumi.String("LessThan"),
    					ResourceIdColumn:      pulumi.String("client_CountryOrRegion"),
    					MetricMeasureColumn:   pulumi.String("CountByCountry"),
    					Dimensions: monitoring.ScheduledQueryRulesAlertV2CriteriaDimensionArray{
    						&monitoring.ScheduledQueryRulesAlertV2CriteriaDimensionArgs{
    							Name:     pulumi.String("client_CountryOrRegion"),
    							Operator: pulumi.String("Exclude"),
    							Values: pulumi.StringArray{
    								pulumi.String("123"),
    							},
    						},
    					},
    					FailingPeriods: &monitoring.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs{
    						MinimumFailingPeriodsToTriggerAlert: pulumi.Int(1),
    						NumberOfEvaluationPeriods:           pulumi.Int(1),
    					},
    				},
    			},
    			AutoMitigationEnabled:         pulumi.Bool(true),
    			WorkspaceAlertsStorageEnabled: pulumi.Bool(false),
    			Description:                   pulumi.String("example sqr"),
    			DisplayName:                   pulumi.String("example-sqr"),
    			Enabled:                       pulumi.Bool(true),
    			QueryTimeRangeOverride:        pulumi.String("PT1H"),
    			SkipQueryValidation:           pulumi.Bool(true),
    			Action: &monitoring.ScheduledQueryRulesAlertV2ActionArgs{
    				ActionGroups: pulumi.StringArray{
    					exampleActionGroup.ID(),
    				},
    				CustomProperties: pulumi.StringMap{
    					"key":  pulumi.String("value"),
    					"key2": pulumi.String("value2"),
    				},
    			},
    			Tags: pulumi.StringMap{
    				"key":  pulumi.String("value"),
    				"key2": pulumi.String("value2"),
    			},
    		})
    		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.azure.core.ResourceGroup;
    import com.pulumi.azure.core.ResourceGroupArgs;
    import com.pulumi.azure.appinsights.Insights;
    import com.pulumi.azure.appinsights.InsightsArgs;
    import com.pulumi.azure.monitoring.ActionGroup;
    import com.pulumi.azure.monitoring.ActionGroupArgs;
    import com.pulumi.azure.monitoring.ScheduledQueryRulesAlertV2;
    import com.pulumi.azure.monitoring.ScheduledQueryRulesAlertV2Args;
    import com.pulumi.azure.monitoring.inputs.ScheduledQueryRulesAlertV2CriteriaArgs;
    import com.pulumi.azure.monitoring.inputs.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs;
    import com.pulumi.azure.monitoring.inputs.ScheduledQueryRulesAlertV2ActionArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var example = new ResourceGroup("example", ResourceGroupArgs.builder()        
                .name("example-resources")
                .location("West Europe")
                .build());
    
            var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()        
                .name("example-ai")
                .location(example.location())
                .resourceGroupName(example.name())
                .applicationType("web")
                .build());
    
            var exampleActionGroup = new ActionGroup("exampleActionGroup", ActionGroupArgs.builder()        
                .name("example-mag")
                .resourceGroupName(example.name())
                .shortName("test mag")
                .build());
    
            var exampleScheduledQueryRulesAlertV2 = new ScheduledQueryRulesAlertV2("exampleScheduledQueryRulesAlertV2", ScheduledQueryRulesAlertV2Args.builder()        
                .name("example-msqrv2")
                .resourceGroupName(example.name())
                .location(example.location())
                .evaluationFrequency("PT10M")
                .windowDuration("PT10M")
                .scopes(exampleInsights.id())
                .severity(4)
                .criterias(ScheduledQueryRulesAlertV2CriteriaArgs.builder()
                    .query("""
    requests
      | summarize CountByCountry=count() by client_CountryOrRegion
                    """)
                    .timeAggregationMethod("Maximum")
                    .threshold(17.5)
                    .operator("LessThan")
                    .resourceIdColumn("client_CountryOrRegion")
                    .metricMeasureColumn("CountByCountry")
                    .dimensions(ScheduledQueryRulesAlertV2CriteriaDimensionArgs.builder()
                        .name("client_CountryOrRegion")
                        .operator("Exclude")
                        .values("123")
                        .build())
                    .failingPeriods(ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs.builder()
                        .minimumFailingPeriodsToTriggerAlert(1)
                        .numberOfEvaluationPeriods(1)
                        .build())
                    .build())
                .autoMitigationEnabled(true)
                .workspaceAlertsStorageEnabled(false)
                .description("example sqr")
                .displayName("example-sqr")
                .enabled(true)
                .queryTimeRangeOverride("PT1H")
                .skipQueryValidation(true)
                .action(ScheduledQueryRulesAlertV2ActionArgs.builder()
                    .actionGroups(exampleActionGroup.id())
                    .customProperties(Map.ofEntries(
                        Map.entry("key", "value"),
                        Map.entry("key2", "value2")
                    ))
                    .build())
                .tags(Map.ofEntries(
                    Map.entry("key", "value"),
                    Map.entry("key2", "value2")
                ))
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure as azure
    
    example = azure.core.ResourceGroup("example",
        name="example-resources",
        location="West Europe")
    example_insights = azure.appinsights.Insights("example",
        name="example-ai",
        location=example.location,
        resource_group_name=example.name,
        application_type="web")
    example_action_group = azure.monitoring.ActionGroup("example",
        name="example-mag",
        resource_group_name=example.name,
        short_name="test mag")
    example_scheduled_query_rules_alert_v2 = azure.monitoring.ScheduledQueryRulesAlertV2("example",
        name="example-msqrv2",
        resource_group_name=example.name,
        location=example.location,
        evaluation_frequency="PT10M",
        window_duration="PT10M",
        scopes=example_insights.id,
        severity=4,
        criterias=[azure.monitoring.ScheduledQueryRulesAlertV2CriteriaArgs(
            query="""requests
      | summarize CountByCountry=count() by client_CountryOrRegion
    """,
            time_aggregation_method="Maximum",
            threshold=17.5,
            operator="LessThan",
            resource_id_column="client_CountryOrRegion",
            metric_measure_column="CountByCountry",
            dimensions=[azure.monitoring.ScheduledQueryRulesAlertV2CriteriaDimensionArgs(
                name="client_CountryOrRegion",
                operator="Exclude",
                values=["123"],
            )],
            failing_periods=azure.monitoring.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs(
                minimum_failing_periods_to_trigger_alert=1,
                number_of_evaluation_periods=1,
            ),
        )],
        auto_mitigation_enabled=True,
        workspace_alerts_storage_enabled=False,
        description="example sqr",
        display_name="example-sqr",
        enabled=True,
        query_time_range_override="PT1H",
        skip_query_validation=True,
        action=azure.monitoring.ScheduledQueryRulesAlertV2ActionArgs(
            action_groups=[example_action_group.id],
            custom_properties={
                "key": "value",
                "key2": "value2",
            },
        ),
        tags={
            "key": "value",
            "key2": "value2",
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure from "@pulumi/azure";
    
    const example = new azure.core.ResourceGroup("example", {
        name: "example-resources",
        location: "West Europe",
    });
    const exampleInsights = new azure.appinsights.Insights("example", {
        name: "example-ai",
        location: example.location,
        resourceGroupName: example.name,
        applicationType: "web",
    });
    const exampleActionGroup = new azure.monitoring.ActionGroup("example", {
        name: "example-mag",
        resourceGroupName: example.name,
        shortName: "test mag",
    });
    const exampleScheduledQueryRulesAlertV2 = new azure.monitoring.ScheduledQueryRulesAlertV2("example", {
        name: "example-msqrv2",
        resourceGroupName: example.name,
        location: example.location,
        evaluationFrequency: "PT10M",
        windowDuration: "PT10M",
        scopes: exampleInsights.id,
        severity: 4,
        criterias: [{
            query: `requests
      | summarize CountByCountry=count() by client_CountryOrRegion
    `,
            timeAggregationMethod: "Maximum",
            threshold: 17.5,
            operator: "LessThan",
            resourceIdColumn: "client_CountryOrRegion",
            metricMeasureColumn: "CountByCountry",
            dimensions: [{
                name: "client_CountryOrRegion",
                operator: "Exclude",
                values: ["123"],
            }],
            failingPeriods: {
                minimumFailingPeriodsToTriggerAlert: 1,
                numberOfEvaluationPeriods: 1,
            },
        }],
        autoMitigationEnabled: true,
        workspaceAlertsStorageEnabled: false,
        description: "example sqr",
        displayName: "example-sqr",
        enabled: true,
        queryTimeRangeOverride: "PT1H",
        skipQueryValidation: true,
        action: {
            actionGroups: [exampleActionGroup.id],
            customProperties: {
                key: "value",
                key2: "value2",
            },
        },
        tags: {
            key: "value",
            key2: "value2",
        },
    });
    
    resources:
      example:
        type: azure:core:ResourceGroup
        properties:
          name: example-resources
          location: West Europe
      exampleInsights:
        type: azure:appinsights:Insights
        name: example
        properties:
          name: example-ai
          location: ${example.location}
          resourceGroupName: ${example.name}
          applicationType: web
      exampleActionGroup:
        type: azure:monitoring:ActionGroup
        name: example
        properties:
          name: example-mag
          resourceGroupName: ${example.name}
          shortName: test mag
      exampleScheduledQueryRulesAlertV2:
        type: azure:monitoring:ScheduledQueryRulesAlertV2
        name: example
        properties:
          name: example-msqrv2
          resourceGroupName: ${example.name}
          location: ${example.location}
          evaluationFrequency: PT10M
          windowDuration: PT10M
          scopes: ${exampleInsights.id}
          severity: 4
          criterias:
            - query: |
                requests
                  | summarize CountByCountry=count() by client_CountryOrRegion            
              timeAggregationMethod: Maximum
              threshold: 17.5
              operator: LessThan
              resourceIdColumn: client_CountryOrRegion
              metricMeasureColumn: CountByCountry
              dimensions:
                - name: client_CountryOrRegion
                  operator: Exclude
                  values:
                    - '123'
              failingPeriods:
                minimumFailingPeriodsToTriggerAlert: 1
                numberOfEvaluationPeriods: 1
          autoMitigationEnabled: true
          workspaceAlertsStorageEnabled: false
          description: example sqr
          displayName: example-sqr
          enabled: true
          queryTimeRangeOverride: PT1H
          skipQueryValidation: true
          action:
            actionGroups:
              - ${exampleActionGroup.id}
            customProperties:
              key: value
              key2: value2
          tags:
            key: value
            key2: value2
    

    Create ScheduledQueryRulesAlertV2 Resource

    new ScheduledQueryRulesAlertV2(name: string, args: ScheduledQueryRulesAlertV2Args, opts?: CustomResourceOptions);
    @overload
    def ScheduledQueryRulesAlertV2(resource_name: str,
                                   opts: Optional[ResourceOptions] = None,
                                   action: Optional[ScheduledQueryRulesAlertV2ActionArgs] = None,
                                   auto_mitigation_enabled: Optional[bool] = None,
                                   criterias: Optional[Sequence[ScheduledQueryRulesAlertV2CriteriaArgs]] = None,
                                   description: Optional[str] = None,
                                   display_name: Optional[str] = None,
                                   enabled: Optional[bool] = None,
                                   evaluation_frequency: Optional[str] = None,
                                   location: Optional[str] = None,
                                   mute_actions_after_alert_duration: Optional[str] = None,
                                   name: Optional[str] = None,
                                   query_time_range_override: Optional[str] = None,
                                   resource_group_name: Optional[str] = None,
                                   scopes: Optional[str] = None,
                                   severity: Optional[int] = None,
                                   skip_query_validation: Optional[bool] = None,
                                   tags: Optional[Mapping[str, str]] = None,
                                   target_resource_types: Optional[Sequence[str]] = None,
                                   window_duration: Optional[str] = None,
                                   workspace_alerts_storage_enabled: Optional[bool] = None)
    @overload
    def ScheduledQueryRulesAlertV2(resource_name: str,
                                   args: ScheduledQueryRulesAlertV2Args,
                                   opts: Optional[ResourceOptions] = None)
    func NewScheduledQueryRulesAlertV2(ctx *Context, name string, args ScheduledQueryRulesAlertV2Args, opts ...ResourceOption) (*ScheduledQueryRulesAlertV2, error)
    public ScheduledQueryRulesAlertV2(string name, ScheduledQueryRulesAlertV2Args args, CustomResourceOptions? opts = null)
    public ScheduledQueryRulesAlertV2(String name, ScheduledQueryRulesAlertV2Args args)
    public ScheduledQueryRulesAlertV2(String name, ScheduledQueryRulesAlertV2Args args, CustomResourceOptions options)
    
    type: azure:monitoring:ScheduledQueryRulesAlertV2
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ScheduledQueryRulesAlertV2Args
    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 ScheduledQueryRulesAlertV2Args
    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 ScheduledQueryRulesAlertV2Args
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScheduledQueryRulesAlertV2Args
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScheduledQueryRulesAlertV2Args
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ScheduledQueryRulesAlertV2 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 ScheduledQueryRulesAlertV2 resource accepts the following input properties:

    Criterias List<ScheduledQueryRulesAlertV2Criteria>
    A criteria block as defined below.
    ResourceGroupName string
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    Scopes string
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    Severity int
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    WindowDuration string
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    Action ScheduledQueryRulesAlertV2Action
    An action block as defined below.
    AutoMitigationEnabled bool
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    Description string
    Specifies the description of the scheduled query rule.
    DisplayName string
    Specifies the display name of the alert rule.
    Enabled bool
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    EvaluationFrequency string

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    Location string
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    MuteActionsAfterAlertDuration string

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    Name string
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    QueryTimeRangeOverride string

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    SkipQueryValidation bool
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    TargetResourceTypes List<string>
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    WorkspaceAlertsStorageEnabled bool
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    Criterias []ScheduledQueryRulesAlertV2CriteriaArgs
    A criteria block as defined below.
    ResourceGroupName string
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    Scopes string
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    Severity int
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    WindowDuration string
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    Action ScheduledQueryRulesAlertV2ActionArgs
    An action block as defined below.
    AutoMitigationEnabled bool
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    Description string
    Specifies the description of the scheduled query rule.
    DisplayName string
    Specifies the display name of the alert rule.
    Enabled bool
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    EvaluationFrequency string

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    Location string
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    MuteActionsAfterAlertDuration string

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    Name string
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    QueryTimeRangeOverride string

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    SkipQueryValidation bool
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    Tags map[string]string
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    TargetResourceTypes []string
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    WorkspaceAlertsStorageEnabled bool
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    criterias List<ScheduledQueryRulesAlertV2Criteria>
    A criteria block as defined below.
    resourceGroupName String
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    scopes String
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    severity Integer
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    windowDuration String
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    action ScheduledQueryRulesAlertV2Action
    An action block as defined below.
    autoMitigationEnabled Boolean
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    description String
    Specifies the description of the scheduled query rule.
    displayName String
    Specifies the display name of the alert rule.
    enabled Boolean
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    evaluationFrequency String

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    location String
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    muteActionsAfterAlertDuration String

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    name String
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    queryTimeRangeOverride String

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    skipQueryValidation Boolean
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    targetResourceTypes List<String>
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    workspaceAlertsStorageEnabled Boolean
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    criterias ScheduledQueryRulesAlertV2Criteria[]
    A criteria block as defined below.
    resourceGroupName string
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    scopes string
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    severity number
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    windowDuration string
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    action ScheduledQueryRulesAlertV2Action
    An action block as defined below.
    autoMitigationEnabled boolean
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    description string
    Specifies the description of the scheduled query rule.
    displayName string
    Specifies the display name of the alert rule.
    enabled boolean
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    evaluationFrequency string

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    location string
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    muteActionsAfterAlertDuration string

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    name string
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    queryTimeRangeOverride string

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    skipQueryValidation boolean
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    targetResourceTypes string[]
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    workspaceAlertsStorageEnabled boolean
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    criterias Sequence[ScheduledQueryRulesAlertV2CriteriaArgs]
    A criteria block as defined below.
    resource_group_name str
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    scopes str
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    severity int
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    window_duration str
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    action ScheduledQueryRulesAlertV2ActionArgs
    An action block as defined below.
    auto_mitigation_enabled bool
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    description str
    Specifies the description of the scheduled query rule.
    display_name str
    Specifies the display name of the alert rule.
    enabled bool
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    evaluation_frequency str

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    location str
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    mute_actions_after_alert_duration str

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    name str
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    query_time_range_override str

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    skip_query_validation bool
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    target_resource_types Sequence[str]
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    workspace_alerts_storage_enabled bool
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    criterias List<Property Map>
    A criteria block as defined below.
    resourceGroupName String
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    scopes String
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    severity Number
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    windowDuration String
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    action Property Map
    An action block as defined below.
    autoMitigationEnabled Boolean
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    description String
    Specifies the description of the scheduled query rule.
    displayName String
    Specifies the display name of the alert rule.
    enabled Boolean
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    evaluationFrequency String

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    location String
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    muteActionsAfterAlertDuration String

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    name String
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    queryTimeRangeOverride String

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    skipQueryValidation Boolean
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    tags Map<String>
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    targetResourceTypes List<String>
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    workspaceAlertsStorageEnabled Boolean
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.

    Outputs

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

    CreatedWithApiVersion string
    The api-version used when creating this alert rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsALegacyLogAnalyticsRule bool
    True if this alert rule is a legacy Log Analytic Rule.
    IsWorkspaceAlertsStorageConfigured bool
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    CreatedWithApiVersion string
    The api-version used when creating this alert rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsALegacyLogAnalyticsRule bool
    True if this alert rule is a legacy Log Analytic Rule.
    IsWorkspaceAlertsStorageConfigured bool
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    createdWithApiVersion String
    The api-version used when creating this alert rule.
    id String
    The provider-assigned unique ID for this managed resource.
    isALegacyLogAnalyticsRule Boolean
    True if this alert rule is a legacy Log Analytic Rule.
    isWorkspaceAlertsStorageConfigured Boolean
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    createdWithApiVersion string
    The api-version used when creating this alert rule.
    id string
    The provider-assigned unique ID for this managed resource.
    isALegacyLogAnalyticsRule boolean
    True if this alert rule is a legacy Log Analytic Rule.
    isWorkspaceAlertsStorageConfigured boolean
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    created_with_api_version str
    The api-version used when creating this alert rule.
    id str
    The provider-assigned unique ID for this managed resource.
    is_a_legacy_log_analytics_rule bool
    True if this alert rule is a legacy Log Analytic Rule.
    is_workspace_alerts_storage_configured bool
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    createdWithApiVersion String
    The api-version used when creating this alert rule.
    id String
    The provider-assigned unique ID for this managed resource.
    isALegacyLogAnalyticsRule Boolean
    True if this alert rule is a legacy Log Analytic Rule.
    isWorkspaceAlertsStorageConfigured Boolean
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.

    Look up Existing ScheduledQueryRulesAlertV2 Resource

    Get an existing ScheduledQueryRulesAlertV2 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?: ScheduledQueryRulesAlertV2State, opts?: CustomResourceOptions): ScheduledQueryRulesAlertV2
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[ScheduledQueryRulesAlertV2ActionArgs] = None,
            auto_mitigation_enabled: Optional[bool] = None,
            created_with_api_version: Optional[str] = None,
            criterias: Optional[Sequence[ScheduledQueryRulesAlertV2CriteriaArgs]] = None,
            description: Optional[str] = None,
            display_name: Optional[str] = None,
            enabled: Optional[bool] = None,
            evaluation_frequency: Optional[str] = None,
            is_a_legacy_log_analytics_rule: Optional[bool] = None,
            is_workspace_alerts_storage_configured: Optional[bool] = None,
            location: Optional[str] = None,
            mute_actions_after_alert_duration: Optional[str] = None,
            name: Optional[str] = None,
            query_time_range_override: Optional[str] = None,
            resource_group_name: Optional[str] = None,
            scopes: Optional[str] = None,
            severity: Optional[int] = None,
            skip_query_validation: Optional[bool] = None,
            tags: Optional[Mapping[str, str]] = None,
            target_resource_types: Optional[Sequence[str]] = None,
            window_duration: Optional[str] = None,
            workspace_alerts_storage_enabled: Optional[bool] = None) -> ScheduledQueryRulesAlertV2
    func GetScheduledQueryRulesAlertV2(ctx *Context, name string, id IDInput, state *ScheduledQueryRulesAlertV2State, opts ...ResourceOption) (*ScheduledQueryRulesAlertV2, error)
    public static ScheduledQueryRulesAlertV2 Get(string name, Input<string> id, ScheduledQueryRulesAlertV2State? state, CustomResourceOptions? opts = null)
    public static ScheduledQueryRulesAlertV2 get(String name, Output<String> id, ScheduledQueryRulesAlertV2State 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:
    Action ScheduledQueryRulesAlertV2Action
    An action block as defined below.
    AutoMitigationEnabled bool
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    CreatedWithApiVersion string
    The api-version used when creating this alert rule.
    Criterias List<ScheduledQueryRulesAlertV2Criteria>
    A criteria block as defined below.
    Description string
    Specifies the description of the scheduled query rule.
    DisplayName string
    Specifies the display name of the alert rule.
    Enabled bool
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    EvaluationFrequency string

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    IsALegacyLogAnalyticsRule bool
    True if this alert rule is a legacy Log Analytic Rule.
    IsWorkspaceAlertsStorageConfigured bool
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    Location string
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    MuteActionsAfterAlertDuration string

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    Name string
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    QueryTimeRangeOverride string

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    ResourceGroupName string
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    Scopes string
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    Severity int
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    SkipQueryValidation bool
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    Tags Dictionary<string, string>
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    TargetResourceTypes List<string>
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    WindowDuration string
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    WorkspaceAlertsStorageEnabled bool
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    Action ScheduledQueryRulesAlertV2ActionArgs
    An action block as defined below.
    AutoMitigationEnabled bool
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    CreatedWithApiVersion string
    The api-version used when creating this alert rule.
    Criterias []ScheduledQueryRulesAlertV2CriteriaArgs
    A criteria block as defined below.
    Description string
    Specifies the description of the scheduled query rule.
    DisplayName string
    Specifies the display name of the alert rule.
    Enabled bool
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    EvaluationFrequency string

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    IsALegacyLogAnalyticsRule bool
    True if this alert rule is a legacy Log Analytic Rule.
    IsWorkspaceAlertsStorageConfigured bool
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    Location string
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    MuteActionsAfterAlertDuration string

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    Name string
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    QueryTimeRangeOverride string

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    ResourceGroupName string
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    Scopes string
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    Severity int
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    SkipQueryValidation bool
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    Tags map[string]string
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    TargetResourceTypes []string
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    WindowDuration string
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    WorkspaceAlertsStorageEnabled bool
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    action ScheduledQueryRulesAlertV2Action
    An action block as defined below.
    autoMitigationEnabled Boolean
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    createdWithApiVersion String
    The api-version used when creating this alert rule.
    criterias List<ScheduledQueryRulesAlertV2Criteria>
    A criteria block as defined below.
    description String
    Specifies the description of the scheduled query rule.
    displayName String
    Specifies the display name of the alert rule.
    enabled Boolean
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    evaluationFrequency String

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    isALegacyLogAnalyticsRule Boolean
    True if this alert rule is a legacy Log Analytic Rule.
    isWorkspaceAlertsStorageConfigured Boolean
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    location String
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    muteActionsAfterAlertDuration String

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    name String
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    queryTimeRangeOverride String

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    resourceGroupName String
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    scopes String
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    severity Integer
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    skipQueryValidation Boolean
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    tags Map<String,String>
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    targetResourceTypes List<String>
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    windowDuration String
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    workspaceAlertsStorageEnabled Boolean
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    action ScheduledQueryRulesAlertV2Action
    An action block as defined below.
    autoMitigationEnabled boolean
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    createdWithApiVersion string
    The api-version used when creating this alert rule.
    criterias ScheduledQueryRulesAlertV2Criteria[]
    A criteria block as defined below.
    description string
    Specifies the description of the scheduled query rule.
    displayName string
    Specifies the display name of the alert rule.
    enabled boolean
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    evaluationFrequency string

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    isALegacyLogAnalyticsRule boolean
    True if this alert rule is a legacy Log Analytic Rule.
    isWorkspaceAlertsStorageConfigured boolean
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    location string
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    muteActionsAfterAlertDuration string

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    name string
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    queryTimeRangeOverride string

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    resourceGroupName string
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    scopes string
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    severity number
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    skipQueryValidation boolean
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    tags {[key: string]: string}
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    targetResourceTypes string[]
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    windowDuration string
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    workspaceAlertsStorageEnabled boolean
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    action ScheduledQueryRulesAlertV2ActionArgs
    An action block as defined below.
    auto_mitigation_enabled bool
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    created_with_api_version str
    The api-version used when creating this alert rule.
    criterias Sequence[ScheduledQueryRulesAlertV2CriteriaArgs]
    A criteria block as defined below.
    description str
    Specifies the description of the scheduled query rule.
    display_name str
    Specifies the display name of the alert rule.
    enabled bool
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    evaluation_frequency str

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    is_a_legacy_log_analytics_rule bool
    True if this alert rule is a legacy Log Analytic Rule.
    is_workspace_alerts_storage_configured bool
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    location str
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    mute_actions_after_alert_duration str

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    name str
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    query_time_range_override str

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    resource_group_name str
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    scopes str
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    severity int
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    skip_query_validation bool
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    tags Mapping[str, str]
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    target_resource_types Sequence[str]
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    window_duration str
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    workspace_alerts_storage_enabled bool
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.
    action Property Map
    An action block as defined below.
    autoMitigationEnabled Boolean
    Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be true or false. The default is false.
    createdWithApiVersion String
    The api-version used when creating this alert rule.
    criterias List<Property Map>
    A criteria block as defined below.
    description String
    Specifies the description of the scheduled query rule.
    displayName String
    Specifies the display name of the alert rule.
    enabled Boolean
    Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be true or false. Defaults to true.
    evaluationFrequency String

    How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D.

    Note evaluation_frequency cannot be greater than the query look back which is window_duration*number_of_evaluation_periods.

    Note evaluation_frequency cannot be greater than the mute_actions_after_alert_duration.

    isALegacyLogAnalyticsRule Boolean
    True if this alert rule is a legacy Log Analytic Rule.
    isWorkspaceAlertsStorageConfigured Boolean
    The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
    location String
    Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    muteActionsAfterAlertDuration String

    Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note auto_mitigation_enabled and mute_actions_after_alert_duration are mutually exclusive and cannot both be set.

    name String
    Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
    queryTimeRangeOverride String

    Set this if the alert evaluation period is different from the query time range. If not specified, the value is window_duration*number_of_evaluation_periods. Possible values are PT5M, PT10M, PT15M, PT20M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D and P2D.

    Note query_time_range_override cannot be less than the query look back which is window_duration*number_of_evaluation_periods.

    resourceGroupName String
    Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
    scopes String
    Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
    severity Number
    Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
    skipQueryValidation Boolean
    Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
    tags Map<String>
    A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
    targetResourceTypes List<String>
    List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria.
    windowDuration String
    Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If evaluation_frequency is PT1M, possible values are PT1M, PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, and PT6H. Otherwise, possible values are PT5M, PT10M, PT15M, PT30M, PT45M, PT1H, PT2H, PT3H, PT4H, PT5H, PT6H, P1D, and P2D.
    workspaceAlertsStorageEnabled Boolean
    Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be true or false. The default is false.

    Supporting Types

    ScheduledQueryRulesAlertV2Action, ScheduledQueryRulesAlertV2ActionArgs

    ActionGroups List<string>
    List of Action Group resource IDs to invoke when the alert fires.
    CustomProperties Dictionary<string, string>
    Specifies the properties of an alert payload.
    ActionGroups []string
    List of Action Group resource IDs to invoke when the alert fires.
    CustomProperties map[string]string
    Specifies the properties of an alert payload.
    actionGroups List<String>
    List of Action Group resource IDs to invoke when the alert fires.
    customProperties Map<String,String>
    Specifies the properties of an alert payload.
    actionGroups string[]
    List of Action Group resource IDs to invoke when the alert fires.
    customProperties {[key: string]: string}
    Specifies the properties of an alert payload.
    action_groups Sequence[str]
    List of Action Group resource IDs to invoke when the alert fires.
    custom_properties Mapping[str, str]
    Specifies the properties of an alert payload.
    actionGroups List<String>
    List of Action Group resource IDs to invoke when the alert fires.
    customProperties Map<String>
    Specifies the properties of an alert payload.

    ScheduledQueryRulesAlertV2Criteria, ScheduledQueryRulesAlertV2CriteriaArgs

    Operator string
    Specifies the criteria operator. Possible values are Equal, GreaterThan, GreaterThanOrEqual, LessThan,and LessThanOrEqual.
    Query string
    The query to run on logs. The results returned by this query are used to populate the alert.
    Threshold double
    Specifies the criteria threshold value that activates the alert.
    TimeAggregationMethod string
    The type of aggregation to apply to the data points in aggregation granularity. Possible values are Average, Count, Maximum, Minimum,and Total.
    Dimensions List<ScheduledQueryRulesAlertV2CriteriaDimension>
    A dimension block as defined below.
    FailingPeriods ScheduledQueryRulesAlertV2CriteriaFailingPeriods
    A failing_periods block as defined below.
    MetricMeasureColumn string

    Specifies the column containing the metric measure number.

    Note metric_measure_column is required if time_aggregation_method is Average, Maximum, Minimum, or Total. And metric_measure_column can not be specified if time_aggregation_method is Count.

    ResourceIdColumn string
    Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
    Operator string
    Specifies the criteria operator. Possible values are Equal, GreaterThan, GreaterThanOrEqual, LessThan,and LessThanOrEqual.
    Query string
    The query to run on logs. The results returned by this query are used to populate the alert.
    Threshold float64
    Specifies the criteria threshold value that activates the alert.
    TimeAggregationMethod string
    The type of aggregation to apply to the data points in aggregation granularity. Possible values are Average, Count, Maximum, Minimum,and Total.
    Dimensions []ScheduledQueryRulesAlertV2CriteriaDimension
    A dimension block as defined below.
    FailingPeriods ScheduledQueryRulesAlertV2CriteriaFailingPeriods
    A failing_periods block as defined below.
    MetricMeasureColumn string

    Specifies the column containing the metric measure number.

    Note metric_measure_column is required if time_aggregation_method is Average, Maximum, Minimum, or Total. And metric_measure_column can not be specified if time_aggregation_method is Count.

    ResourceIdColumn string
    Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
    operator String
    Specifies the criteria operator. Possible values are Equal, GreaterThan, GreaterThanOrEqual, LessThan,and LessThanOrEqual.
    query String
    The query to run on logs. The results returned by this query are used to populate the alert.
    threshold Double
    Specifies the criteria threshold value that activates the alert.
    timeAggregationMethod String
    The type of aggregation to apply to the data points in aggregation granularity. Possible values are Average, Count, Maximum, Minimum,and Total.
    dimensions List<ScheduledQueryRulesAlertV2CriteriaDimension>
    A dimension block as defined below.
    failingPeriods ScheduledQueryRulesAlertV2CriteriaFailingPeriods
    A failing_periods block as defined below.
    metricMeasureColumn String

    Specifies the column containing the metric measure number.

    Note metric_measure_column is required if time_aggregation_method is Average, Maximum, Minimum, or Total. And metric_measure_column can not be specified if time_aggregation_method is Count.

    resourceIdColumn String
    Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
    operator string
    Specifies the criteria operator. Possible values are Equal, GreaterThan, GreaterThanOrEqual, LessThan,and LessThanOrEqual.
    query string
    The query to run on logs. The results returned by this query are used to populate the alert.
    threshold number
    Specifies the criteria threshold value that activates the alert.
    timeAggregationMethod string
    The type of aggregation to apply to the data points in aggregation granularity. Possible values are Average, Count, Maximum, Minimum,and Total.
    dimensions ScheduledQueryRulesAlertV2CriteriaDimension[]
    A dimension block as defined below.
    failingPeriods ScheduledQueryRulesAlertV2CriteriaFailingPeriods
    A failing_periods block as defined below.
    metricMeasureColumn string

    Specifies the column containing the metric measure number.

    Note metric_measure_column is required if time_aggregation_method is Average, Maximum, Minimum, or Total. And metric_measure_column can not be specified if time_aggregation_method is Count.

    resourceIdColumn string
    Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
    operator str
    Specifies the criteria operator. Possible values are Equal, GreaterThan, GreaterThanOrEqual, LessThan,and LessThanOrEqual.
    query str
    The query to run on logs. The results returned by this query are used to populate the alert.
    threshold float
    Specifies the criteria threshold value that activates the alert.
    time_aggregation_method str
    The type of aggregation to apply to the data points in aggregation granularity. Possible values are Average, Count, Maximum, Minimum,and Total.
    dimensions Sequence[ScheduledQueryRulesAlertV2CriteriaDimension]
    A dimension block as defined below.
    failing_periods ScheduledQueryRulesAlertV2CriteriaFailingPeriods
    A failing_periods block as defined below.
    metric_measure_column str

    Specifies the column containing the metric measure number.

    Note metric_measure_column is required if time_aggregation_method is Average, Maximum, Minimum, or Total. And metric_measure_column can not be specified if time_aggregation_method is Count.

    resource_id_column str
    Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
    operator String
    Specifies the criteria operator. Possible values are Equal, GreaterThan, GreaterThanOrEqual, LessThan,and LessThanOrEqual.
    query String
    The query to run on logs. The results returned by this query are used to populate the alert.
    threshold Number
    Specifies the criteria threshold value that activates the alert.
    timeAggregationMethod String
    The type of aggregation to apply to the data points in aggregation granularity. Possible values are Average, Count, Maximum, Minimum,and Total.
    dimensions List<Property Map>
    A dimension block as defined below.
    failingPeriods Property Map
    A failing_periods block as defined below.
    metricMeasureColumn String

    Specifies the column containing the metric measure number.

    Note metric_measure_column is required if time_aggregation_method is Average, Maximum, Minimum, or Total. And metric_measure_column can not be specified if time_aggregation_method is Count.

    resourceIdColumn String
    Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.

    ScheduledQueryRulesAlertV2CriteriaDimension, ScheduledQueryRulesAlertV2CriteriaDimensionArgs

    Name string
    Name of the dimension.
    Operator string
    Operator for dimension values. Possible values are Exclude,and Include.
    Values List<string>
    List of dimension values. Use a wildcard * to collect all.
    Name string
    Name of the dimension.
    Operator string
    Operator for dimension values. Possible values are Exclude,and Include.
    Values []string
    List of dimension values. Use a wildcard * to collect all.
    name String
    Name of the dimension.
    operator String
    Operator for dimension values. Possible values are Exclude,and Include.
    values List<String>
    List of dimension values. Use a wildcard * to collect all.
    name string
    Name of the dimension.
    operator string
    Operator for dimension values. Possible values are Exclude,and Include.
    values string[]
    List of dimension values. Use a wildcard * to collect all.
    name str
    Name of the dimension.
    operator str
    Operator for dimension values. Possible values are Exclude,and Include.
    values Sequence[str]
    List of dimension values. Use a wildcard * to collect all.
    name String
    Name of the dimension.
    operator String
    Operator for dimension values. Possible values are Exclude,and Include.
    values List<String>
    List of dimension values. Use a wildcard * to collect all.

    ScheduledQueryRulesAlertV2CriteriaFailingPeriods, ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs

    MinimumFailingPeriodsToTriggerAlert int
    Specifies the number of violations to trigger an alert. Should be smaller or equal to number_of_evaluation_periods. Possible value is integer between 1 and 6.
    NumberOfEvaluationPeriods int

    Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity window_duration and the selected number of aggregated points. Possible value is integer between 1 and 6.

    Note The query look back which is window_duration*number_of_evaluation_periods cannot exceed 48 hours.

    Note number_of_evaluation_periods must be 1 for queries that do not project timestamp column

    MinimumFailingPeriodsToTriggerAlert int
    Specifies the number of violations to trigger an alert. Should be smaller or equal to number_of_evaluation_periods. Possible value is integer between 1 and 6.
    NumberOfEvaluationPeriods int

    Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity window_duration and the selected number of aggregated points. Possible value is integer between 1 and 6.

    Note The query look back which is window_duration*number_of_evaluation_periods cannot exceed 48 hours.

    Note number_of_evaluation_periods must be 1 for queries that do not project timestamp column

    minimumFailingPeriodsToTriggerAlert Integer
    Specifies the number of violations to trigger an alert. Should be smaller or equal to number_of_evaluation_periods. Possible value is integer between 1 and 6.
    numberOfEvaluationPeriods Integer

    Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity window_duration and the selected number of aggregated points. Possible value is integer between 1 and 6.

    Note The query look back which is window_duration*number_of_evaluation_periods cannot exceed 48 hours.

    Note number_of_evaluation_periods must be 1 for queries that do not project timestamp column

    minimumFailingPeriodsToTriggerAlert number
    Specifies the number of violations to trigger an alert. Should be smaller or equal to number_of_evaluation_periods. Possible value is integer between 1 and 6.
    numberOfEvaluationPeriods number

    Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity window_duration and the selected number of aggregated points. Possible value is integer between 1 and 6.

    Note The query look back which is window_duration*number_of_evaluation_periods cannot exceed 48 hours.

    Note number_of_evaluation_periods must be 1 for queries that do not project timestamp column

    minimum_failing_periods_to_trigger_alert int
    Specifies the number of violations to trigger an alert. Should be smaller or equal to number_of_evaluation_periods. Possible value is integer between 1 and 6.
    number_of_evaluation_periods int

    Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity window_duration and the selected number of aggregated points. Possible value is integer between 1 and 6.

    Note The query look back which is window_duration*number_of_evaluation_periods cannot exceed 48 hours.

    Note number_of_evaluation_periods must be 1 for queries that do not project timestamp column

    minimumFailingPeriodsToTriggerAlert Number
    Specifies the number of violations to trigger an alert. Should be smaller or equal to number_of_evaluation_periods. Possible value is integer between 1 and 6.
    numberOfEvaluationPeriods Number

    Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity window_duration and the selected number of aggregated points. Possible value is integer between 1 and 6.

    Note The query look back which is window_duration*number_of_evaluation_periods cannot exceed 48 hours.

    Note number_of_evaluation_periods must be 1 for queries that do not project timestamp column

    Import

    Monitor Scheduled Query Rule Alert can be imported using the resource id, e.g.

    $ pulumi import azure:monitoring/scheduledQueryRulesAlertV2:ScheduledQueryRulesAlertV2 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Insights/scheduledQueryRules/rule1
    

    Package Details

    Repository
    Azure Classic pulumi/pulumi-azure
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azurerm Terraform Provider.
    azure logo

    We recommend using Azure Native.

    Azure Classic v5.67.1 published on Tuesday, Feb 27, 2024 by Pulumi