ScheduledQueryRule

class ScheduledQueryRule : KotlinCustomResource

The scheduled query rule resource. Uses Azure REST API version 2023-03-15-preview. In version 1.x of the Azure Native provider, it used API version 2018-04-16. Other available API versions: 2018-04-16, 2020-05-01-preview, 2022-08-01-preview, 2023-12-01, 2024-01-01-preview, 2025-01-01-preview.

Example Usage

Create or update a scheduled query rule for Single 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()
{
Actions = new AzureNative.Insights.Inputs.ActionsArgs
{
ActionGroups = new[]
{
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
},
CustomProperties =
{
{ "key11", "value11" },
{ "key12", "value12" },
},
},
CheckWorkspaceAlertsStorageConfigured = true,
Criteria = new AzureNative.Insights.Inputs.ScheduledQueryRuleCriteriaArgs
{
AllOf = new[]
{
new AzureNative.Insights.Inputs.ConditionArgs
{
Dimensions = new[]
{
new AzureNative.Insights.Inputs.DimensionArgs
{
Name = "ComputerIp",
Operator = AzureNative.Insights.DimensionOperator.Exclude,
Values = new[]
{
"192.168.1.1",
},
},
new AzureNative.Insights.Inputs.DimensionArgs
{
Name = "OSType",
Operator = AzureNative.Insights.DimensionOperator.Include,
Values = new[]
{
"*",
},
},
},
FailingPeriods = new AzureNative.Insights.Inputs.ConditionFailingPeriodsArgs
{
MinFailingPeriodsToAlert = 1,
NumberOfEvaluationPeriods = 1,
},
MetricMeasureColumn = "% Processor Time",
Operator = AzureNative.Insights.ConditionOperator.GreaterThan,
Query = "Perf | where ObjectName == \"Processor\"",
ResourceIdColumn = "resourceId",
Threshold = 70,
TimeAggregation = AzureNative.Insights.TimeAggregation.Average,
},
},
},
Description = "Performance rule",
Enabled = true,
EvaluationFrequency = "PT5M",
Location = "eastus",
MuteActionsDuration = "PT30M",
ResolveConfiguration = new AzureNative.Insights.Inputs.RuleResolveConfigurationArgs
{
AutoResolved = true,
TimeToResolve = "PT10M",
},
ResourceGroupName = "QueryResourceGroupName",
RuleName = "perf",
Scopes = new[]
{
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1",
},
Severity = 4,
SkipQueryValidation = true,
WindowSize = "PT10M",
});
});
package main
import (
insights "github.com/pulumi/pulumi-azure-native-sdk/insights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := insights.NewScheduledQueryRule(ctx, "scheduledQueryRule", &insights.ScheduledQueryRuleArgs{
Actions: &insights.ActionsArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"),
},
CustomProperties: pulumi.StringMap{
"key11": pulumi.String("value11"),
"key12": pulumi.String("value12"),
},
},
CheckWorkspaceAlertsStorageConfigured: pulumi.Bool(true),
Criteria: &insights.ScheduledQueryRuleCriteriaArgs{
AllOf: insights.ConditionArray{
&insights.ConditionArgs{
Dimensions: insights.DimensionArray{
&insights.DimensionArgs{
Name: pulumi.String("ComputerIp"),
Operator: pulumi.String(insights.DimensionOperatorExclude),
Values: pulumi.StringArray{
pulumi.String("192.168.1.1"),
},
},
&insights.DimensionArgs{
Name: pulumi.String("OSType"),
Operator: pulumi.String(insights.DimensionOperatorInclude),
Values: pulumi.StringArray{
pulumi.String("*"),
},
},
},
FailingPeriods: &insights.ConditionFailingPeriodsArgs{
MinFailingPeriodsToAlert: pulumi.Float64(1),
NumberOfEvaluationPeriods: pulumi.Float64(1),
},
MetricMeasureColumn: pulumi.String("% Processor Time"),
Operator: pulumi.String(insights.ConditionOperatorGreaterThan),
Query: pulumi.String("Perf | where ObjectName == \"Processor\""),
ResourceIdColumn: pulumi.String("resourceId"),
Threshold: pulumi.Float64(70),
TimeAggregation: pulumi.String(insights.TimeAggregationAverage),
},
},
},
Description: pulumi.String("Performance rule"),
Enabled: pulumi.Bool(true),
EvaluationFrequency: pulumi.String("PT5M"),
Location: pulumi.String("eastus"),
MuteActionsDuration: pulumi.String("PT30M"),
ResolveConfiguration: &insights.RuleResolveConfigurationArgs{
AutoResolved: pulumi.Bool(true),
TimeToResolve: pulumi.String("PT10M"),
},
ResourceGroupName: pulumi.String("QueryResourceGroupName"),
RuleName: pulumi.String("perf"),
Scopes: pulumi.StringArray{
pulumi.String("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"),
},
Severity: pulumi.Float64(4),
SkipQueryValidation: pulumi.Bool(true),
WindowSize: pulumi.String("PT10M"),
})
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 com.pulumi.azurenative.insights.inputs.ActionsArgs;
import com.pulumi.azurenative.insights.inputs.ScheduledQueryRuleCriteriaArgs;
import com.pulumi.azurenative.insights.inputs.RuleResolveConfigurationArgs;
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()
.actions(ActionsArgs.builder()
.actionGroups("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup")
.customProperties(Map.ofEntries(
Map.entry("key11", "value11"),
Map.entry("key12", "value12")
))
.build())
.checkWorkspaceAlertsStorageConfigured(true)
.criteria(ScheduledQueryRuleCriteriaArgs.builder()
.allOf(ConditionArgs.builder()
.dimensions(
DimensionArgs.builder()
.name("ComputerIp")
.operator("Exclude")
.values("192.168.1.1")
.build(),
DimensionArgs.builder()
.name("OSType")
.operator("Include")
.values("*")
.build())
.failingPeriods(ConditionFailingPeriodsArgs.builder()
.minFailingPeriodsToAlert(1)
.numberOfEvaluationPeriods(1)
.build())
.metricMeasureColumn("% Processor Time")
.operator("GreaterThan")
.query("Perf | where ObjectName == \"Processor\"")
.resourceIdColumn("resourceId")
.threshold(70)
.timeAggregation("Average")
.build())
.build())
.description("Performance rule")
.enabled(true)
.evaluationFrequency("PT5M")
.location("eastus")
.muteActionsDuration("PT30M")
.resolveConfiguration(RuleResolveConfigurationArgs.builder()
.autoResolved(true)
.timeToResolve("PT10M")
.build())
.resourceGroupName("QueryResourceGroupName")
.ruleName("perf")
.scopes("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1")
.severity(4)
.skipQueryValidation(true)
.windowSize("PT10M")
.build());
}
}

