We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
Manages a Metric Alert within Azure Monitor.
Example Usage
using Pulumi;
using Azure = Pulumi.Azure;
class MyStack : Stack
{
public MyStack()
{
var mainResourceGroup = new Azure.Core.ResourceGroup("mainResourceGroup", new Azure.Core.ResourceGroupArgs
{
Location = "West Europe",
});
var toMonitor = new Azure.Storage.Account("toMonitor", new Azure.Storage.AccountArgs
{
ResourceGroupName = mainResourceGroup.Name,
Location = mainResourceGroup.Location,
AccountTier = "Standard",
AccountReplicationType = "LRS",
});
var mainActionGroup = new Azure.Monitoring.ActionGroup("mainActionGroup", new Azure.Monitoring.ActionGroupArgs
{
ResourceGroupName = mainResourceGroup.Name,
ShortName = "exampleact",
WebhookReceivers =
{
new Azure.Monitoring.Inputs.ActionGroupWebhookReceiverArgs
{
Name = "callmyapi",
ServiceUri = "http://example.com/alert",
},
},
});
var example = new Azure.Monitoring.MetricAlert("example", new Azure.Monitoring.MetricAlertArgs
{
ResourceGroupName = mainResourceGroup.Name,
Scopes =
{
toMonitor.Id,
},
Description = "Action will be triggered when Transactions count is greater than 50.",
Criterias =
{
new Azure.Monitoring.Inputs.MetricAlertCriteriaArgs
{
MetricNamespace = "Microsoft.Storage/storageAccounts",
MetricName = "Transactions",
Aggregation = "Total",
Operator = "GreaterThan",
Threshold = 50,
Dimensions =
{
new Azure.Monitoring.Inputs.MetricAlertCriteriaDimensionArgs
{
Name = "ApiName",
Operator = "Include",
Values =
{
"*",
},
},
},
},
},
Actions =
{
new Azure.Monitoring.Inputs.MetricAlertActionArgs
{
ActionGroupId = mainActionGroup.Id,
},
},
});
}
}
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/monitoring"
"github.com/pulumi/pulumi-azure/sdk/v4/go/azure/storage"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
mainResourceGroup, err := core.NewResourceGroup(ctx, "mainResourceGroup", &core.ResourceGroupArgs{
Location: pulumi.String("West Europe"),
})
if err != nil {
return err
}
toMonitor, err := storage.NewAccount(ctx, "toMonitor", &storage.AccountArgs{
ResourceGroupName: mainResourceGroup.Name,
Location: mainResourceGroup.Location,
AccountTier: pulumi.String("Standard"),
AccountReplicationType: pulumi.String("LRS"),
})
if err != nil {
return err
}
mainActionGroup, err := monitoring.NewActionGroup(ctx, "mainActionGroup", &monitoring.ActionGroupArgs{
ResourceGroupName: mainResourceGroup.Name,
ShortName: pulumi.String("exampleact"),
WebhookReceivers: monitoring.ActionGroupWebhookReceiverArray{
&monitoring.ActionGroupWebhookReceiverArgs{
Name: pulumi.String("callmyapi"),
ServiceUri: pulumi.String("http://example.com/alert"),
},
},
})
if err != nil {
return err
}
_, err = monitoring.NewMetricAlert(ctx, "example", &monitoring.MetricAlertArgs{
ResourceGroupName: mainResourceGroup.Name,
Scopes: pulumi.StringArray{
toMonitor.ID(),
},
Description: pulumi.String("Action will be triggered when Transactions count is greater than 50."),
Criterias: monitoring.MetricAlertCriteriaArray{
&monitoring.MetricAlertCriteriaArgs{
MetricNamespace: pulumi.String("Microsoft.Storage/storageAccounts"),
MetricName: pulumi.String("Transactions"),
Aggregation: pulumi.String("Total"),
Operator: pulumi.String("GreaterThan"),
Threshold: pulumi.Float64(50),
Dimensions: monitoring.MetricAlertCriteriaDimensionArray{
&monitoring.MetricAlertCriteriaDimensionArgs{
Name: pulumi.String("ApiName"),
Operator: pulumi.String("Include"),
Values: pulumi.StringArray{
pulumi.String("*"),
},
},
},
},
},
Actions: monitoring.MetricAlertActionArray{
&monitoring.MetricAlertActionArgs{
ActionGroupId: mainActionGroup.ID(),
},
},
})
if err != nil {
return err
}
return nil
})
}
Example coming soon!
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const mainResourceGroup = new azure.core.ResourceGroup("mainResourceGroup", {location: "West Europe"});
const toMonitor = new azure.storage.Account("toMonitor", {
resourceGroupName: mainResourceGroup.name,
location: mainResourceGroup.location,
accountTier: "Standard",
accountReplicationType: "LRS",
});
const mainActionGroup = new azure.monitoring.ActionGroup("mainActionGroup", {
resourceGroupName: mainResourceGroup.name,
shortName: "exampleact",
webhookReceivers: [{
name: "callmyapi",
serviceUri: "http://example.com/alert",
}],
});
const example = new azure.monitoring.MetricAlert("example", {
resourceGroupName: mainResourceGroup.name,
scopes: [toMonitor.id],
description: "Action will be triggered when Transactions count is greater than 50.",
criterias: [{
metricNamespace: "Microsoft.Storage/storageAccounts",
metricName: "Transactions",
aggregation: "Total",
operator: "GreaterThan",
threshold: 50,
dimensions: [{
name: "ApiName",
operator: "Include",
values: ["*"],
}],
}],
actions: [{
actionGroupId: mainActionGroup.id,
}],
});
import pulumi
import pulumi_azure as azure
main_resource_group = azure.core.ResourceGroup("mainResourceGroup", location="West Europe")
to_monitor = azure.storage.Account("toMonitor",
resource_group_name=main_resource_group.name,
location=main_resource_group.location,
account_tier="Standard",
account_replication_type="LRS")
main_action_group = azure.monitoring.ActionGroup("mainActionGroup",
resource_group_name=main_resource_group.name,
short_name="exampleact",
webhook_receivers=[azure.monitoring.ActionGroupWebhookReceiverArgs(
name="callmyapi",
service_uri="http://example.com/alert",
)])
example = azure.monitoring.MetricAlert("example",
resource_group_name=main_resource_group.name,
scopes=[to_monitor.id],
description="Action will be triggered when Transactions count is greater than 50.",
criterias=[azure.monitoring.MetricAlertCriteriaArgs(
metric_namespace="Microsoft.Storage/storageAccounts",
metric_name="Transactions",
aggregation="Total",
operator="GreaterThan",
threshold=50,
dimensions=[azure.monitoring.MetricAlertCriteriaDimensionArgs(
name="ApiName",
operator="Include",
values=["*"],
)],
)],
actions=[azure.monitoring.MetricAlertActionArgs(
action_group_id=main_action_group.id,
)])
Example coming soon!
Create MetricAlert Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new MetricAlert(name: string, args: MetricAlertArgs, opts?: CustomResourceOptions);@overload
def MetricAlert(resource_name: str,
args: MetricAlertArgs,
opts: Optional[ResourceOptions] = None)
@overload
def MetricAlert(resource_name: str,
opts: Optional[ResourceOptions] = None,
resource_group_name: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
name: Optional[str] = None,
auto_mitigate: Optional[bool] = None,
description: Optional[str] = None,
dynamic_criteria: Optional[MetricAlertDynamicCriteriaArgs] = None,
enabled: Optional[bool] = None,
frequency: Optional[str] = None,
actions: Optional[Sequence[MetricAlertActionArgs]] = None,
criterias: Optional[Sequence[MetricAlertCriteriaArgs]] = None,
application_insights_web_test_location_availability_criteria: Optional[MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs] = None,
severity: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
target_resource_location: Optional[str] = None,
target_resource_type: Optional[str] = None,
window_size: Optional[str] = None)func NewMetricAlert(ctx *Context, name string, args MetricAlertArgs, opts ...ResourceOption) (*MetricAlert, error)public MetricAlert(string name, MetricAlertArgs args, CustomResourceOptions? opts = null)
public MetricAlert(String name, MetricAlertArgs args)
public MetricAlert(String name, MetricAlertArgs args, CustomResourceOptions options)
type: azure:monitoring:MetricAlert
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 MetricAlertArgs
- 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 MetricAlertArgs
- 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 MetricAlertArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args MetricAlertArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args MetricAlertArgs
- 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 metricAlertResource = new Azure.Monitoring.MetricAlert("metricAlertResource", new()
{
ResourceGroupName = "string",
Scopes = new[]
{
"string",
},
Name = "string",
AutoMitigate = false,
Description = "string",
DynamicCriteria = new Azure.Monitoring.Inputs.MetricAlertDynamicCriteriaArgs
{
Aggregation = "string",
AlertSensitivity = "string",
MetricName = "string",
MetricNamespace = "string",
Operator = "string",
Dimensions = new[]
{
new Azure.Monitoring.Inputs.MetricAlertDynamicCriteriaDimensionArgs
{
Name = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
},
EvaluationFailureCount = 0,
EvaluationTotalCount = 0,
IgnoreDataBefore = "string",
SkipMetricValidation = false,
},
Enabled = false,
Frequency = "string",
Actions = new[]
{
new Azure.Monitoring.Inputs.MetricAlertActionArgs
{
ActionGroupId = "string",
WebhookProperties =
{
{ "string", "string" },
},
},
},
Criterias = new[]
{
new Azure.Monitoring.Inputs.MetricAlertCriteriaArgs
{
Aggregation = "string",
MetricName = "string",
MetricNamespace = "string",
Operator = "string",
Threshold = 0,
Dimensions = new[]
{
new Azure.Monitoring.Inputs.MetricAlertCriteriaDimensionArgs
{
Name = "string",
Operator = "string",
Values = new[]
{
"string",
},
},
},
SkipMetricValidation = false,
},
},
ApplicationInsightsWebTestLocationAvailabilityCriteria = new Azure.Monitoring.Inputs.MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs
{
ComponentId = "string",
FailedLocationCount = 0,
WebTestId = "string",
},
Severity = 0,
Tags =
{
{ "string", "string" },
},
TargetResourceLocation = "string",
TargetResourceType = "string",
WindowSize = "string",
});
example, err := monitoring.NewMetricAlert(ctx, "metricAlertResource", &monitoring.MetricAlertArgs{
ResourceGroupName: pulumi.String("string"),
Scopes: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
AutoMitigate: pulumi.Bool(false),
Description: pulumi.String("string"),
DynamicCriteria: &monitoring.MetricAlertDynamicCriteriaArgs{
Aggregation: pulumi.String("string"),
AlertSensitivity: pulumi.String("string"),
MetricName: pulumi.String("string"),
MetricNamespace: pulumi.String("string"),
Operator: pulumi.String("string"),
Dimensions: monitoring.MetricAlertDynamicCriteriaDimensionArray{
&monitoring.MetricAlertDynamicCriteriaDimensionArgs{
Name: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
EvaluationFailureCount: pulumi.Int(0),
EvaluationTotalCount: pulumi.Int(0),
IgnoreDataBefore: pulumi.String("string"),
SkipMetricValidation: pulumi.Bool(false),
},
Enabled: pulumi.Bool(false),
Frequency: pulumi.String("string"),
Actions: monitoring.MetricAlertActionArray{
&monitoring.MetricAlertActionArgs{
ActionGroupId: pulumi.String("string"),
WebhookProperties: pulumi.StringMap{
"string": pulumi.String("string"),
},
},
},
Criterias: monitoring.MetricAlertCriteriaArray{
&monitoring.MetricAlertCriteriaArgs{
Aggregation: pulumi.String("string"),
MetricName: pulumi.String("string"),
MetricNamespace: pulumi.String("string"),
Operator: pulumi.String("string"),
Threshold: pulumi.Float64(0),
Dimensions: monitoring.MetricAlertCriteriaDimensionArray{
&monitoring.MetricAlertCriteriaDimensionArgs{
Name: pulumi.String("string"),
Operator: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
SkipMetricValidation: pulumi.Bool(false),
},
},
ApplicationInsightsWebTestLocationAvailabilityCriteria: &monitoring.MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs{
ComponentId: pulumi.String("string"),
FailedLocationCount: pulumi.Int(0),
WebTestId: pulumi.String("string"),
},
Severity: pulumi.Int(0),
Tags: pulumi.StringMap{
"string": pulumi.String("string"),
},
TargetResourceLocation: pulumi.String("string"),
TargetResourceType: pulumi.String("string"),
WindowSize: pulumi.String("string"),
})
var metricAlertResource = new MetricAlert("metricAlertResource", MetricAlertArgs.builder()
.resourceGroupName("string")
.scopes("string")
.name("string")
.autoMitigate(false)
.description("string")
.dynamicCriteria(MetricAlertDynamicCriteriaArgs.builder()
.aggregation("string")
.alertSensitivity("string")
.metricName("string")
.metricNamespace("string")
.operator("string")
.dimensions(MetricAlertDynamicCriteriaDimensionArgs.builder()
.name("string")
.operator("string")
.values("string")
.build())
.evaluationFailureCount(0)
.evaluationTotalCount(0)
.ignoreDataBefore("string")
.skipMetricValidation(false)
.build())
.enabled(false)
.frequency("string")
.actions(MetricAlertActionArgs.builder()
.actionGroupId("string")
.webhookProperties(Map.of("string", "string"))
.build())
.criterias(MetricAlertCriteriaArgs.builder()
.aggregation("string")
.metricName("string")
.metricNamespace("string")
.operator("string")
.threshold(0.0)
.dimensions(MetricAlertCriteriaDimensionArgs.builder()
.name("string")
.operator("string")
.values("string")
.build())
.skipMetricValidation(false)
.build())
.applicationInsightsWebTestLocationAvailabilityCriteria(MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs.builder()
.componentId("string")
.failedLocationCount(0)
.webTestId("string")
.build())
.severity(0)
.tags(Map.of("string", "string"))
.targetResourceLocation("string")
.targetResourceType("string")
.windowSize("string")
.build());
metric_alert_resource = azure.monitoring.MetricAlert("metricAlertResource",
resource_group_name="string",
scopes=["string"],
name="string",
auto_mitigate=False,
description="string",
dynamic_criteria={
"aggregation": "string",
"alert_sensitivity": "string",
"metric_name": "string",
"metric_namespace": "string",
"operator": "string",
"dimensions": [{
"name": "string",
"operator": "string",
"values": ["string"],
}],
"evaluation_failure_count": 0,
"evaluation_total_count": 0,
"ignore_data_before": "string",
"skip_metric_validation": False,
},
enabled=False,
frequency="string",
actions=[{
"action_group_id": "string",
"webhook_properties": {
"string": "string",
},
}],
criterias=[{
"aggregation": "string",
"metric_name": "string",
"metric_namespace": "string",
"operator": "string",
"threshold": 0,
"dimensions": [{
"name": "string",
"operator": "string",
"values": ["string"],
}],
"skip_metric_validation": False,
}],
application_insights_web_test_location_availability_criteria={
"component_id": "string",
"failed_location_count": 0,
"web_test_id": "string",
},
severity=0,
tags={
"string": "string",
},
target_resource_location="string",
target_resource_type="string",
window_size="string")
const metricAlertResource = new azure.monitoring.MetricAlert("metricAlertResource", {
resourceGroupName: "string",
scopes: ["string"],
name: "string",
autoMitigate: false,
description: "string",
dynamicCriteria: {
aggregation: "string",
alertSensitivity: "string",
metricName: "string",
metricNamespace: "string",
operator: "string",
dimensions: [{
name: "string",
operator: "string",
values: ["string"],
}],
evaluationFailureCount: 0,
evaluationTotalCount: 0,
ignoreDataBefore: "string",
skipMetricValidation: false,
},
enabled: false,
frequency: "string",
actions: [{
actionGroupId: "string",
webhookProperties: {
string: "string",
},
}],
criterias: [{
aggregation: "string",
metricName: "string",
metricNamespace: "string",
operator: "string",
threshold: 0,
dimensions: [{
name: "string",
operator: "string",
values: ["string"],
}],
skipMetricValidation: false,
}],
applicationInsightsWebTestLocationAvailabilityCriteria: {
componentId: "string",
failedLocationCount: 0,
webTestId: "string",
},
severity: 0,
tags: {
string: "string",
},
targetResourceLocation: "string",
targetResourceType: "string",
windowSize: "string",
});
type: azure:monitoring:MetricAlert
properties:
actions:
- actionGroupId: string
webhookProperties:
string: string
applicationInsightsWebTestLocationAvailabilityCriteria:
componentId: string
failedLocationCount: 0
webTestId: string
autoMitigate: false
criterias:
- aggregation: string
dimensions:
- name: string
operator: string
values:
- string
metricName: string
metricNamespace: string
operator: string
skipMetricValidation: false
threshold: 0
description: string
dynamicCriteria:
aggregation: string
alertSensitivity: string
dimensions:
- name: string
operator: string
values:
- string
evaluationFailureCount: 0
evaluationTotalCount: 0
ignoreDataBefore: string
metricName: string
metricNamespace: string
operator: string
skipMetricValidation: false
enabled: false
frequency: string
name: string
resourceGroupName: string
scopes:
- string
severity: 0
tags:
string: string
targetResourceLocation: string
targetResourceType: string
windowSize: string
MetricAlert 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 MetricAlert resource accepts the following input properties:
- Resource
Group stringName - The name of the resource group in which to create the Metric Alert instance.
- Scopes List<string>
- A set of strings of resource IDs at which the metric criteria should be applied.
- Actions
List<Metric
Alert Action> - One or more
actionblocks as defined below. -
Metric
Alert Application Insights Web Test Location Availability Criteria - A
application_insights_web_test_location_availability_criteriablock as defined below. - Auto
Mitigate bool - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - Criterias
List<Metric
Alert Criteria> - One or more (static)
criteriablocks as defined below. - Description string
- The description of this Metric Alert.
- Dynamic
Criteria MetricAlert Dynamic Criteria - A
dynamic_criteriablock as defined below. - Enabled bool
- Should this Metric Alert be enabled? Defaults to
true. - Frequency string
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - Name string
- The name of the Metric Alert. Changing this forces a new resource to be created.
- Severity int
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Target
Resource stringLocation - The location of the target resource.
- Target
Resource stringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - Window
Size string - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- Resource
Group stringName - The name of the resource group in which to create the Metric Alert instance.
- Scopes []string
- A set of strings of resource IDs at which the metric criteria should be applied.
- Actions
[]Metric
Alert Action Args - One or more
actionblocks as defined below. -
Metric
Alert Application Insights Web Test Location Availability Criteria Args - A
application_insights_web_test_location_availability_criteriablock as defined below. - Auto
Mitigate bool - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - Criterias
[]Metric
Alert Criteria Args - One or more (static)
criteriablocks as defined below. - Description string
- The description of this Metric Alert.
- Dynamic
Criteria MetricAlert Dynamic Criteria Args - A
dynamic_criteriablock as defined below. - Enabled bool
- Should this Metric Alert be enabled? Defaults to
true. - Frequency string
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - Name string
- The name of the Metric Alert. Changing this forces a new resource to be created.
- Severity int
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - map[string]string
- A mapping of tags to assign to the resource.
- Target
Resource stringLocation - The location of the target resource.
- Target
Resource stringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - Window
Size string - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- resource
Group StringName - The name of the resource group in which to create the Metric Alert instance.
- scopes List<String>
- A set of strings of resource IDs at which the metric criteria should be applied.
- actions
List<Metric
Alert Action> - One or more
actionblocks as defined below. -
Metric
Alert Application Insights Web Test Location Availability Criteria - A
application_insights_web_test_location_availability_criteriablock as defined below. - auto
Mitigate Boolean - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - criterias
List<Metric
Alert Criteria> - One or more (static)
criteriablocks as defined below. - description String
- The description of this Metric Alert.
- dynamic
Criteria MetricAlert Dynamic Criteria - A
dynamic_criteriablock as defined below. - enabled Boolean
- Should this Metric Alert be enabled? Defaults to
true. - frequency String
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - name String
- The name of the Metric Alert. Changing this forces a new resource to be created.
- severity Integer
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - Map<String,String>
- A mapping of tags to assign to the resource.
- target
Resource StringLocation - The location of the target resource.
- target
Resource StringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - window
Size String - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- resource
Group stringName - The name of the resource group in which to create the Metric Alert instance.
- scopes string[]
- A set of strings of resource IDs at which the metric criteria should be applied.
- actions
Metric
Alert Action[] - One or more
actionblocks as defined below. -
Metric
Alert Application Insights Web Test Location Availability Criteria - A
application_insights_web_test_location_availability_criteriablock as defined below. - auto
Mitigate boolean - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - criterias
Metric
Alert Criteria[] - One or more (static)
criteriablocks as defined below. - description string
- The description of this Metric Alert.
- dynamic
Criteria MetricAlert Dynamic Criteria - A
dynamic_criteriablock as defined below. - enabled boolean
- Should this Metric Alert be enabled? Defaults to
true. - frequency string
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - name string
- The name of the Metric Alert. Changing this forces a new resource to be created.
- severity number
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- target
Resource stringLocation - The location of the target resource.
- target
Resource stringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - window
Size string - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- resource_
group_ strname - The name of the resource group in which to create the Metric Alert instance.
- scopes Sequence[str]
- A set of strings of resource IDs at which the metric criteria should be applied.
- actions
Sequence[Metric
Alert Action Args] - One or more
actionblocks as defined below. - application_
insights_ Metricweb_ test_ location_ availability_ criteria Alert Application Insights Web Test Location Availability Criteria Args - A
application_insights_web_test_location_availability_criteriablock as defined below. - auto_
mitigate bool - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - criterias
Sequence[Metric
Alert Criteria Args] - One or more (static)
criteriablocks as defined below. - description str
- The description of this Metric Alert.
- dynamic_
criteria MetricAlert Dynamic Criteria Args - A
dynamic_criteriablock as defined below. - enabled bool
- Should this Metric Alert be enabled? Defaults to
true. - frequency str
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - name str
- The name of the Metric Alert. Changing this forces a new resource to be created.
- severity int
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- target_
resource_ strlocation - The location of the target resource.
- target_
resource_ strtype - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - window_
size str - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- resource
Group StringName - The name of the resource group in which to create the Metric Alert instance.
- scopes List<String>
- A set of strings of resource IDs at which the metric criteria should be applied.
- actions List<Property Map>
- One or more
actionblocks as defined below. - Property Map
- A
application_insights_web_test_location_availability_criteriablock as defined below. - auto
Mitigate Boolean - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - criterias List<Property Map>
- One or more (static)
criteriablocks as defined below. - description String
- The description of this Metric Alert.
- dynamic
Criteria Property Map - A
dynamic_criteriablock as defined below. - enabled Boolean
- Should this Metric Alert be enabled? Defaults to
true. - frequency String
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - name String
- The name of the Metric Alert. Changing this forces a new resource to be created.
- severity Number
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - Map<String>
- A mapping of tags to assign to the resource.
- target
Resource StringLocation - The location of the target resource.
- target
Resource StringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - window
Size String - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
Outputs
All input properties are implicitly available as output properties. Additionally, the MetricAlert 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 MetricAlert Resource
Get an existing MetricAlert 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?: MetricAlertState, opts?: CustomResourceOptions): MetricAlert@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
actions: Optional[Sequence[MetricAlertActionArgs]] = None,
application_insights_web_test_location_availability_criteria: Optional[MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs] = None,
auto_mitigate: Optional[bool] = None,
criterias: Optional[Sequence[MetricAlertCriteriaArgs]] = None,
description: Optional[str] = None,
dynamic_criteria: Optional[MetricAlertDynamicCriteriaArgs] = None,
enabled: Optional[bool] = None,
frequency: Optional[str] = None,
name: Optional[str] = None,
resource_group_name: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
severity: Optional[int] = None,
tags: Optional[Mapping[str, str]] = None,
target_resource_location: Optional[str] = None,
target_resource_type: Optional[str] = None,
window_size: Optional[str] = None) -> MetricAlertfunc GetMetricAlert(ctx *Context, name string, id IDInput, state *MetricAlertState, opts ...ResourceOption) (*MetricAlert, error)public static MetricAlert Get(string name, Input<string> id, MetricAlertState? state, CustomResourceOptions? opts = null)public static MetricAlert get(String name, Output<String> id, MetricAlertState state, CustomResourceOptions options)resources: _: type: azure:monitoring:MetricAlert get: id: ${id}- 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.
- Actions
List<Metric
Alert Action> - One or more
actionblocks as defined below. -
Metric
Alert Application Insights Web Test Location Availability Criteria - A
application_insights_web_test_location_availability_criteriablock as defined below. - Auto
Mitigate bool - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - Criterias
List<Metric
Alert Criteria> - One or more (static)
criteriablocks as defined below. - Description string
- The description of this Metric Alert.
- Dynamic
Criteria MetricAlert Dynamic Criteria - A
dynamic_criteriablock as defined below. - Enabled bool
- Should this Metric Alert be enabled? Defaults to
true. - Frequency string
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - Name string
- The name of the Metric Alert. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Metric Alert instance.
- Scopes List<string>
- A set of strings of resource IDs at which the metric criteria should be applied.
- Severity int
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - Dictionary<string, string>
- A mapping of tags to assign to the resource.
- Target
Resource stringLocation - The location of the target resource.
- Target
Resource stringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - Window
Size string - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- Actions
[]Metric
Alert Action Args - One or more
actionblocks as defined below. -
Metric
Alert Application Insights Web Test Location Availability Criteria Args - A
application_insights_web_test_location_availability_criteriablock as defined below. - Auto
Mitigate bool - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - Criterias
[]Metric
Alert Criteria Args - One or more (static)
criteriablocks as defined below. - Description string
- The description of this Metric Alert.
- Dynamic
Criteria MetricAlert Dynamic Criteria Args - A
dynamic_criteriablock as defined below. - Enabled bool
- Should this Metric Alert be enabled? Defaults to
true. - Frequency string
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - Name string
- The name of the Metric Alert. Changing this forces a new resource to be created.
- Resource
Group stringName - The name of the resource group in which to create the Metric Alert instance.
- Scopes []string
- A set of strings of resource IDs at which the metric criteria should be applied.
- Severity int
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - map[string]string
- A mapping of tags to assign to the resource.
- Target
Resource stringLocation - The location of the target resource.
- Target
Resource stringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - Window
Size string - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- actions
List<Metric
Alert Action> - One or more
actionblocks as defined below. -
Metric
Alert Application Insights Web Test Location Availability Criteria - A
application_insights_web_test_location_availability_criteriablock as defined below. - auto
Mitigate Boolean - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - criterias
List<Metric
Alert Criteria> - One or more (static)
criteriablocks as defined below. - description String
- The description of this Metric Alert.
- dynamic
Criteria MetricAlert Dynamic Criteria - A
dynamic_criteriablock as defined below. - enabled Boolean
- Should this Metric Alert be enabled? Defaults to
true. - frequency String
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - name String
- The name of the Metric Alert. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Metric Alert instance.
- scopes List<String>
- A set of strings of resource IDs at which the metric criteria should be applied.
- severity Integer
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - Map<String,String>
- A mapping of tags to assign to the resource.
- target
Resource StringLocation - The location of the target resource.
- target
Resource StringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - window
Size String - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- actions
Metric
Alert Action[] - One or more
actionblocks as defined below. -
Metric
Alert Application Insights Web Test Location Availability Criteria - A
application_insights_web_test_location_availability_criteriablock as defined below. - auto
Mitigate boolean - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - criterias
Metric
Alert Criteria[] - One or more (static)
criteriablocks as defined below. - description string
- The description of this Metric Alert.
- dynamic
Criteria MetricAlert Dynamic Criteria - A
dynamic_criteriablock as defined below. - enabled boolean
- Should this Metric Alert be enabled? Defaults to
true. - frequency string
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - name string
- The name of the Metric Alert. Changing this forces a new resource to be created.
- resource
Group stringName - The name of the resource group in which to create the Metric Alert instance.
- scopes string[]
- A set of strings of resource IDs at which the metric criteria should be applied.
- severity number
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - {[key: string]: string}
- A mapping of tags to assign to the resource.
- target
Resource stringLocation - The location of the target resource.
- target
Resource stringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - window
Size string - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- actions
Sequence[Metric
Alert Action Args] - One or more
actionblocks as defined below. - application_
insights_ Metricweb_ test_ location_ availability_ criteria Alert Application Insights Web Test Location Availability Criteria Args - A
application_insights_web_test_location_availability_criteriablock as defined below. - auto_
mitigate bool - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - criterias
Sequence[Metric
Alert Criteria Args] - One or more (static)
criteriablocks as defined below. - description str
- The description of this Metric Alert.
- dynamic_
criteria MetricAlert Dynamic Criteria Args - A
dynamic_criteriablock as defined below. - enabled bool
- Should this Metric Alert be enabled? Defaults to
true. - frequency str
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - name str
- The name of the Metric Alert. Changing this forces a new resource to be created.
- resource_
group_ strname - The name of the resource group in which to create the Metric Alert instance.
- scopes Sequence[str]
- A set of strings of resource IDs at which the metric criteria should be applied.
- severity int
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - Mapping[str, str]
- A mapping of tags to assign to the resource.
- target_
resource_ strlocation - The location of the target resource.
- target_
resource_ strtype - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - window_
size str - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
- actions List<Property Map>
- One or more
actionblocks as defined below. - Property Map
- A
application_insights_web_test_location_availability_criteriablock as defined below. - auto
Mitigate Boolean - Should the alerts in this Metric Alert be auto resolved? Defaults to
true. - criterias List<Property Map>
- One or more (static)
criteriablocks as defined below. - description String
- The description of this Metric Alert.
- dynamic
Criteria Property Map - A
dynamic_criteriablock as defined below. - enabled Boolean
- Should this Metric Alert be enabled? Defaults to
true. - frequency String
- The evaluation frequency of this Metric Alert, represented in ISO 8601 duration format. Possible values are
PT1M,PT5M,PT15M,PT30MandPT1H. Defaults toPT1M. - name String
- The name of the Metric Alert. Changing this forces a new resource to be created.
- resource
Group StringName - The name of the resource group in which to create the Metric Alert instance.
- scopes List<String>
- A set of strings of resource IDs at which the metric criteria should be applied.
- severity Number
- The severity of this Metric Alert. Possible values are
0,1,2,3and4. Defaults to3. - Map<String>
- A mapping of tags to assign to the resource.
- target
Resource StringLocation - The location of the target resource.
- target
Resource StringType - The resource type (e.g.
Microsoft.Compute/virtualMachines) of the target resource. - window
Size String - The period of time that is used to monitor alert activity, represented in ISO 8601 duration format. This value must be greater than
frequency. Possible values arePT1M,PT5M,PT15M,PT30M,PT1H,PT6H,PT12HandP1D. Defaults toPT5M.
Supporting Types
MetricAlertAction, MetricAlertActionArgs
- Action
Group stringId - The ID of the Action Group can be sourced from the
azure.monitoring.ActionGroupresource - Webhook
Properties Dictionary<string, string> - The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
- Action
Group stringId - The ID of the Action Group can be sourced from the
azure.monitoring.ActionGroupresource - Webhook
Properties map[string]string - The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
- action
Group StringId - The ID of the Action Group can be sourced from the
azure.monitoring.ActionGroupresource - webhook
Properties Map<String,String> - The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
- action
Group stringId - The ID of the Action Group can be sourced from the
azure.monitoring.ActionGroupresource - webhook
Properties {[key: string]: string} - The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
- action_
group_ strid - The ID of the Action Group can be sourced from the
azure.monitoring.ActionGroupresource - webhook_
properties Mapping[str, str] - The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
- action
Group StringId - The ID of the Action Group can be sourced from the
azure.monitoring.ActionGroupresource - webhook
Properties Map<String> - The map of custom string properties to include with the post operation. These data are appended to the webhook payload.
MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteria, MetricAlertApplicationInsightsWebTestLocationAvailabilityCriteriaArgs
- Component
Id string - The ID of the Application Insights Resource.
- Failed
Location intCount - The number of failed locations.
- Web
Test stringId - The ID of the Application Insights Web Test.
- Component
Id string - The ID of the Application Insights Resource.
- Failed
Location intCount - The number of failed locations.
- Web
Test stringId - The ID of the Application Insights Web Test.
- component
Id String - The ID of the Application Insights Resource.
- failed
Location IntegerCount - The number of failed locations.
- web
Test StringId - The ID of the Application Insights Web Test.
- component
Id string - The ID of the Application Insights Resource.
- failed
Location numberCount - The number of failed locations.
- web
Test stringId - The ID of the Application Insights Web Test.
- component_
id str - The ID of the Application Insights Resource.
- failed_
location_ intcount - The number of failed locations.
- web_
test_ strid - The ID of the Application Insights Web Test.
- component
Id String - The ID of the Application Insights Resource.
- failed
Location NumberCount - The number of failed locations.
- web
Test StringId - The ID of the Application Insights Web Test.
MetricAlertCriteria, MetricAlertCriteriaArgs
- Aggregation string
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - Metric
Name string - One of the metric names to be monitored.
- Metric
Namespace string - One of the metric namespaces to be monitored.
- Operator string
- The criteria operator. Possible values are
Equals,NotEquals,GreaterThan,GreaterThanOrEqual,LessThanandLessThanOrEqual. - Threshold double
- The criteria threshold value that activates the alert.
- Dimensions
List<Metric
Alert Criteria Dimension> - One or more
dimensionblocks as defined below. - Skip
Metric boolValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- Aggregation string
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - Metric
Name string - One of the metric names to be monitored.
- Metric
Namespace string - One of the metric namespaces to be monitored.
- Operator string
- The criteria operator. Possible values are
Equals,NotEquals,GreaterThan,GreaterThanOrEqual,LessThanandLessThanOrEqual. - Threshold float64
- The criteria threshold value that activates the alert.
- Dimensions
[]Metric
Alert Criteria Dimension - One or more
dimensionblocks as defined below. - Skip
Metric boolValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- aggregation String
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - metric
Name String - One of the metric names to be monitored.
- metric
Namespace String - One of the metric namespaces to be monitored.
- operator String
- The criteria operator. Possible values are
Equals,NotEquals,GreaterThan,GreaterThanOrEqual,LessThanandLessThanOrEqual. - threshold Double
- The criteria threshold value that activates the alert.
- dimensions
List<Metric
Alert Criteria Dimension> - One or more
dimensionblocks as defined below. - skip
Metric BooleanValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- aggregation string
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - metric
Name string - One of the metric names to be monitored.
- metric
Namespace string - One of the metric namespaces to be monitored.
- operator string
- The criteria operator. Possible values are
Equals,NotEquals,GreaterThan,GreaterThanOrEqual,LessThanandLessThanOrEqual. - threshold number
- The criteria threshold value that activates the alert.
- dimensions
Metric
Alert Criteria Dimension[] - One or more
dimensionblocks as defined below. - skip
Metric booleanValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- aggregation str
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - metric_
name str - One of the metric names to be monitored.
- metric_
namespace str - One of the metric namespaces to be monitored.
- operator str
- The criteria operator. Possible values are
Equals,NotEquals,GreaterThan,GreaterThanOrEqual,LessThanandLessThanOrEqual. - threshold float
- The criteria threshold value that activates the alert.
- dimensions
Sequence[Metric
Alert Criteria Dimension] - One or more
dimensionblocks as defined below. - skip_
metric_ boolvalidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- aggregation String
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - metric
Name String - One of the metric names to be monitored.
- metric
Namespace String - One of the metric namespaces to be monitored.
- operator String
- The criteria operator. Possible values are
Equals,NotEquals,GreaterThan,GreaterThanOrEqual,LessThanandLessThanOrEqual. - threshold Number
- The criteria threshold value that activates the alert.
- dimensions List<Property Map>
- One or more
dimensionblocks as defined below. - skip
Metric BooleanValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
MetricAlertCriteriaDimension, MetricAlertCriteriaDimensionArgs
MetricAlertDynamicCriteria, MetricAlertDynamicCriteriaArgs
- Aggregation string
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - Alert
Sensitivity string - The extent of deviation required to trigger an alert. Possible values are
Low,MediumandHigh. - Metric
Name string - One of the metric names to be monitored.
- Metric
Namespace string - One of the metric namespaces to be monitored.
- Operator string
- The criteria operator. Possible values are
LessThan,GreaterThanandGreaterOrLessThan. - Dimensions
List<Metric
Alert Dynamic Criteria Dimension> - One or more
dimensionblocks as defined below. - Evaluation
Failure intCount - The number of violations to trigger an alert. Should be smaller or equal to
evaluation_total_count. - Evaluation
Total intCount - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (
window_size) and the selected number of aggregated points. - Ignore
Data stringBefore - The ISO8601 date from which to start learning the metric historical data and calculate the dynamic thresholds.
- Skip
Metric boolValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- Aggregation string
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - Alert
Sensitivity string - The extent of deviation required to trigger an alert. Possible values are
Low,MediumandHigh. - Metric
Name string - One of the metric names to be monitored.
- Metric
Namespace string - One of the metric namespaces to be monitored.
- Operator string
- The criteria operator. Possible values are
LessThan,GreaterThanandGreaterOrLessThan. - Dimensions
[]Metric
Alert Dynamic Criteria Dimension - One or more
dimensionblocks as defined below. - Evaluation
Failure intCount - The number of violations to trigger an alert. Should be smaller or equal to
evaluation_total_count. - Evaluation
Total intCount - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (
window_size) and the selected number of aggregated points. - Ignore
Data stringBefore - The ISO8601 date from which to start learning the metric historical data and calculate the dynamic thresholds.
- Skip
Metric boolValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- aggregation String
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - alert
Sensitivity String - The extent of deviation required to trigger an alert. Possible values are
Low,MediumandHigh. - metric
Name String - One of the metric names to be monitored.
- metric
Namespace String - One of the metric namespaces to be monitored.
- operator String
- The criteria operator. Possible values are
LessThan,GreaterThanandGreaterOrLessThan. - dimensions
List<Metric
Alert Dynamic Criteria Dimension> - One or more
dimensionblocks as defined below. - evaluation
Failure IntegerCount - The number of violations to trigger an alert. Should be smaller or equal to
evaluation_total_count. - evaluation
Total IntegerCount - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (
window_size) and the selected number of aggregated points. - ignore
Data StringBefore - The ISO8601 date from which to start learning the metric historical data and calculate the dynamic thresholds.
- skip
Metric BooleanValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- aggregation string
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - alert
Sensitivity string - The extent of deviation required to trigger an alert. Possible values are
Low,MediumandHigh. - metric
Name string - One of the metric names to be monitored.
- metric
Namespace string - One of the metric namespaces to be monitored.
- operator string
- The criteria operator. Possible values are
LessThan,GreaterThanandGreaterOrLessThan. - dimensions
Metric
Alert Dynamic Criteria Dimension[] - One or more
dimensionblocks as defined below. - evaluation
Failure numberCount - The number of violations to trigger an alert. Should be smaller or equal to
evaluation_total_count. - evaluation
Total numberCount - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (
window_size) and the selected number of aggregated points. - ignore
Data stringBefore - The ISO8601 date from which to start learning the metric historical data and calculate the dynamic thresholds.
- skip
Metric booleanValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- aggregation str
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - alert_
sensitivity str - The extent of deviation required to trigger an alert. Possible values are
Low,MediumandHigh. - metric_
name str - One of the metric names to be monitored.
- metric_
namespace str - One of the metric namespaces to be monitored.
- operator str
- The criteria operator. Possible values are
LessThan,GreaterThanandGreaterOrLessThan. - dimensions
Sequence[Metric
Alert Dynamic Criteria Dimension] - One or more
dimensionblocks as defined below. - evaluation_
failure_ intcount - The number of violations to trigger an alert. Should be smaller or equal to
evaluation_total_count. - evaluation_
total_ intcount - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (
window_size) and the selected number of aggregated points. - ignore_
data_ strbefore - The ISO8601 date from which to start learning the metric historical data and calculate the dynamic thresholds.
- skip_
metric_ boolvalidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
- aggregation String
- The statistic that runs over the metric values. Possible values are
Average,Count,Minimum,MaximumandTotal. - alert
Sensitivity String - The extent of deviation required to trigger an alert. Possible values are
Low,MediumandHigh. - metric
Name String - One of the metric names to be monitored.
- metric
Namespace String - One of the metric namespaces to be monitored.
- operator String
- The criteria operator. Possible values are
LessThan,GreaterThanandGreaterOrLessThan. - dimensions List<Property Map>
- One or more
dimensionblocks as defined below. - evaluation
Failure NumberCount - The number of violations to trigger an alert. Should be smaller or equal to
evaluation_total_count. - evaluation
Total NumberCount - The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (
window_size) and the selected number of aggregated points. - ignore
Data StringBefore - The ISO8601 date from which to start learning the metric historical data and calculate the dynamic thresholds.
- skip
Metric BooleanValidation - Skip the metric validation to allow creating an alert rule on a custom metric that isn't yet emitted? Defaults to
false.
MetricAlertDynamicCriteriaDimension, MetricAlertDynamicCriteriaDimensionArgs
Import
Metric Alerts can be imported using the resource id, e.g.
$ pulumi import azure:monitoring/metricAlert:MetricAlert main /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/example-resources/providers/Microsoft.Insights/metricAlerts/example-metricalert
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
azurermTerraform Provider.
We recommend using Azure Native.
published on Monday, Mar 9, 2026 by Pulumi
