Microsoft.AlertsManagement (preview:2025-05-01)

2025/05/21 • 1 new methods

PreviewAlertRule (new)
Description Retrieves the results of a simulated historical execution of an alert rule
Reference Link ¶

⚼ Request

POST:  /subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/previewAlertRule
{
subscriptionId: string ,
api-version: string ,
parameters:
{
location: string ,
properties:
{
lookbackPeriod: string ,
scheduledQueryRuleProperties:
{
tags: object ,
location: string ,
kind: enum ,
properties:
{
description: string ,
displayName: string ,
severity: integer ,
enabled: boolean ,
scopes:
[
string ,
]
,
evaluationFrequency: string ,
windowSize: string ,
overrideQueryTimeRange: string ,
targetResourceTypes:
[
string ,
]
,
criteria:
{
allOf:
[
{
criterionType: enum ,
query: string ,
timeAggregation: enum ,
metricMeasureColumn: string ,
resourceIdColumn: string ,
dimensions:
[
{
name: string ,
operator: enum ,
values:
[
string ,
]
,
}
,
]
,
operator: enum ,
threshold: number ,
alertSensitivity: string ,
ignoreDataBefore: string ,
failingPeriods:
{
numberOfEvaluationPeriods: integer ,
minFailingPeriodsToAlert: integer ,
}
,
metricName: string ,
}
,
]
,
}
,
muteActionsDuration: string ,
autoMitigate: boolean ,
resolveConfiguration:
{
autoResolved: boolean ,
timeToResolve: string ,
}
,
}
,
}
,
}
,
}
,
}

⚐ Response (200)

{
rulePreviewResults:
[
{
dimensionCombination:
[
{
name: string ,
value: string ,
}
,
]
,
evaluations:
[
{
evaluationTime: string ,
alertState: enum ,
evaluatedPeriods:
[
{
timestamp: string ,
highThreshold: number ,
lowThreshold: number ,
metricValue: number ,
thresholdMet: boolean ,
}
,
]
,
thresholdMet: boolean ,
}
,
]
,
}
,
]
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
additionalInfo:
[
{
type: string ,
info: object ,
}
,
]
,
}
,
}