Create or update a scheduled query rule on Resource group(s)

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()
{
Actions = new AzureNative.Insights.Inputs.ActionsArgs
{
ActionGroups = new[]
{
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
},
CustomProperties =
{
{ "key11", "value11" },
{ "key12", "value12" },
},
},
CheckWorkspaceAlertsStorageConfigured = true,
Criteria = new AzureNative.Insights.Inputs.ScheduledQueryRuleCriteriaArgs
{
AllOf = new[]
{
new AzureNative.Insights.Inputs.ConditionArgs
{
Dimensions = new() { },
FailingPeriods = new AzureNative.Insights.Inputs.ConditionFailingPeriodsArgs
{
MinFailingPeriodsToAlert = 1,
NumberOfEvaluationPeriods = 1,
},
Operator = AzureNative.Insights.ConditionOperator.GreaterThan,
Query = "Heartbeat",
Threshold = 360,
TimeAggregation = AzureNative.Insights.TimeAggregation.Count,
},
},
},
Description = "Health check rule",
Enabled = true,
EvaluationFrequency = "PT5M",
Location = "eastus",
MuteActionsDuration = "PT30M",
ResolveConfiguration = new AzureNative.Insights.Inputs.RuleResolveConfigurationArgs
{
AutoResolved = true,
TimeToResolve = "PT10M",
},
ResourceGroupName = "QueryResourceGroupName",
RuleName = "heartbeat",
Scopes = new[]
{
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1",
},
Severity = 4,
SkipQueryValidation = true,
TargetResourceTypes = new[]
{
"Microsoft.Compute/virtualMachines",
},
WindowSize = "PT10M",
});
});
package main
import (
insights "github.com/pulumi/pulumi-azure-native-sdk/insights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := insights.NewScheduledQueryRule(ctx, "scheduledQueryRule", &insights.ScheduledQueryRuleArgs{
Actions: &insights.ActionsArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"),
},
CustomProperties: pulumi.StringMap{
"key11": pulumi.String("value11"),
"key12": pulumi.String("value12"),
},
},
CheckWorkspaceAlertsStorageConfigured: pulumi.Bool(true),
Criteria: &insights.ScheduledQueryRuleCriteriaArgs{
AllOf: insights.ConditionArray{
&insights.ConditionArgs{
Dimensions: insights.DimensionArray{},
FailingPeriods: &insights.ConditionFailingPeriodsArgs{
MinFailingPeriodsToAlert: pulumi.Float64(1),
NumberOfEvaluationPeriods: pulumi.Float64(1),
},
Operator: pulumi.String(insights.ConditionOperatorGreaterThan),
Query: pulumi.String("Heartbeat"),
Threshold: pulumi.Float64(360),
TimeAggregation: pulumi.String(insights.TimeAggregationCount),
},
},
},
Description: pulumi.String("Health check rule"),
Enabled: pulumi.Bool(true),
EvaluationFrequency: pulumi.String("PT5M"),
Location: pulumi.String("eastus"),
MuteActionsDuration: pulumi.String("PT30M"),
ResolveConfiguration: &insights.RuleResolveConfigurationArgs{
AutoResolved: pulumi.Bool(true),
TimeToResolve: pulumi.String("PT10M"),
},
ResourceGroupName: pulumi.String("QueryResourceGroupName"),
RuleName: pulumi.String("heartbeat"),
Scopes: pulumi.StringArray{
pulumi.String("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"),
},
Severity: pulumi.Float64(4),
SkipQueryValidation: pulumi.Bool(true),
TargetResourceTypes: pulumi.StringArray{
pulumi.String("Microsoft.Compute/virtualMachines"),
},
WindowSize: pulumi.String("PT10M"),
})
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 com.pulumi.azurenative.insights.inputs.ActionsArgs;
import com.pulumi.azurenative.insights.inputs.ScheduledQueryRuleCriteriaArgs;
import com.pulumi.azurenative.insights.inputs.RuleResolveConfigurationArgs;
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()
.actions(ActionsArgs.builder()
.actionGroups("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup")
.customProperties(Map.ofEntries(
Map.entry("key11", "value11"),
Map.entry("key12", "value12")
))
.build())
.checkWorkspaceAlertsStorageConfigured(true)
.criteria(ScheduledQueryRuleCriteriaArgs.builder()
.allOf(ConditionArgs.builder()
.dimensions()
.failingPeriods(ConditionFailingPeriodsArgs.builder()
.minFailingPeriodsToAlert(1)
.numberOfEvaluationPeriods(1)
.build())
.operator("GreaterThan")
.query("Heartbeat")
.threshold(360)
.timeAggregation("Count")
.build())
.build())
.description("Health check rule")
.enabled(true)
.evaluationFrequency("PT5M")
.location("eastus")
.muteActionsDuration("PT30M")
.resolveConfiguration(RuleResolveConfigurationArgs.builder()
.autoResolved(true)
.timeToResolve("PT10M")
.build())
.resourceGroupName("QueryResourceGroupName")
.ruleName("heartbeat")
.scopes("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1")
.severity(4)
.skipQueryValidation(true)
.targetResourceTypes("Microsoft.Compute/virtualMachines")
.windowSize("PT10M")
.build());
}
}

