From 6556222ebaa2c43e513a2ae86f98e1107e6cdeee Mon Sep 17 00:00:00 2001 From: Idan Mor Date: Thu, 28 May 2026 19:32:20 +0300 Subject: [PATCH 1/7] 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 2/7] 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 3/7] 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 4/7] 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 4c1eabd3177190d8e9cfeae64ab7c90f18969745 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Jun 2026 10:54:31 +0000 Subject: [PATCH 5/7] Initial plan From f540c766b9b69b4f771dd41899e7e68503add738 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Jun 2026 11:02:26 +0000 Subject: [PATCH 6/7] Fix TypeSpec formatting and regenerate swagger for MetricAlertApi Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com> --- .../MetricAlertApi/MetricAlertResource.tsp | 5 +- .../2024-03-01-preview/metricAlert.json | 113 ++++-------------- .../stable/2026-01-01/metricAlert.json | 35 ++++-- 3 files changed, 47 insertions(+), 106 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 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. 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 2e06ea80308f760a46f00a985fcad11801f09bbf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 14 Jun 2026 11:04:31 +0000 Subject: [PATCH 7/7] Fix typo: Email.Sujbect -> Email.Subject in 2026-01-01 examples Co-authored-by: sidanmor <6368621+sidanmor@users.noreply.github.com> --- .../examples/2026-01-01/createOrUpdateMetricAlertQuery.json | 4 ++-- .../examples/2026-01-01/createOrUpdateMetricAlertQueryDT.json | 4 ++-- .../createOrUpdateMetricAlertQueryMultiResource.json | 4 ++-- .../createOrUpdateMetricAlertQueryResourceCentric.json | 4 ++-- .../2026-01-01/examples/createOrUpdateMetricAlertQuery.json | 4 ++-- .../2026-01-01/examples/createOrUpdateMetricAlertQueryDT.json | 4 ++-- .../examples/createOrUpdateMetricAlertQueryMultiResource.json | 4 ++-- .../createOrUpdateMetricAlertQueryResourceCentric.json | 4 ++-- 8 files changed, 16 insertions(+), 16 deletions(-) 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..2951fb683db5 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 @@ -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": [ { 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..53aa088133ba 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 @@ -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": [ { 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..722991430d3b 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 @@ -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": [ { 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..dfad6abadf46 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 @@ -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": [ { 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..2951fb683db5 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": [ { 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..53aa088133ba 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": [ { 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..722991430d3b 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": [ { 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..dfad6abadf46 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": [ {