ScheduledQueryRulesAlert

Manages an AlertingAction Scheduled Query Rules resource within Azure Monitor.

Create a ScheduledQueryRulesAlert Resource

def ScheduledQueryRulesAlert(resource_name, opts=None, action=None, authorized_resource_ids=None, data_source_id=None, description=None, enabled=None, frequency=None, location=None, name=None, query=None, query_type=None, resource_group_name=None, severity=None, tags=None, throttling=None, time_window=None, trigger=None, __props__=None);
name string
The unique name of the resource.
args ScheduledQueryRulesAlertArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
opts ResourceOptions
A bag of options that control this resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args ScheduledQueryRulesAlertArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args ScheduledQueryRulesAlertArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

ScheduledQueryRulesAlert Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Programming Model docs.

Inputs

The ScheduledQueryRulesAlert resource accepts the following input properties:

Action ScheduledQueryRulesAlertActionArgs

An action block as defined below.

DataSourceId string

The resource URI over which log search query is to be run.

Frequency int

Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).

Query string

Log search query.

ResourceGroupName string

The name of the resource group in which to create the scheduled query rule instance.

TimeWindow 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 ScheduledQueryRulesAlertTriggerArgs

The condition that results in the alert rule being run.

AuthorizedResourceIds List<string>

List of Resource IDs referred into query.

Description string

The description of the scheduled query rule.

Enabled bool

Whether this scheduled query rule is enabled. Default is true.

Location string
Name string

The name of the scheduled query rule. Changing this forces a new resource to be created.

QueryType string
Severity int

Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.

Tags Dictionary<string, string>
Throttling int

Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).

Action ScheduledQueryRulesAlertAction

An action block as defined below.

DataSourceId string

The resource URI over which log search query is to be run.

Frequency int

Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).

Query string

Log search query.

ResourceGroupName string

The name of the resource group in which to create the scheduled query rule instance.

TimeWindow 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 ScheduledQueryRulesAlertTrigger

The condition that results in the alert rule being run.

AuthorizedResourceIds []string

List of Resource IDs referred into query.

Description string

The description of the scheduled query rule.

Enabled bool

Whether this scheduled query rule is enabled. Default is true.

Location string
Name string

The name of the scheduled query rule. Changing this forces a new resource to be created.

QueryType string
Severity int

Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.

Tags map[string]string
Throttling int

Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).

action ScheduledQueryRulesAlertAction

An action block as defined below.

dataSourceId string

The resource URI over which log search query is to be run.

frequency number

Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).

query string

Log search query.

resourceGroupName string

The name of the resource group in which to create the scheduled query rule instance.

timeWindow 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 ScheduledQueryRulesAlertTrigger

The condition that results in the alert rule being run.

authorizedResourceIds string[]

List of Resource IDs referred into query.

description string

The description of the scheduled query rule.

enabled boolean

Whether this scheduled query rule is enabled. Default is true.

location string
name string

The name of the scheduled query rule. Changing this forces a new resource to be created.

queryType string
severity number

Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.

tags {[key: string]: string}
throttling number

Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).

action Dict[ScheduledQueryRulesAlertAction]

An action block as defined below.

data_source_id str

The resource URI over which log search query is to be run.

frequency float

Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).

query str

Log search query.

resource_group_name str

The name of the resource group in which to create the scheduled query rule instance.

time_window float

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 Dict[ScheduledQueryRulesAlertTrigger]

The condition that results in the alert rule being run.

authorized_resource_ids List[str]

List of Resource IDs referred into query.

description str

The description of the scheduled query rule.

enabled bool

Whether this scheduled query rule is enabled. Default is true.

location str
name str

The name of the scheduled query rule. Changing this forces a new resource to be created.

query_type str
severity float

Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.

tags Dict[str, str]
throttling float

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 str
The provider-assigned unique ID for this managed resource.

Look up an Existing ScheduledQueryRulesAlert Resource

Get an existing ScheduledQueryRulesAlert resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, action=None, authorized_resource_ids=None, data_source_id=None, description=None, enabled=None, frequency=None, location=None, name=None, query=None, query_type=None, resource_group_name=None, severity=None, tags=None, throttling=None, time_window=None, trigger=None, __props__=None);
func GetScheduledQueryRulesAlert(ctx *Context, name string, id IDInput, state *ScheduledQueryRulesAlertState, opts ...ResourceOption) (*ScheduledQueryRulesAlert, error)
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.

The following state arguments are supported:

Action ScheduledQueryRulesAlertActionArgs

An action block as defined below.

AuthorizedResourceIds List<string>

List of Resource IDs referred into query.

DataSourceId string

The resource URI over which log search query is to be run.

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 string
Name string

The name of the scheduled query rule. Changing this forces a new resource to be created.

Query string

Log search query.

QueryType string
ResourceGroupName string

The name of the resource group in which to create the scheduled query rule instance.

Severity int

Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.

Tags Dictionary<string, string>
Throttling int

Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).

TimeWindow 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 ScheduledQueryRulesAlertTriggerArgs

The condition that results in the alert rule being run.

Action ScheduledQueryRulesAlertAction

