From 6556222ebaa2c43e513a2ae86f98e1107e6cdeee Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Thu, 28 May 2026 19:32:20 +0300 Subject: [PATCH 01/23] Add Metric Alerts Query GA 2026-06-01 swagger [metric-alerts-query-ga-swagger] --- .../2026-06-01/UpdateMetricAlert.json | 95 + ...ateDynamicMetricAlertMultipleResource.json | 112 ++ ...pdateDynamicMetricAlertSingleResource.json | 110 ++ ...teOrUpdateMetricAlertMultipleResource.json | 104 ++ .../createOrUpdateMetricAlertQuery.json | 120 ++ .../createOrUpdateMetricAlertQueryDT.json | 126 ++ ...OrUpdateMetricAlertQueryMultiResource.json | 120 ++ ...UpdateMetricAlertQueryResourceCentric.json | 120 ++ ...reateOrUpdateMetricAlertResourceGroup.json | 104 ++ ...eateOrUpdateMetricAlertSingleResource.json | 96 + ...createOrUpdateMetricAlertSubscription.json | 102 ++ ...eateOrUpdateMetricAlertWithDimensions.json | 130 ++ .../createOrUpdateWebTestMetricAlert.json | 69 + .../2026-06-01/deleteMetricAlert.json | 15 + ...getDynamicMetricAlertMultipleResource.json | 66 + .../getDynamicMetricAlertSingleResource.json | 64 + .../getMetricAlertMultipleResource.json | 62 + .../2026-06-01/getMetricAlertQuery.json | 66 + .../getMetricAlertResourceGroup.json | 62 + .../getMetricAlertSingleResource.json | 58 + .../2026-06-01/getMetricAlertStatus.json | 32 + .../getMetricAlertStatusByName.json | 33 + .../getMetricAlertSubscription.json | 61 + .../2026-06-01/getWebTestMetricAlert.json | 44 + .../listByResourceGroupMetricAlert.json | 101 ++ .../examples/2026-06-01/listMetricAlert.json | 101 ++ .../Insights/MetricAlertApi/main.tsp | 5 + .../Microsoft.Insights/Insights/readme.md | 2 +- .../examples/UpdateMetricAlert.json | 95 + ...ateDynamicMetricAlertMultipleResource.json | 112 ++ ...pdateDynamicMetricAlertSingleResource.json | 110 ++ ...teOrUpdateMetricAlertMultipleResource.json | 104 ++ .../createOrUpdateMetricAlertQuery.json | 120 ++ .../createOrUpdateMetricAlertQueryDT.json | 126 ++ ...OrUpdateMetricAlertQueryMultiResource.json | 120 ++ ...UpdateMetricAlertQueryResourceCentric.json | 120 ++ ...reateOrUpdateMetricAlertResourceGroup.json | 104 ++ ...eateOrUpdateMetricAlertSingleResource.json | 96 + ...createOrUpdateMetricAlertSubscription.json | 102 ++ ...eateOrUpdateMetricAlertWithDimensions.json | 130 ++ .../createOrUpdateWebTestMetricAlert.json | 69 + .../examples/deleteMetricAlert.json | 15 + ...getDynamicMetricAlertMultipleResource.json | 66 + .../getDynamicMetricAlertSingleResource.json | 64 + .../getMetricAlertMultipleResource.json | 62 + .../examples/getMetricAlertQuery.json | 66 + .../examples/getMetricAlertResourceGroup.json | 62 + .../getMetricAlertSingleResource.json | 58 + .../examples/getMetricAlertStatus.json | 32 + .../examples/getMetricAlertStatusByName.json | 33 + .../examples/getMetricAlertSubscription.json | 61 + .../examples/getWebTestMetricAlert.json | 44 + .../listByResourceGroupMetricAlert.json | 101 ++ .../2026-06-01/examples/listMetricAlert.json | 101 ++ .../stable/2026-06-01/metricAlert.json | 1551 +++++++++++++++++ 55 files changed, 5903 insertions(+), 1 deletion(-) create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/UpdateMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQuery.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryDT.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryMultiResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryResourceCentric.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertResourceGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertWithDimensions.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateWebTestMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/deleteMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertQuery.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertResourceGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatus.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatusByName.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSubscription.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getWebTestMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listByResourceGroupMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/UpdateMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQuery.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryDT.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryMultiResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertResourceGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertWithDimensions.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateWebTestMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/deleteMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertQuery.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertResourceGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatus.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatusByName.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSubscription.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getWebTestMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listByResourceGroupMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/UpdateMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/UpdateMetricAlert.json new file mode 100644 index 000000000000..7be758f4ba45 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/UpdateMetricAlert.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Update", + "title": "Create or update an alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertMultipleResource.json new file mode 100644 index 000000000000..a6463b59b6ea --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a dynamic alert rule for Multiple Resources" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertSingleResource.json new file mode 100644 index 000000000000..507b86a76b5a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertSingleResource.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a dynamic alert rule for Single Resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertMultipleResource.json new file mode 100644 index 000000000000..1900aec938a0 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertMultipleResource.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule for Multiple Resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQuery.json new file mode 100644 index 000000000000..fb4dcfcd251a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQuery.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a query based alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryDT.json new file mode 100644 index 000000000000..be0578c59056 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryDT.json @@ -0,0 +1,126 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a query based alert rule with dynamic threshold" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryMultiResource.json new file mode 100644 index 000000000000..e6587b7cd1db --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryMultiResource.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a resource centric query based alert rule for Multiple Resources" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryResourceCentric.json new file mode 100644 index 000000000000..e76293fff641 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryResourceCentric.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a resource centric query based alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertResourceGroup.json new file mode 100644 index 000000000000..62dce464537c --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertResourceGroup.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest1", + "ruleName": "MetricAlertAtResourceGroupLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule on Resource group(s)" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSingleResource.json new file mode 100644 index 000000000000..f3061d492fa9 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSingleResource.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule for Single Resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json new file mode 100644 index 000000000000..56078bebf3bc --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertAtSubscriptionLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule on Subscription " +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertWithDimensions.json new file mode 100644 index 000000000000..b4398cf2140f --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertWithDimensions.json @@ -0,0 +1,130 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "windowSize": "P1D" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleDimensions", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.KeyVault/vaults", + "windowSize": "P1D" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rules with dimensions" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateWebTestMetricAlert.json new file mode 100644 index 000000000000..296f86ff8012 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateWebTestMetricAlert.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"component-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example": "Resource" + } + }, + "resourceGroupName": "rg-example", + "ruleName": "webtest-name-example", + "subscriptionId": "12345678-1234-1234-1234-123456789101" + }, + "responses": { + "200": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a web test alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/deleteMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/deleteMetricAlert.json new file mode 100644 index 000000000000..a3bbdbb40d30 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/deleteMetricAlert.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "MetricAlerts_Delete", + "title": "Delete an alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertMultipleResource.json new file mode 100644 index 000000000000..189092923ecb --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertMultipleResource.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a dynamic alert rule for multiple resources" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertSingleResource.json new file mode 100644 index 000000000000..ec3331283fda --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertSingleResource.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": null, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a dynamic alert rule for single resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertMultipleResource.json new file mode 100644 index 000000000000..15ceb8bc5115 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertMultipleResource.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule for multiple resources" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertQuery.json new file mode 100644 index 000000000000..69ce4ca59dc8 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertQuery.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "floor(minute(vector(time())) / 10 ) % 2 == 1" + } + ], + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a query based alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertResourceGroup.json new file mode 100644 index 000000000000..223c77aa37f1 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertResourceGroup.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest1", + "ruleName": "MetricAlertAtResourceGroupLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule on resource group(s)" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSingleResource.json new file mode 100644 index 000000000000..9085c72129ee --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSingleResource.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule for single resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatus.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatus.json new file mode 100644 index 000000000000..5a9ccf983799 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatus.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", + "type": "Microsoft.Insights/metricAlerts/status", + "id": "/subscriptions/009f6022-67ec-423e-9aa7-691182870588/resourceGroups/EastUs/providers/microsoft.insights/metricAlerts/LeoAlert_custom1", + "properties": { + "dimensions": { + "resourceId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + }, + "status": "Healthy", + "timestamp": "2018-01-17T20:17:25.6293237Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlertsStatus_List", + "title": "Get an alert rule status" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatusByName.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatusByName.json new file mode 100644 index 000000000000..693b2e0b1fa9 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatusByName.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "EastUs", + "ruleName": "custom1", + "statusName": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", + "subscriptionId": "009f6022-67ec-423e-9aa7-691182870588" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", + "type": "Microsoft.Insights/metricAlerts/status", + "id": "/subscriptions/009f6022-67ec-423e-9aa7-691182870588/resourceGroups/EastUs/providers/microsoft.insights/metricAlerts/custom1", + "properties": { + "dimensions": { + "resourceId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + }, + "status": "Healthy", + "timestamp": "2018-01-17T20:17:25.6293237Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlertsStatus_ListByName", + "title": "Get an alert rule status" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSubscription.json new file mode 100644 index 000000000000..703a7aff0a65 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSubscription.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertAtSubscriptionLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule on subscription" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getWebTestMetricAlert.json new file mode 100644 index 000000000000..b9d4ab54a162 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getWebTestMetricAlert.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "rg-example", + "ruleName": "webtest-name-example", + "subscriptionId": "12345678-1234-1234-1234-123456789101" + }, + "responses": { + "200": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\"", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a web test alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listByResourceGroupMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listByResourceGroupMetricAlert.json new file mode 100644 index 000000000000..776e2322d51b --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listByResourceGroupMetricAlert.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/highcpu", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/mediumcpu", + "location": "global", + "properties": { + "description": "Med cpu alert", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "Medium_CPU_50", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 50.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_ListByResourceGroup", + "title": "List metric alert rules" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listMetricAlert.json new file mode 100644 index 000000000000..83fa558e76b4 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listMetricAlert.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/highcpu", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/mediumcpu", + "location": "global", + "properties": { + "description": "Med cpu alert", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "Medium_CPU_50", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 50.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_ListBySubscription", + "title": "List metric alert rules" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/main.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/main.tsp index ee64c71e7d29..30b4bc220cde 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/main.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/main.tsp @@ -41,4 +41,9 @@ enum Versions { * The 2024-03-01-preview API version. */ v2024_03_01_preview: "2024-03-01-preview", + + /** + * The 2026-06-01 API version. + */ + v2026_06_01: "2026-06-01", } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md index b7b5781c8119..9a631cca2b4b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md @@ -53,7 +53,7 @@ input-file: - stable/2016-03-01/logProfiles.json - stable/2024-02-01/metrics.json - stable/2026-01-01/activityLogAlerts_API.json - - preview/2024-03-01-preview/metricAlert.json + - stable/2026-06-01/metricAlert.json - stable/2026-03-01/scheduledQueryRule_API.json - stable/2019-03-01/metricBaselines.json - preview/2024-10-01-preview/actionGroups.json diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/UpdateMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/UpdateMetricAlert.json new file mode 100644 index 000000000000..7be758f4ba45 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/UpdateMetricAlert.json @@ -0,0 +1,95 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Update", + "title": "Create or update an alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json new file mode 100644 index 000000000000..a6463b59b6ea --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -0,0 +1,112 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a dynamic alert rule for Multiple Resources" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json new file mode 100644 index 000000000000..507b86a76b5a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json @@ -0,0 +1,110 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a dynamic alert rule for Single Resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertMultipleResource.json new file mode 100644 index 000000000000..1900aec938a0 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertMultipleResource.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule for Multiple Resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQuery.json new file mode 100644 index 000000000000..fb4dcfcd251a --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQuery.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a query based alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryDT.json new file mode 100644 index 000000000000..be0578c59056 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryDT.json @@ -0,0 +1,126 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a query based alert rule with dynamic threshold" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryMultiResource.json new file mode 100644 index 000000000000..e6587b7cd1db --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryMultiResource.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a resource centric query based alert rule for Multiple Resources" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json new file mode 100644 index 000000000000..e76293fff641 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a resource centric query based alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertResourceGroup.json new file mode 100644 index 000000000000..62dce464537c --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertResourceGroup.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest1", + "ruleName": "MetricAlertAtResourceGroupLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule on Resource group(s)" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSingleResource.json new file mode 100644 index 000000000000..f3061d492fa9 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSingleResource.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule for Single Resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json new file mode 100644 index 000000000000..56078bebf3bc --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json @@ -0,0 +1,102 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertAtSubscriptionLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule on Subscription " +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertWithDimensions.json new file mode 100644 index 000000000000..b4398cf2140f --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertWithDimensions.json @@ -0,0 +1,130 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "windowSize": "P1D" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleDimensions", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.KeyVault/vaults", + "windowSize": "P1D" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rules with dimensions" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateWebTestMetricAlert.json new file mode 100644 index 000000000000..296f86ff8012 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateWebTestMetricAlert.json @@ -0,0 +1,69 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "parameters": { + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"component-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example": "Resource" + } + }, + "resourceGroupName": "rg-example", + "ruleName": "webtest-name-example", + "subscriptionId": "12345678-1234-1234-1234-123456789101" + }, + "responses": { + "200": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a web test alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/deleteMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/deleteMetricAlert.json new file mode 100644 index 000000000000..a3bbdbb40d30 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/deleteMetricAlert.json @@ -0,0 +1,15 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "MetricAlerts_Delete", + "title": "Delete an alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertMultipleResource.json new file mode 100644 index 000000000000..189092923ecb --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertMultipleResource.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a dynamic alert rule for multiple resources" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertSingleResource.json new file mode 100644 index 000000000000..ec3331283fda --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertSingleResource.json @@ -0,0 +1,64 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": null, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a dynamic alert rule for single resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertMultipleResource.json new file mode 100644 index 000000000000..15ceb8bc5115 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertMultipleResource.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule for multiple resources" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertQuery.json new file mode 100644 index 000000000000..69ce4ca59dc8 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertQuery.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "floor(minute(vector(time())) / 10 ) % 2 == 1" + } + ], + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a query based alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertResourceGroup.json new file mode 100644 index 000000000000..223c77aa37f1 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertResourceGroup.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest1", + "ruleName": "MetricAlertAtResourceGroupLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule on resource group(s)" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSingleResource.json new file mode 100644 index 000000000000..9085c72129ee --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSingleResource.json @@ -0,0 +1,58 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule for single resource" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatus.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatus.json new file mode 100644 index 000000000000..5a9ccf983799 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatus.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", + "type": "Microsoft.Insights/metricAlerts/status", + "id": "/subscriptions/009f6022-67ec-423e-9aa7-691182870588/resourceGroups/EastUs/providers/microsoft.insights/metricAlerts/LeoAlert_custom1", + "properties": { + "dimensions": { + "resourceId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + }, + "status": "Healthy", + "timestamp": "2018-01-17T20:17:25.6293237Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlertsStatus_List", + "title": "Get an alert rule status" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatusByName.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatusByName.json new file mode 100644 index 000000000000..693b2e0b1fa9 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatusByName.json @@ -0,0 +1,33 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "EastUs", + "ruleName": "custom1", + "statusName": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", + "subscriptionId": "009f6022-67ec-423e-9aa7-691182870588" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", + "type": "Microsoft.Insights/metricAlerts/status", + "id": "/subscriptions/009f6022-67ec-423e-9aa7-691182870588/resourceGroups/EastUs/providers/microsoft.insights/metricAlerts/custom1", + "properties": { + "dimensions": { + "resourceId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + }, + "status": "Healthy", + "timestamp": "2018-01-17T20:17:25.6293237Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlertsStatus_ListByName", + "title": "Get an alert rule status" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSubscription.json new file mode 100644 index 000000000000..703a7aff0a65 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSubscription.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertAtSubscriptionLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule on subscription" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getWebTestMetricAlert.json new file mode 100644 index 000000000000..b9d4ab54a162 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getWebTestMetricAlert.json @@ -0,0 +1,44 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "rg-example", + "ruleName": "webtest-name-example", + "subscriptionId": "12345678-1234-1234-1234-123456789101" + }, + "responses": { + "200": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\"", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a web test alert rule" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listByResourceGroupMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listByResourceGroupMetricAlert.json new file mode 100644 index 000000000000..776e2322d51b --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listByResourceGroupMetricAlert.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/highcpu", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/mediumcpu", + "location": "global", + "properties": { + "description": "Med cpu alert", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "Medium_CPU_50", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 50.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_ListByResourceGroup", + "title": "List metric alert rules" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listMetricAlert.json new file mode 100644 index 000000000000..83fa558e76b4 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listMetricAlert.json @@ -0,0 +1,101 @@ +{ + "parameters": { + "api-version": "2026-06-01", + "resourceGroupName": "gigtest", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/highcpu", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/mediumcpu", + "location": "global", + "properties": { + "description": "Med cpu alert", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "Medium_CPU_50", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 50.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_ListBySubscription", + "title": "List metric alert rules" +} + diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json new file mode 100644 index 000000000000..b843d0fea217 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json @@ -0,0 +1,1551 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "version": "2026-06-01", + "description": "Azure Monitor client to create/update/delete metric based alerts.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "MetricAlerts" + }, + { + "name": "MetricAlertsStatus" + } + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts": { + "get": { + "operationId": "MetricAlerts_ListBySubscription", + "tags": [ + "MetricAlerts" + ], + "description": "Retrieve alert rule definitions in a subscription.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertResourceCollection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/MetricAlertErrorResponse" + } + } + }, + "x-ms-examples": { + "List metric alert rules": { + "$ref": "./examples/listMetricAlert.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts": { + "get": { + "operationId": "MetricAlerts_ListByResourceGroup", + "tags": [ + "MetricAlerts" + ], + "description": "Retrieve alert rule definitions in a resource group.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertResourceCollection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/MetricAlertErrorResponse" + } + } + }, + "x-ms-examples": { + "List metric alert rules": { + "$ref": "./examples/listByResourceGroupMetricAlert.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}": { + "get": { + "operationId": "MetricAlerts_Get", + "tags": [ + "MetricAlerts" + ], + "description": "Retrieve an alert rule definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/MetricAlertErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a dynamic alert rule for multiple resources": { + "$ref": "./examples/getDynamicMetricAlertMultipleResource.json" + }, + "Get a dynamic alert rule for single resource": { + "$ref": "./examples/getDynamicMetricAlertSingleResource.json" + }, + "Get a query based alert rule": { + "$ref": "./examples/getMetricAlertQuery.json" + }, + "Get a web test alert rule": { + "$ref": "./examples/getWebTestMetricAlert.json" + }, + "Get an alert rule for multiple resources": { + "$ref": "./examples/getMetricAlertMultipleResource.json" + }, + "Get an alert rule for single resource": { + "$ref": "./examples/getMetricAlertSingleResource.json" + }, + "Get an alert rule on resource group(s)": { + "$ref": "./examples/getMetricAlertResourceGroup.json" + }, + "Get an alert rule on subscription": { + "$ref": "./examples/getMetricAlertSubscription.json" + } + } + }, + "put": { + "operationId": "MetricAlerts_CreateOrUpdate", + "tags": [ + "MetricAlerts" + ], + "description": "Create or update an metric alert definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters of the rule to create or update.", + "required": true, + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + } + ], + "responses": { + "200": { + "description": "Resource 'MetricAlertResource' update operation succeeded", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/MetricAlertErrorResponse" + } + } + }, + "x-ms-examples": { + "Create or update a dynamic alert rule for Multiple Resources": { + "$ref": "./examples/createOrUpdateDynamicMetricAlertMultipleResource.json" + }, + "Create or update a dynamic alert rule for Single Resource": { + "$ref": "./examples/createOrUpdateDynamicMetricAlertSingleResource.json" + }, + "Create or update a query based alert rule": { + "$ref": "./examples/createOrUpdateMetricAlertQuery.json" + }, + "Create or update a query based alert rule with dynamic threshold": { + "$ref": "./examples/createOrUpdateMetricAlertQueryDT.json" + }, + "Create or update a resource centric query based alert rule": { + "$ref": "./examples/createOrUpdateMetricAlertQueryResourceCentric.json" + }, + "Create or update a resource centric query based alert rule for Multiple Resources": { + "$ref": "./examples/createOrUpdateMetricAlertQueryMultiResource.json" + }, + "Create or update a web test alert rule": { + "$ref": "./examples/createOrUpdateWebTestMetricAlert.json" + }, + "Create or update an alert rule for Multiple Resource": { + "$ref": "./examples/createOrUpdateMetricAlertMultipleResource.json" + }, + "Create or update an alert rule for Single Resource": { + "$ref": "./examples/createOrUpdateMetricAlertSingleResource.json" + }, + "Create or update an alert rule on Resource group(s)": { + "$ref": "./examples/createOrUpdateMetricAlertResourceGroup.json" + }, + "Create or update an alert rule on Subscription ": { + "$ref": "./examples/createOrUpdateMetricAlertSubscription.json" + }, + "Create or update an alert rules with dimensions": { + "$ref": "./examples/createOrUpdateMetricAlertWithDimensions.json" + } + } + }, + "patch": { + "operationId": "MetricAlerts_Update", + "tags": [ + "MetricAlerts" + ], + "description": "Update an metric alert definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters of the rule to update.", + "required": true, + "schema": { + "$ref": "#/definitions/MetricAlertResourcePatch" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/MetricAlertErrorResponse" + } + } + }, + "x-ms-examples": { + "Create or update an alert rule": { + "$ref": "./examples/UpdateMetricAlert.json" + } + } + }, + "delete": { + "operationId": "MetricAlerts_Delete", + "tags": [ + "MetricAlerts" + ], + "description": "Delete an alert rule definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/MetricAlertErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete an alert rule": { + "$ref": "./examples/deleteMetricAlert.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status": { + "get": { + "operationId": "MetricAlertsStatus_List", + "tags": [ + "MetricAlertsStatus" + ], + "description": "Retrieve an alert rule status.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertStatusCollection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/MetricAlertErrorResponse" + } + } + }, + "x-ms-examples": { + "Get an alert rule status": { + "$ref": "./examples/getMetricAlertStatus.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status/{statusName}": { + "get": { + "operationId": "MetricAlertsStatus_ListByName", + "tags": [ + "MetricAlertsStatus" + ], + "description": "Retrieve an alert rule status.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + }, + { + "name": "statusName", + "in": "path", + "description": "The name of the status.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertStatusCollection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/MetricAlertErrorResponse" + } + } + }, + "x-ms-examples": { + "Get an alert rule status": { + "$ref": "./examples/getMetricAlertStatusByName.json" + } + } + } + } + }, + "definitions": { + "AggregationTypeEnum": { + "type": "string", + "description": "The criteria time aggregation types. Previously undocumented values might be returned", + "enum": [ + "Average", + "Count", + "Minimum", + "Maximum", + "Total" + ], + "x-ms-enum": { + "name": "AggregationTypeEnum", + "modelAsString": true, + "values": [ + { + "name": "Average", + "value": "Average", + "description": "Average" + }, + { + "name": "Count", + "value": "Count", + "description": "Count" + }, + { + "name": "Minimum", + "value": "Minimum", + "description": "Minimum" + }, + { + "name": "Maximum", + "value": "Maximum", + "description": "Maximum" + }, + { + "name": "Total", + "value": "Total", + "description": "Total" + } + ] + } + }, + "DynamicMetricCriteria": { + "type": "object", + "description": "Criterion for dynamic threshold.", + "properties": { + "operator": { + "$ref": "#/definitions/DynamicThresholdOperator", + "description": "The operator used to compare the metric value against the threshold. Previously undocumented values might be returned" + }, + "alertSensitivity": { + "$ref": "#/definitions/DynamicThresholdSensitivity", + "description": "The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Previously undocumented values might be returned" + }, + "failingPeriods": { + "$ref": "#/definitions/DynamicThresholdFailingPeriods", + "description": "The minimum number of violations required within the selected lookback time window required to raise an alert." + }, + "ignoreDataBefore": { + "type": "string", + "format": "date-time", + "description": "Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)" + } + }, + "required": [ + "operator", + "alertSensitivity", + "failingPeriods" + ], + "allOf": [ + { + "$ref": "#/definitions/MultiMetricCriteria" + } + ], + "x-ms-discriminator-value": "DynamicThresholdCriterion" + }, + "DynamicPromQLCriteria": { + "type": "object", + "description": "The criterion for dynamic prom query.", + "properties": { + "operator": { + "$ref": "#/definitions/DynamicThresholdOperator", + "description": "The operator used to compare the metric value against the threshold. Previously undocumented values might be returned" + }, + "alertSensitivity": { + "$ref": "#/definitions/DynamicThresholdSensitivity", + "description": "The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Previously undocumented values might be returned" + }, + "ignoreDataBefore": { + "type": "string", + "format": "date-time", + "description": "Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)" + } + }, + "required": [ + "operator", + "alertSensitivity" + ], + "allOf": [ + { + "$ref": "#/definitions/MultiPromQLCriteria" + } + ], + "x-ms-discriminator-value": "DynamicThresholdCriterion" + }, + "DynamicThresholdFailingPeriods": { + "type": "object", + "description": "The minimum number of violations required within the selected lookback time window required to raise an alert.", + "properties": { + "numberOfEvaluationPeriods": { + "type": "number", + "format": "float", + "description": "The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points." + }, + "minFailingPeriodsToAlert": { + "type": "number", + "format": "float", + "description": "The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods." + } + }, + "required": [ + "numberOfEvaluationPeriods", + "minFailingPeriodsToAlert" + ] + }, + "DynamicThresholdOperator": { + "type": "string", + "description": "The operator used to compare the metric value against the threshold. Previously undocumented values might be returned", + "enum": [ + "GreaterThan", + "LessThan", + "GreaterOrLessThan" + ], + "x-ms-enum": { + "name": "DynamicThresholdOperator", + "modelAsString": true, + "values": [ + { + "name": "GreaterThan", + "value": "GreaterThan", + "description": "GreaterThan" + }, + { + "name": "LessThan", + "value": "LessThan", + "description": "LessThan" + }, + { + "name": "GreaterOrLessThan", + "value": "GreaterOrLessThan", + "description": "GreaterOrLessThan" + } + ] + } + }, + "DynamicThresholdSensitivity": { + "type": "string", + "description": "The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Previously undocumented values might be returned", + "enum": [ + "Low", + "Medium", + "High" + ], + "x-ms-enum": { + "name": "DynamicThresholdSensitivity", + "modelAsString": true, + "values": [ + { + "name": "Low", + "value": "Low", + "description": "Low" + }, + { + "name": "Medium", + "value": "Medium", + "description": "Medium" + }, + { + "name": "High", + "value": "High", + "description": "High" + } + ] + } + }, + "MetricAlertAction": { + "type": "object", + "description": "An alert action.", + "properties": { + "actionGroupId": { + "type": "string", + "description": "The id of the action group to use." + }, + "webHookProperties": { + "type": "object", + "description": "This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "MetricAlertCriteria": { + "type": "object", + "description": "The rule criteria that defines the conditions of the alert rule.", + "properties": { + "odata.type": { + "$ref": "#/definitions/Odatatype", + "description": "Specifies the type of the alert criteria. Previously undocumented values might be returned" + } + }, + "discriminator": "odata.type", + "required": [ + "odata.type" + ], + "additionalProperties": {} + }, + "MetricAlertErrorResponse": { + "type": "object", + "description": "Describes the format of Error response.", + "properties": { + "error": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponseError" + } + } + }, + "MetricAlertMultipleResourceMultipleMetricCriteria": { + "type": "object", + "description": "Specifies the metric alert criteria for multiple resource that has multiple metric criteria.", + "properties": { + "allOf": { + "type": "array", + "description": "The list of multiple metric criteria for this 'all of' operation.", + "items": { + "$ref": "#/definitions/MultiMetricCriteria" + }, + "x-ms-identifiers": [ + "name" + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/MetricAlertCriteria" + } + ], + "x-ms-discriminator-value": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "MetricAlertProperties": { + "type": "object", + "description": "An alert rule.", + "properties": { + "description": { + "type": "string", + "description": "The description of the metric alert that will be included in the alert email." + }, + "severity": { + "type": "integer", + "format": "int32", + "description": "Alert severity {0, 1, 2, 3, 4}" + }, + "enabled": { + "type": "boolean", + "description": "The flag that indicates whether the metric alert is enabled." + }, + "scopes": { + "type": "array", + "description": "The list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.", + "items": { + "type": "string" + } + }, + "evaluationFrequency": { + "type": "string", + "format": "duration", + "description": "How often the metric alert is evaluated represented in ISO 8601 duration format." + }, + "windowSize": { + "type": "string", + "format": "duration", + "description": "The period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold." + }, + "targetResourceType": { + "type": "string", + "description": "The resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource." + }, + "targetResourceRegion": { + "type": "string", + "description": "The region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource." + }, + "criteria": { + "$ref": "#/definitions/MetricAlertCriteria", + "description": "Defines the specific alert criteria information." + }, + "autoMitigate": { + "type": "boolean", + "description": "The flag that indicates whether the alert should be auto resolved or not. The default is true." + }, + "resolveConfiguration": { + "$ref": "#/definitions/ResolveConfiguration", + "description": "The configuration for how the alert is resolved. Applicable for PromQLCriteria." + }, + "actions": { + "type": "array", + "description": "The array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.", + "items": { + "$ref": "#/definitions/MetricAlertAction" + }, + "x-ms-identifiers": [ + "actionGroupId" + ] + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time", + "description": "Last time the rule was updated in ISO8601 format.", + "readOnly": true + }, + "isMigrated": { + "type": "boolean", + "description": "The value indicating whether this alert rule is migrated.", + "readOnly": true + }, + "customProperties": { + "type": "object", + "description": "The properties of an alert payload.", + "additionalProperties": { + "type": "string" + } + }, + "actionProperties": { + "type": "object", + "description": "The properties of an action properties.", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "severity", + "enabled", + "scopes", + "evaluationFrequency", + "criteria" + ] + }, + "MetricAlertPropertiesPatch": { + "type": "object", + "description": "An alert rule properties for patch.", + "properties": { + "description": { + "type": "string", + "description": "The description of the metric alert that will be included in the alert email." + }, + "severity": { + "type": "integer", + "format": "int32", + "description": "Alert severity {0, 1, 2, 3, 4}" + }, + "enabled": { + "type": "boolean", + "description": "The flag that indicates whether the metric alert is enabled." + }, + "scopes": { + "type": "array", + "description": "The list of resource id's that this metric alert is scoped to.", + "items": { + "type": "string" + } + }, + "evaluationFrequency": { + "type": "string", + "format": "duration", + "description": "How often the metric alert is evaluated represented in ISO 8601 duration format." + }, + "windowSize": { + "type": "string", + "format": "duration", + "description": "The period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold." + }, + "targetResourceType": { + "type": "string", + "description": "The resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." + }, + "targetResourceRegion": { + "type": "string", + "description": "The region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." + }, + "criteria": { + "$ref": "#/definitions/MetricAlertCriteria", + "description": "Defines the specific alert criteria information." + }, + "autoMitigate": { + "type": "boolean", + "description": "The flag that indicates whether the alert should be auto resolved or not. The default is true." + }, + "resolveConfiguration": { + "$ref": "#/definitions/ResolveConfiguration", + "description": "The configuration for how the alert is resolved. Applicable for PromQLCriteria." + }, + "actions": { + "type": "array", + "description": "The array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.", + "items": { + "$ref": "#/definitions/MetricAlertAction" + }, + "x-ms-identifiers": [ + "actionGroupId" + ] + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time", + "description": "Last time the rule was updated in ISO8601 format.", + "readOnly": true + }, + "isMigrated": { + "type": "boolean", + "description": "The value indicating whether this alert rule is migrated.", + "readOnly": true + }, + "customProperties": { + "type": "object", + "description": "The properties of an alert payload.", + "additionalProperties": { + "type": "string" + } + }, + "actionProperties": { + "type": "object", + "description": "The properties of an action properties.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "MetricAlertResource": { + "type": "object", + "description": "The metric alert resource.", + "properties": { + "properties": { + "$ref": "#/definitions/MetricAlertProperties", + "description": "The alert rule properties of the resource.", + "x-ms-client-flatten": true + }, + "identity": { + "$ref": "#/definitions/Microsoft.Common.Identity", + "description": "The identity of the resource." + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "MetricAlertResourceCollection": { + "type": "object", + "description": "Represents a collection of alert rule resources.", + "properties": { + "value": { + "type": "array", + "description": "The values for the alert rule resources.", + "items": { + "$ref": "#/definitions/MetricAlertResource" + }, + "x-ms-identifiers": [ + "id" + ] + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + } + }, + "MetricAlertResourcePatch": { + "type": "object", + "description": "The metric alert resource for patch operations.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags", + "additionalProperties": { + "type": "string" + } + }, + "identity": { + "$ref": "#/definitions/Microsoft.Common.Identity", + "description": "The identity of the resource." + }, + "properties": { + "$ref": "#/definitions/MetricAlertPropertiesPatch", + "description": "The alert rule properties of the resource.", + "x-ms-client-flatten": true + } + } + }, + "MetricAlertSingleResourceMultipleMetricCriteria": { + "type": "object", + "description": "Specifies the metric alert criteria for a single resource that has multiple metric criteria.", + "properties": { + "allOf": { + "type": "array", + "description": "The list of metric criteria for this 'all of' operation.", + "items": { + "$ref": "#/definitions/MetricCriteria" + }, + "x-ms-identifiers": [ + "name" + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/MetricAlertCriteria" + } + ], + "x-ms-discriminator-value": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "MetricAlertStatus": { + "type": "object", + "description": "An alert status.", + "properties": { + "name": { + "type": "string", + "description": "The status name." + }, + "id": { + "type": "string", + "description": "The alert rule arm id." + }, + "type": { + "type": "string", + "description": "The extended resource type name." + }, + "properties": { + "$ref": "#/definitions/MetricAlertStatusProperties", + "description": "The alert status properties of the metric alert status." + } + } + }, + "MetricAlertStatusCollection": { + "type": "object", + "description": "Represents a collection of alert rule resources.", + "properties": { + "value": { + "type": "array", + "description": "The values for the alert rule resources.", + "items": { + "$ref": "#/definitions/MetricAlertStatus" + }, + "x-ms-identifiers": [ + "id" + ] + } + } + }, + "MetricAlertStatusProperties": { + "type": "object", + "description": "An alert status properties.", + "properties": { + "dimensions": { + "type": "object", + "description": "An object describing the type of the dimensions.", + "additionalProperties": { + "type": "string" + } + }, + "status": { + "type": "string", + "description": "Status value" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "UTC time when the status was checked." + } + } + }, + "MetricCriteria": { + "type": "object", + "description": "Criterion to filter metrics.", + "properties": { + "operator": { + "$ref": "#/definitions/Operator", + "description": "The criteria operator. Previously undocumented values might be returned" + }, + "threshold": { + "type": "number", + "format": "double", + "description": "The criteria threshold value that activates the alert." + } + }, + "required": [ + "operator", + "threshold" + ], + "allOf": [ + { + "$ref": "#/definitions/MultiMetricCriteria" + } + ], + "x-ms-discriminator-value": "StaticThresholdCriterion" + }, + "MetricDimension": { + "type": "object", + "description": "Specifies a metric dimension.", + "properties": { + "name": { + "type": "string", + "description": "Name of the dimension." + }, + "operator": { + "type": "string", + "description": "The dimension operator. Only 'Include' and 'Exclude' are supported" + }, + "values": { + "type": "array", + "description": "List of dimension values.", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "Microsoft.Common.CriterionType": { + "type": "string", + "description": "Specifies the type of threshold criteria. Previously undocumented values might be returned", + "enum": [ + "StaticThresholdCriterion", + "DynamicThresholdCriterion" + ], + "x-ms-enum": { + "name": "CriterionType", + "modelAsString": true, + "values": [ + { + "name": "StaticThresholdCriterion", + "value": "StaticThresholdCriterion", + "description": "StaticThresholdCriterion" + }, + { + "name": "DynamicThresholdCriterion", + "value": "DynamicThresholdCriterion", + "description": "DynamicThresholdCriterion" + } + ] + } + }, + "Microsoft.Common.ErrorDetail": { + "type": "object", + "description": "Describes details of an error response.", + "properties": { + "code": { + "type": "string", + "description": "Unlocalized string which can be used to programmatically identify the error." + }, + "message": { + "type": "string", + "description": "Describes the error in detail and provides debugging information." + }, + "target": { + "type": "string", + "description": "The target of the particular error (for example, the name of the property in error)." + }, + "additionalInfo": { + "type": "array", + "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", + "items": { + "$ref": "#/definitions/Microsoft.Common.ErrorDetailAdditionalInfoItem" + } + } + } + }, + "Microsoft.Common.ErrorDetailAdditionalInfoItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of additional information." + }, + "info": { + "type": "object", + "description": "The additional information specific to the type.", + "additionalProperties": {} + } + } + }, + "Microsoft.Common.ErrorResponseError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Unlocalized string which can be used to programmatically identify the error." + }, + "message": { + "type": "string", + "description": "Describes the error in detail and provides debugging information. If Accept-Language is set in the request, it must be localized to that language." + }, + "target": { + "type": "string", + "description": "The target of the particular error (for example, the name of the property in error)." + }, + "details": { + "type": "array", + "description": "An array of additional nested error response info objects, as described by this contract.", + "items": { + "$ref": "#/definitions/Microsoft.Common.ErrorDetail" + } + }, + "additionalInfo": { + "type": "array", + "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", + "items": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponseErrorAdditionalInfoItem" + } + } + } + }, + "Microsoft.Common.ErrorResponseErrorAdditionalInfoItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of additional information." + }, + "info": { + "type": "object", + "description": "The additional information specific to the type.", + "additionalProperties": {} + } + } + }, + "Microsoft.Common.Identity": { + "type": "object", + "description": "Identity for the resource.", + "properties": { + "principalId": { + "type": "string", + "description": "The principal ID of resource identity.", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "The tenant ID of resource.", + "readOnly": true + }, + "type": { + "$ref": "#/definitions/Microsoft.Common.IdentityType", + "description": "Type of managed service identity." + }, + "userAssignedIdentities": { + "type": "object", + "description": "The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "additionalProperties": { + "$ref": "#/definitions/Microsoft.Common.UserIdentityProperties" + } + } + }, + "required": [ + "type" + ] + }, + "Microsoft.Common.IdentityType": { + "type": "string", + "description": "Type of managed service identity.", + "enum": [ + "SystemAssigned", + "UserAssigned", + "None" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": false, + "values": [ + { + "name": "SystemAssigned", + "value": "SystemAssigned", + "description": "SystemAssigned" + }, + { + "name": "UserAssigned", + "value": "UserAssigned", + "description": "UserAssigned" + }, + { + "name": "None", + "value": "None", + "description": "None" + } + ] + } + }, + "Microsoft.Common.UserIdentityProperties": { + "type": "object", + "description": "Properties of the user assigned identity.", + "properties": { + "principalId": { + "type": "string", + "description": "The principal ID of resource identity.", + "readOnly": true + }, + "clientId": { + "type": "string", + "description": "The client ID of resource identity.", + "readOnly": true + } + } + }, + "MultiMetricCriteria": { + "type": "object", + "description": "The types of conditions for a multi resource alert.", + "properties": { + "criterionType": { + "$ref": "#/definitions/Microsoft.Common.CriterionType", + "description": "Specifies the type of threshold criteria. Previously undocumented values might be returned" + }, + "name": { + "type": "string", + "description": "Name of the criteria." + }, + "metricName": { + "type": "string", + "description": "Name of the metric." + }, + "metricNamespace": { + "type": "string", + "description": "Namespace of the metric." + }, + "timeAggregation": { + "$ref": "#/definitions/AggregationTypeEnum", + "description": "The criteria time aggregation types. Previously undocumented values might be returned" + }, + "dimensions": { + "type": "array", + "description": "List of dimension conditions.", + "items": { + "$ref": "#/definitions/MetricDimension" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "skipMetricValidation": { + "type": "boolean", + "description": "Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped." + } + }, + "discriminator": "criterionType", + "required": [ + "criterionType", + "name", + "metricName", + "timeAggregation" + ], + "additionalProperties": {} + }, + "MultiPromQLCriteria": { + "type": "object", + "description": "The types of conditions for a multi query metric alert.", + "properties": { + "criterionType": { + "$ref": "#/definitions/Microsoft.Common.CriterionType", + "description": "Specifies the type of threshold criteria. Previously undocumented values might be returned" + }, + "name": { + "type": "string", + "description": "Name of the criteria." + }, + "query": { + "type": "string", + "description": "The query used to evaluate the alert rule" + } + }, + "discriminator": "criterionType", + "required": [ + "criterionType", + "name", + "query" + ] + }, + "Odatatype": { + "type": "string", + "description": "Specifies the type of the alert criteria. Previously undocumented values might be returned", + "enum": [ + "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", + "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", + "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "Microsoft.Azure.Monitor.PromQLCriteria" + ], + "x-ms-enum": { + "name": "Odatatype", + "modelAsString": true, + "values": [ + { + "name": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", + "value": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", + "description": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + { + "name": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", + "value": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", + "description": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + { + "name": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "value": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "description": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" + }, + { + "name": "Microsoft.Azure.Monitor.PromQLCriteria", + "value": "Microsoft.Azure.Monitor.PromQLCriteria", + "description": "Microsoft.Azure.Monitor.PromQLCriteria" + } + ] + } + }, + "Operator": { + "type": "string", + "description": "The criteria operator. Previously undocumented values might be returned", + "enum": [ + "Equals", + "GreaterThan", + "GreaterThanOrEqual", + "LessThan", + "LessThanOrEqual" + ], + "x-ms-enum": { + "name": "Operator", + "modelAsString": true, + "values": [ + { + "name": "Equals", + "value": "Equals", + "description": "Equals" + }, + { + "name": "GreaterThan", + "value": "GreaterThan", + "description": "GreaterThan" + }, + { + "name": "GreaterThanOrEqual", + "value": "GreaterThanOrEqual", + "description": "GreaterThanOrEqual" + }, + { + "name": "LessThan", + "value": "LessThan", + "description": "LessThan" + }, + { + "name": "LessThanOrEqual", + "value": "LessThanOrEqual", + "description": "LessThanOrEqual" + } + ] + } + }, + "PromQLCriteria": { + "type": "object", + "description": "Specifies the PromQL criteria for the metric alert resource.", + "properties": { + "failingPeriods": { + "$ref": "#/definitions/QueryFailingPeriods", + "description": "Configuration for failing periods in query-based alerts." + }, + "allOf": { + "type": "array", + "description": "The list of promQL criteria. Alert will be raised when all conditions are met.", + "items": { + "$ref": "#/definitions/MultiPromQLCriteria" + }, + "x-ms-identifiers": [ + "name" + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/MetricAlertCriteria" + } + ], + "x-ms-discriminator-value": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "QueryFailingPeriods": { + "type": "object", + "description": "Configuration for failing periods in query-based alerts.", + "properties": { + "for": { + "type": "string", + "format": "duration", + "description": "The amount of time (in ISO 8601 duration format) alert must be active before firing." + } + }, + "required": [ + "for" + ] + }, + "ResolveConfiguration": { + "type": "object", + "properties": { + "autoResolved": { + "type": "boolean", + "description": "Indicates whether the alert should be auto resolved" + }, + "timeToResolve": { + "type": "string", + "format": "duration", + "description": "The time (in ISO 8601 duration format) after which the alert should be auto resolved" + } + }, + "required": [ + "autoResolved" + ] + }, + "StaticPromQLCriteria": { + "type": "object", + "description": "The criterion for static prom query.", + "allOf": [ + { + "$ref": "#/definitions/MultiPromQLCriteria" + } + ], + "x-ms-discriminator-value": "StaticThresholdCriterion" + }, + "WebtestLocationAvailabilityCriteria": { + "type": "object", + "description": "Specifies the metric alert rule criteria for a web test resource.", + "properties": { + "webTestId": { + "type": "string", + "description": "The Application Insights web test Id." + }, + "componentId": { + "type": "string", + "description": "The Application Insights resource Id." + }, + "failedLocationCount": { + "type": "number", + "format": "float", + "description": "The number of failed locations." + } + }, + "required": [ + "webTestId", + "componentId", + "failedLocationCount" + ], + "allOf": [ + { + "$ref": "#/definitions/MetricAlertCriteria" + } + ], + "x-ms-discriminator-value": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" + } + }, + "parameters": {} +} + From ca25608b83393b6a27e0750cd4b6f7802f62843b Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 2 Jun 2026 09:19:17 +0300 Subject: [PATCH 02/23] Address ARM API review suggestions [metric-alerts-query-ga-swagger] --- .../MetricAlertApi/MetricAlertResource.tsp | 6 ++---- .../createOrUpdateMetricAlertSubscription.json | 2 +- .../createOrUpdateMetricAlertSubscription.json | 2 +- .../Insights/stable/2026-06-01/metricAlert.json | 16 ++++++++++++---- 4 files changed, 16 insertions(+), 10 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp index f1366d95d79b..cef408417c80 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp @@ -69,18 +69,16 @@ interface MetricAlertResources { get is ArmResourceRead; /** - * Create or update an metric alert definition. + * Create or update a metric alert definition. */ - #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @tag("MetricAlerts") createOrUpdate is ArmResourceCreateOrReplaceSync< MetricAlertResource, - Response = ArmResourceUpdatedResponse, Error = MetricAlertErrorResponse >; /** - * Update an metric alert definition. + * Update a metric alert definition. */ @patch(#{ implicitOptionality: false }) @tag("MetricAlerts") diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json index 56078bebf3bc..f8185931f4ce 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json @@ -97,6 +97,6 @@ } }, "operationId": "MetricAlerts_CreateOrUpdate", - "title": "Create or update an alert rule on Subscription " + "title": "Create or update an alert rule on Subscription" } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json index 56078bebf3bc..f8185931f4ce 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json @@ -97,6 +97,6 @@ } }, "operationId": "MetricAlerts_CreateOrUpdate", - "title": "Create or update an alert rule on Subscription " + "title": "Create or update an alert rule on Subscription" } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json index b843d0fea217..b2c78bea24fe 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json @@ -199,7 +199,7 @@ "tags": [ "MetricAlerts" ], - "description": "Create or update an metric alert definition.", + "description": "Create or update a metric alert definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -234,6 +234,12 @@ "$ref": "#/definitions/MetricAlertResource" } }, + "201": { + "description": "Resource 'MetricAlertResource' create operation succeeded", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, "default": { "description": "An unexpected error response.", "schema": { @@ -272,7 +278,7 @@ "Create or update an alert rule on Resource group(s)": { "$ref": "./examples/createOrUpdateMetricAlertResourceGroup.json" }, - "Create or update an alert rule on Subscription ": { + "Create or update an alert rule on Subscription": { "$ref": "./examples/createOrUpdateMetricAlertSubscription.json" }, "Create or update an alert rules with dimensions": { @@ -285,7 +291,7 @@ "tags": [ "MetricAlerts" ], - "description": "Update an metric alert definition.", + "description": "Update a metric alert definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -738,7 +744,9 @@ "severity": { "type": "integer", "format": "int32", - "description": "Alert severity {0, 1, 2, 3, 4}" + "description": "Alert severity {0, 1, 2, 3, 4}", + "minimum": 0, + "maximum": 4 }, "enabled": { "type": "boolean", From e339d9edbfc9bd6ede8f0e5bad62c40d2176d757 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 2 Jun 2026 09:39:28 +0300 Subject: [PATCH 03/23] Apply PR decisions for package tag and error model [metric-alerts-query-ga-swagger] --- .../MetricAlertApi/MetricAlertResource.tsp | 16 +-- .../Insights/MetricAlertApi/models.tsp | 9 -- .../Microsoft.Insights/Insights/readme.md | 11 +- .../stable/2026-06-01/metricAlert.json | 109 ++---------------- 4 files changed, 26 insertions(+), 119 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp index cef408417c80..63a344e9a7a1 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp @@ -66,7 +66,7 @@ interface MetricAlertResources { * Retrieve an alert rule definition. */ @tag("MetricAlerts") - get is ArmResourceRead; + get is ArmResourceRead; /** * Create or update a metric alert definition. @@ -74,7 +74,7 @@ interface MetricAlertResources { @tag("MetricAlerts") createOrUpdate is ArmResourceCreateOrReplaceSync< MetricAlertResource, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -85,7 +85,7 @@ interface MetricAlertResources { update is ArmCustomPatchSync< MetricAlertResource, PatchModel = MetricAlertResourcePatch, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -94,7 +94,7 @@ interface MetricAlertResources { @tag("MetricAlerts") delete is ArmResourceDeleteSync< MetricAlertResource, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -104,7 +104,7 @@ interface MetricAlertResources { listByResourceGroup is ArmResourceListByParent< MetricAlertResource, Response = ArmResponse, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -114,7 +114,7 @@ interface MetricAlertResources { listBySubscription is ArmListBySubscription< MetricAlertResource, Response = ArmResponse, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -134,7 +134,7 @@ interface MetricAlertResources { @segment("metricAlerts") ruleName: string; }, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -153,7 +153,7 @@ interface MetricAlertResources { @segment("status") statusName: string; }, - OverrideErrorType = MetricAlertErrorResponse + OverrideErrorType = Microsoft.Common.ErrorResponse >; } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/models.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/models.tsp index afa609a76fd2..aa8a61242f62 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/models.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/models.tsp @@ -340,15 +340,6 @@ model Resource { identity?: Identity; } -/** - * Describes the format of Error response. - */ -@error -model MetricAlertErrorResponse { - #suppress "@azure-tools/typespec-azure-core/documentation-required" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" - error?: ErrorResponseError; -} - /** * The metric alert resource for patch operations. */ diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md index 9a631cca2b4b..231cc73ee70c 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md @@ -53,13 +53,22 @@ input-file: - stable/2016-03-01/logProfiles.json - stable/2024-02-01/metrics.json - stable/2026-01-01/activityLogAlerts_API.json - - stable/2026-06-01/metricAlert.json + - preview/2024-03-01-preview/metricAlert.json - stable/2026-03-01/scheduledQueryRule_API.json - stable/2019-03-01/metricBaselines.json - preview/2024-10-01-preview/actionGroups.json - stable/2021-10-01/networkSecurityPerimeter.json ``` +### Tag: package-2026-06-01 + +These settings apply only when `--tag=package-2026-06-01` is specified on the command line. + +```yaml $(tag) == 'package-2026-06-01' +input-file: + - stable/2026-06-01/metricAlert.json +``` + ### Tag: package-2026-03-01 These settings apply only when `--tag=package-2026-03-01` is specified on the command line. diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json index b2c78bea24fe..70b9b854ef1e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json @@ -72,7 +72,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -114,7 +114,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -163,7 +163,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -243,7 +243,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -329,7 +329,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -373,7 +373,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -419,7 +419,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -472,7 +472,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" } } }, @@ -702,15 +702,6 @@ ], "additionalProperties": {} }, - "MetricAlertErrorResponse": { - "type": "object", - "description": "Describes the format of Error response.", - "properties": { - "error": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponseError" - } - } - }, "MetricAlertMultipleResourceMultipleMetricCriteria": { "type": "object", "description": "Specifies the metric alert criteria for multiple resource that has multiple metric criteria.", @@ -1146,90 +1137,6 @@ ] } }, - "Microsoft.Common.ErrorDetail": { - "type": "object", - "description": "Describes details of an error response.", - "properties": { - "code": { - "type": "string", - "description": "Unlocalized string which can be used to programmatically identify the error." - }, - "message": { - "type": "string", - "description": "Describes the error in detail and provides debugging information." - }, - "target": { - "type": "string", - "description": "The target of the particular error (for example, the name of the property in error)." - }, - "additionalInfo": { - "type": "array", - "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", - "items": { - "$ref": "#/definitions/Microsoft.Common.ErrorDetailAdditionalInfoItem" - } - } - } - }, - "Microsoft.Common.ErrorDetailAdditionalInfoItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The type of additional information." - }, - "info": { - "type": "object", - "description": "The additional information specific to the type.", - "additionalProperties": {} - } - } - }, - "Microsoft.Common.ErrorResponseError": { - "type": "object", - "properties": { - "code": { - "type": "string", - "description": "Unlocalized string which can be used to programmatically identify the error." - }, - "message": { - "type": "string", - "description": "Describes the error in detail and provides debugging information. If Accept-Language is set in the request, it must be localized to that language." - }, - "target": { - "type": "string", - "description": "The target of the particular error (for example, the name of the property in error)." - }, - "details": { - "type": "array", - "description": "An array of additional nested error response info objects, as described by this contract.", - "items": { - "$ref": "#/definitions/Microsoft.Common.ErrorDetail" - } - }, - "additionalInfo": { - "type": "array", - "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", - "items": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponseErrorAdditionalInfoItem" - } - } - } - }, - "Microsoft.Common.ErrorResponseErrorAdditionalInfoItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The type of additional information." - }, - "info": { - "type": "object", - "description": "The additional information specific to the type.", - "additionalProperties": {} - } - } - }, "Microsoft.Common.Identity": { "type": "object", "description": "Identity for the resource.", From f6ad53c0a219495081278b334d44d63846bd2eb0 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Wed, 3 Jun 2026 09:46:48 +0300 Subject: [PATCH 04/23] Fix metric alert GA api-version to 2026-01-01 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../{2026-06-01 => 2026-01-01}/UpdateMetricAlert.json | 2 +- .../createOrUpdateDynamicMetricAlertMultipleResource.json | 2 +- .../createOrUpdateDynamicMetricAlertSingleResource.json | 2 +- .../createOrUpdateMetricAlertMultipleResource.json | 2 +- .../createOrUpdateMetricAlertQuery.json | 2 +- .../2026-01-01}/createOrUpdateMetricAlertQueryDT.json | 2 +- .../createOrUpdateMetricAlertQueryMultiResource.json | 2 +- .../createOrUpdateMetricAlertQueryResourceCentric.json | 2 +- .../createOrUpdateMetricAlertResourceGroup.json | 2 +- .../createOrUpdateMetricAlertSingleResource.json | 2 +- .../createOrUpdateMetricAlertSubscription.json | 2 +- .../createOrUpdateMetricAlertWithDimensions.json | 2 +- .../2026-01-01}/createOrUpdateWebTestMetricAlert.json | 2 +- .../{2026-06-01 => 2026-01-01}/deleteMetricAlert.json | 2 +- .../getDynamicMetricAlertMultipleResource.json | 2 +- .../getDynamicMetricAlertSingleResource.json | 2 +- .../2026-01-01}/getMetricAlertMultipleResource.json | 2 +- .../{2026-06-01 => 2026-01-01}/getMetricAlertQuery.json | 2 +- .../examples/2026-01-01}/getMetricAlertResourceGroup.json | 2 +- .../getMetricAlertSingleResource.json | 2 +- .../examples/2026-01-01}/getMetricAlertStatus.json | 2 +- .../getMetricAlertStatusByName.json | 2 +- .../examples/2026-01-01}/getMetricAlertSubscription.json | 2 +- .../examples/2026-01-01}/getWebTestMetricAlert.json | 2 +- .../listByResourceGroupMetricAlert.json | 2 +- .../{2026-06-01 => 2026-01-01}/listMetricAlert.json | 2 +- .../Microsoft.Insights/Insights/MetricAlertApi/main.tsp | 4 ++-- .../Microsoft.Insights/Insights/readme.md | 8 ++++---- .../examples/UpdateMetricAlert.json | 2 +- .../createOrUpdateDynamicMetricAlertMultipleResource.json | 2 +- .../createOrUpdateDynamicMetricAlertSingleResource.json | 2 +- .../createOrUpdateMetricAlertMultipleResource.json | 2 +- .../examples/createOrUpdateMetricAlertQuery.json | 2 +- .../examples}/createOrUpdateMetricAlertQueryDT.json | 2 +- .../createOrUpdateMetricAlertQueryMultiResource.json | 2 +- .../createOrUpdateMetricAlertQueryResourceCentric.json | 2 +- .../examples}/createOrUpdateMetricAlertResourceGroup.json | 2 +- .../createOrUpdateMetricAlertSingleResource.json | 2 +- .../examples/createOrUpdateMetricAlertSubscription.json | 2 +- .../createOrUpdateMetricAlertWithDimensions.json | 2 +- .../examples}/createOrUpdateWebTestMetricAlert.json | 2 +- .../examples/deleteMetricAlert.json | 2 +- .../examples/getDynamicMetricAlertMultipleResource.json | 2 +- .../examples/getDynamicMetricAlertSingleResource.json | 2 +- .../examples}/getMetricAlertMultipleResource.json | 2 +- .../examples/getMetricAlertQuery.json | 2 +- .../2026-01-01/examples}/getMetricAlertResourceGroup.json | 2 +- .../examples/getMetricAlertSingleResource.json | 2 +- .../2026-01-01/examples}/getMetricAlertStatus.json | 2 +- .../examples/getMetricAlertStatusByName.json | 2 +- .../2026-01-01/examples}/getMetricAlertSubscription.json | 2 +- .../2026-01-01/examples}/getWebTestMetricAlert.json | 2 +- .../examples/listByResourceGroupMetricAlert.json | 2 +- .../examples/listMetricAlert.json | 2 +- .../stable/{2026-06-01 => 2026-01-01}/metricAlert.json | 2 +- 55 files changed, 59 insertions(+), 59 deletions(-) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/UpdateMetricAlert.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/createOrUpdateDynamicMetricAlertMultipleResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/createOrUpdateDynamicMetricAlertSingleResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/createOrUpdateMetricAlertMultipleResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/createOrUpdateMetricAlertQuery.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/createOrUpdateMetricAlertQueryDT.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/createOrUpdateMetricAlertQueryMultiResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/createOrUpdateMetricAlertQueryResourceCentric.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/createOrUpdateMetricAlertResourceGroup.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/createOrUpdateMetricAlertSingleResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/createOrUpdateMetricAlertSubscription.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/createOrUpdateMetricAlertWithDimensions.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/createOrUpdateWebTestMetricAlert.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/deleteMetricAlert.json (89%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/getDynamicMetricAlertMultipleResource.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/getDynamicMetricAlertSingleResource.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/getMetricAlertMultipleResource.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/getMetricAlertQuery.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/getMetricAlertResourceGroup.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/getMetricAlertSingleResource.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/getMetricAlertStatus.json (97%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/getMetricAlertStatusByName.json (97%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/getMetricAlertSubscription.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{stable/2026-06-01/examples => MetricAlertApi/examples/2026-01-01}/getWebTestMetricAlert.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/listByResourceGroupMetricAlert.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/{2026-06-01 => 2026-01-01}/listMetricAlert.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/UpdateMetricAlert.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/createOrUpdateDynamicMetricAlertMultipleResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/createOrUpdateDynamicMetricAlertSingleResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/createOrUpdateMetricAlertMultipleResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/createOrUpdateMetricAlertQuery.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/createOrUpdateMetricAlertQueryDT.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/createOrUpdateMetricAlertQueryMultiResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/createOrUpdateMetricAlertQueryResourceCentric.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/createOrUpdateMetricAlertResourceGroup.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/createOrUpdateMetricAlertSingleResource.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/createOrUpdateMetricAlertSubscription.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/createOrUpdateMetricAlertWithDimensions.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/createOrUpdateWebTestMetricAlert.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/deleteMetricAlert.json (89%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/getDynamicMetricAlertMultipleResource.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/getDynamicMetricAlertSingleResource.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/getMetricAlertMultipleResource.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/getMetricAlertQuery.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/getMetricAlertResourceGroup.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/getMetricAlertSingleResource.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/getMetricAlertStatus.json (97%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/getMetricAlertStatusByName.json (97%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/getMetricAlertSubscription.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/{MetricAlertApi/examples/2026-06-01 => stable/2026-01-01/examples}/getWebTestMetricAlert.json (98%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/listByResourceGroupMetricAlert.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/examples/listMetricAlert.json (99%) rename specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/{2026-06-01 => 2026-01-01}/metricAlert.json (99%) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/UpdateMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/UpdateMetricAlert.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/UpdateMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/UpdateMetricAlert.json index 7be758f4ba45..9a197aa5daab 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/UpdateMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/UpdateMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "properties": { "description": "This is the description of the rule1", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json index a6463b59b6ea..3fd8f71970b5 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertSingleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json index 507b86a76b5a..ef64c4abcfa1 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertMultipleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json index 1900aec938a0..7a0f3548342c 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQuery.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json index fb4dcfcd251a..64827a428f0b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryDT.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json index be0578c59056..92a04c4ad205 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryMultiResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json index e6587b7cd1db..be7e16b7fe68 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryResourceCentric.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json index e76293fff641..09d1e3670734 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertResourceGroup.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json index 62dce464537c..d2ff028e4c44 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSingleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json index f3061d492fa9..563157d64114 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json index f8185931f4ce..7feeba64c265 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertWithDimensions.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json index b4398cf2140f..57234b918e14 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertWithDimensions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateWebTestMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json index 296f86ff8012..dad8082c8cc7 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/deleteMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/deleteMetricAlert.json similarity index 89% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/deleteMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/deleteMetricAlert.json index a3bbdbb40d30..599b2d7c60fe 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/deleteMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/deleteMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertMultipleResource.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertMultipleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertMultipleResource.json index 189092923ecb..707c4aa2d78b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertMultipleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "MetricAlertOnMultipleResources", "subscriptionId": "00000000-0000-0000-0000-000000000000" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertSingleResource.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertSingleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertSingleResource.json index ec3331283fda..471087ea7d48 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertSingleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "00000000-0000-0000-0000-000000000000" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertMultipleResource.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertMultipleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertMultipleResource.json index 15ceb8bc5115..57e4b82c6dba 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertMultipleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "MetricAlertOnMultipleResources", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertQuery.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertQuery.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertQuery.json index 69ce4ca59dc8..28bcdaee7d26 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertResourceGroup.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertResourceGroup.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertResourceGroup.json index 223c77aa37f1..bfa4a5fb0592 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest1", "ruleName": "MetricAlertAtResourceGroupLevel", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSingleResource.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSingleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSingleResource.json index 9085c72129ee..ed6b17a48270 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSingleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatus.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatus.json similarity index 97% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatus.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatus.json index 5a9ccf983799..0903851377b3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatus.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatus.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatusByName.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatusByName.json similarity index 97% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatusByName.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatusByName.json index 693b2e0b1fa9..f72119c8616a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatusByName.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatusByName.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "EastUs", "ruleName": "custom1", "statusName": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSubscription.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSubscription.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSubscription.json index 703a7aff0a65..0ba700493ec0 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSubscription.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "MetricAlertAtSubscriptionLevel", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getWebTestMetricAlert.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getWebTestMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getWebTestMetricAlert.json index b9d4ab54a162..f5fdc937f294 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getWebTestMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "rg-example", "ruleName": "webtest-name-example", "subscriptionId": "12345678-1234-1234-1234-123456789101" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listByResourceGroupMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listByResourceGroupMetricAlert.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listByResourceGroupMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listByResourceGroupMetricAlert.json index 776e2322d51b..8eafc029e86b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listByResourceGroupMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listByResourceGroupMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" }, diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listMetricAlert.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listMetricAlert.json index 83fa558e76b4..bcb8787e9e7a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/listMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" }, diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/main.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/main.tsp index 30b4bc220cde..d0793e8e67fd 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/main.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/main.tsp @@ -43,7 +43,7 @@ enum Versions { v2024_03_01_preview: "2024-03-01-preview", /** - * The 2026-06-01 API version. + * The 2026-01-01 API version. */ - v2026_06_01: "2026-06-01", + v2026_01_01: "2026-01-01", } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md index 231cc73ee70c..7985e92630e2 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md @@ -60,13 +60,13 @@ input-file: - stable/2021-10-01/networkSecurityPerimeter.json ``` -### Tag: package-2026-06-01 +### Tag: package-2026-01-01 -These settings apply only when `--tag=package-2026-06-01` is specified on the command line. +These settings apply only when `--tag=package-2026-01-01` is specified on the command line. -```yaml $(tag) == 'package-2026-06-01' +```yaml $(tag) == 'package-2026-01-01' input-file: - - stable/2026-06-01/metricAlert.json + - stable/2026-01-01/metricAlert.json ``` ### Tag: package-2026-03-01 diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/UpdateMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/UpdateMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json index 7be758f4ba45..9a197aa5daab 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/UpdateMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "properties": { "description": "This is the description of the rule1", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertMultipleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json index a6463b59b6ea..3fd8f71970b5 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json index 507b86a76b5a..ef64c4abcfa1 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertMultipleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json index 1900aec938a0..7a0f3548342c 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQuery.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json index fb4dcfcd251a..64827a428f0b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryDT.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json index be0578c59056..92a04c4ad205 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryMultiResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json index e6587b7cd1db..be7e16b7fe68 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json index e76293fff641..09d1e3670734 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertResourceGroup.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json index 62dce464537c..d2ff028e4c44 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSingleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json index f3061d492fa9..563157d64114 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json index f8185931f4ce..7feeba64c265 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertWithDimensions.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json index b4398cf2140f..57234b918e14 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateMetricAlertWithDimensions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateWebTestMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json index 296f86ff8012..dad8082c8cc7 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/createOrUpdateWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "parameters": { "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/deleteMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json similarity index 89% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/deleteMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json index a3bbdbb40d30..599b2d7c60fe 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/deleteMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertMultipleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json index 189092923ecb..707c4aa2d78b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "MetricAlertOnMultipleResources", "subscriptionId": "00000000-0000-0000-0000-000000000000" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertSingleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json index ec3331283fda..471087ea7d48 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "00000000-0000-0000-0000-000000000000" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertMultipleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json index 15ceb8bc5115..57e4b82c6dba 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "MetricAlertOnMultipleResources", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertQuery.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json index 69ce4ca59dc8..28bcdaee7d26 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertResourceGroup.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json index 223c77aa37f1..bfa4a5fb0592 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest1", "ruleName": "MetricAlertAtResourceGroupLevel", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSingleResource.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json index 9085c72129ee..ed6b17a48270 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatus.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json similarity index 97% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatus.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json index 5a9ccf983799..0903851377b3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertStatus.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "chiricutin", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatusByName.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json similarity index 97% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatusByName.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json index 693b2e0b1fa9..f72119c8616a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/getMetricAlertStatusByName.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "EastUs", "ruleName": "custom1", "statusName": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSubscription.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json index 703a7aff0a65..0ba700493ec0 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "ruleName": "MetricAlertAtSubscriptionLevel", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json similarity index 98% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getWebTestMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json index b9d4ab54a162..f5fdc937f294 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-06-01/getWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "rg-example", "ruleName": "webtest-name-example", "subscriptionId": "12345678-1234-1234-1234-123456789101" diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listByResourceGroupMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listByResourceGroupMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json index 776e2322d51b..8eafc029e86b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listByResourceGroupMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" }, diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listMetricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json index 83fa558e76b4..bcb8787e9e7a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/examples/listMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2026-06-01", + "api-version": "2026-01-01", "resourceGroupName": "gigtest", "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" }, diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json similarity index 99% rename from specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json rename to specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json index 70b9b854ef1e..c2fa7a404ff1 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-06-01/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "MonitorManagementClient", - "version": "2026-06-01", + "version": "2026-01-01", "description": "Azure Monitor client to create/update/delete metric based alerts.", "x-typespec-generated": [ { From e25710aed7ff6d579271353b02a5a3cccd7aecd7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Jun 2026 09:53:48 +0000 Subject: [PATCH 05/23] Regenerate MetricAlert swagger outputs for TypeSpec validation Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com> --- .../2024-03-01-preview/metricAlert.json | 113 ++++-------------- .../stable/2026-01-01/metricAlert.json | 35 ++++-- 2 files changed, 43 insertions(+), 105 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json index bddb5e12c910..2b11f2be7b9a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json @@ -72,7 +72,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -114,7 +114,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -163,7 +163,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -199,7 +199,7 @@ "tags": [ "MetricAlerts" ], - "description": "Create or update an metric alert definition.", + "description": "Create or update a metric alert definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -234,10 +234,16 @@ "$ref": "#/definitions/MetricAlertResource" } }, + "201": { + "description": "Resource 'MetricAlertResource' create operation succeeded", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -285,7 +291,7 @@ "tags": [ "MetricAlerts" ], - "description": "Update an metric alert definition.", + "description": "Update a metric alert definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -323,7 +329,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -367,7 +373,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -413,7 +419,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -466,7 +472,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -696,15 +702,6 @@ ], "additionalProperties": {} }, - "MetricAlertErrorResponse": { - "type": "object", - "description": "Describes the format of Error response.", - "properties": { - "error": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponseError" - } - } - }, "MetricAlertMultipleResourceMultipleMetricCriteria": { "type": "object", "description": "Specifies the metric alert criteria for multiple resource that has multiple metric criteria.", @@ -1138,87 +1135,17 @@ ] } }, - "Microsoft.Common.ErrorDetail": { - "type": "object", - "description": "Describes details of an error response.", - "properties": { - "code": { - "type": "string", - "description": "Unlocalized string which can be used to programmatically identify the error." - }, - "message": { - "type": "string", - "description": "Describes the error in detail and provides debugging information." - }, - "target": { - "type": "string", - "description": "The target of the particular error (for example, the name of the property in error)." - }, - "additionalInfo": { - "type": "array", - "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", - "items": { - "$ref": "#/definitions/Microsoft.Common.ErrorDetailAdditionalInfoItem" - } - } - } - }, - "Microsoft.Common.ErrorDetailAdditionalInfoItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The type of additional information." - }, - "info": { - "type": "object", - "description": "The additional information specific to the type.", - "additionalProperties": {} - } - } - }, - "Microsoft.Common.ErrorResponseError": { + "Microsoft.Common.ErrorResponse": { "type": "object", + "description": "Describes the format of Error response.", "properties": { "code": { "type": "string", - "description": "Unlocalized string which can be used to programmatically identify the error." + "description": "Error code" }, "message": { "type": "string", - "description": "Describes the error in detail and provides debugging information. If Accept-Language is set in the request, it must be localized to that language." - }, - "target": { - "type": "string", - "description": "The target of the particular error (for example, the name of the property in error)." - }, - "details": { - "type": "array", - "description": "An array of additional nested error response info objects, as described by this contract.", - "items": { - "$ref": "#/definitions/Microsoft.Common.ErrorDetail" - } - }, - "additionalInfo": { - "type": "array", - "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", - "items": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponseErrorAdditionalInfoItem" - } - } - } - }, - "Microsoft.Common.ErrorResponseErrorAdditionalInfoItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The type of additional information." - }, - "info": { - "type": "object", - "description": "The additional information specific to the type.", - "additionalProperties": {} + "description": "Error message indicating why the operation failed." } } }, diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json index c2fa7a404ff1..da2200072af0 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json @@ -72,7 +72,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -114,7 +114,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -163,7 +163,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -243,7 +243,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -329,7 +329,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -373,7 +373,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -419,7 +419,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -472,7 +472,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -735,9 +735,7 @@ "severity": { "type": "integer", "format": "int32", - "description": "Alert severity {0, 1, 2, 3, 4}", - "minimum": 0, - "maximum": 4 + "description": "Alert severity {0, 1, 2, 3, 4}" }, "enabled": { "type": "boolean", @@ -1137,6 +1135,20 @@ ] } }, + "Microsoft.Common.ErrorResponse": { + "type": "object", + "description": "Describes the format of Error response.", + "properties": { + "code": { + "type": "string", + "description": "Error code" + }, + "message": { + "type": "string", + "description": "Error message indicating why the operation failed." + } + } + }, "Microsoft.Common.Identity": { "type": "object", "description": "Identity for the resource.", @@ -1463,4 +1475,3 @@ }, "parameters": {} } - From 14216b0b6caf9e496fe5cc4c2f4089037ef299eb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Jun 2026 13:23:49 +0000 Subject: [PATCH 06/23] Initial plan From 562b137e5a85a2e088ef66f970635de64b14c975 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Jun 2026 13:31:29 +0000 Subject: [PATCH 07/23] Fix TypeSpec formatting in MetricAlertResource.tsp Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com> --- .../MetricAlertApi/MetricAlertResource.tsp | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp index f1366d95d79b..8d9a403c5f5e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp @@ -66,28 +66,29 @@ interface MetricAlertResources { * Retrieve an alert rule definition. */ @tag("MetricAlerts") - get is ArmResourceRead; + get is ArmResourceRead< + MetricAlertResource, + Error = Microsoft.Common.ErrorResponse + >; /** - * Create or update an metric alert definition. + * Create or update a metric alert definition. */ - #suppress "@azure-tools/typespec-azure-resource-manager/arm-put-operation-response-codes" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details" @tag("MetricAlerts") createOrUpdate is ArmResourceCreateOrReplaceSync< MetricAlertResource, - Response = ArmResourceUpdatedResponse, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** - * Update an metric alert definition. + * Update a metric alert definition. */ @patch(#{ implicitOptionality: false }) @tag("MetricAlerts") update is ArmCustomPatchSync< MetricAlertResource, PatchModel = MetricAlertResourcePatch, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -96,7 +97,7 @@ interface MetricAlertResources { @tag("MetricAlerts") delete is ArmResourceDeleteSync< MetricAlertResource, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -106,7 +107,7 @@ interface MetricAlertResources { listByResourceGroup is ArmResourceListByParent< MetricAlertResource, Response = ArmResponse, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -116,7 +117,7 @@ interface MetricAlertResources { listBySubscription is ArmListBySubscription< MetricAlertResource, Response = ArmResponse, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -136,7 +137,7 @@ interface MetricAlertResources { @segment("metricAlerts") ruleName: string; }, - Error = MetricAlertErrorResponse + Error = Microsoft.Common.ErrorResponse >; /** @@ -155,7 +156,7 @@ interface MetricAlertResources { @segment("status") statusName: string; }, - OverrideErrorType = MetricAlertErrorResponse + OverrideErrorType = Microsoft.Common.ErrorResponse >; } From 655bd3a31e7406c806af034312d78e0bd9c0e851 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 16 Jun 2026 14:29:38 +0300 Subject: [PATCH 08/23] Format ArmResourceRead method signature for better readability --- .../Insights/MetricAlertApi/MetricAlertResource.tsp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp index 63a344e9a7a1..8d9a403c5f5e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/MetricAlertResource.tsp @@ -66,7 +66,10 @@ interface MetricAlertResources { * Retrieve an alert rule definition. */ @tag("MetricAlerts") - get is ArmResourceRead; + get is ArmResourceRead< + MetricAlertResource, + Error = Microsoft.Common.ErrorResponse + >; /** * Create or update a metric alert definition. From 05ae3b14853eb73f6bbc812204ffc19cdf3954b9 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 16 Jun 2026 14:45:22 +0300 Subject: [PATCH 09/23] Remove trailing whitespace from Metric Alert API example JSON files --- .../MetricAlertApi/examples/2026-01-01/UpdateMetricAlert.json | 1 - .../createOrUpdateDynamicMetricAlertMultipleResource.json | 1 - .../createOrUpdateDynamicMetricAlertSingleResource.json | 1 - .../2026-01-01/createOrUpdateMetricAlertMultipleResource.json | 1 - .../examples/2026-01-01/createOrUpdateMetricAlertQuery.json | 1 - .../examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json | 1 - .../2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json | 1 - .../createOrUpdateMetricAlertQueryResourceCentric.json | 1 - .../2026-01-01/createOrUpdateMetricAlertResourceGroup.json | 1 - .../2026-01-01/createOrUpdateMetricAlertSingleResource.json | 1 - .../2026-01-01/createOrUpdateMetricAlertSubscription.json | 1 - .../2026-01-01/createOrUpdateMetricAlertWithDimensions.json | 1 - .../examples/2026-01-01/createOrUpdateWebTestMetricAlert.json | 1 - .../MetricAlertApi/examples/2026-01-01/deleteMetricAlert.json | 1 - .../2026-01-01/getDynamicMetricAlertMultipleResource.json | 1 - .../examples/2026-01-01/getDynamicMetricAlertSingleResource.json | 1 - .../examples/2026-01-01/getMetricAlertMultipleResource.json | 1 - .../MetricAlertApi/examples/2026-01-01/getMetricAlertQuery.json | 1 - .../examples/2026-01-01/getMetricAlertResourceGroup.json | 1 - .../examples/2026-01-01/getMetricAlertSingleResource.json | 1 - .../MetricAlertApi/examples/2026-01-01/getMetricAlertStatus.json | 1 - .../examples/2026-01-01/getMetricAlertStatusByName.json | 1 - .../examples/2026-01-01/getMetricAlertSubscription.json | 1 - .../examples/2026-01-01/getWebTestMetricAlert.json | 1 - .../examples/2026-01-01/listByResourceGroupMetricAlert.json | 1 - .../MetricAlertApi/examples/2026-01-01/listMetricAlert.json | 1 - 26 files changed, 26 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/UpdateMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/UpdateMetricAlert.json index 9a197aa5daab..563bbfbef909 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/UpdateMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/UpdateMetricAlert.json @@ -92,4 +92,3 @@ "operationId": "MetricAlerts_Update", "title": "Create or update an alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json index 3fd8f71970b5..6f62270e3b39 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -109,4 +109,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a dynamic alert rule for Multiple Resources" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json index ef64c4abcfa1..e46dae796e01 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json @@ -107,4 +107,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a dynamic alert rule for Single Resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json index 7a0f3548342c..ef922ec9d9de 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json @@ -101,4 +101,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rule for Multiple Resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json index 64827a428f0b..84ed42df34a9 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json @@ -117,4 +117,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a query based alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json index 92a04c4ad205..d3f7d193f511 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json @@ -123,4 +123,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a query based alert rule with dynamic threshold" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json index be7e16b7fe68..4b82dc3e51ce 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json @@ -117,4 +117,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a resource centric query based alert rule for Multiple Resources" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json index 09d1e3670734..356f99aa9e5b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json @@ -117,4 +117,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a resource centric query based alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json index d2ff028e4c44..c6cf625ba8a2 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json @@ -101,4 +101,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rule on Resource group(s)" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json index 563157d64114..c80dcac33b1b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json @@ -93,4 +93,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rule for Single Resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json index 7feeba64c265..3fce7e3dda30 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json @@ -99,4 +99,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rule on Subscription" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json index 57234b918e14..cc4e41b52cad 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json @@ -127,4 +127,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rules with dimensions" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json index dad8082c8cc7..bca4d8d15a6d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json @@ -66,4 +66,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a web test alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/deleteMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/deleteMetricAlert.json index 599b2d7c60fe..a7af169be157 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/deleteMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/deleteMetricAlert.json @@ -12,4 +12,3 @@ "operationId": "MetricAlerts_Delete", "title": "Delete an alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertMultipleResource.json index 707c4aa2d78b..bf6feaec906f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertMultipleResource.json @@ -63,4 +63,3 @@ "operationId": "MetricAlerts_Get", "title": "Get a dynamic alert rule for multiple resources" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertSingleResource.json index 471087ea7d48..35468eec43b4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getDynamicMetricAlertSingleResource.json @@ -61,4 +61,3 @@ "operationId": "MetricAlerts_Get", "title": "Get a dynamic alert rule for single resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertMultipleResource.json index 57e4b82c6dba..bdc6eb99a643 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertMultipleResource.json @@ -59,4 +59,3 @@ "operationId": "MetricAlerts_Get", "title": "Get an alert rule for multiple resources" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertQuery.json index 28bcdaee7d26..cbfb504ed9d5 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertQuery.json @@ -63,4 +63,3 @@ "operationId": "MetricAlerts_Get", "title": "Get a query based alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertResourceGroup.json index bfa4a5fb0592..857c46563dcf 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertResourceGroup.json @@ -59,4 +59,3 @@ "operationId": "MetricAlerts_Get", "title": "Get an alert rule on resource group(s)" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSingleResource.json index ed6b17a48270..cd93bf73fed4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSingleResource.json @@ -55,4 +55,3 @@ "operationId": "MetricAlerts_Get", "title": "Get an alert rule for single resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatus.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatus.json index 0903851377b3..13c70a5149fc 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatus.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatus.json @@ -29,4 +29,3 @@ "operationId": "MetricAlertsStatus_List", "title": "Get an alert rule status" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatusByName.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatusByName.json index f72119c8616a..88017eb016ac 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatusByName.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertStatusByName.json @@ -30,4 +30,3 @@ "operationId": "MetricAlertsStatus_ListByName", "title": "Get an alert rule status" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSubscription.json index 0ba700493ec0..c09c80d702a7 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getMetricAlertSubscription.json @@ -58,4 +58,3 @@ "operationId": "MetricAlerts_Get", "title": "Get an alert rule on subscription" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getWebTestMetricAlert.json index f5fdc937f294..c11a2ffccb8f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/getWebTestMetricAlert.json @@ -41,4 +41,3 @@ "operationId": "MetricAlerts_Get", "title": "Get a web test alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listByResourceGroupMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listByResourceGroupMetricAlert.json index 8eafc029e86b..c4b7cf12c68e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listByResourceGroupMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listByResourceGroupMetricAlert.json @@ -98,4 +98,3 @@ "operationId": "MetricAlerts_ListByResourceGroup", "title": "List metric alert rules" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listMetricAlert.json index bcb8787e9e7a..6e3391fd0ac3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/listMetricAlert.json @@ -98,4 +98,3 @@ "operationId": "MetricAlerts_ListBySubscription", "title": "List metric alert rules" } - From 820022124d1bfac6c363fcb6e079ee28905f4635 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 16 Jun 2026 14:49:51 +0300 Subject: [PATCH 10/23] Enhance metric alert examples with detailed properties and criteria - Added comprehensive response bodies for multiple metric alert examples, including dynamic and static threshold criteria. - Updated existing examples to include new properties such as actions, criteria, and tags for better clarity and usability. - Ensured consistency across examples for various alert types, including single resource, multiple resources, and subscription-level alerts. - Improved formatting and structure of JSON responses to align with best practices and enhance readability. --- ...ateDynamicMetricAlertMultipleResource.json | 54 ++++++++++++++- ...pdateDynamicMetricAlertSingleResource.json | 58 +++++++++++++++- ...teOrUpdateMetricAlertMultipleResource.json | 50 +++++++++++++- .../createOrUpdateMetricAlertQuery.json | 60 ++++++++++++++++- .../createOrUpdateMetricAlertQueryDT.json | 67 ++++++++++++++++++- ...OrUpdateMetricAlertQueryMultiResource.json | 60 ++++++++++++++++- ...UpdateMetricAlertQueryResourceCentric.json | 60 ++++++++++++++++- ...reateOrUpdateMetricAlertResourceGroup.json | 50 +++++++++++++- ...eateOrUpdateMetricAlertSingleResource.json | 46 ++++++++++++- ...createOrUpdateMetricAlertSubscription.json | 49 +++++++++++++- ...eateOrUpdateMetricAlertWithDimensions.json | 64 +++++++++++++++++- .../createOrUpdateWebTestMetricAlert.json | 32 ++++++++- 12 files changed, 634 insertions(+), 16 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json index 3fd8f71970b5..80dbb2fa67bb 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -104,9 +104,61 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a dynamic alert rule for Multiple Resources" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json index ef64c4abcfa1..8a37c14f330f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json @@ -26,7 +26,7 @@ "minFailingPeriodsToAlert": 4, "numberOfEvaluationPeriods": 4 }, - "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "ignoreDataBefore": "2019-04-04T21:00:00Z", "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", "operator": "GreaterOrLessThan", @@ -78,7 +78,60 @@ "minFailingPeriodsToAlert": 4, "numberOfEvaluationPeriods": 4 }, - "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "ignoreDataBefore": "2019-04-04T21:00:00Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00Z", "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", "operator": "GreaterOrLessThan", @@ -107,4 +160,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a dynamic alert rule for Single Resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json index 7a0f3548342c..dc2d99529610 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json @@ -96,9 +96,57 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rule for Multiple Resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json index 64827a428f0b..0a4695f2d970 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json @@ -112,9 +112,67 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a query based alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json index 92a04c4ad205..e216f8167687 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json @@ -25,7 +25,7 @@ "name": "Metric1", "alertSensitivity": "Medium", "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "ignoreDataBefore": "2019-04-04T21:00:00Z", "operator": "LessThan", "query": "avg({\"system.cpu.utilization\"})" } @@ -88,7 +88,69 @@ "name": "Metric1", "alertSensitivity": "Medium", "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "ignoreDataBefore": "2019-04-04T21:00:00Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00Z", "operator": "LessThan", "query": "avg({\"system.cpu.utilization\"})" } @@ -123,4 +185,3 @@ "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a query based alert rule with dynamic threshold" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json index be7e16b7fe68..affe24872108 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json @@ -112,9 +112,67 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a resource centric query based alert rule for Multiple Resources" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json index 09d1e3670734..c8a35b412d2f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json @@ -112,9 +112,67 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a resource centric query based alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json index d2ff028e4c44..fefa92514cec 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json @@ -96,9 +96,57 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rule on Resource group(s)" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json index 563157d64114..7b0f20961cbb 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json @@ -88,9 +88,53 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rule for Single Resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json index 7feeba64c265..539411d43452 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json @@ -94,9 +94,56 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rule on Subscription" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json index 57234b918e14..dc67c83216f6 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json @@ -122,9 +122,71 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.KeyVault/vaults", + "windowSize": "P1D" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update an alert rules with dimensions" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json index dad8082c8cc7..7a8b64f64ddf 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json @@ -61,9 +61,39 @@ } }, "headers": {} + }, + "201": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", "title": "Create or update a web test alert rule" } - From 6ebcacdba960bc156b7db70353cefb2540c2d1b3 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 16 Jun 2026 14:56:50 +0300 Subject: [PATCH 11/23] Remove trailing whitespace from multiple Metric Alert API example JSON files --- ...ateDynamicMetricAlertMultipleResource.json | 53 ++++++++++++++++ ...pdateDynamicMetricAlertSingleResource.json | 53 ++++++++++++++++ ...teOrUpdateMetricAlertMultipleResource.json | 49 +++++++++++++++ .../createOrUpdateMetricAlertQuery.json | 59 +++++++++++++++++ .../createOrUpdateMetricAlertQueryDT.json | 62 ++++++++++++++++++ ...OrUpdateMetricAlertQueryMultiResource.json | 59 +++++++++++++++++ ...UpdateMetricAlertQueryResourceCentric.json | 59 +++++++++++++++++ ...reateOrUpdateMetricAlertResourceGroup.json | 49 +++++++++++++++ ...eateOrUpdateMetricAlertSingleResource.json | 45 +++++++++++++ ...createOrUpdateMetricAlertSubscription.json | 48 ++++++++++++++ ...eateOrUpdateMetricAlertWithDimensions.json | 63 +++++++++++++++++++ .../createOrUpdateWebTestMetricAlert.json | 31 +++++++++ .../examples/UpdateMetricAlert.json | 1 - ...pdateDynamicMetricAlertSingleResource.json | 6 +- .../createOrUpdateMetricAlertQueryDT.json | 6 +- .../examples/deleteMetricAlert.json | 1 - ...getDynamicMetricAlertMultipleResource.json | 1 - .../getDynamicMetricAlertSingleResource.json | 1 - .../getMetricAlertMultipleResource.json | 1 - .../examples/getMetricAlertQuery.json | 1 - .../examples/getMetricAlertResourceGroup.json | 1 - .../getMetricAlertSingleResource.json | 1 - .../examples/getMetricAlertStatus.json | 1 - .../examples/getMetricAlertStatusByName.json | 1 - .../examples/getMetricAlertSubscription.json | 1 - .../examples/getWebTestMetricAlert.json | 1 - .../listByResourceGroupMetricAlert.json | 1 - .../2026-01-01/examples/listMetricAlert.json | 1 - 28 files changed, 636 insertions(+), 20 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json index 6f62270e3b39..80dbb2fa67bb 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -104,6 +104,59 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json index e46dae796e01..26dbfc957695 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateDynamicMetricAlertSingleResource.json @@ -102,6 +102,59 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json index ef922ec9d9de..dc2d99529610 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertMultipleResource.json @@ -96,6 +96,55 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json index 84ed42df34a9..0a4695f2d970 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQuery.json @@ -112,6 +112,65 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json index d3f7d193f511..005c41a9209d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json @@ -118,6 +118,68 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json index 4b82dc3e51ce..affe24872108 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryMultiResource.json @@ -112,6 +112,65 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json index 356f99aa9e5b..c8a35b412d2f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertQueryResourceCentric.json @@ -112,6 +112,65 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json index c6cf625ba8a2..fefa92514cec 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertResourceGroup.json @@ -96,6 +96,55 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json index c80dcac33b1b..7b0f20961cbb 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSingleResource.json @@ -88,6 +88,51 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json index 3fce7e3dda30..539411d43452 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertSubscription.json @@ -94,6 +94,54 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json index cc4e41b52cad..dc67c83216f6 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateMetricAlertWithDimensions.json @@ -122,6 +122,69 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.KeyVault/vaults", + "windowSize": "P1D" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json index bca4d8d15a6d..7a8b64f64ddf 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/MetricAlertApi/examples/2026-01-01/createOrUpdateWebTestMetricAlert.json @@ -61,6 +61,37 @@ } }, "headers": {} + }, + "201": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json index 9a197aa5daab..563bbfbef909 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json @@ -92,4 +92,3 @@ "operationId": "MetricAlerts_Update", "title": "Create or update an alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json index 8a37c14f330f..26dbfc957695 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json @@ -26,7 +26,7 @@ "minFailingPeriodsToAlert": 4, "numberOfEvaluationPeriods": 4 }, - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", "operator": "GreaterOrLessThan", @@ -78,7 +78,7 @@ "minFailingPeriodsToAlert": 4, "numberOfEvaluationPeriods": 4 }, - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", "operator": "GreaterOrLessThan", @@ -131,7 +131,7 @@ "minFailingPeriodsToAlert": 4, "numberOfEvaluationPeriods": 4 }, - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", "operator": "GreaterOrLessThan", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json index e216f8167687..005c41a9209d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json @@ -25,7 +25,7 @@ "name": "Metric1", "alertSensitivity": "Medium", "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "operator": "LessThan", "query": "avg({\"system.cpu.utilization\"})" } @@ -88,7 +88,7 @@ "name": "Metric1", "alertSensitivity": "Medium", "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "operator": "LessThan", "query": "avg({\"system.cpu.utilization\"})" } @@ -150,7 +150,7 @@ "name": "Metric1", "alertSensitivity": "Medium", "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "operator": "LessThan", "query": "avg({\"system.cpu.utilization\"})" } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json index 599b2d7c60fe..a7af169be157 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json @@ -12,4 +12,3 @@ "operationId": "MetricAlerts_Delete", "title": "Delete an alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json index 707c4aa2d78b..bf6feaec906f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json @@ -63,4 +63,3 @@ "operationId": "MetricAlerts_Get", "title": "Get a dynamic alert rule for multiple resources" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json index 471087ea7d48..35468eec43b4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json @@ -61,4 +61,3 @@ "operationId": "MetricAlerts_Get", "title": "Get a dynamic alert rule for single resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json index 57e4b82c6dba..bdc6eb99a643 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json @@ -59,4 +59,3 @@ "operationId": "MetricAlerts_Get", "title": "Get an alert rule for multiple resources" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json index 28bcdaee7d26..cbfb504ed9d5 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json @@ -63,4 +63,3 @@ "operationId": "MetricAlerts_Get", "title": "Get a query based alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json index bfa4a5fb0592..857c46563dcf 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json @@ -59,4 +59,3 @@ "operationId": "MetricAlerts_Get", "title": "Get an alert rule on resource group(s)" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json index ed6b17a48270..cd93bf73fed4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json @@ -55,4 +55,3 @@ "operationId": "MetricAlerts_Get", "title": "Get an alert rule for single resource" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json index 0903851377b3..13c70a5149fc 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json @@ -29,4 +29,3 @@ "operationId": "MetricAlertsStatus_List", "title": "Get an alert rule status" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json index f72119c8616a..88017eb016ac 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json @@ -30,4 +30,3 @@ "operationId": "MetricAlertsStatus_ListByName", "title": "Get an alert rule status" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json index 0ba700493ec0..c09c80d702a7 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json @@ -58,4 +58,3 @@ "operationId": "MetricAlerts_Get", "title": "Get an alert rule on subscription" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json index f5fdc937f294..c11a2ffccb8f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json @@ -41,4 +41,3 @@ "operationId": "MetricAlerts_Get", "title": "Get a web test alert rule" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json index 8eafc029e86b..c4b7cf12c68e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json @@ -98,4 +98,3 @@ "operationId": "MetricAlerts_ListByResourceGroup", "title": "List metric alert rules" } - diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json index bcb8787e9e7a..6e3391fd0ac3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json @@ -98,4 +98,3 @@ "operationId": "MetricAlerts_ListBySubscription", "title": "List metric alert rules" } - From 4dcbe5a1de449015cbe3ff178f51a748014e343c Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 16 Jun 2026 15:27:44 +0300 Subject: [PATCH 12/23] Revert preview swagger 2024-03-01-preview to fix LintDiff breaking changes The preview swagger metricAlert.json was inadvertently modified when the TypeSpec error model was updated (MetricAlertErrorResponse -> Microsoft.Common.ErrorResponse). Modifications to an existing published preview swagger are breaking changes. Restoring 2024-03-01-preview/metricAlert.json to its original state on main branch. The new error model only applies to the new stable 2026-01-01 swagger. --- .../2024-03-01-preview/metricAlert.json | 113 ++++++++++++++---- 1 file changed, 93 insertions(+), 20 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json index 2b11f2be7b9a..bddb5e12c910 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json @@ -72,7 +72,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + "$ref": "#/definitions/MetricAlertErrorResponse" } } }, @@ -114,7 +114,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + "$ref": "#/definitions/MetricAlertErrorResponse" } } }, @@ -163,7 +163,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + "$ref": "#/definitions/MetricAlertErrorResponse" } } }, @@ -199,7 +199,7 @@ "tags": [ "MetricAlerts" ], - "description": "Create or update a metric alert definition.", + "description": "Create or update an metric alert definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -234,16 +234,10 @@ "$ref": "#/definitions/MetricAlertResource" } }, - "201": { - "description": "Resource 'MetricAlertResource' create operation succeeded", - "schema": { - "$ref": "#/definitions/MetricAlertResource" - } - }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + "$ref": "#/definitions/MetricAlertErrorResponse" } } }, @@ -291,7 +285,7 @@ "tags": [ "MetricAlerts" ], - "description": "Update a metric alert definition.", + "description": "Update an metric alert definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -329,7 +323,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + "$ref": "#/definitions/MetricAlertErrorResponse" } } }, @@ -373,7 +367,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + "$ref": "#/definitions/MetricAlertErrorResponse" } } }, @@ -419,7 +413,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + "$ref": "#/definitions/MetricAlertErrorResponse" } } }, @@ -472,7 +466,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + "$ref": "#/definitions/MetricAlertErrorResponse" } } }, @@ -702,6 +696,15 @@ ], "additionalProperties": {} }, + "MetricAlertErrorResponse": { + "type": "object", + "description": "Describes the format of Error response.", + "properties": { + "error": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponseError" + } + } + }, "MetricAlertMultipleResourceMultipleMetricCriteria": { "type": "object", "description": "Specifies the metric alert criteria for multiple resource that has multiple metric criteria.", @@ -1135,17 +1138,87 @@ ] } }, - "Microsoft.Common.ErrorResponse": { + "Microsoft.Common.ErrorDetail": { "type": "object", - "description": "Describes the format of Error response.", + "description": "Describes details of an error response.", "properties": { "code": { "type": "string", - "description": "Error code" + "description": "Unlocalized string which can be used to programmatically identify the error." }, "message": { "type": "string", - "description": "Error message indicating why the operation failed." + "description": "Describes the error in detail and provides debugging information." + }, + "target": { + "type": "string", + "description": "The target of the particular error (for example, the name of the property in error)." + }, + "additionalInfo": { + "type": "array", + "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", + "items": { + "$ref": "#/definitions/Microsoft.Common.ErrorDetailAdditionalInfoItem" + } + } + } + }, + "Microsoft.Common.ErrorDetailAdditionalInfoItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of additional information." + }, + "info": { + "type": "object", + "description": "The additional information specific to the type.", + "additionalProperties": {} + } + } + }, + "Microsoft.Common.ErrorResponseError": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Unlocalized string which can be used to programmatically identify the error." + }, + "message": { + "type": "string", + "description": "Describes the error in detail and provides debugging information. If Accept-Language is set in the request, it must be localized to that language." + }, + "target": { + "type": "string", + "description": "The target of the particular error (for example, the name of the property in error)." + }, + "details": { + "type": "array", + "description": "An array of additional nested error response info objects, as described by this contract.", + "items": { + "$ref": "#/definitions/Microsoft.Common.ErrorDetail" + } + }, + "additionalInfo": { + "type": "array", + "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", + "items": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponseErrorAdditionalInfoItem" + } + } + } + }, + "Microsoft.Common.ErrorResponseErrorAdditionalInfoItem": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of additional information." + }, + "info": { + "type": "object", + "description": "The additional information specific to the type.", + "additionalProperties": {} } } }, From 43b11bf0e0d0b0b2e43c518b80bd823b7cd107f4 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 16 Jun 2026 15:46:40 +0300 Subject: [PATCH 13/23] Update error response references and descriptions in metricAlert.json --- .../2024-03-01-preview/metricAlert.json | 113 ++++-------------- 1 file changed, 20 insertions(+), 93 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json index bddb5e12c910..2b11f2be7b9a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/metricAlert.json @@ -72,7 +72,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -114,7 +114,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -163,7 +163,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -199,7 +199,7 @@ "tags": [ "MetricAlerts" ], - "description": "Create or update an metric alert definition.", + "description": "Create or update a metric alert definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -234,10 +234,16 @@ "$ref": "#/definitions/MetricAlertResource" } }, + "201": { + "description": "Resource 'MetricAlertResource' create operation succeeded", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -285,7 +291,7 @@ "tags": [ "MetricAlerts" ], - "description": "Update an metric alert definition.", + "description": "Update a metric alert definition.", "parameters": [ { "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -323,7 +329,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -367,7 +373,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -413,7 +419,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -466,7 +472,7 @@ "default": { "description": "An unexpected error response.", "schema": { - "$ref": "#/definitions/MetricAlertErrorResponse" + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" } } }, @@ -696,15 +702,6 @@ ], "additionalProperties": {} }, - "MetricAlertErrorResponse": { - "type": "object", - "description": "Describes the format of Error response.", - "properties": { - "error": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponseError" - } - } - }, "MetricAlertMultipleResourceMultipleMetricCriteria": { "type": "object", "description": "Specifies the metric alert criteria for multiple resource that has multiple metric criteria.", @@ -1138,87 +1135,17 @@ ] } }, - "Microsoft.Common.ErrorDetail": { - "type": "object", - "description": "Describes details of an error response.", - "properties": { - "code": { - "type": "string", - "description": "Unlocalized string which can be used to programmatically identify the error." - }, - "message": { - "type": "string", - "description": "Describes the error in detail and provides debugging information." - }, - "target": { - "type": "string", - "description": "The target of the particular error (for example, the name of the property in error)." - }, - "additionalInfo": { - "type": "array", - "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", - "items": { - "$ref": "#/definitions/Microsoft.Common.ErrorDetailAdditionalInfoItem" - } - } - } - }, - "Microsoft.Common.ErrorDetailAdditionalInfoItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The type of additional information." - }, - "info": { - "type": "object", - "description": "The additional information specific to the type.", - "additionalProperties": {} - } - } - }, - "Microsoft.Common.ErrorResponseError": { + "Microsoft.Common.ErrorResponse": { "type": "object", + "description": "Describes the format of Error response.", "properties": { "code": { "type": "string", - "description": "Unlocalized string which can be used to programmatically identify the error." + "description": "Error code" }, "message": { "type": "string", - "description": "Describes the error in detail and provides debugging information. If Accept-Language is set in the request, it must be localized to that language." - }, - "target": { - "type": "string", - "description": "The target of the particular error (for example, the name of the property in error)." - }, - "details": { - "type": "array", - "description": "An array of additional nested error response info objects, as described by this contract.", - "items": { - "$ref": "#/definitions/Microsoft.Common.ErrorDetail" - } - }, - "additionalInfo": { - "type": "array", - "description": "An array of objects with 'type' and 'info' properties. The schema of 'info' is service-specific and dependent on the 'type' string.", - "items": { - "$ref": "#/definitions/Microsoft.Common.ErrorResponseErrorAdditionalInfoItem" - } - } - } - }, - "Microsoft.Common.ErrorResponseErrorAdditionalInfoItem": { - "type": "object", - "properties": { - "type": { - "type": "string", - "description": "The type of additional information." - }, - "info": { - "type": "object", - "description": "The additional information specific to the type.", - "additionalProperties": {} + "description": "Error message indicating why the operation failed." } } }, From 9e333313d32ab1ee1c3529dd27c3d79a67c77861 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 16 Jun 2026 16:28:53 +0300 Subject: [PATCH 14/23] Update tag in readme.md to package-2026-01-01 and suppress example validations due to validator issues --- .../resource-manager/Microsoft.Insights/Insights/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md index 7985e92630e2..5bfb6d3e113a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md @@ -32,7 +32,7 @@ title: MonitorClient description: Monitor Management Client openapi-type: arm openapi-subtype: rpaas -tag: package-2025-08 +tag: package-2026-01-01 directive: - suppress: Example Validations reason: "There are open issues (bugs) in the validator affecting some of the examples and since there is no way to selectively disable the validation for a particular example or paths, all of the example validation is being turned off." From e544ddc8d9e5237c68a1077924e1135ec9df1fd2 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Tue, 16 Jun 2026 17:55:00 +0300 Subject: [PATCH 15/23] Update tag in readme.md to package-2025-08 and adjust input file paths for metricAlert.json --- .../resource-manager/Microsoft.Insights/Insights/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md index 5bfb6d3e113a..61415f69d07e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/readme.md @@ -32,7 +32,7 @@ title: MonitorClient description: Monitor Management Client openapi-type: arm openapi-subtype: rpaas -tag: package-2026-01-01 +tag: package-2025-08 directive: - suppress: Example Validations reason: "There are open issues (bugs) in the validator affecting some of the examples and since there is no way to selectively disable the validation for a particular example or paths, all of the example validation is being turned off." @@ -53,7 +53,7 @@ input-file: - stable/2016-03-01/logProfiles.json - stable/2024-02-01/metrics.json - stable/2026-01-01/activityLogAlerts_API.json - - preview/2024-03-01-preview/metricAlert.json + - stable/2026-01-01/metricAlert.json - stable/2026-03-01/scheduledQueryRule_API.json - stable/2019-03-01/metricBaselines.json - preview/2024-10-01-preview/actionGroups.json From 6cb83a9af46d147d53cf357413f02a0f3c0b1a48 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Wed, 17 Jun 2026 17:00:45 +0300 Subject: [PATCH 16/23] Enhance metricAlert.json: Add pagination support and improve descriptions for aggregation and operator types --- .../stable/2026-01-01/metricAlert.json | 49 +++++++++++-------- 1 file changed, 28 insertions(+), 21 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json index da2200072af0..3f0dc6ed0252 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json @@ -427,6 +427,9 @@ "Get an alert rule status": { "$ref": "./examples/getMetricAlertStatus.json" } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" } } }, @@ -466,7 +469,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/MetricAlertStatusCollection" + "$ref": "#/definitions/MetricAlertStatus" } }, "default": { @@ -502,27 +505,27 @@ { "name": "Average", "value": "Average", - "description": "Average" + "description": "The average aggregation." }, { "name": "Count", "value": "Count", - "description": "Count" + "description": "The count aggregation." }, { "name": "Minimum", "value": "Minimum", - "description": "Minimum" + "description": "The minimum aggregation." }, { "name": "Maximum", "value": "Maximum", - "description": "Maximum" + "description": "The maximum aggregation." }, { "name": "Total", "value": "Total", - "description": "Total" + "description": "The total aggregation." } ] } @@ -625,17 +628,17 @@ { "name": "GreaterThan", "value": "GreaterThan", - "description": "GreaterThan" + "description": "Greater than operator." }, { "name": "LessThan", "value": "LessThan", - "description": "LessThan" + "description": "Less than operator." }, { "name": "GreaterOrLessThan", "value": "GreaterOrLessThan", - "description": "GreaterOrLessThan" + "description": "Greater than or less than operator." } ] } @@ -655,17 +658,17 @@ { "name": "Low", "value": "Low", - "description": "Low" + "description": "Low sensitivity." }, { "name": "Medium", "value": "Medium", - "description": "Medium" + "description": "Medium sensitivity." }, { "name": "High", "value": "High", - "description": "High" + "description": "High sensitivity." } ] } @@ -1035,6 +1038,10 @@ "x-ms-identifiers": [ "id" ] + }, + "nextLink": { + "type": "string", + "description": "The link to the next page of items." } } }, @@ -1125,12 +1132,12 @@ { "name": "StaticThresholdCriterion", "value": "StaticThresholdCriterion", - "description": "StaticThresholdCriterion" + "description": "Static threshold criterion." }, { "name": "DynamicThresholdCriterion", "value": "DynamicThresholdCriterion", - "description": "DynamicThresholdCriterion" + "description": "Dynamic threshold criterion." } ] } @@ -1194,17 +1201,17 @@ { "name": "SystemAssigned", "value": "SystemAssigned", - "description": "SystemAssigned" + "description": "System assigned identity." }, { "name": "UserAssigned", "value": "UserAssigned", - "description": "UserAssigned" + "description": "User assigned identity." }, { "name": "None", "value": "None", - "description": "None" + "description": "No managed identity." } ] } @@ -1313,22 +1320,22 @@ { "name": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", "value": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", - "description": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + "description": "Alert criteria for a single resource with multiple metrics." }, { "name": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", "value": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - "description": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + "description": "Alert criteria for multiple resources with multiple metrics." }, { "name": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", "value": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", - "description": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" + "description": "Alert criteria for web test location availability." }, { "name": "Microsoft.Azure.Monitor.PromQLCriteria", "value": "Microsoft.Azure.Monitor.PromQLCriteria", - "description": "Microsoft.Azure.Monitor.PromQLCriteria" + "description": "Alert criteria for Prometheus QL queries." } ] } From 8ad03e272d791d1fc9b11d1a8bac09e1c636d6ad Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Sun, 21 Jun 2026 10:21:58 +0300 Subject: [PATCH 17/23] Refactor metricAlert.json: Simplify descriptions for aggregation, operator, and sensitivity types --- .../stable/2026-01-01/metricAlert.json | 49 ++++++++----------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json index 3f0dc6ed0252..da2200072af0 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json @@ -427,9 +427,6 @@ "Get an alert rule status": { "$ref": "./examples/getMetricAlertStatus.json" } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" } } }, @@ -469,7 +466,7 @@ "200": { "description": "Azure operation completed successfully.", "schema": { - "$ref": "#/definitions/MetricAlertStatus" + "$ref": "#/definitions/MetricAlertStatusCollection" } }, "default": { @@ -505,27 +502,27 @@ { "name": "Average", "value": "Average", - "description": "The average aggregation." + "description": "Average" }, { "name": "Count", "value": "Count", - "description": "The count aggregation." + "description": "Count" }, { "name": "Minimum", "value": "Minimum", - "description": "The minimum aggregation." + "description": "Minimum" }, { "name": "Maximum", "value": "Maximum", - "description": "The maximum aggregation." + "description": "Maximum" }, { "name": "Total", "value": "Total", - "description": "The total aggregation." + "description": "Total" } ] } @@ -628,17 +625,17 @@ { "name": "GreaterThan", "value": "GreaterThan", - "description": "Greater than operator." + "description": "GreaterThan" }, { "name": "LessThan", "value": "LessThan", - "description": "Less than operator." + "description": "LessThan" }, { "name": "GreaterOrLessThan", "value": "GreaterOrLessThan", - "description": "Greater than or less than operator." + "description": "GreaterOrLessThan" } ] } @@ -658,17 +655,17 @@ { "name": "Low", "value": "Low", - "description": "Low sensitivity." + "description": "Low" }, { "name": "Medium", "value": "Medium", - "description": "Medium sensitivity." + "description": "Medium" }, { "name": "High", "value": "High", - "description": "High sensitivity." + "description": "High" } ] } @@ -1038,10 +1035,6 @@ "x-ms-identifiers": [ "id" ] - }, - "nextLink": { - "type": "string", - "description": "The link to the next page of items." } } }, @@ -1132,12 +1125,12 @@ { "name": "StaticThresholdCriterion", "value": "StaticThresholdCriterion", - "description": "Static threshold criterion." + "description": "StaticThresholdCriterion" }, { "name": "DynamicThresholdCriterion", "value": "DynamicThresholdCriterion", - "description": "Dynamic threshold criterion." + "description": "DynamicThresholdCriterion" } ] } @@ -1201,17 +1194,17 @@ { "name": "SystemAssigned", "value": "SystemAssigned", - "description": "System assigned identity." + "description": "SystemAssigned" }, { "name": "UserAssigned", "value": "UserAssigned", - "description": "User assigned identity." + "description": "UserAssigned" }, { "name": "None", "value": "None", - "description": "No managed identity." + "description": "None" } ] } @@ -1320,22 +1313,22 @@ { "name": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", "value": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", - "description": "Alert criteria for a single resource with multiple metrics." + "description": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" }, { "name": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", "value": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", - "description": "Alert criteria for multiple resources with multiple metrics." + "description": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" }, { "name": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", "value": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", - "description": "Alert criteria for web test location availability." + "description": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" }, { "name": "Microsoft.Azure.Monitor.PromQLCriteria", "value": "Microsoft.Azure.Monitor.PromQLCriteria", - "description": "Alert criteria for Prometheus QL queries." + "description": "Microsoft.Azure.Monitor.PromQLCriteria" } ] } From 45d20627c822ea94e281943379d888a8182fa356 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Sun, 21 Jun 2026 14:53:07 +0300 Subject: [PATCH 18/23] Add examples for creating/updating metric alerts with various configurations - Added examples for creating/updating metric alerts for multiple resources, single resources, and resource groups. - Included dynamic threshold criteria and static threshold criteria in the examples. - Enhanced examples with identity, action properties, and custom properties. - Updated existing examples to reflect new naming conventions and structures. - Included webhook properties and failing periods in the alert configurations. - Added examples for web test metric alerts and alerts with dimensions. --- ...ateDynamicMetricAlertMultipleResource.json | 54 +++++++++++++++ ...pdateDynamicMetricAlertSingleResource.json | 58 +++++++++++++++- ...teOrUpdateMetricAlertMultipleResource.json | 50 ++++++++++++++ .../createOrUpdateMetricAlertQuery.json | 60 +++++++++++++++++ .../createOrUpdateMetricAlertQueryDT.json | 67 ++++++++++++++++++- ...OrUpdateMetricAlertQueryMultiResource.json | 60 +++++++++++++++++ ...UpdateMetricAlertQueryResourceCentric.json | 60 +++++++++++++++++ ...reateOrUpdateMetricAlertResourceGroup.json | 50 ++++++++++++++ ...eateOrUpdateMetricAlertSingleResource.json | 46 +++++++++++++ ...createOrUpdateMetricAlertSubscription.json | 49 ++++++++++++++ ...eateOrUpdateMetricAlertWithDimensions.json | 64 ++++++++++++++++++ .../createOrUpdateWebTestMetricAlert.json | 31 +++++++++ ...ateDynamicMetricAlertMultipleResource.json | 1 + ...pdateDynamicMetricAlertSingleResource.json | 1 + ...teOrUpdateMetricAlertMultipleResource.json | 1 + .../createOrUpdateMetricAlertQuery.json | 1 + .../createOrUpdateMetricAlertQueryDT.json | 1 + ...OrUpdateMetricAlertQueryMultiResource.json | 1 + ...UpdateMetricAlertQueryResourceCentric.json | 1 + ...reateOrUpdateMetricAlertResourceGroup.json | 1 + ...eateOrUpdateMetricAlertSingleResource.json | 1 + ...createOrUpdateMetricAlertSubscription.json | 1 + ...eateOrUpdateMetricAlertWithDimensions.json | 1 + 23 files changed, 656 insertions(+), 4 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertMultipleResource.json index 39defcb7dfd9..3f89673453b6 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -104,6 +104,60 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertOnMultipleResources", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertSingleResource.json index 64ae9ce34666..4707b3a1913c 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertSingleResource.json @@ -26,7 +26,7 @@ "minFailingPeriodsToAlert": 4, "numberOfEvaluationPeriods": 4 }, - "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "ignoreDataBefore": "2019-04-04T21:00:00Z", "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", "operator": "GreaterOrLessThan", @@ -78,7 +78,61 @@ "minFailingPeriodsToAlert": 4, "numberOfEvaluationPeriods": 4 }, - "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "ignoreDataBefore": "2019-04-04T21:00:00Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00Z", "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", "operator": "GreaterOrLessThan", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertMultipleResource.json index 5208fe8f6b07..c43fe590e55a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertMultipleResource.json @@ -96,6 +96,56 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertOnMultipleResources", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQuery.json index 61d269f3280b..f672beacc629 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQuery.json @@ -112,6 +112,66 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryDT.json index 4f985d0d8090..9bf6e4462a53 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryDT.json @@ -25,7 +25,7 @@ "name": "Metric1", "alertSensitivity": "Medium", "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "ignoreDataBefore": "2019-04-04T21:00:00Z", "operator": "LessThan", "query": "avg({\"system.cpu.utilization\"})" } @@ -88,7 +88,70 @@ "name": "Metric1", "alertSensitivity": "Medium", "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "ignoreDataBefore": "2019-04-04T21:00:00Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00Z", "operator": "LessThan", "query": "avg({\"system.cpu.utilization\"})" } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryMultiResource.json index edda89508691..8be58fd51f19 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryMultiResource.json @@ -112,6 +112,66 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryResourceCentric.json index 30c73885c6e8..8e7f2f190fcb 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryResourceCentric.json @@ -112,6 +112,66 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertResourceGroup.json index a42c02636a19..0f2079d467b7 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertResourceGroup.json @@ -96,6 +96,56 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertAtResourceGroupLevel", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSingleResource.json index 84009616f848..10e20dfb17e3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSingleResource.json @@ -88,6 +88,52 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSubscription.json index f34ca82428d3..b5e41461c38d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSubscription.json @@ -94,6 +94,55 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertAtSubscriptionLevel", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertWithDimensions.json index 9923bb1c863c..bce4c8b69be1 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertWithDimensions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertWithDimensions.json @@ -122,6 +122,70 @@ } }, "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertOnMultipleDimensions", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.KeyVault/vaults", + "windowSize": "P1D" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateWebTestMetricAlert.json index 9cda5ce7f9c8..de11444e496f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateWebTestMetricAlert.json @@ -61,6 +61,37 @@ } }, "headers": {} + }, + "201": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json index 80dbb2fa67bb..517b98d423be 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -108,6 +108,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertOnMultipleResources", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json index 26dbfc957695..a2f19fab0968 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json @@ -106,6 +106,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json index dc2d99529610..0838b9f591e1 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json @@ -100,6 +100,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertOnMultipleResources", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json index 0a4695f2d970..83e457498d9a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json @@ -116,6 +116,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json index 005c41a9209d..fddfb02796e1 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json @@ -122,6 +122,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json index affe24872108..0101cbef3a84 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json @@ -116,6 +116,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json index c8a35b412d2f..9250f2d53d83 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json @@ -116,6 +116,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json index fefa92514cec..61800e89104f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json @@ -100,6 +100,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertAtResourceGroupLevel", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json index 7b0f20961cbb..7ca881ec76a1 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json @@ -92,6 +92,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json index 539411d43452..2b18759a32f2 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json @@ -98,6 +98,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertAtSubscriptionLevel", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json index dc67c83216f6..f4e7007e0487 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json @@ -126,6 +126,7 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", + "name": "MetricAlertOnMultipleDimensions", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", "location": "global", "properties": { From cf8e9e8bf142915ee18002f45a655f63214cb723 Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Sun, 21 Jun 2026 15:44:40 +0300 Subject: [PATCH 19/23] Update metric alert example files from TypeSpec compilation --- ...ateDynamicMetricAlertMultipleResource.json | 54 --------------- ...pdateDynamicMetricAlertSingleResource.json | 58 +--------------- ...teOrUpdateMetricAlertMultipleResource.json | 50 -------------- .../createOrUpdateMetricAlertQuery.json | 60 ----------------- .../createOrUpdateMetricAlertQueryDT.json | 67 +------------------ ...OrUpdateMetricAlertQueryMultiResource.json | 60 ----------------- ...UpdateMetricAlertQueryResourceCentric.json | 60 ----------------- ...reateOrUpdateMetricAlertResourceGroup.json | 50 -------------- ...eateOrUpdateMetricAlertSingleResource.json | 46 ------------- ...createOrUpdateMetricAlertSubscription.json | 49 -------------- ...eateOrUpdateMetricAlertWithDimensions.json | 64 ------------------ .../createOrUpdateWebTestMetricAlert.json | 31 --------- ...ateDynamicMetricAlertMultipleResource.json | 1 - ...pdateDynamicMetricAlertSingleResource.json | 1 - ...teOrUpdateMetricAlertMultipleResource.json | 1 - .../createOrUpdateMetricAlertQuery.json | 1 - .../createOrUpdateMetricAlertQueryDT.json | 1 - ...OrUpdateMetricAlertQueryMultiResource.json | 1 - ...UpdateMetricAlertQueryResourceCentric.json | 1 - ...reateOrUpdateMetricAlertResourceGroup.json | 1 - ...eateOrUpdateMetricAlertSingleResource.json | 1 - ...createOrUpdateMetricAlertSubscription.json | 1 - ...eateOrUpdateMetricAlertWithDimensions.json | 1 - 23 files changed, 4 insertions(+), 656 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertMultipleResource.json index 3f89673453b6..39defcb7dfd9 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -104,60 +104,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertOnMultipleResources", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", - "location": "global", - "properties": { - "description": "This is the description of the rule1", - "actions": [ - { - "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - "webHookProperties": { - "key11": "value11", - "key12": "value12" - } - } - ], - "autoMitigate": true, - "criteria": { - "allOf": [ - { - "name": "High_CPU_80", - "alertSensitivity": "Medium", - "criterionType": "DynamicThresholdCriterion", - "dimensions": [], - "failingPeriods": { - "minFailingPeriodsToAlert": 4, - "numberOfEvaluationPeriods": 4 - }, - "metricName": "Percentage CPU", - "metricNamespace": "microsoft.compute/virtualmachines", - "operator": "GreaterOrLessThan", - "timeAggregation": "Average" - } - ], - "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "scopes": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" - ], - "severity": 3, - "targetResourceRegion": "southcentralus", - "targetResourceType": "Microsoft.Compute/virtualMachines", - "windowSize": "PT15M" - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertSingleResource.json index 4707b3a1913c..64ae9ce34666 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateDynamicMetricAlertSingleResource.json @@ -26,7 +26,7 @@ "minFailingPeriodsToAlert": 4, "numberOfEvaluationPeriods": 4 }, - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", "operator": "GreaterOrLessThan", @@ -78,61 +78,7 @@ "minFailingPeriodsToAlert": 4, "numberOfEvaluationPeriods": 4 }, - "ignoreDataBefore": "2019-04-04T21:00:00Z", - "metricName": "Percentage CPU", - "metricNamespace": "microsoft.compute/virtualmachines", - "operator": "GreaterOrLessThan", - "timeAggregation": "Average" - } - ], - "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "scopes": [ - "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" - ], - "severity": 3, - "targetResourceRegion": "southcentralus", - "targetResourceType": "Microsoft.Compute/virtualMachines", - "windowSize": "PT15M" - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", - "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", - "location": "global", - "properties": { - "description": "This is the description of the rule1", - "actions": [ - { - "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - "webHookProperties": { - "key11": "value11", - "key12": "value12" - } - } - ], - "autoMitigate": true, - "criteria": { - "allOf": [ - { - "name": "High_CPU_80", - "alertSensitivity": "Medium", - "criterionType": "DynamicThresholdCriterion", - "dimensions": [], - "failingPeriods": { - "minFailingPeriodsToAlert": 4, - "numberOfEvaluationPeriods": 4 - }, - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "metricName": "Percentage CPU", "metricNamespace": "microsoft.compute/virtualmachines", "operator": "GreaterOrLessThan", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertMultipleResource.json index c43fe590e55a..5208fe8f6b07 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertMultipleResource.json @@ -96,56 +96,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertOnMultipleResources", - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", - "location": "global", - "properties": { - "description": "This is the description of the rule1", - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - "webHookProperties": { - "key11": "value11", - "key12": "value12" - } - } - ], - "autoMitigate": true, - "criteria": { - "allOf": [ - { - "name": "High_CPU_80", - "criterionType": "StaticThresholdCriterion", - "dimensions": [], - "metricName": "Percentage CPU", - "metricNamespace": "microsoft.compute/virtualmachines", - "operator": "GreaterThan", - "threshold": 80.5, - "timeAggregation": "Average" - } - ], - "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" - ], - "severity": 3, - "targetResourceRegion": "southcentralus", - "targetResourceType": "Microsoft.Compute/virtualMachines", - "windowSize": "PT15M" - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQuery.json index f672beacc629..61d269f3280b 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQuery.json @@ -112,66 +112,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", - "identity": { - "type": "UserAssigned", - "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "userAssignedIdentities": { - "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { - "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", - "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" - } - } - }, - "location": "eastus", - "properties": { - "description": "This is the description of the rule1", - "actionProperties": { - "Email.Sujbect": "my custom email subject" - }, - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" - } - ], - "criteria": { - "allOf": [ - { - "name": "Metric1", - "criterionType": "StaticThresholdCriterion", - "query": "avg({\"system.cpu.utilization\"}) > 90" - } - ], - "failingPeriods": { - "for": "PT2M" - }, - "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" - }, - "customProperties": { - "key11": "value11", - "key12": "value12" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "resolveConfiguration": { - "autoResolved": true, - "timeToResolve": "PT10M" - }, - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" - ], - "severity": 3 - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryDT.json index 9bf6e4462a53..4f985d0d8090 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryDT.json @@ -25,7 +25,7 @@ "name": "Metric1", "alertSensitivity": "Medium", "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "operator": "LessThan", "query": "avg({\"system.cpu.utilization\"})" } @@ -88,70 +88,7 @@ "name": "Metric1", "alertSensitivity": "Medium", "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00Z", - "operator": "LessThan", - "query": "avg({\"system.cpu.utilization\"})" - } - ], - "failingPeriods": { - "for": "PT2M" - }, - "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" - }, - "customProperties": { - "key11": "value11", - "key12": "value12" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "resolveConfiguration": { - "autoResolved": true, - "timeToResolve": "PT10M" - }, - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" - ], - "severity": 3 - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", - "identity": { - "type": "UserAssigned", - "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "userAssignedIdentities": { - "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { - "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", - "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" - } - } - }, - "location": "eastus", - "properties": { - "description": "This is the description of the rule1", - "actionProperties": { - "Email.Sujbect": "my custom email subject" - }, - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" - } - ], - "criteria": { - "allOf": [ - { - "name": "Metric1", - "alertSensitivity": "Medium", - "criterionType": "DynamicThresholdCriterion", - "ignoreDataBefore": "2019-04-04T21:00:00Z", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", "operator": "LessThan", "query": "avg({\"system.cpu.utilization\"})" } diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryMultiResource.json index 8be58fd51f19..edda89508691 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryMultiResource.json @@ -112,66 +112,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", - "identity": { - "type": "UserAssigned", - "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "userAssignedIdentities": { - "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { - "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", - "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" - } - } - }, - "location": "eastus", - "properties": { - "description": "This is the description of the rule1", - "actionProperties": { - "Email.Sujbect": "my custom email subject" - }, - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" - } - ], - "criteria": { - "allOf": [ - { - "name": "Metric1", - "criterionType": "StaticThresholdCriterion", - "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" - } - ], - "failingPeriods": { - "for": "PT2M" - }, - "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" - }, - "customProperties": { - "key11": "value11", - "key12": "value12" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "resolveConfiguration": { - "autoResolved": true, - "timeToResolve": "PT10M" - }, - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" - ], - "severity": 3 - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryResourceCentric.json index 8e7f2f190fcb..30c73885c6e8 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertQueryResourceCentric.json @@ -112,66 +112,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", - "identity": { - "type": "UserAssigned", - "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", - "userAssignedIdentities": { - "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { - "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", - "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" - } - } - }, - "location": "eastus", - "properties": { - "description": "This is the description of the rule1", - "actionProperties": { - "Email.Sujbect": "my custom email subject" - }, - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" - } - ], - "criteria": { - "allOf": [ - { - "name": "Metric1", - "criterionType": "StaticThresholdCriterion", - "query": "avg({\"system.cpu.utilization\"}) > 90" - } - ], - "failingPeriods": { - "for": "PT2M" - }, - "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" - }, - "customProperties": { - "key11": "value11", - "key12": "value12" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "resolveConfiguration": { - "autoResolved": true, - "timeToResolve": "PT10M" - }, - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" - ], - "severity": 3 - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertResourceGroup.json index 0f2079d467b7..a42c02636a19 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertResourceGroup.json @@ -96,56 +96,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertAtResourceGroupLevel", - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", - "location": "global", - "properties": { - "description": "This is the description of the rule1", - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - "webHookProperties": { - "key11": "value11", - "key12": "value12" - } - } - ], - "autoMitigate": true, - "criteria": { - "allOf": [ - { - "name": "High_CPU_80", - "criterionType": "StaticThresholdCriterion", - "dimensions": [], - "metricName": "Percentage CPU", - "metricNamespace": "microsoft.compute/virtualmachines", - "operator": "GreaterThan", - "threshold": 80.5, - "timeAggregation": "Average" - } - ], - "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" - ], - "severity": 3, - "targetResourceRegion": "southcentralus", - "targetResourceType": "Microsoft.Compute/virtualMachines", - "windowSize": "PT15M" - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSingleResource.json index 10e20dfb17e3..84009616f848 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSingleResource.json @@ -88,52 +88,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", - "location": "global", - "properties": { - "description": "This is the description of the rule1", - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - "webHookProperties": { - "key11": "value11", - "key12": "value12" - } - } - ], - "autoMitigate": true, - "criteria": { - "allOf": [ - { - "name": "High_CPU_80", - "criterionType": "StaticThresholdCriterion", - "dimensions": [], - "metricName": "\\Processor(_Total)\\% Processor Time", - "operator": "GreaterThan", - "threshold": 80.5, - "timeAggregation": "Average" - } - ], - "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" - ], - "severity": 3, - "windowSize": "PT15M" - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSubscription.json index b5e41461c38d..f34ca82428d3 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertSubscription.json @@ -94,55 +94,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertAtSubscriptionLevel", - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", - "location": "global", - "properties": { - "description": "This is the description of the rule1", - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - "webHookProperties": { - "key11": "value11", - "key12": "value12" - } - } - ], - "autoMitigate": true, - "criteria": { - "allOf": [ - { - "name": "High_CPU_80", - "criterionType": "StaticThresholdCriterion", - "dimensions": [], - "metricName": "Percentage CPU", - "metricNamespace": "microsoft.compute/virtualmachines", - "operator": "GreaterThan", - "threshold": 80.5, - "timeAggregation": "Average" - } - ], - "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" - ], - "severity": 3, - "targetResourceRegion": "southcentralus", - "targetResourceType": "Microsoft.Compute/virtualMachines", - "windowSize": "PT15M" - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertWithDimensions.json index bce4c8b69be1..9923bb1c863c 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertWithDimensions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateMetricAlertWithDimensions.json @@ -122,70 +122,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertOnMultipleDimensions", - "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", - "location": "global", - "properties": { - "description": "This is the description of the rule1", - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", - "webHookProperties": { - "key11": "value11", - "key12": "value12" - } - } - ], - "autoMitigate": true, - "criteria": { - "allOf": [ - { - "name": "Metric1", - "criterionType": "StaticThresholdCriterion", - "dimensions": [ - { - "name": "ActivityName", - "operator": "Include", - "values": [ - "*" - ] - }, - { - "name": "StatusCode", - "operator": "Include", - "values": [ - "200" - ] - } - ], - "metricName": "Availability", - "metricNamespace": "Microsoft.KeyVault/vaults", - "operator": "GreaterThan", - "threshold": 55, - "timeAggregation": "Average" - } - ], - "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" - }, - "enabled": true, - "evaluationFrequency": "PT1H", - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" - ], - "severity": 3, - "targetResourceRegion": "southcentralus", - "targetResourceType": "Microsoft.KeyVault/vaults", - "windowSize": "P1D" - }, - "tags": { - "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateWebTestMetricAlert.json index de11444e496f..9cda5ce7f9c8 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateWebTestMetricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/preview/2024-03-01-preview/examples/createOrUpdateWebTestMetricAlert.json @@ -61,37 +61,6 @@ } }, "headers": {} - }, - "201": { - "body": { - "name": "webtest-name-example", - "type": "Microsoft.Insights/metricAlerts", - "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", - "location": "global", - "properties": { - "description": "Automatically created alert rule for availability test \"webtest-name-example\" a", - "actions": [], - "criteria": { - "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", - "failedLocationCount": 2, - "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", - "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" - }, - "enabled": true, - "evaluationFrequency": "PT1M", - "scopes": [ - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", - "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" - ], - "severity": 4, - "windowSize": "PT15M" - }, - "tags": { - "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", - "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" - } - }, - "headers": {} } }, "operationId": "MetricAlerts_CreateOrUpdate", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json index 517b98d423be..80dbb2fa67bb 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -108,7 +108,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertOnMultipleResources", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json index a2f19fab0968..26dbfc957695 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json @@ -106,7 +106,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json index 0838b9f591e1..dc2d99529610 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json @@ -100,7 +100,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertOnMultipleResources", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json index 83e457498d9a..0a4695f2d970 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json @@ -116,7 +116,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json index fddfb02796e1..005c41a9209d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json @@ -122,7 +122,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json index 0101cbef3a84..affe24872108 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json @@ -116,7 +116,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json index 9250f2d53d83..c8a35b412d2f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json @@ -116,7 +116,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "identity": { "type": "UserAssigned", diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json index 61800e89104f..fefa92514cec 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json @@ -100,7 +100,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertAtResourceGroupLevel", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json index 7ca881ec76a1..7b0f20961cbb 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json @@ -92,7 +92,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "chiricutin", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json index 2b18759a32f2..539411d43452 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json @@ -98,7 +98,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertAtSubscriptionLevel", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", "location": "global", "properties": { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json index f4e7007e0487..dc67c83216f6 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json @@ -126,7 +126,6 @@ "201": { "body": { "type": "Microsoft.Insights/metricAlerts", - "name": "MetricAlertOnMultipleDimensions", "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", "location": "global", "properties": { From 99106fe0ea05ead955aa6b9be8ca42852ad6697e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 14:16:30 +0000 Subject: [PATCH 20/23] Initial plan From 0ba7f30fdc088ec54d849b3b18ce7a22578c56dd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 14:54:16 +0000 Subject: [PATCH 21/23] Add GA stable/2026-01-01/metricAlert.json swagger, examples, and single-version readme.md to fix Avocado MULTIPLE_API_VERSION MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The failing CI job (Swagger Avocado - Analyze Code) reported MULTIPLE_API_VERSION on Insights/readme.md because its default tag package-2025-08 contains swaggers from many different API version folders (2015–2026). The fix avoids touching Insights/readme.md (which would re-trigger the check) by: 1. Adding the GA stable/2026-01-01/metricAlert.json swagger generated from TypeSpec 2. Adding all stable/2026-01-01/examples/ metric alert example files 3. Adding stable/2026-01-01/readme.md with a single-version default tag (package-2026-01-01) referencing both activityLogAlerts_API.json and metricAlert.json With readme.md present in stable/2026-01-01/, avocado's findTheNearestReadme traces the new swagger files to this single-version readme (no MULTIPLE_API_VERSION), and Insights/readme.md with its composite multi-version default tag is never evaluated. Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com> --- .../examples/UpdateMetricAlert.json | 94 ++ ...ateDynamicMetricAlertMultipleResource.json | 164 ++ ...pdateDynamicMetricAlertSingleResource.json | 162 ++ ...teOrUpdateMetricAlertMultipleResource.json | 152 ++ .../createOrUpdateMetricAlertQuery.json | 178 ++ .../createOrUpdateMetricAlertQueryDT.json | 187 +++ ...OrUpdateMetricAlertQueryMultiResource.json | 178 ++ ...UpdateMetricAlertQueryResourceCentric.json | 178 ++ ...reateOrUpdateMetricAlertResourceGroup.json | 152 ++ ...eateOrUpdateMetricAlertSingleResource.json | 140 ++ ...createOrUpdateMetricAlertSubscription.json | 149 ++ ...eateOrUpdateMetricAlertWithDimensions.json | 192 +++ .../createOrUpdateWebTestMetricAlert.json | 99 ++ .../examples/deleteMetricAlert.json | 14 + ...getDynamicMetricAlertMultipleResource.json | 65 + .../getDynamicMetricAlertSingleResource.json | 63 + .../getMetricAlertMultipleResource.json | 61 + .../examples/getMetricAlertQuery.json | 65 + .../examples/getMetricAlertResourceGroup.json | 61 + .../getMetricAlertSingleResource.json | 57 + .../examples/getMetricAlertStatus.json | 31 + .../examples/getMetricAlertStatusByName.json | 32 + .../examples/getMetricAlertSubscription.json | 60 + .../examples/getWebTestMetricAlert.json | 43 + .../listByResourceGroupMetricAlert.json | 100 ++ .../2026-01-01/examples/listMetricAlert.json | 100 ++ .../stable/2026-01-01/metricAlert.json | 1477 +++++++++++++++++ .../Insights/stable/2026-01-01/readme.md | 23 + 28 files changed, 4277 insertions(+) create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/readme.md diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json new file mode 100644 index 000000000000..563bbfbef909 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/UpdateMetricAlert.json @@ -0,0 +1,94 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Update", + "title": "Create or update an alert rule" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json new file mode 100644 index 000000000000..80dbb2fa67bb --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertMultipleResource.json @@ -0,0 +1,164 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a dynamic alert rule for Multiple Resources" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json new file mode 100644 index 000000000000..26dbfc957695 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateDynamicMetricAlertSingleResource.json @@ -0,0 +1,162 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a dynamic alert rule for Single Resource" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json new file mode 100644 index 000000000000..dc2d99529610 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertMultipleResource.json @@ -0,0 +1,152 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule for Multiple Resource" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json new file mode 100644 index 000000000000..0a4695f2d970 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json @@ -0,0 +1,178 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a query based alert rule" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json new file mode 100644 index 000000000000..005c41a9209d --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json @@ -0,0 +1,187 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "ignoreDataBefore": "2019-04-04T21:00:00.000Z", + "operator": "LessThan", + "query": "avg({\"system.cpu.utilization\"})" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a query based alert rule with dynamic threshold" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json new file mode 100644 index 000000000000..affe24872108 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json @@ -0,0 +1,178 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) by (\"microsoft.resourceid\") > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a resource centric query based alert rule for Multiple Resources" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json new file mode 100644 index 000000000000..c8a35b412d2f --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json @@ -0,0 +1,178 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "identity": { + "type": "UserAssigned", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": {} + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT5M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actionProperties": { + "Email.Sujbect": "my custom email subject" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2" + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "avg({\"system.cpu.utilization\"}) > 90" + } + ], + "failingPeriods": { + "for": "PT2M" + }, + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "customProperties": { + "key11": "value11", + "key12": "value12" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.compute/virtualMachines/myVmName" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a resource centric query based alert rule" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json new file mode 100644 index 000000000000..fefa92514cec --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertResourceGroup.json @@ -0,0 +1,152 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest1", + "ruleName": "MetricAlertAtResourceGroupLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule on Resource group(s)" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json new file mode 100644 index 000000000000..7b0f20961cbb --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSingleResource.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule for Single Resource" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json new file mode 100644 index 000000000000..539411d43452 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertSubscription.json @@ -0,0 +1,149 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertAtSubscriptionLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rule on Subscription" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json new file mode 100644 index 000000000000..dc67c83216f6 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertWithDimensions.json @@ -0,0 +1,192 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "windowSize": "P1D" + }, + "tags": {} + }, + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleDimensions", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.KeyVault/vaults", + "windowSize": "P1D" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertWithDimensions", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": true, + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "dimensions": [ + { + "name": "ActivityName", + "operator": "Include", + "values": [ + "*" + ] + }, + { + "name": "StatusCode", + "operator": "Include", + "values": [ + "200" + ] + } + ], + "metricName": "Availability", + "metricNamespace": "Microsoft.KeyVault/vaults", + "operator": "GreaterThan", + "threshold": 55, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1H", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.KeyVault/vaults/keyVaultResource" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.KeyVault/vaults", + "windowSize": "P1D" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update an alert rules with dimensions" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json new file mode 100644 index 000000000000..7a8b64f64ddf --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateWebTestMetricAlert.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "parameters": { + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"component-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/webtest-name-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/component-example": "Resource" + } + }, + "resourceGroupName": "rg-example", + "ruleName": "webtest-name-example", + "subscriptionId": "12345678-1234-1234-1234-123456789101" + }, + "responses": { + "200": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} + }, + "201": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\" a", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_CreateOrUpdate", + "title": "Create or update a web test alert rule" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json new file mode 100644 index 000000000000..a7af169be157 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/deleteMetricAlert.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": {}, + "204": {} + }, + "operationId": "MetricAlerts_Delete", + "title": "Delete an alert rule" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json new file mode 100644 index 000000000000..bf6feaec906f --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertMultipleResource.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a dynamic alert rule for multiple resources" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json new file mode 100644 index 000000000000..35468eec43b4 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getDynamicMetricAlertSingleResource.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "00000000-0000-0000-0000-000000000000" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "alertSensitivity": "Medium", + "criterionType": "DynamicThresholdCriterion", + "dimensions": [], + "failingPeriods": { + "minFailingPeriodsToAlert": 4, + "numberOfEvaluationPeriods": 4 + }, + "ignoreDataBefore": null, + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterOrLessThan", + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a dynamic alert rule for single resource" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json new file mode 100644 index 000000000000..bdc6eb99a643 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertMultipleResource.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertOnMultipleResources", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule for multiple resources" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json new file mode 100644 index 000000000000..cbfb504ed9d5 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertQuery.json @@ -0,0 +1,65 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "identity": { + "type": "UserAssigned", + "tenantId": "72f988bf-86f1-41af-91ab-2d7cd011db47", + "userAssignedIdentities": { + "/subscriptions/2f1a501a-6e1d-4f37-a445-462d7f8a563d/resourceGroups/AdisTest/providers/Microsoft.ManagedIdentity/userAssignedIdentities/msi-test-euap": { + "clientId": "778f4d04-3c60-4622-a839-5cf05866c983", + "principalId": "669dd76d-cde8-4dc3-b882-1de566b0c628" + } + } + }, + "location": "eastus", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "Metric1", + "criterionType": "StaticThresholdCriterion", + "query": "floor(minute(vector(time())) / 10 ) % 2 == 1" + } + ], + "odata.type": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/microsoft.monitor/accounts/gigwadme" + ], + "severity": 3 + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a query based alert rule" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json new file mode 100644 index 000000000000..857c46563dcf --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertResourceGroup.json @@ -0,0 +1,61 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest1", + "ruleName": "MetricAlertAtResourceGroupLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1/providers/providers/microsoft.insights/metricalerts/MetricAlertAtResourceGroupLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest1", + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest2" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule on resource group(s)" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json new file mode 100644 index 000000000000..cd93bf73fed4 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSingleResource.json @@ -0,0 +1,57 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule for single resource" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json new file mode 100644 index 000000000000..13c70a5149fc --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatus.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "ruleName": "chiricutin", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", + "type": "Microsoft.Insights/metricAlerts/status", + "id": "/subscriptions/009f6022-67ec-423e-9aa7-691182870588/resourceGroups/EastUs/providers/microsoft.insights/metricAlerts/LeoAlert_custom1", + "properties": { + "dimensions": { + "resourceId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + }, + "status": "Healthy", + "timestamp": "2018-01-17T20:17:25.6293237Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlertsStatus_List", + "title": "Get an alert rule status" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json new file mode 100644 index 000000000000..88017eb016ac --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertStatusByName.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "EastUs", + "ruleName": "custom1", + "statusName": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", + "subscriptionId": "009f6022-67ec-423e-9aa7-691182870588" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "cmVzb3VyY2VJZD0vc3Vic2NyaXB0aW9ucy8xNGRkZjBjNS03N2M1LTRiNTMtODRmNi1lMWZhNDNhZDY4ZjcvcmVzb3VyY2VHcm91cHMvZ2lndGVzdC9wcm92aWRlcnMvTWljcm9zb2Z0LkNvbXB1dGUvdmlydHVhbE1hY2hpbmVzL2dpZ3dhZG1l", + "type": "Microsoft.Insights/metricAlerts/status", + "id": "/subscriptions/009f6022-67ec-423e-9aa7-691182870588/resourceGroups/EastUs/providers/microsoft.insights/metricAlerts/custom1", + "properties": { + "dimensions": { + "resourceId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + }, + "status": "Healthy", + "timestamp": "2018-01-17T20:17:25.6293237Z" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlertsStatus_ListByName", + "title": "Get an alert rule status" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json new file mode 100644 index 000000000000..c09c80d702a7 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getMetricAlertSubscription.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "ruleName": "MetricAlertAtSubscriptionLevel", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertAtSubscriptionLevel", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "autoMitigate": false, + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "Percentage CPU", + "metricNamespace": "microsoft.compute/virtualmachines", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + ], + "severity": 3, + "targetResourceRegion": "southcentralus", + "targetResourceType": "Microsoft.Compute/virtualMachines", + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get an alert rule on subscription" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json new file mode 100644 index 000000000000..c11a2ffccb8f --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/getWebTestMetricAlert.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "rg-example", + "ruleName": "webtest-name-example", + "subscriptionId": "12345678-1234-1234-1234-123456789101" + }, + "responses": { + "200": { + "body": { + "name": "webtest-name-example", + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/metricalerts/webtest-name-example", + "location": "global", + "properties": { + "description": "Automatically created alert rule for availability test \"webtest-name-example\"", + "actions": [], + "criteria": { + "componentId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example", + "failedLocationCount": 2, + "odata.type": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "webTestId": "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example", + "/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/components/component-example": "Resource", + "hidden-link:/subscriptions/12345678-1234-1234-1234-123456789101/resourcegroups/rg-example/providers/microsoft.insights/webtests/webtest-name-example": "Resource" + } + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_Get", + "title": "Get a web test alert rule" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json new file mode 100644 index 000000000000..c4b7cf12c68e --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listByResourceGroupMetricAlert.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/highcpu", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/mediumcpu", + "location": "global", + "properties": { + "description": "Med cpu alert", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "Medium_CPU_50", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 50.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_ListByResourceGroup", + "title": "List metric alert rules" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json new file mode 100644 index 000000000000..6e3391fd0ac3 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/listMetricAlert.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2026-01-01", + "resourceGroupName": "gigtest", + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/highcpu", + "location": "global", + "properties": { + "description": "This is the description of the rule1", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "High_CPU_80", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 80.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 3, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + }, + { + "type": "Microsoft.Insights/metricAlerts", + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/mediumcpu", + "location": "global", + "properties": { + "description": "Med cpu alert", + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2", + "webHookProperties": { + "key11": "value11", + "key12": "value12" + } + } + ], + "criteria": { + "allOf": [ + { + "name": "Medium_CPU_50", + "criterionType": "StaticThresholdCriterion", + "dimensions": [], + "metricName": "CustomMetric_\\Processor(_Total)\\% Processor Time", + "operator": "GreaterThan", + "threshold": 50.5, + "timeAggregation": "Average" + } + ], + "odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "enabled": true, + "evaluationFrequency": "PT1M", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme" + ], + "severity": 4, + "windowSize": "PT15M" + }, + "tags": { + "hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource" + } + } + ] + }, + "headers": {} + } + }, + "operationId": "MetricAlerts_ListBySubscription", + "title": "List metric alert rules" +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json new file mode 100644 index 000000000000..da2200072af0 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json @@ -0,0 +1,1477 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "version": "2026-01-01", + "description": "Azure Monitor client to create/update/delete metric based alerts.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "host": "management.azure.com", + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "description": "Azure Active Directory OAuth2 Flow.", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "tags": [ + { + "name": "MetricAlerts" + }, + { + "name": "MetricAlertsStatus" + } + ], + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.Insights/metricAlerts": { + "get": { + "operationId": "MetricAlerts_ListBySubscription", + "tags": [ + "MetricAlerts" + ], + "description": "Retrieve alert rule definitions in a subscription.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertResourceCollection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + } + } + }, + "x-ms-examples": { + "List metric alert rules": { + "$ref": "./examples/listMetricAlert.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts": { + "get": { + "operationId": "MetricAlerts_ListByResourceGroup", + "tags": [ + "MetricAlerts" + ], + "description": "Retrieve alert rule definitions in a resource group.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertResourceCollection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + } + } + }, + "x-ms-examples": { + "List metric alert rules": { + "$ref": "./examples/listByResourceGroupMetricAlert.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}": { + "get": { + "operationId": "MetricAlerts_Get", + "tags": [ + "MetricAlerts" + ], + "description": "Retrieve an alert rule definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get a dynamic alert rule for multiple resources": { + "$ref": "./examples/getDynamicMetricAlertMultipleResource.json" + }, + "Get a dynamic alert rule for single resource": { + "$ref": "./examples/getDynamicMetricAlertSingleResource.json" + }, + "Get a query based alert rule": { + "$ref": "./examples/getMetricAlertQuery.json" + }, + "Get a web test alert rule": { + "$ref": "./examples/getWebTestMetricAlert.json" + }, + "Get an alert rule for multiple resources": { + "$ref": "./examples/getMetricAlertMultipleResource.json" + }, + "Get an alert rule for single resource": { + "$ref": "./examples/getMetricAlertSingleResource.json" + }, + "Get an alert rule on resource group(s)": { + "$ref": "./examples/getMetricAlertResourceGroup.json" + }, + "Get an alert rule on subscription": { + "$ref": "./examples/getMetricAlertSubscription.json" + } + } + }, + "put": { + "operationId": "MetricAlerts_CreateOrUpdate", + "tags": [ + "MetricAlerts" + ], + "description": "Create or update a metric alert definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters of the rule to create or update.", + "required": true, + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + } + ], + "responses": { + "200": { + "description": "Resource 'MetricAlertResource' update operation succeeded", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, + "201": { + "description": "Resource 'MetricAlertResource' create operation succeeded", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + } + } + }, + "x-ms-examples": { + "Create or update a dynamic alert rule for Multiple Resources": { + "$ref": "./examples/createOrUpdateDynamicMetricAlertMultipleResource.json" + }, + "Create or update a dynamic alert rule for Single Resource": { + "$ref": "./examples/createOrUpdateDynamicMetricAlertSingleResource.json" + }, + "Create or update a query based alert rule": { + "$ref": "./examples/createOrUpdateMetricAlertQuery.json" + }, + "Create or update a query based alert rule with dynamic threshold": { + "$ref": "./examples/createOrUpdateMetricAlertQueryDT.json" + }, + "Create or update a resource centric query based alert rule": { + "$ref": "./examples/createOrUpdateMetricAlertQueryResourceCentric.json" + }, + "Create or update a resource centric query based alert rule for Multiple Resources": { + "$ref": "./examples/createOrUpdateMetricAlertQueryMultiResource.json" + }, + "Create or update a web test alert rule": { + "$ref": "./examples/createOrUpdateWebTestMetricAlert.json" + }, + "Create or update an alert rule for Multiple Resource": { + "$ref": "./examples/createOrUpdateMetricAlertMultipleResource.json" + }, + "Create or update an alert rule for Single Resource": { + "$ref": "./examples/createOrUpdateMetricAlertSingleResource.json" + }, + "Create or update an alert rule on Resource group(s)": { + "$ref": "./examples/createOrUpdateMetricAlertResourceGroup.json" + }, + "Create or update an alert rule on Subscription": { + "$ref": "./examples/createOrUpdateMetricAlertSubscription.json" + }, + "Create or update an alert rules with dimensions": { + "$ref": "./examples/createOrUpdateMetricAlertWithDimensions.json" + } + } + }, + "patch": { + "operationId": "MetricAlerts_Update", + "tags": [ + "MetricAlerts" + ], + "description": "Update a metric alert definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + }, + { + "name": "parameters", + "in": "body", + "description": "The parameters of the rule to update.", + "required": true, + "schema": { + "$ref": "#/definitions/MetricAlertResourcePatch" + } + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertResource" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + } + } + }, + "x-ms-examples": { + "Create or update an alert rule": { + "$ref": "./examples/UpdateMetricAlert.json" + } + } + }, + "delete": { + "operationId": "MetricAlerts_Delete", + "tags": [ + "MetricAlerts" + ], + "description": "Delete an alert rule definition.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Resource deleted successfully." + }, + "204": { + "description": "Resource does not exist." + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + } + } + }, + "x-ms-examples": { + "Delete an alert rule": { + "$ref": "./examples/deleteMetricAlert.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status": { + "get": { + "operationId": "MetricAlertsStatus_List", + "tags": [ + "MetricAlertsStatus" + ], + "description": "Retrieve an alert rule status.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertStatusCollection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get an alert rule status": { + "$ref": "./examples/getMetricAlertStatus.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Insights/metricAlerts/{ruleName}/status/{statusName}": { + "get": { + "operationId": "MetricAlertsStatus_ListByName", + "tags": [ + "MetricAlertsStatus" + ], + "description": "Retrieve an alert rule status.", + "parameters": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "name": "ruleName", + "in": "path", + "description": "The name of the rule.", + "required": true, + "type": "string" + }, + { + "name": "statusName", + "in": "path", + "description": "The name of the status.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "Azure operation completed successfully.", + "schema": { + "$ref": "#/definitions/MetricAlertStatusCollection" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Microsoft.Common.ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get an alert rule status": { + "$ref": "./examples/getMetricAlertStatusByName.json" + } + } + } + } + }, + "definitions": { + "AggregationTypeEnum": { + "type": "string", + "description": "The criteria time aggregation types. Previously undocumented values might be returned", + "enum": [ + "Average", + "Count", + "Minimum", + "Maximum", + "Total" + ], + "x-ms-enum": { + "name": "AggregationTypeEnum", + "modelAsString": true, + "values": [ + { + "name": "Average", + "value": "Average", + "description": "Average" + }, + { + "name": "Count", + "value": "Count", + "description": "Count" + }, + { + "name": "Minimum", + "value": "Minimum", + "description": "Minimum" + }, + { + "name": "Maximum", + "value": "Maximum", + "description": "Maximum" + }, + { + "name": "Total", + "value": "Total", + "description": "Total" + } + ] + } + }, + "DynamicMetricCriteria": { + "type": "object", + "description": "Criterion for dynamic threshold.", + "properties": { + "operator": { + "$ref": "#/definitions/DynamicThresholdOperator", + "description": "The operator used to compare the metric value against the threshold. Previously undocumented values might be returned" + }, + "alertSensitivity": { + "$ref": "#/definitions/DynamicThresholdSensitivity", + "description": "The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Previously undocumented values might be returned" + }, + "failingPeriods": { + "$ref": "#/definitions/DynamicThresholdFailingPeriods", + "description": "The minimum number of violations required within the selected lookback time window required to raise an alert." + }, + "ignoreDataBefore": { + "type": "string", + "format": "date-time", + "description": "Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)" + } + }, + "required": [ + "operator", + "alertSensitivity", + "failingPeriods" + ], + "allOf": [ + { + "$ref": "#/definitions/MultiMetricCriteria" + } + ], + "x-ms-discriminator-value": "DynamicThresholdCriterion" + }, + "DynamicPromQLCriteria": { + "type": "object", + "description": "The criterion for dynamic prom query.", + "properties": { + "operator": { + "$ref": "#/definitions/DynamicThresholdOperator", + "description": "The operator used to compare the metric value against the threshold. Previously undocumented values might be returned" + }, + "alertSensitivity": { + "$ref": "#/definitions/DynamicThresholdSensitivity", + "description": "The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Previously undocumented values might be returned" + }, + "ignoreDataBefore": { + "type": "string", + "format": "date-time", + "description": "Use this option to set the date from which to start learning the metric historical data and calculate the dynamic thresholds (in ISO8601 format)" + } + }, + "required": [ + "operator", + "alertSensitivity" + ], + "allOf": [ + { + "$ref": "#/definitions/MultiPromQLCriteria" + } + ], + "x-ms-discriminator-value": "DynamicThresholdCriterion" + }, + "DynamicThresholdFailingPeriods": { + "type": "object", + "description": "The minimum number of violations required within the selected lookback time window required to raise an alert.", + "properties": { + "numberOfEvaluationPeriods": { + "type": "number", + "format": "float", + "description": "The number of aggregated lookback points. The lookback time window is calculated based on the aggregation granularity (windowSize) and the selected number of aggregated points." + }, + "minFailingPeriodsToAlert": { + "type": "number", + "format": "float", + "description": "The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods." + } + }, + "required": [ + "numberOfEvaluationPeriods", + "minFailingPeriodsToAlert" + ] + }, + "DynamicThresholdOperator": { + "type": "string", + "description": "The operator used to compare the metric value against the threshold. Previously undocumented values might be returned", + "enum": [ + "GreaterThan", + "LessThan", + "GreaterOrLessThan" + ], + "x-ms-enum": { + "name": "DynamicThresholdOperator", + "modelAsString": true, + "values": [ + { + "name": "GreaterThan", + "value": "GreaterThan", + "description": "GreaterThan" + }, + { + "name": "LessThan", + "value": "LessThan", + "description": "LessThan" + }, + { + "name": "GreaterOrLessThan", + "value": "GreaterOrLessThan", + "description": "GreaterOrLessThan" + } + ] + } + }, + "DynamicThresholdSensitivity": { + "type": "string", + "description": "The extent of deviation required to trigger an alert. This will affect how tight the threshold is to the metric series pattern. Previously undocumented values might be returned", + "enum": [ + "Low", + "Medium", + "High" + ], + "x-ms-enum": { + "name": "DynamicThresholdSensitivity", + "modelAsString": true, + "values": [ + { + "name": "Low", + "value": "Low", + "description": "Low" + }, + { + "name": "Medium", + "value": "Medium", + "description": "Medium" + }, + { + "name": "High", + "value": "High", + "description": "High" + } + ] + } + }, + "MetricAlertAction": { + "type": "object", + "description": "An alert action.", + "properties": { + "actionGroupId": { + "type": "string", + "description": "The id of the action group to use." + }, + "webHookProperties": { + "type": "object", + "description": "This field allows specifying custom properties, which would be appended to the alert payload sent as input to the webhook.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "MetricAlertCriteria": { + "type": "object", + "description": "The rule criteria that defines the conditions of the alert rule.", + "properties": { + "odata.type": { + "$ref": "#/definitions/Odatatype", + "description": "Specifies the type of the alert criteria. Previously undocumented values might be returned" + } + }, + "discriminator": "odata.type", + "required": [ + "odata.type" + ], + "additionalProperties": {} + }, + "MetricAlertMultipleResourceMultipleMetricCriteria": { + "type": "object", + "description": "Specifies the metric alert criteria for multiple resource that has multiple metric criteria.", + "properties": { + "allOf": { + "type": "array", + "description": "The list of multiple metric criteria for this 'all of' operation.", + "items": { + "$ref": "#/definitions/MultiMetricCriteria" + }, + "x-ms-identifiers": [ + "name" + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/MetricAlertCriteria" + } + ], + "x-ms-discriminator-value": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + "MetricAlertProperties": { + "type": "object", + "description": "An alert rule.", + "properties": { + "description": { + "type": "string", + "description": "The description of the metric alert that will be included in the alert email." + }, + "severity": { + "type": "integer", + "format": "int32", + "description": "Alert severity {0, 1, 2, 3, 4}" + }, + "enabled": { + "type": "boolean", + "description": "The flag that indicates whether the metric alert is enabled." + }, + "scopes": { + "type": "array", + "description": "The list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.", + "items": { + "type": "string" + } + }, + "evaluationFrequency": { + "type": "string", + "format": "duration", + "description": "How often the metric alert is evaluated represented in ISO 8601 duration format." + }, + "windowSize": { + "type": "string", + "format": "duration", + "description": "The period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold." + }, + "targetResourceType": { + "type": "string", + "description": "The resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource." + }, + "targetResourceRegion": { + "type": "string", + "description": "The region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource." + }, + "criteria": { + "$ref": "#/definitions/MetricAlertCriteria", + "description": "Defines the specific alert criteria information." + }, + "autoMitigate": { + "type": "boolean", + "description": "The flag that indicates whether the alert should be auto resolved or not. The default is true." + }, + "resolveConfiguration": { + "$ref": "#/definitions/ResolveConfiguration", + "description": "The configuration for how the alert is resolved. Applicable for PromQLCriteria." + }, + "actions": { + "type": "array", + "description": "The array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.", + "items": { + "$ref": "#/definitions/MetricAlertAction" + }, + "x-ms-identifiers": [ + "actionGroupId" + ] + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time", + "description": "Last time the rule was updated in ISO8601 format.", + "readOnly": true + }, + "isMigrated": { + "type": "boolean", + "description": "The value indicating whether this alert rule is migrated.", + "readOnly": true + }, + "customProperties": { + "type": "object", + "description": "The properties of an alert payload.", + "additionalProperties": { + "type": "string" + } + }, + "actionProperties": { + "type": "object", + "description": "The properties of an action properties.", + "additionalProperties": { + "type": "string" + } + } + }, + "required": [ + "severity", + "enabled", + "scopes", + "evaluationFrequency", + "criteria" + ] + }, + "MetricAlertPropertiesPatch": { + "type": "object", + "description": "An alert rule properties for patch.", + "properties": { + "description": { + "type": "string", + "description": "The description of the metric alert that will be included in the alert email." + }, + "severity": { + "type": "integer", + "format": "int32", + "description": "Alert severity {0, 1, 2, 3, 4}" + }, + "enabled": { + "type": "boolean", + "description": "The flag that indicates whether the metric alert is enabled." + }, + "scopes": { + "type": "array", + "description": "The list of resource id's that this metric alert is scoped to.", + "items": { + "type": "string" + } + }, + "evaluationFrequency": { + "type": "string", + "format": "duration", + "description": "How often the metric alert is evaluated represented in ISO 8601 duration format." + }, + "windowSize": { + "type": "string", + "format": "duration", + "description": "The period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold." + }, + "targetResourceType": { + "type": "string", + "description": "The resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." + }, + "targetResourceRegion": { + "type": "string", + "description": "The region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." + }, + "criteria": { + "$ref": "#/definitions/MetricAlertCriteria", + "description": "Defines the specific alert criteria information." + }, + "autoMitigate": { + "type": "boolean", + "description": "The flag that indicates whether the alert should be auto resolved or not. The default is true." + }, + "resolveConfiguration": { + "$ref": "#/definitions/ResolveConfiguration", + "description": "The configuration for how the alert is resolved. Applicable for PromQLCriteria." + }, + "actions": { + "type": "array", + "description": "The array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.", + "items": { + "$ref": "#/definitions/MetricAlertAction" + }, + "x-ms-identifiers": [ + "actionGroupId" + ] + }, + "lastUpdatedTime": { + "type": "string", + "format": "date-time", + "description": "Last time the rule was updated in ISO8601 format.", + "readOnly": true + }, + "isMigrated": { + "type": "boolean", + "description": "The value indicating whether this alert rule is migrated.", + "readOnly": true + }, + "customProperties": { + "type": "object", + "description": "The properties of an alert payload.", + "additionalProperties": { + "type": "string" + } + }, + "actionProperties": { + "type": "object", + "description": "The properties of an action properties.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "MetricAlertResource": { + "type": "object", + "description": "The metric alert resource.", + "properties": { + "properties": { + "$ref": "#/definitions/MetricAlertProperties", + "description": "The alert rule properties of the resource.", + "x-ms-client-flatten": true + }, + "identity": { + "$ref": "#/definitions/Microsoft.Common.Identity", + "description": "The identity of the resource." + } + }, + "required": [ + "properties" + ], + "allOf": [ + { + "$ref": "../../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ] + }, + "MetricAlertResourceCollection": { + "type": "object", + "description": "Represents a collection of alert rule resources.", + "properties": { + "value": { + "type": "array", + "description": "The values for the alert rule resources.", + "items": { + "$ref": "#/definitions/MetricAlertResource" + }, + "x-ms-identifiers": [ + "id" + ] + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + } + }, + "MetricAlertResourcePatch": { + "type": "object", + "description": "The metric alert resource for patch operations.", + "properties": { + "tags": { + "type": "object", + "description": "Resource tags", + "additionalProperties": { + "type": "string" + } + }, + "identity": { + "$ref": "#/definitions/Microsoft.Common.Identity", + "description": "The identity of the resource." + }, + "properties": { + "$ref": "#/definitions/MetricAlertPropertiesPatch", + "description": "The alert rule properties of the resource.", + "x-ms-client-flatten": true + } + } + }, + "MetricAlertSingleResourceMultipleMetricCriteria": { + "type": "object", + "description": "Specifies the metric alert criteria for a single resource that has multiple metric criteria.", + "properties": { + "allOf": { + "type": "array", + "description": "The list of metric criteria for this 'all of' operation.", + "items": { + "$ref": "#/definitions/MetricCriteria" + }, + "x-ms-identifiers": [ + "name" + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/MetricAlertCriteria" + } + ], + "x-ms-discriminator-value": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + "MetricAlertStatus": { + "type": "object", + "description": "An alert status.", + "properties": { + "name": { + "type": "string", + "description": "The status name." + }, + "id": { + "type": "string", + "description": "The alert rule arm id." + }, + "type": { + "type": "string", + "description": "The extended resource type name." + }, + "properties": { + "$ref": "#/definitions/MetricAlertStatusProperties", + "description": "The alert status properties of the metric alert status." + } + } + }, + "MetricAlertStatusCollection": { + "type": "object", + "description": "Represents a collection of alert rule resources.", + "properties": { + "value": { + "type": "array", + "description": "The values for the alert rule resources.", + "items": { + "$ref": "#/definitions/MetricAlertStatus" + }, + "x-ms-identifiers": [ + "id" + ] + } + } + }, + "MetricAlertStatusProperties": { + "type": "object", + "description": "An alert status properties.", + "properties": { + "dimensions": { + "type": "object", + "description": "An object describing the type of the dimensions.", + "additionalProperties": { + "type": "string" + } + }, + "status": { + "type": "string", + "description": "Status value" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "UTC time when the status was checked." + } + } + }, + "MetricCriteria": { + "type": "object", + "description": "Criterion to filter metrics.", + "properties": { + "operator": { + "$ref": "#/definitions/Operator", + "description": "The criteria operator. Previously undocumented values might be returned" + }, + "threshold": { + "type": "number", + "format": "double", + "description": "The criteria threshold value that activates the alert." + } + }, + "required": [ + "operator", + "threshold" + ], + "allOf": [ + { + "$ref": "#/definitions/MultiMetricCriteria" + } + ], + "x-ms-discriminator-value": "StaticThresholdCriterion" + }, + "MetricDimension": { + "type": "object", + "description": "Specifies a metric dimension.", + "properties": { + "name": { + "type": "string", + "description": "Name of the dimension." + }, + "operator": { + "type": "string", + "description": "The dimension operator. Only 'Include' and 'Exclude' are supported" + }, + "values": { + "type": "array", + "description": "List of dimension values.", + "items": { + "type": "string" + } + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "Microsoft.Common.CriterionType": { + "type": "string", + "description": "Specifies the type of threshold criteria. Previously undocumented values might be returned", + "enum": [ + "StaticThresholdCriterion", + "DynamicThresholdCriterion" + ], + "x-ms-enum": { + "name": "CriterionType", + "modelAsString": true, + "values": [ + { + "name": "StaticThresholdCriterion", + "value": "StaticThresholdCriterion", + "description": "StaticThresholdCriterion" + }, + { + "name": "DynamicThresholdCriterion", + "value": "DynamicThresholdCriterion", + "description": "DynamicThresholdCriterion" + } + ] + } + }, + "Microsoft.Common.ErrorResponse": { + "type": "object", + "description": "Describes the format of Error response.", + "properties": { + "code": { + "type": "string", + "description": "Error code" + }, + "message": { + "type": "string", + "description": "Error message indicating why the operation failed." + } + } + }, + "Microsoft.Common.Identity": { + "type": "object", + "description": "Identity for the resource.", + "properties": { + "principalId": { + "type": "string", + "description": "The principal ID of resource identity.", + "readOnly": true + }, + "tenantId": { + "type": "string", + "description": "The tenant ID of resource.", + "readOnly": true + }, + "type": { + "$ref": "#/definitions/Microsoft.Common.IdentityType", + "description": "Type of managed service identity." + }, + "userAssignedIdentities": { + "type": "object", + "description": "The list of user identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}'.", + "additionalProperties": { + "$ref": "#/definitions/Microsoft.Common.UserIdentityProperties" + } + } + }, + "required": [ + "type" + ] + }, + "Microsoft.Common.IdentityType": { + "type": "string", + "description": "Type of managed service identity.", + "enum": [ + "SystemAssigned", + "UserAssigned", + "None" + ], + "x-ms-enum": { + "name": "IdentityType", + "modelAsString": false, + "values": [ + { + "name": "SystemAssigned", + "value": "SystemAssigned", + "description": "SystemAssigned" + }, + { + "name": "UserAssigned", + "value": "UserAssigned", + "description": "UserAssigned" + }, + { + "name": "None", + "value": "None", + "description": "None" + } + ] + } + }, + "Microsoft.Common.UserIdentityProperties": { + "type": "object", + "description": "Properties of the user assigned identity.", + "properties": { + "principalId": { + "type": "string", + "description": "The principal ID of resource identity.", + "readOnly": true + }, + "clientId": { + "type": "string", + "description": "The client ID of resource identity.", + "readOnly": true + } + } + }, + "MultiMetricCriteria": { + "type": "object", + "description": "The types of conditions for a multi resource alert.", + "properties": { + "criterionType": { + "$ref": "#/definitions/Microsoft.Common.CriterionType", + "description": "Specifies the type of threshold criteria. Previously undocumented values might be returned" + }, + "name": { + "type": "string", + "description": "Name of the criteria." + }, + "metricName": { + "type": "string", + "description": "Name of the metric." + }, + "metricNamespace": { + "type": "string", + "description": "Namespace of the metric." + }, + "timeAggregation": { + "$ref": "#/definitions/AggregationTypeEnum", + "description": "The criteria time aggregation types. Previously undocumented values might be returned" + }, + "dimensions": { + "type": "array", + "description": "List of dimension conditions.", + "items": { + "$ref": "#/definitions/MetricDimension" + }, + "x-ms-identifiers": [ + "name" + ] + }, + "skipMetricValidation": { + "type": "boolean", + "description": "Allows creating an alert rule on a custom metric that isn't yet emitted, by causing the metric validation to be skipped." + } + }, + "discriminator": "criterionType", + "required": [ + "criterionType", + "name", + "metricName", + "timeAggregation" + ], + "additionalProperties": {} + }, + "MultiPromQLCriteria": { + "type": "object", + "description": "The types of conditions for a multi query metric alert.", + "properties": { + "criterionType": { + "$ref": "#/definitions/Microsoft.Common.CriterionType", + "description": "Specifies the type of threshold criteria. Previously undocumented values might be returned" + }, + "name": { + "type": "string", + "description": "Name of the criteria." + }, + "query": { + "type": "string", + "description": "The query used to evaluate the alert rule" + } + }, + "discriminator": "criterionType", + "required": [ + "criterionType", + "name", + "query" + ] + }, + "Odatatype": { + "type": "string", + "description": "Specifies the type of the alert criteria. Previously undocumented values might be returned", + "enum": [ + "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", + "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", + "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "Microsoft.Azure.Monitor.PromQLCriteria" + ], + "x-ms-enum": { + "name": "Odatatype", + "modelAsString": true, + "values": [ + { + "name": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", + "value": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria", + "description": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria" + }, + { + "name": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", + "value": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria", + "description": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria" + }, + { + "name": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "value": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria", + "description": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" + }, + { + "name": "Microsoft.Azure.Monitor.PromQLCriteria", + "value": "Microsoft.Azure.Monitor.PromQLCriteria", + "description": "Microsoft.Azure.Monitor.PromQLCriteria" + } + ] + } + }, + "Operator": { + "type": "string", + "description": "The criteria operator. Previously undocumented values might be returned", + "enum": [ + "Equals", + "GreaterThan", + "GreaterThanOrEqual", + "LessThan", + "LessThanOrEqual" + ], + "x-ms-enum": { + "name": "Operator", + "modelAsString": true, + "values": [ + { + "name": "Equals", + "value": "Equals", + "description": "Equals" + }, + { + "name": "GreaterThan", + "value": "GreaterThan", + "description": "GreaterThan" + }, + { + "name": "GreaterThanOrEqual", + "value": "GreaterThanOrEqual", + "description": "GreaterThanOrEqual" + }, + { + "name": "LessThan", + "value": "LessThan", + "description": "LessThan" + }, + { + "name": "LessThanOrEqual", + "value": "LessThanOrEqual", + "description": "LessThanOrEqual" + } + ] + } + }, + "PromQLCriteria": { + "type": "object", + "description": "Specifies the PromQL criteria for the metric alert resource.", + "properties": { + "failingPeriods": { + "$ref": "#/definitions/QueryFailingPeriods", + "description": "Configuration for failing periods in query-based alerts." + }, + "allOf": { + "type": "array", + "description": "The list of promQL criteria. Alert will be raised when all conditions are met.", + "items": { + "$ref": "#/definitions/MultiPromQLCriteria" + }, + "x-ms-identifiers": [ + "name" + ] + } + }, + "allOf": [ + { + "$ref": "#/definitions/MetricAlertCriteria" + } + ], + "x-ms-discriminator-value": "Microsoft.Azure.Monitor.PromQLCriteria" + }, + "QueryFailingPeriods": { + "type": "object", + "description": "Configuration for failing periods in query-based alerts.", + "properties": { + "for": { + "type": "string", + "format": "duration", + "description": "The amount of time (in ISO 8601 duration format) alert must be active before firing." + } + }, + "required": [ + "for" + ] + }, + "ResolveConfiguration": { + "type": "object", + "properties": { + "autoResolved": { + "type": "boolean", + "description": "Indicates whether the alert should be auto resolved" + }, + "timeToResolve": { + "type": "string", + "format": "duration", + "description": "The time (in ISO 8601 duration format) after which the alert should be auto resolved" + } + }, + "required": [ + "autoResolved" + ] + }, + "StaticPromQLCriteria": { + "type": "object", + "description": "The criterion for static prom query.", + "allOf": [ + { + "$ref": "#/definitions/MultiPromQLCriteria" + } + ], + "x-ms-discriminator-value": "StaticThresholdCriterion" + }, + "WebtestLocationAvailabilityCriteria": { + "type": "object", + "description": "Specifies the metric alert rule criteria for a web test resource.", + "properties": { + "webTestId": { + "type": "string", + "description": "The Application Insights web test Id." + }, + "componentId": { + "type": "string", + "description": "The Application Insights resource Id." + }, + "failedLocationCount": { + "type": "number", + "format": "float", + "description": "The number of failed locations." + } + }, + "required": [ + "webTestId", + "componentId", + "failedLocationCount" + ], + "allOf": [ + { + "$ref": "#/definitions/MetricAlertCriteria" + } + ], + "x-ms-discriminator-value": "Microsoft.Azure.Monitor.WebtestLocationAvailabilityCriteria" + } + }, + "parameters": {} +} diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/readme.md b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/readme.md new file mode 100644 index 000000000000..d51552a52b2e --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/readme.md @@ -0,0 +1,23 @@ +# Monitor Insights 2026-01-01 + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Monitor Insights stable API version 2026-01-01. + +## Configuration + +```yaml +description: Monitor Insights Client (2026-01-01) +openapi-type: arm +tag: package-2026-01-01 +``` + +### Tag: package-2026-01-01 + +These settings apply only when `--tag=package-2026-01-01` is specified on the command line. + +```yaml $(tag) == 'package-2026-01-01' +input-file: + - activityLogAlerts_API.json + - metricAlert.json +``` From c89fe09690a15cdac962ce01eab01bbee3dc254e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 14:55:41 +0000 Subject: [PATCH 22/23] Fix review issues: update Azure AD wording to Microsoft Entra ID, fix Email.Subject typo in examples Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com> --- .../2026-01-01/examples/createOrUpdateMetricAlertQuery.json | 6 +++--- .../examples/createOrUpdateMetricAlertQueryDT.json | 6 +++--- .../createOrUpdateMetricAlertQueryMultiResource.json | 6 +++--- .../createOrUpdateMetricAlertQueryResourceCentric.json | 6 +++--- .../Insights/stable/2026-01-01/metricAlert.json | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json index 0a4695f2d970..033238aa3a3f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQuery.json @@ -12,7 +12,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { @@ -72,7 +72,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { @@ -131,7 +131,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json index 005c41a9209d..845159df64bd 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json @@ -12,7 +12,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { @@ -75,7 +75,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { @@ -137,7 +137,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json index affe24872108..784927dfd7f4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryMultiResource.json @@ -12,7 +12,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { @@ -72,7 +72,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { @@ -131,7 +131,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json index c8a35b412d2f..5eaee3ca5274 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/examples/createOrUpdateMetricAlertQueryResourceCentric.json @@ -12,7 +12,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { @@ -72,7 +72,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { @@ -131,7 +131,7 @@ "properties": { "description": "This is the description of the rule1", "actionProperties": { - "Email.Sujbect": "my custom email subject" + "Email.Subject": "my custom email subject" }, "actions": [ { diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json index da2200072af0..34df12cdb96e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json @@ -30,7 +30,7 @@ "securityDefinitions": { "azure_auth": { "type": "oauth2", - "description": "Azure Active Directory OAuth2 Flow.", + "description": "Microsoft Entra ID OAuth2 Flow.", "flow": "implicit", "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", "scopes": { From 8640d953165aaee0bc56433cfc0fa01d2a426555 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 21 Jun 2026 14:56:48 +0000 Subject: [PATCH 23/23] Add format: uri to nextLink property in metricAlert.json Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com> --- .../Insights/stable/2026-01-01/metricAlert.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json index 34df12cdb96e..eb9a33555712 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/Insights/stable/2026-01-01/metricAlert.json @@ -952,6 +952,7 @@ }, "nextLink": { "type": "string", + "format": "uri", "description": "The URL to get the next set of results." } }