1. Packages
  2. Azure Native v1
  3. API Docs
  4. insights
  5. ScheduledQueryRule
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

azure-native.insights.ScheduledQueryRule

Explore with Pulumi AI

azure-native-v1 logo
These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi

    The Log Search Rule resource. API Version: 2018-04-16.

    Example Usage

    Create or Update rule - AlertingAction

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var scheduledQueryRule = new AzureNative.Insights.ScheduledQueryRule("scheduledQueryRule", new()
        {
            Action = new AzureNative.Insights.Inputs.AlertingActionArgs
            {
                AznsAction = new AzureNative.Insights.Inputs.AzNsActionGroupArgs
                {
                    ActionGroup = new[] {},
                    CustomWebhookPayload = "{}",
                    EmailSubject = "Email Header",
                },
                OdataType = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
                Severity = "1",
                Trigger = new AzureNative.Insights.Inputs.TriggerConditionArgs
                {
                    MetricTrigger = new AzureNative.Insights.Inputs.LogMetricTriggerArgs
                    {
                        MetricColumn = "Computer",
                        MetricTriggerType = "Consecutive",
                        Threshold = 5,
                        ThresholdOperator = "GreaterThan",
                    },
                    Threshold = 3,
                    ThresholdOperator = "GreaterThan",
                },
            },
            Description = "log alert description",
            Enabled = "true",
            Location = "eastus",
            ResourceGroupName = "Rac46PostSwapRG",
            RuleName = "logalertfoo",
            Schedule = new AzureNative.Insights.Inputs.ScheduleArgs
            {
                FrequencyInMinutes = 15,
                TimeWindowInMinutes = 15,
            },
            Source = new AzureNative.Insights.Inputs.SourceArgs
            {
                DataSourceId = "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace",
                Query = "Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)",
                QueryType = "ResultCount",
            },
            Tags = null,
        });
    
    });
    
    package main
    
    import (
    	insights "github.com/pulumi/pulumi-azure-native-sdk/insights"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := insights.NewScheduledQueryRule(ctx, "scheduledQueryRule", &insights.ScheduledQueryRuleArgs{
    			Action: insights.AlertingAction{
    				AznsAction: insights.AzNsActionGroup{
    					ActionGroup:          []interface{}{},
    					CustomWebhookPayload: "{}",
    					EmailSubject:         "Email Header",
    				},
    				OdataType: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
    				Severity:  "1",
    				Trigger: insights.TriggerCondition{
    					MetricTrigger: insights.LogMetricTrigger{
    						MetricColumn:      "Computer",
    						MetricTriggerType: "Consecutive",
    						Threshold:         5,
    						ThresholdOperator: "GreaterThan",
    					},
    					Threshold:         3,
    					ThresholdOperator: "GreaterThan",
    				},
    			},
    			Description:       pulumi.String("log alert description"),
    			Enabled:           pulumi.String("true"),
    			Location:          pulumi.String("eastus"),
    			ResourceGroupName: pulumi.String("Rac46PostSwapRG"),
    			RuleName:          pulumi.String("logalertfoo"),
    			Schedule: &insights.ScheduleArgs{
    				FrequencyInMinutes:  pulumi.Int(15),
    				TimeWindowInMinutes: pulumi.Int(15),
    			},
    			Source: &insights.SourceArgs{
    				DataSourceId: pulumi.String("/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace"),
    				Query:        pulumi.String("Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)"),
    				QueryType:    pulumi.String("ResultCount"),
    			},
    			Tags: nil,
    		})
    		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.azurenative.insights.ScheduledQueryRule;
    import com.pulumi.azurenative.insights.ScheduledQueryRuleArgs;
    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 scheduledQueryRule = new ScheduledQueryRule("scheduledQueryRule", ScheduledQueryRuleArgs.builder()        
                .action(Map.ofEntries(
                    Map.entry("aznsAction", Map.ofEntries(
                        Map.entry("actionGroup", ),
                        Map.entry("customWebhookPayload", "{}"),
                        Map.entry("emailSubject", "Email Header")
                    )),
                    Map.entry("odataType", "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"),
                    Map.entry("severity", "1"),
                    Map.entry("trigger", Map.ofEntries(
                        Map.entry("metricTrigger", Map.ofEntries(
                            Map.entry("metricColumn", "Computer"),
                            Map.entry("metricTriggerType", "Consecutive"),
                            Map.entry("threshold", 5),
                            Map.entry("thresholdOperator", "GreaterThan")
                        )),
                        Map.entry("threshold", 3),
                        Map.entry("thresholdOperator", "GreaterThan")
                    ))
                ))
                .description("log alert description")
                .enabled("true")
                .location("eastus")
                .resourceGroupName("Rac46PostSwapRG")
                .ruleName("logalertfoo")
                .schedule(Map.ofEntries(
                    Map.entry("frequencyInMinutes", 15),
                    Map.entry("timeWindowInMinutes", 15)
                ))
                .source(Map.ofEntries(
                    Map.entry("dataSourceId", "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace"),
                    Map.entry("query", "Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)"),
                    Map.entry("queryType", "ResultCount")
                ))
                .tags()
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    scheduled_query_rule = azure_native.insights.ScheduledQueryRule("scheduledQueryRule",
        action=azure_native.insights.AlertingActionArgs(
            azns_action=azure_native.insights.AzNsActionGroupArgs(
                action_group=[],
                custom_webhook_payload="{}",
                email_subject="Email Header",
            ),
            odata_type="Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
            severity="1",
            trigger=azure_native.insights.TriggerConditionArgs(
                metric_trigger=azure_native.insights.LogMetricTriggerArgs(
                    metric_column="Computer",
                    metric_trigger_type="Consecutive",
                    threshold=5,
                    threshold_operator="GreaterThan",
                ),
                threshold=3,
                threshold_operator="GreaterThan",
            ),
        ),
        description="log alert description",
        enabled="true",
        location="eastus",
        resource_group_name="Rac46PostSwapRG",
        rule_name="logalertfoo",
        schedule=azure_native.insights.ScheduleArgs(
            frequency_in_minutes=15,
            time_window_in_minutes=15,
        ),
        source=azure_native.insights.SourceArgs(
            data_source_id="/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace",
            query="Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)",
            query_type="ResultCount",
        ),
        tags={})
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const scheduledQueryRule = new azure_native.insights.ScheduledQueryRule("scheduledQueryRule", {
        action: {
            aznsAction: {
                actionGroup: [],
                customWebhookPayload: "{}",
                emailSubject: "Email Header",
            },
            odataType: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
            severity: "1",
            trigger: {
                metricTrigger: {
                    metricColumn: "Computer",
                    metricTriggerType: "Consecutive",
                    threshold: 5,
                    thresholdOperator: "GreaterThan",
                },
                threshold: 3,
                thresholdOperator: "GreaterThan",
            },
        },
        description: "log alert description",
        enabled: "true",
        location: "eastus",
        resourceGroupName: "Rac46PostSwapRG",
        ruleName: "logalertfoo",
        schedule: {
            frequencyInMinutes: 15,
            timeWindowInMinutes: 15,
        },
        source: {
            dataSourceId: "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace",
            query: "Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)",
            queryType: "ResultCount",
        },
        tags: {},
    });
    
    resources:
      scheduledQueryRule:
        type: azure-native:insights:ScheduledQueryRule
        properties:
          action:
            aznsAction:
              actionGroup: []
              customWebhookPayload: '{}'
              emailSubject: Email Header
            odataType: Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction
            severity: '1'
            trigger:
              metricTrigger:
                metricColumn: Computer
                metricTriggerType: Consecutive
                threshold: 5
                thresholdOperator: GreaterThan
              threshold: 3
              thresholdOperator: GreaterThan
          description: log alert description
          enabled: 'true'
          location: eastus
          resourceGroupName: Rac46PostSwapRG
          ruleName: logalertfoo
          schedule:
            frequencyInMinutes: 15
            timeWindowInMinutes: 15
          source:
            dataSourceId: /subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace
            query: Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
            queryType: ResultCount
          tags: {}
    

    Create or Update rule - AlertingAction with Cross-Resource

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var scheduledQueryRule = new AzureNative.Insights.ScheduledQueryRule("scheduledQueryRule", new()
        {
            Action = new AzureNative.Insights.Inputs.AlertingActionArgs
            {
                AznsAction = new AzureNative.Insights.Inputs.AzNsActionGroupArgs
                {
                    ActionGroup = new[]
                    {
                        "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag",
                    },
                    EmailSubject = "Cross Resource Mail!!",
                },
                OdataType = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
                Severity = "3",
                Trigger = new AzureNative.Insights.Inputs.TriggerConditionArgs
                {
                    Threshold = 5000,
                    ThresholdOperator = "GreaterThan",
                },
            },
            Description = "Sample Cross Resource alert",
            Enabled = "true",
            Location = "eastus",
            ResourceGroupName = "Rac46PostSwapRG",
            RuleName = "SampleCrossResourceAlert",
            Schedule = new AzureNative.Insights.Inputs.ScheduleArgs
            {
                FrequencyInMinutes = 60,
                TimeWindowInMinutes = 60,
            },
            Source = new AzureNative.Insights.Inputs.SourceArgs
            {
                AuthorizedResources = new[]
                {
                    "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace",
                    "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI",
                },
                DataSourceId = "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI",
                Query = "union requests, workspace(\"sampleWorkspace\").Update",
                QueryType = "ResultCount",
            },
            Tags = null,
        });
    
    });
    
    package main
    
    import (
    	insights "github.com/pulumi/pulumi-azure-native-sdk/insights"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := insights.NewScheduledQueryRule(ctx, "scheduledQueryRule", &insights.ScheduledQueryRuleArgs{
    			Action: insights.AlertingAction{
    				AznsAction: insights.AzNsActionGroup{
    					ActionGroup: []string{
    						"/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag",
    					},
    					EmailSubject: "Cross Resource Mail!!",
    				},
    				OdataType: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
    				Severity:  "3",
    				Trigger: insights.TriggerCondition{
    					Threshold:         5000,
    					ThresholdOperator: "GreaterThan",
    				},
    			},
    			Description:       pulumi.String("Sample Cross Resource alert"),
    			Enabled:           pulumi.String("true"),
    			Location:          pulumi.String("eastus"),
    			ResourceGroupName: pulumi.String("Rac46PostSwapRG"),
    			RuleName:          pulumi.String("SampleCrossResourceAlert"),
    			Schedule: &insights.ScheduleArgs{
    				FrequencyInMinutes:  pulumi.Int(60),
    				TimeWindowInMinutes: pulumi.Int(60),
    			},
    			Source: &insights.SourceArgs{
    				AuthorizedResources: pulumi.StringArray{
    					pulumi.String("/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace"),
    					pulumi.String("/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI"),
    				},
    				DataSourceId: pulumi.String("/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI"),
    				Query:        pulumi.String("union requests, workspace(\"sampleWorkspace\").Update"),
    				QueryType:    pulumi.String("ResultCount"),
    			},
    			Tags: nil,
    		})
    		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.azurenative.insights.ScheduledQueryRule;
    import com.pulumi.azurenative.insights.ScheduledQueryRuleArgs;
    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 scheduledQueryRule = new ScheduledQueryRule("scheduledQueryRule", ScheduledQueryRuleArgs.builder()        
                .action(Map.ofEntries(
                    Map.entry("aznsAction", Map.ofEntries(
                        Map.entry("actionGroup", "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag"),
                        Map.entry("emailSubject", "Cross Resource Mail!!")
                    )),
                    Map.entry("odataType", "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction"),
                    Map.entry("severity", "3"),
                    Map.entry("trigger", Map.ofEntries(
                        Map.entry("threshold", 5000),
                        Map.entry("thresholdOperator", "GreaterThan")
                    ))
                ))
                .description("Sample Cross Resource alert")
                .enabled("true")
                .location("eastus")
                .resourceGroupName("Rac46PostSwapRG")
                .ruleName("SampleCrossResourceAlert")
                .schedule(Map.ofEntries(
                    Map.entry("frequencyInMinutes", 60),
                    Map.entry("timeWindowInMinutes", 60)
                ))
                .source(Map.ofEntries(
                    Map.entry("authorizedResources",                 
                        "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace",
                        "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI"),
                    Map.entry("dataSourceId", "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI"),
                    Map.entry("query", "union requests, workspace(\"sampleWorkspace\").Update"),
                    Map.entry("queryType", "ResultCount")
                ))
                .tags()
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    scheduled_query_rule = azure_native.insights.ScheduledQueryRule("scheduledQueryRule",
        action=azure_native.insights.AlertingActionArgs(
            azns_action=azure_native.insights.AzNsActionGroupArgs(
                action_group=["/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag"],
                email_subject="Cross Resource Mail!!",
            ),
            odata_type="Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
            severity="3",
            trigger=azure_native.insights.TriggerConditionArgs(
                threshold=5000,
                threshold_operator="GreaterThan",
            ),
        ),
        description="Sample Cross Resource alert",
        enabled="true",
        location="eastus",
        resource_group_name="Rac46PostSwapRG",
        rule_name="SampleCrossResourceAlert",
        schedule=azure_native.insights.ScheduleArgs(
            frequency_in_minutes=60,
            time_window_in_minutes=60,
        ),
        source=azure_native.insights.SourceArgs(
            authorized_resources=[
                "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace",
                "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI",
            ],
            data_source_id="/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI",
            query="union requests, workspace(\"sampleWorkspace\").Update",
            query_type="ResultCount",
        ),
        tags={})
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const scheduledQueryRule = new azure_native.insights.ScheduledQueryRule("scheduledQueryRule", {
        action: {
            aznsAction: {
                actionGroup: ["/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag"],
                emailSubject: "Cross Resource Mail!!",
            },
            odataType: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
            severity: "3",
            trigger: {
                threshold: 5000,
                thresholdOperator: "GreaterThan",
            },
        },
        description: "Sample Cross Resource alert",
        enabled: "true",
        location: "eastus",
        resourceGroupName: "Rac46PostSwapRG",
        ruleName: "SampleCrossResourceAlert",
        schedule: {
            frequencyInMinutes: 60,
            timeWindowInMinutes: 60,
        },
        source: {
            authorizedResources: [
                "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace",
                "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI",
            ],
            dataSourceId: "/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI",
            query: "union requests, workspace(\"sampleWorkspace\").Update",
            queryType: "ResultCount",
        },
        tags: {},
    });
    
    resources:
      scheduledQueryRule:
        type: azure-native:insights:ScheduledQueryRule
        properties:
          action:
            aznsAction:
              actionGroup:
                - /subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/actiongroups/test-ag
              emailSubject: Cross Resource Mail!!
            odataType: Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction
            severity: '3'
            trigger:
              threshold: 5000
              thresholdOperator: GreaterThan
          description: Sample Cross Resource alert
          enabled: 'true'
          location: eastus
          resourceGroupName: Rac46PostSwapRG
          ruleName: SampleCrossResourceAlert
          schedule:
            frequencyInMinutes: 60
            timeWindowInMinutes: 60
          source:
            authorizedResources:
              - /subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.OperationalInsights/workspaces/sampleWorkspace
              - /subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI
            dataSourceId: /subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/microsoft.insights/components/sampleAI
            query: union requests, workspace("sampleWorkspace").Update
            queryType: ResultCount
          tags: {}
    

    Create or Update rule - LogToMetricAction

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AzureNative = Pulumi.AzureNative;
    
    return await Deployment.RunAsync(() => 
    {
        var scheduledQueryRule = new AzureNative.Insights.ScheduledQueryRule("scheduledQueryRule", new()
        {
            Action = new AzureNative.Insights.Inputs.LogToMetricActionArgs
            {
                Criteria = new[]
                {
                    new AzureNative.Insights.Inputs.CriteriaArgs
                    {
                        Dimensions = new[] {},
                        MetricName = "Average_% Idle Time",
                    },
                },
                OdataType = "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction",
            },
            Description = "log to metric description",
            Enabled = "true",
            Location = "West Europe",
            ResourceGroupName = "alertsweu",
            RuleName = "logtometricfoo",
            Source = new AzureNative.Insights.Inputs.SourceArgs
            {
                DataSourceId = "/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu",
            },
            Tags = null,
        });
    
    });
    
    package main
    
    import (
    	insights "github.com/pulumi/pulumi-azure-native-sdk/insights"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := insights.NewScheduledQueryRule(ctx, "scheduledQueryRule", &insights.ScheduledQueryRuleArgs{
    			Action: insights.LogToMetricAction{
    				Criteria: []insights.Criteria{
    					{
    						Dimensions: []insights.Dimension{},
    						MetricName: "Average_% Idle Time",
    					},
    				},
    				OdataType: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction",
    			},
    			Description:       pulumi.String("log to metric description"),
    			Enabled:           pulumi.String("true"),
    			Location:          pulumi.String("West Europe"),
    			ResourceGroupName: pulumi.String("alertsweu"),
    			RuleName:          pulumi.String("logtometricfoo"),
    			Source: &insights.SourceArgs{
    				DataSourceId: pulumi.String("/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu"),
    			},
    			Tags: nil,
    		})
    		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.azurenative.insights.ScheduledQueryRule;
    import com.pulumi.azurenative.insights.ScheduledQueryRuleArgs;
    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 scheduledQueryRule = new ScheduledQueryRule("scheduledQueryRule", ScheduledQueryRuleArgs.builder()        
                .action(Map.ofEntries(
                    Map.entry("criteria", Map.ofEntries(
                        Map.entry("dimensions", ),
                        Map.entry("metricName", "Average_% Idle Time")
                    )),
                    Map.entry("odataType", "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction")
                ))
                .description("log to metric description")
                .enabled("true")
                .location("West Europe")
                .resourceGroupName("alertsweu")
                .ruleName("logtometricfoo")
                .source(Map.of("dataSourceId", "/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu"))
                .tags()
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_azure_native as azure_native
    
    scheduled_query_rule = azure_native.insights.ScheduledQueryRule("scheduledQueryRule",
        action=azure_native.insights.LogToMetricActionArgs(
            criteria=[azure_native.insights.CriteriaArgs(
                dimensions=[],
                metric_name="Average_% Idle Time",
            )],
            odata_type="Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction",
        ),
        description="log to metric description",
        enabled="true",
        location="West Europe",
        resource_group_name="alertsweu",
        rule_name="logtometricfoo",
        source=azure_native.insights.SourceArgs(
            data_source_id="/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu",
        ),
        tags={})
    
    import * as pulumi from "@pulumi/pulumi";
    import * as azure_native from "@pulumi/azure-native";
    
    const scheduledQueryRule = new azure_native.insights.ScheduledQueryRule("scheduledQueryRule", {
        action: {
            criteria: [{
                dimensions: [],
                metricName: "Average_% Idle Time",
            }],
            odataType: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction",
        },
        description: "log to metric description",
        enabled: "true",
        location: "West Europe",
        resourceGroupName: "alertsweu",
        ruleName: "logtometricfoo",
        source: {
            dataSourceId: "/subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu",
        },
        tags: {},
    });
    
    resources:
      scheduledQueryRule:
        type: azure-native:insights:ScheduledQueryRule
        properties:
          action:
            criteria:
              - dimensions: []
                metricName: Average_% Idle Time
            odataType: Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.LogToMetricAction
          description: log to metric description
          enabled: 'true'
          location: West Europe
          resourceGroupName: alertsweu
          ruleName: logtometricfoo
          source:
            dataSourceId: /subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/Microsoft.OperationalInsights/workspaces/alertsweu
          tags: {}
    

    Create ScheduledQueryRule Resource

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

    Constructor syntax

    new ScheduledQueryRule(name: string, args: ScheduledQueryRuleArgs, opts?: CustomResourceOptions);
    @overload
    def ScheduledQueryRule(resource_name: str,
                           args: ScheduledQueryRuleArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScheduledQueryRule(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           action: Optional[Union[AlertingActionArgs, LogToMetricActionArgs]] = None,
                           resource_group_name: Optional[str] = None,
                           source: Optional[SourceArgs] = None,
                           auto_mitigate: Optional[bool] = None,
                           description: Optional[str] = None,
                           display_name: Optional[str] = None,
                           enabled: Optional[Union[str, Enabled]] = None,
                           location: Optional[str] = None,
                           rule_name: Optional[str] = None,
                           schedule: Optional[ScheduleArgs] = None,
                           tags: Optional[Mapping[str, str]] = None)
    func NewScheduledQueryRule(ctx *Context, name string, args ScheduledQueryRuleArgs, opts ...ResourceOption) (*ScheduledQueryRule, error)
    public ScheduledQueryRule(string name, ScheduledQueryRuleArgs args, CustomResourceOptions? opts = null)
    public ScheduledQueryRule(String name, ScheduledQueryRuleArgs args)
    public ScheduledQueryRule(String name, ScheduledQueryRuleArgs args, CustomResourceOptions options)
    
    type: azure-native:insights:ScheduledQueryRule
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

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

    Constructor example

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

    var scheduledQueryRuleResource = new AzureNative.Insights.ScheduledQueryRule("scheduledQueryRuleResource", new()
    {
        Action = 
        {
            { "odataType", "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction" },
            { "severity", "string" },
            { "trigger", 
            {
                { "threshold", 0 },
                { "thresholdOperator", "string" },
                { "metricTrigger", 
                {
                    { "metricColumn", "string" },
                    { "metricTriggerType", "string" },
                    { "threshold", 0 },
                    { "thresholdOperator", "string" },
                } },
            } },
            { "aznsAction", 
            {
                { "actionGroup", new[]
                {
                    "string",
                } },
                { "customWebhookPayload", "string" },
                { "emailSubject", "string" },
            } },
            { "throttlingInMin", 0 },
        },
        ResourceGroupName = "string",
        Source = 
        {
            { "dataSourceId", "string" },
            { "authorizedResources", new[]
            {
                "string",
            } },
            { "query", "string" },
            { "queryType", "string" },
        },
        AutoMitigate = false,
        Description = "string",
        DisplayName = "string",
        Enabled = "string",
        Location = "string",
        RuleName = "string",
        Schedule = 
        {
            { "frequencyInMinutes", 0 },
            { "timeWindowInMinutes", 0 },
        },
        Tags = 
        {
            { "string", "string" },
        },
    });
    
    example, err := insights.NewScheduledQueryRule(ctx, "scheduledQueryRuleResource", &insights.ScheduledQueryRuleArgs{
    	Action: map[string]interface{}{
    		"odataType": "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
    		"severity":  "string",
    		"trigger": map[string]interface{}{
    			"threshold":         0,
    			"thresholdOperator": "string",
    			"metricTrigger": map[string]interface{}{
    				"metricColumn":      "string",
    				"metricTriggerType": "string",
    				"threshold":         0,
    				"thresholdOperator": "string",
    			},
    		},
    		"aznsAction": map[string]interface{}{
    			"actionGroup": []string{
    				"string",
    			},
    			"customWebhookPayload": "string",
    			"emailSubject":         "string",
    		},
    		"throttlingInMin": 0,
    	},
    	ResourceGroupName: "string",
    	Source: map[string]interface{}{
    		"dataSourceId": "string",
    		"authorizedResources": []string{
    			"string",
    		},
    		"query":     "string",
    		"queryType": "string",
    	},
    	AutoMitigate: false,
    	Description:  "string",
    	DisplayName:  "string",
    	Enabled:      "string",
    	Location:     "string",
    	RuleName:     "string",
    	Schedule: map[string]interface{}{
    		"frequencyInMinutes":  0,
    		"timeWindowInMinutes": 0,
    	},
    	Tags: map[string]interface{}{
    		"string": "string",
    	},
    })
    
    var scheduledQueryRuleResource = new ScheduledQueryRule("scheduledQueryRuleResource", ScheduledQueryRuleArgs.builder()
        .action(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .resourceGroupName("string")
        .source(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .autoMitigate(false)
        .description("string")
        .displayName("string")
        .enabled("string")
        .location("string")
        .ruleName("string")
        .schedule(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .tags(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
        .build());
    
    scheduled_query_rule_resource = azure_native.insights.ScheduledQueryRule("scheduledQueryRuleResource",
        action={
            odataType: Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction,
            severity: string,
            trigger: {
                threshold: 0,
                thresholdOperator: string,
                metricTrigger: {
                    metricColumn: string,
                    metricTriggerType: string,
                    threshold: 0,
                    thresholdOperator: string,
                },
            },
            aznsAction: {
                actionGroup: [string],
                customWebhookPayload: string,
                emailSubject: string,
            },
            throttlingInMin: 0,
        },
        resource_group_name=string,
        source={
            dataSourceId: string,
            authorizedResources: [string],
            query: string,
            queryType: string,
        },
        auto_mitigate=False,
        description=string,
        display_name=string,
        enabled=string,
        location=string,
        rule_name=string,
        schedule={
            frequencyInMinutes: 0,
            timeWindowInMinutes: 0,
        },
        tags={
            string: string,
        })
    
    const scheduledQueryRuleResource = new azure_native.insights.ScheduledQueryRule("scheduledQueryRuleResource", {
        action: {
            odataType: "Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction",
            severity: "string",
            trigger: {
                threshold: 0,
                thresholdOperator: "string",
                metricTrigger: {
                    metricColumn: "string",
                    metricTriggerType: "string",
                    threshold: 0,
                    thresholdOperator: "string",
                },
            },
            aznsAction: {
                actionGroup: ["string"],
                customWebhookPayload: "string",
                emailSubject: "string",
            },
            throttlingInMin: 0,
        },
        resourceGroupName: "string",
        source: {
            dataSourceId: "string",
            authorizedResources: ["string"],
            query: "string",
            queryType: "string",
        },
        autoMitigate: false,
        description: "string",
        displayName: "string",
        enabled: "string",
        location: "string",
        ruleName: "string",
        schedule: {
            frequencyInMinutes: 0,
            timeWindowInMinutes: 0,
        },
        tags: {
            string: "string",
        },
    });
    
    type: azure-native:insights:ScheduledQueryRule
    properties:
        action:
            aznsAction:
                actionGroup:
                    - string
                customWebhookPayload: string
                emailSubject: string
            odataType: Microsoft.WindowsAzure.Management.Monitoring.Alerts.Models.Microsoft.AppInsights.Nexus.DataContracts.Resources.ScheduledQueryRules.AlertingAction
            severity: string
            throttlingInMin: 0
            trigger:
                metricTrigger:
                    metricColumn: string
                    metricTriggerType: string
                    threshold: 0
                    thresholdOperator: string
                threshold: 0
                thresholdOperator: string
        autoMitigate: false
        description: string
        displayName: string
        enabled: string
        location: string
        resourceGroupName: string
        ruleName: string
        schedule:
            frequencyInMinutes: 0
            timeWindowInMinutes: 0
        source:
            authorizedResources:
                - string
            dataSourceId: string
            query: string
            queryType: string
        tags:
            string: string
    

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

    Action Pulumi.AzureNative.Insights.Inputs.AlertingAction | Pulumi.AzureNative.Insights.Inputs.LogToMetricAction
    Action needs to be taken on rule execution.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Source Pulumi.AzureNative.Insights.Inputs.Source
    Data Source against which rule will Query Data
    AutoMitigate bool
    The flag that indicates whether the alert should be automatically resolved or not. The default is false.
    Description string
    The description of the Log Search rule.
    DisplayName string
    The display name of the alert rule
    Enabled string | Pulumi.AzureNative.Insights.Enabled
    The flag which indicates whether the Log Search rule is enabled. Value should be true or false
    Location string
    Resource location
    RuleName string
    The name of the rule.
    Schedule Pulumi.AzureNative.Insights.Inputs.Schedule
    Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction
    Tags Dictionary<string, string>
    Resource tags
    Action AlertingActionArgs | LogToMetricActionArgs
    Action needs to be taken on rule execution.
    ResourceGroupName string
    The name of the resource group. The name is case insensitive.
    Source SourceArgs
    Data Source against which rule will Query Data
    AutoMitigate bool
    The flag that indicates whether the alert should be automatically resolved or not. The default is false.
    Description string
    The description of the Log Search rule.
    DisplayName string
    The display name of the alert rule
    Enabled string | Enabled
    The flag which indicates whether the Log Search rule is enabled. Value should be true or false
    Location string
    Resource location
    RuleName string
    The name of the rule.
    Schedule ScheduleArgs
    Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction
    Tags map[string]string
    Resource tags
    action AlertingAction | LogToMetricAction
    Action needs to be taken on rule execution.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    source Source
    Data Source against which rule will Query Data
    autoMitigate Boolean
    The flag that indicates whether the alert should be automatically resolved or not. The default is false.
    description String
    The description of the Log Search rule.
    displayName String
    The display name of the alert rule
    enabled String | Enabled
    The flag which indicates whether the Log Search rule is enabled. Value should be true or false
    location String
    Resource location
    ruleName String
    The name of the rule.
    schedule Schedule
    Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction
    tags Map<String,String>
    Resource tags
    action AlertingAction | LogToMetricAction
    Action needs to be taken on rule execution.
    resourceGroupName string
    The name of the resource group. The name is case insensitive.
    source Source
    Data Source against which rule will Query Data
    autoMitigate boolean
    The flag that indicates whether the alert should be automatically resolved or not. The default is false.
    description string
    The description of the Log Search rule.
    displayName string
    The display name of the alert rule
    enabled string | Enabled
    The flag which indicates whether the Log Search rule is enabled. Value should be true or false
    location string
    Resource location
    ruleName string
    The name of the rule.
    schedule Schedule
    Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction
    tags {[key: string]: string}
    Resource tags
    action AlertingActionArgs | LogToMetricActionArgs
    Action needs to be taken on rule execution.
    resource_group_name str
    The name of the resource group. The name is case insensitive.
    source SourceArgs
    Data Source against which rule will Query Data
    auto_mitigate bool
    The flag that indicates whether the alert should be automatically resolved or not. The default is false.
    description str
    The description of the Log Search rule.
    display_name str
    The display name of the alert rule
    enabled str | Enabled
    The flag which indicates whether the Log Search rule is enabled. Value should be true or false
    location str
    Resource location
    rule_name str
    The name of the rule.
    schedule ScheduleArgs
    Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction
    tags Mapping[str, str]
    Resource tags
    action Property Map | Property Map
    Action needs to be taken on rule execution.
    resourceGroupName String
    The name of the resource group. The name is case insensitive.
    source Property Map
    Data Source against which rule will Query Data
    autoMitigate Boolean
    The flag that indicates whether the alert should be automatically resolved or not. The default is false.
    description String
    The description of the Log Search rule.
    displayName String
    The display name of the alert rule
    enabled String | "true" | "false"
    The flag which indicates whether the Log Search rule is enabled. Value should be true or false
    location String
    Resource location
    ruleName String
    The name of the rule.
    schedule Property Map
    Schedule (Frequency, Time Window) for rule. Required for action type - AlertingAction
    tags Map<String>
    Resource tags

    Outputs

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

    CreatedWithApiVersion string
    The api-version used when creating this alert rule
    Etag string
    The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsLegacyLogAnalyticsRule bool
    True if alert rule is legacy Log Analytic rule
    Kind string
    Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
    LastUpdatedTime string
    Last time the rule was updated in IS08601 format.
    Name string
    Azure resource name
    ProvisioningState string
    Provisioning state of the scheduled query rule
    Type string
    Azure resource type
    CreatedWithApiVersion string
    The api-version used when creating this alert rule
    Etag string
    The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    Id string
    The provider-assigned unique ID for this managed resource.
    IsLegacyLogAnalyticsRule bool
    True if alert rule is legacy Log Analytic rule
    Kind string
    Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
    LastUpdatedTime string
    Last time the rule was updated in IS08601 format.
    Name string
    Azure resource name
    ProvisioningState string
    Provisioning state of the scheduled query rule
    Type string
    Azure resource type
    createdWithApiVersion String
    The api-version used when creating this alert rule
    etag String
    The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    id String
    The provider-assigned unique ID for this managed resource.
    isLegacyLogAnalyticsRule Boolean
    True if alert rule is legacy Log Analytic rule
    kind String
    Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
    lastUpdatedTime String
    Last time the rule was updated in IS08601 format.
    name String
    Azure resource name
    provisioningState String
    Provisioning state of the scheduled query rule
    type String
    Azure resource type
    createdWithApiVersion string
    The api-version used when creating this alert rule
    etag string
    The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    id string
    The provider-assigned unique ID for this managed resource.
    isLegacyLogAnalyticsRule boolean
    True if alert rule is legacy Log Analytic rule
    kind string
    Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
    lastUpdatedTime string
    Last time the rule was updated in IS08601 format.
    name string
    Azure resource name
    provisioningState string
    Provisioning state of the scheduled query rule
    type string
    Azure resource type
    created_with_api_version str
    The api-version used when creating this alert rule
    etag str
    The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    id str
    The provider-assigned unique ID for this managed resource.
    is_legacy_log_analytics_rule bool
    True if alert rule is legacy Log Analytic rule
    kind str
    Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
    last_updated_time str
    Last time the rule was updated in IS08601 format.
    name str
    Azure resource name
    provisioning_state str
    Provisioning state of the scheduled query rule
    type str
    Azure resource type
    createdWithApiVersion String
    The api-version used when creating this alert rule
    etag String
    The etag field is not required. If it is provided in the response body, it must also be provided as a header per the normal etag convention. Entity tags are used for comparing two or more entities from the same requested resource. HTTP/1.1 uses entity tags in the etag (section 14.19), If-Match (section 14.24), If-None-Match (section 14.26), and If-Range (section 14.27) header fields.
    id String
    The provider-assigned unique ID for this managed resource.
    isLegacyLogAnalyticsRule Boolean
    True if alert rule is legacy Log Analytic rule
    kind String
    Metadata used by portal/tooling/etc to render different UX experiences for resources of the same type; e.g. ApiApps are a kind of Microsoft.Web/sites type. If supported, the resource provider must validate and persist this value.
    lastUpdatedTime String
    Last time the rule was updated in IS08601 format.
    name String
    Azure resource name
    provisioningState String
    Provisioning state of the scheduled query rule
    type String
    Azure resource type

    Supporting Types

    AlertSeverity, AlertSeverityArgs

    Zero
    0
    One
    1
    Two
    2
    Three
    3
    Four
    4
    AlertSeverityZero
    0
    AlertSeverityOne
    1
    AlertSeverityTwo
    2
    AlertSeverityThree
    3
    AlertSeverityFour
    4
    Zero
    0
    One
    1
    Two
    2
    Three
    3
    Four
    4
    Zero
    0
    One
    1
    Two
    2
    Three
    3
    Four
    4
    ZERO
    0
    ONE
    1
    TWO
    2
    THREE
    3
    FOUR
    4
    "0"
    0
    "1"
    1
    "2"
    2
    "3"
    3
    "4"
    4

    AlertingAction, AlertingActionArgs

    Severity string | Pulumi.AzureNative.Insights.AlertSeverity
    Severity of the alert
    Trigger Pulumi.AzureNative.Insights.Inputs.TriggerCondition
    The trigger condition that results in the alert rule being.
    AznsAction Pulumi.AzureNative.Insights.Inputs.AzNsActionGroup
    Azure action group reference.
    ThrottlingInMin int
    time (in minutes) for which Alerts should be throttled or suppressed.
    Severity string | AlertSeverity
    Severity of the alert
    Trigger TriggerCondition
    The trigger condition that results in the alert rule being.
    AznsAction AzNsActionGroup
    Azure action group reference.
    ThrottlingInMin int
    time (in minutes) for which Alerts should be throttled or suppressed.
    severity String | AlertSeverity
    Severity of the alert
    trigger TriggerCondition
    The trigger condition that results in the alert rule being.
    aznsAction AzNsActionGroup
    Azure action group reference.
    throttlingInMin Integer
    time (in minutes) for which Alerts should be throttled or suppressed.
    severity string | AlertSeverity
    Severity of the alert
    trigger TriggerCondition
    The trigger condition that results in the alert rule being.
    aznsAction AzNsActionGroup
    Azure action group reference.
    throttlingInMin number
    time (in minutes) for which Alerts should be throttled or suppressed.
    severity str | AlertSeverity
    Severity of the alert
    trigger TriggerCondition
    The trigger condition that results in the alert rule being.
    azns_action AzNsActionGroup
    Azure action group reference.
    throttling_in_min int
    time (in minutes) for which Alerts should be throttled or suppressed.
    severity String | "0" | "1" | "2" | "3" | "4"
    Severity of the alert
    trigger Property Map
    The trigger condition that results in the alert rule being.
    aznsAction Property Map
    Azure action group reference.
    throttlingInMin Number
    time (in minutes) for which Alerts should be throttled or suppressed.

    AlertingActionResponse, AlertingActionResponseArgs

    Severity string
    Severity of the alert
    Trigger Pulumi.AzureNative.Insights.Inputs.TriggerConditionResponse
    The trigger condition that results in the alert rule being.
    AznsAction Pulumi.AzureNative.Insights.Inputs.AzNsActionGroupResponse
    Azure action group reference.
    ThrottlingInMin int
    time (in minutes) for which Alerts should be throttled or suppressed.
    Severity string
    Severity of the alert
    Trigger TriggerConditionResponse
    The trigger condition that results in the alert rule being.
    AznsAction AzNsActionGroupResponse
    Azure action group reference.
    ThrottlingInMin int
    time (in minutes) for which Alerts should be throttled or suppressed.
    severity String
    Severity of the alert
    trigger TriggerConditionResponse
    The trigger condition that results in the alert rule being.
    aznsAction AzNsActionGroupResponse
    Azure action group reference.
    throttlingInMin Integer
    time (in minutes) for which Alerts should be throttled or suppressed.
    severity string
    Severity of the alert
    trigger TriggerConditionResponse
    The trigger condition that results in the alert rule being.
    aznsAction AzNsActionGroupResponse
    Azure action group reference.
    throttlingInMin number
    time (in minutes) for which Alerts should be throttled or suppressed.
    severity str
    Severity of the alert
    trigger TriggerConditionResponse
    The trigger condition that results in the alert rule being.
    azns_action AzNsActionGroupResponse
    Azure action group reference.
    throttling_in_min int
    time (in minutes) for which Alerts should be throttled or suppressed.
    severity String
    Severity of the alert
    trigger Property Map
    The trigger condition that results in the alert rule being.
    aznsAction Property Map
    Azure action group reference.
    throttlingInMin Number
    time (in minutes) for which Alerts should be throttled or suppressed.

    AzNsActionGroup, AzNsActionGroupArgs

    ActionGroup List<string>
    Azure Action Group reference.
    CustomWebhookPayload string
    Custom payload to be sent for all webhook URI in Azure action group
    EmailSubject string
    Custom subject override for all email ids in Azure action group
    ActionGroup []string
    Azure Action Group reference.
    CustomWebhookPayload string
    Custom payload to be sent for all webhook URI in Azure action group
    EmailSubject string
    Custom subject override for all email ids in Azure action group
    actionGroup List<String>
    Azure Action Group reference.
    customWebhookPayload String
    Custom payload to be sent for all webhook URI in Azure action group
    emailSubject String
    Custom subject override for all email ids in Azure action group
    actionGroup string[]
    Azure Action Group reference.
    customWebhookPayload string
    Custom payload to be sent for all webhook URI in Azure action group
    emailSubject string
    Custom subject override for all email ids in Azure action group
    action_group Sequence[str]
    Azure Action Group reference.
    custom_webhook_payload str
    Custom payload to be sent for all webhook URI in Azure action group
    email_subject str
    Custom subject override for all email ids in Azure action group
    actionGroup List<String>
    Azure Action Group reference.
    customWebhookPayload String
    Custom payload to be sent for all webhook URI in Azure action group
    emailSubject String
    Custom subject override for all email ids in Azure action group

    AzNsActionGroupResponse, AzNsActionGroupResponseArgs

    ActionGroup List<string>
    Azure Action Group reference.
    CustomWebhookPayload string
    Custom payload to be sent for all webhook URI in Azure action group
    EmailSubject string
    Custom subject override for all email ids in Azure action group
    ActionGroup []string
    Azure Action Group reference.
    CustomWebhookPayload string
    Custom payload to be sent for all webhook URI in Azure action group
    EmailSubject string
    Custom subject override for all email ids in Azure action group
    actionGroup List<String>
    Azure Action Group reference.
    customWebhookPayload String
    Custom payload to be sent for all webhook URI in Azure action group
    emailSubject String
    Custom subject override for all email ids in Azure action group
    actionGroup string[]
    Azure Action Group reference.
    customWebhookPayload string
    Custom payload to be sent for all webhook URI in Azure action group
    emailSubject string
    Custom subject override for all email ids in Azure action group
    action_group Sequence[str]
    Azure Action Group reference.
    custom_webhook_payload str
    Custom payload to be sent for all webhook URI in Azure action group
    email_subject str
    Custom subject override for all email ids in Azure action group
    actionGroup List<String>
    Azure Action Group reference.
    customWebhookPayload String
    Custom payload to be sent for all webhook URI in Azure action group
    emailSubject String
    Custom subject override for all email ids in Azure action group

    ConditionalOperator, ConditionalOperatorArgs

    GreaterThanOrEqual
    GreaterThanOrEqual
    LessThanOrEqual
    LessThanOrEqual
    GreaterThan
    GreaterThan
    LessThan
    LessThan
    Equal
    Equal
    ConditionalOperatorGreaterThanOrEqual
    GreaterThanOrEqual
    ConditionalOperatorLessThanOrEqual
    LessThanOrEqual
    ConditionalOperatorGreaterThan
    GreaterThan
    ConditionalOperatorLessThan
    LessThan
    ConditionalOperatorEqual
    Equal
    GreaterThanOrEqual
    GreaterThanOrEqual
    LessThanOrEqual
    LessThanOrEqual
    GreaterThan
    GreaterThan
    LessThan
    LessThan
    Equal
    Equal
    GreaterThanOrEqual
    GreaterThanOrEqual
    LessThanOrEqual
    LessThanOrEqual
    GreaterThan
    GreaterThan
    LessThan
    LessThan
    Equal
    Equal
    GREATER_THAN_OR_EQUAL
    GreaterThanOrEqual
    LESS_THAN_OR_EQUAL
    LessThanOrEqual
    GREATER_THAN
    GreaterThan
    LESS_THAN
    LessThan
    EQUAL
    Equal
    "GreaterThanOrEqual"
    GreaterThanOrEqual
    "LessThanOrEqual"
    LessThanOrEqual
    "GreaterThan"
    GreaterThan
    "LessThan"
    LessThan
    "Equal"
    Equal

    Criteria, CriteriaArgs

    MetricName string
    Name of the metric
    Dimensions List<Pulumi.AzureNative.Insights.Inputs.Dimension>
    List of Dimensions for creating metric
    MetricName string
    Name of the metric
    Dimensions []Dimension
    List of Dimensions for creating metric
    metricName String
    Name of the metric
    dimensions List<Dimension>
    List of Dimensions for creating metric
    metricName string
    Name of the metric
    dimensions Dimension[]
    List of Dimensions for creating metric
    metric_name str
    Name of the metric
    dimensions Sequence[Dimension]
    List of Dimensions for creating metric
    metricName String
    Name of the metric
    dimensions List<Property Map>
    List of Dimensions for creating metric

    CriteriaResponse, CriteriaResponseArgs

    MetricName string
    Name of the metric
    Dimensions List<Pulumi.AzureNative.Insights.Inputs.DimensionResponse>
    List of Dimensions for creating metric
    MetricName string
    Name of the metric
    Dimensions []DimensionResponse
    List of Dimensions for creating metric
    metricName String
    Name of the metric
    dimensions List<DimensionResponse>
    List of Dimensions for creating metric
    metricName string
    Name of the metric
    dimensions DimensionResponse[]
    List of Dimensions for creating metric
    metric_name str
    Name of the metric
    dimensions Sequence[DimensionResponse]
    List of Dimensions for creating metric
    metricName String
    Name of the metric
    dimensions List<Property Map>
    List of Dimensions for creating metric

    Dimension, DimensionArgs

    Name string
    Name of the dimension
    Operator string | Pulumi.AzureNative.Insights.Operator
    Operator for dimension values
    Values List<string>
    List of dimension values
    Name string
    Name of the dimension
    Operator string | Operator
    Operator for dimension values
    Values []string
    List of dimension values
    name String
    Name of the dimension
    operator String | Operator
    Operator for dimension values
    values List<String>
    List of dimension values
    name string
    Name of the dimension
    operator string | Operator
    Operator for dimension values
    values string[]
    List of dimension values
    name str
    Name of the dimension
    operator str | Operator
    Operator for dimension values
    values Sequence[str]
    List of dimension values
    name String
    Name of the dimension
    operator String | "Include"
    Operator for dimension values
    values List<String>
    List of dimension values

    DimensionResponse, DimensionResponseArgs

    Name string
    Name of the dimension
    Operator string
    Operator for dimension values
    Values List<string>
    List of dimension values
    Name string
    Name of the dimension
    Operator string
    Operator for dimension values
    Values []string
    List of dimension values
    name String
    Name of the dimension
    operator String
    Operator for dimension values
    values List<String>
    List of dimension values
    name string
    Name of the dimension
    operator string
    Operator for dimension values
    values string[]
    List of dimension values
    name str
    Name of the dimension
    operator str
    Operator for dimension values
    values Sequence[str]
    List of dimension values
    name String
    Name of the dimension
    operator String
    Operator for dimension values
    values List<String>
    List of dimension values

    Enabled, EnabledArgs

    @True
    true
    @False
    false
    EnabledTrue
    true
    EnabledFalse
    false
    True_
    true
    False_
    false
    True
    true
    False
    false
    TRUE
    true
    FALSE
    false
    "true"
    true
    "false"
    false

    LogMetricTrigger, LogMetricTriggerArgs

    MetricColumn string
    Evaluation of metric on a particular column
    MetricTriggerType string | Pulumi.AzureNative.Insights.MetricTriggerType
    Metric Trigger Type - 'Consecutive' or 'Total'
    Threshold double
    The threshold of the metric trigger.
    ThresholdOperator string | Pulumi.AzureNative.Insights.ConditionalOperator
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    MetricColumn string
    Evaluation of metric on a particular column
    MetricTriggerType string | MetricTriggerType
    Metric Trigger Type - 'Consecutive' or 'Total'
    Threshold float64
    The threshold of the metric trigger.
    ThresholdOperator string | ConditionalOperator
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    metricColumn String
    Evaluation of metric on a particular column
    metricTriggerType String | MetricTriggerType
    Metric Trigger Type - 'Consecutive' or 'Total'
    threshold Double
    The threshold of the metric trigger.
    thresholdOperator String | ConditionalOperator
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    metricColumn string
    Evaluation of metric on a particular column
    metricTriggerType string | MetricTriggerType
    Metric Trigger Type - 'Consecutive' or 'Total'
    threshold number
    The threshold of the metric trigger.
    thresholdOperator string | ConditionalOperator
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    metric_column str
    Evaluation of metric on a particular column
    metric_trigger_type str | MetricTriggerType
    Metric Trigger Type - 'Consecutive' or 'Total'
    threshold float
    The threshold of the metric trigger.
    threshold_operator str | ConditionalOperator
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    metricColumn String
    Evaluation of metric on a particular column
    metricTriggerType String | "Consecutive" | "Total"
    Metric Trigger Type - 'Consecutive' or 'Total'
    threshold Number
    The threshold of the metric trigger.
    thresholdOperator String | "GreaterThanOrEqual" | "LessThanOrEqual" | "GreaterThan" | "LessThan" | "Equal"
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.

    LogMetricTriggerResponse, LogMetricTriggerResponseArgs

    MetricColumn string
    Evaluation of metric on a particular column
    MetricTriggerType string
    Metric Trigger Type - 'Consecutive' or 'Total'
    Threshold double
    The threshold of the metric trigger.
    ThresholdOperator string
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    MetricColumn string
    Evaluation of metric on a particular column
    MetricTriggerType string
    Metric Trigger Type - 'Consecutive' or 'Total'
    Threshold float64
    The threshold of the metric trigger.
    ThresholdOperator string
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    metricColumn String
    Evaluation of metric on a particular column
    metricTriggerType String
    Metric Trigger Type - 'Consecutive' or 'Total'
    threshold Double
    The threshold of the metric trigger.
    thresholdOperator String
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    metricColumn string
    Evaluation of metric on a particular column
    metricTriggerType string
    Metric Trigger Type - 'Consecutive' or 'Total'
    threshold number
    The threshold of the metric trigger.
    thresholdOperator string
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    metric_column str
    Evaluation of metric on a particular column
    metric_trigger_type str
    Metric Trigger Type - 'Consecutive' or 'Total'
    threshold float
    The threshold of the metric trigger.
    threshold_operator str
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.
    metricColumn String
    Evaluation of metric on a particular column
    metricTriggerType String
    Metric Trigger Type - 'Consecutive' or 'Total'
    threshold Number
    The threshold of the metric trigger.
    thresholdOperator String
    Evaluation operation for Metric -'GreaterThan' or 'LessThan' or 'Equal'.

    LogToMetricAction, LogToMetricActionArgs

    Criteria []Criteria
    Criteria of Metric
    criteria List<Criteria>
    Criteria of Metric
    criteria Criteria[]
    Criteria of Metric
    criteria Sequence[Criteria]
    Criteria of Metric
    criteria List<Property Map>
    Criteria of Metric

    LogToMetricActionResponse, LogToMetricActionResponseArgs

    Criteria []CriteriaResponse
    Criteria of Metric
    criteria CriteriaResponse[]
    Criteria of Metric
    criteria List<Property Map>
    Criteria of Metric

    MetricTriggerType, MetricTriggerTypeArgs

    Consecutive
    Consecutive
    Total
    Total
    MetricTriggerTypeConsecutive
    Consecutive
    MetricTriggerTypeTotal
    Total
    Consecutive
    Consecutive
    Total
    Total
    Consecutive
    Consecutive
    Total
    Total
    CONSECUTIVE
    Consecutive
    TOTAL
    Total
    "Consecutive"
    Consecutive
    "Total"
    Total

    Operator, OperatorArgs

    Include
    Include
    OperatorInclude
    Include
    Include
    Include
    Include
    Include
    INCLUDE
    Include
    "Include"
    Include

    QueryType, QueryTypeArgs

    ResultCount
    ResultCount
    QueryTypeResultCount
    ResultCount
    ResultCount
    ResultCount
    ResultCount
    ResultCount
    RESULT_COUNT
    ResultCount
    "ResultCount"
    ResultCount

    Schedule, ScheduleArgs

    FrequencyInMinutes int
    frequency (in minutes) at which rule condition should be evaluated.
    TimeWindowInMinutes int
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    FrequencyInMinutes int
    frequency (in minutes) at which rule condition should be evaluated.
    TimeWindowInMinutes int
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    frequencyInMinutes Integer
    frequency (in minutes) at which rule condition should be evaluated.
    timeWindowInMinutes Integer
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    frequencyInMinutes number
    frequency (in minutes) at which rule condition should be evaluated.
    timeWindowInMinutes number
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    frequency_in_minutes int
    frequency (in minutes) at which rule condition should be evaluated.
    time_window_in_minutes int
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    frequencyInMinutes Number
    frequency (in minutes) at which rule condition should be evaluated.
    timeWindowInMinutes Number
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).

    ScheduleResponse, ScheduleResponseArgs

    FrequencyInMinutes int
    frequency (in minutes) at which rule condition should be evaluated.
    TimeWindowInMinutes int
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    FrequencyInMinutes int
    frequency (in minutes) at which rule condition should be evaluated.
    TimeWindowInMinutes int
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    frequencyInMinutes Integer
    frequency (in minutes) at which rule condition should be evaluated.
    timeWindowInMinutes Integer
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    frequencyInMinutes number
    frequency (in minutes) at which rule condition should be evaluated.
    timeWindowInMinutes number
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    frequency_in_minutes int
    frequency (in minutes) at which rule condition should be evaluated.
    time_window_in_minutes int
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).
    frequencyInMinutes Number
    frequency (in minutes) at which rule condition should be evaluated.
    timeWindowInMinutes Number
    Time window for which data needs to be fetched for query (should be greater than or equal to frequencyInMinutes).

    Source, SourceArgs

    DataSourceId string
    The resource uri over which log search query is to be run.
    AuthorizedResources List<string>
    List of Resource referred into query
    Query string
    Log search query. Required for action type - AlertingAction
    QueryType string | Pulumi.AzureNative.Insights.QueryType
    Set value to 'ResultCount' .
    DataSourceId string
    The resource uri over which log search query is to be run.
    AuthorizedResources []string
    List of Resource referred into query
    Query string
    Log search query. Required for action type - AlertingAction
    QueryType string | QueryType
    Set value to 'ResultCount' .
    dataSourceId String
    The resource uri over which log search query is to be run.
    authorizedResources List<String>
    List of Resource referred into query
    query String
    Log search query. Required for action type - AlertingAction
    queryType String | QueryType
    Set value to 'ResultCount' .
    dataSourceId string
    The resource uri over which log search query is to be run.
    authorizedResources string[]
    List of Resource referred into query
    query string
    Log search query. Required for action type - AlertingAction
    queryType string | QueryType
    Set value to 'ResultCount' .
    data_source_id str
    The resource uri over which log search query is to be run.
    authorized_resources Sequence[str]
    List of Resource referred into query
    query str
    Log search query. Required for action type - AlertingAction
    query_type str | QueryType
    Set value to 'ResultCount' .
    dataSourceId String
    The resource uri over which log search query is to be run.
    authorizedResources List<String>
    List of Resource referred into query
    query String
    Log search query. Required for action type - AlertingAction
    queryType String | "ResultCount"
    Set value to 'ResultCount' .

    SourceResponse, SourceResponseArgs

    DataSourceId string
    The resource uri over which log search query is to be run.
    AuthorizedResources List<string>
    List of Resource referred into query
    Query string
    Log search query. Required for action type - AlertingAction
    QueryType string
    Set value to 'ResultCount' .
    DataSourceId string
    The resource uri over which log search query is to be run.
    AuthorizedResources []string
    List of Resource referred into query
    Query string
    Log search query. Required for action type - AlertingAction
    QueryType string
    Set value to 'ResultCount' .
    dataSourceId String
    The resource uri over which log search query is to be run.
    authorizedResources List<String>
    List of Resource referred into query
    query String
    Log search query. Required for action type - AlertingAction
    queryType String
    Set value to 'ResultCount' .
    dataSourceId string
    The resource uri over which log search query is to be run.
    authorizedResources string[]
    List of Resource referred into query
    query string
    Log search query. Required for action type - AlertingAction
    queryType string
    Set value to 'ResultCount' .
    data_source_id str
    The resource uri over which log search query is to be run.
    authorized_resources Sequence[str]
    List of Resource referred into query
    query str
    Log search query. Required for action type - AlertingAction
    query_type str
    Set value to 'ResultCount' .
    dataSourceId String
    The resource uri over which log search query is to be run.
    authorizedResources List<String>
    List of Resource referred into query
    query String
    Log search query. Required for action type - AlertingAction
    queryType String
    Set value to 'ResultCount' .

    TriggerCondition, TriggerConditionArgs

    Threshold double
    Result or count threshold based on which rule should be triggered.
    ThresholdOperator string | Pulumi.AzureNative.Insights.ConditionalOperator
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    MetricTrigger Pulumi.AzureNative.Insights.Inputs.LogMetricTrigger
    Trigger condition for metric query rule
    Threshold float64
    Result or count threshold based on which rule should be triggered.
    ThresholdOperator string | ConditionalOperator
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    MetricTrigger LogMetricTrigger
    Trigger condition for metric query rule
    threshold Double
    Result or count threshold based on which rule should be triggered.
    thresholdOperator String | ConditionalOperator
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    metricTrigger LogMetricTrigger
    Trigger condition for metric query rule
    threshold number
    Result or count threshold based on which rule should be triggered.
    thresholdOperator string | ConditionalOperator
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    metricTrigger LogMetricTrigger
    Trigger condition for metric query rule
    threshold float
    Result or count threshold based on which rule should be triggered.
    threshold_operator str | ConditionalOperator
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    metric_trigger LogMetricTrigger
    Trigger condition for metric query rule
    threshold Number
    Result or count threshold based on which rule should be triggered.
    thresholdOperator String | "GreaterThanOrEqual" | "LessThanOrEqual" | "GreaterThan" | "LessThan" | "Equal"
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    metricTrigger Property Map
    Trigger condition for metric query rule

    TriggerConditionResponse, TriggerConditionResponseArgs

    Threshold double
    Result or count threshold based on which rule should be triggered.
    ThresholdOperator string
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    MetricTrigger Pulumi.AzureNative.Insights.Inputs.LogMetricTriggerResponse
    Trigger condition for metric query rule
    Threshold float64
    Result or count threshold based on which rule should be triggered.
    ThresholdOperator string
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    MetricTrigger LogMetricTriggerResponse
    Trigger condition for metric query rule
    threshold Double
    Result or count threshold based on which rule should be triggered.
    thresholdOperator String
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    metricTrigger LogMetricTriggerResponse
    Trigger condition for metric query rule
    threshold number
    Result or count threshold based on which rule should be triggered.
    thresholdOperator string
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    metricTrigger LogMetricTriggerResponse
    Trigger condition for metric query rule
    threshold float
    Result or count threshold based on which rule should be triggered.
    threshold_operator str
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    metric_trigger LogMetricTriggerResponse
    Trigger condition for metric query rule
    threshold Number
    Result or count threshold based on which rule should be triggered.
    thresholdOperator String
    Evaluation operation for rule - 'GreaterThan' or 'LessThan.
    metricTrigger Property Map
    Trigger condition for metric query rule

    Import

    An existing resource can be imported using its type token, name, and identifier, e.g.

    $ pulumi import azure-native:insights:ScheduledQueryRule logtometricfoo /subscriptions/af52d502-a447-4bc6-8cb7-4780fbb00490/resourceGroups/alertsweu/providers/microsoft.insights/scheduledqueryrules/logtometricfoo 
    

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

    Package Details

    Repository
    azure-native-v1 pulumi/pulumi-azure-native
    License
    Apache-2.0
    azure-native-v1 logo
    These are the docs for Azure Native v1. We recommenend using the latest version, Azure Native v2.
    Azure Native v1 v1.104.0 published on Thursday, Jul 6, 2023 by Pulumi