An action block as defined below.

AuthorizedResourceIds []string

List of Resource IDs referred into query.

DataSourceId string

The resource URI over which log search query is to be run.

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 string
Name string

The name of the scheduled query rule. Changing this forces a new resource to be created.

Query string

Log search query.

QueryType string
ResourceGroupName string

The name of the resource group in which to create the scheduled query rule instance.

Severity int

Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.

Tags map[string]string
Throttling int

Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).

TimeWindow 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 ScheduledQueryRulesAlertTrigger

The condition that results in the alert rule being run.

action ScheduledQueryRulesAlertAction

An action block as defined below.

authorizedResourceIds string[]

List of Resource IDs referred into query.

dataSourceId string

The resource URI over which log search query is to be run.

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 string
name string

The name of the scheduled query rule. Changing this forces a new resource to be created.

query string

Log search query.

queryType string
resourceGroupName string

The name of the resource group in which to create the scheduled query rule instance.

severity number

Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.

tags {[key: string]: string}
throttling number

Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).

timeWindow 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 ScheduledQueryRulesAlertTrigger

The condition that results in the alert rule being run.

action Dict[ScheduledQueryRulesAlertAction]

An action block as defined below.

authorized_resource_ids List[str]

List of Resource IDs referred into query.

data_source_id str

The resource URI over which log search query is to be run.

description str

The description of the scheduled query rule.

enabled bool

Whether this scheduled query rule is enabled. Default is true.

frequency float

Frequency (in minutes) at which rule condition should be evaluated. Values must be between 5 and 1440 (inclusive).

location str
name str

The name of the scheduled query rule. Changing this forces a new resource to be created.

query str

Log search query.

query_type str
resource_group_name str

The name of the resource group in which to create the scheduled query rule instance.

severity float

Severity of the alert. Possible values include: 0, 1, 2, 3, or 4.

tags Dict[str, str]
throttling float

Time (in minutes) for which Alerts should be throttled or suppressed. Values must be between 0 and 10000 (inclusive).

time_window float

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 Dict[ScheduledQueryRulesAlertTrigger]

The condition that results in the alert rule being run.

Supporting Types

ScheduledQueryRulesAlertAction

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

ActionGroups List<string>

List of action group reference resource IDs.

CustomWebhookPayload string

Custom payload to be sent for all webhook payloads in alerting action.

EmailSubject string

Custom subject override for all email ids in Azure action group.

ActionGroups []string

List of action group reference resource IDs.

CustomWebhookPayload string

Custom payload to be sent for all webhook payloads in alerting action.

EmailSubject string

Custom subject override for all email ids in Azure action group.

actionGroups string[]

List of action group reference resource IDs.

customWebhookPayload string

Custom payload to be sent for all webhook payloads in alerting action.

emailSubject string

Custom subject override for all email ids in Azure action group.

actionGroups List[str]

List of action group reference resource IDs.

customWebhookPayload str

Custom payload to be sent for all webhook payloads in alerting action.

emailSubject str

Custom subject override for all email ids in Azure action group.

ScheduledQueryRulesAlertTrigger

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Operator string

Evaluation operation for rule - ‘Equal’, ‘GreaterThan’ or ‘LessThan’.

Threshold double

Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.

MetricTrigger ScheduledQueryRulesAlertTriggerMetricTriggerArgs
Operator string

Evaluation operation for rule - ‘Equal’, ‘GreaterThan’ or ‘LessThan’.

Threshold float64

Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.

MetricTrigger ScheduledQueryRulesAlertTriggerMetricTrigger
operator string

Evaluation operation for rule - ‘Equal’, ‘GreaterThan’ or ‘LessThan’.

threshold number

Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.

metricTrigger ScheduledQueryRulesAlertTriggerMetricTrigger
operator str

Evaluation operation for rule - ‘Equal’, ‘GreaterThan’ or ‘LessThan’.

threshold float

Result or count threshold based on which rule should be triggered. Values must be between 0 and 10000 inclusive.

metricTrigger Dict[ScheduledQueryRulesAlertTriggerMetricTrigger]

ScheduledQueryRulesAlertTriggerMetricTrigger

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

MetricColumn string
MetricTriggerType string
Operator string

Evaluation operation for rule - ‘Equal’, ‘GreaterThan’ or ‘LessThan’.

Threshold double

The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.

MetricColumn string
MetricTriggerType string
Operator string

Evaluation operation for rule - ‘Equal’, ‘GreaterThan’ or ‘LessThan’.

Threshold float64

The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.

metricColumn string
metricTriggerType string
operator string

Evaluation operation for rule - ‘Equal’, ‘GreaterThan’ or ‘LessThan’.

threshold number

The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.

metricColumn str
metricTriggerType str
operator str

Evaluation operation for rule - ‘Equal’, ‘GreaterThan’ or ‘LessThan’.

threshold float

The threshold of the metric trigger. Values must be between 0 and 10000 inclusive.

Package Details

Repository
https://github.com/pulumi/pulumi-azure
License
Apache-2.0
Notes
This Pulumi package is based on the azurerm Terraform Provider.