We recommend using Azure Native.
azure.monitoring.ScheduledQueryRulesAlert
Explore with Pulumi AI
Manages an AlertingAction Scheduled Query Rules resource within Azure Monitor.
Warning This resource is using an older AzureRM API version which is known to cause problems e.g. with custom webhook properties not included in triggered alerts. This resource is superseded by the azure.monitoring.ScheduledQueryRulesAlertV2 resource using newer API versions.
Create ScheduledQueryRulesAlert Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ScheduledQueryRulesAlert(name: string, args: ScheduledQueryRulesAlertArgs, opts?: CustomResourceOptions);
@overload
def ScheduledQueryRulesAlert(resource_name: str,
args: ScheduledQueryRulesAlertArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ScheduledQueryRulesAlert(resource_name: str,
opts: Optional[ResourceOptions] = None,
action: Optional[ScheduledQueryRulesAlertActionArgs] = None,
trigger: Optional[ScheduledQueryRulesAlertTriggerArgs] = None,
time_window: Optional[int] = None,
data_source_id: Optional[str] = None,
resource_group_name: Optional[str] = None,
query: Optional[str] = None,
frequency: Optional[int] = None,
name: Optional[str] = None,
location: Optional[str] = None,
enabled: Optional[bool] = None,
query_type: Optional[str] = None,
description: Optional[str] = None,
severity: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
throttling: Optional[int] = None,
auto_mitigation_enabled: Optional[bool] = None,
authorized_resource_ids: Optional[Sequence[str]] = None)
func NewScheduledQueryRulesAlert(ctx *Context, name string, args ScheduledQueryRulesAlertArgs, opts ...ResourceOption) (*ScheduledQueryRulesAlert, error)
public ScheduledQueryRulesAlert(string name, ScheduledQueryRulesAlertArgs args, CustomResourceOptions? opts = null)
public ScheduledQueryRulesAlert(String name, ScheduledQueryRulesAlertArgs args)
public ScheduledQueryRulesAlert(String name, ScheduledQueryRulesAlertArgs args, CustomResourceOptions options)
type: azure:monitoring:ScheduledQueryRulesAlert
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ScheduledQueryRulesAlertArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. ScheduledQueryRulesAlertArgs - The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ScheduledQueryRulesAlertArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ScheduledQueryRulesAlertArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. ScheduledQueryRulesAlertArgs - 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 scheduledQueryRulesAlertResource = new Azure.Monitoring.ScheduledQueryRulesAlert("scheduledQueryRulesAlertResource", new()
{
Action = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertActionArgs
{
ActionGroups = new[]
{
"string",
},
CustomWebhookPayload = "string",
EmailSubject = "string",
},
Trigger = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertTriggerArgs
{
Operator = "string",
Threshold = 0,
MetricTrigger = new Azure.Monitoring.Inputs.ScheduledQueryRulesAlertTriggerMetricTriggerArgs
{
MetricTriggerType = "string",
Operator = "string",
Threshold = 0,
MetricColumn = "string",
},
},
TimeWindow = 0,
DataSourceId = "string",
ResourceGroupName = "string",
Query = "string",
Frequency = 0,
Name = "string",
Location = "string",
Enabled = false,
QueryType = "string",
Description = "string",
Severity = 0,
Tags =
{
{ "string", "string" },
},
Throttling = 0,
AutoMitigationEnabled = false,
AuthorizedResourceIds = new[]
{
"string",
},
});
example, err := monitoring.NewScheduledQueryRulesAlert(ctx, "scheduledQueryRulesAlertResource", &monitoring.ScheduledQueryRulesAlertArgs{
Action: &monitoring.ScheduledQueryRulesAlertActionArgs{
ActionGroups: pulumi.StringArray{
pulumi.String("string"),
},
CustomWebhookPayload: pulumi.String("string"),
EmailSubject: pulumi.String("string"),
},
Trigger: &monitoring.ScheduledQueryRulesAlertTriggerArgs{
Operator: pulumi.String("string"),
Threshold: pulumi.Float64(0),
MetricTrigger: &monitoring.ScheduledQueryRulesAlertTriggerMetricTriggerArgs{
MetricTriggerType: pulumi.String("string"),
Operator: pulumi.String("string"),
Threshold: pulumi.Float64(0),
MetricColumn: pulumi.String("string"),
},
},
TimeWindow: pulumi.Int(0),
DataSourceId: pulumi.String("string"),
ResourceGroupName: pulumi.String("string"),
Query: pulumi.String("string"),
Frequency: pulumi.Int(0),
Name: pulumi.String("string"),
Location: pulumi.String("string"),
Enabled: pulumi.Bool(false),
QueryType: pulumi.String("string"),
Description: pulumi.String("string"),
Severity: pulumi.Int(0),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
Throttling: pulumi.Int(0),
AutoMitigationEnabled: pulumi.Bool(false),
AuthorizedResourceIds: pulumi.StringArray{
pulumi.String("string"),
},
})
var scheduledQueryRulesAlertResource = new ScheduledQueryRulesAlert("scheduledQueryRulesAlertResource", ScheduledQueryRulesAlertArgs.builder()
.action(ScheduledQueryRulesAlertActionArgs.builder()
.actionGroups("string")
.customWebhookPayload("string")
.emailSubject("string")
.build())
.trigger(ScheduledQueryRulesAlertTriggerArgs.builder()
.operator("string")
.threshold(0)
.metricTrigger(ScheduledQueryRulesAlertTriggerMetricTriggerArgs.builder()
.metricTriggerType("string")
.operator("string")
.threshold(0)
.metricColumn("string")
.build())
.build())
.timeWindow(0)
.dataSourceId("string")
.resourceGroupName("string")
.query("string")
.frequency(0)
.name("string")
.location("string")
.enabled(false)
.queryType("string")
.description("string")
.severity(0)
.tags(Map.of("string", "string"))
.throttling(0)
.autoMitigationEnabled(false)
.authorizedResourceIds("string")
.build());
scheduled_query_rules_alert_resource = azure.monitoring.ScheduledQueryRulesAlert("scheduledQueryRulesAlertResource",
action={
"action_groups": ["string"],
"custom_webhook_payload": "string",
"email_subject": "string",
},
trigger={
"operator": "string",
"threshold": 0,
"metric_trigger": {
"metric_trigger_type": "string",
"operator": "string",
"threshold": 0,
"metric_column": "string",
},
},
time_window=0,
data_source_id="string",
resource_group_name="string",
query="string",
frequency=0,
name="string",
location="string",
enabled=False,
query_type="string",
description="string",
severity=0,
tags={
"string": "string",
},
throttling=0,
auto_mitigation_enabled=False,
authorized_resource_ids=["string"])
const scheduledQueryRulesAlertResource = new azure.monitoring.ScheduledQueryRulesAlert("scheduledQueryRulesAlertResource", {
action: {
actionGroups: ["string"],
customWebhookPayload: "string",
emailSubject: "string",
},
trigger: {
operator: "string",
threshold: 0,
metricTrigger: {
metricTriggerType: "string",
operator: "string",
threshold: 0,
metricColumn: "string",
},
},
timeWindow: 0,
dataSourceId: "string",
resourceGroupName: "string",
query: "string",
frequency: 0,
name: "string",
location: "string",
enabled: false,
queryType: "string",
description: "string",
severity: 0,
tags: {
string: "string",
},
throttling: 0,
autoMitigationEnabled: false,
authorizedResourceIds: ["string"],
});
type: azure:monitoring:ScheduledQueryRulesAlert
properties:
action:
actionGroups:
- string
customWebhookPayload: string
emailSubject: string
authorizedResourceIds:
- string
autoMitigationEnabled: false
dataSourceId: string
description: string
enabled: false
frequency: 0
location: string
name: string
query: string
queryType: string
resourceGroupName: string
severity: 0
tags:
string: string
throttling: 0
timeWindow: 0
trigger:
metricTrigger:
metricColumn: string
metricTriggerType: string
operator: string
threshold: 0
operator: string
threshold: 0
ScheduledQueryRulesAlert 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 ScheduledQueryRulesAlert resource accepts the following input properties:
- Action
This property is required. ScheduledQuery Rules Alert Action - An
action
block as defined below. - Data
Source Id This property is required. Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- Frequency
This property is required. int - Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- Query
This property is required. string - Log search query.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- Time
Window This property is required. int - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - Trigger
This property is required. ScheduledQuery Rules Alert Trigger - A
trigger
block as defined below. - List<string>
- List of Resource IDs referred into query.
- Auto
Mitigation boolEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - Location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- Name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Query
Type string - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - Severity int
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Throttling int
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- Action
This property is required. ScheduledQuery Rules Alert Action Args - An
action
block as defined below. - Data
Source Id This property is required. Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- Frequency
This property is required. int - Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- Query
This property is required. string - Log search query.
- Resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- Time
Window This property is required. int - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - Trigger
This property is required. ScheduledQuery Rules Alert Trigger Args - A
trigger
block as defined below. - []string
- List of Resource IDs referred into query.
- Auto
Mitigation boolEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - Location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- Name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Query
Type string - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - Severity int
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- map[string]string
- A mapping of tags to assign to the resource.
- Throttling int
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- action
This property is required. ScheduledQuery Rules Alert Action - An
action
block as defined below. - data
Source Id This property is required. Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- frequency
This property is required. Integer - Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- query
This property is required. String - Log search query.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- time
Window This property is required. Integer - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - trigger
This property is required. ScheduledQuery Rules Alert Trigger - A
trigger
block as defined below. - List<String>
- List of Resource IDs referred into query.
- auto
Mitigation BooleanEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true
. - location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- query
Type String - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - severity Integer
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- Map<String,String>
- A mapping of tags to assign to the resource.
- throttling Integer
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- action
This property is required. ScheduledQuery Rules Alert Action - An
action
block as defined below. - data
Source Id This property is required. Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- frequency
This property is required. number - Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- query
This property is required. string - Log search query.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- time
Window This property is required. number - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - trigger
This property is required. ScheduledQuery Rules Alert Trigger - A
trigger
block as defined below. - string[]
- List of Resource IDs referred into query.
- auto
Mitigation booleanEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- description string
- The description of the scheduled query rule.
- enabled boolean
- Whether this scheduled query rule is enabled. Default is
true
. - location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- query
Type string - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - severity number
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- throttling number
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- action
This property is required. ScheduledQuery Rules Alert Action Args - An
action
block as defined below. - data_
source_ id This property is required. Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- frequency
This property is required. int - Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- query
This property is required. str - Log search query.
- resource_
group_ name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- time_
window This property is required. int - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - trigger
This property is required. ScheduledQuery Rules Alert Trigger Args - A
trigger
block as defined below. - Sequence[str]
- List of Resource IDs referred into query.
- auto_
mitigation_ boolenabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- description str
- The description of the scheduled query rule.
- enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- query_
type str - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - severity int
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- throttling int
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- action
This property is required. Property Map - An
action
block as defined below. - data
Source Id This property is required. Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- frequency
This property is required. Number - Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- query
This property is required. String - Log search query.
- resource
Group Name This property is required. Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- time
Window This property is required. Number - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - trigger
This property is required. Property Map - A
trigger
block as defined below. - List<String>
- List of Resource IDs referred into query.
- auto
Mitigation BooleanEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true
. - location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- query
Type String - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - severity Number
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- Map<String>
- A mapping of tags to assign to the resource.
- throttling Number
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
Outputs
All input properties are implicitly available as output properties. Additionally, the ScheduledQueryRulesAlert resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ScheduledQueryRulesAlert Resource
Get an existing ScheduledQueryRulesAlert 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?: ScheduledQueryRulesAlertState, opts?: CustomResourceOptions): ScheduledQueryRulesAlert
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
action: Optional[ScheduledQueryRulesAlertActionArgs] = None,
authorized_resource_ids: Optional[Sequence[str]] = None,
auto_mitigation_enabled: Optional[bool] = None,
data_source_id: Optional[str] = None,
description: Optional[str] = None,
enabled: Optional[bool] = None,
frequency: Optional[int] = None,
location: Optional[str] = None,
name: Optional[str] = None,
query: Optional[str] = None,
query_type: Optional[str] = None,
resource_group_name: Optional[str] = None,
severity: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
throttling: Optional[int] = None,
time_window: Optional[int] = None,
trigger: Optional[ScheduledQueryRulesAlertTriggerArgs] = None) -> ScheduledQueryRulesAlert
func GetScheduledQueryRulesAlert(ctx *Context, name string, id IDInput, state *ScheduledQueryRulesAlertState, opts ...ResourceOption) (*ScheduledQueryRulesAlert, error)
public static ScheduledQueryRulesAlert Get(string name, Input<string> id, ScheduledQueryRulesAlertState? state, CustomResourceOptions? opts = null)
public static ScheduledQueryRulesAlert get(String name, Output<String> id, ScheduledQueryRulesAlertState state, CustomResourceOptions options)
resources: _: type: azure:monitoring:ScheduledQueryRulesAlert get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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 Action - An
action
block as defined below. - List<string>
- List of Resource IDs referred into query.
- Auto
Mitigation boolEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- Data
Source Id Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - Frequency int
- Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- Location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- Name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Query string
- Log search query.
- Query
Type string - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - Resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- Severity int
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Throttling int
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- Time
Window int - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - Trigger
Scheduled
Query Rules Alert Trigger - A
trigger
block as defined below.
- Action
Scheduled
Query Rules Alert Action Args - An
action
block as defined below. - []string
- List of Resource IDs referred into query.
- Auto
Mitigation boolEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- Data
Source Id Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- Description string
- The description of the scheduled query rule.
- Enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - Frequency int
- Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- Location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- Name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- Query string
- Log search query.
- Query
Type string - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - Resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- Severity int
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- map[string]string
- A mapping of tags to assign to the resource.
- Throttling int
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- Time
Window int - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - Trigger
Scheduled
Query Rules Alert Trigger Args - A
trigger
block as defined below.
- action
Scheduled
Query Rules Alert Action - An
action
block as defined below. - List<String>
- List of Resource IDs referred into query.
- auto
Mitigation BooleanEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- data
Source Id Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true
. - frequency Integer
- Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- query String
- Log search query.
- query
Type String - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- severity Integer
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- Map<String,String>
- A mapping of tags to assign to the resource.
- throttling Integer
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- time
Window Integer - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - trigger
Scheduled
Query Rules Alert Trigger - A
trigger
block as defined below.
- action
Scheduled
Query Rules Alert Action - An
action
block as defined below. - string[]
- List of Resource IDs referred into query.
- auto
Mitigation booleanEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- data
Source Id Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- description string
- The description of the scheduled query rule.
- enabled boolean
- Whether this scheduled query rule is enabled. Default is
true
. - frequency number
- Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- query string
- Log search query.
- query
Type string - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- severity number
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- {[key: string]: string}
- A mapping of tags to assign to the resource.
- throttling number
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- time
Window number - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - trigger
Scheduled
Query Rules Alert Trigger - A
trigger
block as defined below.
- action
Scheduled
Query Rules Alert Action Args - An
action
block as defined below. - Sequence[str]
- List of Resource IDs referred into query.
- auto_
mitigation_ boolenabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- data_
source_ id Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- description str
- The description of the scheduled query rule.
- enabled bool
- Whether this scheduled query rule is enabled. Default is
true
. - frequency int
- Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- query str
- Log search query.
- query_
type str - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - resource_
group_ name Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- severity int
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- Mapping[str, str]
- A mapping of tags to assign to the resource.
- throttling int
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- time_
window int - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - trigger
Scheduled
Query Rules Alert Trigger Args - A
trigger
block as defined below.
- action Property Map
- An
action
block as defined below. - List<String>
- List of Resource IDs referred into query.
- auto
Mitigation BooleanEnabled Should the alerts in this Metric Alert be auto resolved? Defaults to
false
.NOTE
auto_mitigation_enabled
andthrottling
are mutually exclusive and cannot both be set.- data
Source Id Changes to this property will trigger replacement.
- The resource URI over which log search query is to be run. Changing this forces a new resource to be created.
- description String
- The description of the scheduled query rule.
- enabled Boolean
- Whether this scheduled query rule is enabled. Default is
true
. - frequency Number
- Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).
- location
Changes to this property will trigger replacement.
- Specifies the Azure Region where the resource should exist. Changing this forces a new resource to be created.
- name
Changes to this property will trigger replacement.
- The name of the scheduled query rule. Changing this forces a new resource to be created.
- query String
- Log search query.
- query
Type String - The type of query results. Possible values are
ResultCount
andNumber
. Default isResultCount
. If set toResultCount
,query
must include anAggregatedValue
column of a numeric type, for example,Heartbeat | summarize AggregatedValue = count() by bin(TimeGenerated, 5m)
. - resource
Group Name Changes to this property will trigger replacement.
- The name of the resource group in which to create the scheduled query rule instance. Changing this forces a new resource to be created.
- severity Number
- Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.
- Map<String>
- A mapping of tags to assign to the resource.
- throttling Number
- Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).
- time
Window Number - Time window for which data needs to be fetched for query (must be greater than or equal to
frequency
). Values must be between 5 and 2880 (inclusive). - trigger Property Map
- A
trigger
block as defined below.
Supporting Types
ScheduledQueryRulesAlertAction, ScheduledQueryRulesAlertActionArgs
- Action
Groups This property is required. List<string> - List of action group reference resource IDs.
- Custom
Webhook stringPayload - Custom payload to be sent for all webhook payloads in alerting action.
- Email
Subject string - Custom subject override for all email ids in Azure action group.
- Action
Groups This property is required. []string - List of action group reference resource IDs.
- Custom
Webhook stringPayload - Custom payload to be sent for all webhook payloads in alerting action.
- Email
Subject string - Custom subject override for all email ids in Azure action group.
- action
Groups This property is required. List<String> - List of action group reference resource IDs.
- custom
Webhook StringPayload - Custom payload to be sent for all webhook payloads in alerting action.
- email
Subject String - Custom subject override for all email ids in Azure action group.
- action
Groups This property is required. string[] - List of action group reference resource IDs.
- custom
Webhook stringPayload - Custom payload to be sent for all webhook payloads in alerting action.
- email
Subject string - Custom subject override for all email ids in Azure action group.
- action_
groups This property is required. Sequence[str] - List of action group reference resource IDs.
- custom_
webhook_ strpayload - Custom payload to be sent for all webhook payloads in alerting action.
- email_
subject str - Custom subject override for all email ids in Azure action group.
- action
Groups This property is required. List<String> - List of action group reference resource IDs.
- custom
Webhook StringPayload - Custom payload to be sent for all webhook payloads in alerting action.
- email
Subject String - Custom subject override for all email ids in Azure action group.
ScheduledQueryRulesAlertTrigger, ScheduledQueryRulesAlertTriggerArgs
- Operator
This property is required. string - Evaluation operation for rule - 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- Threshold
This property is required. double - Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.
- Metric
Trigger ScheduledQuery Rules Alert Trigger Metric Trigger - A
metric_trigger
block as defined above. Trigger condition for metric query rule.
- Operator
This property is required. string - Evaluation operation for rule - 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- Threshold
This property is required. float64 - Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.
- Metric
Trigger ScheduledQuery Rules Alert Trigger Metric Trigger - A
metric_trigger
block as defined above. Trigger condition for metric query rule.
- operator
This property is required. String - Evaluation operation for rule - 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- threshold
This property is required. Double - Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.
- metric
Trigger ScheduledQuery Rules Alert Trigger Metric Trigger - A
metric_trigger
block as defined above. Trigger condition for metric query rule.
- operator
This property is required. string - Evaluation operation for rule - 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- threshold
This property is required. number - Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.
- metric
Trigger ScheduledQuery Rules Alert Trigger Metric Trigger - A
metric_trigger
block as defined above. Trigger condition for metric query rule.
- operator
This property is required. str - Evaluation operation for rule - 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- threshold
This property is required. float - Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.
- metric_
trigger ScheduledQuery Rules Alert Trigger Metric Trigger - A
metric_trigger
block as defined above. Trigger condition for metric query rule.
- operator
This property is required. String - Evaluation operation for rule - 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- threshold
This property is required. Number - Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.
- metric
Trigger Property Map - A
metric_trigger
block as defined above. Trigger condition for metric query rule.
ScheduledQueryRulesAlertTriggerMetricTrigger, ScheduledQueryRulesAlertTriggerMetricTriggerArgs
- Metric
Trigger Type This property is required. string - Metric Trigger Type - 'Consecutive' or 'Total'.
- Operator
This property is required. string - Evaluation operation for rule - 'Equal', 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- Threshold
This property is required. double - The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.
- Metric
Column string - Evaluation of metric on a particular column.
- Metric
Trigger Type This property is required. string - Metric Trigger Type - 'Consecutive' or 'Total'.
- Operator
This property is required. string - Evaluation operation for rule - 'Equal', 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- Threshold
This property is required. float64 - The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.
- Metric
Column string - Evaluation of metric on a particular column.
- metric
Trigger Type This property is required. String - Metric Trigger Type - 'Consecutive' or 'Total'.
- operator
This property is required. String - Evaluation operation for rule - 'Equal', 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- threshold
This property is required. Double - The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.
- metric
Column String - Evaluation of metric on a particular column.
- metric
Trigger Type This property is required. string - Metric Trigger Type - 'Consecutive' or 'Total'.
- operator
This property is required. string - Evaluation operation for rule - 'Equal', 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- threshold
This property is required. number - The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.
- metric
Column string - Evaluation of metric on a particular column.
- metric_
trigger_ type This property is required. str - Metric Trigger Type - 'Consecutive' or 'Total'.
- operator
This property is required. str - Evaluation operation for rule - 'Equal', 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- threshold
This property is required. float - The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.
- metric_
column str - Evaluation of metric on a particular column.
- metric
Trigger Type This property is required. String - Metric Trigger Type - 'Consecutive' or 'Total'.
- operator
This property is required. String - Evaluation operation for rule - 'Equal', 'GreaterThan', GreaterThanOrEqual', 'LessThan', or 'LessThanOrEqual'.
- threshold
This property is required. Number - The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.
- metric
Column String - Evaluation of metric on a particular column.
Import
Scheduled Query Rule Alerts can be imported using the resource id
, e.g.
$ pulumi import azure:monitoring/scheduledQueryRulesAlert:ScheduledQueryRulesAlert example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.Insights/scheduledQueryRules/myrulename
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.