published on Thursday, Jul 9, 2026 by Pulumi
published on Thursday, Jul 9, 2026 by Pulumi
The scheduled query rule resource.
Uses Azure REST API version 2025-01-01-preview.
Other available API versions: 2023-12-01, 2026-03-01. These can be accessed by generating a local SDK package using the CLI command pulumi package add azure-native monitor [ApiVersion]. See the version guide for details.
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.Monitor.ScheduledQueryRule("scheduledQueryRule", new()
{
Actions = new AzureNative.Monitor.Inputs.ActionsArgs
{
ActionGroups = new[]
{
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
},
ActionProperties =
{
{ "Icm.Title", "Custom title in ICM" },
{ "Icm.TsgId", "https://tsg.url" },
},
CustomProperties =
{
{ "key11", "value11" },
{ "key12", "value12" },
},
},
CheckWorkspaceAlertsStorageConfigured = true,
Criteria = new AzureNative.Monitor.Inputs.ScheduledQueryRuleCriteriaArgs
{
AllOf = new[]
{
new AzureNative.Monitor.Inputs.ConditionArgs
{
Dimensions = new[]
{
new AzureNative.Monitor.Inputs.DimensionArgs
{
Name = "ComputerIp",
Operator = AzureNative.Monitor.DimensionOperator.Exclude,
Values = new[]
{
"192.168.1.1",
},
},
new AzureNative.Monitor.Inputs.DimensionArgs
{
Name = "OSType",
Operator = AzureNative.Monitor.DimensionOperator.Include,
Values = new[]
{
"*",
},
},
},
FailingPeriods = new AzureNative.Monitor.Inputs.ConditionFailingPeriodsArgs
{
MinFailingPeriodsToAlert = 1,
NumberOfEvaluationPeriods = 1,
},
MetricMeasureColumn = "% Processor Time",
Operator = "GreaterThan",
Query = "Perf | where ObjectName == \"Processor\"",
ResourceIdColumn = "resourceId",
Threshold = 70,
TimeAggregation = AzureNative.Monitor.TimeAggregation.Average,
},
},
},
Description = "Performance rule",
Enabled = true,
EvaluationFrequency = "PT5M",
Location = "eastus",
MuteActionsDuration = "PT30M",
ResolveConfiguration = new AzureNative.Monitor.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 (
monitor "github.com/pulumi/pulumi-azure-native-sdk/monitor/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := monitor.NewScheduledQueryRule(ctx, "scheduledQueryRule", &monitor.ScheduledQueryRuleArgs{
Actions: &monitor.ActionsArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"),
},
ActionProperties: pulumi.StringMap{
"Icm.Title": pulumi.String("Custom title in ICM"),
"Icm.TsgId": pulumi.String("https://tsg.url"),
},
CustomProperties: pulumi.StringMap{
"key11": pulumi.String("value11"),
"key12": pulumi.String("value12"),
},
},
CheckWorkspaceAlertsStorageConfigured: pulumi.Bool(true),
Criteria: &monitor.ScheduledQueryRuleCriteriaArgs{
AllOf: monitor.ConditionArray{
&monitor.ConditionArgs{
Dimensions: monitor.DimensionArray{
&monitor.DimensionArgs{
Name: pulumi.String("ComputerIp"),
Operator: pulumi.String(monitor.DimensionOperatorExclude),
Values: pulumi.StringArray{
pulumi.String("192.168.1.1"),
},
},
&monitor.DimensionArgs{
Name: pulumi.String("OSType"),
Operator: pulumi.String(monitor.DimensionOperatorInclude),
Values: pulumi.StringArray{
pulumi.String("*"),
},
},
},
FailingPeriods: &monitor.ConditionFailingPeriodsArgs{
MinFailingPeriodsToAlert: pulumi.Float64(1),
NumberOfEvaluationPeriods: pulumi.Float64(1),
},
MetricMeasureColumn: pulumi.String("% Processor Time"),
Operator: pulumi.String("GreaterThan"),
Query: pulumi.String("Perf | where ObjectName == \"Processor\""),
ResourceIdColumn: pulumi.String("resourceId"),
Threshold: pulumi.Float64(70),
TimeAggregation: pulumi.String(monitor.TimeAggregationAverage),
},
},
},
Description: pulumi.String("Performance rule"),
Enabled: pulumi.Bool(true),
EvaluationFrequency: pulumi.String("PT5M"),
Location: pulumi.String("eastus"),
MuteActionsDuration: pulumi.String("PT30M"),
ResolveConfiguration: &monitor.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
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_monitor_scheduledqueryrule" "scheduledQueryRule" {
actions = {
action_groups = ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"]
action_properties = {
"Icm.Title" = "Custom title in ICM"
"Icm.TsgId" = "https://tsg.url"
}
custom_properties = {
"key11" = "value11"
"key12" = "value12"
}
}
check_workspace_alerts_storage_configured = true
criteria = {
all_of = [{
"dimensions" = [{
"name" = "ComputerIp"
"operator" = "Exclude"
"values" = ["192.168.1.1"]
}, {
"name" = "OSType"
"operator" = "Include"
"values" = ["*"]
}]
"failingPeriods" = {
"minFailingPeriodsToAlert" = 1
"numberOfEvaluationPeriods" = 1
}
"metricMeasureColumn" = "% Processor Time"
"operator" = "GreaterThan"
"query" = "Perf | where ObjectName == \"Processor\""
"resourceIdColumn" = "resourceId"
"threshold" = 70
"timeAggregation" = "Average"
}]
}
description = "Performance rule"
enabled = true
evaluation_frequency = "PT5M"
location = "eastus"
mute_actions_duration = "PT30M"
resolve_configuration = {
auto_resolved = true
time_to_resolve = "PT10M"
}
resource_group_name = "QueryResourceGroupName"
rule_name = "perf"
scopes = ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"]
severity = 4
skip_query_validation = true
window_size = "PT10M"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.monitor.ScheduledQueryRule;
import com.pulumi.azurenative.monitor.ScheduledQueryRuleArgs;
import com.pulumi.azurenative.monitor.inputs.ActionsArgs;
import com.pulumi.azurenative.monitor.inputs.ScheduledQueryRuleCriteriaArgs;
import com.pulumi.azurenative.monitor.inputs.RuleResolveConfigurationArgs;
import java.util.ArrayList;
import java.util.Arrays;
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")
.actionProperties(Map.ofEntries(
Map.entry("Icm.Title", "Custom title in ICM"),
Map.entry("Icm.TsgId", "https://tsg.url")
))
.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.0)
.numberOfEvaluationPeriods(1.0)
.build())
.metricMeasureColumn("% Processor Time")
.operator("GreaterThan")
.query("Perf | where ObjectName == \"Processor\"")
.resourceIdColumn("resourceId")
.threshold(70.0)
.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.0)
.skipQueryValidation(true)
.windowSize("PT10M")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const scheduledQueryRule = new azure_native.monitor.ScheduledQueryRule("scheduledQueryRule", {
actions: {
actionGroups: ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
actionProperties: {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
customProperties: {
key11: "value11",
key12: "value12",
},
},
checkWorkspaceAlertsStorageConfigured: true,
criteria: {
allOf: [{
dimensions: [
{
name: "ComputerIp",
operator: azure_native.monitor.DimensionOperator.Exclude,
values: ["192.168.1.1"],
},
{
name: "OSType",
operator: azure_native.monitor.DimensionOperator.Include,
values: ["*"],
},
],
failingPeriods: {
minFailingPeriodsToAlert: 1,
numberOfEvaluationPeriods: 1,
},
metricMeasureColumn: "% Processor Time",
operator: "GreaterThan",
query: "Perf | where ObjectName == \"Processor\"",
resourceIdColumn: "resourceId",
threshold: 70,
timeAggregation: azure_native.monitor.TimeAggregation.Average,
}],
},
description: "Performance rule",
enabled: true,
evaluationFrequency: "PT5M",
location: "eastus",
muteActionsDuration: "PT30M",
resolveConfiguration: {
autoResolved: true,
timeToResolve: "PT10M",
},
resourceGroupName: "QueryResourceGroupName",
ruleName: "perf",
scopes: ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"],
severity: 4,
skipQueryValidation: true,
windowSize: "PT10M",
});
import pulumi
import pulumi_azure_native as azure_native
scheduled_query_rule = azure_native.monitor.ScheduledQueryRule("scheduledQueryRule",
actions={
"action_groups": ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
"action_properties": {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
"custom_properties": {
"key11": "value11",
"key12": "value12",
},
},
check_workspace_alerts_storage_configured=True,
criteria={
"all_of": [{
"dimensions": [
{
"name": "ComputerIp",
"operator": azure_native.monitor.DimensionOperator.EXCLUDE,
"values": ["192.168.1.1"],
},
{
"name": "OSType",
"operator": azure_native.monitor.DimensionOperator.INCLUDE,
"values": ["*"],
},
],
"failing_periods": {
"min_failing_periods_to_alert": float(1),
"number_of_evaluation_periods": float(1),
},
"metric_measure_column": "% Processor Time",
"operator": "GreaterThan",
"query": "Perf | where ObjectName == \"Processor\"",
"resource_id_column": "resourceId",
"threshold": float(70),
"time_aggregation": azure_native.monitor.TimeAggregation.AVERAGE,
}],
},
description="Performance rule",
enabled=True,
evaluation_frequency="PT5M",
location="eastus",
mute_actions_duration="PT30M",
resolve_configuration={
"auto_resolved": True,
"time_to_resolve": "PT10M",
},
resource_group_name="QueryResourceGroupName",
rule_name="perf",
scopes=["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"],
severity=float(4),
skip_query_validation=True,
window_size="PT10M")
resources:
scheduledQueryRule:
type: azure-native:monitor:ScheduledQueryRule
properties:
actions:
actionGroups:
- /subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup
actionProperties:
Icm.Title: Custom title in ICM
Icm.TsgId: https://tsg.url
customProperties:
key11: value11
key12: value12
checkWorkspaceAlertsStorageConfigured: true
criteria:
allOf:
- dimensions:
- name: ComputerIp
operator: Exclude
values:
- 192.168.1.1
- name: OSType
operator: Include
values:
- '*'
failingPeriods:
minFailingPeriodsToAlert: 1
numberOfEvaluationPeriods: 1
metricMeasureColumn: '% Processor Time'
operator: GreaterThan
query: Perf | where ObjectName == "Processor"
resourceIdColumn: resourceId
threshold: 70
timeAggregation: Average
description: Performance rule
enabled: true
evaluationFrequency: PT5M
location: eastus
muteActionsDuration: PT30M
resolveConfiguration:
autoResolved: true
timeToResolve: PT10M
resourceGroupName: QueryResourceGroupName
ruleName: perf
scopes:
- /subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1
severity: 4
skipQueryValidation: true
windowSize: PT10M
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.Monitor.ScheduledQueryRule("scheduledQueryRule", new()
{
Actions = new AzureNative.Monitor.Inputs.ActionsArgs
{
ActionGroups = new[]
{
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
},
ActionProperties =
{
{ "Icm.Title", "Custom title in ICM" },
{ "Icm.TsgId", "https://tsg.url" },
},
CustomProperties =
{
{ "key11", "value11" },
{ "key12", "value12" },
},
},
CheckWorkspaceAlertsStorageConfigured = true,
Criteria = new AzureNative.Monitor.Inputs.ScheduledQueryRuleCriteriaArgs
{
AllOf = new[]
{
new AzureNative.Monitor.Inputs.ConditionArgs
{
Dimensions = new() { },
FailingPeriods = new AzureNative.Monitor.Inputs.ConditionFailingPeriodsArgs
{
MinFailingPeriodsToAlert = 1,
NumberOfEvaluationPeriods = 1,
},
Operator = "GreaterThan",
Query = "Heartbeat",
Threshold = 360,
TimeAggregation = AzureNative.Monitor.TimeAggregation.Count,
},
},
},
Description = "Health check rule",
Enabled = true,
EvaluationFrequency = "PT5M",
Location = "eastus",
MuteActionsDuration = "PT30M",
ResolveConfiguration = new AzureNative.Monitor.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 (
monitor "github.com/pulumi/pulumi-azure-native-sdk/monitor/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := monitor.NewScheduledQueryRule(ctx, "scheduledQueryRule", &monitor.ScheduledQueryRuleArgs{
Actions: &monitor.ActionsArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"),
},
ActionProperties: pulumi.StringMap{
"Icm.Title": pulumi.String("Custom title in ICM"),
"Icm.TsgId": pulumi.String("https://tsg.url"),
},
CustomProperties: pulumi.StringMap{
"key11": pulumi.String("value11"),
"key12": pulumi.String("value12"),
},
},
CheckWorkspaceAlertsStorageConfigured: pulumi.Bool(true),
Criteria: &monitor.ScheduledQueryRuleCriteriaArgs{
AllOf: monitor.ConditionArray{
&monitor.ConditionArgs{
Dimensions: monitor.DimensionArray{},
FailingPeriods: &monitor.ConditionFailingPeriodsArgs{
MinFailingPeriodsToAlert: pulumi.Float64(1),
NumberOfEvaluationPeriods: pulumi.Float64(1),
},
Operator: pulumi.String("GreaterThan"),
Query: pulumi.String("Heartbeat"),
Threshold: pulumi.Float64(360),
TimeAggregation: pulumi.String(monitor.TimeAggregationCount),
},
},
},
Description: pulumi.String("Health check rule"),
Enabled: pulumi.Bool(true),
EvaluationFrequency: pulumi.String("PT5M"),
Location: pulumi.String("eastus"),
MuteActionsDuration: pulumi.String("PT30M"),
ResolveConfiguration: &monitor.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
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_monitor_scheduledqueryrule" "scheduledQueryRule" {
actions = {
action_groups = ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"]
action_properties = {
"Icm.Title" = "Custom title in ICM"
"Icm.TsgId" = "https://tsg.url"
}
custom_properties = {
"key11" = "value11"
"key12" = "value12"
}
}
check_workspace_alerts_storage_configured = true
criteria = {
all_of = [{
"dimensions" = []
"failingPeriods" = {
"minFailingPeriodsToAlert" = 1
"numberOfEvaluationPeriods" = 1
}
"operator" = "GreaterThan"
"query" = "Heartbeat"
"threshold" = 360
"timeAggregation" = "Count"
}]
}
description = "Health check rule"
enabled = true
evaluation_frequency = "PT5M"
location = "eastus"
mute_actions_duration = "PT30M"
resolve_configuration = {
auto_resolved = true
time_to_resolve = "PT10M"
}
resource_group_name = "QueryResourceGroupName"
rule_name = "heartbeat"
scopes = ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"]
severity = 4
skip_query_validation = true
target_resource_types = ["Microsoft.Compute/virtualMachines"]
window_size = "PT10M"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.monitor.ScheduledQueryRule;
import com.pulumi.azurenative.monitor.ScheduledQueryRuleArgs;
import com.pulumi.azurenative.monitor.inputs.ActionsArgs;
import com.pulumi.azurenative.monitor.inputs.ScheduledQueryRuleCriteriaArgs;
import com.pulumi.azurenative.monitor.inputs.RuleResolveConfigurationArgs;
import java.util.ArrayList;
import java.util.Arrays;
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")
.actionProperties(Map.ofEntries(
Map.entry("Icm.Title", "Custom title in ICM"),
Map.entry("Icm.TsgId", "https://tsg.url")
))
.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.0)
.numberOfEvaluationPeriods(1.0)
.build())
.operator("GreaterThan")
.query("Heartbeat")
.threshold(360.0)
.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.0)
.skipQueryValidation(true)
.targetResourceTypes("Microsoft.Compute/virtualMachines")
.windowSize("PT10M")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const scheduledQueryRule = new azure_native.monitor.ScheduledQueryRule("scheduledQueryRule", {
actions: {
actionGroups: ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
actionProperties: {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
customProperties: {
key11: "value11",
key12: "value12",
},
},
checkWorkspaceAlertsStorageConfigured: true,
criteria: {
allOf: [{
dimensions: [],
failingPeriods: {
minFailingPeriodsToAlert: 1,
numberOfEvaluationPeriods: 1,
},
operator: "GreaterThan",
query: "Heartbeat",
threshold: 360,
timeAggregation: azure_native.monitor.TimeAggregation.Count,
}],
},
description: "Health check rule",
enabled: true,
evaluationFrequency: "PT5M",
location: "eastus",
muteActionsDuration: "PT30M",
resolveConfiguration: {
autoResolved: true,
timeToResolve: "PT10M",
},
resourceGroupName: "QueryResourceGroupName",
ruleName: "heartbeat",
scopes: ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"],
severity: 4,
skipQueryValidation: true,
targetResourceTypes: ["Microsoft.Compute/virtualMachines"],
windowSize: "PT10M",
});
import pulumi
import pulumi_azure_native as azure_native
scheduled_query_rule = azure_native.monitor.ScheduledQueryRule("scheduledQueryRule",
actions={
"action_groups": ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
"action_properties": {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
"custom_properties": {
"key11": "value11",
"key12": "value12",
},
},
check_workspace_alerts_storage_configured=True,
criteria={
"all_of": [{
"dimensions": [],
"failing_periods": {
"min_failing_periods_to_alert": float(1),
"number_of_evaluation_periods": float(1),
},
"operator": "GreaterThan",
"query": "Heartbeat",
"threshold": float(360),
"time_aggregation": azure_native.monitor.TimeAggregation.COUNT,
}],
},
description="Health check rule",
enabled=True,
evaluation_frequency="PT5M",
location="eastus",
mute_actions_duration="PT30M",
resolve_configuration={
"auto_resolved": True,
"time_to_resolve": "PT10M",
},
resource_group_name="QueryResourceGroupName",
rule_name="heartbeat",
scopes=["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1"],
severity=float(4),
skip_query_validation=True,
target_resource_types=["Microsoft.Compute/virtualMachines"],
window_size="PT10M")
resources:
scheduledQueryRule:
type: azure-native:monitor:ScheduledQueryRule
properties:
actions:
actionGroups:
- /subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup
actionProperties:
Icm.Title: Custom title in ICM
Icm.TsgId: https://tsg.url
customProperties:
key11: value11
key12: value12
checkWorkspaceAlertsStorageConfigured: true
criteria:
allOf:
- dimensions: []
failingPeriods:
minFailingPeriodsToAlert: 1
numberOfEvaluationPeriods: 1
operator: GreaterThan
query: Heartbeat
threshold: 360
timeAggregation: Count
description: Health check rule
enabled: true
evaluationFrequency: PT5M
location: eastus
muteActionsDuration: PT30M
resolveConfiguration:
autoResolved: true
timeToResolve: PT10M
resourceGroupName: QueryResourceGroupName
ruleName: heartbeat
scopes:
- /subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1
severity: 4
skipQueryValidation: true
targetResourceTypes:
- Microsoft.Compute/virtualMachines
windowSize: PT10M
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.Monitor.ScheduledQueryRule("scheduledQueryRule", new()
{
Actions = new AzureNative.Monitor.Inputs.ActionsArgs
{
ActionGroups = new[]
{
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
},
ActionProperties =
{
{ "Icm.Title", "Custom title in ICM" },
{ "Icm.TsgId", "https://tsg.url" },
},
CustomProperties =
{
{ "key11", "value11" },
{ "key12", "value12" },
},
},
CheckWorkspaceAlertsStorageConfigured = true,
Criteria = new AzureNative.Monitor.Inputs.ScheduledQueryRuleCriteriaArgs
{
AllOf = new[]
{
new AzureNative.Monitor.Inputs.ConditionArgs
{
Dimensions = new[]
{
new AzureNative.Monitor.Inputs.DimensionArgs
{
Name = "ComputerIp",
Operator = AzureNative.Monitor.DimensionOperator.Exclude,
Values = new[]
{
"192.168.1.1",
},
},
new AzureNative.Monitor.Inputs.DimensionArgs
{
Name = "OSType",
Operator = AzureNative.Monitor.DimensionOperator.Include,
Values = new[]
{
"*",
},
},
},
FailingPeriods = new AzureNative.Monitor.Inputs.ConditionFailingPeriodsArgs
{
MinFailingPeriodsToAlert = 1,
NumberOfEvaluationPeriods = 1,
},
MetricMeasureColumn = "% Processor Time",
Operator = "GreaterThan",
Query = "Perf | where ObjectName == \"Processor\"",
ResourceIdColumn = "resourceId",
Threshold = 70,
TimeAggregation = AzureNative.Monitor.TimeAggregation.Average,
},
},
},
Description = "Performance rule",
Enabled = true,
EvaluationFrequency = "PT5M",
Location = "eastus",
MuteActionsDuration = "PT30M",
ResolveConfiguration = new AzureNative.Monitor.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 (
monitor "github.com/pulumi/pulumi-azure-native-sdk/monitor/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := monitor.NewScheduledQueryRule(ctx, "scheduledQueryRule", &monitor.ScheduledQueryRuleArgs{
Actions: &monitor.ActionsArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"),
},
ActionProperties: pulumi.StringMap{
"Icm.Title": pulumi.String("Custom title in ICM"),
"Icm.TsgId": pulumi.String("https://tsg.url"),
},
CustomProperties: pulumi.StringMap{
"key11": pulumi.String("value11"),
"key12": pulumi.String("value12"),
},
},
CheckWorkspaceAlertsStorageConfigured: pulumi.Bool(true),
Criteria: &monitor.ScheduledQueryRuleCriteriaArgs{
AllOf: monitor.ConditionArray{
&monitor.ConditionArgs{
Dimensions: monitor.DimensionArray{
&monitor.DimensionArgs{
Name: pulumi.String("ComputerIp"),
Operator: pulumi.String(monitor.DimensionOperatorExclude),
Values: pulumi.StringArray{
pulumi.String("192.168.1.1"),
},
},
&monitor.DimensionArgs{
Name: pulumi.String("OSType"),
Operator: pulumi.String(monitor.DimensionOperatorInclude),
Values: pulumi.StringArray{
pulumi.String("*"),
},
},
},
FailingPeriods: &monitor.ConditionFailingPeriodsArgs{
MinFailingPeriodsToAlert: pulumi.Float64(1),
NumberOfEvaluationPeriods: pulumi.Float64(1),
},
MetricMeasureColumn: pulumi.String("% Processor Time"),
Operator: pulumi.String("GreaterThan"),
Query: pulumi.String("Perf | where ObjectName == \"Processor\""),
ResourceIdColumn: pulumi.String("resourceId"),
Threshold: pulumi.Float64(70),
TimeAggregation: pulumi.String(monitor.TimeAggregationAverage),
},
},
},
Description: pulumi.String("Performance rule"),
Enabled: pulumi.Bool(true),
EvaluationFrequency: pulumi.String("PT5M"),
Location: pulumi.String("eastus"),
MuteActionsDuration: pulumi.String("PT30M"),
ResolveConfiguration: &monitor.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
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_monitor_scheduledqueryrule" "scheduledQueryRule" {
actions = {
action_groups = ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"]
action_properties = {
"Icm.Title" = "Custom title in ICM"
"Icm.TsgId" = "https://tsg.url"
}
custom_properties = {
"key11" = "value11"
"key12" = "value12"
}
}
check_workspace_alerts_storage_configured = true
criteria = {
all_of = [{
"dimensions" = [{
"name" = "ComputerIp"
"operator" = "Exclude"
"values" = ["192.168.1.1"]
}, {
"name" = "OSType"
"operator" = "Include"
"values" = ["*"]
}]
"failingPeriods" = {
"minFailingPeriodsToAlert" = 1
"numberOfEvaluationPeriods" = 1
}
"metricMeasureColumn" = "% Processor Time"
"operator" = "GreaterThan"
"query" = "Perf | where ObjectName == \"Processor\""
"resourceIdColumn" = "resourceId"
"threshold" = 70
"timeAggregation" = "Average"
}]
}
description = "Performance rule"
enabled = true
evaluation_frequency = "PT5M"
location = "eastus"
mute_actions_duration = "PT30M"
resolve_configuration = {
auto_resolved = true
time_to_resolve = "PT10M"
}
resource_group_name = "QueryResourceGroupName"
rule_name = "perf"
scopes = ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147"]
severity = 4
skip_query_validation = true
target_resource_types = ["Microsoft.Compute/virtualMachines"]
window_size = "PT10M"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.monitor.ScheduledQueryRule;
import com.pulumi.azurenative.monitor.ScheduledQueryRuleArgs;
import com.pulumi.azurenative.monitor.inputs.ActionsArgs;
import com.pulumi.azurenative.monitor.inputs.ScheduledQueryRuleCriteriaArgs;
import com.pulumi.azurenative.monitor.inputs.RuleResolveConfigurationArgs;
import java.util.ArrayList;
import java.util.Arrays;
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")
.actionProperties(Map.ofEntries(
Map.entry("Icm.Title", "Custom title in ICM"),
Map.entry("Icm.TsgId", "https://tsg.url")
))
.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.0)
.numberOfEvaluationPeriods(1.0)
.build())
.metricMeasureColumn("% Processor Time")
.operator("GreaterThan")
.query("Perf | where ObjectName == \"Processor\"")
.resourceIdColumn("resourceId")
.threshold(70.0)
.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.0)
.skipQueryValidation(true)
.targetResourceTypes("Microsoft.Compute/virtualMachines")
.windowSize("PT10M")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const scheduledQueryRule = new azure_native.monitor.ScheduledQueryRule("scheduledQueryRule", {
actions: {
actionGroups: ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
actionProperties: {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
customProperties: {
key11: "value11",
key12: "value12",
},
},
checkWorkspaceAlertsStorageConfigured: true,
criteria: {
allOf: [{
dimensions: [
{
name: "ComputerIp",
operator: azure_native.monitor.DimensionOperator.Exclude,
values: ["192.168.1.1"],
},
{
name: "OSType",
operator: azure_native.monitor.DimensionOperator.Include,
values: ["*"],
},
],
failingPeriods: {
minFailingPeriodsToAlert: 1,
numberOfEvaluationPeriods: 1,
},
metricMeasureColumn: "% Processor Time",
operator: "GreaterThan",
query: "Perf | where ObjectName == \"Processor\"",
resourceIdColumn: "resourceId",
threshold: 70,
timeAggregation: azure_native.monitor.TimeAggregation.Average,
}],
},
description: "Performance rule",
enabled: true,
evaluationFrequency: "PT5M",
location: "eastus",
muteActionsDuration: "PT30M",
resolveConfiguration: {
autoResolved: true,
timeToResolve: "PT10M",
},
resourceGroupName: "QueryResourceGroupName",
ruleName: "perf",
scopes: ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147"],
severity: 4,
skipQueryValidation: true,
targetResourceTypes: ["Microsoft.Compute/virtualMachines"],
windowSize: "PT10M",
});
import pulumi
import pulumi_azure_native as azure_native
scheduled_query_rule = azure_native.monitor.ScheduledQueryRule("scheduledQueryRule",
actions={
"action_groups": ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
"action_properties": {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
"custom_properties": {
"key11": "value11",
"key12": "value12",
},
},
check_workspace_alerts_storage_configured=True,
criteria={
"all_of": [{
"dimensions": [
{
"name": "ComputerIp",
"operator": azure_native.monitor.DimensionOperator.EXCLUDE,
"values": ["192.168.1.1"],
},
{
"name": "OSType",
"operator": azure_native.monitor.DimensionOperator.INCLUDE,
"values": ["*"],
},
],
"failing_periods": {
"min_failing_periods_to_alert": float(1),
"number_of_evaluation_periods": float(1),
},
"metric_measure_column": "% Processor Time",
"operator": "GreaterThan",
"query": "Perf | where ObjectName == \"Processor\"",
"resource_id_column": "resourceId",
"threshold": float(70),
"time_aggregation": azure_native.monitor.TimeAggregation.AVERAGE,
}],
},
description="Performance rule",
enabled=True,
evaluation_frequency="PT5M",
location="eastus",
mute_actions_duration="PT30M",
resolve_configuration={
"auto_resolved": True,
"time_to_resolve": "PT10M",
},
resource_group_name="QueryResourceGroupName",
rule_name="perf",
scopes=["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147"],
severity=float(4),
skip_query_validation=True,
target_resource_types=["Microsoft.Compute/virtualMachines"],
window_size="PT10M")
resources:
scheduledQueryRule:
type: azure-native:monitor:ScheduledQueryRule
properties:
actions:
actionGroups:
- /subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup
actionProperties:
Icm.Title: Custom title in ICM
Icm.TsgId: https://tsg.url
customProperties:
key11: value11
key12: value12
checkWorkspaceAlertsStorageConfigured: true
criteria:
allOf:
- dimensions:
- name: ComputerIp
operator: Exclude
values:
- 192.168.1.1
- name: OSType
operator: Include
values:
- '*'
failingPeriods:
minFailingPeriodsToAlert: 1
numberOfEvaluationPeriods: 1
metricMeasureColumn: '% Processor Time'
operator: GreaterThan
query: Perf | where ObjectName == "Processor"
resourceIdColumn: resourceId
threshold: 70
timeAggregation: Average
description: Performance rule
enabled: true
evaluationFrequency: PT5M
location: eastus
muteActionsDuration: PT30M
resolveConfiguration:
autoResolved: true
timeToResolve: PT10M
resourceGroupName: QueryResourceGroupName
ruleName: perf
scopes:
- /subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147
severity: 4
skipQueryValidation: true
targetResourceTypes:
- Microsoft.Compute/virtualMachines
windowSize: PT10M
Create or update a simple log alert 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.Monitor.ScheduledQueryRule("scheduledQueryRule", new()
{
Actions = new AzureNative.Monitor.Inputs.ActionsArgs
{
ActionGroups = new[]
{
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
},
ActionProperties =
{
{ "Icm.Title", "Custom title in ICM" },
{ "Icm.TsgId", "https://tsg.url" },
},
CustomProperties =
{
{ "key11", "value11" },
{ "key12", "value12" },
},
},
AutoMitigate = false,
CheckWorkspaceAlertsStorageConfigured = true,
Criteria = new AzureNative.Monitor.Inputs.ScheduledQueryRuleCriteriaArgs
{
AllOf = new[]
{
new AzureNative.Monitor.Inputs.ConditionArgs
{
Query = "Perf | where ObjectName == \"Processor\"",
},
},
},
Description = "Performance rule",
Enabled = true,
Kind = AzureNative.Monitor.Kind.SimpleLogAlert,
Location = "eastus",
ResourceGroupName = "QueryResourceGroupName",
RuleName = "perf",
Scopes = new[]
{
"/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1",
},
Severity = 4,
SkipQueryValidation = true,
});
});
package main
import (
monitor "github.com/pulumi/pulumi-azure-native-sdk/monitor/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := monitor.NewScheduledQueryRule(ctx, "scheduledQueryRule", &monitor.ScheduledQueryRuleArgs{
Actions: &monitor.ActionsArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"),
},
ActionProperties: pulumi.StringMap{
"Icm.Title": pulumi.String("Custom title in ICM"),
"Icm.TsgId": pulumi.String("https://tsg.url"),
},
CustomProperties: pulumi.StringMap{
"key11": pulumi.String("value11"),
"key12": pulumi.String("value12"),
},
},
AutoMitigate: pulumi.Bool(false),
CheckWorkspaceAlertsStorageConfigured: pulumi.Bool(true),
Criteria: &monitor.ScheduledQueryRuleCriteriaArgs{
AllOf: monitor.ConditionArray{
&monitor.ConditionArgs{
Query: pulumi.String("Perf | where ObjectName == \"Processor\""),
},
},
},
Description: pulumi.String("Performance rule"),
Enabled: pulumi.Bool(true),
Kind: pulumi.String(monitor.KindSimpleLogAlert),
Location: pulumi.String("eastus"),
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),
})
if err != nil {
return err
}
return nil
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_monitor_scheduledqueryrule" "scheduledQueryRule" {
actions = {
action_groups = ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"]
action_properties = {
"Icm.Title" = "Custom title in ICM"
"Icm.TsgId" = "https://tsg.url"
}
custom_properties = {
"key11" = "value11"
"key12" = "value12"
}
}
auto_mitigate = false
check_workspace_alerts_storage_configured = true
criteria = {
all_of = [{
"query" = "Perf | where ObjectName == \"Processor\""
}]
}
description = "Performance rule"
enabled = true
kind = "SimpleLogAlert"
location = "eastus"
resource_group_name = "QueryResourceGroupName"
rule_name = "perf"
scopes = ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"]
severity = 4
skip_query_validation = true
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.monitor.ScheduledQueryRule;
import com.pulumi.azurenative.monitor.ScheduledQueryRuleArgs;
import com.pulumi.azurenative.monitor.inputs.ActionsArgs;
import com.pulumi.azurenative.monitor.inputs.ScheduledQueryRuleCriteriaArgs;
import java.util.ArrayList;
import java.util.Arrays;
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")
.actionProperties(Map.ofEntries(
Map.entry("Icm.Title", "Custom title in ICM"),
Map.entry("Icm.TsgId", "https://tsg.url")
))
.customProperties(Map.ofEntries(
Map.entry("key11", "value11"),
Map.entry("key12", "value12")
))
.build())
.autoMitigate(false)
.checkWorkspaceAlertsStorageConfigured(true)
.criteria(ScheduledQueryRuleCriteriaArgs.builder()
.allOf(ConditionArgs.builder()
.query("Perf | where ObjectName == \"Processor\"")
.build())
.build())
.description("Performance rule")
.enabled(true)
.kind("SimpleLogAlert")
.location("eastus")
.resourceGroupName("QueryResourceGroupName")
.ruleName("perf")
.scopes("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1")
.severity(4.0)
.skipQueryValidation(true)
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const scheduledQueryRule = new azure_native.monitor.ScheduledQueryRule("scheduledQueryRule", {
actions: {
actionGroups: ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
actionProperties: {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
customProperties: {
key11: "value11",
key12: "value12",
},
},
autoMitigate: false,
checkWorkspaceAlertsStorageConfigured: true,
criteria: {
allOf: [{
query: "Perf | where ObjectName == \"Processor\"",
}],
},
description: "Performance rule",
enabled: true,
kind: azure_native.monitor.Kind.SimpleLogAlert,
location: "eastus",
resourceGroupName: "QueryResourceGroupName",
ruleName: "perf",
scopes: ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"],
severity: 4,
skipQueryValidation: true,
});
import pulumi
import pulumi_azure_native as azure_native
scheduled_query_rule = azure_native.monitor.ScheduledQueryRule("scheduledQueryRule",
actions={
"action_groups": ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
"action_properties": {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
"custom_properties": {
"key11": "value11",
"key12": "value12",
},
},
auto_mitigate=False,
check_workspace_alerts_storage_configured=True,
criteria={
"all_of": [{
"query": "Perf | where ObjectName == \"Processor\"",
}],
},
description="Performance rule",
enabled=True,
kind=azure_native.monitor.Kind.SIMPLE_LOG_ALERT,
location="eastus",
resource_group_name="QueryResourceGroupName",
rule_name="perf",
scopes=["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"],
severity=float(4),
skip_query_validation=True)
resources:
scheduledQueryRule:
type: azure-native:monitor:ScheduledQueryRule
properties:
actions:
actionGroups:
- /subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup
actionProperties:
Icm.Title: Custom title in ICM
Icm.TsgId: https://tsg.url
customProperties:
key11: value11
key12: value12
autoMitigate: false
checkWorkspaceAlertsStorageConfigured: true
criteria:
allOf:
- query: Perf | where ObjectName == "Processor"
description: Performance rule
enabled: true
kind: SimpleLogAlert
location: eastus
resourceGroupName: QueryResourceGroupName
ruleName: perf
scopes:
- /subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1
severity: 4
skipQueryValidation: true
create or update dynamic threshold 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.Monitor.ScheduledQueryRule("scheduledQueryRule", new()
{
Actions = new AzureNative.Monitor.Inputs.ActionsArgs
{
ActionGroups = new[]
{
"/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup",
},
ActionProperties =
{
{ "Icm.Title", "Custom title in ICM" },
{ "Icm.TsgId", "https://tsg.url" },
},
CustomProperties =
{
{ "key11", "value11" },
{ "key12", "value12" },
},
},
CheckWorkspaceAlertsStorageConfigured = true,
Criteria = new AzureNative.Monitor.Inputs.ScheduledQueryRuleCriteriaArgs
{
AllOf = new[]
{
new AzureNative.Monitor.Inputs.ConditionArgs
{
AlertSensitivity = "Medium",
CriterionType = AzureNative.Monitor.CriterionType.DynamicThresholdCriterion,
Dimensions = new[]
{
new AzureNative.Monitor.Inputs.DimensionArgs
{
Name = "ComputerIp",
Operator = AzureNative.Monitor.DimensionOperator.Exclude,
Values = new[]
{
"192.168.1.1",
},
},
new AzureNative.Monitor.Inputs.DimensionArgs
{
Name = "OSType",
Operator = AzureNative.Monitor.DimensionOperator.Include,
Values = new[]
{
"*",
},
},
},
IgnoreDataBefore = "2024-06-01T21:00:00.000Z",
MetricMeasureColumn = "% Processor Time",
Operator = "GreaterOrLessThan",
Query = "Perf | where ObjectName == \"Processor\"",
ResourceIdColumn = "resourceId",
TimeAggregation = AzureNative.Monitor.TimeAggregation.Average,
},
},
},
Description = "Performance rule",
Enabled = true,
EvaluationFrequency = "PT5M",
Location = "eastus",
MuteActionsDuration = "PT30M",
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 (
monitor "github.com/pulumi/pulumi-azure-native-sdk/monitor/v3"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := monitor.NewScheduledQueryRule(ctx, "scheduledQueryRule", &monitor.ScheduledQueryRuleArgs{
Actions: &monitor.ActionsArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"),
},
ActionProperties: pulumi.StringMap{
"Icm.Title": pulumi.String("Custom title in ICM"),
"Icm.TsgId": pulumi.String("https://tsg.url"),
},
CustomProperties: pulumi.StringMap{
"key11": pulumi.String("value11"),
"key12": pulumi.String("value12"),
},
},
CheckWorkspaceAlertsStorageConfigured: pulumi.Bool(true),
Criteria: &monitor.ScheduledQueryRuleCriteriaArgs{
AllOf: monitor.ConditionArray{
&monitor.ConditionArgs{
AlertSensitivity: pulumi.String("Medium"),
CriterionType: pulumi.String(monitor.CriterionTypeDynamicThresholdCriterion),
Dimensions: monitor.DimensionArray{
&monitor.DimensionArgs{
Name: pulumi.String("ComputerIp"),
Operator: pulumi.String(monitor.DimensionOperatorExclude),
Values: pulumi.StringArray{
pulumi.String("192.168.1.1"),
},
},
&monitor.DimensionArgs{
Name: pulumi.String("OSType"),
Operator: pulumi.String(monitor.DimensionOperatorInclude),
Values: pulumi.StringArray{
pulumi.String("*"),
},
},
},
IgnoreDataBefore: pulumi.String("2024-06-01T21:00:00.000Z"),
MetricMeasureColumn: pulumi.String("% Processor Time"),
Operator: pulumi.String("GreaterOrLessThan"),
Query: pulumi.String("Perf | where ObjectName == \"Processor\""),
ResourceIdColumn: pulumi.String("resourceId"),
TimeAggregation: pulumi.String(monitor.TimeAggregationAverage),
},
},
},
Description: pulumi.String("Performance rule"),
Enabled: pulumi.Bool(true),
EvaluationFrequency: pulumi.String("PT5M"),
Location: pulumi.String("eastus"),
MuteActionsDuration: pulumi.String("PT30M"),
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
})
}
pulumi {
required_providers {
azure-native = {
source = "pulumi/azure-native"
}
}
}
resource "azure-native_monitor_scheduledqueryrule" "scheduledQueryRule" {
actions = {
action_groups = ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"]
action_properties = {
"Icm.Title" = "Custom title in ICM"
"Icm.TsgId" = "https://tsg.url"
}
custom_properties = {
"key11" = "value11"
"key12" = "value12"
}
}
check_workspace_alerts_storage_configured = true
criteria = {
all_of = [{
"alertSensitivity" = "Medium"
"criterionType" = "DynamicThresholdCriterion"
"dimensions" = [{
"name" = "ComputerIp"
"operator" = "Exclude"
"values" = ["192.168.1.1"]
}, {
"name" = "OSType"
"operator" = "Include"
"values" = ["*"]
}]
"ignoreDataBefore" = "2024-06-01T21:00:00.000Z"
"metricMeasureColumn" = "% Processor Time"
"operator" = "GreaterOrLessThan"
"query" = "Perf | where ObjectName == \"Processor\""
"resourceIdColumn" = "resourceId"
"timeAggregation" = "Average"
}]
}
description = "Performance rule"
enabled = true
evaluation_frequency = "PT5M"
location = "eastus"
mute_actions_duration = "PT30M"
resource_group_name = "QueryResourceGroupName"
rule_name = "perf"
scopes = ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"]
severity = 4
skip_query_validation = true
window_size = "PT10M"
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azurenative.monitor.ScheduledQueryRule;
import com.pulumi.azurenative.monitor.ScheduledQueryRuleArgs;
import com.pulumi.azurenative.monitor.inputs.ActionsArgs;
import com.pulumi.azurenative.monitor.inputs.ScheduledQueryRuleCriteriaArgs;
import java.util.ArrayList;
import java.util.Arrays;
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")
.actionProperties(Map.ofEntries(
Map.entry("Icm.Title", "Custom title in ICM"),
Map.entry("Icm.TsgId", "https://tsg.url")
))
.customProperties(Map.ofEntries(
Map.entry("key11", "value11"),
Map.entry("key12", "value12")
))
.build())
.checkWorkspaceAlertsStorageConfigured(true)
.criteria(ScheduledQueryRuleCriteriaArgs.builder()
.allOf(ConditionArgs.builder()
.alertSensitivity("Medium")
.criterionType("DynamicThresholdCriterion")
.dimensions(
DimensionArgs.builder()
.name("ComputerIp")
.operator("Exclude")
.values("192.168.1.1")
.build(),
DimensionArgs.builder()
.name("OSType")
.operator("Include")
.values("*")
.build())
.ignoreDataBefore("2024-06-01T21:00:00.000Z")
.metricMeasureColumn("% Processor Time")
.operator("GreaterOrLessThan")
.query("Perf | where ObjectName == \"Processor\"")
.resourceIdColumn("resourceId")
.timeAggregation("Average")
.build())
.build())
.description("Performance rule")
.enabled(true)
.evaluationFrequency("PT5M")
.location("eastus")
.muteActionsDuration("PT30M")
.resourceGroupName("QueryResourceGroupName")
.ruleName("perf")
.scopes("/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1")
.severity(4.0)
.skipQueryValidation(true)
.windowSize("PT10M")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as azure_native from "@pulumi/azure-native";
const scheduledQueryRule = new azure_native.monitor.ScheduledQueryRule("scheduledQueryRule", {
actions: {
actionGroups: ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
actionProperties: {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
customProperties: {
key11: "value11",
key12: "value12",
},
},
checkWorkspaceAlertsStorageConfigured: true,
criteria: {
allOf: [{
alertSensitivity: "Medium",
criterionType: azure_native.monitor.CriterionType.DynamicThresholdCriterion,
dimensions: [
{
name: "ComputerIp",
operator: azure_native.monitor.DimensionOperator.Exclude,
values: ["192.168.1.1"],
},
{
name: "OSType",
operator: azure_native.monitor.DimensionOperator.Include,
values: ["*"],
},
],
ignoreDataBefore: "2024-06-01T21:00:00.000Z",
metricMeasureColumn: "% Processor Time",
operator: "GreaterOrLessThan",
query: "Perf | where ObjectName == \"Processor\"",
resourceIdColumn: "resourceId",
timeAggregation: azure_native.monitor.TimeAggregation.Average,
}],
},
description: "Performance rule",
enabled: true,
evaluationFrequency: "PT5M",
location: "eastus",
muteActionsDuration: "PT30M",
resourceGroupName: "QueryResourceGroupName",
ruleName: "perf",
scopes: ["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"],
severity: 4,
skipQueryValidation: true,
windowSize: "PT10M",
});
import pulumi
import pulumi_azure_native as azure_native
scheduled_query_rule = azure_native.monitor.ScheduledQueryRule("scheduledQueryRule",
actions={
"action_groups": ["/subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup"],
"action_properties": {
"Icm.Title": "Custom title in ICM",
"Icm.TsgId": "https://tsg.url",
},
"custom_properties": {
"key11": "value11",
"key12": "value12",
},
},
check_workspace_alerts_storage_configured=True,
criteria={
"all_of": [{
"alert_sensitivity": "Medium",
"criterion_type": azure_native.monitor.CriterionType.DYNAMIC_THRESHOLD_CRITERION,
"dimensions": [
{
"name": "ComputerIp",
"operator": azure_native.monitor.DimensionOperator.EXCLUDE,
"values": ["192.168.1.1"],
},
{
"name": "OSType",
"operator": azure_native.monitor.DimensionOperator.INCLUDE,
"values": ["*"],
},
],
"ignore_data_before": "2024-06-01T21:00:00.000Z",
"metric_measure_column": "% Processor Time",
"operator": "GreaterOrLessThan",
"query": "Perf | where ObjectName == \"Processor\"",
"resource_id_column": "resourceId",
"time_aggregation": azure_native.monitor.TimeAggregation.AVERAGE,
}],
},
description="Performance rule",
enabled=True,
evaluation_frequency="PT5M",
location="eastus",
mute_actions_duration="PT30M",
resource_group_name="QueryResourceGroupName",
rule_name="perf",
scopes=["/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1"],
severity=float(4),
skip_query_validation=True,
window_size="PT10M")
resources:
scheduledQueryRule:
type: azure-native:monitor:ScheduledQueryRule
properties:
actions:
actionGroups:
- /subscriptions/1cf177ed-1330-4692-80ea-fd3d7783b147/resourcegroups/sqrapi/providers/microsoft.insights/actiongroups/myactiongroup
actionProperties:
Icm.Title: Custom title in ICM
Icm.TsgId: https://tsg.url
customProperties:
key11: value11
key12: value12
checkWorkspaceAlertsStorageConfigured: true
criteria:
allOf:
- alertSensitivity: Medium
criterionType: DynamicThresholdCriterion
dimensions:
- name: ComputerIp
operator: Exclude
values:
- 192.168.1.1
- name: OSType
operator: Include
values:
- '*'
ignoreDataBefore: 2024-06-01T21:00:00.000Z
metricMeasureColumn: '% Processor Time'
operator: GreaterOrLessThan
query: Perf | where ObjectName == "Processor"
resourceIdColumn: resourceId
timeAggregation: Average
description: Performance rule
enabled: true
evaluationFrequency: PT5M
location: eastus
muteActionsDuration: PT30M
resourceGroupName: QueryResourceGroupName
ruleName: perf
scopes:
- /subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1
severity: 4
skipQueryValidation: true
windowSize: PT10M
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,
resource_group_name: Optional[str] = None,
location: Optional[str] = None,
override_query_time_range: Optional[str] = None,
criteria: Optional[ScheduledQueryRuleCriteriaArgs] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
enabled: Optional[bool] = None,
evaluation_frequency: Optional[str] = None,
identity: Optional[MicrosoftCommonIdentityArgs] = None,
kind: Optional[Union[str, Kind]] = None,
actions: Optional[ActionsArgs] = None,
check_workspace_alerts_storage_configured: Optional[bool] = None,
resolve_configuration: Optional[RuleResolveConfigurationArgs] = None,
mute_actions_duration: Optional[str] = None,
auto_mitigate: Optional[bool] = None,
rule_name: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
severity: Optional[float] = None,
skip_query_validation: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
target_resource_types: Optional[Sequence[str]] = None,
window_size: Optional[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:monitor:ScheduledQueryRule
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
resource "azure-native_monitor_scheduledqueryrule" "name" {
# resource properties
}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.Monitor.ScheduledQueryRule("scheduledQueryRuleResource", new()
{
ResourceGroupName = "string",
Location = "string",
OverrideQueryTimeRange = "string",
Criteria = new AzureNative.Monitor.Inputs.ScheduledQueryRuleCriteriaArgs
{
AllOf = new[]
{
new AzureNative.Monitor.Inputs.ConditionArgs
{
AlertSensitivity = "string",
CriterionType = "string",
Dimensions = new[]
{
new AzureNative.Monitor.Inputs.DimensionArgs
{
Name = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
},
FailingPeriods = new AzureNative.Monitor.Inputs.ConditionFailingPeriodsArgs
{
MinFailingPeriodsToAlert = 0,
NumberOfEvaluationPeriods = 0,
},
IgnoreDataBefore = "string",
MetricMeasureColumn = "string",
MetricName = "string",
MinRecurrenceCount = 0,
Operator = "string",
Query = "string",
ResourceIdColumn = "string",
Threshold = 0,
TimeAggregation = "string",
},
},
},
Description = "string",
DisplayName = "string",
Enabled = false,
EvaluationFrequency = "string",
Identity = new AzureNative.Monitor.Inputs.MicrosoftCommonIdentityArgs
{
Type = AzureNative.Monitor.IdentityType.SystemAssigned,
UserAssignedIdentities = new[]
{
"string",
},
},
Kind = "string",
Actions = new AzureNative.Monitor.Inputs.ActionsArgs
{
ActionGroups = new[]
{
"string",
},
ActionProperties =
{
{ "string", "string" },
},
CustomProperties =
{
{ "string", "string" },
},
},
CheckWorkspaceAlertsStorageConfigured = false,
ResolveConfiguration = new AzureNative.Monitor.Inputs.RuleResolveConfigurationArgs
{
AutoResolved = false,
TimeToResolve = "string",
},
MuteActionsDuration = "string",
AutoMitigate = false,
RuleName = "string",
Scopes = new[]
{
"string",
},
Severity = 0,
SkipQueryValidation = false,
Tags =
{
{ "string", "string" },
},
TargetResourceTypes = new[]
{
"string",
},
WindowSize = "string",
});
example, err := monitor.NewScheduledQueryRule(ctx, "scheduledQueryRuleResource", &monitor.ScheduledQueryRuleArgs{
ResourceGroupName: pulumi.String("string"),
Location: pulumi.String("string"),
OverrideQueryTimeRange: pulumi.String("string"),
Criteria: &monitor.ScheduledQueryRuleCriteriaArgs{
AllOf: monitor.ConditionArray{
&monitor.ConditionArgs{
AlertSensitivity: pulumi.String("string"),
CriterionType: pulumi.String("string"),
Dimensions: monitor.DimensionArray{
&monitor.DimensionArgs{
Name: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
FailingPeriods: &monitor.ConditionFailingPeriodsArgs{
MinFailingPeriodsToAlert: pulumi.Float64(0),
NumberOfEvaluationPeriods: pulumi.Float64(0),
},
IgnoreDataBefore: pulumi.String("string"),
MetricMeasureColumn: pulumi.String("string"),
MetricName: pulumi.String("string"),
MinRecurrenceCount: pulumi.Float64(0),
Operator: pulumi.String("string"),
Query: pulumi.String("string"),
ResourceIdColumn: pulumi.String("string"),
Threshold: pulumi.Float64(0),
TimeAggregation: pulumi.String("string"),
},
},
},
Description: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Enabled: pulumi.Bool(false),
EvaluationFrequency: pulumi.String("string"),
Identity: &monitor.MicrosoftCommonIdentityArgs{
Type: monitor.IdentityTypeSystemAssigned,
UserAssignedIdentities: pulumi.StringArray{
pulumi.String("string"),
},
},
Kind: pulumi.String("string"),
Actions: &monitor.ActionsArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("string"),
},
ActionProperties: pulumi.StringMap{
"string": pulumi.String("string"),
},
CustomProperties: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
CheckWorkspaceAlertsStorageConfigured: pulumi.Bool(false),
ResolveConfiguration: &monitor.RuleResolveConfigurationArgs{
AutoResolved: pulumi.Bool(false),
TimeToResolve: pulumi.String("string"),
},
MuteActionsDuration: pulumi.String("string"),
AutoMitigate: pulumi.Bool(false),
RuleName: pulumi.String("string"),
Scopes: pulumi.StringArray{
pulumi.String("string"),
},
Severity: pulumi.Float64(0),
SkipQueryValidation: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TargetResourceTypes: pulumi.StringArray{
pulumi.String("string"),
},
WindowSize: pulumi.String("string"),
})
resource "azure-native_monitor_scheduledqueryrule" "scheduledQueryRuleResource" {
resource_group_name = "string"
location = "string"
override_query_time_range = "string"
criteria = {
all_of = [{
"alertSensitivity" = "string"
"criterionType" = "string"
"dimensions" = [{
"name" = "string"
"operator" = "string"
"values" = ["string"]
}]
"failingPeriods" = {
"minFailingPeriodsToAlert" = 0
"numberOfEvaluationPeriods" = 0
}
"ignoreDataBefore" = "string"
"metricMeasureColumn" = "string"
"metricName" = "string"
"minRecurrenceCount" = 0
"operator" = "string"
"query" = "string"
"resourceIdColumn" = "string"
"threshold" = 0
"timeAggregation" = "string"
}]
}
description = "string"
display_name = "string"
enabled = false
evaluation_frequency = "string"
identity = {
type = "SystemAssigned"
user_assigned_identities = ["string"]
}
kind = "string"
actions = {
action_groups = ["string"]
action_properties = {
"string" = "string"
}
custom_properties = {
"string" = "string"
}
}
check_workspace_alerts_storage_configured = false
resolve_configuration = {
auto_resolved = false
time_to_resolve = "string"
}
mute_actions_duration = "string"
auto_mitigate = false
rule_name = "string"
scopes = ["string"]
severity = 0
skip_query_validation = false
tags = {
"string" = "string"
}
target_resource_types = ["string"]
window_size = "string"
}
var scheduledQueryRuleResource = new ScheduledQueryRule("scheduledQueryRuleResource", ScheduledQueryRuleArgs.builder()
.resourceGroupName("string")
.location("string")
.overrideQueryTimeRange("string")
.criteria(ScheduledQueryRuleCriteriaArgs.builder()
.allOf(com.pulumi.azurenative.monitor.inputs.ConditionArgs.builder()
.alertSensitivity("string")
.criterionType("string")
.dimensions(com.pulumi.azurenative.monitor.inputs.DimensionArgs.builder()
.name("string")
.operator("string")
.values("string")
.build())
.failingPeriods(ConditionFailingPeriodsArgs.builder()
.minFailingPeriodsToAlert(0.0)
.numberOfEvaluationPeriods(0.0)
.build())
.ignoreDataBefore("string")
.metricMeasureColumn("string")
.metricName("string")
.minRecurrenceCount(0.0)
.operator("string")
.query("string")
.resourceIdColumn("string")
.threshold(0.0)
.timeAggregation("string")
.build())
.build())
.description("string")
.displayName("string")
.enabled(false)
.evaluationFrequency("string")
.identity(MicrosoftCommonIdentityArgs.builder()
.type("SystemAssigned")
.userAssignedIdentities("string")
.build())
.kind("string")
.actions(ActionsArgs.builder()
.actionGroups("string")
.actionProperties(Map.of("string", "string"))
.customProperties(Map.of("string", "string"))
.build())
.checkWorkspaceAlertsStorageConfigured(false)
.resolveConfiguration(RuleResolveConfigurationArgs.builder()
.autoResolved(false)
.timeToResolve("string")
.build())
.muteActionsDuration("string")
.autoMitigate(false)
.ruleName("string")
.scopes("string")
.severity(0.0)
.skipQueryValidation(false)
.tags(Map.of("string", "string"))
.targetResourceTypes("string")
.windowSize("string")
.build());
scheduled_query_rule_resource = azure_native.monitor.ScheduledQueryRule("scheduledQueryRuleResource",
resource_group_name="string",
location="string",
override_query_time_range="string",
criteria={
"all_of": [{
"alert_sensitivity": "string",
"criterion_type": "string",
"dimensions": [{
"name": "string",
"operator": "string",
"values": ["string"],
}],
"failing_periods": {
"min_failing_periods_to_alert": float(0),
"number_of_evaluation_periods": float(0),
},
"ignore_data_before": "string",
"metric_measure_column": "string",
"metric_name": "string",
"min_recurrence_count": float(0),
"operator": "string",
"query": "string",
"resource_id_column": "string",
"threshold": float(0),
"time_aggregation": "string",
}],
},
description="string",
display_name="string",
enabled=False,
evaluation_frequency="string",
identity={
"type": azure_native.monitor.IdentityType.SYSTEM_ASSIGNED,
"user_assigned_identities": ["string"],
},
kind="string",
actions={
"action_groups": ["string"],
"action_properties": {
"string": "string",
},
"custom_properties": {
"string": "string",
},
},
check_workspace_alerts_storage_configured=False,
resolve_configuration={
"auto_resolved": False,
"time_to_resolve": "string",
},
mute_actions_duration="string",
auto_mitigate=False,
rule_name="string",
scopes=["string"],
severity=float(0),
skip_query_validation=False,
tags={
"string": "string",
},
target_resource_types=["string"],
window_size="string")
const scheduledQueryRuleResource = new azure_native.monitor.ScheduledQueryRule("scheduledQueryRuleResource", {
resourceGroupName: "string",
location: "string",
overrideQueryTimeRange: "string",
criteria: {
allOf: [{
alertSensitivity: "string",
criterionType: "string",
dimensions: [{
name: "string",
operator: "string",
values: ["string"],
}],
failingPeriods: {
minFailingPeriodsToAlert: 0,
numberOfEvaluationPeriods: 0,
},
ignoreDataBefore: "string",
metricMeasureColumn: "string",
metricName: "string",
minRecurrenceCount: 0,
operator: "string",
query: "string",
resourceIdColumn: "string",
threshold: 0,
timeAggregation: "string",
}],
},
description: "string",
displayName: "string",
enabled: false,
evaluationFrequency: "string",
identity: {
type: azure_native.monitor.IdentityType.SystemAssigned,
userAssignedIdentities: ["string"],
},
kind: "string",
actions: {
actionGroups: ["string"],
actionProperties: {
string: "string",
},
customProperties: {
string: "string",
},
},
checkWorkspaceAlertsStorageConfigured: false,
resolveConfiguration: {
autoResolved: false,
timeToResolve: "string",
},
muteActionsDuration: "string",
autoMitigate: false,
ruleName: "string",
scopes: ["string"],
severity: 0,
skipQueryValidation: false,
tags: {
string: "string",
},
targetResourceTypes: ["string"],
windowSize: "string",
});
type: azure-native:monitor:ScheduledQueryRule
properties:
actions:
actionGroups:
- string
actionProperties:
string: string
customProperties:
string: string
autoMitigate: false
checkWorkspaceAlertsStorageConfigured: false
criteria:
allOf:
- alertSensitivity: string
criterionType: string
dimensions:
- name: string
operator: string
values:
- string
failingPeriods:
minFailingPeriodsToAlert: 0
numberOfEvaluationPeriods: 0
ignoreDataBefore: string
metricMeasureColumn: string
metricName: string
minRecurrenceCount: 0
operator: string
query: string
resourceIdColumn: string
threshold: 0
timeAggregation: string
description: string
displayName: string
enabled: false
evaluationFrequency: string
identity:
type: SystemAssigned
userAssignedIdentities:
- string
kind: string
location: string
muteActionsDuration: string
overrideQueryTimeRange: string
resolveConfiguration:
autoResolved: false
timeToResolve: string
resourceGroupName: string
ruleName: string
scopes:
- string
severity: 0
skipQueryValidation: false
tags:
string: string
targetResourceTypes:
- string
windowSize: 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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ScheduledQueryRule resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Actions
Pulumi.
Azure Native. Monitor. Inputs. Actions - Actions to invoke when the alert fires.
- Auto
Mitigate bool - The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- Check
Workspace boolAlerts Storage Configured - 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.
- Criteria
Pulumi.
Azure Native. Monitor. Inputs. Scheduled Query Rule Criteria - The rule criteria that defines the conditions of the scheduled query rule.
- Description string
- The description of the scheduled query rule.
- Display
Name string - The display name of the alert rule
- Enabled bool
- The flag which indicates whether this scheduled query rule is enabled. Value should be true or false
- Evaluation
Frequency string - How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
- Identity
Pulumi.
Azure Native. Monitor. Inputs. Microsoft Common Identity - The identity of the resource.
- Kind
string | Pulumi.
Azure Native. Monitor. Kind - Indicates the type of scheduled query rule. The default is LogAlert.
- Location string
- The geo-location where the resource lives
- Mute
Actions stringDuration - 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.
- Override
Query stringTime Range - If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
- Resolve
Configuration Pulumi.Azure Native. Monitor. Inputs. Rule Resolve Configuration - Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- Rule
Name string - The name of the rule.
- Scopes List<string>
- The list of resource id's that this scheduled query rule is scoped to.
- Severity 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.
- Skip
Query boolValidation - 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.
- Dictionary<string, string>
- Resource tags.
- Target
Resource List<string>Types - 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
- Window
Size 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.
- Resource
Group stringName - The name of the resource group. The name is case insensitive.
- Actions
Actions
Args - Actions to invoke when the alert fires.
- Auto
Mitigate bool - The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- Check
Workspace boolAlerts Storage Configured - 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.
- Criteria
Scheduled
Query Rule Criteria Args - The rule criteria that defines the conditions of the scheduled query rule.
- Description string
- The description of the scheduled query rule.
- Display
Name string - The display name of the alert rule
- Enabled bool
- The flag which indicates whether this scheduled query rule is enabled. Value should be true or false
- Evaluation
Frequency string - How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
- Identity
Microsoft
Common Identity Args - The identity of the resource.
- Kind string | Kind
- Indicates the type of scheduled query rule. The default is LogAlert.
- Location string
- The geo-location where the resource lives
- Mute
Actions stringDuration - 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.
- Override
Query stringTime Range - If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
- Resolve
Configuration RuleResolve Configuration Args - Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- Rule
Name string - The name of the rule.
- Scopes []string
- The list of resource id's that this scheduled query rule is scoped to.
- Severity float64
- 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.
- Skip
Query boolValidation - 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.
- map[string]string
- Resource tags.
- Target
Resource []stringTypes - 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
- Window
Size 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.
- resource_
group_ stringname - The name of the resource group. The name is case insensitive.
- actions object
- Actions to invoke when the alert fires.
- auto_
mitigate bool - The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- check_
workspace_ boolalerts_ storage_ configured - 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.
- criteria object
- The rule criteria that defines the conditions of the scheduled query rule.
- description string
- The description of the scheduled query rule.
- display_
name string - The display name of the alert rule
- enabled bool
- The flag which indicates whether this scheduled query rule is enabled. Value should be true or false
- evaluation_
frequency string - How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
- identity object
- The identity of the resource.
- kind
string | "Log
Alert" | "Simple Log Alert" | "Log To Metric" - Indicates the type of scheduled query rule. The default is LogAlert.
- location string
- The geo-location where the resource lives
- mute_
actions_ stringduration - 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.
- override_
query_ stringtime_ range - If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
- resolve_
configuration object - Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- rule_
name string - The name of the rule.
- scopes list(string)
- The list of resource id's that this scheduled query rule is scoped to.
- severity number
- 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.
- skip_
query_ boolvalidation - 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.
- map(string)
- Resource tags.
- target_
resource_ list(string)types - 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
- window_
size 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.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- actions Actions
- Actions to invoke when the alert fires.
- auto
Mitigate Boolean - The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- check
Workspace BooleanAlerts Storage Configured - 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.
- criteria
Scheduled
Query Rule Criteria - The rule criteria that defines the conditions of the scheduled query rule.
- description String
- The description of the scheduled query rule.
- display
Name String - The display name of the alert rule
- enabled Boolean
- The flag which indicates whether this scheduled query rule is enabled. Value should be true or false
- evaluation
Frequency String - How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
- identity
Microsoft
Common Identity - The identity of the resource.
- kind String | Kind
- Indicates the type of scheduled query rule. The default is LogAlert.
- location String
- The geo-location where the resource lives
- mute
Actions StringDuration - 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.
- override
Query StringTime Range - If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
- resolve
Configuration RuleResolve Configuration - Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- rule
Name String - The name of the rule.
- scopes List<String>
- The list of resource id's that this scheduled query rule is scoped to.
- severity 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.
- skip
Query BooleanValidation - 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.
- Map<String,String>
- Resource tags.
- target
Resource List<String>Types - 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
- window
Size 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.
- resource
Group stringName - The name of the resource group. The name is case insensitive.
- actions Actions
- Actions to invoke when the alert fires.
- auto
Mitigate boolean - The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- check
Workspace booleanAlerts Storage Configured - 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.
- criteria
Scheduled
Query Rule Criteria - The rule criteria that defines the conditions of the scheduled query rule.
- description string
- The description of the scheduled query rule.
- display
Name string - The display name of the alert rule
- enabled boolean
- The flag which indicates whether this scheduled query rule is enabled. Value should be true or false
- evaluation
Frequency string - How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
- identity
Microsoft
Common Identity - The identity of the resource.
- kind string | Kind
- Indicates the type of scheduled query rule. The default is LogAlert.
- location string
- The geo-location where the resource lives
- mute
Actions stringDuration - 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.
- override
Query stringTime Range - If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
- resolve
Configuration RuleResolve Configuration - Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- rule
Name string - The name of the rule.
- scopes string[]
- The list of resource id's that this scheduled query rule is scoped to.
- severity number
- 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.
- skip
Query booleanValidation - 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.
- {[key: string]: string}
- Resource tags.
- target
Resource string[]Types - 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
- window
Size 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.
- resource_
group_ strname - The name of the resource group. The name is case insensitive.
- actions
Actions
Args - Actions to invoke when the alert fires.
- auto_
mitigate bool - The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- check_
workspace_ boolalerts_ storage_ configured - 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.
- criteria
Scheduled
Query Rule Criteria Args - The rule criteria that defines the conditions of the scheduled query rule.
- description str
- The description of the scheduled query rule.
- display_
name str - The display name of the alert rule
- enabled bool
- The flag which indicates whether this scheduled query rule is enabled. Value should be true or false
- evaluation_
frequency str - How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
- identity
Microsoft
Common Identity Args - The identity of the resource.
- kind str | Kind
- Indicates the type of scheduled query rule. The default is LogAlert.
- location str
- The geo-location where the resource lives
- mute_
actions_ strduration - 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.
- override_
query_ strtime_ range - If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
- resolve_
configuration RuleResolve Configuration Args - Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- rule_
name str - The name of the rule.
- scopes Sequence[str]
- The list of resource id's that this scheduled query rule is scoped to.
- severity float
- 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.
- skip_
query_ boolvalidation - 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.
- Mapping[str, str]
- Resource tags.
- target_
resource_ Sequence[str]types - 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
- window_
size str - 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.
- resource
Group StringName - The name of the resource group. The name is case insensitive.
- actions Property Map
- Actions to invoke when the alert fires.
- auto
Mitigate Boolean - The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- check
Workspace BooleanAlerts Storage Configured - 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.
- criteria Property Map
- The rule criteria that defines the conditions of the scheduled query rule.
- description String
- The description of the scheduled query rule.
- display
Name String - The display name of the alert rule
- enabled Boolean
- The flag which indicates whether this scheduled query rule is enabled. Value should be true or false
- evaluation
Frequency String - How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert.
- identity Property Map
- The identity of the resource.
- kind
String | "Log
Alert" | "Simple Log Alert" | "Log To Metric" - Indicates the type of scheduled query rule. The default is LogAlert.
- location String
- The geo-location where the resource lives
- mute
Actions StringDuration - 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.
- override
Query StringTime Range - If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert.
- resolve
Configuration Property Map - Defines the configuration for resolving fired alerts. Relevant only for rules of kinds LogAlert and SimpleLogAlert.
- rule
Name String - The name of the rule.
- scopes List<String>
- The list of resource id's that this scheduled query rule is scoped to.
- severity Number
- 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.
- skip
Query BooleanValidation - 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.
- Map<String>
- Resource tags.
- target
Resource List<String>Types - 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
- window
Size 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScheduledQueryRule resource produces the following output properties:
- Azure
Api stringVersion - The Azure API version of the resource.
- Created
With stringApi Version - The api-version used when creating this alert rule
- Etag string
- "If etag is provided in the response body, it may 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.
- Is
Legacy boolLog Analytics Rule - True if alert rule is legacy Log Analytic rule
- Is
Workspace boolAlerts Storage Configured - The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.
- Name string
- The name of the resource
- System
Data Pulumi.Azure Native. Monitor. Outputs. System Data Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- Azure
Api stringVersion - The Azure API version of the resource.
- Created
With stringApi Version - The api-version used when creating this alert rule
- Etag string
- "If etag is provided in the response body, it may 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.
- Is
Legacy boolLog Analytics Rule - True if alert rule is legacy Log Analytic rule
- Is
Workspace boolAlerts Storage Configured - The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.
- Name string
- The name of the resource
- System
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- Type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_
api_ stringversion - The Azure API version of the resource.
- created_
with_ stringapi_ version - The api-version used when creating this alert rule
- etag string
- "If etag is provided in the response body, it may 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.
- is_
legacy_ boollog_ analytics_ rule - True if alert rule is legacy Log Analytic rule
- is_
workspace_ boolalerts_ storage_ configured - The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.
- name string
- The name of the resource
- system_
data object - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- created
With StringApi Version - The api-version used when creating this alert rule
- etag String
- "If etag is provided in the response body, it may 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.
- is
Legacy BooleanLog Analytics Rule - True if alert rule is legacy Log Analytic rule
- is
Workspace BooleanAlerts Storage Configured - The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.
- name String
- The name of the resource
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api stringVersion - The Azure API version of the resource.
- created
With stringApi Version - The api-version used when creating this alert rule
- etag string
- "If etag is provided in the response body, it may 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.
- is
Legacy booleanLog Analytics Rule - True if alert rule is legacy Log Analytic rule
- is
Workspace booleanAlerts Storage Configured - The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.
- name string
- The name of the resource
- system
Data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type string
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure_
api_ strversion - The Azure API version of the resource.
- created_
with_ strapi_ version - The api-version used when creating this alert rule
- etag str
- "If etag is provided in the response body, it may 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_ boollog_ analytics_ rule - True if alert rule is legacy Log Analytic rule
- is_
workspace_ boolalerts_ storage_ configured - The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.
- name str
- The name of the resource
- system_
data SystemData Response - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type str
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
- azure
Api StringVersion - The Azure API version of the resource.
- created
With StringApi Version - The api-version used when creating this alert rule
- etag String
- "If etag is provided in the response body, it may 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.
- is
Legacy BooleanLog Analytics Rule - True if alert rule is legacy Log Analytic rule
- is
Workspace BooleanAlerts Storage Configured - The flag which indicates whether this scheduled query rule has been configured to be stored in the customer's storage. The default is false.
- name String
- The name of the resource
- system
Data Property Map - Azure Resource Manager metadata containing createdBy and modifiedBy information.
- type String
- The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts"
Supporting Types
Actions, ActionsArgs
Actions to invoke when the alert fires.- Action
Groups List<string> - Action Group resource Ids to invoke when the alert fires.
- Action
Properties Dictionary<string, string> - The properties of an action properties.
- Custom
Properties Dictionary<string, string> - The properties of an alert payload.
- Action
Groups []string - Action Group resource Ids to invoke when the alert fires.
- Action
Properties map[string]string - The properties of an action properties.
- Custom
Properties map[string]string - The properties of an alert payload.
- action_
groups list(string) - Action Group resource Ids to invoke when the alert fires.
- action_
properties map(string) - The properties of an action properties.
- custom_
properties map(string) - The properties of an alert payload.
- action
Groups List<String> - Action Group resource Ids to invoke when the alert fires.
- action
Properties Map<String,String> - The properties of an action properties.
- custom
Properties Map<String,String> - The properties of an alert payload.
- action
Groups string[] - Action Group resource Ids to invoke when the alert fires.
- action
Properties {[key: string]: string} - The properties of an action properties.
- custom
Properties {[key: string]: string} - The properties of an alert payload.
- action_
groups Sequence[str] - Action Group resource Ids to invoke when the alert fires.
- action_
properties Mapping[str, str] - The properties of an action properties.
- custom_
properties Mapping[str, str] - The properties of an alert payload.
- action
Groups List<String> - Action Group resource Ids to invoke when the alert fires.
- action
Properties Map<String> - The properties of an action properties.
- custom
Properties Map<String> - The properties of an alert payload.
ActionsResponse, ActionsResponseArgs
Actions to invoke when the alert fires.- Action
Groups List<string> - Action Group resource Ids to invoke when the alert fires.
- Action
Properties Dictionary<string, string> - The properties of an action properties.
- Custom
Properties Dictionary<string, string> - The properties of an alert payload.
- Action
Groups []string - Action Group resource Ids to invoke when the alert fires.
- Action
Properties map[string]string - The properties of an action properties.
- Custom
Properties map[string]string - The properties of an alert payload.
- action_
groups list(string) - Action Group resource Ids to invoke when the alert fires.
- action_
properties map(string) - The properties of an action properties.
- custom_
properties map(string) - The properties of an alert payload.
- action
Groups List<String> - Action Group resource Ids to invoke when the alert fires.
- action
Properties Map<String,String> - The properties of an action properties.
- custom
Properties Map<String,String> - The properties of an alert payload.
- action
Groups string[] - Action Group resource Ids to invoke when the alert fires.
- action
Properties {[key: string]: string} - The properties of an action properties.
- custom
Properties {[key: string]: string} - The properties of an alert payload.
- action_
groups Sequence[str] - Action Group resource Ids to invoke when the alert fires.
- action_
properties Mapping[str, str] - The properties of an action properties.
- custom_
properties Mapping[str, str] - The properties of an alert payload.
- action
Groups List<String> - Action Group resource Ids to invoke when the alert fires.
- action
Properties Map<String> - The properties of an action properties.
- custom
Properties Map<String> - The properties of an alert payload.
Condition, ConditionArgs
A condition of the scheduled query rule.- Alert
Sensitivity string - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- Criterion
Type string | Pulumi.Azure Native. Monitor. Criterion Type - Specifies the type of threshold criteria
- Dimensions
List<Pulumi.
Azure Native. Monitor. Inputs. Dimension> - List of Dimensions conditions
- Failing
Periods Pulumi.Azure Native. Monitor. Inputs. Condition Failing Periods - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- Ignore
Data stringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- Metric
Measure stringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- Metric
Name string - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- Min
Recurrence doubleCount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- Operator
string | Pulumi.
Azure Native. Monitor. Condition Operator - The criteria operator. Relevant and required only for rules of the kind LogAlert.
- Query string
- Log query alert
- Resource
Id stringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- Threshold double
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- Time
Aggregation string | Pulumi.Azure Native. Monitor. Time Aggregation - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- Alert
Sensitivity string - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- Criterion
Type string | CriterionType - Specifies the type of threshold criteria
- Dimensions []Dimension
- List of Dimensions conditions
- Failing
Periods ConditionFailing Periods - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- Ignore
Data stringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- Metric
Measure stringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- Metric
Name string - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- Min
Recurrence float64Count - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- Operator
string | Condition
Operator - The criteria operator. Relevant and required only for rules of the kind LogAlert.
- Query string
- Log query alert
- Resource
Id stringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- Threshold float64
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- Time
Aggregation string | TimeAggregation - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert_
sensitivity string - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion_
type string | "StaticThreshold Criterion" | "Dynamic Threshold Criterion" - Specifies the type of threshold criteria
- dimensions list(object)
- List of Dimensions conditions
- failing_
periods object - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore_
data_ stringbefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric_
measure_ stringcolumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric_
name string - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min_
recurrence_ numbercount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator string | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "notin" | "startswith" | "notstartswith" | "contains" | "notcontains"
- The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query string
- Log query alert
- resource_
id_ stringcolumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold number
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time_
aggregation string | "Count" | "Average" | "Minimum" | "Maximum" | "Total" - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert
Sensitivity String - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion
Type String | CriterionType - Specifies the type of threshold criteria
- dimensions List<Dimension>
- List of Dimensions conditions
- failing
Periods ConditionFailing Periods - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore
Data StringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric
Measure StringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric
Name String - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min
Recurrence DoubleCount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator
String | Condition
Operator - The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query String
- Log query alert
- resource
Id StringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold Double
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time
Aggregation String | TimeAggregation - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert
Sensitivity string - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion
Type string | CriterionType - Specifies the type of threshold criteria
- dimensions Dimension[]
- List of Dimensions conditions
- failing
Periods ConditionFailing Periods - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore
Data stringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric
Measure stringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric
Name string - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min
Recurrence numberCount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator
string | Condition
Operator - The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query string
- Log query alert
- resource
Id stringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold number
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time
Aggregation string | TimeAggregation - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert_
sensitivity str - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion_
type str | CriterionType - Specifies the type of threshold criteria
- dimensions Sequence[Dimension]
- List of Dimensions conditions
- failing_
periods ConditionFailing Periods - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore_
data_ strbefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric_
measure_ strcolumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric_
name str - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min_
recurrence_ floatcount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator
str | Condition
Operator - The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query str
- Log query alert
- resource_
id_ strcolumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold float
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time_
aggregation str | TimeAggregation - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert
Sensitivity String - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion
Type String | "StaticThreshold Criterion" | "Dynamic Threshold Criterion" - Specifies the type of threshold criteria
- dimensions List<Property Map>
- List of Dimensions conditions
- failing
Periods Property Map - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore
Data StringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric
Measure StringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric
Name String - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min
Recurrence NumberCount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator String | "eq" | "ne" | "lt" | "lte" | "gt" | "gte" | "in" | "notin" | "startswith" | "notstartswith" | "contains" | "notcontains"
- The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query String
- Log query alert
- resource
Id StringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold Number
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time
Aggregation String | "Count" | "Average" | "Minimum" | "Maximum" | "Total" - Aggregation type. Relevant and required only for rules of the kind LogAlert.
ConditionFailingPeriods, ConditionFailingPeriodsArgs
The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.- Min
Failing doublePeriods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- Number
Of doubleEvaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- Min
Failing float64Periods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- Number
Of float64Evaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min_
failing_ numberperiods_ to_ alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number_
of_ numberevaluation_ periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min
Failing DoublePeriods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number
Of DoubleEvaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min
Failing numberPeriods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number
Of numberEvaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min_
failing_ floatperiods_ to_ alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number_
of_ floatevaluation_ periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min
Failing NumberPeriods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number
Of NumberEvaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
ConditionFailingPeriodsResponse, ConditionFailingPeriodsResponseArgs
The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.- Min
Failing doublePeriods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- Number
Of doubleEvaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- Min
Failing float64Periods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- Number
Of float64Evaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min_
failing_ numberperiods_ to_ alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number_
of_ numberevaluation_ periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min
Failing DoublePeriods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number
Of DoubleEvaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min
Failing numberPeriods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number
Of numberEvaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min_
failing_ floatperiods_ to_ alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number_
of_ floatevaluation_ periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
- min
Failing NumberPeriods To Alert - The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1
- number
Of NumberEvaluation Periods - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points. Default value is 1
ConditionOperator, ConditionOperatorArgs
- Equal
eqEqual to.- Not
Equal neNot equal to.- Less
Than ltLess than.- Less
Than Or Equal lteLess than or equal to.- Greater
Than gtGreater than.- Greater
Than Or Equal gteGreater than or equal to.- In
inMatches whenvalueis one of the items in the^^-delimited list (for example,value= "east^^west^^north").- Not
In notinMatches whenvalueis none of the items in the^^-delimited list (for example,value= "east^^west^^north").- Starts
With startswithStarts with.- Not
Starts With notstartswithDoes not start with.- Contains
containsContains the value.- Not
Contains notcontainsDoes not contain the value.
- Condition
Operator Equal eqEqual to.- Condition
Operator Not Equal neNot equal to.- Condition
Operator Less Than ltLess than.- Condition
Operator Less Than Or Equal lteLess than or equal to.- Condition
Operator Greater Than gtGreater than.- Condition
Operator Greater Than Or Equal gteGreater than or equal to.- Condition
Operator In inMatches whenvalueis one of the items in the^^-delimited list (for example,value= "east^^west^^north").- Condition
Operator Not In notinMatches whenvalueis none of the items in the^^-delimited list (for example,value= "east^^west^^north").- Condition
Operator Starts With startswithStarts with.- Condition
Operator Not Starts With notstartswithDoes not start with.- Condition
Operator Contains containsContains the value.- Condition
Operator Not Contains notcontainsDoes not contain the value.
- "eq"
eqEqual to.- "ne"
neNot equal to.- "lt"
ltLess than.- "lte"
lteLess than or equal to.- "gt"
gtGreater than.- "gte"
gteGreater than or equal to.- "in"
inMatches whenvalueis one of the items in the^^-delimited list (for example,value= "east^^west^^north").- "notin"
notinMatches whenvalueis none of the items in the^^-delimited list (for example,value= "east^^west^^north").- "startswith"
startswithStarts with.- "notstartswith"
notstartswithDoes not start with.- "contains"
containsContains the value.- "notcontains"
notcontainsDoes not contain the value.
- Equal
eqEqual to.- Not
Equal neNot equal to.- Less
Than ltLess than.- Less
Than Or Equal lteLess than or equal to.- Greater
Than gtGreater than.- Greater
Than Or Equal gteGreater than or equal to.- In
inMatches whenvalueis one of the items in the^^-delimited list (for example,value= "east^^west^^north").- Not
In notinMatches whenvalueis none of the items in the^^-delimited list (for example,value= "east^^west^^north").- Starts
With startswithStarts with.- Not
Starts With notstartswithDoes not start with.- Contains
containsContains the value.- Not
Contains notcontainsDoes not contain the value.
- Equal
eqEqual to.- Not
Equal neNot equal to.- Less
Than ltLess than.- Less
Than Or Equal lteLess than or equal to.- Greater
Than gtGreater than.- Greater
Than Or Equal gteGreater than or equal to.- In
inMatches whenvalueis one of the items in the^^-delimited list (for example,value= "east^^west^^north").- Not
In notinMatches whenvalueis none of the items in the^^-delimited list (for example,value= "east^^west^^north").- Starts
With startswithStarts with.- Not
Starts With notstartswithDoes not start with.- Contains
containsContains the value.- Not
Contains notcontainsDoes not contain the value.
- EQUAL
eqEqual to.- NOT_EQUAL
neNot equal to.- LESS_THAN
ltLess than.- LESS_THAN_OR_EQUAL
lteLess than or equal to.- GREATER_THAN
gtGreater than.- GREATER_THAN_OR_EQUAL
gteGreater than or equal to.- IN_
inMatches whenvalueis one of the items in the^^-delimited list (for example,value= "east^^west^^north").- NOT_IN
notinMatches whenvalueis none of the items in the^^-delimited list (for example,value= "east^^west^^north").- STARTS_WITH
startswithStarts with.- NOT_STARTS_WITH
notstartswithDoes not start with.- CONTAINS
containsContains the value.- NOT_CONTAINS
notcontainsDoes not contain the value.
- "eq"
eqEqual to.- "ne"
neNot equal to.- "lt"
ltLess than.- "lte"
lteLess than or equal to.- "gt"
gtGreater than.- "gte"
gteGreater than or equal to.- "in"
inMatches whenvalueis one of the items in the^^-delimited list (for example,value= "east^^west^^north").- "notin"
notinMatches whenvalueis none of the items in the^^-delimited list (for example,value= "east^^west^^north").- "startswith"
startswithStarts with.- "notstartswith"
notstartswithDoes not start with.- "contains"
containsContains the value.- "notcontains"
notcontainsDoes not contain the value.
ConditionResponse, ConditionResponseArgs
A condition of the scheduled query rule.- Alert
Sensitivity string - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- Criterion
Type string - Specifies the type of threshold criteria
- Dimensions
List<Pulumi.
Azure Native. Monitor. Inputs. Dimension Response> - List of Dimensions conditions
- Failing
Periods Pulumi.Azure Native. Monitor. Inputs. Condition Failing Periods Response - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- Ignore
Data stringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- Metric
Measure stringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- Metric
Name string - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- Min
Recurrence doubleCount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- Operator string
- The criteria operator. Relevant and required only for rules of the kind LogAlert.
- Query string
- Log query alert
- Resource
Id stringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- Threshold double
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- Time
Aggregation string - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- Alert
Sensitivity string - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- Criterion
Type string - Specifies the type of threshold criteria
- Dimensions
[]Dimension
Response - List of Dimensions conditions
- Failing
Periods ConditionFailing Periods Response - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- Ignore
Data stringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- Metric
Measure stringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- Metric
Name string - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- Min
Recurrence float64Count - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- Operator string
- The criteria operator. Relevant and required only for rules of the kind LogAlert.
- Query string
- Log query alert
- Resource
Id stringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- Threshold float64
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- Time
Aggregation string - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert_
sensitivity string - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion_
type string - Specifies the type of threshold criteria
- dimensions list(object)
- List of Dimensions conditions
- failing_
periods object - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore_
data_ stringbefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric_
measure_ stringcolumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric_
name string - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min_
recurrence_ numbercount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator string
- The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query string
- Log query alert
- resource_
id_ stringcolumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold number
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time_
aggregation string - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert
Sensitivity String - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion
Type String - Specifies the type of threshold criteria
- dimensions
List<Dimension
Response> - List of Dimensions conditions
- failing
Periods ConditionFailing Periods Response - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore
Data StringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric
Measure StringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric
Name String - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min
Recurrence DoubleCount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator String
- The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query String
- Log query alert
- resource
Id StringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold Double
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time
Aggregation String - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert
Sensitivity string - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion
Type string - Specifies the type of threshold criteria
- dimensions
Dimension
Response[] - List of Dimensions conditions
- failing
Periods ConditionFailing Periods Response - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore
Data stringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric
Measure stringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric
Name string - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min
Recurrence numberCount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator string
- The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query string
- Log query alert
- resource
Id stringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold number
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time
Aggregation string - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert_
sensitivity str - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion_
type str - Specifies the type of threshold criteria
- dimensions
Sequence[Dimension
Response] - List of Dimensions conditions
- failing_
periods ConditionFailing Periods Response - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore_
data_ strbefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric_
measure_ strcolumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric_
name str - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min_
recurrence_ floatcount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator str
- The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query str
- Log query alert
- resource_
id_ strcolumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold float
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time_
aggregation str - Aggregation type. Relevant and required only for rules of the kind LogAlert.
- alert
Sensitivity String - The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant only for dynamic threshold rules of the kind LogAlert.
- criterion
Type String - Specifies the type of threshold criteria
- dimensions List<Property Map>
- List of Dimensions conditions
- failing
Periods Property Map - The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.
- ignore
Data StringBefore - Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format). Relevant only for dynamic threshold rules of the kind LogAlert.
- metric
Measure StringColumn - The column containing the metric measure number. Relevant only for rules of the kind LogAlert.
- metric
Name String - The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric.
- min
Recurrence NumberCount - The minimum results count that should be found for triggering an alert. Relevant only for rules of the kind SimpleLogAlert.
- operator String
- The criteria operator. Relevant and required only for rules of the kind LogAlert.
- query String
- Log query alert
- resource
Id StringColumn - The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert.
- threshold Number
- the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert.
- time
Aggregation String - Aggregation type. Relevant and required only for rules of the kind LogAlert.
CriterionType, CriterionTypeArgs
- Static
Threshold Criterion StaticThresholdCriterionStaticThresholdCriterion- Dynamic
Threshold Criterion DynamicThresholdCriterionDynamicThresholdCriterion
- Criterion
Type Static Threshold Criterion StaticThresholdCriterionStaticThresholdCriterion- Criterion
Type Dynamic Threshold Criterion DynamicThresholdCriterionDynamicThresholdCriterion
- "Static
Threshold Criterion" StaticThresholdCriterionStaticThresholdCriterion- "Dynamic
Threshold Criterion" DynamicThresholdCriterionDynamicThresholdCriterion
- Static
Threshold Criterion StaticThresholdCriterionStaticThresholdCriterion- Dynamic
Threshold Criterion DynamicThresholdCriterionDynamicThresholdCriterion
- Static
Threshold Criterion StaticThresholdCriterionStaticThresholdCriterion- Dynamic
Threshold Criterion DynamicThresholdCriterionDynamicThresholdCriterion
- STATIC_THRESHOLD_CRITERION
StaticThresholdCriterionStaticThresholdCriterion- DYNAMIC_THRESHOLD_CRITERION
DynamicThresholdCriterionDynamicThresholdCriterion
- "Static
Threshold Criterion" StaticThresholdCriterionStaticThresholdCriterion- "Dynamic
Threshold Criterion" DynamicThresholdCriterionDynamicThresholdCriterion
Dimension, DimensionArgs
Dimension splitting and filtering definition- Name string
- Name of the dimension
- Operator
string | Pulumi.
Azure Native. Monitor. Dimension Operator - Operator for dimension values
- Values List<string>
- List of dimension values
- Name string
- Name of the dimension
- Operator
string | Dimension
Operator - Operator for dimension values
- Values []string
- List of dimension values
- name string
- Name of the dimension
- operator string | "Include" | "Exclude"
- Operator for dimension values
- values list(string)
- List of dimension values
- name String
- Name of the dimension
- operator
String | Dimension
Operator - Operator for dimension values
- values List<String>
- List of dimension values
- name string
- Name of the dimension
- operator
string | Dimension
Operator - Operator for dimension values
- values string[]
- List of dimension values
- name str
- Name of the dimension
- operator
str | Dimension
Operator - Operator for dimension values
- values Sequence[str]
- List of dimension values
- name String
- Name of the dimension
- operator String | "Include" | "Exclude"
- Operator for dimension values
- values List<String>
- List of dimension values
DimensionOperator, DimensionOperatorArgs
- Include
IncludeInclude- Exclude
ExcludeExclude
- Dimension
Operator Include IncludeInclude- Dimension
Operator Exclude ExcludeExclude
- "Include"
IncludeInclude- "Exclude"
ExcludeExclude
- Include
IncludeInclude- Exclude
ExcludeExclude
- Include
IncludeInclude- Exclude
ExcludeExclude
- INCLUDE
IncludeInclude- EXCLUDE
ExcludeExclude
- "Include"
IncludeInclude- "Exclude"
ExcludeExclude
DimensionResponse, DimensionResponseArgs
Dimension splitting and filtering definitionIdentityType, IdentityTypeArgs
- System
Assigned SystemAssignedSystemAssigned- User
Assigned UserAssignedUserAssigned- None
NoneNone
- Identity
Type System Assigned SystemAssignedSystemAssigned- Identity
Type User Assigned UserAssignedUserAssigned- Identity
Type None NoneNone
- "System
Assigned" SystemAssignedSystemAssigned- "User
Assigned" UserAssignedUserAssigned- "None"
NoneNone
- System
Assigned SystemAssignedSystemAssigned- User
Assigned UserAssignedUserAssigned- None
NoneNone
- System
Assigned SystemAssignedSystemAssigned- User
Assigned UserAssignedUserAssigned- None
NoneNone
- SYSTEM_ASSIGNED
SystemAssignedSystemAssigned- USER_ASSIGNED
UserAssignedUserAssigned- NONE
NoneNone
- "System
Assigned" SystemAssignedSystemAssigned- "User
Assigned" UserAssignedUserAssigned- "None"
NoneNone
Kind, KindArgs
- Log
Alert LogAlertLogAlert- Simple
Log Alert SimpleLogAlertSimpleLogAlert- Log
To Metric LogToMetricLogToMetric
- Kind
Log Alert LogAlertLogAlert- Kind
Simple Log Alert SimpleLogAlertSimpleLogAlert- Kind
Log To Metric LogToMetricLogToMetric
- "Log
Alert" LogAlertLogAlert- "Simple
Log Alert" SimpleLogAlertSimpleLogAlert- "Log
To Metric" LogToMetricLogToMetric
- Log
Alert LogAlertLogAlert- Simple
Log Alert SimpleLogAlertSimpleLogAlert- Log
To Metric LogToMetricLogToMetric
- Log
Alert LogAlertLogAlert- Simple
Log Alert SimpleLogAlertSimpleLogAlert- Log
To Metric LogToMetricLogToMetric
- LOG_ALERT
LogAlertLogAlert- SIMPLE_LOG_ALERT
SimpleLogAlertSimpleLogAlert- LOG_TO_METRIC
LogToMetricLogToMetric
- "Log
Alert" LogAlertLogAlert- "Simple
Log Alert" SimpleLogAlertSimpleLogAlert- "Log
To Metric" LogToMetricLogToMetric
MicrosoftCommonIdentity, MicrosoftCommonIdentityArgs
Identity for the resource.- Type
Pulumi.
Azure Native. Monitor. Identity Type - Type of managed service identity.
- User
Assigned List<string>Identities - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- Type
Identity
Type - Type of managed service identity.
- User
Assigned []stringIdentities - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- type
"System
Assigned" | "User Assigned" | "None" - Type of managed service identity.
- user_
assigned_ list(string)identities - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- type
Identity
Type - Type of managed service identity.
- user
Assigned List<String>Identities - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- type
Identity
Type - Type of managed service identity.
- user
Assigned string[]Identities - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- type
Identity
Type - Type of managed service identity.
- user_
assigned_ Sequence[str]identities - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- type
"System
Assigned" | "User Assigned" | "None" - Type of managed service identity.
- user
Assigned List<String>Identities - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
MicrosoftCommonIdentityResponse, MicrosoftCommonIdentityResponseArgs
Identity for the resource.- Principal
Id string - The principal ID of resource identity.
- Tenant
Id string - The tenant ID of resource.
- Type string
- Type of managed service identity.
- User
Assigned Dictionary<string, Pulumi.Identities Azure Native. Monitor. Inputs. Microsoft Common User Identity Properties Response> - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- Principal
Id string - The principal ID of resource identity.
- Tenant
Id string - The tenant ID of resource.
- Type string
- Type of managed service identity.
- User
Assigned map[string]MicrosoftIdentities Common User Identity Properties Response - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- principal_
id string - The principal ID of resource identity.
- tenant_
id string - The tenant ID of resource.
- type string
- Type of managed service identity.
- user_
assigned_ map(object)identities - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- principal
Id String - The principal ID of resource identity.
- tenant
Id String - The tenant ID of resource.
- type String
- Type of managed service identity.
- user
Assigned Map<String,MicrosoftIdentities Common User Identity Properties Response> - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- principal
Id string - The principal ID of resource identity.
- tenant
Id string - The tenant ID of resource.
- type string
- Type of managed service identity.
- user
Assigned {[key: string]: MicrosoftIdentities Common User Identity Properties Response} - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- principal_
id str - The principal ID of resource identity.
- tenant_
id str - The tenant ID of resource.
- type str
- Type of managed service identity.
- user_
assigned_ Mapping[str, Microsoftidentities Common User Identity Properties Response] - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
- principal
Id String - The principal ID of resource identity.
- tenant
Id String - The tenant ID of resource.
- type String
- Type of managed service identity.
- user
Assigned Map<Property Map>Identities - The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.
MicrosoftCommonUserIdentityPropertiesResponse, MicrosoftCommonUserIdentityPropertiesResponseArgs
Properties of the user assigned identity.- Client
Id string - The client ID of resource identity.
- Principal
Id string - The principal ID of resource identity.
- Client
Id string - The client ID of resource identity.
- Principal
Id string - The principal ID of resource identity.
- client_
id string - The client ID of resource identity.
- principal_
id string - The principal ID of resource identity.
- client
Id String - The client ID of resource identity.
- principal
Id String - The principal ID of resource identity.
- client
Id string - The client ID of resource identity.
- principal
Id string - The principal ID of resource identity.
- client_
id str - The client ID of resource identity.
- principal_
id str - The principal ID of resource identity.
- client
Id String - The client ID of resource identity.
- principal
Id String - The principal ID of resource identity.
RuleResolveConfiguration, RuleResolveConfigurationArgs
TBD. Relevant only for rules of the kind LogAlert.- Auto
Resolved bool - The flag that indicates whether or not to auto resolve a fired alert.
- Time
To stringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- Auto
Resolved bool - The flag that indicates whether or not to auto resolve a fired alert.
- Time
To stringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto_
resolved bool - The flag that indicates whether or not to auto resolve a fired alert.
- time_
to_ stringresolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto
Resolved Boolean - The flag that indicates whether or not to auto resolve a fired alert.
- time
To StringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto
Resolved boolean - The flag that indicates whether or not to auto resolve a fired alert.
- time
To stringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto_
resolved bool - The flag that indicates whether or not to auto resolve a fired alert.
- time_
to_ strresolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto
Resolved Boolean - The flag that indicates whether or not to auto resolve a fired alert.
- time
To StringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
RuleResolveConfigurationResponse, RuleResolveConfigurationResponseArgs
TBD. Relevant only for rules of the kind LogAlert.- Auto
Resolved bool - The flag that indicates whether or not to auto resolve a fired alert.
- Time
To stringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- Auto
Resolved bool - The flag that indicates whether or not to auto resolve a fired alert.
- Time
To stringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto_
resolved bool - The flag that indicates whether or not to auto resolve a fired alert.
- time_
to_ stringresolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto
Resolved Boolean - The flag that indicates whether or not to auto resolve a fired alert.
- time
To StringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto
Resolved boolean - The flag that indicates whether or not to auto resolve a fired alert.
- time
To stringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto_
resolved bool - The flag that indicates whether or not to auto resolve a fired alert.
- time_
to_ strresolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
- auto
Resolved Boolean - The flag that indicates whether or not to auto resolve a fired alert.
- time
To StringResolve - The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format.
ScheduledQueryRuleCriteria, ScheduledQueryRuleCriteriaArgs
The rule criteria that defines the conditions of the scheduled query rule.- All
Of List<Pulumi.Azure Native. Monitor. Inputs. Condition> - A list of conditions to evaluate against the specified scopes
- All
Of []Condition - A list of conditions to evaluate against the specified scopes
- all_
of list(object) - A list of conditions to evaluate against the specified scopes
- all
Of List<Condition> - A list of conditions to evaluate against the specified scopes
- all
Of Condition[] - A list of conditions to evaluate against the specified scopes
- all_
of Sequence[Condition] - A list of conditions to evaluate against the specified scopes
- all
Of List<Property Map> - A list of conditions to evaluate against the specified scopes
ScheduledQueryRuleCriteriaResponse, ScheduledQueryRuleCriteriaResponseArgs
The rule criteria that defines the conditions of the scheduled query rule.- All
Of List<Pulumi.Azure Native. Monitor. Inputs. Condition Response> - A list of conditions to evaluate against the specified scopes
- All
Of []ConditionResponse - A list of conditions to evaluate against the specified scopes
- all_
of list(object) - A list of conditions to evaluate against the specified scopes
- all
Of List<ConditionResponse> - A list of conditions to evaluate against the specified scopes
- all
Of ConditionResponse[] - A list of conditions to evaluate against the specified scopes
- all_
of Sequence[ConditionResponse] - A list of conditions to evaluate against the specified scopes
- all
Of List<Property Map> - A list of conditions to evaluate against the specified scopes
SystemDataResponse, SystemDataResponseArgs
Metadata pertaining to creation and last modification of the resource.- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- Created
At string - The timestamp of resource creation (UTC).
- Created
By string - The identity that created the resource.
- Created
By stringType - The type of identity that created the resource.
- Last
Modified stringAt - The timestamp of resource last modification (UTC)
- Last
Modified stringBy - The identity that last modified the resource.
- Last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at string - The timestamp of resource creation (UTC).
- created_
by string - The identity that created the resource.
- created_
by_ stringtype - The type of identity that created the resource.
- last_
modified_ stringat - The timestamp of resource last modification (UTC)
- last_
modified_ stringby - The identity that last modified the resource.
- last_
modified_ stringby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
- created
At string - The timestamp of resource creation (UTC).
- created
By string - The identity that created the resource.
- created
By stringType - The type of identity that created the resource.
- last
Modified stringAt - The timestamp of resource last modification (UTC)
- last
Modified stringBy - The identity that last modified the resource.
- last
Modified stringBy Type - The type of identity that last modified the resource.
- created_
at str - The timestamp of resource creation (UTC).
- created_
by str - The identity that created the resource.
- created_
by_ strtype - The type of identity that created the resource.
- last_
modified_ strat - The timestamp of resource last modification (UTC)
- last_
modified_ strby - The identity that last modified the resource.
- last_
modified_ strby_ type - The type of identity that last modified the resource.
- created
At String - The timestamp of resource creation (UTC).
- created
By String - The identity that created the resource.
- created
By StringType - The type of identity that created the resource.
- last
Modified StringAt - The timestamp of resource last modification (UTC)
- last
Modified StringBy - The identity that last modified the resource.
- last
Modified StringBy Type - The type of identity that last modified the resource.
TimeAggregation, TimeAggregationArgs
- Count
CountCount- Average
AverageAverage- Minimum
MinimumMinimum- Maximum
MaximumMaximum- Total
TotalTotal
- Time
Aggregation Count CountCount- Time
Aggregation Average AverageAverage- Time
Aggregation Minimum MinimumMinimum- Time
Aggregation Maximum MaximumMaximum- Time
Aggregation Total TotalTotal
- "Count"
CountCount- "Average"
AverageAverage- "Minimum"
MinimumMinimum- "Maximum"
MaximumMaximum- "Total"
TotalTotal
- Count
CountCount- Average
AverageAverage- Minimum
MinimumMinimum- Maximum
MaximumMaximum- Total
TotalTotal
- Count
CountCount- Average
AverageAverage- Minimum
MinimumMinimum- Maximum
MaximumMaximum- Total
TotalTotal
- COUNT
CountCount- AVERAGE
AverageAverage- MINIMUM
MinimumMinimum- MAXIMUM
MaximumMaximum- TOTAL
TotalTotal
- "Count"
CountCount- "Average"
AverageAverage- "Minimum"
MinimumMinimum- "Maximum"
MaximumMaximum- "Total"
TotalTotal
Import
An existing resource can be imported using its type token, name, and identifier, e.g.
$ pulumi import azure-native:monitor:ScheduledQueryRule perf /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/scheduledQueryRules/{ruleName}
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Native pulumi/pulumi-azure-native
- License
- Apache-2.0
published on Thursday, Jul 9, 2026 by Pulumi