From 387c4e6a1c9a26cb057fa9209e66f21ce5bda62e Mon Sep 17 00:00:00 2001 From: Liran-E Date: Wed, 15 May 2024 19:24:52 +0300 Subject: [PATCH] Liran e alertsmanagement microsoft.alerts management 2024 03 01 preview (#27738) * Adds base for updating Microsoft.AlertsManagement from version preview/2023-05-01-preview to version 2024-03-01-preview * Updates readme * Updates API version in new specs and examples * API 2024-03-01-preview: CorrelationUpdates * prettier check fix attempt * Swagger SemanticValidation fix * Swagger PrettierCheck fix * added suppression for OperationsAPIImplementation * 1. changed default package alertprocessingrules.json 2. other fixes to comments by the reviewer * pr fixes * indentation fix * pr fixes * fixed enum casing --------- Co-authored-by: MIDDLEEAST\lienglender --- .../AlertProcessingRules.json | 911 ++++++++++++++++++ ...tion_group_all_alerts_in_subscription.json | 93 ++ ...ules_Create_or_update_add_correlation.json | 108 +++ ..._correlation_with_correlation_updates.json | 132 +++ ...ups_all_Sev0_Sev1_two_resource_groups.json | 129 +++ ...ction_groups_from_specific_alert_rule.json | 111 +++ ..._action_groups_outside_business_hours.json | 135 +++ ...n_groups_recurring_maintenance_window.json | 156 +++ ...pecific_VM_one-off_maintenance_window.json | 99 ++ .../examples/AlertProcessingRules_Delete.json | 12 + .../AlertProcessingRules_GetById.json | 96 ++ ...ertProcessingRules_List_ResourceGroup.json | 135 +++ ...lertProcessingRules_List_Subscription.json | 126 +++ .../examples/AlertProcessingRules_Patch.json | 92 ++ .../resource-manager/readme.md | 16 +- 15 files changed, 2346 insertions(+), 5 deletions(-) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/AlertProcessingRules.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_correlation.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_correlation_with_correlation_updates.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Delete.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_GetById.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_List_ResourceGroup.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_List_Subscription.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Patch.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/AlertProcessingRules.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/AlertProcessingRules.json new file mode 100644 index 000000000000..a24150c84c64 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/AlertProcessingRules.json @@ -0,0 +1,911 @@ +{ + "swagger": "2.0", + "info": { + "version": "2024-03-01-preview", + "title": "Azure Alerts Management Service Resource Provider", + "description": "APIs for Azure alert processing rules CRUD operations." + }, + "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/actionRules": { + "get": { + "description": "List all alert processing rules in a subscription.", + "operationId": "AlertProcessingRules_ListBySubscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Return the list of alert processing rules.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/AlertProcessingRulesList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetAlertProcessingRulesSubscriptionWide": { + "$ref": "./examples/AlertProcessingRules_List_Subscription.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules": { + "get": { + "operationId": "AlertProcessingRules_ListByResourceGroup", + "description": "List all alert processing rules in a resource group.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Return the list of alert processing rules.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/AlertProcessingRulesList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "GetAlertProcessingRulesResourceGroupWide": { + "$ref": "./examples/AlertProcessingRules_List_ResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/actionRules/{alertProcessingRuleName}": { + "get": { + "description": "Get an alert processing rule by name.", + "operationId": "AlertProcessingRules_GetByName", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "name": "alertProcessingRuleName", + "in": "path", + "description": "The name of the alert processing rule that needs to be fetched.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Returns the specific alert processing rule.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/AlertProcessingRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-examples": { + "GetAlertProcessingRuleById": { + "$ref": "./examples/AlertProcessingRules_GetById.json" + } + } + }, + "put": { + "operationId": "AlertProcessingRules_CreateOrUpdate", + "description": "Create or update an alert processing rule.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "name": "alertProcessingRuleName", + "in": "path", + "description": "The name of the alert processing rule that needs to be created/updated.", + "required": true, + "type": "string" + }, + { + "name": "alertProcessingRule", + "in": "body", + "description": "Alert processing rule to be created/updated.", + "required": true, + "schema": { + "$ref": "#/definitions/AlertProcessingRule" + } + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Returns the updated alert processing rule.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/AlertProcessingRule" + } + }, + "201": { + "description": "Created. Returns the created alert processing rule.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/AlertProcessingRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-examples": { + "Create or update a rule that adds an action group to all alerts in a subscription": { + "$ref": "./examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json" + }, + "Create or update a rule that adds two action groups to all Sev0 and Sev1 alerts in two resource groups": { + "$ref": "./examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json" + }, + "Create or update a rule that removes all action groups from alerts on a specific VM during a one-off maintenance window (1800-2000 at a specific date, Pacific Standard Time)": { + "$ref": "./examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json" + }, + "Create or update a rule that removes all action groups from all alerts on any VM in two resource groups during a recurring maintenance window (2200-0400 every Sat and Sun, India Standard Time)": { + "$ref": "./examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json" + }, + "Create or update a rule that removes all action groups outside business hours (Mon-Fri 09:00-17:00, Eastern Standard Time)": { + "$ref": "./examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json" + }, + "Create or update a rule that removes all action groups from all alerts in a subscription coming from a specific alert rule": { + "$ref": "./examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json" + }, + "Create or update a rule that adds alerts correlation": { + "$ref": "./examples/AlertProcessingRules_Create_or_update_add_correlation.json" + }, + "Create or update a rule that adds alerts correlation with correlation updates": { + "$ref": "./examples/AlertProcessingRules_Create_or_update_add_correlation_with_correlation_updates.json" + } + } + }, + "delete": { + "description": "Delete an alert processing rule.", + "operationId": "AlertProcessingRules_Delete", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "name": "alertProcessingRuleName", + "in": "path", + "description": "The name of the alert processing rule that needs to be deleted.", + "required": true, + "type": "string" + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request to delete an alert processing rule.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + } + }, + "204": { + "description": "No content: the request was successful, but the response is empty.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-examples": { + "DeleteAlertProcessingRule": { + "$ref": "./examples/AlertProcessingRules_Delete.json" + } + } + }, + "patch": { + "description": "Enable, disable, or update tags for an alert processing rule.", + "operationId": "AlertProcessingRules_Update", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroupName" + }, + { + "name": "alertProcessingRuleName", + "in": "path", + "description": "The name that needs to be updated.", + "required": true, + "type": "string" + }, + { + "name": "alertProcessingRulePatch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PatchObject" + }, + "description": "Parameters supplied to the operation." + }, + { + "$ref": "../../../../../common-types/resource-management/v2/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "OK. Returns the created/updated alert processing rule.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/AlertProcessingRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-examples": { + "PatchAlertProcessingRule": { + "$ref": "./examples/AlertProcessingRules_Patch.json" + } + } + } + } + }, + "parameters": { + "subscriptionId": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription.", + "minLength": 1 + }, + "resourceGroupName": { + "name": "resourceGroupName", + "description": "Resource group name where the resource is created.", + "type": "string", + "in": "path", + "required": true, + "x-ms-parameter-location": "method" + } + }, + "definitions": { + "errorResponse": { + "description": "An error response from the service.", + "properties": { + "error": { + "$ref": "#/definitions/errorResponseBody" + } + } + }, + "errorResponseBody": { + "description": "Details of error response.", + "properties": { + "code": { + "type": "string", + "description": "Error code, intended to be consumed programmatically." + }, + "message": { + "type": "string", + "description": "Description of the error, intended for display in user interface." + }, + "target": { + "type": "string", + "description": "Target of the particular error, for example name of the property." + }, + "details": { + "type": "array", + "description": "A list of additional details about the error.", + "items": { + "$ref": "#/definitions/errorResponseBody" + } + } + } + }, + "Resource": { + "x-ms-azure-resource": true, + "description": "An azure resource object", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + } + } + }, + "ManagedResource": { + "description": "An azure managed resource object.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "required": [ + "location" + ] + }, + "Scopes": { + "type": "array", + "description": "List of ARM IDs which will be the target of the given alert processing rule.", + "items": { + "type": "string" + } + }, + "Condition": { + "type": "object", + "description": "Condition to trigger an alert processing rule.", + "properties": { + "field": { + "type": "string", + "description": "Field for a given condition.", + "enum": [ + "Severity", + "MonitorService", + "MonitorCondition", + "SignalType", + "TargetResourceType", + "TargetResource", + "TargetResourceGroup", + "AlertRuleId", + "AlertRuleName", + "Description", + "AlertContext" + ], + "x-ms-enum": { + "name": "Field", + "modelAsString": true + } + }, + "operator": { + "type": "string", + "description": "Operator for a given condition.", + "enum": [ + "Equals", + "NotEquals", + "Contains", + "DoesNotContain" + ], + "x-ms-enum": { + "name": "Operator", + "modelAsString": true + } + }, + "values": { + "type": "array", + "description": "List of values to match for a given condition.", + "items": { + "type": "string" + } + } + } + }, + "Conditions": { + "type": "array", + "description": "Conditions in alert instance to be matched for a given alert processing rule. Default value is all. Multiple values could be provided with comma separation.", + "items": { + "$ref": "#/definitions/Condition" + } + }, + "Schedule": { + "type": "object", + "description": "Scheduling configuration for a given alert processing rule.", + "properties": { + "effectiveFrom": { + "type": "string", + "pattern": "^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$", + "description": "Scheduling effective from time. Date-Time in ISO-8601 format without timezone suffix." + }, + "effectiveUntil": { + "type": "string", + "pattern": "^(?:(\\d{4}-\\d{2}-\\d{2})T(\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?))$", + "description": "Scheduling effective until time. Date-Time in ISO-8601 format without timezone suffix." + }, + "timeZone": { + "type": "string", + "description": "Scheduling time zone." + }, + "recurrences": { + "type": "array", + "description": "List of recurrences.", + "items": { + "$ref": "#/definitions/Recurrence" + } + } + } + }, + "Recurrence": { + "type": "object", + "description": "Recurrence object.", + "discriminator": "recurrenceType", + "required": [ + "recurrenceType" + ], + "properties": { + "recurrenceType": { + "type": "string", + "description": "Specifies when the recurrence should be applied.", + "enum": [ + "Daily", + "Weekly", + "Monthly" + ], + "x-ms-enum": { + "name": "RecurrenceType", + "modelAsString": true + } + }, + "startTime": { + "type": "string", + "description": "Start time for recurrence." + }, + "endTime": { + "type": "string", + "description": "End time for recurrence." + } + } + }, + "DailyRecurrence": { + "x-ms-discriminator-value": "Daily", + "type": "object", + "description": "Daily recurrence object.", + "required": [ + "startTime", + "endTime" + ], + "allOf": [ + { + "$ref": "#/definitions/Recurrence" + } + ] + }, + "WeeklyRecurrence": { + "x-ms-discriminator-value": "Weekly", + "type": "object", + "description": "Weekly recurrence object.", + "required": [ + "daysOfWeek" + ], + "allOf": [ + { + "$ref": "#/definitions/Recurrence" + } + ], + "properties": { + "daysOfWeek": { + "type": "array", + "description": "Specifies the values for weekly recurrence pattern.", + "items": { + "$ref": "#/definitions/DaysOfWeek" + } + } + } + }, + "MonthlyRecurrence": { + "x-ms-discriminator-value": "Monthly", + "type": "object", + "description": "Monthly recurrence object.", + "required": [ + "daysOfMonth" + ], + "allOf": [ + { + "$ref": "#/definitions/Recurrence" + } + ], + "properties": { + "daysOfMonth": { + "type": "array", + "description": "Specifies the values for monthly recurrence pattern.", + "items": { + "type": "integer", + "format": "int32" + } + } + } + }, + "DaysOfWeek": { + "type": "string", + "description": "Days of week.", + "enum": [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday" + ], + "x-ms-enum": { + "name": "DaysOfWeek", + "modelAsString": true + } + }, + "AlertProcessingRule": { + "type": "object", + "description": "Alert processing rule object containing target scopes, conditions and scheduling logic.", + "allOf": [ + { + "$ref": "#/definitions/ManagedResource" + } + ], + "properties": { + "properties": { + "description": "Alert processing rule properties.", + "$ref": "#/definitions/AlertProcessingRuleProperties" + }, + "systemData": { + "description": "Alert processing rule system data.", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + } + }, + "AlertProcessingRuleProperties": { + "type": "object", + "description": "Alert processing rule properties defining scopes, conditions and scheduling logic for alert processing rule.", + "required": [ + "scopes", + "actions" + ], + "properties": { + "scopes": { + "description": "Scopes on which alert processing rule will apply.", + "$ref": "#/definitions/Scopes" + }, + "conditions": { + "description": "Conditions on which alerts will be filtered.", + "$ref": "#/definitions/Conditions" + }, + "schedule": { + "description": "Scheduling for alert processing rule.", + "$ref": "#/definitions/Schedule" + }, + "actions": { + "type": "array", + "description": "Actions to be applied.", + "items": { + "$ref": "#/definitions/Action" + } + }, + "description": { + "type": "string", + "description": "Description of alert processing rule." + }, + "enabled": { + "type": "boolean", + "default": true, + "description": "Indicates if the given alert processing rule is enabled or disabled." + } + } + }, + "Action": { + "type": "object", + "description": "Action to be applied.", + "discriminator": "actionType", + "required": [ + "actionType" + ], + "properties": { + "actionType": { + "type": "string", + "description": "Action that should be applied.", + "enum": [ + "AddActionGroups", + "RemoveAllActionGroups", + "CorrelateAlerts" + ], + "x-ms-enum": { + "name": "actionType", + "modelAsString": true + } + } + } + }, + "AddActionGroups": { + "x-ms-discriminator-value": "AddActionGroups", + "type": "object", + "description": "Add action groups to alert processing rule.", + "required": [ + "actionGroupIds" + ], + "allOf": [ + { + "$ref": "#/definitions/Action" + } + ], + "properties": { + "actionGroupIds": { + "description": "List of action group Ids to add to alert processing rule.", + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "RemoveAllActionGroups": { + "x-ms-discriminator-value": "RemoveAllActionGroups", + "type": "object", + "description": "Indicates if all action groups should be removed.", + "allOf": [ + { + "$ref": "#/definitions/Action" + } + ] + }, + "CorrelateAlerts": { + "x-ms-discriminator-value": "CorrelateAlerts", + "type": "object", + "description": "Add logic for alerts correlation.", + "required": [ + "correlateBy", + "correlationInterval", + "priority" + ], + "allOf": [ + { + "$ref": "#/definitions/Action" + } + ], + "properties": { + "correlateBy": { + "type": "array", + "description": "The list of conditions for the alerts correlations.", + "items": { + "$ref": "#/definitions/CorrelateBy" + }, + "x-ms-identifiers": [] + }, + "correlationInterval": { + "type": "string", + "description": "The required duration (in ISO8601 format) for the alerts correlation." + }, + "priority": { + "type": "integer", + "format": "int32", + "description": "The priority of this correlation." + }, + "notificationsForCorrelatedAlerts": { + "type": "string", + "default": "SuppressAlways", + "description": "Indicates how to handle child alerts notifications.", + "enum": [ + "NotifyAlways", + "SuppressAlways" + ], + "x-ms-enum": { + "name": "NotificationsForCorrelatedAlerts", + "modelAsString": true + } + }, + "correlationUpdates": { + "$ref": "#/definitions/CorrelationUpdates" + } + } + }, + "CorrelateBy": { + "type": "object", + "description": "The logic for the correlation.", + "properties": { + "field": { + "type": "string", + "description": "The JPath of the property that the alerts should be correlated by." + } + } + }, + "CorrelationUpdates": { + "type": "object", + "description": "Defines the updates to be applied for correlation.", + "properties": { + "updateType": { + "type": "string", + "description": "The type of update that needs to be performed.", + "default": "timeBased", + "enum": [ + "timeBased" + ], + "x-ms-enum": { + "name": "UpdateType", + "modelAsString": true + } + }, + "updateInterval": { + "type": "string", + "description": "The update interval for notification updates in ISO8601 format." + }, + "actionGroups": { + "type": "array", + "description": "The action group ids.", + "items": { + "type": "string" + } + } + }, + "required": [ + "updateType", + "updateInterval", + "actionGroups" + ] + }, + "AlertProcessingRulesList": { + "type": "object", + "description": "List of alert processing rules.", + "properties": { + "nextLink": { + "type": "string", + "description": "URL to fetch the next set of alert processing rules." + }, + "value": { + "type": "array", + "description": "List of alert processing rules.", + "items": { + "$ref": "#/definitions/AlertProcessingRule" + } + } + } + }, + "PatchProperties": { + "description": "Alert processing rule properties supported by patch.", + "properties": { + "enabled": { + "type": "boolean", + "description": "Indicates if the given alert processing rule is enabled or disabled." + } + } + }, + "PatchObject": { + "description": "Data contract for patch.", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "description": "Properties supported by patch operation.", + "$ref": "#/definitions/PatchProperties" + }, + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Tags to be updated." + } + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json new file mode 100644 index 000000000000..720b541f15c4 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "subId1", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "AddActionGroupToSubscription", + "alertProcessingRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "AddActionGroups", + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" + ] + } + ], + "description": "Add ActionGroup1 to all alerts in the subscription", + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2021-02-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "AddActionGroups", + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" + ] + } + ], + "description": "Add ActionGroup1 to all alerts in the subscription", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "AddActionGroupToSubscription", + "location": "Global", + "tags": {} + } + }, + "201": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2021-02-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "AddActionGroups", + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/ActionGroup1" + ] + } + ], + "description": "Add ActionGroup1 to all alerts in the subscription", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupToSubscription", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "AddActionGroupToSubscription", + "location": "Global", + "tags": {} + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_correlation.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_correlation.json new file mode 100644 index 000000000000..9722d8f855b2 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_correlation.json @@ -0,0 +1,108 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "subId1", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "CorrelateAlerts", + "alertProcessingRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "CorrelateAlerts", + "correlateBy": [ + { + "field": "essentials.alertRule" + } + ], + "correlationInterval": "PT30M", + "priority": 50, + "notificationsForCorrelatedAlerts": "SuppressAlways" + } + ], + "description": "Correlate Alerts Example.", + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2021-02-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "CorrelateAlerts", + "correlateBy": [ + { + "field": "essentials.alertRule" + } + ], + "correlationInterval": "PT30M", + "priority": 50, + "notificationsForCorrelatedAlerts": "SuppressAlways" + } + ], + "description": "Correlate Alerts Example.", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/CorrelateAlerts", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "CorrelateAlerts", + "location": "Global", + "tags": {} + } + }, + "201": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2021-02-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "CorrelateAlerts", + "correlateBy": [ + { + "field": "essentials.alertRule" + } + ], + "correlationInterval": "PT30M", + "priority": 50, + "notificationsForCorrelatedAlerts": "SuppressAlways" + } + ], + "description": "Correlate Alerts Example.", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/CorrelateAlerts", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "CorrelateAlerts", + "location": "Global", + "tags": {} + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_correlation_with_correlation_updates.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_correlation_with_correlation_updates.json new file mode 100644 index 000000000000..c4f6125919aa --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_correlation_with_correlation_updates.json @@ -0,0 +1,132 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "subId1", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "CorrelateAlerts", + "alertProcessingRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "CorrelateAlerts", + "correlateBy": [ + { + "field": "essentials.alertRule" + } + ], + "correlationInterval": "PT30M", + "priority": 50, + "notificationsForCorrelatedAlerts": "SuppressAlways", + "correlationUpdates": { + "updateType": "timeBased", + "updateInterval": "PT15M", + "actionGroups": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ] + } + } + ], + "description": "Correlate Alerts Example.", + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2021-02-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "CorrelateAlerts", + "correlateBy": [ + { + "field": "essentials.alertRule" + } + ], + "correlationInterval": "PT30M", + "priority": 50, + "notificationsForCorrelatedAlerts": "SuppressAlways", + "correlationUpdates": { + "updateType": "timeBased", + "updateInterval": "PT15M", + "actionGroups": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ] + } + } + ], + "description": "Correlate Alerts Example.", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/CorrelateAlerts", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "CorrelateAlerts", + "location": "Global", + "tags": {} + } + }, + "201": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2021-02-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2021-02-13T16:15:34Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "CorrelateAlerts", + "correlateBy": [ + { + "field": "essentials.alertRule" + } + ], + "correlationInterval": "PT30M", + "priority": 50, + "notificationsForCorrelatedAlerts": "SuppressAlways", + "correlationUpdates": { + "updateType": "timeBased", + "updateInterval": "PT15M", + "actionGroups": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ] + } + } + ], + "description": "Correlate Alerts Example.", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/CorrelateAlerts", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "CorrelateAlerts", + "location": "Global", + "tags": {} + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json new file mode 100644 index 000000000000..182f0188b0ee --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "subId1", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "AddActionGroupsBySeverity", + "alertProcessingRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "sev0", + "sev1" + ] + } + ], + "actions": [ + { + "actionType": "AddActionGroups", + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ] + } + ], + "description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-13T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "sev0", + "sev1" + ] + } + ], + "actions": [ + { + "actionType": "AddActionGroups", + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ] + } + ], + "description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "AddActionGroupsBySeverity", + "location": "Global", + "tags": {} + } + }, + "201": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-13T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "sev0", + "sev1" + ] + } + ], + "actions": [ + { + "actionType": "AddActionGroups", + "actionGroupIds": [ + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId1", + "/subscriptions/subId1/resourcegroups/RGId1/providers/microsoft.insights/actiongroups/AGId2" + ] + } + ], + "description": "Add AGId1 and AGId2 to all Sev0 and Sev1 alerts in these resourceGroups", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/AddActionGroupsBySeverity", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "AddActionGroupsBySeverity", + "location": "Global", + "tags": {} + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json new file mode 100644 index 000000000000..bdfce5606a0a --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "subId1", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "RemoveActionGroupsSpecificAlertRule", + "alertProcessingRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "conditions": [ + { + "field": "AlertRuleId", + "operator": "Equals", + "values": [ + "/subscriptions/suubId1/resourceGroups/Rgid2/providers/microsoft.insights/activityLogAlerts/RuleName" + ] + } + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "description": "Removes all ActionGroups from all Alerts that fire on above AlertRule", + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-11T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "conditions": [ + { + "field": "AlertRuleId", + "operator": "Equals", + "values": [ + "/subscriptions/suubId1/resourceGroups/Rgid2/providers/microsoft.insights/activityLogAlerts/RuleName" + ] + } + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "description": "Removes all ActionGroups from all Alerts that fire on above AlertRule", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsSpecificAlertRule", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "RemoveActionGroupsSpecificAlertRule", + "location": "Global", + "tags": {} + } + }, + "201": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-11T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "conditions": [ + { + "field": "AlertRuleId", + "operator": "Equals", + "values": [ + "/subscriptions/suubId1/resourceGroups/Rgid2/providers/microsoft.insights/activityLogAlerts/RuleName" + ] + } + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "description": "Removes all ActionGroups from all Alerts that fire on above AlertRule", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsSpecificAlertRule", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "RemoveActionGroupsSpecificAlertRule", + "location": "Global", + "tags": {} + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json new file mode 100644 index 000000000000..e3966fd2a737 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json @@ -0,0 +1,135 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "subId1", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "RemoveActionGroupsOutsideBusinessHours", + "alertProcessingRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "schedule": { + "timeZone": "Eastern Standard Time", + "recurrences": [ + { + "recurrenceType": "Daily", + "startTime": "17:00:00", + "endTime": "09:00:00" + }, + { + "recurrenceType": "Weekly", + "daysOfWeek": [ + "Saturday", + "Sunday" + ] + } + ] + }, + "description": "Remove all ActionGroups outside business hours", + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-11T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "schedule": { + "timeZone": "Eastern Standard Time", + "recurrences": [ + { + "recurrenceType": "Daily", + "startTime": "17:00:00", + "endTime": "09:00:00" + }, + { + "recurrenceType": "Weekly", + "daysOfWeek": [ + "Saturday", + "Sunday" + ] + } + ] + }, + "description": "Remove all ActionGroups outside business hours", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsOutsideBusinessHours", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "RemoveActionGroupsOutsideBusinessHours", + "location": "Global", + "tags": {} + } + }, + "201": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-11T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1" + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "schedule": { + "timeZone": "Eastern Standard Time", + "recurrences": [ + { + "recurrenceType": "Daily", + "startTime": "17:00:00", + "endTime": "09:00:00" + }, + { + "recurrenceType": "Weekly", + "daysOfWeek": [ + "Saturday", + "Sunday" + ] + } + ] + }, + "description": "Remove all ActionGroups outside business hours", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsOutsideBusinessHours", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "RemoveActionGroupsOutsideBusinessHours", + "location": "Global", + "tags": {} + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json new file mode 100644 index 000000000000..3be69fef8b72 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json @@ -0,0 +1,156 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "subId1", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "RemoveActionGroupsRecurringMaintenance", + "alertProcessingRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ], + "conditions": [ + { + "field": "TargetResourceType", + "operator": "Equals", + "values": [ + "microsoft.compute/virtualmachines" + ] + } + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "schedule": { + "timeZone": "India Standard Time", + "recurrences": [ + { + "recurrenceType": "Weekly", + "startTime": "22:00:00", + "endTime": "04:00:00", + "daysOfWeek": [ + "Saturday", + "Sunday" + ] + } + ] + }, + "description": "Remove all ActionGroups from all Vitual machine Alerts during the recurring maintenance", + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-11T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ], + "conditions": [ + { + "field": "TargetResourceType", + "operator": "Equals", + "values": [ + "microsoft.compute/virtualmachines" + ] + } + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "schedule": { + "timeZone": "India Standard Time", + "recurrences": [ + { + "recurrenceType": "Weekly", + "startTime": "22:00:00", + "endTime": "04:00:00", + "daysOfWeek": [ + "Saturday", + "Sunday" + ] + } + ] + }, + "description": "Remove all ActionGroups from all Vitual machine Alerts during the recurring maintenance", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsRecurringMaintenance", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "RemoveActionGroupsRecurringMaintenance", + "location": "Global", + "tags": {} + } + }, + "201": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-11T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1", + "/subscriptions/subId1/resourceGroups/RGId2" + ], + "conditions": [ + { + "field": "TargetResourceType", + "operator": "Equals", + "values": [ + "microsoft.compute/virtualmachines" + ] + } + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "schedule": { + "timeZone": "India Standard Time", + "recurrences": [ + { + "recurrenceType": "Weekly", + "startTime": "22:00:00", + "endTime": "04:00:00", + "daysOfWeek": [ + "Saturday", + "Sunday" + ] + } + ] + }, + "description": "Remove all ActionGroups from all Vitual machine Alerts during the recurring maintenance", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsRecurringMaintenance", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "RemoveActionGroupsRecurringMaintenance", + "location": "Global", + "tags": {} + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json new file mode 100644 index 000000000000..485cababf062 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "subId1", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "RemoveActionGroupsMaintenanceWindow", + "alertProcessingRule": { + "location": "Global", + "tags": {}, + "properties": { + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1/providers/Microsoft.Compute/virtualMachines/VMName" + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "schedule": { + "effectiveFrom": "2021-04-15T18:00:00", + "effectiveUntil": "2021-04-15T20:00:00", + "timeZone": "Pacific Standard Time" + }, + "description": "Removes all ActionGroups from all Alerts on VMName during the maintenance window", + "enabled": true + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T20:13:29Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1/providers/Microsoft.Compute/virtualMachines/VMName" + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "schedule": { + "effectiveFrom": "2021-04-15T18:00:00", + "effectiveUntil": "2021-04-15T20:00:00", + "timeZone": "Pacific Standard Time" + }, + "description": "Removes all ActionGroups from all Alerts on VMName during the maintenance window", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsMaintenanceWindow", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "RemoveActionGroupsMaintenanceWindow", + "location": "Global", + "tags": {} + } + }, + "201": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T20:13:29Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/subId1/resourceGroups/RGId1/providers/Microsoft.Compute/virtualMachines/VMName" + ], + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "schedule": { + "effectiveFrom": "2021-04-15T18:00:00", + "effectiveUntil": "2021-04-15T20:00:00", + "timeZone": "Pacific Standard Time" + }, + "description": "Removes all ActionGroups from all Alerts on VMName during the maintenance window", + "enabled": true + }, + "id": "/subscriptions/subId1/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/RemoveActionGroupsMaintenanceWindow", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "RemoveActionGroupsMaintenanceWindow", + "location": "Global", + "tags": {} + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Delete.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Delete.json new file mode 100644 index 000000000000..686e3126fbe6 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Delete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "DailySuppression" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_GetById.json new file mode 100644 index 000000000000..14867df25384 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_GetById.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "DailySuppression" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "DailySuppression", + "location": "Global", + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "MonitorCondition", + "operator": "Equals", + "values": [ + "Fired" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "schedule": { + "effectiveFrom": "2018-01-10T22:05:09", + "effectiveUntil": "2018-12-10T22:05:09", + "timeZone": "Pacific Standard Time", + "recurrences": [ + { + "recurrenceType": "Daily", + "startTime": "06:00:00", + "endTime": "14:00:00" + }, + { + "recurrenceType": "Weekly", + "startTime": "10:00:00", + "endTime": "20:00:00", + "daysOfWeek": [ + "Saturday", + "Sunday" + ] + } + ] + }, + "actions": [ + { + "actionType": "AddActionGroups", + "actionGroupIds": [ + "actiongGroup1", + "actiongGroup2" + ] + } + ], + "description": "Alert processing rule on resource group for daily and weekly scheduling", + "enabled": true + }, + "tags": {} + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_List_ResourceGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_List_ResourceGroup.json new file mode 100644 index 000000000000..b672d112e52f --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_List_ResourceGroup.json @@ -0,0 +1,135 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroupName": "alertscorrelationrg" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules?api-version=2023-05-01-preview&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "schedule": { + "effectiveFrom": "2018-09-12T06:00:00", + "effectiveUntil": "2018-09-20T14:00:00", + "timeZone": "Pacific Standard Time", + "recurrences": [ + { + "recurrenceType": "Daily", + "startTime": "06:00:00", + "endTime": "14:00:00" + } + ] + }, + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "description": "Alert processing rule on resource group for daily suppression", + "enabled": true + }, + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "DailySuppression", + "location": "Global", + "tags": {} + }, + { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource" + ], + "conditions": [ + { + "field": "MonitorCondition", + "operator": "Equals", + "values": [ + "Fired" + ] + }, + { + "field": "Description", + "operator": "Contains", + "values": [ + "Percentage CPU greater than 80%", + "Metric alert on resource foo" + ] + }, + { + "field": "AlertContext", + "operator": "DoesNotContain", + "values": [ + "testresource", + "foo" + ] + } + ], + "actions": [ + { + "actionType": "AddActionGroups", + "actionGroupIds": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.insights/actiongroups/testAG" + ] + } + ], + "description": "Alert processing rule on resource group for sending email", + "enabled": true + }, + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "WeeklySuppression", + "location": "Global", + "tags": {} + } + ] + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_List_Subscription.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_List_Subscription.json new file mode 100644 index 000000000000..f173f58f4454 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_List_Subscription.json @@ -0,0 +1,126 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/actionRules?api-version=2023-05-01-preview&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "schedule": { + "effectiveFrom": "2018-01-10T22:05:09", + "effectiveUntil": "2018-12-10T22:05:09", + "timeZone": "Pacific Standard Time", + "recurrences": [ + { + "recurrenceType": "Daily", + "startTime": "06:00:00", + "endTime": "14:00:00" + } + ] + }, + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "description": "Alert processing rule on resource group for daily suppression", + "enabled": true + }, + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "DailySuppression", + "location": "Global", + "tags": {} + }, + { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource" + ], + "conditions": [ + { + "field": "MonitorCondition", + "operator": "Equals", + "values": [ + "Fired" + ] + }, + { + "field": "Description", + "operator": "Contains", + "values": [ + "Percentage CPU greater than 80%", + "Metric alert on resource foo" + ] + } + ], + "description": "Alert processing rule on resource group for adding action group", + "enabled": true, + "actions": [ + { + "actionType": "AddActionGroups", + "actionGroupIds": [ + "actiongGroup1" + ] + } + ] + }, + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "WeeklySuppression", + "location": "Global", + "tags": {} + } + ] + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Patch.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Patch.json new file mode 100644 index 000000000000..534ffc1548c1 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-03-01-preview/examples/AlertProcessingRules_Patch.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "api-version": "2024-03-01-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "WeeklySuppression", + "alertProcessingRulePatch": { + "tags": { + "key1": "value1", + "key2": "value2" + }, + "properties": { + "enabled": false + } + } + }, + "responses": { + "200": { + "body": { + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:09Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:09Z" + }, + "properties": { + "scopes": [ + "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg" + ], + "conditions": [ + { + "field": "Severity", + "operator": "Equals", + "values": [ + "Sev0", + "Sev2" + ] + }, + { + "field": "MonitorService", + "operator": "Equals", + "values": [ + "Platform", + "Application Insights" + ] + }, + { + "field": "TargetResourceType", + "operator": "NotEquals", + "values": [ + "Microsoft.Compute/VirtualMachines" + ] + } + ], + "schedule": { + "effectiveFrom": "2018-12-10T22:05:09", + "effectiveUntil": "2018-12-05T22:05:09", + "timeZone": "Pacific Standard Time", + "recurrences": [ + { + "recurrenceType": "Weekly", + "startTime": "06:00:00", + "endTime": "14:00:00", + "daysOfWeek": [ + "Tuesday", + "Friday" + ] + } + ] + }, + "actions": [ + { + "actionType": "RemoveAllActionGroups" + } + ], + "description": "Alert processing rule on resource group for weekly suppression", + "enabled": false + }, + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "type": "Microsoft.AlertsManagement/actionRules", + "name": "WeeklySuppression", + "location": "Global", + "tags": { + "key1": "value1", + "key2": "value2" + } + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 39f25154456c..2c55e28aaf07 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -47,10 +47,18 @@ openapi-type: arm tag: package-2023-03 ``` +### Tag: package-preview-2024-03 +These settings apply only when `--tag=package-preview-2024-03` is specified on the command line. - - +```yaml $(tag) == 'package-preview-2024-03' +input-file: + - Microsoft.AlertsManagement/preview/2024-03-01-preview/AlertProcessingRules.json +suppressions: + - code: OperationsAPIImplementation + from: AlertProcessingRules.json + reason: Aleady implemented in AlertsManagement.json. +``` ### Tag: package-preview-2024-01 These settings apply only when `--tag=package-preview-2024-01` is specified on the command line. @@ -99,8 +107,6 @@ These settings apply only when `--tag=package-preview-2023-01` is specified on t input-file: - Microsoft.AlertsManagement/preview/2023-01-01-preview/AlertRuleRecommendations.json ``` - - ### Tag: package-2023-03 These settings apply only when `--tag=package-2023-03` is specified on the command line. @@ -111,7 +117,7 @@ input-file: - Microsoft.AlertsManagement/preview/2024-01-01-preview/AlertsManagement.json - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json - - Microsoft.AlertsManagement/preview/2023-05-01-preview/AlertProcessingRules.json + - Microsoft.AlertsManagement/preview/2024-03-01-preview/AlertProcessingRules.json ``` ### Tag: package-2021-08