From f59e81192a269968b1e7abe526295000c4bb971b Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Tue, 29 Jul 2025 15:21:34 +0300 Subject: [PATCH 01/23] Copy files from preview/2025-05-01-preview Copied the files in a separate commit. This allows reviewers to easily diff subsequent changes against the previous spec. --- .../2025-07-01-preview/PreviewAlertRule.json | 528 ++++++++++++++++++ ...iewDynamicThresholdLogSearchAlertRule.json | 120 ++++ 2 files changed, 648 insertions(+) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json new file mode 100644 index 000000000000..a92fd0136c8b --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json @@ -0,0 +1,528 @@ +{ + "swagger": "2.0", + "info": { + "version": "2025-05-01-preview", + "title": "Preview Alert Rule API in Alerts Management Service Resource Provider", + "description": "The Preview Alert Rule API provides the ability to retrieve the results of a simulated historical execution of an alert rule" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/previewAlertRule": { + "post": { + "tags": [ + "PreviewAlertRule" + ], + "description": "Retrieves the results of a simulated historical execution of an alert rule", + "operationId": "PreviewAlertRule", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PreviewAlertRuleRequest" + }, + "description": "The alert rule to preview." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PreviewAlertRuleResponse" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Run preview of a dynamic threshold log search alert rule": { + "$ref": "./examples/previewDynamicThresholdLogSearchAlertRule.json" + } + } + } + } + }, + "definitions": { + "LogAlertRuleResolveConfiguration": { + "type": "object", + "description": "TBD. Relevant only for rules of the kind LogAlert.", + "properties": { + "autoResolved": { + "type": "boolean", + "description": "The flag that indicates whether or not to auto resolve a fired alert." + }, + "timeToResolve": { + "type": "string", + "format": "duration", + "description": "The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format." + } + } + }, + "LogAlertRuleProperties": { + "type": "object", + "properties": { + "description": { + "type": "string", + "description": "The description of the scheduled query rule." + }, + "displayName": { + "type": "string", + "description": "The display name of the alert rule" + }, + "severity": { + "type": "integer", + "format": "int64", + "description": "Severity of the alert. Should be an integer between [0-4]. Value of 0 is severest. Relevant and required only for rules of the kind LogAlert.", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ], + "x-ms-enum": { + "name": "AlertSeverity", + "modelAsString": true + } + }, + "enabled": { + "type": "boolean", + "description": "The flag which indicates whether this scheduled query rule is enabled. Value should be true or false" + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of resource id's that this scheduled query rule is scoped to." + }, + "evaluationFrequency": { + "type": "string", + "format": "duration", + "description": "How often the scheduled query rule is evaluated represented in ISO 8601 duration format. Relevant and required only for rules of the kind LogAlert." + }, + "windowSize": { + "type": "string", + "format": "duration", + "description": "The period of time (in ISO 8601 duration format) on which the Alert query will be executed (bin size). Relevant and required only for rules of the kind LogAlert." + }, + "overrideQueryTimeRange": { + "type": "string", + "format": "duration", + "description": "If specified then overrides the query time range (default is WindowSize*NumberOfEvaluationPeriods). Relevant only for rules of the kind LogAlert." + }, + "targetResourceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of resource type of the target resource(s) on which the alert is created/updated. For example if the scope is a resource group and targetResourceTypes is Microsoft.Compute/virtualMachines, then a different alert will be fired for each virtual machine in the resource group which meet the alert criteria. Relevant only for rules of the kind LogAlert" + }, + "criteria": { + "$ref": "#/definitions/LogAlertRuleCriteria", + "description": "The rule criteria that defines the conditions of the scheduled query rule." + }, + "muteActionsDuration": { + "type": "string", + "format": "duration", + "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert." + }, + "autoMitigate": { + "type": "boolean", + "description": "The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of the kind LogAlert." + }, + "resolveConfiguration": { + "type": "object", + "$ref": "#/definitions/LogAlertRuleResolveConfiguration", + "description": "Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert." + } + }, + "description": "scheduled query rule Definition" + }, + "LogAlertRuleResource": { + "type": "object", + "required": [ + "properties", + "location" + ], + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "x-ms-mutability": [ + "read", + "create", + "update" + ], + "description": "Resource tags." + }, + "location": { + "type": "string", + "x-ms-mutability": [ + "read", + "create" + ], + "description": "The geo-location where the resource lives" + }, + "kind": { + "type": "string", + "description": "Indicates the type of scheduled query rule. The default is LogAlert.", + "enum": [ + "LogAlert", + "EventLogAlert", + "LogToMetric" + ], + "x-ms-enum": { + "name": "Kind", + "modelAsString": true + } + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/LogAlertRuleProperties", + "description": "The rule properties of the resource.", + "required": [ + "enabled", + "criteria", + "scopes" + ] + } + }, + "description": "The scheduled query rule resource.", + "x-ms-azure-resource": true + }, + "LogAlertRuleCriteria": { + "type": "object", + "description": "The rule criteria that defines the conditions of the scheduled query rule.", + "properties": { + "allOf": { + "type": "array", + "description": "A list of conditions to evaluate against the specified scopes", + "items": { + "$ref": "#/definitions/LogAlertRuleCondition" + }, + "x-ms-identifiers": [] + } + } + }, + "LogAlertRuleCondition": { + "type": "object", + "description": "A condition of the scheduled query rule.", + "properties": { + "criterionType": { + "type": "string", + "enum": [ + "StaticThresholdCriterion", + "DynamicThresholdCriterion" + ], + "x-ms-enum": { + "name": "criterionType", + "modelAsString": true + }, + "description": "Specifies the type of threshold criteria" + }, + "query": { + "type": "string", + "description": "KQL log query alert" + }, + "timeAggregation": { + "type": "string", + "description": "Aggregation type. Relevant and required only for rules of the kind LogAlert.", + "enum": [ + "Count", + "Average", + "Minimum", + "Maximum", + "Total" + ], + "x-ms-enum": { + "name": "timeAggregation", + "modelAsString": true + } + }, + "metricMeasureColumn": { + "type": "string", + "description": "The column containing the metric measure number. Relevant only for rules of the kind LogAlert." + }, + "resourceIdColumn": { + "type": "string", + "description": "The column containing the resource id. The content of the column must be a uri formatted as resource id. Relevant only for rules of the kind LogAlert." + }, + "dimensions": { + "type": "array", + "items": { + "$ref": "#/definitions/LogAlertRuleDimension" + }, + "description": "List of Dimensions conditions", + "x-ms-identifiers": [] + }, + "operator": { + "type": "string", + "enum": [ + "Equals", + "GreaterThan", + "GreaterThanOrEqual", + "LessThan", + "LessThanOrEqual", + "GreaterOrLessThan" + ], + "x-ms-enum": { + "name": "conditionOperator", + "modelAsString": true + }, + "description": "The criteria operator. Relevant and required only for rules of the kind LogAlert." + }, + "threshold": { + "type": "number", + "format": "double", + "description": "the criteria threshold value that activates the alert. Relevant and required only for static threshold rules of the kind LogAlert." + }, + "alertSensitivity": { + "type": "string", + "description": "The extent of deviation required to trigger an alert. Allowed values are 'Low', 'Medium' and 'High'. This will affect how tight the threshold is to the metric series pattern. Relevant and required only for dynamic threshold rules of the kind LogAlert." + }, + "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). Relevant only for dynamic threshold rules of the kind LogAlert." + }, + "failingPeriods": { + "type": "object", + "description": "The minimum number of violations required within the selected lookback time window required to raise an alert. Relevant only for rules of the kind LogAlert.", + "properties": { + "numberOfEvaluationPeriods": { + "type": "integer", + "format": "int64", + "default": 1, + "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. Default value is 1" + }, + "minFailingPeriodsToAlert": { + "type": "integer", + "format": "int64", + "default": 1, + "description": "The number of violations to trigger an alert. Should be smaller or equal to numberOfEvaluationPeriods. Default value is 1" + } + } + }, + "metricName": { + "type": "string", + "description": "The name of the metric to be sent. Relevant and required only for rules of the kind LogToMetric." + } + } + }, + "LogAlertRuleDimension": { + "type": "object", + "description": "Dimension splitting and filtering definition", + "properties": { + "name": { + "type": "string", + "description": "Name of the dimension" + }, + "operator": { + "type": "string", + "description": "Operator for dimension values", + "enum": [ + "Include", + "Exclude" + ], + "x-ms-enum": { + "name": "dimensionOperator", + "modelAsString": true + } + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of dimension values" + } + }, + "required": [ + "name", + "operator", + "values" + ] + }, + "PreviewAlertRuleResponse": { + "type": "object", + "properties": { + "rulePreviewResults": { + "type": "array", + "items": { + "$ref": "#/definitions/RulePreviewResult" + }, + "description": "An array of rule preview results." + } + } + }, + "RulePreviewResult": { + "type": "object", + "properties": { + "dimensionCombination": { + "type": "array", + "items": { + "$ref": "#/definitions/DimensionNameAndValue" + }, + "description": "The list of dimensions for the evaluation." + }, + "evaluations": { + "type": "array", + "items": { + "$ref": "#/definitions/Evaluation" + }, + "description": "An array of evaluations." + } + }, + "description": "A rule preview result containing a dimension combination and an array of evaluations." + }, + "Evaluation": { + "type": "object", + "properties": { + "evaluationTime": { + "type": "string", + "format": "date-time", + "description": "The time when the evaluation was performed." + }, + "alertState": { + "type": "string", + "enum": [ + "NoAlert", + "Fired", + "Firing", + "Resolving", + "Resolved" + ], + "x-ms-enum": { + "name": "AlertState", + "modelAsString": true + }, + "description": "The state of the alert after the evaluation." + }, + "evaluatedPeriods": { + "type": "array", + "items": { + "$ref": "#/definitions/EvaluatedPeriod" + }, + "description": "An array of evaluated periods." + }, + "thresholdMet": { + "type": "boolean", + "description": "Indicates whether the threshold was met for this evaluation." + } + }, + "description": "An evaluation of the alert rule." + }, + "EvaluatedPeriod": { + "type": "object", + "properties": { + "timestamp": { + "type": "string", + "format": "date-time", + "description": "The timestamp of the evaluated period." + }, + "highThreshold": { + "type": "number", + "format": "double", + "description": "The high threshold value for the evaluation period." + }, + "lowThreshold": { + "type": "number", + "format": "double", + "description": "The low threshold value for the evaluation period." + }, + "metricValue": { + "type": "number", + "format": "double", + "description": "The metric value for the evaluation period." + }, + "thresholdMet": { + "type": "boolean", + "description": "Indicates whether the threshold was met during the evaluation period." + } + }, + "description": "Details of the evaluated period." + }, + "DimensionNameAndValue": { + "type": "object", + "description": "Dimension name and value", + "properties": { + "name": { + "type": "string", + "description": "Name of the dimension" + }, + "value": { + "type": "string", + "description": "Value of the dimension" + } + }, + "required": [ + "name", + "value" + ] + }, + "PreviewAlertRuleRequest": { + "type": "object", + "properties": { + "location": { + "type": "string", + "description": "The location of the rule resource." + }, + "properties": { + "type": "object", + "properties": { + "lookbackPeriod": { + "type": "string", + "format": "duration", + "description": "Specifies the lookback of the preview in ISO 8601 duration format." + }, + "scheduledQueryRuleProperties": { + "$ref": "#/definitions/LogAlertRuleResource", + "description": "The properties of the alert rule to preview." + } + }, + "required": [ + "lookbackPeriod" + ] + } + }, + "required": [ + "location", + "properties" + ] + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json new file mode 100644 index 000000000000..f40252f9580c --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json @@ -0,0 +1,120 @@ +{ + "parameters": { + "subscriptionId": "dd4bfc94-a096-412b-9c43-4bd13e35afbc", + "api-version": "2025-05-01-preview", + "parameters": { + "location": "eastus", + "properties": { + "lookbackPeriod": "P1D", + "scheduledQueryRuleProperties": { + "location": "eastus", + "properties": { + "description": "Performance rule", + "severity": 4, + "enabled": true, + "evaluationFrequency": "PT5M", + "scopes": [ + "/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1" + ], + "windowSize": "PT10M", + "criteria": { + "allOf": [ + { + "criterionType": "DynamicThresholdCriterion", + "query": "Perf | where ObjectName == \"Processor\"", + "timeAggregation": "Average", + "metricMeasureColumn": "% Processor Time", + "resourceIdColumn": "resourceId", + "dimensions": [ + { + "name": "ComputerIp", + "operator": "Exclude", + "values": [ + "192.168.1.1" + ] + }, + { + "name": "OSType", + "operator": "Include", + "values": [ + "*" + ] + } + ], + "operator": "GreaterOrLessThan", + "alertSensitivity": "Medium", + "ignoreDataBefore": "2024-06-01T21:00:00.000Z" + } + ] + }, + "muteActionsDuration": "PT30M" + } + } + } + } + }, + "responses": { + "200": { + "body": { + "rulePreviewResults": [ + { + "dimensionCombination": [ + { + "name": "Region", + "value": "East US" + }, + { + "name": "Environment", + "value": "Production" + } + ], + "evaluations": [ + { + "evaluationTime": "2025-02-15T10:00:00Z", + "alertState": "Fired", + "thresholdMet": true, + "evaluatedPeriods": [ + { + "timestamp": "2025-02-15T09:00:00Z", + "highThreshold": 80.0, + "lowThreshold": 20.0, + "metricValue": 85.0, + "thresholdMet": true + }, + { + "timestamp": "2025-02-15T08:00:00Z", + "highThreshold": 80.0, + "lowThreshold": 20.0, + "metricValue": 75.0, + "thresholdMet": false + } + ] + }, + { + "evaluationTime": "2025-02-15T11:00:00Z", + "alertState": "Resolved", + "thresholdMet": false, + "evaluatedPeriods": [ + { + "timestamp": "2025-02-15T10:00:00Z", + "highThreshold": 80.0, + "lowThreshold": 20.0, + "metricValue": 65.0, + "thresholdMet": false + }, + { + "timestamp": "2025-02-15T09:00:00Z", + "highThreshold": 80.0, + "lowThreshold": 20.0, + "metricValue": 85.0, + "thresholdMet": true + } + ] + } + ] + } + ] + } + } + } +} From 91ae3591bee5e236f67cfa9d1fed97d23ec9df97 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Tue, 29 Jul 2025 15:21:35 +0300 Subject: [PATCH 02/23] Update version to preview/2025-07-01-preview Updated the API version from preview/2025-05-01-preview to preview/2025-07-01-preview. --- .../preview/2025-07-01-preview/PreviewAlertRule.json | 2 +- .../examples/previewDynamicThresholdLogSearchAlertRule.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json index a92fd0136c8b..9fff88941f6e 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2025-05-01-preview", + "version": "2025-07-01-preview", "title": "Preview Alert Rule API in Alerts Management Service Resource Provider", "description": "The Preview Alert Rule API provides the ability to retrieve the results of a simulated historical execution of an alert rule" }, diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json index f40252f9580c..64d050048167 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json @@ -1,7 +1,7 @@ { "parameters": { "subscriptionId": "dd4bfc94-a096-412b-9c43-4bd13e35afbc", - "api-version": "2025-05-01-preview", + "api-version": "2025-07-01-preview", "parameters": { "location": "eastus", "properties": { From 484020a067ee78f1980ceb5b8a4cf0e496fe0a7f Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Tue, 29 Jul 2025 15:21:36 +0300 Subject: [PATCH 03/23] Added tag for 2025-07-01-preview in readme file --- .../alertsmanagement/resource-manager/readme.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 2a6a70ea1183..5c882e5ff5b4 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -57,10 +57,19 @@ directive: title: AlertsManagementClient description: AlertsManagement Client openapi-type: arm -tag: package-2023-03 +tag: package-preview-2025-07-01-preview ``` ======= +### Tag: package-preview-2025-07-01-preview + +These settings apply only when `--tag=package-preview-2025-07-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-preview-2025-07-01-preview' +input-file: + - Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json +``` + ### Tag: package-preview-2025-05-01-preview These settings apply only when `--tag=package-preview-2025-05-01-preview` is specified on the command line. From 67db4a779eefc3649956a0128c740210084cbddc Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Tue, 29 Jul 2025 15:28:16 +0300 Subject: [PATCH 04/23] changes for the new api version 2025-07-01 --- .../2025-07-01-preview/PreviewAlertRule.json | 50 ++++++------------- ...iewDynamicThresholdLogSearchAlertRule.json | 43 ++++++---------- 2 files changed, 30 insertions(+), 63 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json index 9fff88941f6e..e4f1d898a0f2 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json @@ -27,7 +27,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/previewAlertRule": { + "/{resourceUri}/providers/Microsoft.AlertsManagement/previewAlertRule": { "post": { "tags": [ "PreviewAlertRule" @@ -36,7 +36,7 @@ "operationId": "PreviewAlertRule", "parameters": [ { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + "$ref": "#/parameters/ResourceUriParameter" }, { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -74,21 +74,6 @@ } }, "definitions": { - "LogAlertRuleResolveConfiguration": { - "type": "object", - "description": "TBD. Relevant only for rules of the kind LogAlert.", - "properties": { - "autoResolved": { - "type": "boolean", - "description": "The flag that indicates whether or not to auto resolve a fired alert." - }, - "timeToResolve": { - "type": "string", - "format": "duration", - "description": "The duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format." - } - } - }, "LogAlertRuleProperties": { "type": "object", "properties": { @@ -152,20 +137,6 @@ "criteria": { "$ref": "#/definitions/LogAlertRuleCriteria", "description": "The rule criteria that defines the conditions of the scheduled query rule." - }, - "muteActionsDuration": { - "type": "string", - "format": "duration", - "description": "Mute actions for the chosen period of time (in ISO 8601 duration format) after the alert is fired. Relevant only for rules of the kind LogAlert." - }, - "autoMitigate": { - "type": "boolean", - "description": "The flag that indicates whether the alert should be automatically resolved or not. The default is true. Relevant only for rules of the kind LogAlert." - }, - "resolveConfiguration": { - "type": "object", - "$ref": "#/definitions/LogAlertRuleResolveConfiguration", - "description": "Defines the configuration for resolving fired alerts. Relevant only for rules of the kind LogAlert." } }, "description": "scheduled query rule Definition" @@ -504,10 +475,10 @@ "properties": { "type": "object", "properties": { - "lookbackPeriod": { + "timespan": { "type": "string", "format": "duration", - "description": "Specifies the lookback of the preview in ISO 8601 duration format." + "description": "Specifies the timespan of the preview in ISO 8601 duration format." }, "scheduledQueryRuleProperties": { "$ref": "#/definitions/LogAlertRuleResource", @@ -515,7 +486,7 @@ } }, "required": [ - "lookbackPeriod" + "timespan" ] } }, @@ -524,5 +495,16 @@ "properties" ] } + }, + "parameters": { + "ResourceUriParameter": { + "name": "resourceUri", + "in": "path", + "required": true, + "type": "string", + "description": "The identifier of the resource.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + } } } diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json index 64d050048167..89e219bec05c 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json @@ -1,53 +1,42 @@ { "parameters": { - "subscriptionId": "dd4bfc94-a096-412b-9c43-4bd13e35afbc", + "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", "api-version": "2025-07-01-preview", "parameters": { "location": "eastus", "properties": { - "lookbackPeriod": "P1D", + "timespan": "PT24H", "scheduledQueryRuleProperties": { "location": "eastus", "properties": { "description": "Performance rule", "severity": 4, "enabled": true, - "evaluationFrequency": "PT5M", + "evaluationFrequency": "PT1H", "scopes": [ - "/subscriptions/aaf177ed-1330-a9f2-80ea-fd3d7783b147/resourceGroups/scopeResourceGroup1/providers/Microsoft.Compute/virtualMachines/vm1" + "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace" ], - "windowSize": "PT10M", + "windowSize": "PT1H", "criteria": { "allOf": [ { "criterionType": "DynamicThresholdCriterion", - "query": "Perf | where ObjectName == \"Processor\"", - "timeAggregation": "Average", - "metricMeasureColumn": "% Processor Time", - "resourceIdColumn": "resourceId", + "query": "Alert", + "timeAggregation": "Count", "dimensions": [ { - "name": "ComputerIp", - "operator": "Exclude", - "values": [ - "192.168.1.1" - ] - }, - { - "name": "OSType", + "name": "AlertName", "operator": "Include", "values": [ - "*" + "alert" ] } ], - "operator": "GreaterOrLessThan", - "alertSensitivity": "Medium", - "ignoreDataBefore": "2024-06-01T21:00:00.000Z" + "operator": "GreaterThan", + "alertSensitivity": "Medium" } ] - }, - "muteActionsDuration": "PT30M" + } } } } @@ -60,12 +49,8 @@ { "dimensionCombination": [ { - "name": "Region", - "value": "East US" - }, - { - "name": "Environment", - "value": "Production" + "name": "AlertName", + "value": "Alert1" } ], "evaluations": [ From 89301030f38191dedb0beefb4029c7d6bbcc0ed1 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Tue, 29 Jul 2025 15:30:15 +0300 Subject: [PATCH 05/23] fix readme file --- specification/alertsmanagement/resource-manager/readme.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 5c882e5ff5b4..b1f49dd0989a 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -57,7 +57,7 @@ directive: title: AlertsManagementClient description: AlertsManagement Client openapi-type: arm -tag: package-preview-2025-07-01-preview +tag: package-2023-03 ``` ======= @@ -67,6 +67,12 @@ These settings apply only when `--tag=package-preview-2025-07-01-preview` is spe ```yaml $(tag) == 'package-preview-2025-07-01-preview' input-file: + - Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json + - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json + - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json + - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json + - Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertProcessingRules.json + - Microsoft.AlertsManagement/preview/2025-03-01-preview/Issues.json - Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json ``` From f40c903dc1ad185b17a373324b0e0ba61153f4bd Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Mon, 4 Aug 2025 10:17:48 +0300 Subject: [PATCH 06/23] merge --- .../resource-manager/readme.md | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index b1f49dd0989a..2a77587206cc 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -76,6 +76,36 @@ input-file: - Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json ``` +### Tag: package-preview-2025-05-25-preview + +These settings apply only when `--tag=package-preview-2025-05-25-preview` is specified on the command line. + +```yaml $(tag) == 'package-preview-2025-05-25-preview' +input-file: + - Microsoft.AlertsManagement/preview/2025-05-25-preview/AlertsManagement.json +``` + +#### New Features in 2025-05-25-preview + +1. Added customProperties field to Alert type + - Optional field that can hold user-defined key-value pairs + - Can be null, empty object {}, or contain string key-value pairs + - Available in both Alerts_GetById and Alerts_List responses + +2. Added tenant-level endpoints for tenant alert management: + - GET /providers/Microsoft.AlertsManagement/alerts + - GET /providers/Microsoft.AlertsManagement/alerts/{alertId} + - GET /providers/Microsoft.AlertsManagement/alerts/{alertId}/history + - POST /providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate + +3. Added event details on alert history modification record: + - New object property named "details" + - The object contains details relevent to this specific event + - Is null when the event is 'AlertCreated' + + These endpoints enable tenant-level alert operations without requiring a specific scope parameter. + The operations are available through new operationIds: Alerts_GetAllTenant, Alerts_GetByIdTenant, Alerts_GetHistoryTenant, Alerts_ChangeStateTenant. + ### Tag: package-preview-2025-05-01-preview These settings apply only when `--tag=package-preview-2025-05-01-preview` is specified on the command line. From 0f6e356de0c4ffe51f602a1a6093871fa8130a6c Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Mon, 4 Aug 2025 10:20:17 +0300 Subject: [PATCH 07/23] merge --- .../alertsmanagement/resource-manager/readme.md | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 2a77587206cc..76870219927f 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -61,20 +61,6 @@ tag: package-2023-03 ``` ======= -### Tag: package-preview-2025-07-01-preview - -These settings apply only when `--tag=package-preview-2025-07-01-preview` is specified on the command line. - -```yaml $(tag) == 'package-preview-2025-07-01-preview' -input-file: - - Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json - - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json - - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json - - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json - - Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertProcessingRules.json - - Microsoft.AlertsManagement/preview/2025-03-01-preview/Issues.json - - Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json -``` ### Tag: package-preview-2025-05-25-preview From f78ac090626aff8eee77b4bb8afbdca854665c8c Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Mon, 4 Aug 2025 10:21:22 +0300 Subject: [PATCH 08/23] fix --- specification/alertsmanagement/resource-manager/readme.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 76870219927f..9f23de267aed 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -60,8 +60,6 @@ openapi-type: arm tag: package-2023-03 ``` -======= - ### Tag: package-preview-2025-05-25-preview These settings apply only when `--tag=package-preview-2025-05-25-preview` is specified on the command line. From 11ce16289284a4ea515d6276fa9c265d5964dcf4 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Mon, 4 Aug 2025 10:39:04 +0300 Subject: [PATCH 09/23] revert --- .../resource-manager/readme.md | 36 ++++++------------- 1 file changed, 11 insertions(+), 25 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 9f23de267aed..b1f49dd0989a 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -60,36 +60,22 @@ openapi-type: arm tag: package-2023-03 ``` -### Tag: package-preview-2025-05-25-preview +======= +### Tag: package-preview-2025-07-01-preview -These settings apply only when `--tag=package-preview-2025-05-25-preview` is specified on the command line. +These settings apply only when `--tag=package-preview-2025-07-01-preview` is specified on the command line. -```yaml $(tag) == 'package-preview-2025-05-25-preview' +```yaml $(tag) == 'package-preview-2025-07-01-preview' input-file: - - Microsoft.AlertsManagement/preview/2025-05-25-preview/AlertsManagement.json + - Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json + - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json + - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json + - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json + - Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertProcessingRules.json + - Microsoft.AlertsManagement/preview/2025-03-01-preview/Issues.json + - Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json ``` -#### New Features in 2025-05-25-preview - -1. Added customProperties field to Alert type - - Optional field that can hold user-defined key-value pairs - - Can be null, empty object {}, or contain string key-value pairs - - Available in both Alerts_GetById and Alerts_List responses - -2. Added tenant-level endpoints for tenant alert management: - - GET /providers/Microsoft.AlertsManagement/alerts - - GET /providers/Microsoft.AlertsManagement/alerts/{alertId} - - GET /providers/Microsoft.AlertsManagement/alerts/{alertId}/history - - POST /providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate - -3. Added event details on alert history modification record: - - New object property named "details" - - The object contains details relevent to this specific event - - Is null when the event is 'AlertCreated' - - These endpoints enable tenant-level alert operations without requiring a specific scope parameter. - The operations are available through new operationIds: Alerts_GetAllTenant, Alerts_GetByIdTenant, Alerts_GetHistoryTenant, Alerts_ChangeStateTenant. - ### Tag: package-preview-2025-05-01-preview These settings apply only when `--tag=package-preview-2025-05-01-preview` is specified on the command line. From 9a2e47aaa70e7a3e9aa58e0d21a219cf0163021b Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Mon, 4 Aug 2025 10:57:11 +0300 Subject: [PATCH 10/23] fix readme again --- .../alertsmanagement/resource-manager/readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 1b547c2eca90..59c5ce765533 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -82,6 +82,15 @@ tag: package-2023-03 ``` ======= +### Tag: package-preview-2025-07-01-preview + +These settings apply only when `--tag=package-preview-2025-05-01-preview` is specified on the command line. + +```yaml $(tag) == 'package-preview-2025-05-01-preview' +input-file: + - Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json +``` + ### Tag: package-preview-2025-05-25-preview These settings apply only when `--tag=package-preview-2025-05-25-preview` is specified on the command line. From 60521fc95591333b385386e5a9576c7b64e112d6 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Mon, 4 Aug 2025 11:08:42 +0300 Subject: [PATCH 11/23] change to 2025-07-01-preview --- .../alertsmanagement/resource-manager/readme.md | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 59c5ce765533..9ab7045b9b88 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -84,9 +84,9 @@ tag: package-2023-03 ======= ### Tag: package-preview-2025-07-01-preview -These settings apply only when `--tag=package-preview-2025-05-01-preview` is specified on the command line. +These settings apply only when `--tag=package-preview-2025-07-01-preview` is specified on the command line. -```yaml $(tag) == 'package-preview-2025-05-01-preview' +```yaml $(tag) == 'package-preview-2025-07-01-preview' input-file: - Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json ``` @@ -127,12 +127,6 @@ These settings apply only when `--tag=package-preview-2025-05-01-preview` is spe ```yaml $(tag) == 'package-preview-2025-05-01-preview' input-file: - - Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json - - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json - - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json - - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json - - Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertProcessingRules.json - - Microsoft.AlertsManagement/preview/2025-03-01-preview/Issues.json - Microsoft.AlertsManagement/preview/2025-05-01-preview/PreviewAlertRule.json ``` ### Tag: package-preview-2025-03-01-preview From 549fb11925b144a8de6c17b6dc226c1e4986704f Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Mon, 4 Aug 2025 11:18:53 +0300 Subject: [PATCH 12/23] revert unrelated change --- specification/alertsmanagement/resource-manager/readme.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 9ab7045b9b88..24118b18bb33 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -127,6 +127,12 @@ These settings apply only when `--tag=package-preview-2025-05-01-preview` is spe ```yaml $(tag) == 'package-preview-2025-05-01-preview' input-file: + - Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json + - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json + - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json + - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json + - Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertProcessingRules.json + - Microsoft.AlertsManagement/preview/2025-03-01-preview/Issues.json - Microsoft.AlertsManagement/preview/2025-05-01-preview/PreviewAlertRule.json ``` ### Tag: package-preview-2025-03-01-preview From 4a62fe03d13990d3c51a0fec28505dd65f7bf471 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Mon, 4 Aug 2025 12:46:13 +0300 Subject: [PATCH 13/23] suppress OperationsAPIImplementation --- specification/alertsmanagement/resource-manager/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 24118b18bb33..cb548c4ee12f 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -72,6 +72,9 @@ directive: from: AlertsManagement.json - suppress: MULTIPLE_API_VERSION reason: The AlertsManagement service requires multiple API versions for comprehensive functionality across different services. + - suppress: OperationsAPIImplementation + reason: Operations API is available in Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json and not needed in preview version + from: Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json ``` ``` yaml From 99537d7a596e192b3c083ede183488b0bb8a57b6 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Thu, 7 Aug 2025 10:24:18 +0300 Subject: [PATCH 14/23] try adding the preview to the default tag --- specification/alertsmanagement/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index cb548c4ee12f..8f9ca827363c 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -182,6 +182,7 @@ input-file: - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json - Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertProcessingRules.json - Microsoft.AlertsManagement/preview/2025-03-01-preview/Issues.json + - Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json ``` ### Important Note From d69ae2d7f704c80b203b09becb4b04a05b89ccbf Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Wed, 20 Aug 2025 11:12:35 +0300 Subject: [PATCH 15/23] change from resourceUri->resourceId and add format for parameter resourceId --- .../preview/2025-07-01-preview/PreviewAlertRule.json | 9 +++++---- .../previewDynamicThresholdLogSearchAlertRule.json | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json index e4f1d898a0f2..8410fccda3aa 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json @@ -27,7 +27,7 @@ } }, "paths": { - "/{resourceUri}/providers/Microsoft.AlertsManagement/previewAlertRule": { + "/{resourceId}/providers/Microsoft.AlertsManagement/previewAlertRule": { "post": { "tags": [ "PreviewAlertRule" @@ -36,7 +36,7 @@ "operationId": "PreviewAlertRule", "parameters": [ { - "$ref": "#/parameters/ResourceUriParameter" + "$ref": "#/parameters/ResourceIdParameter" }, { "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" @@ -497,11 +497,12 @@ } }, "parameters": { - "ResourceUriParameter": { - "name": "resourceUri", + "ResourceIdParameter": { + "name": "resourceId", "in": "path", "required": true, "type": "string", + "format": "arm-id", "description": "The identifier of the resource.", "x-ms-parameter-location": "method", "x-ms-skip-url-encoding": true diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json index 89e219bec05c..3232b31cb728 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json @@ -1,6 +1,6 @@ { "parameters": { - "resourceUri": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", + "resourceId": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", "api-version": "2025-07-01-preview", "parameters": { "location": "eastus", From d6f96ca89179883245fbe172be48c627f94b671f Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Wed, 20 Aug 2025 11:21:53 +0300 Subject: [PATCH 16/23] fix resourceId in example --- .../examples/previewDynamicThresholdLogSearchAlertRule.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json index 3232b31cb728..88ac14d305ec 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json @@ -1,6 +1,6 @@ { "parameters": { - "resourceId": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", + "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", "api-version": "2025-07-01-preview", "parameters": { "location": "eastus", From 58602aa9761f9a011d77a030fcde149d333b4e25 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Wed, 20 Aug 2025 11:28:51 +0300 Subject: [PATCH 17/23] remove / --- .../preview/2025-07-01-preview/PreviewAlertRule.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json index 8410fccda3aa..c02c43ac1a23 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json @@ -27,7 +27,7 @@ } }, "paths": { - "/{resourceId}/providers/Microsoft.AlertsManagement/previewAlertRule": { + "{resourceId}/providers/Microsoft.AlertsManagement/previewAlertRule": { "post": { "tags": [ "PreviewAlertRule" From 2c75fc67d2bf27f102f2b279c200b5436d399f58 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Wed, 20 Aug 2025 12:17:12 +0300 Subject: [PATCH 18/23] ignore SemanticValidation --- specification/alertsmanagement/resource-manager/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 8f9ca827363c..bc84aebf5ac8 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -75,6 +75,9 @@ directive: - suppress: OperationsAPIImplementation reason: Operations API is available in Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json and not needed in preview version from: Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json + - suppress: SemanticValidation + reason: The resourceId path parameter contains forward slash which is expected for the path to start with slash + from: Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json ``` ``` yaml From 3859b4dd48e215cdc456932ebd572c823d34e0b8 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Wed, 20 Aug 2025 12:40:48 +0300 Subject: [PATCH 19/23] specify the suppression --- specification/alertsmanagement/resource-manager/readme.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index bc84aebf5ac8..e10c3751d8fc 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -78,6 +78,8 @@ directive: - suppress: SemanticValidation reason: The resourceId path parameter contains forward slash which is expected for the path to start with slash from: Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json + where: + - $.paths['{resourceId}/providers/Microsoft.AlertsManagement/previewAlertRule'] ``` ``` yaml From fbbf4f23010b82c52c8b8fc2bab4cfbe0b9a4df1 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Wed, 20 Aug 2025 14:07:01 +0300 Subject: [PATCH 20/23] change location of suppression --- specification/alertsmanagement/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index e10c3751d8fc..753e328739f1 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -79,7 +79,7 @@ directive: reason: The resourceId path parameter contains forward slash which is expected for the path to start with slash from: Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json where: - - $.paths['{resourceId}/providers/Microsoft.AlertsManagement/previewAlertRule'] + - .paths['{resourceId}/providers/Microsoft.AlertsManagement/previewAlertRule'] ``` ``` yaml From ee59f28f92896ed22ff115e579460f94177b25eb Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Wed, 20 Aug 2025 14:20:07 +0300 Subject: [PATCH 21/23] trim slash instead --- .../preview/2025-07-01-preview/PreviewAlertRule.json | 5 +++-- specification/alertsmanagement/resource-manager/readme.md | 5 ----- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json index c02c43ac1a23..f322e686623a 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json @@ -27,7 +27,7 @@ } }, "paths": { - "{resourceId}/providers/Microsoft.AlertsManagement/previewAlertRule": { + "/{resourceId}/providers/Microsoft.AlertsManagement/previewAlertRule": { "post": { "tags": [ "PreviewAlertRule" @@ -505,7 +505,8 @@ "format": "arm-id", "description": "The identifier of the resource.", "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true + "x-ms-skip-url-encoding": true, + "x-ms-trim-slash": true } } } diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 753e328739f1..8f9ca827363c 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -75,11 +75,6 @@ directive: - suppress: OperationsAPIImplementation reason: Operations API is available in Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json and not needed in preview version from: Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json - - suppress: SemanticValidation - reason: The resourceId path parameter contains forward slash which is expected for the path to start with slash - from: Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json - where: - - .paths['{resourceId}/providers/Microsoft.AlertsManagement/previewAlertRule'] ``` ``` yaml From d535b21d5c857a6cf715c66bd5b0aba2b6e931b1 Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Wed, 20 Aug 2025 16:00:46 +0300 Subject: [PATCH 22/23] remove slash --- .../examples/previewDynamicThresholdLogSearchAlertRule.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json index 88ac14d305ec..3232b31cb728 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/examples/previewDynamicThresholdLogSearchAlertRule.json @@ -1,6 +1,6 @@ { "parameters": { - "resourceId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", + "resourceId": "subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myResourceGroup/providers/Microsoft.OperationalInsights/workspaces/myWorkspace", "api-version": "2025-07-01-preview", "parameters": { "location": "eastus", From afb6ec2777a35b0a228d4a996449d943e218817a Mon Sep 17 00:00:00 2001 From: Yuval Beker Date: Wed, 20 Aug 2025 16:16:31 +0300 Subject: [PATCH 23/23] remove the arm id --- .../preview/2025-07-01-preview/PreviewAlertRule.json | 4 +--- specification/alertsmanagement/resource-manager/readme.md | 3 +++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json index f322e686623a..d41cdd266a72 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json @@ -502,11 +502,9 @@ "in": "path", "required": true, "type": "string", - "format": "arm-id", "description": "The identifier of the resource.", "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true, - "x-ms-trim-slash": true + "x-ms-skip-url-encoding": true } } } diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 8f9ca827363c..49787c6d8cf5 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -75,6 +75,9 @@ directive: - suppress: OperationsAPIImplementation reason: Operations API is available in Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json and not needed in preview version from: Microsoft.AlertsManagement/preview/2025-07-01-preview/PreviewAlertRule.json + - code: ValidFormats + where: $.definitions["Azure.Core.eTag"].format + reason: eTag should be an allowed format ``` ``` yaml