Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6556222
Add Metric Alerts Query GA 2026-06-01 swagger [metric-alerts-query-ga…
sidanmor May 28, 2026
ca25608
Address ARM API review suggestions [metric-alerts-query-ga-swagger]
sidanmor Jun 2, 2026
e339d9e
Apply PR decisions for package tag and error model [metric-alerts-que…
sidanmor Jun 2, 2026
f6ad53c
Fix metric alert GA api-version to 2026-01-01
sidanmor Jun 3, 2026
e25710a
Regenerate MetricAlert swagger outputs for TypeSpec validation
Copilot Jun 14, 2026
2fcca45
Merge branch 'Azure:main' into metric-alerts-query-ga-swagger-stream1-v2
sidanmor Jun 14, 2026
ea04f8e
Merge pull request #1 from Azure/copilot/fix-typespec-validation
sidanmor Jun 14, 2026
14216b0
Initial plan
Copilot Jun 14, 2026
562b137
Fix TypeSpec formatting in MetricAlertResource.tsp
Copilot Jun 14, 2026
0d85bef
Merge branch 'metric-alerts-query-ga-swagger-stream1-v2' into copilot…
sidanmor Jun 14, 2026
72a57ac
Merge pull request #2 from Azure/copilot/fix-typespec-validation-job-…
sidanmor Jun 14, 2026
655bd3a
Format ArmResourceRead method signature for better readability
sidanmor Jun 16, 2026
05ae3b1
Remove trailing whitespace from Metric Alert API example JSON files
sidanmor Jun 16, 2026
8200221
Enhance metric alert examples with detailed properties and criteria
sidanmor Jun 16, 2026
6ebcacd
Remove trailing whitespace from multiple Metric Alert API example JSO…
sidanmor Jun 16, 2026
4dcbe5a
Revert preview swagger 2024-03-01-preview to fix LintDiff breaking ch…
sidanmor Jun 16, 2026
43b11bf
Update error response references and descriptions in metricAlert.json
sidanmor Jun 16, 2026
9e33331
Update tag in readme.md to package-2026-01-01 and suppress example va…
sidanmor Jun 16, 2026
e544ddc
Update tag in readme.md to package-2025-08 and adjust input file path…
sidanmor Jun 16, 2026
6cb83a9
Enhance metricAlert.json: Add pagination support and improve descript…
sidanmor Jun 17, 2026
8ad03e2
Refactor metricAlert.json: Simplify descriptions for aggregation, ope…
sidanmor Jun 21, 2026
45d2062
Add examples for creating/updating metric alerts with various configu…
sidanmor Jun 21, 2026
cf8e9e8
Update metric alert example files from TypeSpec compilation
sidanmor Jun 21, 2026
99106fe
Initial plan
Copilot Jun 21, 2026
0ba7f30
Add GA stable/2026-01-01/metricAlert.json swagger, examples, and sing…
Copilot Jun 21, 2026
c89fe09
Fix review issues: update Azure AD wording to Microsoft Entra ID, fix…
Copilot Jun 21, 2026
8640d95
Add format: uri to nextLink property in metricAlert.json
Copilot Jun 21, 2026
569eade
Merge branch 'Azure:main' into metric-alerts-query-ga-swagger-stream1-v2
sidanmor Jun 21, 2026
8b98a68
Merge branch 'metric-alerts-query-ga-swagger-stream1-v2' into copilot…
sidanmor Jun 21, 2026
66a4b96
Merge pull request #3 from Azure/copilot/fix-swaggervavocado-analyze-…
sidanmor Jun 21, 2026
5e785a3
Remove format: uri from nextLink property in metricAlert.json
sidanmor Jun 22, 2026
e75ffb1
Add suppression for MULTIPLE_API_VERSION in readme.md to clarify API …
sidanmor Jun 22, 2026
28d9cd2
Fix: Remove breaking changes by reverting preview swagger and models …
sidanmor Jun 23, 2026
25c995b
Fix: Correct grammar in metric alert definition descriptions and upda…
sidanmor Jun 23, 2026
98ba131
Merge branch 'Azure:main' into metric-alerts-query-ga-swagger-stream1-v2
sidanmor Jun 23, 2026
9c04f32
Fix: Update MetricAlert API to include Retry-After header in create o…
sidanmor Jun 23, 2026
655933e
Fix: Remove deprecated tag from MonitorClient configuration
sidanmor Jun 24, 2026
b91961d
Fix: Correct grammar in metric alert definition descriptions
sidanmor Jun 24, 2026
b2f3b24
Fix: Correct grammar in metric alert definition descriptions
sidanmor Jun 25, 2026
b3be737
Fix: Add success response for MetricAlertResource creation in API def…
sidanmor Jun 25, 2026
c9b121d
Fix: Correct grammar in metric alert definition comments
sidanmor Jun 25, 2026
42a5e0e
Fix: Remove suppression for MULTIPLE_API_VERSION in MonitorClient readme
sidanmor Jun 25, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions model_diff.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
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 afa609a76f..aa8a61242f 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.
*/
Original file line number Diff line number Diff line change
Expand Up @@ -69,18 +69,16 @@ interface MetricAlertResources {
get is ArmResourceRead<MetricAlertResource, Error = MetricAlertErrorResponse>;

/**
* 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<MetricAlertResource>,
Error = MetricAlertErrorResponse
>;

/**
* Update an metric alert definition.
* Update a metric alert definition.
*/
@patch(#{ implicitOptionality: false })
@tag("MetricAlerts")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"parameters": {
"api-version": "2026-01-01",
"parameters": {
"properties": {
"description": "This is the description of the rule1",
"actions": [
{
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
],
"autoMitigate": true,
"criteria": {
"allOf": [
{
"name": "High_CPU_80",
"criterionType": "StaticThresholdCriterion",
"dimensions": [],
"metricName": "\\Processor(_Total)\\% Processor Time",
"operator": "GreaterThan",
"threshold": 80.5,
"timeAggregation": "Average"
}
],
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
},
"enabled": true,
"evaluationFrequency": "PT1M",
"scopes": [
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
],
"severity": 3,
"windowSize": "PT15M"
},
"tags": {}
},
"resourceGroupName": "gigtest",
"ruleName": "chiricutin",
"subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7"
},
"responses": {
"200": {
"body": {
"type": "Microsoft.Insights/metricAlerts",
"id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/chiricutin",
"location": "global",
"properties": {
"description": "This is the description of the rule1",
"actions": [
{
"actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
],
"autoMitigate": true,
"criteria": {
"allOf": [
{
"name": "High_CPU_80",
"criterionType": "StaticThresholdCriterion",
"dimensions": [],
"metricName": "\\Processor(_Total)\\% Processor Time",
"operator": "GreaterThan",
"threshold": 80.5,
"timeAggregation": "Average"
}
],
"odata.type": "Microsoft.Azure.Monitor.SingleResourceMultipleMetricCriteria"
},
"enabled": true,
"evaluationFrequency": "PT1M",
"scopes": [
"/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme"
],
"severity": 3,
"windowSize": "PT15M"
},
"tags": {
"hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource"
}
},
"headers": {}
}
},
"operationId": "MetricAlerts_Update",
"title": "Create or update an alert rule"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
{
"parameters": {
"api-version": "2026-01-01",
"parameters": {
"location": "global",
"properties": {
"description": "This is the description of the rule1",
"actions": [
{
"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
],
"autoMitigate": true,
"criteria": {
"allOf": [
{
"name": "High_CPU_80",
"alertSensitivity": "Medium",
"criterionType": "DynamicThresholdCriterion",
"dimensions": [],
"failingPeriods": {
"minFailingPeriodsToAlert": 4,
"numberOfEvaluationPeriods": 4
},
"metricName": "Percentage CPU",
"metricNamespace": "microsoft.compute/virtualmachines",
"operator": "GreaterOrLessThan",
"timeAggregation": "Average"
}
],
"odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"
},
"enabled": true,
"evaluationFrequency": "PT1M",
"scopes": [
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2"
],
"severity": 3,
"targetResourceRegion": "southcentralus",
"targetResourceType": "Microsoft.Compute/virtualMachines",
"windowSize": "PT15M"
},
"tags": {}
},
"resourceGroupName": "gigtest",
"ruleName": "MetricAlertOnMultipleResources",
"subscriptionId": "00000000-0000-0000-0000-000000000000"
},
"responses": {
"200": {
"body": {
"type": "Microsoft.Insights/metricAlerts",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources",
"location": "global",
"properties": {
"description": "This is the description of the rule1",
"actions": [
{
"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
],
"autoMitigate": true,
"criteria": {
"allOf": [
{
"name": "High_CPU_80",
"alertSensitivity": "Medium",
"criterionType": "DynamicThresholdCriterion",
"dimensions": [],
"failingPeriods": {
"minFailingPeriodsToAlert": 4,
"numberOfEvaluationPeriods": 4
},
"metricName": "Percentage CPU",
"metricNamespace": "microsoft.compute/virtualmachines",
"operator": "GreaterOrLessThan",
"timeAggregation": "Average"
}
],
"odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"
},
"enabled": true,
"evaluationFrequency": "PT1M",
"scopes": [
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2"
],
"severity": 3,
"targetResourceRegion": "southcentralus",
"targetResourceType": "Microsoft.Compute/virtualMachines",
"windowSize": "PT15M"
},
"tags": {
"hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource"
}
},
"headers": {}
},
"201": {
"body": {
"type": "Microsoft.Insights/metricAlerts",
"id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/providers/microsoft.insights/metricalerts/MetricAlertOnMultipleResources",
"location": "global",
"properties": {
"description": "This is the description of the rule1",
"actions": [
{
"actionGroupId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/gigtest/providers/microsoft.insights/actiongroups/group2",
"webHookProperties": {
"key11": "value11",
"key12": "value12"
}
}
],
"autoMitigate": true,
"criteria": {
"allOf": [
{
"name": "High_CPU_80",
"alertSensitivity": "Medium",
"criterionType": "DynamicThresholdCriterion",
"dimensions": [],
"failingPeriods": {
"minFailingPeriodsToAlert": 4,
"numberOfEvaluationPeriods": 4
},
"metricName": "Percentage CPU",
"metricNamespace": "microsoft.compute/virtualmachines",
"operator": "GreaterOrLessThan",
"timeAggregation": "Average"
}
],
"odata.type": "Microsoft.Azure.Monitor.MultipleResourceMultipleMetricCriteria"
},
"enabled": true,
"evaluationFrequency": "PT1M",
"scopes": [
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme1",
"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/gigtest/providers/Microsoft.Compute/virtualMachines/gigwadme2"
],
"severity": 3,
"targetResourceRegion": "southcentralus",
"targetResourceType": "Microsoft.Compute/virtualMachines",
"windowSize": "PT15M"
},
"tags": {
"hidden-link:/subscriptions/b67f7fec-69fc-4974-9099-a26bd6ffeda3/resourceGroups/Rac46PostSwapRG/providers/Microsoft.Web/sites/leoalerttest": "Resource"
}
},
"headers": {}
}
},
"operationId": "MetricAlerts_CreateOrUpdate",
"title": "Create or update a dynamic alert rule for Multiple Resources"
}
Loading
Loading