Create or update a scheduled query rule on Subscription

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()
{
Actions = new AzureNative.Insights.Inputs.ActionsArgs
{
ActionGroups = new[]
{
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
},
CustomProperties =
{
{ "key11", "value11" },
{ "key12", "value12" },
},
},
CheckWorkspaceAlertsStorageConfigured = true,
Criteria = new AzureNative.Insights.Inputs.ScheduledQueryRuleCriteriaArgs
{
AllOf = new[]
{
new AzureNative.Insights.Inputs.ConditionArgs
{
Dimensions = new[]
{
new AzureNative.Insights.Inputs.DimensionArgs
{
Name = "ComputerIp",
Operator = AzureNative.Insights.DimensionOperator.Exclude,
Values = new[]
{
"192.168.1.1",
},
},
new AzureNative.Insights.Inputs.DimensionArgs
{
Name = "OSType",
Operator = AzureNative.Insights.DimensionOperator.Include,
Values = new[]
{
"*",
},
},
},
FailingPeriods = new AzureNative.Insights.Inputs.ConditionFailingPeriodsArgs
{
MinFailingPeriodsToAlert = 1,
NumberOfEvaluationPeriods = 1,
},
MetricMeasureColumn = "% Processor Time",
Operator = AzureNative.Insights.ConditionOperator.GreaterThan,
Query = "Perf | where ObjectName == \"Processor\"",
ResourceIdColumn = "resourceId",
Threshold = 70,
TimeAggregation = AzureNative.Insights.TimeAggregation.Average,
},
},
},
Description = "Performance rule",
Enabled = true,
EvaluationFrequency = "PT5M",
Location = "eastus",
MuteActionsDuration = "PT30M",
ResolveConfiguration = new AzureNative.Insights.Inputs.RuleResolveConfigurationArgs
{
AutoResolved = true,
TimeToResolve = "PT10M",
},
ResourceGroupName = "QueryResourceGroupName",
RuleName = "perf",
Scopes = new[]
{
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147",
},
Severity = 4,
SkipQueryValidation = true,
TargetResourceTypes = new[]
{
"Microsoft.Compute/virtualMachines",
},
WindowSize = "PT10M",
});
});
package main
import (
insights "github.com/pulumi/pulumi-azure-native-sdk/insights/v2"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := insights.NewScheduledQueryRule(ctx, "scheduledQueryRule", &insights.ScheduledQueryRuleArgs{
Actions: &insights.ActionsArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"),
},
CustomProperties: pulumi.StringMap{
"key11": pulumi.String("value11"),
"key12": pulumi.String("value12"),
},
},
CheckWorkspaceAlertsStorageConfigured: pulumi.Bool(true),
Criteria: &insights.ScheduledQueryRuleCriteriaArgs{
AllOf: insights.ConditionArray{
&insights.ConditionArgs{
Dimensions: insights.DimensionArray{
&insights.DimensionArgs{
Name: pulumi.String("ComputerIp"),
Operator: pulumi.String(insights.DimensionOperatorExclude),
Values: pulumi.StringArray{
pulumi.String("192.168.1.1"),
},
},
&insights.DimensionArgs{
Name: pulumi.String("OSType"),
Operator: pulumi.String(insights.DimensionOperatorInclude),
Values: pulumi.StringArray{
pulumi.String("*"),
},
},
},
FailingPeriods: &insights.ConditionFailingPeriodsArgs{
MinFailingPeriodsToAlert: pulumi.Float64(1),
NumberOfEvaluationPeriods: pulumi.Float64(1),
},
MetricMeasureColumn: pulumi.String("% Processor Time"),
Operator: pulumi.String(insights.ConditionOperatorGreaterThan),
Query: pulumi.String("Perf | where ObjectName == \"Processor\""),
ResourceIdColumn: pulumi.String("resourceId"),
Threshold: pulumi.Float64(70),
TimeAggregation: pulumi.String(insights.TimeAggregationAverage),
},
},
},
Description: pulumi.String("Performance rule"),
Enabled: pulumi.Bool(true),
EvaluationFrequency: pulumi.String("PT5M"),
Location: pulumi.String("eastus"),
MuteActionsDuration: pulumi.String("PT30M"),
ResolveConfiguration: &insights.RuleResolveConfigurationArgs{
AutoResolved: pulumi.Bool(true),
TimeToResolve: pulumi.String("PT10M"),
},
ResourceGroupName: pulumi.String("QueryResourceGroupName"),
RuleName: pulumi.String("perf"),
Scopes: pulumi.StringArray{
pulumi.String("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147"),
},
Severity: pulumi.Float64(4),
SkipQueryValidation: pulumi.Bool(true),
TargetResourceTypes: pulumi.StringArray{
pulumi.String("Microsoft.Compute/virtualMachines"),
},
WindowSize: pulumi.String("PT10M"),
})
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 com.pulumi.azurenative.insights.inputs.ActionsArgs;
import com.pulumi.azurenative.insights.inputs.ScheduledQueryRuleCriteriaArgs;
import com.pulumi.azurenative.insights.inputs.RuleResolveConfigurationArgs;
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()
.actions(ActionsArgs.builder()
.actionGroups("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup")
.customProperties(Map.ofEntries(
Map.entry("key11", "value11"),
Map.entry("key12", "value12")
))
.build())
.checkWorkspaceAlertsStorageConfigured(true)
.criteria(ScheduledQueryRuleCriteriaArgs.builder()
.allOf(ConditionArgs.builder()
.dimensions(
DimensionArgs.builder()
.name("ComputerIp")
.operator("Exclude")
.values("192.168.1.1")
.build(),
DimensionArgs.builder()
.name("OSType")
.operator("Include")
.values("*")
.build())
.failingPeriods(ConditionFailingPeriodsArgs.builder()
.minFailingPeriodsToAlert(1)
.numberOfEvaluationPeriods(1)
.build())
.metricMeasureColumn("% Processor Time")
.operator("GreaterThan")
.query("Perf | where ObjectName == \"Processor\"")
.resourceIdColumn("resourceId")
.threshold(70)
.timeAggregation("Average")
.build())
.build())
.description("Performance rule")
.enabled(true)
.evaluationFrequency("PT5M")
.location("eastus")
.muteActionsDuration("PT30M")
.resolveConfiguration(RuleResolveConfigurationArgs.builder()
.autoResolved(true)
.timeToResolve("PT10M")
.build())
.resourceGroupName("QueryResourceGroupName")
.ruleName("perf")
.scopes("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147")
.severity(4)
.skipQueryValidation(true)
.targetResourceTypes("Microsoft.Compute/virtualMachines")
.windowSize("PT10M")
.build());
}
}

