Data Source: azurermMonitorScheduledQueryRulesAlert
Use this data source to access the properties of an AlertingAction scheduled query rule.
Example Usage
import * as cdktf from "cdktf";
/*Provider bindings are generated by running cdktf get.
See https://cdk.tf/provider-generation for more details.*/
import * as azurerm from "./.gen/providers/azurerm";
/*The following providers are missing schema information and might need manual adjustments to synthesize correctly: azurerm.
For a more precise conversion please use the --provider flag in convert.*/
const dataAzurermMonitorScheduledQueryRulesAlertExample =
new azurerm.dataAzurermMonitorScheduledQueryRulesAlert.DataAzurermMonitorScheduledQueryRulesAlert(
this,
"example",
{
name: "tfex-queryrule",
resource_group_name: "terraform-example-rg",
}
);
new cdktf.TerraformOutput(this, "query_rule_id", {
value: dataAzurermMonitorScheduledQueryRulesAlertExample.id,
});
Argument Reference
name
- (Required) Specifies the name of the scheduled query rule.resourceGroupName
- (Required) Specifies the name of the resource group where the scheduled query rule is located.
Attributes Reference
id
- The ID of the scheduled query rule.location
- Specifies the Azure Region where the resource should exist.action
- Anaction
block as defined below.authorizedResourceIds
- The list of Resource IDs referred into query.dataSourceId
- The resource URI over which log search query is to be run.description
- The description of the scheduled query rule.enabled
- Whether this scheduled query rule is enabled.frequency
- Frequency at which rule condition should be evaluated.query
- Log search query.queryType
- The type of query results.timeWindow
- Time window for which data needs to be fetched for query.severity
- Severity of the alert.throttling
- Time for which alerts should be throttled or suppressed.trigger
- Atrigger
block as defined below.
-
action
supports the following: -
actionGroup
- List of action group reference resource IDs. -
customWebhookPayload
- Custom payload to be sent for all webhook URI in Azure action group. -
emailSubject
- Custom subject override for all email IDs in Azure action group.
metricTrigger
supports the following:
metricColumn
- Evaluation of metric on a particular column.metricTriggerType
- The metric trigger type.operator
- Evaluation operation for rule.threshold
- The threshold of the metric trigger.
trigger
supports the following:
metricTrigger
- AmetricTrigger
block as defined above.operator
- Evaluation operation for rule.threshold
- Result or count threshold based on which rule should be triggered.
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
read
- (Defaults to 5 minutes) Used when retrieving the App Service Environment.