We recommend using Azure Native.
azure.monitoring.ScheduledQueryRulesAlertV2
Explore with Pulumi AI
Manages an AlertingAction Scheduled Query Rules Version 2 resource within Azure Monitor
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = new azure.core.ResourceGroup("example", {
name: "example-resources",
location: "West Europe",
});
const exampleInsights = new azure.appinsights.Insights("example", {
name: "example-ai",
location: example.location,
resourceGroupName: example.name,
applicationType: "web",
});
const exampleActionGroup = new azure.monitoring.ActionGroup("example", {
name: "example-mag",
resourceGroupName: example.name,
shortName: "test mag",
});
const exampleUserAssignedIdentity = new azure.authorization.UserAssignedIdentity("example", {
name: "example-uai",
location: example.location,
resourceGroupName: example.name,
});
const exampleAssignment = new azure.authorization.Assignment("example", {
scope: exampleInsights.id,
roleDefinitionName: "Reader",
principalId: exampleUserAssignedIdentity.principalId,
});
const exampleScheduledQueryRulesAlertV2 = new azure.monitoring.ScheduledQueryRulesAlertV2("example", {
name: "example-msqrv2",
resourceGroupName: example.name,
location: example.location,
evaluationFrequency: "PT10M",
windowDuration: "PT10M",
scopes: exampleInsights.id,
severity: 4,
criterias: [{
query: `requests
| summarize CountByCountry=count() by client_CountryOrRegion
`,
timeAggregationMethod: "Maximum",
threshold: 17.5,
operator: "LessThan",
resourceIdColumn: "client_CountryOrRegion",
metricMeasureColumn: "CountByCountry",
dimensions: [{
name: "client_CountryOrRegion",
operator: "Exclude",
values: ["123"],
}],
failingPeriods: {
minimumFailingPeriodsToTriggerAlert: 1,
numberOfEvaluationPeriods: 1,
},
}],
autoMitigationEnabled: true,
workspaceAlertsStorageEnabled: false,
description: "example sqr",
displayName: "example-sqr",
enabled: true,
queryTimeRangeOverride: "PT1H",
skipQueryValidation: true,
action: {
actionGroups: [exampleActionGroup.id],
customProperties: {
key: "value",
key2: "value2",
},
},
identity: {
type: "UserAssigned",
identityIds: [exampleUserAssignedIdentity.id],
},
tags: {
key: "value",
key2: "value2",
},
}, {
dependsOn: [exampleAssignment],
});
import pulumi
import pulumi_azure as azure
example = azure.core.ResourceGroup("example",
name="example-resources",
location="West Europe")
example_insights = azure.appinsights.Insights("example",
name="example-ai",
location=example.location,
resource_group_name=example.name,
application_type="web")
example_action_group = azure.monitoring.ActionGroup("example",
name="example-mag",
resource_group_name=example.name,
short_name="test mag")
example_user_assigned_identity = azure.authorization.UserAssignedIdentity("example",
name="example-uai",
location=example.location,
resource_group_name=example.name)
example_assignment = azure.authorization.Assignment("example",
scope=example_insights.id,
role_definition_name="Reader",
principal_id=example_user_assigned_identity.principal_id)
example_scheduled_query_rules_alert_v2 = azure.monitoring.ScheduledQueryRulesAlertV2("example",
name="example-msqrv2",
resource_group_name=example.name,
location=example.location,
evaluation_frequency="PT10M",
window_duration="PT10M",
scopes=example_insights.id,
severity=4,
criterias=[{
"query": """requests
| summarize CountByCountry=count() by client_CountryOrRegion
""",
"time_aggregation_method": "Maximum",
"threshold": 17.5,
"operator": "LessThan",
"resource_id_column": "client_CountryOrRegion",
"metric_measure_column": "CountByCountry",
"dimensions": [{
"name": "client_CountryOrRegion",
"operator": "Exclude",
"values": ["123"],
}],
"failing_periods": {
"minimum_failing_periods_to_trigger_alert": 1,
"number_of_evaluation_periods": 1,
},
}],
auto_mitigation_enabled=True,
workspace_alerts_storage_enabled=False,
description="example sqr",
display_name="example-sqr",
enabled=True,
query_time_range_override="PT1H",
skip_query_validation=True,
action={
"action_groups": [example_action_group.id],
"custom_properties": {
"key": "value",
"key2": "value2",
},
},
identity={
"type": "UserAssigned",
"identity_ids": [example_user_assigned_identity.id],
},
tags={
"key": "value",
"key2": "value2",
},
opts = pulumi.ResourceOptions(depends_on=[example_assignment]))
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/appinsights"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/monitoring"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.NewResourceGroup(ctx, "example", &core.ResourceGroupArgs{
Name: pulumi.String("example-resources"),
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
exampleInsights, err := appinsights.NewInsights(ctx, "example", &appinsights.InsightsArgs{
Name: pulumi.String("example-ai"),
Location: example.Location,
ResourceGroupName: example.Name,
ApplicationType: pulumi.String("web"),
})
if err != nil {
return err
}
exampleActionGroup, err := monitoring.NewActionGroup(ctx, "example", &monitoring.ActionGroupArgs{
Name: pulumi.String("example-mag"),
ResourceGroupName: example.Name,
ShortName: pulumi.String("test mag"),
})
if err != nil {
return err
}
exampleUserAssignedIdentity, err := authorization.NewUserAssignedIdentity(ctx, "example", &authorization.UserAssignedIdentityArgs{
Name: pulumi.String("example-uai"),
Location: example.Location,
ResourceGroupName: example.Name,
})
if err != nil {
return err
}
exampleAssignment, err := authorization.NewAssignment(ctx, "example", &authorization.AssignmentArgs{
Scope: exampleInsights.ID(),
RoleDefinitionName: pulumi.String("Reader"),
PrincipalId: exampleUserAssignedIdentity.PrincipalId,
})
if err != nil {
return err
}
_, err = monitoring.NewScheduledQueryRulesAlertV2(ctx, "example", &monitoring.ScheduledQueryRulesAlertV2Args{
Name: pulumi.String("example-msqrv2"),
ResourceGroupName: example.Name,
Location: example.Location,
EvaluationFrequency: pulumi.String("PT10M"),
WindowDuration: pulumi.String("PT10M"),
Scopes: exampleInsights.ID(),
Severity: pulumi.Int(4),
Criterias: monitoring.ScheduledQueryRulesAlertV2CriteriaArray{
&monitoring.ScheduledQueryRulesAlertV2CriteriaArgs{
Query: pulumi.String("requests\n | summarize CountByCountry=count() by client_CountryOrRegion\n"),
TimeAggregationMethod: pulumi.String("Maximum"),
Threshold: pulumi.Float64(17.5),
Operator: pulumi.String("LessThan"),
ResourceIdColumn: pulumi.String("client_CountryOrRegion"),
MetricMeasureColumn: pulumi.String("CountByCountry"),
Dimensions: monitoring.ScheduledQueryRulesAlertV2CriteriaDimensionArray{
&monitoring.ScheduledQueryRulesAlertV2CriteriaDimensionArgs{
Name: pulumi.String("client_CountryOrRegion"),
Operator: pulumi.String("Exclude"),
Values: pulumi.StringArray{
pulumi.String("123"),
},
},
},
FailingPeriods: &monitoring.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs{
MinimumFailingPeriodsToTriggerAlert: pulumi.Int(1),
NumberOfEvaluationPeriods: pulumi.Int(1),
},
},
},
AutoMitigationEnabled: pulumi.Bool(true),
WorkspaceAlertsStorageEnabled: pulumi.Bool(false),
Description: pulumi.String("example sqr"),
DisplayName: pulumi.String("example-sqr"),
Enabled: pulumi.Bool(true),
QueryTimeRangeOverride: pulumi.String("PT1H"),
SkipQueryValidation: pulumi.Bool(true),
Action: &monitoring.ScheduledQueryRulesAlertV2ActionArgs{
ActionGroups: pulumi.StringArray{
exampleActionGroup.ID(),
},
CustomProperties: pulumi.StringMap{
"key": pulumi.String("value"),
"key2": pulumi.String("value2"),
},
},
Identity: &monitoring.ScheduledQueryRulesAlertV2IdentityArgs{
Type: pulumi.String("UserAssigned"),
IdentityIds: pulumi.StringArray{
exampleUserAssignedIdentity.ID(),
},
},
Tags: pulumi.StringMap{
"key": pulumi.String("value"),
"key2": pulumi.String("value2"),
},
}, pulumi.DependsOn([]pulumi.Resource{
exampleAssignment,
}))
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = new Azure.Core.ResourceGroup("example", new()
{
Name = "example-resources",
Location = "West Europe",
});
var exampleInsights = new Azure.AppInsights.Insights("example", new()
{
Name = "example-ai",
Location = example.Location,
ResourceGroupName = example.Name,
ApplicationType = "web",
});
var exampleActionGroup = new Azure.Monitoring.ActionGroup("example", new()
{
Name = "example-mag",
ResourceGroupName = example.Name,
ShortName = "test mag",
});
var exampleUserAssignedIdentity = new Azure.Authorization.UserAssignedIdentity("example", new()
{
Name = "example-uai",
Location = example.Location,
ResourceGroupName = example.Name,
});
var exampleAssignment = new Azure.Authorization.Assignment("example", new()
{
Scope = exampleInsights.Id,
RoleDefinitionName = "Reader",
PrincipalId = exampleUserAssignedIdentity.PrincipalId,
});
var exampleScheduledQueryRulesAlertV2 = new Azure.Monitoring.ScheduledQueryRulesAlertV2("example", new()
{
Name = "example-msqrv2",
ResourceGroupName = example.Name,
Location = example.Location,
EvaluationFrequency = "PT10M",
WindowDuration = "PT10M",
Scopes = exampleInsights.Id,
Severity = 4,
Criterias = new[]
{
new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2CriteriaArgs
{
Query = @"requests
| summarize CountByCountry=count() by client_CountryOrRegion
",
TimeAggregationMethod = "Maximum",
Threshold = 17.5,
Operator = "LessThan",
ResourceIdColumn = "client_CountryOrRegion",
MetricMeasureColumn = "CountByCountry",
Dimensions = new[]
{
new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2CriteriaDimensionArgs
{
Name = "client_CountryOrRegion",
Operator = "Exclude",
Values = new[]
{
"123",
},
},
},
FailingPeriods = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs
{
MinimumFailingPeriodsToTriggerAlert = 1,
NumberOfEvaluationPeriods = 1,
},
},
},
AutoMitigationEnabled = true,
WorkspaceAlertsStorageEnabled = false,
Description = "example sqr",
DisplayName = "example-sqr",
Enabled = true,
QueryTimeRangeOverride = "PT1H",
SkipQueryValidation = true,
Action = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2ActionArgs
{
ActionGroups = new[]
{
exampleActionGroup.Id,
},
CustomProperties =
{
{ "key", "value" },
{ "key2", "value2" },
},
},
Identity = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2IdentityArgs
{
Type = "UserAssigned",
IdentityIds = new[]
{
exampleUserAssignedIdentity.Id,
},
},
Tags =
{
{ "key", "value" },
{ "key2", "value2" },
},
}, new CustomResourceOptions
{
DependsOn =
{
exampleAssignment,
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.ResourceGroup;
import com.pulumi.azure.core.ResourceGroupArgs;
import com.pulumi.azure.appinsights.Insights;
import com.pulumi.azure.appinsights.InsightsArgs;
import com.pulumi.azure.monitoring.ActionGroup;
import com.pulumi.azure.monitoring.ActionGroupArgs;
import com.pulumi.azure.authorization.UserAssignedIdentity;
import com.pulumi.azure.authorization.UserAssignedIdentityArgs;
import com.pulumi.azure.authorization.Assignment;
import com.pulumi.azure.authorization.AssignmentArgs;
import com.pulumi.azure.monitoring.ScheduledQueryRulesAlertV2;
import com.pulumi.azure.monitoring.ScheduledQueryRulesAlertV2Args;
import com.pulumi.azure.monitoring.inputs.ScheduledQueryRulesAlertV2CriteriaArgs;
import com.pulumi.azure.monitoring.inputs.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs;
import com.pulumi.azure.monitoring.inputs.ScheduledQueryRulesAlertV2ActionArgs;
import com.pulumi.azure.monitoring.inputs.ScheduledQueryRulesAlertV2IdentityArgs;
import com.pulumi.resources.CustomResourceOptions;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new ResourceGroup("example", ResourceGroupArgs.builder()
.name("example-resources")
.location("West Europe")
.build());
var exampleInsights = new Insights("exampleInsights", InsightsArgs.builder()
.name("example-ai")
.location(example.location())
.resourceGroupName(example.name())
.applicationType("web")
.build());
var exampleActionGroup = new ActionGroup("exampleActionGroup", ActionGroupArgs.builder()
.name("example-mag")
.resourceGroupName(example.name())
.shortName("test mag")
.build());
var exampleUserAssignedIdentity = new UserAssignedIdentity("exampleUserAssignedIdentity", UserAssignedIdentityArgs.builder()
.name("example-uai")
.location(example.location())
.resourceGroupName(example.name())
.build());
var exampleAssignment = new Assignment("exampleAssignment", AssignmentArgs.builder()
.scope(exampleInsights.id())
.roleDefinitionName("Reader")
.principalId(exampleUserAssignedIdentity.principalId())
.build());
var exampleScheduledQueryRulesAlertV2 = new ScheduledQueryRulesAlertV2("exampleScheduledQueryRulesAlertV2", ScheduledQueryRulesAlertV2Args.builder()
.name("example-msqrv2")
.resourceGroupName(example.name())
.location(example.location())
.evaluationFrequency("PT10M")
.windowDuration("PT10M")
.scopes(exampleInsights.id())
.severity(4)
.criterias(ScheduledQueryRulesAlertV2CriteriaArgs.builder()
.query("""
requests
| summarize CountByCountry=count() by client_CountryOrRegion
""")
.timeAggregationMethod("Maximum")
.threshold(17.5)
.operator("LessThan")
.resourceIdColumn("client_CountryOrRegion")
.metricMeasureColumn("CountByCountry")
.dimensions(ScheduledQueryRulesAlertV2CriteriaDimensionArgs.builder()
.name("client_CountryOrRegion")
.operator("Exclude")
.values("123")
.build())
.failingPeriods(ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs.builder()
.minimumFailingPeriodsToTriggerAlert(1)
.numberOfEvaluationPeriods(1)
.build())
.build())
.autoMitigationEnabled(true)
.workspaceAlertsStorageEnabled(false)
.description("example sqr")
.displayName("example-sqr")
.enabled(true)
.queryTimeRangeOverride("PT1H")
.skipQueryValidation(true)
.action(ScheduledQueryRulesAlertV2ActionArgs.builder()
.actionGroups(exampleActionGroup.id())
.customProperties(Map.ofEntries(
Map.entry("key", "value"),
Map.entry("key2", "value2")
))
.build())
.identity(ScheduledQueryRulesAlertV2IdentityArgs.builder()
.type("UserAssigned")
.identityIds(exampleUserAssignedIdentity.id())
.build())
.tags(Map.ofEntries(
Map.entry("key", "value"),
Map.entry("key2", "value2")
))
.build(), CustomResourceOptions.builder()
.dependsOn(exampleAssignment)
.build());
}
}
resources:
example:
type: azure:core:ResourceGroup
properties:
name: example-resources
location: West Europe
exampleInsights:
type: azure:appinsights:Insights
name: example
properties:
name: example-ai
location: ${example.location}
resourceGroupName: ${example.name}
applicationType: web
exampleActionGroup:
type: azure:monitoring:ActionGroup
name: example
properties:
name: example-mag
resourceGroupName: ${example.name}
shortName: test mag
exampleUserAssignedIdentity:
type: azure:authorization:UserAssignedIdentity
name: example
properties:
name: example-uai
location: ${example.location}
resourceGroupName: ${example.name}
exampleAssignment:
type: azure:authorization:Assignment
name: example
properties:
scope: ${exampleInsights.id}
roleDefinitionName: Reader
principalId: ${exampleUserAssignedIdentity.principalId}
exampleScheduledQueryRulesAlertV2:
type: azure:monitoring:ScheduledQueryRulesAlertV2
name: example
properties:
name: example-msqrv2
resourceGroupName: ${example.name}
location: ${example.location}
evaluationFrequency: PT10M
windowDuration: PT10M
scopes: ${exampleInsights.id}
severity: 4
criterias:
- query: |
requests
| summarize CountByCountry=count() by client_CountryOrRegion
timeAggregationMethod: Maximum
threshold: 17.5
operator: LessThan
resourceIdColumn: client_CountryOrRegion
metricMeasureColumn: CountByCountry
dimensions:
- name: client_CountryOrRegion
operator: Exclude
values:
- '123'
failingPeriods:
minimumFailingPeriodsToTriggerAlert: 1
numberOfEvaluationPeriods: 1
autoMitigationEnabled: true
workspaceAlertsStorageEnabled: false
description: example sqr
displayName: example-sqr
enabled: true
queryTimeRangeOverride: PT1H
skipQueryValidation: true
action:
actionGroups:
- ${exampleActionGroup.id}
customProperties:
key: value
key2: value2
identity:
type: UserAssigned
identityIds:
- ${exampleUserAssignedIdentity.id}
tags:
key: value
key2: value2
options:
dependson:
- ${exampleAssignment}
Create ScheduledQueryRulesAlertV2 Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScheduledQueryRulesAlertV2(name: string, args: ScheduledQueryRulesAlertV2Args, opts?: CustomResourceOptions);
@overload
def ScheduledQueryRulesAlertV2(resource_name: str,
args: ScheduledQueryRulesAlertV2Args,
opts: Optional[ResourceOptions] = None)
@overload
def ScheduledQueryRulesAlertV2(resource_name: str,
opts: Optional[ResourceOptions] = None,
evaluation_frequency: Optional[str] = None,
window_duration: Optional[str] = None,
criterias: Optional[Sequence[ScheduledQueryRulesAlertV2CriteriaArgs]] = None,
severity: Optional[int] = None,
scopes: Optional[str] = None,
resource_group_name: Optional[str] = None,
name: Optional[str] = None,
display_name: Optional[str] = None,
location: Optional[str] = None,
mute_actions_after_alert_duration: Optional[str] = None,
action: Optional[ScheduledQueryRulesAlertV2ActionArgs] = None,
query_time_range_override: Optional[str] = None,
enabled: Optional[bool] = None,
identity: Optional[ScheduledQueryRulesAlertV2IdentityArgs] = None,
description: Optional[str] = None,
skip_query_validation: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
target_resource_types: Optional[Sequence[str]] = None,
auto_mitigation_enabled: Optional[bool] = None,
workspace_alerts_storage_enabled: Optional[bool] = None)
func NewScheduledQueryRulesAlertV2(ctx *Context, name string, args ScheduledQueryRulesAlertV2Args, opts ...ResourceOption) (*ScheduledQueryRulesAlertV2, error)
public ScheduledQueryRulesAlertV2(string name, ScheduledQueryRulesAlertV2Args args, CustomResourceOptions? opts = null)
public ScheduledQueryRulesAlertV2(String name, ScheduledQueryRulesAlertV2Args args)
public ScheduledQueryRulesAlertV2(String name, ScheduledQueryRulesAlertV2Args args, CustomResourceOptions options)
type: azure:monitoring:ScheduledQueryRulesAlertV2
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ScheduledQueryRulesAlertV2Args
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var scheduledQueryRulesAlertV2Resource = new Azure.Monitoring.ScheduledQueryRulesAlertV2("scheduledQueryRulesAlertV2Resource", new()
{
EvaluationFrequency = "string",
WindowDuration = "string",
Criterias = new[]
{
new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2CriteriaArgs
{
Operator = "string",
Query = "string",
Threshold = 0,
TimeAggregationMethod = "string",
Dimensions = new[]
{
new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2CriteriaDimensionArgs
{
Name = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
},
FailingPeriods = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs
{
MinimumFailingPeriodsToTriggerAlert = 0,
NumberOfEvaluationPeriods = 0,
},
MetricMeasureColumn = "string",
ResourceIdColumn = "string",
},
},
Severity = 0,
Scopes = "string",
ResourceGroupName = "string",
Name = "string",
DisplayName = "string",
Location = "string",
MuteActionsAfterAlertDuration = "string",
Action = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2ActionArgs
{
ActionGroups = new[]
{
"string",
},
CustomProperties =
{
{ "string", "string" },
},
},
QueryTimeRangeOverride = "string",
Enabled = false,
Identity = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertV2IdentityArgs
{
Type = "string",
IdentityIds = new[]
{
"string",
},
PrincipalId = "string",
TenantId = "string",
},
Description = "string",
SkipQueryValidation = false,
Tags =
{
{ "string", "string" },
},
TargetResourceTypes = new[]
{
"string",
},
AutoMitigationEnabled = false,
WorkspaceAlertsStorageEnabled = false,
});
example, err := monitoring.NewScheduledQueryRulesAlertV2(ctx, "scheduledQueryRulesAlertV2Resource", &monitoring.ScheduledQueryRulesAlertV2Args{
EvaluationFrequency: pulumi.String("string"),
WindowDuration: pulumi.String("string"),
Criterias: monitoring.ScheduledQueryRulesAlertV2CriteriaArray{
&monitoring.ScheduledQueryRulesAlertV2CriteriaArgs{
Operator: pulumi.String("string"),
Query: pulumi.String("string"),
Threshold: pulumi.Float64(0),
TimeAggregationMethod: pulumi.String("string"),
Dimensions: monitoring.ScheduledQueryRulesAlertV2CriteriaDimensionArray{
&monitoring.ScheduledQueryRulesAlertV2CriteriaDimensionArgs{
Name: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
FailingPeriods: &monitoring.ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs{
MinimumFailingPeriodsToTriggerAlert: pulumi.Int(0),
NumberOfEvaluationPeriods: pulumi.Int(0),
},
MetricMeasureColumn: pulumi.String("string"),
ResourceIdColumn: pulumi.String("string"),
},
},
Severity: pulumi.Int(0),
Scopes: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Name: pulumi.String("string"),
DisplayName: pulumi.String("string"),
Location: pulumi.String("string"),
MuteActionsAfterAlertDuration: pulumi.String("string"),
Action: &monitoring.ScheduledQueryRulesAlertV2ActionArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("string"),
},
CustomProperties: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
QueryTimeRangeOverride: pulumi.String("string"),
Enabled: pulumi.Bool(false),
Identity: &monitoring.ScheduledQueryRulesAlertV2IdentityArgs{
Type: pulumi.String("string"),
IdentityIds: pulumi.StringArray{
pulumi.String("string"),
},
PrincipalId: pulumi.String("string"),
TenantId: pulumi.String("string"),
},
Description: pulumi.String("string"),
SkipQueryValidation: pulumi.Bool(false),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TargetResourceTypes: pulumi.StringArray{
pulumi.String("string"),
},
AutoMitigationEnabled: pulumi.Bool(false),
WorkspaceAlertsStorageEnabled: pulumi.Bool(false),
})
var scheduledQueryRulesAlertV2Resource = new ScheduledQueryRulesAlertV2("scheduledQueryRulesAlertV2Resource", ScheduledQueryRulesAlertV2Args.builder()
.evaluationFrequency("string")
.windowDuration("string")
.criterias(ScheduledQueryRulesAlertV2CriteriaArgs.builder()
.operator("string")
.query("string")
.threshold(0)
.timeAggregationMethod("string")
.dimensions(ScheduledQueryRulesAlertV2CriteriaDimensionArgs.builder()
.name("string")
.operator("string")
.values("string")
.build())
.failingPeriods(ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs.builder()
.minimumFailingPeriodsToTriggerAlert(0)
.numberOfEvaluationPeriods(0)
.build())
.metricMeasureColumn("string")
.resourceIdColumn("string")
.build())
.severity(0)
.scopes("string")
.resourceGroupName("string")
.name("string")
.displayName("string")
.location("string")
.muteActionsAfterAlertDuration("string")
.action(ScheduledQueryRulesAlertV2ActionArgs.builder()
.actionGroups("string")
.customProperties(Map.of("string", "string"))
.build())
.queryTimeRangeOverride("string")
.enabled(false)
.identity(ScheduledQueryRulesAlertV2IdentityArgs.builder()
.type("string")
.identityIds("string")
.principalId("string")
.tenantId("string")
.build())
.description("string")
.skipQueryValidation(false)
.tags(Map.of("string", "string"))
.targetResourceTypes("string")
.autoMitigationEnabled(false)
.workspaceAlertsStorageEnabled(false)
.build());
scheduled_query_rules_alert_v2_resource = azure.monitoring.ScheduledQueryRulesAlertV2("scheduledQueryRulesAlertV2Resource",
evaluation_frequency="string",
window_duration="string",
criterias=[{
"operator": "string",
"query": "string",
"threshold": 0,
"time_aggregation_method": "string",
"dimensions": [{
"name": "string",
"operator": "string",
"values": ["string"],
}],
"failing_periods": {
"minimum_failing_periods_to_trigger_alert": 0,
"number_of_evaluation_periods": 0,
},
"metric_measure_column": "string",
"resource_id_column": "string",
}],
severity=0,
scopes="string",
resource_group_name="string",
name="string",
display_name="string",
location="string",
mute_actions_after_alert_duration="string",
action={
"action_groups": ["string"],
"custom_properties": {
"string": "string",
},
},
query_time_range_override="string",
enabled=False,
identity={
"type": "string",
"identity_ids": ["string"],
"principal_id": "string",
"tenant_id": "string",
},
description="string",
skip_query_validation=False,
tags={
"string": "string",
},
target_resource_types=["string"],
auto_mitigation_enabled=False,
workspace_alerts_storage_enabled=False)
const scheduledQueryRulesAlertV2Resource = new azure.monitoring.ScheduledQueryRulesAlertV2("scheduledQueryRulesAlertV2Resource", {
evaluationFrequency: "string",
windowDuration: "string",
criterias: [{
operator: "string",
query: "string",
threshold: 0,
timeAggregationMethod: "string",
dimensions: [{
name: "string",
operator: "string",
values: ["string"],
}],
failingPeriods: {
minimumFailingPeriodsToTriggerAlert: 0,
numberOfEvaluationPeriods: 0,
},
metricMeasureColumn: "string",
resourceIdColumn: "string",
}],
severity: 0,
scopes: "string",
resourceGroupName: "string",
name: "string",
displayName: "string",
location: "string",
muteActionsAfterAlertDuration: "string",
action: {
actionGroups: ["string"],
customProperties: {
string: "string",
},
},
queryTimeRangeOverride: "string",
enabled: false,
identity: {
type: "string",
identityIds: ["string"],
principalId: "string",
tenantId: "string",
},
description: "string",
skipQueryValidation: false,
tags: {
string: "string",
},
targetResourceTypes: ["string"],
autoMitigationEnabled: false,
workspaceAlertsStorageEnabled: false,
});
type: azure:monitoring:ScheduledQueryRulesAlertV2
properties:
action:
actionGroups:
- string
customProperties:
string: string
autoMitigationEnabled: false
criterias:
- dimensions:
- name: string
operator: string
values:
- string
failingPeriods:
minimumFailingPeriodsToTriggerAlert: 0
numberOfEvaluationPeriods: 0
metricMeasureColumn: string
operator: string
query: string
resourceIdColumn: string
threshold: 0
timeAggregationMethod: string
description: string
displayName: string
enabled: false
evaluationFrequency: string
identity:
identityIds:
- string
principalId: string
tenantId: string
type: string
location: string
muteActionsAfterAlertDuration: string
name: string
queryTimeRangeOverride: string
resourceGroupName: string
scopes: string
severity: 0
skipQueryValidation: false
tags:
string: string
targetResourceTypes:
- string
windowDuration: string
workspaceAlertsStorageEnabled: false
ScheduledQueryRulesAlertV2 Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ScheduledQueryRulesAlertV2 resource accepts the following input properties:
- Criterias
List<Scheduled
Query Rules Alert V2Criteria> - A
criteria
block as defined below. - Evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- Resource
Group stringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Scopes string
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- Severity int
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- Window
Duration string - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - Action
Scheduled
Query Rules Alert V2Action - An
action
block as defined below. - Auto
Mitigation boolEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - Description string
- Specifies the description of the scheduled query rule.
- Display
Name string - Specifies the display name of the alert rule.
- Enabled bool
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - Identity
Scheduled
Query Rules Alert V2Identity - An
identity
block as defined below. - Location string
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- Name string
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- Query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- Skip
Query boolValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Dictionary<string, string>
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - Workspace
Alerts boolStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- Criterias
[]Scheduled
Query Rules Alert V2Criteria Args - A
criteria
block as defined below. - Evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- Resource
Group stringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Scopes string
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- Severity int
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- Window
Duration string - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - Action
Scheduled
Query Rules Alert V2Action Args - An
action
block as defined below. - Auto
Mitigation boolEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - Description string
- Specifies the description of the scheduled query rule.
- Display
Name string - Specifies the display name of the alert rule.
- Enabled bool
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - Identity
Scheduled
Query Rules Alert V2Identity Args - An
identity
block as defined below. - Location string
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- Name string
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- Query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- Skip
Query boolValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- map[string]string
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - Workspace
Alerts boolStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- criterias
List<Scheduled
Query Rules Alert V2Criteria> - A
criteria
block as defined below. - evaluation
Frequency String How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- resource
Group StringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes String
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity Integer
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- window
Duration String - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - action
Scheduled
Query Rules Alert V2Action - An
action
block as defined below. - auto
Mitigation BooleanEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - description String
- Specifies the description of the scheduled query rule.
- display
Name String - Specifies the display name of the alert rule.
- enabled Boolean
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - identity
Scheduled
Query Rules Alert V2Identity - An
identity
block as defined below. - location String
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions StringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- name String
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time StringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- skip
Query BooleanValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Map<String,String>
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - workspace
Alerts BooleanStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- criterias
Scheduled
Query Rules Alert V2Criteria[] - A
criteria
block as defined below. - evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- resource
Group stringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes string
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity number
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- window
Duration string - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - action
Scheduled
Query Rules Alert V2Action - An
action
block as defined below. - auto
Mitigation booleanEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - description string
- Specifies the description of the scheduled query rule.
- display
Name string - Specifies the display name of the alert rule.
- enabled boolean
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - identity
Scheduled
Query Rules Alert V2Identity - An
identity
block as defined below. - location string
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- name string
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- skip
Query booleanValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- {[key: string]: string}
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - workspace
Alerts booleanStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- criterias
Sequence[Scheduled
Query Rules Alert V2Criteria Args] - A
criteria
block as defined below. - evaluation_
frequency str How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- resource_
group_ strname - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes str
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity int
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- window_
duration str - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - action
Scheduled
Query Rules Alert V2Action Args - An
action
block as defined below. - auto_
mitigation_ boolenabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - description str
- Specifies the description of the scheduled query rule.
- display_
name str - Specifies the display name of the alert rule.
- enabled bool
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - identity
Scheduled
Query Rules Alert V2Identity Args - An
identity
block as defined below. - location str
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute_
actions_ strafter_ alert_ duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- name str
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query_
time_ strrange_ override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- skip_
query_ boolvalidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Mapping[str, str]
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - workspace_
alerts_ boolstorage_ enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- criterias List<Property Map>
- A
criteria
block as defined below. - evaluation
Frequency String How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- resource
Group StringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes String
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity Number
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- window
Duration String - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - action Property Map
- An
action
block as defined below. - auto
Mitigation BooleanEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - description String
- Specifies the description of the scheduled query rule.
- display
Name String - Specifies the display name of the alert rule.
- enabled Boolean
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - identity Property Map
- An
identity
block as defined below. - location String
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions StringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- name String
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time StringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- skip
Query BooleanValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Map<String>
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - workspace
Alerts BooleanStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
Outputs
All input properties are implicitly available as output properties. Additionally, the ScheduledQueryRulesAlertV2 resource produces the following output properties:
- Created
With stringApi Version - The api-version used when creating this alert rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
ALegacy boolLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- Is
Workspace boolAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- Created
With stringApi Version - The api-version used when creating this alert rule.
- Id string
- The provider-assigned unique ID for this managed resource.
- Is
ALegacy boolLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- Is
Workspace boolAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- created
With StringApi Version - The api-version used when creating this alert rule.
- id String
- The provider-assigned unique ID for this managed resource.
- is
ALegacy BooleanLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace BooleanAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- created
With stringApi Version - The api-version used when creating this alert rule.
- id string
- The provider-assigned unique ID for this managed resource.
- is
ALegacy booleanLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace booleanAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- created_
with_ strapi_ version - The api-version used when creating this alert rule.
- id str
- The provider-assigned unique ID for this managed resource.
- is_
a_ boollegacy_ log_ analytics_ rule - True if this alert rule is a legacy Log Analytic Rule.
- is_
workspace_ boolalerts_ storage_ configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- created
With StringApi Version - The api-version used when creating this alert rule.
- id String
- The provider-assigned unique ID for this managed resource.
- is
ALegacy BooleanLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace BooleanAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
Look up Existing ScheduledQueryRulesAlertV2 Resource
Get an existing ScheduledQueryRulesAlertV2 resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ScheduledQueryRulesAlertV2State, opts?: CustomResourceOptions): ScheduledQueryRulesAlertV2
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[ScheduledQueryRulesAlertV2ActionArgs] = None,
auto_mitigation_enabled: Optional[bool] = None,
created_with_api_version: Optional[str] = None,
criterias: Optional[Sequence[ScheduledQueryRulesAlertV2CriteriaArgs]] = None,
description: Optional[str] = None,
display_name: Optional[str] = None,
enabled: Optional[bool] = None,
evaluation_frequency: Optional[str] = None,
identity: Optional[ScheduledQueryRulesAlertV2IdentityArgs] = None,
is_a_legacy_log_analytics_rule: Optional[bool] = None,
is_workspace_alerts_storage_configured: Optional[bool] = None,
location: Optional[str] = None,
mute_actions_after_alert_duration: Optional[str] = None,
name: Optional[str] = None,
query_time_range_override: Optional[str] = None,
resource_group_name: Optional[str] = None,
scopes: Optional[str] = None,
severity: Optional[int] = None,
skip_query_validation: Optional[bool] = None,
tags: Optional[Mapping[str, str]] = None,
target_resource_types: Optional[Sequence[str]] = None,
window_duration: Optional[str] = None,
workspace_alerts_storage_enabled: Optional[bool] = None) -> ScheduledQueryRulesAlertV2
func GetScheduledQueryRulesAlertV2(ctx *Context, name string, id IDInput, state *ScheduledQueryRulesAlertV2State, opts ...ResourceOption) (*ScheduledQueryRulesAlertV2, error)
public static ScheduledQueryRulesAlertV2 Get(string name, Input<string> id, ScheduledQueryRulesAlertV2State? state, CustomResourceOptions? opts = null)
public static ScheduledQueryRulesAlertV2 get(String name, Output<String> id, ScheduledQueryRulesAlertV2State state, CustomResourceOptions options)
Resource lookup is not supported in YAML
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Action
Scheduled
Query Rules Alert V2Action - An
action
block as defined below. - Auto
Mitigation boolEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - Created
With stringApi Version - The api-version used when creating this alert rule.
- Criterias
List<Scheduled
Query Rules Alert V2Criteria> - A
criteria
block as defined below. - Description string
- Specifies the description of the scheduled query rule.
- Display
Name string - Specifies the display name of the alert rule.
- Enabled bool
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - Evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- Identity
Scheduled
Query Rules Alert V2Identity - An
identity
block as defined below. - Is
ALegacy boolLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- Is
Workspace boolAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- Location string
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- Name string
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- Query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- Resource
Group stringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Scopes string
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- Severity int
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- Skip
Query boolValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Dictionary<string, string>
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - Window
Duration string - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - Workspace
Alerts boolStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- Action
Scheduled
Query Rules Alert V2Action Args - An
action
block as defined below. - Auto
Mitigation boolEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - Created
With stringApi Version - The api-version used when creating this alert rule.
- Criterias
[]Scheduled
Query Rules Alert V2Criteria Args - A
criteria
block as defined below. - Description string
- Specifies the description of the scheduled query rule.
- Display
Name string - Specifies the display name of the alert rule.
- Enabled bool
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - Evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- Identity
Scheduled
Query Rules Alert V2Identity Args - An
identity
block as defined below. - Is
ALegacy boolLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- Is
Workspace boolAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- Location string
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- Name string
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- Query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- Resource
Group stringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- Scopes string
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- Severity int
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- Skip
Query boolValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- map[string]string
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - Window
Duration string - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - Workspace
Alerts boolStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- action
Scheduled
Query Rules Alert V2Action - An
action
block as defined below. - auto
Mitigation BooleanEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - created
With StringApi Version - The api-version used when creating this alert rule.
- criterias
List<Scheduled
Query Rules Alert V2Criteria> - A
criteria
block as defined below. - description String
- Specifies the description of the scheduled query rule.
- display
Name String - Specifies the display name of the alert rule.
- enabled Boolean
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - evaluation
Frequency String How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- identity
Scheduled
Query Rules Alert V2Identity - An
identity
block as defined below. - is
ALegacy BooleanLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace BooleanAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- location String
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions StringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- name String
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time StringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- resource
Group StringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes String
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity Integer
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- skip
Query BooleanValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Map<String,String>
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - window
Duration String - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - workspace
Alerts BooleanStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- action
Scheduled
Query Rules Alert V2Action - An
action
block as defined below. - auto
Mitigation booleanEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - created
With stringApi Version - The api-version used when creating this alert rule.
- criterias
Scheduled
Query Rules Alert V2Criteria[] - A
criteria
block as defined below. - description string
- Specifies the description of the scheduled query rule.
- display
Name string - Specifies the display name of the alert rule.
- enabled boolean
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - evaluation
Frequency string How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- identity
Scheduled
Query Rules Alert V2Identity - An
identity
block as defined below. - is
ALegacy booleanLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace booleanAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- location string
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions stringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- name string
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time stringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- resource
Group stringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes string
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity number
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- skip
Query booleanValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- {[key: string]: string}
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - window
Duration string - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - workspace
Alerts booleanStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- action
Scheduled
Query Rules Alert V2Action Args - An
action
block as defined below. - auto_
mitigation_ boolenabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - created_
with_ strapi_ version - The api-version used when creating this alert rule.
- criterias
Sequence[Scheduled
Query Rules Alert V2Criteria Args] - A
criteria
block as defined below. - description str
- Specifies the description of the scheduled query rule.
- display_
name str - Specifies the display name of the alert rule.
- enabled bool
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - evaluation_
frequency str How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- identity
Scheduled
Query Rules Alert V2Identity Args - An
identity
block as defined below. - is_
a_ boollegacy_ log_ analytics_ rule - True if this alert rule is a legacy Log Analytic Rule.
- is_
workspace_ boolalerts_ storage_ configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- location str
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute_
actions_ strafter_ alert_ duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- name str
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query_
time_ strrange_ override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- resource_
group_ strname - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes str
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity int
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- skip_
query_ boolvalidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Mapping[str, str]
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - window_
duration str - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - workspace_
alerts_ boolstorage_ enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
- action Property Map
- An
action
block as defined below. - auto
Mitigation BooleanEnabled - Specifies the flag that indicates whether the alert should be automatically resolved or not. Value should be
true
orfalse
. The default isfalse
. - created
With StringApi Version - The api-version used when creating this alert rule.
- criterias List<Property Map>
- A
criteria
block as defined below. - description String
- Specifies the description of the scheduled query rule.
- display
Name String - Specifies the display name of the alert rule.
- enabled Boolean
- Specifies the flag which indicates whether this scheduled query rule is enabled. Value should be
true
orfalse
. Defaults totrue
. - evaluation
Frequency String How often the scheduled query rule is evaluated, represented in ISO 8601 duration format. Possible values are
PT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
.Note
evaluation_frequency
cannot be greater than the query look back which iswindow_duration
*number_of_evaluation_periods
.Note
evaluation_frequency
cannot be greater than themute_actions_after_alert_duration
.- identity Property Map
- An
identity
block as defined below. - is
ALegacy BooleanLog Analytics Rule - True if this alert rule is a legacy Log Analytic Rule.
- is
Workspace BooleanAlerts Storage Configured - The flag indicates whether this Scheduled Query Rule has been configured to be stored in the customer's storage.
- location String
- Specifies the Azure Region where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- mute
Actions StringAfter Alert Duration Mute actions for the chosen period of time in ISO 8601 duration format after the alert is fired. Possible values are
PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
auto_mitigation_enabled
andmute_actions_after_alert_duration
are mutually exclusive and cannot both be set.- name String
- Specifies the name which should be used for this Monitor Scheduled Query Rule. Changing this forces a new resource to be created.
- query
Time StringRange Override Set this if the alert evaluation period is different from the query time range. If not specified, the value is
window_duration
*number_of_evaluation_periods
. Possible values arePT5M
,PT10M
,PT15M
,PT20M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
andP2D
.Note
query_time_range_override
cannot be less than the query look back which iswindow_duration
*number_of_evaluation_periods
.- resource
Group StringName - Specifies the name of the Resource Group where the Monitor Scheduled Query Rule should exist. Changing this forces a new resource to be created.
- scopes String
- Specifies the list of resource IDs that this scheduled query rule is scoped to. Changing this forces a new resource to be created. Currently, the API supports exactly 1 resource ID in the scopes list.
- severity Number
- Severity of the alert. Should be an integer between 0 and 4. Value of 0 is severest.
- skip
Query BooleanValidation - Specifies the flag which indicates whether the provided query should be validated or not. The default is false.
- Map<String>
- A mapping of tags which should be assigned to the Monitor Scheduled Query Rule.
- 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. - window
Duration String - Specifies the period of time in ISO 8601 duration format on which the Scheduled Query Rule will be executed (bin size). If
evaluation_frequency
isPT1M
, possible values arePT1M
,PT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
, andPT6H
. Otherwise, possible values arePT5M
,PT10M
,PT15M
,PT30M
,PT45M
,PT1H
,PT2H
,PT3H
,PT4H
,PT5H
,PT6H
,P1D
, andP2D
. - workspace
Alerts BooleanStorage Enabled - Specifies the flag which indicates whether this scheduled query rule check if storage is configured. Value should be
true
orfalse
. The default isfalse
.
Supporting Types
ScheduledQueryRulesAlertV2Action, ScheduledQueryRulesAlertV2ActionArgs
- Action
Groups List<string> - List of Action Group resource IDs to invoke when the alert fires.
- Custom
Properties Dictionary<string, string> - Specifies the properties of an alert payload.
- Action
Groups []string - List of Action Group resource IDs to invoke when the alert fires.
- Custom
Properties map[string]string - Specifies the properties of an alert payload.
- action
Groups List<String> - List of Action Group resource IDs to invoke when the alert fires.
- custom
Properties Map<String,String> - Specifies the properties of an alert payload.
- action
Groups string[] - List of Action Group resource IDs to invoke when the alert fires.
- custom
Properties {[key: string]: string} - Specifies the properties of an alert payload.
- action_
groups Sequence[str] - List of Action Group resource IDs to invoke when the alert fires.
- custom_
properties Mapping[str, str] - Specifies the properties of an alert payload.
- action
Groups List<String> - List of Action Group resource IDs to invoke when the alert fires.
- custom
Properties Map<String> - Specifies the properties of an alert payload.
ScheduledQueryRulesAlertV2Criteria, ScheduledQueryRulesAlertV2CriteriaArgs
- Operator string
- Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
. - Query string
- The query to run on logs. The results returned by this query are used to populate the alert.
- Threshold double
- Specifies the criteria threshold value that activates the alert.
- Time
Aggregation stringMethod - The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
. - Dimensions
List<Scheduled
Query Rules Alert V2Criteria Dimension> - A
dimension
block as defined below. - Failing
Periods ScheduledQuery Rules Alert V2Criteria Failing Periods - A
failing_periods
block as defined below. - Metric
Measure stringColumn Specifies the column containing the metric measure number.
Note
metric_measure_column
is required iftime_aggregation_method
isAverage
,Maximum
,Minimum
, orTotal
. Andmetric_measure_column
can not be specified iftime_aggregation_method
isCount
.- Resource
Id stringColumn - Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- Operator string
- Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
. - Query string
- The query to run on logs. The results returned by this query are used to populate the alert.
- Threshold float64
- Specifies the criteria threshold value that activates the alert.
- Time
Aggregation stringMethod - The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
. - Dimensions
[]Scheduled
Query Rules Alert V2Criteria Dimension - A
dimension
block as defined below. - Failing
Periods ScheduledQuery Rules Alert V2Criteria Failing Periods - A
failing_periods
block as defined below. - Metric
Measure stringColumn Specifies the column containing the metric measure number.
Note
metric_measure_column
is required iftime_aggregation_method
isAverage
,Maximum
,Minimum
, orTotal
. Andmetric_measure_column
can not be specified iftime_aggregation_method
isCount
.- Resource
Id stringColumn - Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- operator String
- Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
. - query String
- The query to run on logs. The results returned by this query are used to populate the alert.
- threshold Double
- Specifies the criteria threshold value that activates the alert.
- time
Aggregation StringMethod - The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
. - dimensions
List<Scheduled
Query Rules Alert V2Criteria Dimension> - A
dimension
block as defined below. - failing
Periods ScheduledQuery Rules Alert V2Criteria Failing Periods - A
failing_periods
block as defined below. - metric
Measure StringColumn Specifies the column containing the metric measure number.
Note
metric_measure_column
is required iftime_aggregation_method
isAverage
,Maximum
,Minimum
, orTotal
. Andmetric_measure_column
can not be specified iftime_aggregation_method
isCount
.- resource
Id StringColumn - Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- operator string
- Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
. - query string
- The query to run on logs. The results returned by this query are used to populate the alert.
- threshold number
- Specifies the criteria threshold value that activates the alert.
- time
Aggregation stringMethod - The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
. - dimensions
Scheduled
Query Rules Alert V2Criteria Dimension[] - A
dimension
block as defined below. - failing
Periods ScheduledQuery Rules Alert V2Criteria Failing Periods - A
failing_periods
block as defined below. - metric
Measure stringColumn Specifies the column containing the metric measure number.
Note
metric_measure_column
is required iftime_aggregation_method
isAverage
,Maximum
,Minimum
, orTotal
. Andmetric_measure_column
can not be specified iftime_aggregation_method
isCount
.- resource
Id stringColumn - Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- operator str
- Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
. - query str
- The query to run on logs. The results returned by this query are used to populate the alert.
- threshold float
- Specifies the criteria threshold value that activates the alert.
- time_
aggregation_ strmethod - The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
. - dimensions
Sequence[Scheduled
Query Rules Alert V2Criteria Dimension] - A
dimension
block as defined below. - failing_
periods ScheduledQuery Rules Alert V2Criteria Failing Periods - A
failing_periods
block as defined below. - metric_
measure_ strcolumn Specifies the column containing the metric measure number.
Note
metric_measure_column
is required iftime_aggregation_method
isAverage
,Maximum
,Minimum
, orTotal
. Andmetric_measure_column
can not be specified iftime_aggregation_method
isCount
.- resource_
id_ strcolumn - Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
- operator String
- Specifies the criteria operator. Possible values are
Equal
,GreaterThan
,GreaterThanOrEqual
,LessThan
,andLessThanOrEqual
. - query String
- The query to run on logs. The results returned by this query are used to populate the alert.
- threshold Number
- Specifies the criteria threshold value that activates the alert.
- time
Aggregation StringMethod - The type of aggregation to apply to the data points in aggregation granularity. Possible values are
Average
,Count
,Maximum
,Minimum
,andTotal
. - dimensions List<Property Map>
- A
dimension
block as defined below. - failing
Periods Property Map - A
failing_periods
block as defined below. - metric
Measure StringColumn Specifies the column containing the metric measure number.
Note
metric_measure_column
is required iftime_aggregation_method
isAverage
,Maximum
,Minimum
, orTotal
. Andmetric_measure_column
can not be specified iftime_aggregation_method
isCount
.- resource
Id StringColumn - Specifies the column containing the resource ID. The content of the column must be an uri formatted as resource ID.
ScheduledQueryRulesAlertV2CriteriaDimension, ScheduledQueryRulesAlertV2CriteriaDimensionArgs
ScheduledQueryRulesAlertV2CriteriaFailingPeriods, ScheduledQueryRulesAlertV2CriteriaFailingPeriodsArgs
- Minimum
Failing intPeriods To Trigger Alert - Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6. - Number
Of intEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.Note The query look back which is
window_duration
*number_of_evaluation_periods
cannot exceed 48 hours.Note
number_of_evaluation_periods
must be1
for queries that do not project timestamp column
- Minimum
Failing intPeriods To Trigger Alert - Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6. - Number
Of intEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.Note The query look back which is
window_duration
*number_of_evaluation_periods
cannot exceed 48 hours.Note
number_of_evaluation_periods
must be1
for queries that do not project timestamp column
- minimum
Failing IntegerPeriods To Trigger Alert - Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6. - number
Of IntegerEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.Note The query look back which is
window_duration
*number_of_evaluation_periods
cannot exceed 48 hours.Note
number_of_evaluation_periods
must be1
for queries that do not project timestamp column
- minimum
Failing numberPeriods To Trigger Alert - Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6. - number
Of numberEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.Note The query look back which is
window_duration
*number_of_evaluation_periods
cannot exceed 48 hours.Note
number_of_evaluation_periods
must be1
for queries that do not project timestamp column
- minimum_
failing_ intperiods_ to_ trigger_ alert - Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6. - number_
of_ intevaluation_ periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.Note The query look back which is
window_duration
*number_of_evaluation_periods
cannot exceed 48 hours.Note
number_of_evaluation_periods
must be1
for queries that do not project timestamp column
- minimum
Failing NumberPeriods To Trigger Alert - Specifies the number of violations to trigger an alert. Should be smaller or equal to
number_of_evaluation_periods
. Possible value is integer between 1 and 6. - number
Of NumberEvaluation Periods Specifies the number of aggregated look-back points. The look-back time window is calculated based on the aggregation granularity
window_duration
and the selected number of aggregated points. Possible value is integer between 1 and 6.Note The query look back which is
window_duration
*number_of_evaluation_periods
cannot exceed 48 hours.Note
number_of_evaluation_periods
must be1
for queries that do not project timestamp column
ScheduledQueryRulesAlertV2Identity, ScheduledQueryRulesAlertV2IdentityArgs
- Type string
- Specifies the type of Managed Service Identity that should be configured on this Scheduled Query Rule. Possible values are
SystemAssigned
,UserAssigned
. - Identity
Ids List<string> A list of User Assigned Managed Identity IDs to be assigned to this Scheduled Query Rule.
NOTE: This is required when
type
is set toUserAssigned
. The identity associated must have required roles, read the Azure documentation for more information.- Principal
Id string - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- Tenant
Id string - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- Type string
- Specifies the type of Managed Service Identity that should be configured on this Scheduled Query Rule. Possible values are
SystemAssigned
,UserAssigned
. - Identity
Ids []string A list of User Assigned Managed Identity IDs to be assigned to this Scheduled Query Rule.
NOTE: This is required when
type
is set toUserAssigned
. The identity associated must have required roles, read the Azure documentation for more information.- Principal
Id string - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- Tenant
Id string - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- type String
- Specifies the type of Managed Service Identity that should be configured on this Scheduled Query Rule. Possible values are
SystemAssigned
,UserAssigned
. - identity
Ids List<String> A list of User Assigned Managed Identity IDs to be assigned to this Scheduled Query Rule.
NOTE: This is required when
type
is set toUserAssigned
. The identity associated must have required roles, read the Azure documentation for more information.- principal
Id String - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- tenant
Id String - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- type string
- Specifies the type of Managed Service Identity that should be configured on this Scheduled Query Rule. Possible values are
SystemAssigned
,UserAssigned
. - identity
Ids string[] A list of User Assigned Managed Identity IDs to be assigned to this Scheduled Query Rule.
NOTE: This is required when
type
is set toUserAssigned
. The identity associated must have required roles, read the Azure documentation for more information.- principal
Id string - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- tenant
Id string - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- type str
- Specifies the type of Managed Service Identity that should be configured on this Scheduled Query Rule. Possible values are
SystemAssigned
,UserAssigned
. - identity_
ids Sequence[str] A list of User Assigned Managed Identity IDs to be assigned to this Scheduled Query Rule.
NOTE: This is required when
type
is set toUserAssigned
. The identity associated must have required roles, read the Azure documentation for more information.- principal_
id str - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- tenant_
id str - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- type String
- Specifies the type of Managed Service Identity that should be configured on this Scheduled Query Rule. Possible values are
SystemAssigned
,UserAssigned
. - identity
Ids List<String> A list of User Assigned Managed Identity IDs to be assigned to this Scheduled Query Rule.
NOTE: This is required when
type
is set toUserAssigned
. The identity associated must have required roles, read the Azure documentation for more information.- principal
Id String - The Principal ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
- tenant
Id String - The Tenant ID for the Service Principal associated with the Managed Service Identity of this App Service slot.
Import
Monitor Scheduled Query Rule Alert can be imported using the resource id
, e.g.
$ pulumi import azure:monitoring/scheduledQueryRulesAlertV2:ScheduledQueryRulesAlertV2 example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resourceGroup1/providers/Microsoft.Insights/scheduledQueryRules/rule1
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.