Import

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

$ pulumi import azure-native:insights:ScheduledQueryRule perf /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}

Properties

Link copied to clipboard
val actions: Output<ActionsResponse>?

Actions to invoke when the alert fires.

Link copied to clipboard
val autoMitigate: Output<Boolean>?

The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of the kind LogAlert.

Link copied to clipboard

The flag which indicates whether this scheduled query rule should be stored in the customer's storage. The default is false. Relevant only for rules of the kind LogAlert.

Link copied to clipboard

The api-version used when creating this alert rule

Link copied to clipboard

The rule criteria that defines the conditions of the scheduled query rule.

Link copied to clipboard
val description: Output<String>?

The description of the scheduled query rule.

Link copied to clipboard
val displayName: Output<String>?

The display name of the alert rule

Link copied to clipboard
val enabled: Output<Boolean>

The flag which indicates whether this scheduled query rule is enabled. Value should be true or false

Link copied to clipboard
val etag: Output<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.

Link copied to clipboard

How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.

Link copied to clipboard
val id: Output<String>
Link copied to clipboard

The identity of the resource.

Link copied to clipboard

True if alert rule is legacy Log Analytic rule

Link copied to clipboard

The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.

Link copied to clipboard
val kind: Output<String>?

Indicates the type of scheduled query rule. The default is LogAlert.

Link copied to clipboard
val location: Output<String>

The geo-location where the resource lives

Link copied to clipboard

Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert.

Link copied to clipboard
val name: Output<String>

The name of the resource

Link copied to clipboard

If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.

Link copied to clipboard
val pulumiChildResources: Set<KotlinResource>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert.

Link copied to clipboard
val scopes: Output<List<String>>

The list of resource id's that this scheduled query rule is scoped to.

Link copied to clipboard
val severity: Output<Double>?

Severity of the alert. Should be an integer between 0-4. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert.

Link copied to clipboard

The flag which indicates whether the provided query should be validated or not. The default is false. Relevant only for rules of the kind LogAlert.

Link copied to clipboard

SystemData of ScheduledQueryRule.

Link copied to clipboard
val tags: Output<Map<String, String>>?

Resource tags.

Link copied to clipboard

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. Relevant only for rules of the kind LogAlert

Link copied to clipboard
val type: Output<String>

The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"

Link copied to clipboard
val urn: Output<String>
Link copied to clipboard
val windowSize: Output<String>?

The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert.