From 5f40430264f742b39c799703a5b60f97de2b6031 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Tue, 30 Aug 2022 19:18:17 +0300 Subject: [PATCH 01/29] Adds base for updating Microsoft.AlertsManagement from version preview/2021-08-08-preview to version 2021-07-22-preview --- .../AlertProcessingRules.json | 824 ++++++++++++++++++ ...tion_group_all_alerts_in_subscription.json | 93 ++ ...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 ++ 12 files changed, 2008 insertions(+) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-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/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Delete.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json new file mode 100644 index 000000000000..a74077f8a0bb --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json @@ -0,0 +1,824 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-08-08-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": "#/parameters/api-version" + } + ], + "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": "#/parameters/api-version" + } + ], + "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": "#/parameters/api-version" + } + ], + "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": "#/parameters/api-version" + } + ], + "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" + } + } + }, + "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": "#/parameters/api-version" + } + ], + "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": "#/parameters/api-version" + } + ], + "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" + }, + "api-version": { + "name": "api-version", + "description": "Client API version.", + "type": "string", + "in": "query", + "required": true, + "enum": [ + "2021-08-08-preview" + ], + "x-ms-enum": { + "name": "api-version", + "modelAsString": true + } + } + }, + "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" + ], + "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" + } + ] + }, + "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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json new file mode 100644 index 000000000000..50e490c2d49c --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json @@ -0,0 +1,93 @@ +{ + "parameters": { + "api-version": "2021-08-08-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/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json new file mode 100644 index 000000000000..21db08455a86 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json @@ -0,0 +1,129 @@ +{ + "parameters": { + "api-version": "2021-08-08-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json new file mode 100644 index 000000000000..d3ecbafde24a --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json @@ -0,0 +1,111 @@ +{ + "parameters": { + "api-version": "2021-08-08-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json new file mode 100644 index 000000000000..cda18eb1656a --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json @@ -0,0 +1,135 @@ +{ + "parameters": { + "api-version": "2021-08-08-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json new file mode 100644 index 000000000000..8b3dda899f52 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json @@ -0,0 +1,156 @@ +{ + "parameters": { + "api-version": "2021-08-08-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/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json new file mode 100644 index 000000000000..ba95adcfeac0 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2021-08-08-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/2021-07-22-preview/examples/AlertProcessingRules_Delete.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Delete.json new file mode 100644 index 000000000000..7c7e622235a9 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Delete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "api-version": "2021-08-08-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroupName": "alertscorrelationrg", + "alertProcessingRuleName": "DailySuppression" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json new file mode 100644 index 000000000000..d19660c451ae --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json @@ -0,0 +1,96 @@ +{ + "parameters": { + "api-version": "2021-08-08-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/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json new file mode 100644 index 000000000000..398cd5892286 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json @@ -0,0 +1,135 @@ +{ + "parameters": { + "api-version": "2021-08-08-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=2021-08-08-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/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json new file mode 100644 index 000000000000..8a813b34c528 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json @@ -0,0 +1,126 @@ +{ + "parameters": { + "api-version": "2021-08-08-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=2021-08-08-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/2021-07-22-preview/examples/AlertProcessingRules_Patch.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json new file mode 100644 index 000000000000..6399c65ed87f --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "api-version": "2021-08-08-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" + } + } + } + } +} From 5f9ecab146db614f2c6fdbe7c98e1c4edf0777a8 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Tue, 30 Aug 2022 19:18:20 +0300 Subject: [PATCH 02/29] Updates readme --- .../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 f43bad5d5d7f..02581eff0ad2 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -46,6 +46,15 @@ tag: package-2021-08 + +### Tag: package-preview-2021-07 + +These settings apply only when `--tag=package-preview-2021-07` is specified on the command line. + +```yaml $(tag) == 'package-preview-2021-07' +input-file: + - Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json +``` ### Tag: package-2021-08 These settings apply only when `--tag=package-2021-08` is specified on the command line. From 7a4f05058276fb915073508dfe7afb62c20cb96b Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Tue, 30 Aug 2022 19:18:22 +0300 Subject: [PATCH 03/29] Updates API version in new specs and examples --- .../preview/2021-07-22-preview/AlertProcessingRules.json | 4 ++-- ...or_update_add_action_group_all_alerts_in_subscription.json | 2 +- ...d_two_action_groups_all_Sev0_Sev1_two_resource_groups.json | 2 +- ...ate_remove_all_action_groups_from_specific_alert_rule.json | 2 +- ...pdate_remove_all_action_groups_outside_business_hours.json | 2 +- ...remove_all_action_groups_recurring_maintenance_window.json | 2 +- ..._action_groups_specific_VM_one-off_maintenance_window.json | 2 +- .../examples/AlertProcessingRules_Delete.json | 2 +- .../examples/AlertProcessingRules_GetById.json | 2 +- .../examples/AlertProcessingRules_List_ResourceGroup.json | 4 ++-- .../examples/AlertProcessingRules_List_Subscription.json | 4 ++-- .../examples/AlertProcessingRules_Patch.json | 2 +- 12 files changed, 15 insertions(+), 15 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json index a74077f8a0bb..f48f9898ad62 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "version": "2021-08-08-preview", + "version": "2021-07-22-preview", "title": "Azure Alerts Management Service Resource Provider", "description": "APIs for Azure alert processing rules CRUD operations." }, @@ -380,7 +380,7 @@ "in": "query", "required": true, "enum": [ - "2021-08-08-preview" + "2021-07-22-preview" ], "x-ms-enum": { "name": "api-version", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json index 50e490c2d49c..34c5713616e2 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-preview", "subscriptionId": "subId1", "resourceGroupName": "alertscorrelationrg", "alertProcessingRuleName": "AddActionGroupToSubscription", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json index 21db08455a86..087bb92ab6a8 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-preview", "subscriptionId": "subId1", "resourceGroupName": "alertscorrelationrg", "alertProcessingRuleName": "AddActionGroupsBySeverity", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json index d3ecbafde24a..b19ce3db1843 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-preview", "subscriptionId": "subId1", "resourceGroupName": "alertscorrelationrg", "alertProcessingRuleName": "RemoveActionGroupsSpecificAlertRule", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json index cda18eb1656a..7199a35d8296 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-preview", "subscriptionId": "subId1", "resourceGroupName": "alertscorrelationrg", "alertProcessingRuleName": "RemoveActionGroupsOutsideBusinessHours", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json index 8b3dda899f52..d3542e2646a6 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-preview", "subscriptionId": "subId1", "resourceGroupName": "alertscorrelationrg", "alertProcessingRuleName": "RemoveActionGroupsRecurringMaintenance", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json index ba95adcfeac0..77d7ef71b41b 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-preview", "subscriptionId": "subId1", "resourceGroupName": "alertscorrelationrg", "alertProcessingRuleName": "RemoveActionGroupsMaintenanceWindow", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Delete.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Delete.json index 7c7e622235a9..6302c7bc94c7 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Delete.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Delete.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-preview", "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", "resourceGroupName": "alertscorrelationrg", "alertProcessingRuleName": "DailySuppression" diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json index d19660c451ae..2754e01cd616 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-preview", "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", "resourceGroupName": "alertscorrelationrg", "alertProcessingRuleName": "DailySuppression" diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json index 398cd5892286..ba9cb60a7bbe 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json @@ -1,13 +1,13 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-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=2021-08-08-preview&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules?api-version=2021-07-22-preview&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", "value": [ { "systemData": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json index 8a813b34c528..ddf41da63ca2 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json @@ -1,12 +1,12 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-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=2021-08-08-preview&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/actionRules?api-version=2021-07-22-preview&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", "value": [ { "systemData": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json index 6399c65ed87f..c82836856d51 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2021-08-08-preview", + "api-version": "2021-07-22-preview", "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", "resourceGroupName": "alertscorrelationrg", "alertProcessingRuleName": "WeeklySuppression", From ae5b1885166b69991f96461a83935734efae402f Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Tue, 30 Aug 2022 19:22:38 +0300 Subject: [PATCH 04/29] add prometheusRuleGroup --- .../AlertProcessingRules.json | 824 ------------------ .../PrometheusRuleGroups.json | 538 ++++++++++++ ...tion_group_all_alerts_in_subscription.json | 93 -- ...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 -- .../createOrUpdatePrometheusRuleGroup.json | 104 +++ .../examples/deletePrometheusRuleGroup.json | 12 + .../examples/getPrometheusRuleGroup.json | 60 ++ .../listOperationsPrometheusRuleGroup.json | 43 + .../examples/listPrometheusRuleGroups.json | 63 ++ .../examples/patchPrometheusRuleGroup.json | 97 +++ 19 files changed, 917 insertions(+), 2008 deletions(-) delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Delete.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listOperationsPrometheusRuleGroup.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json deleted file mode 100644 index f48f9898ad62..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json +++ /dev/null @@ -1,824 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-07-22-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": "#/parameters/api-version" - } - ], - "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": "#/parameters/api-version" - } - ], - "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": "#/parameters/api-version" - } - ], - "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": "#/parameters/api-version" - } - ], - "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" - } - } - }, - "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": "#/parameters/api-version" - } - ], - "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": "#/parameters/api-version" - } - ], - "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" - }, - "api-version": { - "name": "api-version", - "description": "Client API version.", - "type": "string", - "in": "query", - "required": true, - "enum": [ - "2021-07-22-preview" - ], - "x-ms-enum": { - "name": "api-version", - "modelAsString": true - } - } - }, - "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" - ], - "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" - } - ] - }, - "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/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json new file mode 100644 index 000000000000..00e4110f8666 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -0,0 +1,538 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-07-22-preview", + "title": "Azure Alerts Management Service Resource Provider", + "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." + }, + "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/prometheusRuleGroups": { + "get": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Retrieve Prometheus rule group definitions in a subscription.", + "operationId": "PrometheusRuleGroups_ListBySubscription", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request for a list of Prometheus rule groups", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResourceCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "ListResourcePrometheusRuleGroups": { + "$ref": "./examples/listPrometheusRuleGroups.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups": { + "get": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Retrieve Prometheus rule group definitions in a resource group.", + "operationId": "PrometheusRuleGroups_ListByResourceGroup", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request for a list of Prometheus rule groups", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResourceCollection" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "x-ms-examples": { + "ListResourcePrometheusRuleGroups": { + "$ref": "./examples/listPrometheusRuleGroups.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/prometheusRuleGroups/{ruleGroupName}": { + "get": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Retrieve a Prometheus rule group definition.", + "operationId": "PrometheusRuleGroups_Get", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RuleGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request for a list of Prometheus rule groups", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "GetPrometheusRuleGroup": { + "$ref": "./examples/getPrometheusRuleGroup.json" + } + } + }, + "put": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Create or update a Prometheus rule group definition.", + "operationId": "PrometheusRuleGroups_CreateOrUpdate", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RuleGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + }, + "description": "The parameters of the rule group to create or update." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "CreatePrometheusRuleGroup": { + "$ref": "./examples/createOrUpdatePrometheusRuleGroup.json" + } + } + }, + "patch": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Update an Prometheus rule group definition.", + "operationId": "PrometheusRuleGroups_Update", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RuleGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResourcePatch" + }, + "description": "The parameters of the rule group to update." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PatchPrometheusRuleGroup": { + "$ref": "./examples/patchPrometheusRuleGroup.json" + } + } + }, + "delete": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Delete a Prometheus rule group definition.", + "operationId": "PrometheusRuleGroups_Delete", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RuleGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Successful request to delete a Prometheus rule group" + }, + "204": { + "description": "No content: the request was successful, but the response is empty" + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeletePrometheusRuleGroup": { + "$ref": "./examples/deletePrometheusRuleGroup.json" + } + } + } + }, + "/providers/Microsoft.AlertsManagement/operations": { + "get": { + "description": "Returns list of operations for Microsoft.DeviceUpdate resource provider.", + "operationId": "Operations_List", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "Operation details.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" + } + }, + "default": { + "description": "Error response describing the reason for operation failure.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "DeletePrometheusRuleGroup": { + "$ref": "./examples/listOperationsPrometheusRuleGroup.json" + } + }, + "deprecated": false, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "definitions": { + "PrometheusRuleGroupAction": { + "type": "object", + "description": "An alert action. Only relevant for alerts.", + "properties": { + "actionGroupId": { + "type": "string", + "description": "the id of the action group to use." + }, + "actionProperties": { + "type": "object", + "additionalProperties": { + "type": "string", + "description": "The dictionary of custom properties for the action." + }, + "description": "The properties of an action group object." + } + } + }, + "PrometheusRuleGroupProperties": { + "type": "object", + "required": [ + "scopes", + "rules" + ], + "properties": { + "description": { + "type": "string", + "description": "the description of the Prometheus rule group that will be included in the alert email." + }, + "enabled": { + "type": "boolean", + "description": "the flag that indicates whether the Prometheus rule group is enabled." + }, + "clusterName": { + "type": "string", + "description": "the cluster name of the rule group evaluation." + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "x-ms-identifiers": [], + "description": "the list of resource id's that this rule group is scoped to." + }, + "interval": { + "type": "string", + "description": "the interval in which to run the Prometheus rule group represented in ISO 8601 duration format. Should be between 1 and 15 minutes" + }, + "rules": { + "type": "array", + "items": { + "$ref": "#/definitions/PrometheusRule" + }, + "x-ms-identifiers": [], + "description": "defines the rules in the Prometheus rule group." + }, + "provisioningState": { + "type": "string", + "readOnly": true, + "description": "The provisioning state of the resource in Azure" + } + }, + "description": "An alert rule." + }, + "PrometheusRuleGroupResource": { + "type": "object", + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/TrackedResource" + } + ], + "required": [ + "properties" + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PrometheusRuleGroupProperties", + "description": "The Prometheus rule group properties of the resource." + }, + "systemData": { + "description": "Action rule system data", + "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" + } + }, + "description": "The Prometheus rule group resource." + }, + "PrometheusRuleGroupResourcePatch": { + "type": "object", + "properties": { + "tags": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + }, + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PrometheusRuleGroupProperties", + "description": "The alert rule properties of the resource." + } + }, + "description": "The Prometheus rule group resource for patch operations." + }, + "PrometheusRuleGroupResourceCollection": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + }, + "description": "the values for the alert rule resources." + } + }, + "description": "Represents a collection of alert rule resources." + }, + "PrometheusRule": { + "type": "object", + "required": [ + "expression" + ], + "properties": { + "record": { + "type": "string", + "description": "the name of the recording rule." + }, + "alert": { + "type": "string", + "description": "the name of the alert rule." + }, + "enabled": { + "type": "boolean", + "description": "the flag that indicates whether the Prometheus rule is enabled." + }, + "expression": { + "type": "string", + "description": "the expression to run for the rule." + }, + "severity": { + "type": "integer", + "format": "int32", + "description": "the severity of the alerts fired by the rule. Only relevant for alerts." + }, + "for": { + "type": "string", + "description": "the amount of time alert must be active before firing. Only relevant for alerts." + }, + "labels": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "labels for rule group. Only relevant for alerts." + }, + "annotations": { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "description": "annotations for rule group. Only relevant for alerts." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/PrometheusRuleGroupAction" + }, + "x-ms-identifiers": [], + "description": "The array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved. Only relevant for alerts." + }, + "resolveConfiguration": { + "$ref": "#/definitions/PrometheusRuleResolveConfiguration", + "description": "defines the configuration for resolving fired alerts. Only relevant for alerts." + } + } + }, + "PrometheusRuleResolveConfiguration": { + "type": "object", + "properties": { + "autoResolved": { + "type": "boolean", + "description": "the flag that indicates whether or not to auto resolve a fired alert." + }, + "timeToResolve": { + "type": "string", + "description": "the duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format. Should be between 1 and 15 minutes" + } + }, + "description": "Specifies the Prometheus alert rule configuration." + } + }, + "parameters": { + "RuleGroupNameParameter": { + "name": "ruleGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the rule group.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json deleted file mode 100644 index 34c5713616e2..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_action_group_all_alerts_in_subscription.json +++ /dev/null @@ -1,93 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json deleted file mode 100644 index 087bb92ab6a8..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_add_two_action_groups_all_Sev0_Sev1_two_resource_groups.json +++ /dev/null @@ -1,129 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json deleted file mode 100644 index b19ce3db1843..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_from_specific_alert_rule.json +++ /dev/null @@ -1,111 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json deleted file mode 100644 index 7199a35d8296..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_outside_business_hours.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json deleted file mode 100644 index d3542e2646a6..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_recurring_maintenance_window.json +++ /dev/null @@ -1,156 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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/2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json deleted file mode 100644 index 77d7ef71b41b..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Create_or_update_remove_all_action_groups_specific_VM_one-off_maintenance_window.json +++ /dev/null @@ -1,99 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Delete.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Delete.json deleted file mode 100644 index 6302c7bc94c7..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Delete.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-preview", - "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", - "resourceGroupName": "alertscorrelationrg", - "alertProcessingRuleName": "DailySuppression" - }, - "responses": { - "200": {}, - "204": {} - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json deleted file mode 100644 index 2754e01cd616..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_GetById.json +++ /dev/null @@ -1,96 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json deleted file mode 100644 index ba9cb60a7bbe..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_ResourceGroup.json +++ /dev/null @@ -1,135 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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=2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json deleted file mode 100644 index ddf41da63ca2..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_List_Subscription.json +++ /dev/null @@ -1,126 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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=2021-07-22-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/2021-07-22-preview/examples/AlertProcessingRules_Patch.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json deleted file mode 100644 index c82836856d51..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/AlertProcessingRules_Patch.json +++ /dev/null @@ -1,92 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-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/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json new file mode 100644 index 000000000000..75e1b9490d9f --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladstest", + "ruleGroupName": "myPrometheusRuleGroup", + "api-version": "2021-07-22-preview", + "parameters": { + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "PT5M", + "labels": { + "team": "prod" + }, + "annotations": { + "annotationName1": "annotationValue1" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "interval": "PT5M", + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "PT5M", + "labels": { + "team": "prod" + }, + "annotations": { + "annotationName1": "annotationValue1" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + }, + "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" + } + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json new file mode 100644 index 000000000000..5c08be786219 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/deletePrometheusRuleGroup.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladsteset", + "ruleGroupName": "myPrometheusRuleGroup", + "api-version": "2021-07-22-preview" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json new file mode 100644 index 000000000000..f9d0ce5de0de --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/getPrometheusRuleGroup.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladstest", + "ruleGroupName": "myPrometheusRuleGroup", + "api-version": "2021-07-22-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "global", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + }, + "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" + } + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listOperationsPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listOperationsPrometheusRuleGroup.json new file mode 100644 index 000000000000..3926ac4793e4 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listOperationsPrometheusRuleGroup.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2021-07-22-preview" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Write", + "isDataAction": false, + "display": { + "provider": "Microsoft.AlertsManagement", + "resource": "prometheusRuleGroups", + "operation": "Creates or updates the prometheusRuleGroups", + "description": "Set prometheusRuleGroups" + } + }, + { + "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Delete", + "isDataAction": false, + "display": { + "provider": "Microsoft.AlertsManagement", + "resource": "prometheusRuleGroups", + "operation": "Deletes the prometheusRuleGroups", + "description": "Delete prometheusRuleGroups" + } + }, + { + "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Read", + "isDataAction": false, + "display": { + "provider": "Microsoft.AlertsManagement", + "resource": "prometheusRuleGroups", + "operation": "Reads the prometheusRuleGroups", + "description": "Read prometheusRuleGroups" + } + } + ] + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json new file mode 100644 index 000000000000..e67d474e1c44 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listPrometheusRuleGroups.json @@ -0,0 +1,63 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladstest", + "api-version": "2021-07-22-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + }, + "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" + } + } + ] + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json new file mode 100644 index 000000000000..1e42a9b00791 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json @@ -0,0 +1,97 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "resourceGroupName": "giladstest", + "ruleGroupName": "myPrometheusRuleGroup", + "api-version": "2021-07-22-preview", + "parameters": { + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + } + } + }, + "responses": { + "200": { + "headers": {}, + "body": { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + }, + "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" + } + } + } + } +} From d09531b7f84b25293e0e2fc9f798a8715d0e90cc Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Tue, 30 Aug 2022 19:30:40 +0300 Subject: [PATCH 05/29] update readme --- 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 02581eff0ad2..aec64cdb937d 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -53,7 +53,7 @@ These settings apply only when `--tag=package-preview-2021-07` is specified on t ```yaml $(tag) == 'package-preview-2021-07' input-file: - - Microsoft.AlertsManagement/preview/2021-07-22-preview/AlertProcessingRules.json + - Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json ``` ### Tag: package-2021-08 From 7d045ef017e0988477abdeb98a96f40bd1753959 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Wed, 31 Aug 2022 13:35:45 +0300 Subject: [PATCH 06/29] reorder --- .../resource-manager/readme.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index aec64cdb937d..23e6d4ef58cc 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -45,16 +45,6 @@ tag: package-2021-08 ``` - - -### Tag: package-preview-2021-07 - -These settings apply only when `--tag=package-preview-2021-07` is specified on the command line. - -```yaml $(tag) == 'package-preview-2021-07' -input-file: - - Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json -``` ### Tag: package-2021-08 These settings apply only when `--tag=package-2021-08` is specified on the command line. @@ -77,6 +67,15 @@ input-file: - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json ``` +### Tag: package-preview-2021-07 + +These settings apply only when `--tag=package-preview-2021-07` is specified on the command line. + +```yaml $(tag) == 'package-preview-2021-07' +input-file: + - Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +``` + ### Tag: package-2021-04-only These settings apply only when `--tag=package-2021-04-only` is specified on the command line. From 1a047c7ff6341c1e2c0fbd58f2d53de6b29ea1eb Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Thu, 1 Sep 2022 17:21:13 +0300 Subject: [PATCH 07/29] add prometheuse to 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 23e6d4ef58cc..809e5ab9347f 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -52,6 +52,7 @@ These settings apply only when `--tag=package-2021-08` is specified on the comma ```yaml $(tag) == 'package-2021-08' input-file: - Microsoft.AlertsManagement/stable/2021-08-08/AlertProcessingRules.json + - Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json - Microsoft.AlertsManagement/preview/2019-05-05-preview/AlertsManagement.json - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json ``` From 0a641350962773f86caa22c737ec4c515eaeff47 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Thu, 1 Sep 2022 18:01:20 +0300 Subject: [PATCH 08/29] remove location --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 8 -------- 1 file changed, 8 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 00e4110f8666..08b401cb841b 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -422,14 +422,6 @@ }, "description": "Resource tags" }, - "location": { - "type": "string", - "description": "Resource location", - "x-ms-mutability": [ - "create", - "read" - ] - }, "properties": { "x-ms-client-flatten": true, "$ref": "#/definitions/PrometheusRuleGroupProperties", From 3081056e822bf9700b7ca0c520a4c50a1288227b Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Thu, 1 Sep 2022 18:15:53 +0300 Subject: [PATCH 09/29] add example --- .../listSubscriptionPrometheusRuleGroups.json | 109 ++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listSubscriptionPrometheusRuleGroups.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listSubscriptionPrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listSubscriptionPrometheusRuleGroups.json new file mode 100644 index 000000000000..b5f99a0c8d92 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listSubscriptionPrometheusRuleGroups.json @@ -0,0 +1,109 @@ +{ + "parameters": { + "subscriptionId": "14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7", + "api-version": "2021-07-22-preview" + }, + "responses": { + "200": { + "headers": {}, + "body": { + "value": [ + { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + }, + "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" + } + }, + { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/rg-2/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup2", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/rg-2/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "5m", + "labels": { + "team": "prod" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "10m" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/gigtest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + }, + "systemData": { + "createdBy": "abc@microsoft.com", + "createdByType": "User", + "createdAt": "2018-06-12T22:05:13Z", + "lastModifiedBy": "xyz@microsoft.com", + "lastModifiedByType": "User", + "lastModifiedAt": "2018-06-12T22:05:13Z" + } + } + ] + } + } + } +} From c9420e079c46f2d57ca37e98f3d82fbd7bc9b3cf Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Thu, 1 Sep 2022 18:17:05 +0300 Subject: [PATCH 10/29] update example name --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 08b401cb841b..fd1795a0f2ec 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -61,7 +61,7 @@ }, "x-ms-examples": { "ListResourcePrometheusRuleGroups": { - "$ref": "./examples/listPrometheusRuleGroups.json" + "$ref": "./examples/listSubscriptionPrometheusRuleGroups.json" } } } From 69c477a8b1f6e234203482afd82f410e54f2c41c Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Thu, 1 Sep 2022 18:31:40 +0300 Subject: [PATCH 11/29] fix name --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index fd1795a0f2ec..40ff336132fb 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -312,7 +312,7 @@ } }, "x-ms-examples": { - "DeletePrometheusRuleGroup": { + "GetSubscriptionPrometheusRuleGroup": { "$ref": "./examples/listOperationsPrometheusRuleGroup.json" } }, From 72eaa444e8c17ec4718e27c9e18bea949232ba6c Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Thu, 1 Sep 2022 18:39:00 +0300 Subject: [PATCH 12/29] fix name --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 40ff336132fb..b77c04ca7018 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -60,7 +60,7 @@ "nextLinkName": null }, "x-ms-examples": { - "ListResourcePrometheusRuleGroups": { + "ListSubscriptionResourcePrometheusRuleGroups": { "$ref": "./examples/listSubscriptionPrometheusRuleGroups.json" } } From 4d50454176faa76b6ab66960c3eeef78f162d5bd Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Wed, 7 Sep 2022 12:20:00 +0300 Subject: [PATCH 13/29] remove operations --- .../PrometheusRuleGroups.json | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index b77c04ca7018..7d502c5b1136 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -287,40 +287,6 @@ } } } - }, - "/providers/Microsoft.AlertsManagement/operations": { - "get": { - "description": "Returns list of operations for Microsoft.DeviceUpdate resource provider.", - "operationId": "Operations_List", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "Operation details.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/OperationListResult" - } - }, - "default": { - "description": "Error response describing the reason for operation failure.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "GetSubscriptionPrometheusRuleGroup": { - "$ref": "./examples/listOperationsPrometheusRuleGroup.json" - } - }, - "deprecated": false, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } } }, "definitions": { From 40c59e4663520088b5dd6f07d72024431c8a82ee Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Wed, 7 Sep 2022 12:26:50 +0300 Subject: [PATCH 14/29] remove patch --- .../PrometheusRuleGroups.json | 49 ------------------- 1 file changed, 49 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 7d502c5b1136..961ed32b1a63 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -198,55 +198,6 @@ } } }, - "patch": { - "tags": [ - "PrometheusRuleGroups" - ], - "description": "Update an Prometheus rule group definition.", - "operationId": "PrometheusRuleGroups_Update", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" - }, - { - "$ref": "#/parameters/RuleGroupNameParameter" - }, - { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" - }, - { - "name": "parameters", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PrometheusRuleGroupResourcePatch" - }, - "description": "The parameters of the rule group to update." - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/PrometheusRuleGroupResource" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "PatchPrometheusRuleGroup": { - "$ref": "./examples/patchPrometheusRuleGroup.json" - } - } - }, "delete": { "tags": [ "PrometheusRuleGroups" From 659a9d3ef4375c9e959468ade651b773d76a9cc9 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Wed, 7 Sep 2022 12:29:53 +0300 Subject: [PATCH 15/29] remove example --- .../listOperationsPrometheusRuleGroup.json | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listOperationsPrometheusRuleGroup.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listOperationsPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listOperationsPrometheusRuleGroup.json deleted file mode 100644 index 3926ac4793e4..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/listOperationsPrometheusRuleGroup.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "parameters": { - "api-version": "2021-07-22-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Write", - "isDataAction": false, - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "prometheusRuleGroups", - "operation": "Creates or updates the prometheusRuleGroups", - "description": "Set prometheusRuleGroups" - } - }, - { - "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Delete", - "isDataAction": false, - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "prometheusRuleGroups", - "operation": "Deletes the prometheusRuleGroups", - "description": "Delete prometheusRuleGroups" - } - }, - { - "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Read", - "isDataAction": false, - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "prometheusRuleGroups", - "operation": "Reads the prometheusRuleGroups", - "description": "Read prometheusRuleGroups" - } - } - ] - } - } - } -} From 59283983a269b0042b6b41b95952c316c4ccf9cc Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Wed, 7 Sep 2022 15:58:07 +0300 Subject: [PATCH 16/29] update patch --- .../PrometheusRuleGroups.json | 56 ++++++++++++++++++- .../examples/patchPrometheusRuleGroup.json | 37 ++---------- 2 files changed, 57 insertions(+), 36 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 961ed32b1a63..7bef195b3ac5 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -198,6 +198,55 @@ } } }, + "patch": { + "tags": [ + "PrometheusRuleGroups" + ], + "description": "Update an Prometheus rule group definition.", + "operationId": "PrometheusRuleGroups_Update", + "parameters": [ + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/RuleGroupNameParameter" + }, + { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResourcePatch" + }, + "description": "The parameters of the rule group to update." + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "../../../../../common-types/resource-management/v3/types.json#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "PatchPrometheusRuleGroup": { + "$ref": "./examples/patchPrometheusRuleGroup.json" + } + } + }, "delete": { "tags": [ "PrometheusRuleGroups" @@ -340,9 +389,10 @@ "description": "Resource tags" }, "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/PrometheusRuleGroupProperties", - "description": "The alert rule properties of the resource." + "enabled": { + "type": "boolean", + "description": "the flag that indicates whether the Prometheus rule group is enabled." + } } }, "description": "The Prometheus rule group resource for patch operations." diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json index 1e42a9b00791..3d2f803168a0 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json @@ -5,40 +5,9 @@ "ruleGroupName": "myPrometheusRuleGroup", "api-version": "2021-07-22-preview", "parameters": { - "location": "East US", + "tags": {"tag1": "value1"}, "properties": { - "description": "This is the description of the first rule group", - "scopes": [ - "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" - ], - "rules": [ - { - "record": "job_type:billing_jobs_duration_seconds:99p5m", - "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" - }, - { - "alert": "Billing_Processing_Very_Slow", - "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", - "severity": 2, - "for": "5m", - "labels": { - "team": "prod" - }, - "resolveConfiguration": { - "autoResolved": true, - "timeToResolve": "10m" - }, - "actions": [ - { - "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", - "actionProperties": { - "key11": "value11", - "key12": "value12" - } - } - ] - } - ] + "enabled": false } } }, @@ -49,11 +18,13 @@ "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", "type": "Microsoft.AlertsManagement/prometheusRuleGroups", "location": "East US", + "tags": {"tag1": "value1"}, "properties": { "description": "This is the description of the first rule group", "scopes": [ "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" ], + "enabled": false, "rules": [ { "record": "job_type:billing_jobs_duration_seconds:99p5m", From 63e031db48ee671f19664e9c0c3a5a45a1a8eb0f Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Wed, 7 Sep 2022 16:06:24 +0300 Subject: [PATCH 17/29] fix typo --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 7bef195b3ac5..9b5e3b3607b9 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -389,9 +389,11 @@ "description": "Resource tags" }, "properties": { - "enabled": { - "type": "boolean", - "description": "the flag that indicates whether the Prometheus rule group is enabled." + "properties": { + "enabled": { + "type": "boolean", + "description": "the flag that indicates whether the Prometheus rule group is enabled." + } } } }, From cda6c3777f8c50ace4a93684d772f3bc92f87d8d Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Wed, 7 Sep 2022 16:19:29 +0300 Subject: [PATCH 18/29] add type --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 9b5e3b3607b9..68b8c99789b4 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -389,6 +389,7 @@ "description": "Resource tags" }, "properties": { + "type": "object", "properties": { "enabled": { "type": "boolean", From 4ab09b7482c2a68a075090360b35e8d78473aa0d Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Sun, 11 Sep 2022 13:29:26 +0300 Subject: [PATCH 19/29] wip --- specification/alertsmanagement/resource-manager/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 809e5ab9347f..23e6d4ef58cc 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -52,7 +52,6 @@ These settings apply only when `--tag=package-2021-08` is specified on the comma ```yaml $(tag) == 'package-2021-08' input-file: - Microsoft.AlertsManagement/stable/2021-08-08/AlertProcessingRules.json - - Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json - Microsoft.AlertsManagement/preview/2019-05-05-preview/AlertsManagement.json - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json ``` From e49a39d6b5a991c752403fccf1a7f989f71bf185 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Fri, 16 Sep 2022 06:39:08 +0300 Subject: [PATCH 20/29] prettier --- .../examples/patchPrometheusRuleGroup.json | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json index 3d2f803168a0..3e898aecd84d 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/patchPrometheusRuleGroup.json @@ -5,7 +5,9 @@ "ruleGroupName": "myPrometheusRuleGroup", "api-version": "2021-07-22-preview", "parameters": { - "tags": {"tag1": "value1"}, + "tags": { + "tag1": "value1" + }, "properties": { "enabled": false } @@ -18,7 +20,9 @@ "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/gigtest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", "type": "Microsoft.AlertsManagement/prometheusRuleGroups", "location": "East US", - "tags": {"tag1": "value1"}, + "tags": { + "tag1": "value1" + }, "properties": { "description": "This is the description of the first rule group", "scopes": [ From 797a7244e4b241ba2a379b0c2678c2785efcffe8 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Fri, 16 Sep 2022 06:55:44 +0300 Subject: [PATCH 21/29] add operations api example --- .../2019-03-01/examples/Operations_List.json | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json index bd2a412411c0..5f58018f5543 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json @@ -203,6 +203,36 @@ "operation": "Read operations", "description": "Reads the operations provided" } + }, + { + "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Write", + "isDataAction": false, + "display": { + "provider": "Microsoft.AlertsManagement", + "resource": "prometheusRuleGroups", + "operation": "Creates or updates the prometheusRuleGroups", + "description": "Set prometheusRuleGroups" + } + }, + { + "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Delete", + "isDataAction": false, + "display": { + "provider": "Microsoft.AlertsManagement", + "resource": "prometheusRuleGroups", + "operation": "Deletes the prometheusRuleGroups", + "description": "Delete prometheusRuleGroups" + } + }, + { + "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Read", + "isDataAction": false, + "display": { + "provider": "Microsoft.AlertsManagement", + "resource": "prometheusRuleGroups", + "operation": "Reads the prometheusRuleGroups", + "description": "Read prometheusRuleGroups" + } } ] } From 7ea54e0eb392a23536ae00c8d51cdef6040993ba Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Fri, 16 Sep 2022 07:01:06 +0300 Subject: [PATCH 22/29] fix operations api example issue --- .../stable/2019-03-01/examples/Operations_List.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json index 5f58018f5543..3152f96710e3 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json @@ -206,7 +206,6 @@ }, { "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Write", - "isDataAction": false, "display": { "provider": "Microsoft.AlertsManagement", "resource": "prometheusRuleGroups", @@ -216,7 +215,6 @@ }, { "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Delete", - "isDataAction": false, "display": { "provider": "Microsoft.AlertsManagement", "resource": "prometheusRuleGroups", @@ -226,7 +224,6 @@ }, { "name": "Microsoft.AlertsManagement/prometheusRuleGroups/Read", - "isDataAction": false, "display": { "provider": "Microsoft.AlertsManagement", "resource": "prometheusRuleGroups", From 1483315c20253cc193f04b8f088bf6bf5fdd69f8 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Fri, 16 Sep 2022 10:46:03 +0300 Subject: [PATCH 23/29] add prometheus to 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 23e6d4ef58cc..809e5ab9347f 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -52,6 +52,7 @@ These settings apply only when `--tag=package-2021-08` is specified on the comma ```yaml $(tag) == 'package-2021-08' input-file: - Microsoft.AlertsManagement/stable/2021-08-08/AlertProcessingRules.json + - Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json - Microsoft.AlertsManagement/preview/2019-05-05-preview/AlertsManagement.json - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json ``` From b4d1c7e1f67c6e07ad0fa25fbfc16350813db2f1 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Sat, 8 Oct 2022 17:10:16 +0300 Subject: [PATCH 24/29] put should be able to return 201 for newly created resources, as well as 200 for updates --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 68b8c99789b4..411f4bb15d92 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -180,7 +180,13 @@ ], "responses": { "200": { - "description": "OK", + "description": "OK (Updated).", + "schema": { + "$ref": "#/definitions/PrometheusRuleGroupResource" + } + }, + "201": { + "description": "Created (New Alert rule was created).", "schema": { "$ref": "#/definitions/PrometheusRuleGroupResource" } From 2e94ba0e69ee79a17ec27e6c69d818f86154fecc Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Sat, 8 Oct 2022 17:13:50 +0300 Subject: [PATCH 25/29] remove redundant --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 411f4bb15d92..8d57ba0e7189 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -376,10 +376,6 @@ "x-ms-client-flatten": true, "$ref": "#/definitions/PrometheusRuleGroupProperties", "description": "The Prometheus rule group properties of the resource." - }, - "systemData": { - "description": "Action rule system data", - "$ref": "../../../../../common-types/resource-management/v2/types.json#/definitions/systemData" } }, "description": "The Prometheus rule group resource." From a184c96af0f11046462acc12059fe02c8a6a6146 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Sat, 8 Oct 2022 17:32:18 +0300 Subject: [PATCH 26/29] remove provisioning state --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 5 ----- 1 file changed, 5 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 8d57ba0e7189..2cba4719b052 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -352,11 +352,6 @@ }, "x-ms-identifiers": [], "description": "defines the rules in the Prometheus rule group." - }, - "provisioningState": { - "type": "string", - "readOnly": true, - "description": "The provisioning state of the resource in Azure" } }, "description": "An alert rule." From e5dc0fd6f96a387db467d61ca5580bdc8316d30f Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Sat, 8 Oct 2022 18:13:01 +0300 Subject: [PATCH 27/29] improve description --- .../preview/2021-07-22-preview/PrometheusRuleGroups.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json index 2cba4719b052..1caf4906694b 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/PrometheusRuleGroups.json @@ -302,7 +302,7 @@ "properties": { "actionGroupId": { "type": "string", - "description": "the id of the action group to use." + "description": "The resource id of the action group to use." }, "actionProperties": { "type": "object", From 1fa1fa970e235ea6fb2b4bdef2f09b3015b62881 Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Wed, 2 Nov 2022 11:11:46 +0200 Subject: [PATCH 28/29] add 201 to create or update example --- .../createOrUpdatePrometheusRuleGroup.json | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json index 75e1b9490d9f..88480a3f70f2 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2021-07-22-preview/examples/createOrUpdatePrometheusRuleGroup.json @@ -99,6 +99,60 @@ "lastModifiedAt": "2018-06-12T22:05:09Z" } } + }, + "201": { + "headers": {}, + "body": { + "id": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/providers/Microsoft.AlertsManagement/prometheusRuleGroups/myPrometheusRuleGroup", + "type": "Microsoft.AlertsManagement/prometheusRuleGroups", + "location": "East US", + "properties": { + "description": "This is the description of the first rule group", + "scopes": [ + "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourceGroups/giladstest/providers/Microsoft.Observability/monitoringAcount/myMonitoringAccount" + ], + "interval": "PT5M", + "rules": [ + { + "record": "job_type:billing_jobs_duration_seconds:99p5m", + "expression": "histogram_quantile(0.99, sum(rate(jobs_duration_seconds_bucket{service=\"billing-processing\"}[5m])) by (job_type))" + }, + { + "alert": "Billing_Processing_Very_Slow", + "expression": "job_type:billing_jobs_duration_seconds:99p5m > 30", + "severity": 2, + "for": "PT5M", + "labels": { + "team": "prod" + }, + "annotations": { + "annotationName1": "annotationValue1" + }, + "resolveConfiguration": { + "autoResolved": true, + "timeToResolve": "PT10M" + }, + "actions": [ + { + "actionGroupId": "/subscriptions/14ddf0c5-77c5-4b53-84f6-e1fa43ad68f7/resourcegroups/giladstest/providers/microsoft.insights/notificationgroups/group2", + "actionProperties": { + "key11": "value11", + "key12": "value12" + } + } + ] + } + ] + }, + "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" + } + } } } } From 429d451519d3cb2323717a808400902ccb91e63f Mon Sep 17 00:00:00 2001 From: Moshe Malka Date: Mon, 7 Nov 2022 10:25:37 +0200 Subject: [PATCH 29/29] change api version --- .../stable/2019-03-01/examples/Operations_List.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json index 3152f96710e3..56dbd44f7357 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/examples/Operations_List.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2019-05-05-preview" + "api-version": "2019-03-01" }, "responses": { "200": {