diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/AlertsManagement.json deleted file mode 100644 index 6f7db7f3373d..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/AlertsManagement.json +++ /dev/null @@ -1,1568 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2023-07-12-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": { - "/providers/Microsoft.AlertsManagement/operations": { - "get": { - "operationId": "Operations_List", - "description": "List all operations available through Azure Alerts Management Resource Provider.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully retrieved operations list.", - "schema": { - "$ref": "#/definitions/operationsList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "ListOperations": { - "$ref": "./examples/Operations_List.json" - } - } - } - }, - "/providers/Microsoft.AlertsManagement/alertsMetaData": { - "get": { - "operationId": "Alerts_MetaData", - "description": "List alerts meta data information based on value of identifier parameter.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/identifier" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully listed alert meta data.", - "schema": { - "$ref": "#/definitions/alertsMetaData" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "MonService": { - "$ref": "./examples/AlertsMetaData_MonitorService.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts": { - "get": { - "operationId": "Alerts_GetAll", - "description": "List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. ", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/targetResource" - }, - { - "$ref": "#/parameters/targetResourceType" - }, - { - "$ref": "#/parameters/targetResourceGroup" - }, - { - "$ref": "#/parameters/monitorService" - }, - { - "$ref": "#/parameters/monitorCondition" - }, - { - "$ref": "#/parameters/severity" - }, - { - "$ref": "#/parameters/alertState" - }, - { - "$ref": "#/parameters/alertRule" - }, - { - "$ref": "#/parameters/smartGroupIdFilter" - }, - { - "$ref": "#/parameters/includeContext" - }, - { - "$ref": "#/parameters/includeEgressConfig" - }, - { - "$ref": "#/parameters/pageCount" - }, - { - "$ref": "#/parameters/alertsSortBy" - }, - { - "$ref": "#/parameters/sortOrder" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/timeRange" - }, - { - "$ref": "#/parameters/customTimeRange" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully listed alert objects.", - "schema": { - "$ref": "#/definitions/alertsList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "ListAlerts": { - "$ref": "./examples/Alerts_List.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}": { - "get": { - "operationId": "Alerts_GetById", - "summary": "Get a specific alert.", - "description": "Get information related to a specific alert", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Returns the alert with the specified ID.", - "schema": { - "$ref": "#/definitions/alert" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "GetById": { - "$ref": "./examples/Alerts_GetById.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate": { - "post": { - "operationId": "Alerts_ChangeState", - "description": "Change the state of an alert.", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/newState" - }, - { - "$ref": "#/parameters/comment" - } - ], - "responses": { - "200": { - "description": "OK. Alert state updated.", - "schema": { - "$ref": "#/definitions/alert" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_ChangeState.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history": { - "get": { - "operationId": "Alerts_GetHistory", - "description": "Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Returns the history of the specified alert.", - "schema": { - "$ref": "#/definitions/alertModification" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_History.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alertsSummary": { - "get": { - "operationId": "Alerts_GetSummary", - "description": "Get a summarized count of your alerts grouped by various parameters (e.g. grouping by 'Severity' returns the count of alerts for each severity).", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertsSummaryGroupBy" - }, - { - "$ref": "#/parameters/includeSmartGroupsCount" - }, - { - "$ref": "#/parameters/targetResource" - }, - { - "$ref": "#/parameters/targetResourceType" - }, - { - "$ref": "#/parameters/targetResourceGroup" - }, - { - "$ref": "#/parameters/monitorService" - }, - { - "$ref": "#/parameters/monitorCondition" - }, - { - "$ref": "#/parameters/severity" - }, - { - "$ref": "#/parameters/alertState" - }, - { - "$ref": "#/parameters/alertRule" - }, - { - "$ref": "#/parameters/timeRange" - }, - { - "$ref": "#/parameters/customTimeRange" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Alert summary returned.", - "schema": { - "$ref": "#/definitions/alertsSummary" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "Summary": { - "$ref": "./examples/Alerts_Summary.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/enrichments": { - "get": { - "operationId": "Alerts_ListEnrichments", - "description": "List the enrichments of an alert. It returns a collection of one object named default.", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Returns the enrichments of the specified alert.", - "schema": { - "$ref": "#/definitions/alertEnrichmentsList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_ListEnrichments.json" - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/enrichments/default": { - "get": { - "operationId": "Alerts_GetEnrichments", - "description": "Get the enrichments of an alert.", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Returns the enrichments of the specified alert.", - "schema": { - "$ref": "#/definitions/alertEnrichmentResponse" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_GetEnrichments.json" - } - } - } - } - }, - "parameters": { - "scope": { - "name": "scope", - "description": "scope here is resourceId for which alert is created.", - "type": "string", - "in": "path", - "required": true, - "x-ms-skip-url-encoding": true, - "x-ms-parameter-location": "method" - }, - "subscriptionId": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription.", - "minLength": 1 - }, - "alertId": { - "name": "alertId", - "description": "Unique ID of an alert instance.", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - }, - "targetResourceGroup": { - "description": "Filter by target resource group name. Default value is select all.", - "name": "targetResourceGroup", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "targetResource": { - "description": "Filter by target resource( which is full ARM ID) Default value is select all.", - "name": "targetResource", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "targetResourceType": { - "description": "Filter by target resource type. Default value is select all.", - "name": "targetResourceType", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "monitorService": { - "description": "Filter by monitor service which generates the alert instance. Default value is select all.", - "name": "monitorService", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "Application Insights", - "ActivityLog Administrative", - "ActivityLog Security", - "ActivityLog Recommendation", - "ActivityLog Policy", - "ActivityLog Autoscale", - "Log Analytics", - "Nagios", - "Platform", - "SCOM", - "ServiceHealth", - "SmartDetector", - "VM Insights", - "Zabbix", - "Resource Health" - ], - "x-ms-enum": { - "name": "MonitorService", - "modelAsString": true - } - }, - "severity": { - "description": "Filter by severity. Default value is select all.", - "name": "severity", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "Sev0", - "Sev1", - "Sev2", - "Sev3", - "Sev4" - ], - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "smartGroupIdFilter": { - "description": "Filter the alerts list by the Smart Group Id. Default value is none.", - "name": "smartGroupId", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "smartGroupId": { - "description": "Smart group unique id. ", - "name": "smartGroupId", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - }, - "newState": { - "description": "New state of the alert.", - "name": "newState", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method", - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "comment": { - "description": "reason of change alert state", - "name": "comment", - "in": "body", - "required": false, - "x-ms-parameter-location": "method", - "schema": { - "$ref": "#/definitions/comments" - } - }, - "alertState": { - "description": "Filter by state of the alert instance. Default value is to select all.", - "name": "alertState", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "smartGroupState": { - "description": "Filter by state of the smart group. Default value is to select all.", - "name": "smartGroupState", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "monitorCondition": { - "description": "Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.", - "name": "monitorCondition", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "Fired", - "Resolved" - ], - "x-ms-enum": { - "name": "MonitorCondition", - "modelAsString": true - } - }, - "alertRule": { - "description": "Filter by specific alert rule. Default value is to select all.", - "name": "alertRule", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "timeRange": { - "description": "Filter by time range by below listed values. Default value is 1 day.", - "name": "timeRange", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "1h", - "1d", - "7d", - "30d" - ], - "x-ms-enum": { - "name": "TimeRange", - "modelAsString": true - } - }, - "customTimeRange": { - "description": "Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.", - "name": "customTimeRange", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "includeContext": { - "description": "Include context which has contextual data specific to the monitor service. Default value is false'", - "name": "includeContext", - "type": "boolean", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "includeEgressConfig": { - "description": "Include egress config which would be used for displaying the content in portal. Default value is 'false'.", - "name": "includeEgressConfig", - "type": "boolean", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "includeSmartGroupsCount": { - "description": "Include count of the SmartGroups as part of the summary. Default value is 'false'.", - "name": "includeSmartGroupsCount", - "type": "boolean", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "pageCount": { - "description": "Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.", - "name": "pageCount", - "type": "integer", - "format": "int64", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "alertsSortBy": { - "description": "Sort the query results by input field, Default value is 'lastModifiedDateTime'.", - "name": "sortBy", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "name", - "severity", - "alertState", - "monitorCondition", - "targetResource", - "targetResourceName", - "targetResourceGroup", - "targetResourceType", - "startDateTime", - "lastModifiedDateTime" - ], - "x-ms-enum": { - "name": "AlertsSortByFields", - "modelAsString": true - } - }, - "alertsSummaryGroupBy": { - "description": "This parameter allows the result set to be grouped by input fields (Maximum 2 comma separated fields supported). For example, groupby=severity or groupby=severity,alertstate.", - "name": "groupby", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method", - "enum": [ - "severity", - "alertState", - "monitorCondition", - "monitorService", - "signalType", - "alertRule" - ], - "x-ms-enum": { - "name": "AlertsSummaryGroupByFields", - "modelAsString": true - } - }, - "smartGroupsSortBy": { - "description": "Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.", - "name": "sortBy", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "alertsCount", - "state", - "severity", - "startDateTime", - "lastModifiedDateTime" - ], - "x-ms-enum": { - "name": "SmartGroupsSortByFields", - "modelAsString": true - } - }, - "sortOrder": { - "description": "Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.", - "name": "sortOrder", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "asc", - "desc" - ], - "x-ms-enum": { - "name": "SortOrder", - "modelAsString": true - } - }, - "select": { - "description": "This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section.", - "name": "select", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "identifier": { - "name": "identifier", - "description": "Identification of the information to be retrieved by API call.", - "type": "string", - "in": "query", - "required": true, - "enum": [ - "MonitorServiceList" - ], - "x-ms-enum": { - "name": "identifier", - "modelAsString": true - }, - "x-ms-parameter-location": "method" - } - }, - "definitions": { - "operation": { - "type": "object", - "description": "Operation provided by provider", - "properties": { - "name": { - "type": "string", - "description": "Name of the operation" - }, - "display": { - "type": "object", - "description": "Properties of the operation", - "properties": { - "provider": { - "type": "string", - "description": "Provider name" - }, - "resource": { - "type": "string", - "description": "Resource name" - }, - "operation": { - "type": "string", - "description": "Operation name" - }, - "description": { - "type": "string", - "description": "Description of the operation" - } - } - }, - "origin": { - "type": "string", - "description": "Origin of the operation" - } - } - }, - "operationsList": { - "type": "object", - "description": "Lists the operations available in the AlertsManagement RP.", - "properties": { - "nextLink": { - "description": "URL to fetch the next set of alerts.", - "type": "string" - }, - "value": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/operation" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "value" - ] - }, - "errorResponse": { - "type": "object", - "description": "An error response from the service.", - "properties": { - "error": { - "$ref": "#/definitions/errorResponseBody" - } - } - }, - "errorResponseBody": { - "type": "object", - "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": { - "type": "object", - "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" - } - } - }, - "alert": { - "type": "object", - "description": "An alert created in alert management service.", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/alertProperties" - } - } - }, - "alertsList": { - "type": "object", - "description": "List the alerts.", - "properties": { - "nextLink": { - "description": "URL to fetch the next set of alerts.", - "type": "string" - }, - "value": { - "description": "List of alerts", - "type": "array", - "items": { - "$ref": "#/definitions/alert" - } - } - } - }, - "alertProperties": { - "type": "object", - "description": "Alert property bag", - "properties": { - "essentials": { - "$ref": "#/definitions/essentials" - }, - "context": { - "$ref": "#/definitions/alertContext" - }, - "egressConfig": { - "$ref": "#/definitions/egressConfig" - } - } - }, - "comments": { - "type": "object", - "description": "Change alert state reason", - "properties": { - "comments": { - "type": "string" - } - } - }, - "egressConfig": { - "type": "object", - "description": "Config which would be used for displaying the data in portal.", - "readOnly": true - }, - "alertContext": { - "type": "object", - "description": "Information specific to the monitor service that gives more contextual details about the alert.", - "readOnly": true - }, - "actionStatus": { - "type": "object", - "description": "Action status", - "properties": { - "isSuppressed": { - "type": "boolean", - "description": "Value indicating whether alert is suppressed." - } - } - }, - "essentials": { - "type": "object", - "description": "This object contains consistent fields across different monitor services.", - "properties": { - "severity": { - "type": "string", - "description": "Severity of alert Sev0 being highest and Sev4 being lowest.", - "readOnly": true, - "enum": [ - "Sev0", - "Sev1", - "Sev2", - "Sev3", - "Sev4" - ], - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "signalType": { - "type": "string", - "description": "The type of signal the alert is based on, which could be metrics, logs or activity logs.", - "readOnly": true, - "enum": [ - "Metric", - "Log", - "Unknown" - ], - "x-ms-enum": { - "name": "SignalType", - "modelAsString": true - } - }, - "alertState": { - "type": "string", - "description": "Alert object state, which can be modified by the user.", - "readOnly": true, - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "monitorCondition": { - "type": "string", - "description": "Condition of the rule at the monitor service. It represents whether the underlying conditions have crossed the defined alert rule thresholds.", - "readOnly": true, - "enum": [ - "Fired", - "Resolved" - ], - "x-ms-enum": { - "name": "MonitorCondition", - "modelAsString": true - } - }, - "targetResource": { - "type": "string", - "description": "Target ARM resource, on which alert got created." - }, - "targetResourceName": { - "type": "string", - "description": "Name of the target ARM resource name, on which alert got created." - }, - "targetResourceGroup": { - "type": "string", - "description": "Resource group of target ARM resource, on which alert got created." - }, - "targetResourceType": { - "type": "string", - "description": "Resource type of target ARM resource, on which alert got created." - }, - "monitorService": { - "type": "string", - "description": "Monitor service on which the rule(monitor) is set.", - "readOnly": true, - "enum": [ - "Application Insights", - "ActivityLog Administrative", - "ActivityLog Security", - "ActivityLog Recommendation", - "ActivityLog Policy", - "ActivityLog Autoscale", - "Log Analytics", - "Nagios", - "Platform", - "SCOM", - "ServiceHealth", - "SmartDetector", - "VM Insights", - "Zabbix", - "Resource Health" - ], - "x-ms-enum": { - "name": "MonitorService", - "modelAsString": true - } - }, - "alertRule": { - "type": "string", - "description": "Rule(monitor) which fired alert instance. Depending on the monitor service, this would be ARM id or name of the rule.", - "readOnly": true - }, - "sourceCreatedId": { - "type": "string", - "description": "Unique Id created by monitor service for each alert instance. This could be used to track the issue at the monitor service, in case of Nagios, Zabbix, SCOM etc.", - "readOnly": true - }, - "smartGroupId": { - "type": "string", - "description": "Unique Id of the smart group", - "readOnly": true - }, - "smartGroupingReason": { - "type": "string", - "description": "Verbose reason describing the reason why this alert instance is added to a smart group", - "readOnly": true - }, - "startDateTime": { - "type": "string", - "format": "date-time", - "description": "Creation time(ISO-8601 format) of alert instance.", - "readOnly": true - }, - "lastModifiedDateTime": { - "type": "string", - "format": "date-time", - "description": "Last modification time(ISO-8601 format) of alert instance.", - "readOnly": true - }, - "monitorConditionResolvedDateTime": { - "type": "string", - "format": "date-time", - "description": "Resolved time(ISO-8601 format) of alert instance. This will be updated when monitor service resolves the alert instance because the rule condition is no longer met.", - "readOnly": true - }, - "lastModifiedUserName": { - "type": "string", - "description": "User who last modified the alert, in case of monitor service updates user would be 'system', otherwise name of the user.", - "readOnly": true - }, - "actionStatus": { - "$ref": "#/definitions/actionStatus" - }, - "description": { - "type": "string", - "description": "Alert description." - } - } - }, - "alertModification": { - "type": "object", - "description": "Alert Modification details", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/alertModificationProperties" - } - } - }, - "alertModificationProperties": { - "type": "object", - "description": "Properties of the alert modification item.", - "properties": { - "alertId": { - "type": "string", - "description": "Unique Id of the alert for which the history is being retrieved", - "readOnly": true - }, - "modifications": { - "type": "array", - "description": "Modification details", - "items": { - "$ref": "#/definitions/alertModificationItem" - }, - "x-ms-identifiers": [] - } - } - }, - "alertModificationItem": { - "type": "object", - "description": "Alert modification item.", - "properties": { - "modificationEvent": { - "type": "string", - "description": "Reason for the modification", - "enum": [ - "AlertCreated", - "StateChange", - "MonitorConditionChange", - "SeverityChange", - "ActionRuleTriggered", - "ActionRuleSuppressed", - "ActionsTriggered", - "ActionsSuppressed", - "ActionsFailed" - ], - "x-ms-enum": { - "name": "AlertModificationEvent" - } - }, - "oldValue": { - "type": "string", - "description": "Old value" - }, - "newValue": { - "type": "string", - "description": "New value" - }, - "modifiedAt": { - "type": "string", - "description": "Modified date and time" - }, - "modifiedBy": { - "type": "string", - "description": "Modified user details (Principal client name)" - }, - "comments": { - "type": "string", - "description": "Modification comments" - }, - "description": { - "type": "string", - "description": "Description of the modification" - } - } - }, - "alertsSummary": { - "type": "object", - "description": "Summary of alerts based on the input filters and 'groupby' parameters.", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/alertsSummaryGroup" - } - } - }, - "alertsSummaryGroup": { - "type": "object", - "description": "Group the result set.", - "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "Total count of the result set." - }, - "smartGroupsCount": { - "type": "integer", - "format": "int64", - "description": "Total count of the smart groups." - }, - "groupedby": { - "type": "string", - "description": "Name of the field aggregated" - }, - "values": { - "type": "array", - "description": "List of the items", - "items": { - "$ref": "#/definitions/alertsSummaryGroupItem" - }, - "x-ms-identifiers": [] - } - } - }, - "alertsSummaryGroupItem": { - "type": "object", - "description": "Alerts summary group item", - "properties": { - "name": { - "type": "string", - "description": "Value of the aggregated field" - }, - "count": { - "type": "integer", - "format": "int64", - "description": "Count of the aggregated field" - }, - "groupedby": { - "type": "string", - "description": "Name of the field aggregated" - }, - "values": { - "type": "array", - "description": "List of the items", - "items": { - "$ref": "#/definitions/alertsSummaryGroupItem" - }, - "x-ms-identifiers": [] - } - } - }, - "alertsMetaData": { - "type": "object", - "description": "alert meta data information.", - "properties": { - "properties": { - "$ref": "#/definitions/alertsMetaDataProperties" - } - } - }, - "alertsMetaDataProperties": { - "type": "object", - "description": "alert meta data property bag", - "discriminator": "metadataIdentifier", - "required": [ - "metadataIdentifier" - ], - "properties": { - "metadataIdentifier": { - "type": "string", - "description": "Identification of the information to be retrieved by API call", - "enum": [ - "MonitorServiceList" - ], - "x-ms-enum": { - "name": "metadataIdentifier", - "modelAsString": true - } - } - } - }, - "MonitorServiceList": { - "type": "object", - "title": "Monitor service details", - "description": "Monitor service details", - "required": [ - "data" - ], - "allOf": [ - { - "$ref": "#/definitions/alertsMetaDataProperties" - }, - { - "type": "object" - } - ], - "properties": { - "data": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/MonitorServiceDetails" - }, - "x-ms-identifiers": [] - } - } - }, - "MonitorServiceDetails": { - "type": "object", - "description": "Details of a monitor service", - "properties": { - "name": { - "type": "string", - "description": "Monitor service name" - }, - "displayName": { - "type": "string", - "description": "Monitor service display name" - } - } - }, - "alertEnrichmentResponse": { - "description": "The alert's enrichments.", - "type": "object", - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/alertEnrichmentProperties" - } - } - }, - "alertEnrichmentsList": { - "description": "List the alert's enrichments.", - "type": "object", - "properties": { - "value": { - "description": "List the alert's enrichments", - "type": "array", - "items": { - "$ref": "#/definitions/alertEnrichmentResponse" - } - }, - "nextLink": { - "type": "string", - "description": "Request URL that can be used to query next page." - } - } - }, - "alertEnrichmentProperties": { - "type": "object", - "description": "Properties of the alert enrichment item.", - "properties": { - "alertId": { - "type": "string", - "description": "Unique Id (GUID) of the alert for which the enrichments are being retrieved.", - "readOnly": true - }, - "enrichments": { - "type": "array", - "description": "Enrichment details", - "items": { - "$ref": "#/definitions/alertEnrichmentItem" - }, - "x-ms-identifiers": [] - } - } - }, - "alertEnrichmentItem": { - "type": "object", - "description": "Alert enrichment item.", - "discriminator": "type", - "required": [ - "title", - "description", - "status", - "type" - ], - "properties": { - "title": { - "type": "string", - "description": "The enrichment title." - }, - "description": { - "type": "string", - "description": "The enrichment description." - }, - "status": { - "type": "string", - "description": "The status of the evaluation of the enrichment.", - "enum": [ - "Succeeded", - "Failed" - ], - "x-ms-enum": { - "name": "status", - "modelAsString": true - } - }, - "errorMessage": { - "type": "string", - "description": "The error message. Will be present only if the status is 'Failed'." - }, - "type": { - "type": "string", - "description": "The enrichment type.", - "enum": [ - "PrometheusInstantQuery", - "PrometheusRangeQuery" - ], - "x-ms-enum": { - "name": "type", - "modelAsString": true - } - } - } - }, - "PrometheusEnrichmentItem": { - "type": "object", - "description": "Prometheus enrichment object.", - "required": [ - "linkToApi", - "datasources", - "grafanaExplorePath", - "query" - ], - "allOf": [ - { - "$ref": "#/definitions/alertEnrichmentItem" - } - ], - "properties": { - "linkToApi": { - "type": "string", - "description": "Link to Prometheus query API (Url format)." - }, - "datasources": { - "type": "array", - "description": "An array of the azure monitor workspace resource ids.", - "items": { - "type": "string", - "description": "The azure monitor workspace resource id." - }, - "x-ms-identifiers": [] - }, - "grafanaExplorePath": { - "type": "string", - "description": "Partial link to the Grafana explore API." - }, - "query": { - "type": "string", - "description": "The Prometheus expression query." - } - } - }, - "PrometheusInstantQuery": { - "x-ms-discriminator-value": "PrometheusInstantQuery", - "type": "object", - "description": "Prometheus instant query enrichment object.", - "required": [ - "time" - ], - "allOf": [ - { - "$ref": "#/definitions/PrometheusEnrichmentItem" - } - ], - "properties": { - "time": { - "type": "string", - "description": "The date and the time of the evaluation." - } - } - }, - "PrometheusRangeQuery": { - "type": "object", - "x-ms-discriminator-value": "PrometheusRangeQuery", - "description": "Prometheus instant query enrichment object.", - "required": [ - "start", - "end", - "step" - ], - "allOf": [ - { - "$ref": "#/definitions/PrometheusEnrichmentItem" - } - ], - "properties": { - "start": { - "type": "string", - "description": "The start evaluation date and time in ISO8601 format.", - "format": "date-time" - }, - "end": { - "type": "string", - "description": "The end evaluation date and time in ISO8601 format.", - "format": "date-time" - }, - "step": { - "type": "string", - "description": "Query resolution step width in ISO8601 format." - } - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/AlertsMetaData_MonitorService.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/AlertsMetaData_MonitorService.json deleted file mode 100644 index fbfd2d193591..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/AlertsMetaData_MonitorService.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "parameters": { - "api-version": "2023-07-12-preview", - "identifier": "MonitorServiceList" - }, - "responses": { - "200": { - "body": { - "properties": { - "metadataIdentifier": "MonitorServiceList", - "data": [ - { - "name": "ActivityLog Administrative", - "displayName": "Activity Log - Administrative" - }, - { - "name": "ActivityLog Autoscale", - "displayName": "Activity Log - Autoscale" - }, - { - "name": "ActivityLog Policy", - "displayName": "Activity Log - Policy" - }, - { - "name": "ActivityLog Recommendation", - "displayName": "Activity Log - Recommendation" - }, - { - "name": "ActivityLog Security", - "displayName": "Activity Log - Security" - }, - { - "name": "Application Insights", - "displayName": "Application Insights" - }, - { - "name": "Azure Backup", - "displayName": "Azure Backup" - }, - { - "name": "Custom", - "displayName": "Custom" - }, - { - "name": "Data Box Edge", - "displayName": "Data Box Edge" - }, - { - "name": "VM Insights", - "displayName": "VM Insights" - }, - { - "name": "Log Analytics", - "displayName": "Log Analytics" - }, - { - "name": "Nagios", - "displayName": "NAGIOS" - }, - { - "name": "Platform", - "displayName": "Platform" - }, - { - "name": "Resource Health", - "displayName": "Resource Health" - }, - { - "name": "SCOM", - "displayName": "SCOM" - }, - { - "name": "ServiceHealth", - "displayName": "Service Health" - }, - { - "name": "Smart Detector", - "displayName": "SmartDetector" - }, - { - "name": "Zabbix", - "displayName": "ZABBIX" - } - ] - } - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_ChangeState.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_ChangeState.json deleted file mode 100644 index 4818f92ab0dd..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_ChangeState.json +++ /dev/null @@ -1,47 +0,0 @@ -{ - "parameters": { - "api-version": "2023-07-12-preview", - "scope": "subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", - "newState": "Acknowledged", - "body": { - "comment": "Acknowledging alert" - } - }, - "responses": { - "200": { - "body": { - "properties": { - "essentials": { - "severity": "Sev3", - "signalType": "Log", - "alertState": "Acknowledged", - "monitorCondition": "Fired", - "monitorService": "Application Insights", - "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", - "targetResourceName": "servicedeskappinsight", - "targetResourceGroup": "servicedeskresourcegroup", - "targetResourceType": "components", - "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", - "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", - "smartGroupingReason": "Occurred frequently with other alerts", - "alertRule": "https://servisdfsdfappinsight.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", - "startDateTime": "2018-09-13T15:51:02Z", - "lastModifiedDateTime": "2018-09-13T15:51:02Z", - "lastModifiedUserName": "System", - "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", - "actionStatus": { - "isSuppressed": false - }, - "description": "description of the alert" - }, - "egressConfig": {}, - "context": {} - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", - "type": "Microsoft.AlertsManagement/alerts", - "name": "cpu alert" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_GetById.json deleted file mode 100644 index 64f454ec3da7..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_GetById.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "parameters": { - "api-version": "2023-07-12-preview", - "scope": "subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100" - }, - "responses": { - "200": { - "body": { - "properties": { - "essentials": { - "severity": "Sev3", - "signalType": "Log", - "alertState": "Acknowledged", - "monitorCondition": "Fired", - "monitorService": "Application Insights", - "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", - "targetResourceName": "servicedeskappinsight", - "targetResourceGroup": "servicedeskresourcegroup", - "targetResourceType": "components", - "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", - "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", - "smartGroupingReason": "Occurred frequently with other alerts", - "alertRule": "https://sersdfsdfinsight.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", - "startDateTime": "2018-09-13T15:51:02Z", - "lastModifiedDateTime": "2018-09-13T15:51:02Z", - "lastModifiedUserName": "System", - "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", - "actionStatus": { - "isSuppressed": false - }, - "description": "description of the alert" - }, - "egressConfig": {}, - "context": {} - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", - "type": "Microsoft.AlertsManagement/alerts", - "name": "cpu alert" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_GetEnrichments.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_GetEnrichments.json deleted file mode 100644 index ffbf7368b0b0..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_GetEnrichments.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "parameters": { - "api-version": "2023-07-12-preview", - "scope": "subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502101" - }, - "responses": { - "200": { - "body": { - "properties": { - "alertId": "66114d64-d9d9-478b-95c9-b789d6502101", - "enrichments": [ - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Succeeded", - "type": "PrometheusInstantQuery", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace1'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "time": "2015-07-01T20:10:51.781Z" - }, - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Succeeded", - "type": "PrometheusRangeQuery", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "start": "2015-07-01T20:10:51.781Z", - "end": "2015-07-01T20:20:51.781Z", - "step": "PT15S" - }, - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Failed", - "type": "PrometheusRangeQuery", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "errorMessage": "Calling Prometheus query API failed", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "start": "2015-07-01T20:10:51.781Z", - "end": "2015-07-01T20:20:51.781Z", - "step": "PT15S" - } - ] - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502101/enrichments/default", - "type": "Microsoft.AlertsManagement/alerts/enrichments", - "name": "default" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_History.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_History.json deleted file mode 100644 index 92af9a6840ab..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_History.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "parameters": { - "api-version": "2023-07-12-preview", - "scope": "subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100" - }, - "responses": { - "200": { - "body": { - "properties": { - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", - "modifications": [ - { - "modificationEvent": "StateChange", - "oldValue": "New", - "newValue": "Acknowledged", - "modifiedAt": "2018-06-13T06:14:15.7378737Z", - "modifiedBy": "vikramm@microsoft.com", - "comments": "Acknowledging alert", - "description": "State changed from 'New' to 'Acknowledged'" - }, - { - "modificationEvent": "AlertCreated", - "oldValue": "", - "newValue": "", - "modifiedAt": "2018-06-13T06:09:01Z", - "modifiedBy": "System", - "comments": "", - "description": "New Alert Object is created" - } - ] - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history/default", - "type": "Microsoft.AlertsManagement/alerts", - "name": "CPU Alert" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_List.json deleted file mode 100644 index 84c6718764af..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_List.json +++ /dev/null @@ -1,79 +0,0 @@ -{ - "parameters": { - "api-version": "2023-07-12-preview", - "scope": "subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d" - }, - "responses": { - "200": { - "body": { - "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alerts?api-version=2018-05-05-preview&timeRange=1d&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", - "value": [ - { - "properties": { - "essentials": { - "severity": "Sev3", - "signalType": "Log", - "alertState": "Acknowledged", - "monitorCondition": "Fired", - "monitorService": "Application Insights", - "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", - "targetResourceName": "servicedeskappinsight", - "targetResourceGroup": "servicedeskresourcegroup", - "targetResourceType": "components", - "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", - "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", - "smartGroupingReason": "Occurred frequently with other alerts", - "alertRule": "https://servisdffsdf.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", - "startDateTime": "2018-09-13T15:51:02Z", - "lastModifiedDateTime": "2018-09-13T15:51:02Z", - "lastModifiedUserName": "System", - "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", - "actionStatus": { - "isSuppressed": false - }, - "description": "description of the alert" - }, - "egressConfig": {}, - "context": {} - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", - "type": "Microsoft.AlertsManagement/alerts", - "name": "cpu alert" - }, - { - "properties": { - "essentials": { - "severity": "Sev3", - "signalType": "Log", - "alertState": "New", - "monitorCondition": "Fired", - "monitorService": "Application Insights", - "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/cind/providers/microsoft.operationalinsights/workspaces/servicedeskwcus", - "targetResourceName": "servicedeskwcus", - "targetResourceGroup": "servicedeskresourcegroup", - "targetResourceType": "components", - "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", - "smartGroupId": "d1c49c89-ea95-4697-a299-c0f5ebac62f1", - "smartGroupingReason": "Alerts that frequently occur together have been grouped.", - "alertRule": "https://servicsdfsdf.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", - "startDateTime": "2018-09-13T15:51:02Z", - "lastModifiedDateTime": "2018-09-13T15:51:02Z", - "lastModifiedUserName": "System", - "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", - "actionStatus": { - "isSuppressed": false - }, - "description": "description of the alert" - }, - "egressConfig": {}, - "context": {} - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", - "type": "Microsoft.AlertsManagement/alerts", - "name": "cpu alert" - } - ] - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_ListEnrichments.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_ListEnrichments.json deleted file mode 100644 index 3e577adb105e..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_ListEnrichments.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "parameters": { - "api-version": "2023-07-12-preview", - "scope": "subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502101" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502101/enrichments/default", - "type": "Microsoft.AlertsManagement/alerts/enrichments", - "name": "default", - "properties": { - "alertId": "66114d64-d9d9-478b-95c9-b789d6502101", - "enrichments": [ - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Succeeded", - "type": "PrometheusInstantQuery", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace1'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "time": "2015-07-01T20:10:51.781Z" - }, - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Succeeded", - "type": "PrometheusRangeQuery", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "start": "2015-07-01T20:10:51.781Z", - "end": "2015-07-01T20:20:51.781Z", - "step": "PT15S" - }, - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Failed", - "type": "PrometheusRangeQuery", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "errorMessage": "Calling Prometheus query API failed", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "start": "2015-07-01T20:10:51.781Z", - "end": "2015-07-01T20:20:51.781Z", - "step": "PT15S" - } - ] - } - } - ] - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_Summary.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_Summary.json deleted file mode 100644 index ccedd6f3caff..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Alerts_Summary.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "parameters": { - "api-version": "2023-07-12-preview", - "scope": "subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d", - "groupby": "severity,alertState" - }, - "responses": { - "200": { - "body": { - "properties": { - "groupedby": "severity", - "smartGroupsCount": 100, - "total": 14189, - "values": [ - { - "name": "Sev0", - "count": 6517, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 6517 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev1", - "count": 3175, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 3175 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev2", - "count": 1120, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 1120 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev3", - "count": 1902, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 1902 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev4", - "count": 1475, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 1475 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - } - ] - }, - "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alertsSummary/current", - "type": "Microsoft.AlertsManagement/alertsSummary", - "name": "current" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Operations_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Operations_List.json deleted file mode 100644 index 1b4916ad19c6..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2023-07-12-preview/examples/Operations_List.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "parameters": { - "api-version": "2023-07-12-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.AlertsManagement/register/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "Subscription", - "operation": "Subscription Registration Action", - "description": "Subscription Registration Action" - } - }, - { - "name": "Microsoft.AlertsManagement/register/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "register", - "operation": "Register subscription", - "description": "Registers the subscription for the Microsoft Alerts Management" - } - }, - { - "name": "Microsoft.AlertsManagement/alerts/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "alerts", - "operation": "Read alerts", - "description": "Get all the alerts for the input filters." - } - }, - { - "name": "Microsoft.AlertsManagement/alerts/changestate/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "alerts", - "operation": "Resolve alerts", - "description": "Change the state of the alert." - } - }, - { - "name": "Microsoft.AlertsManagement/alerts/history/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "alerts", - "operation": "Read alert history", - "description": "Get history of the alert" - } - }, - { - "name": "Microsoft.AlertsManagement/smartDetectorAlertRules/write", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartDetectorAlertRules", - "operation": "Create Smart Detector alert rule", - "description": "Create or update Smart Detector alert rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/smartDetectorAlertRules/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartDetectorAlertRules", - "operation": "Read Smart Detector alert rules", - "description": "Get all the Smart Detector alert rules for the input filters" - } - }, - { - "name": "Microsoft.AlertsManagement/smartDetectorAlertRules/delete", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartDetectorAlertRules", - "operation": "Delete Smart Detector alert rule", - "description": "Delete Smart Detector alert rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/resourceHealthAlertRules/write", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "resourceHealthAlertRules", - "operation": "Create Resource Health alert rule", - "description": "Create or update Resource Health alert rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/resourceHealthAlertRules/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "resourceHealthAlertRules", - "operation": "Read Resource Health alert rules", - "description": "Get all the Resource Health alert rules for the input filters" - } - }, - { - "name": "Microsoft.AlertsManagement/resourceHealthAlertRules/delete", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "resourceHealthAlertRules", - "operation": "Delete Resource Health alert rule", - "description": "Delete Resource Health alert rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/migrateFromSmartDetection/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "migrateFromSmartDetection", - "operation": "Get Smart Detection Migration status", - "description": "Get the status of an asynchronous Smart Detection to smart alerts migration process" - } - }, - { - "name": "Microsoft.AlertsManagement/migrateFromSmartDetection/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "migrateFromSmartDetection", - "operation": "Migrate From Smart Detection", - "description": "Starts an asynchronous migration process of Smart Detection to smart alerts in an Application Insights resource" - } - }, - { - "name": "Microsoft.AlertsManagement/alertsSummary/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "alertsSummary", - "operation": "Read alerts summary", - "description": "Get the summary of alerts" - } - }, - { - "name": "Microsoft.AlertsManagement/smartGroups/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartGroups", - "operation": "Read smart groups", - "description": "Get all the smart groups for the input filters" - } - }, - { - "name": "Microsoft.AlertsManagement/smartGroups/changestate/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartGroups", - "operation": "Read smart groups", - "description": "Change the state of the smart group" - } - }, - { - "name": "Microsoft.AlertsManagement/smartGroups/history/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartGroups", - "operation": "Read smart group history", - "description": "Get history of the smart group" - } - }, - { - "name": "Microsoft.AlertsManagement/actionRules/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "actionRules", - "operation": "Read action rules", - "description": "Get all the alert processing rules for the input filters." - } - }, - { - "name": "Microsoft.AlertsManagement/actionRules/write", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "actionRules", - "operation": "Write action rule", - "description": "Create or update alert processing rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/actionRules/delete", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "actionRules", - "operation": "Delete action rule", - "description": "Delete alert processing rule in a given subscription." - } - }, - { - "name": "Microsoft.AlertsManagement/alertsMetaData/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "Microsoft.AlertsManagement/alertsMetaData", - "operation": "Read alerts meta data", - "description": "Get alerts meta data for the input parameter." - } - }, - { - "name": "Microsoft.AlertsManagement/Operations/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "operations", - "operation": "Read operations", - "description": "Reads the operations provided" - } - } - ] - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/AlertsManagement.json deleted file mode 100644 index 0b603a394cf1..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/AlertsManagement.json +++ /dev/null @@ -1,1603 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2024-01-01-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": { - "/providers/Microsoft.AlertsManagement/operations": { - "get": { - "operationId": "Operations_List", - "description": "List all operations available through Azure Alerts Management Resource Provider.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully retrieved operations list.", - "schema": { - "$ref": "#/definitions/operationsList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "ListOperations": { - "$ref": "./examples/Operations_List.json" - } - } - } - }, - "/providers/Microsoft.AlertsManagement/alertsMetaData": { - "get": { - "operationId": "Alerts_MetaData", - "description": "List alerts meta data information based on value of identifier parameter.", - "parameters": [ - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/identifier" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully listed alert meta data.", - "schema": { - "$ref": "#/definitions/alertsMetaData" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "MonService": { - "$ref": "./examples/AlertsMetaData_MonitorService.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts": { - "get": { - "operationId": "Alerts_GetAll", - "description": "List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. ", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/targetResource" - }, - { - "$ref": "#/parameters/targetResourceType" - }, - { - "$ref": "#/parameters/targetResourceGroup" - }, - { - "$ref": "#/parameters/monitorService" - }, - { - "$ref": "#/parameters/monitorCondition" - }, - { - "$ref": "#/parameters/severity" - }, - { - "$ref": "#/parameters/alertState" - }, - { - "$ref": "#/parameters/alertRule" - }, - { - "$ref": "#/parameters/smartGroupIdFilter" - }, - { - "$ref": "#/parameters/includeContext" - }, - { - "$ref": "#/parameters/includeEgressConfig" - }, - { - "$ref": "#/parameters/pageCount" - }, - { - "$ref": "#/parameters/alertsSortBy" - }, - { - "$ref": "#/parameters/sortOrder" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/timeRange" - }, - { - "$ref": "#/parameters/customTimeRange" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully listed alert objects.", - "schema": { - "$ref": "#/definitions/alertsList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "ListAlerts": { - "$ref": "./examples/Alerts_List.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}": { - "get": { - "operationId": "Alerts_GetById", - "summary": "Get a specific alert.", - "description": "Get information related to a specific alert", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Returns the alert with the specified ID.", - "schema": { - "$ref": "#/definitions/alert" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "GetById": { - "$ref": "./examples/Alerts_GetById.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate": { - "post": { - "operationId": "Alerts_ChangeState", - "description": "Change the state of an alert.", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - }, - { - "$ref": "#/parameters/newState" - }, - { - "$ref": "#/parameters/comment" - } - ], - "responses": { - "200": { - "description": "OK. Alert state updated.", - "schema": { - "$ref": "#/definitions/alert" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_ChangeState.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history": { - "get": { - "operationId": "Alerts_GetHistory", - "description": "Get the history of an alert, which captures any monitor condition changes (Fired/Resolved) and alert state changes (New/Acknowledged/Closed).", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Returns the history of the specified alert.", - "schema": { - "$ref": "#/definitions/alertModification" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_History.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alertsSummary": { - "get": { - "operationId": "Alerts_GetSummary", - "description": "Get a summarized count of your alerts grouped by various parameters (e.g. grouping by 'Severity' returns the count of alerts for each severity).", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertsSummaryGroupBy" - }, - { - "$ref": "#/parameters/includeSmartGroupsCount" - }, - { - "$ref": "#/parameters/targetResource" - }, - { - "$ref": "#/parameters/targetResourceType" - }, - { - "$ref": "#/parameters/targetResourceGroup" - }, - { - "$ref": "#/parameters/monitorService" - }, - { - "$ref": "#/parameters/monitorCondition" - }, - { - "$ref": "#/parameters/severity" - }, - { - "$ref": "#/parameters/alertState" - }, - { - "$ref": "#/parameters/alertRule" - }, - { - "$ref": "#/parameters/timeRange" - }, - { - "$ref": "#/parameters/customTimeRange" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Alert summary returned.", - "schema": { - "$ref": "#/definitions/alertsSummary" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/errorResponse" - } - } - }, - "x-ms-examples": { - "Summary": { - "$ref": "./examples/Alerts_Summary.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/enrichments": { - "get": { - "operationId": "Alerts_ListEnrichments", - "description": "List the enrichments of an alert. It returns a collection of one object named default.", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Returns the enrichments of the specified alert.", - "schema": { - "$ref": "#/definitions/alertEnrichmentsList" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_ListEnrichments.json" - } - }, - "x-ms-pageable": { - "nextLinkName": null - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/enrichments/default": { - "get": { - "operationId": "Alerts_GetEnrichments", - "description": "Get the enrichments of an alert.", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/parameters/ApiVersionParameter" - } - ], - "responses": { - "200": { - "description": "OK. Returns the enrichments of the specified alert.", - "schema": { - "$ref": "#/definitions/alertEnrichmentResponse" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/ErrorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_GetEnrichments.json" - } - } - } - } - }, - "parameters": { - "scope": { - "name": "scope", - "description": "scope here is resourceId for which alert is created.", - "type": "string", - "in": "path", - "required": true, - "x-ms-skip-url-encoding": true, - "x-ms-parameter-location": "method" - }, - "subscriptionId": { - "name": "subscriptionId", - "in": "path", - "required": true, - "type": "string", - "description": "The ID of the target subscription.", - "minLength": 1 - }, - "alertId": { - "name": "alertId", - "description": "Unique ID of an alert instance.", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - }, - "targetResourceGroup": { - "description": "Filter by target resource group name. Default value is select all.", - "name": "targetResourceGroup", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "targetResource": { - "description": "Filter by target resource( which is full ARM ID) Default value is select all.", - "name": "targetResource", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "targetResourceType": { - "description": "Filter by target resource type. Default value is select all.", - "name": "targetResourceType", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "monitorService": { - "description": "Filter by monitor service which generates the alert instance. Default value is select all.", - "name": "monitorService", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "Application Insights", - "ActivityLog Administrative", - "ActivityLog Security", - "ActivityLog Recommendation", - "ActivityLog Policy", - "ActivityLog Autoscale", - "Log Analytics", - "Nagios", - "Platform", - "SCOM", - "ServiceHealth", - "SmartDetector", - "VM Insights", - "Zabbix", - "Resource Health" - ], - "x-ms-enum": { - "name": "MonitorService", - "modelAsString": true - } - }, - "severity": { - "description": "Filter by severity. Default value is select all.", - "name": "severity", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "Sev0", - "Sev1", - "Sev2", - "Sev3", - "Sev4" - ], - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "smartGroupIdFilter": { - "description": "Filter the alerts list by the Smart Group Id. Default value is none.", - "name": "smartGroupId", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "smartGroupId": { - "description": "Smart group unique id. ", - "name": "smartGroupId", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - }, - "newState": { - "description": "New state of the alert.", - "name": "newState", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method", - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "comment": { - "description": "reason of change alert state", - "name": "comment", - "in": "body", - "required": false, - "x-ms-parameter-location": "method", - "schema": { - "$ref": "#/definitions/comments" - } - }, - "alertState": { - "description": "Filter by state of the alert instance. Default value is to select all.", - "name": "alertState", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "smartGroupState": { - "description": "Filter by state of the smart group. Default value is to select all.", - "name": "smartGroupState", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "monitorCondition": { - "description": "Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.", - "name": "monitorCondition", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "Fired", - "Resolved" - ], - "x-ms-enum": { - "name": "MonitorCondition", - "modelAsString": true - } - }, - "alertRule": { - "description": "Filter by specific alert rule. Default value is to select all.", - "name": "alertRule", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "timeRange": { - "description": "Filter by time range by below listed values. Default value is 1 day.", - "name": "timeRange", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "1h", - "1d", - "7d", - "30d" - ], - "x-ms-enum": { - "name": "TimeRange", - "modelAsString": true - } - }, - "customTimeRange": { - "description": "Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.", - "name": "customTimeRange", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "includeContext": { - "description": "Include context which has contextual data specific to the monitor service. Default value is false'", - "name": "includeContext", - "type": "boolean", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "includeEgressConfig": { - "description": "Include egress config which would be used for displaying the content in portal. Default value is 'false'.", - "name": "includeEgressConfig", - "type": "boolean", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "includeSmartGroupsCount": { - "description": "Include count of the SmartGroups as part of the summary. Default value is 'false'.", - "name": "includeSmartGroupsCount", - "type": "boolean", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "pageCount": { - "description": "Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.", - "name": "pageCount", - "type": "integer", - "format": "int64", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "alertsSortBy": { - "description": "Sort the query results by input field, Default value is 'lastModifiedDateTime'.", - "name": "sortBy", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "name", - "severity", - "alertState", - "monitorCondition", - "targetResource", - "targetResourceName", - "targetResourceGroup", - "targetResourceType", - "startDateTime", - "lastModifiedDateTime" - ], - "x-ms-enum": { - "name": "AlertsSortByFields", - "modelAsString": true - } - }, - "alertsSummaryGroupBy": { - "description": "This parameter allows the result set to be grouped by input fields (Maximum 2 comma separated fields supported). For example, groupby=severity or groupby=severity,alertstate.", - "name": "groupby", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method", - "enum": [ - "severity", - "alertState", - "monitorCondition", - "monitorService", - "signalType", - "alertRule" - ], - "x-ms-enum": { - "name": "AlertsSummaryGroupByFields", - "modelAsString": true - } - }, - "smartGroupsSortBy": { - "description": "Sort the query results by input field. Default value is sort by 'lastModifiedDateTime'.", - "name": "sortBy", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "alertsCount", - "state", - "severity", - "startDateTime", - "lastModifiedDateTime" - ], - "x-ms-enum": { - "name": "SmartGroupsSortByFields", - "modelAsString": true - } - }, - "sortOrder": { - "description": "Sort the query results order in either ascending or descending. Default value is 'desc' for time fields and 'asc' for others.", - "name": "sortOrder", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "asc", - "desc" - ], - "x-ms-enum": { - "name": "SortOrder", - "modelAsString": true - } - }, - "select": { - "description": "This filter allows to selection of the fields(comma separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section.", - "name": "select", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "identifier": { - "name": "identifier", - "description": "Identification of the information to be retrieved by API call.", - "type": "string", - "in": "query", - "required": true, - "enum": [ - "MonitorServiceList" - ], - "x-ms-enum": { - "name": "identifier", - "modelAsString": true - }, - "x-ms-parameter-location": "method" - } - }, - "definitions": { - "operation": { - "type": "object", - "description": "Operation provided by provider", - "properties": { - "name": { - "type": "string", - "description": "Name of the operation" - }, - "display": { - "type": "object", - "description": "Properties of the operation", - "properties": { - "provider": { - "type": "string", - "description": "Provider name" - }, - "resource": { - "type": "string", - "description": "Resource name" - }, - "operation": { - "type": "string", - "description": "Operation name" - }, - "description": { - "type": "string", - "description": "Description of the operation" - } - } - }, - "origin": { - "type": "string", - "description": "Origin of the operation" - } - } - }, - "operationsList": { - "type": "object", - "description": "Lists the operations available in the AlertsManagement RP.", - "properties": { - "nextLink": { - "description": "URL to fetch the next set of alerts.", - "type": "string" - }, - "value": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/operation" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "value" - ] - }, - "errorResponse": { - "type": "object", - "description": "An error response from the service.", - "properties": { - "error": { - "$ref": "#/definitions/errorResponseBody" - } - } - }, - "errorResponseBody": { - "type": "object", - "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": { - "type": "object", - "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" - } - } - }, - "alert": { - "type": "object", - "description": "An alert created in alert management service.", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/alertProperties" - } - } - }, - "alertsList": { - "type": "object", - "description": "List the alerts.", - "properties": { - "nextLink": { - "description": "URL to fetch the next set of alerts.", - "type": "string" - }, - "value": { - "description": "List of alerts", - "type": "array", - "items": { - "$ref": "#/definitions/alert" - } - } - } - }, - "alertProperties": { - "type": "object", - "description": "Alert property bag", - "properties": { - "essentials": { - "$ref": "#/definitions/essentials" - }, - "context": { - "$ref": "#/definitions/alertContext" - }, - "egressConfig": { - "$ref": "#/definitions/egressConfig" - } - } - }, - "comments": { - "type": "object", - "description": "Change alert state reason", - "properties": { - "comments": { - "type": "string" - } - } - }, - "egressConfig": { - "type": "object", - "description": "Config which would be used for displaying the data in portal.", - "readOnly": true - }, - "alertContext": { - "type": "object", - "description": "Information specific to the monitor service that gives more contextual details about the alert.", - "readOnly": true - }, - "actionStatus": { - "type": "object", - "description": "Action status", - "properties": { - "isSuppressed": { - "type": "boolean", - "description": "Value indicating whether alert is suppressed." - } - } - }, - "correlationDetails": { - "type": "object", - "description": "Correlation details", - "properties": { - "parentAlertId": { - "type": "string", - "description": "Unique Id (GUID) of the alert that this alert was correlated to.", - "readOnly": true - }, - "correlationDateTime": { - "description": "The alert's correlation date time in ISO-8601 format.", - "type": "string", - "format": "date-time", - "readOnly": true - }, - "alertProcessingRule": { - "type": "string", - "description": "The alert processing rule that was used to correlate this alert. This is an optional field, it will be presented only for a parent alert.", - "readOnly": true - } - } - }, - "essentials": { - "type": "object", - "description": "This object contains consistent fields across different monitor services.", - "properties": { - "severity": { - "type": "string", - "description": "Severity of alert Sev0 being highest and Sev4 being lowest.", - "readOnly": true, - "enum": [ - "Sev0", - "Sev1", - "Sev2", - "Sev3", - "Sev4" - ], - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "signalType": { - "type": "string", - "description": "The type of signal the alert is based on, which could be metrics, logs or activity logs.", - "readOnly": true, - "enum": [ - "Metric", - "Log", - "Unknown" - ], - "x-ms-enum": { - "name": "SignalType", - "modelAsString": true - } - }, - "alertState": { - "type": "string", - "description": "Alert object state, which can be modified by the user.", - "readOnly": true, - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "monitorCondition": { - "type": "string", - "description": "Condition of the rule at the monitor service. It represents whether the underlying conditions have crossed the defined alert rule thresholds.", - "readOnly": true, - "enum": [ - "Fired", - "Resolved" - ], - "x-ms-enum": { - "name": "MonitorCondition", - "modelAsString": true - } - }, - "targetResource": { - "type": "string", - "description": "Target ARM resource, on which alert got created." - }, - "targetResourceName": { - "type": "string", - "description": "Name of the target ARM resource name, on which alert got created." - }, - "targetResourceGroup": { - "type": "string", - "description": "Resource group of target ARM resource, on which alert got created." - }, - "targetResourceType": { - "type": "string", - "description": "Resource type of target ARM resource, on which alert got created." - }, - "monitorService": { - "type": "string", - "description": "Monitor service on which the rule(monitor) is set.", - "readOnly": true, - "enum": [ - "Application Insights", - "ActivityLog Administrative", - "ActivityLog Security", - "ActivityLog Recommendation", - "ActivityLog Policy", - "ActivityLog Autoscale", - "Log Analytics", - "Nagios", - "Platform", - "SCOM", - "ServiceHealth", - "SmartDetector", - "VM Insights", - "Zabbix", - "Resource Health" - ], - "x-ms-enum": { - "name": "MonitorService", - "modelAsString": true - } - }, - "alertRule": { - "type": "string", - "description": "Rule(monitor) which fired alert instance. Depending on the monitor service, this would be ARM id or name of the rule.", - "readOnly": true - }, - "sourceCreatedId": { - "type": "string", - "description": "Unique Id created by monitor service for each alert instance. This could be used to track the issue at the monitor service, in case of Nagios, Zabbix, SCOM etc.", - "readOnly": true - }, - "smartGroupId": { - "type": "string", - "description": "Unique Id of the smart group", - "readOnly": true - }, - "smartGroupingReason": { - "type": "string", - "description": "Verbose reason describing the reason why this alert instance is added to a smart group", - "readOnly": true - }, - "startDateTime": { - "type": "string", - "format": "date-time", - "description": "Creation time(ISO-8601 format) of alert instance.", - "readOnly": true - }, - "lastModifiedDateTime": { - "type": "string", - "format": "date-time", - "description": "Last modification time(ISO-8601 format) of alert instance.", - "readOnly": true - }, - "monitorConditionResolvedDateTime": { - "type": "string", - "format": "date-time", - "description": "Resolved time(ISO-8601 format) of alert instance. This will be updated when monitor service resolves the alert instance because the rule condition is no longer met.", - "readOnly": true - }, - "lastModifiedUserName": { - "type": "string", - "description": "User who last modified the alert, in case of monitor service updates user would be 'system', otherwise name of the user.", - "readOnly": true - }, - "actionStatus": { - "$ref": "#/definitions/actionStatus" - }, - "description": { - "type": "string", - "description": "Alert description." - }, - "hasEnrichments": { - "type": "boolean", - "description": "Will be presented with the value true only if there are enrichments.", - "readOnly": true - }, - "isStatefulAlert": { - "type": "boolean", - "description": "True if the alert is stateful, and false if it isn't.", - "readOnly": true - }, - "correlationDetails": { - "$ref": "#/definitions/correlationDetails" - } - } - }, - "alertModification": { - "type": "object", - "description": "Alert Modification details", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/alertModificationProperties" - } - } - }, - "alertModificationProperties": { - "type": "object", - "description": "Properties of the alert modification item.", - "properties": { - "alertId": { - "type": "string", - "description": "Unique Id of the alert for which the history is being retrieved", - "readOnly": true - }, - "modifications": { - "type": "array", - "description": "Modification details", - "items": { - "$ref": "#/definitions/alertModificationItem" - }, - "x-ms-identifiers": [] - } - } - }, - "alertModificationItem": { - "type": "object", - "description": "Alert modification item.", - "properties": { - "modificationEvent": { - "type": "string", - "description": "Reason for the modification", - "enum": [ - "AlertCreated", - "StateChange", - "MonitorConditionChange", - "SeverityChange", - "ActionRuleTriggered", - "ActionRuleSuppressed", - "ActionsTriggered", - "ActionsSuppressed", - "ActionsFailed" - ], - "x-ms-enum": { - "name": "AlertModificationEvent" - } - }, - "oldValue": { - "type": "string", - "description": "Old value" - }, - "newValue": { - "type": "string", - "description": "New value" - }, - "modifiedAt": { - "type": "string", - "description": "Modified date and time" - }, - "modifiedBy": { - "type": "string", - "description": "Modified user details (Principal client name)" - }, - "comments": { - "type": "string", - "description": "Modification comments" - }, - "description": { - "type": "string", - "description": "Description of the modification" - } - } - }, - "alertsSummary": { - "type": "object", - "description": "Summary of alerts based on the input filters and 'groupby' parameters.", - "allOf": [ - { - "$ref": "#/definitions/Resource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/alertsSummaryGroup" - } - } - }, - "alertsSummaryGroup": { - "type": "object", - "description": "Group the result set.", - "properties": { - "total": { - "type": "integer", - "format": "int64", - "description": "Total count of the result set." - }, - "smartGroupsCount": { - "type": "integer", - "format": "int64", - "description": "Total count of the smart groups." - }, - "groupedby": { - "type": "string", - "description": "Name of the field aggregated" - }, - "values": { - "type": "array", - "description": "List of the items", - "items": { - "$ref": "#/definitions/alertsSummaryGroupItem" - }, - "x-ms-identifiers": [] - } - } - }, - "alertsSummaryGroupItem": { - "type": "object", - "description": "Alerts summary group item", - "properties": { - "name": { - "type": "string", - "description": "Value of the aggregated field" - }, - "count": { - "type": "integer", - "format": "int64", - "description": "Count of the aggregated field" - }, - "groupedby": { - "type": "string", - "description": "Name of the field aggregated" - }, - "values": { - "type": "array", - "description": "List of the items", - "items": { - "$ref": "#/definitions/alertsSummaryGroupItem" - }, - "x-ms-identifiers": [] - } - } - }, - "alertsMetaData": { - "type": "object", - "description": "alert meta data information.", - "properties": { - "properties": { - "$ref": "#/definitions/alertsMetaDataProperties" - } - } - }, - "alertsMetaDataProperties": { - "type": "object", - "description": "alert meta data property bag", - "discriminator": "metadataIdentifier", - "required": [ - "metadataIdentifier" - ], - "properties": { - "metadataIdentifier": { - "type": "string", - "description": "Identification of the information to be retrieved by API call", - "enum": [ - "MonitorServiceList" - ], - "x-ms-enum": { - "name": "metadataIdentifier", - "modelAsString": true - } - } - } - }, - "MonitorServiceList": { - "type": "object", - "title": "Monitor service details", - "description": "Monitor service details", - "required": [ - "data" - ], - "allOf": [ - { - "$ref": "#/definitions/alertsMetaDataProperties" - }, - { - "type": "object" - } - ], - "properties": { - "data": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/MonitorServiceDetails" - }, - "x-ms-identifiers": [] - } - } - }, - "MonitorServiceDetails": { - "type": "object", - "description": "Details of a monitor service", - "properties": { - "name": { - "type": "string", - "description": "Monitor service name" - }, - "displayName": { - "type": "string", - "description": "Monitor service display name" - } - } - }, - "alertEnrichmentResponse": { - "description": "The alert's enrichments.", - "type": "object", - "allOf": [ - { - "$ref": "../../../../../common-types/resource-management/v5/types.json#/definitions/Resource" - } - ], - "properties": { - "properties": { - "$ref": "#/definitions/alertEnrichmentProperties" - } - } - }, - "alertEnrichmentsList": { - "description": "List the alert's enrichments.", - "type": "object", - "properties": { - "value": { - "description": "List the alert's enrichments", - "type": "array", - "items": { - "$ref": "#/definitions/alertEnrichmentResponse" - } - }, - "nextLink": { - "type": "string", - "description": "Request URL that can be used to query next page." - } - } - }, - "alertEnrichmentProperties": { - "type": "object", - "description": "Properties of the alert enrichment item.", - "properties": { - "alertId": { - "type": "string", - "description": "Unique Id (GUID) of the alert for which the enrichments are being retrieved.", - "readOnly": true - }, - "enrichments": { - "type": "array", - "description": "Enrichment details", - "items": { - "$ref": "#/definitions/alertEnrichmentItem" - }, - "x-ms-identifiers": [] - } - } - }, - "alertEnrichmentItem": { - "type": "object", - "description": "Alert enrichment item.", - "discriminator": "type", - "required": [ - "title", - "description", - "status", - "type" - ], - "properties": { - "title": { - "type": "string", - "description": "The enrichment title." - }, - "description": { - "type": "string", - "description": "The enrichment description." - }, - "status": { - "type": "string", - "description": "The status of the evaluation of the enrichment.", - "enum": [ - "Succeeded", - "Failed" - ], - "x-ms-enum": { - "name": "status", - "modelAsString": true - } - }, - "errorMessage": { - "type": "string", - "description": "The error message. Will be present only if the status is 'Failed'." - }, - "type": { - "type": "string", - "description": "The enrichment type.", - "enum": [ - "PrometheusInstantQuery", - "PrometheusRangeQuery" - ], - "x-ms-enum": { - "name": "type", - "modelAsString": true - } - } - } - }, - "PrometheusEnrichmentItem": { - "type": "object", - "description": "Prometheus enrichment object.", - "required": [ - "linkToApi", - "datasources", - "grafanaExplorePath", - "query" - ], - "allOf": [ - { - "$ref": "#/definitions/alertEnrichmentItem" - } - ], - "properties": { - "linkToApi": { - "type": "string", - "description": "Link to Prometheus query API (Url format)." - }, - "datasources": { - "type": "array", - "description": "An array of the azure monitor workspace resource ids.", - "items": { - "type": "string", - "description": "The azure monitor workspace resource id." - }, - "x-ms-identifiers": [] - }, - "grafanaExplorePath": { - "type": "string", - "description": "Partial link to the Grafana explore API." - }, - "query": { - "type": "string", - "description": "The Prometheus expression query." - } - } - }, - "PrometheusInstantQuery": { - "x-ms-discriminator-value": "PrometheusInstantQuery", - "type": "object", - "description": "Prometheus instant query enrichment object.", - "required": [ - "time" - ], - "allOf": [ - { - "$ref": "#/definitions/PrometheusEnrichmentItem" - } - ], - "properties": { - "time": { - "type": "string", - "description": "The date and the time of the evaluation." - } - } - }, - "PrometheusRangeQuery": { - "type": "object", - "x-ms-discriminator-value": "PrometheusRangeQuery", - "description": "Prometheus instant query enrichment object.", - "required": [ - "start", - "end", - "step" - ], - "allOf": [ - { - "$ref": "#/definitions/PrometheusEnrichmentItem" - } - ], - "properties": { - "start": { - "type": "string", - "description": "The start evaluation date and time in ISO8601 format.", - "format": "date-time" - }, - "end": { - "type": "string", - "description": "The end evaluation date and time in ISO8601 format.", - "format": "date-time" - }, - "step": { - "type": "string", - "description": "Query resolution step width in ISO8601 format." - } - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/AlertsMetaData_MonitorService.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/AlertsMetaData_MonitorService.json deleted file mode 100644 index b4a0a77a0a42..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/AlertsMetaData_MonitorService.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "parameters": { - "api-version": "2024-01-01-preview", - "identifier": "MonitorServiceList" - }, - "responses": { - "200": { - "body": { - "properties": { - "metadataIdentifier": "MonitorServiceList", - "data": [ - { - "name": "ActivityLog Administrative", - "displayName": "Activity Log - Administrative" - }, - { - "name": "ActivityLog Autoscale", - "displayName": "Activity Log - Autoscale" - }, - { - "name": "ActivityLog Policy", - "displayName": "Activity Log - Policy" - }, - { - "name": "ActivityLog Recommendation", - "displayName": "Activity Log - Recommendation" - }, - { - "name": "ActivityLog Security", - "displayName": "Activity Log - Security" - }, - { - "name": "Application Insights", - "displayName": "Application Insights" - }, - { - "name": "Azure Backup", - "displayName": "Azure Backup" - }, - { - "name": "Custom", - "displayName": "Custom" - }, - { - "name": "Data Box Edge", - "displayName": "Data Box Edge" - }, - { - "name": "VM Insights", - "displayName": "VM Insights" - }, - { - "name": "Log Analytics", - "displayName": "Log Analytics" - }, - { - "name": "Nagios", - "displayName": "NAGIOS" - }, - { - "name": "Platform", - "displayName": "Platform" - }, - { - "name": "Resource Health", - "displayName": "Resource Health" - }, - { - "name": "SCOM", - "displayName": "SCOM" - }, - { - "name": "ServiceHealth", - "displayName": "Service Health" - }, - { - "name": "Smart Detector", - "displayName": "SmartDetector" - }, - { - "name": "Zabbix", - "displayName": "ZABBIX" - } - ] - } - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_ChangeState.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_ChangeState.json deleted file mode 100644 index 836d2405facf..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_ChangeState.json +++ /dev/null @@ -1,53 +0,0 @@ -{ - "parameters": { - "api-version": "2024-01-01-preview", - "scope": "subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", - "newState": "Acknowledged", - "body": { - "comment": "Acknowledging alert" - } - }, - "responses": { - "200": { - "body": { - "properties": { - "essentials": { - "severity": "Sev3", - "signalType": "Log", - "alertState": "Acknowledged", - "monitorCondition": "Fired", - "monitorService": "Application Insights", - "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", - "targetResourceName": "servicedeskappinsight", - "targetResourceGroup": "servicedeskresourcegroup", - "targetResourceType": "components", - "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", - "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", - "smartGroupingReason": "Occurred frequently with other alerts", - "alertRule": "https://servisdfsdfappinsight.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", - "startDateTime": "2018-09-13T15:51:02Z", - "lastModifiedDateTime": "2018-09-13T15:51:02Z", - "lastModifiedUserName": "System", - "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", - "actionStatus": { - "isSuppressed": false - }, - "hasEnrichments": true, - "isStatefulAlert": true, - "correlationDetails": { - "parentAlertId": "231498c1-7a8f-461a-ae8c-f384e7fc86fa", - "correlationDateTime": "2018-09-13T15:51:02Z" - }, - "description": "description of the alert" - }, - "egressConfig": {}, - "context": {} - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", - "type": "Microsoft.AlertsManagement/alerts", - "name": "cpu alert" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_GetById.json deleted file mode 100644 index 589912bf1076..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_GetById.json +++ /dev/null @@ -1,50 +0,0 @@ -{ - "parameters": { - "api-version": "2024-01-01-preview", - "scope": "subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100" - }, - "responses": { - "200": { - "body": { - "properties": { - "essentials": { - "severity": "Sev3", - "signalType": "Log", - "alertState": "Acknowledged", - "monitorCondition": "Fired", - "monitorService": "Application Insights", - "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", - "targetResourceName": "servicedeskappinsight", - "targetResourceGroup": "servicedeskresourcegroup", - "targetResourceType": "components", - "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", - "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", - "smartGroupingReason": "Occurred frequently with other alerts", - "alertRule": "https://sersdfsdfinsight.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", - "startDateTime": "2018-09-13T15:51:02Z", - "lastModifiedDateTime": "2018-09-13T15:51:02Z", - "lastModifiedUserName": "System", - "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", - "actionStatus": { - "isSuppressed": false - }, - "hasEnrichments": true, - "isStatefulAlert": true, - "correlationDetails": { - "parentAlertId": "231498c1-7a8f-461a-ae8c-f384e7fc86fa", - "correlationDateTime": "2018-09-13T15:51:02Z", - "alertProcessingRule": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourceGroups/servicedeskresourcegroup/providers/Microsoft.AlertsManagement/actionRules/alertProcessingRule" - }, - "description": "description of the alert" - }, - "egressConfig": {}, - "context": {} - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", - "type": "Microsoft.AlertsManagement/alerts", - "name": "cpu alert" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_GetEnrichments.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_GetEnrichments.json deleted file mode 100644 index a16005e35ebc..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_GetEnrichments.json +++ /dev/null @@ -1,65 +0,0 @@ -{ - "parameters": { - "api-version": "2024-01-01-preview", - "scope": "subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502101" - }, - "responses": { - "200": { - "body": { - "properties": { - "alertId": "66114d64-d9d9-478b-95c9-b789d6502101", - "enrichments": [ - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Succeeded", - "type": "PrometheusInstantQuery", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace1'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "time": "2015-07-01T20:10:51.781Z" - }, - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Succeeded", - "type": "PrometheusRangeQuery", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "start": "2015-07-01T20:10:51.781Z", - "end": "2015-07-01T20:20:51.781Z", - "step": "PT15S" - }, - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Failed", - "type": "PrometheusRangeQuery", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "errorMessage": "Calling Prometheus query API failed", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "start": "2015-07-01T20:10:51.781Z", - "end": "2015-07-01T20:20:51.781Z", - "step": "PT15S" - } - ] - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502101/enrichments/default", - "type": "Microsoft.AlertsManagement/alerts/enrichments", - "name": "default" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_History.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_History.json deleted file mode 100644 index 8b7dca96f99e..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_History.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "parameters": { - "api-version": "2024-01-01-preview", - "scope": "subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100" - }, - "responses": { - "200": { - "body": { - "properties": { - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", - "modifications": [ - { - "modificationEvent": "StateChange", - "oldValue": "New", - "newValue": "Acknowledged", - "modifiedAt": "2018-06-13T06:14:15.7378737Z", - "modifiedBy": "vikramm@microsoft.com", - "comments": "Acknowledging alert", - "description": "State changed from 'New' to 'Acknowledged'" - }, - { - "modificationEvent": "AlertCreated", - "oldValue": "", - "newValue": "", - "modifiedAt": "2018-06-13T06:09:01Z", - "modifiedBy": "System", - "comments": "", - "description": "New Alert Object is created" - } - ] - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history/default", - "type": "Microsoft.AlertsManagement/alerts", - "name": "CPU Alert" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_List.json deleted file mode 100644 index e7050b7ccc29..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_List.json +++ /dev/null @@ -1,87 +0,0 @@ -{ - "parameters": { - "api-version": "2024-01-01-preview", - "scope": "subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d" - }, - "responses": { - "200": { - "body": { - "nextLink": "https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alerts?api-version=2018-05-05-preview&timeRange=1d&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", - "value": [ - { - "properties": { - "essentials": { - "severity": "Sev3", - "signalType": "Log", - "alertState": "Acknowledged", - "monitorCondition": "Fired", - "monitorService": "Application Insights", - "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", - "targetResourceName": "servicedeskappinsight", - "targetResourceGroup": "servicedeskresourcegroup", - "targetResourceType": "components", - "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", - "smartGroupId": "23d6b2ce-8c54-468f-aff0-sd32aebb7e56", - "smartGroupingReason": "Occurred frequently with other alerts", - "alertRule": "https://servisdffsdf.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", - "startDateTime": "2018-09-13T15:51:02Z", - "lastModifiedDateTime": "2018-09-13T15:51:02Z", - "lastModifiedUserName": "System", - "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", - "actionStatus": { - "isSuppressed": false - }, - "hasEnrichments": true, - "isStatefulAlert": true, - "correlationDetails": { - "parentAlertId": "231498c1-7a8f-461a-ae8c-f384e7fc86fa", - "correlationDateTime": "2018-09-13T15:51:02Z" - }, - "description": "description of the alert" - }, - "egressConfig": {}, - "context": {} - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", - "type": "Microsoft.AlertsManagement/alerts", - "name": "cpu alert" - }, - { - "properties": { - "essentials": { - "severity": "Sev3", - "signalType": "Log", - "alertState": "New", - "monitorCondition": "Fired", - "monitorService": "Application Insights", - "targetResource": "/subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/cind/providers/microsoft.operationalinsights/workspaces/servicedeskwcus", - "targetResourceName": "servicedeskwcus", - "targetResourceGroup": "servicedeskresourcegroup", - "targetResourceType": "components", - "sourceCreatedId": "6cd6b2ce-8c54-468f-aff0-9d12aebb7e49", - "smartGroupId": "d1c49c89-ea95-4697-a299-c0f5ebac62f1", - "smartGroupingReason": "Alerts that frequently occur together have been grouped.", - "alertRule": "https://servicsdfsdf.portal.mms.microsoft.com/#Workspace/overview/settings/details/Edit Alert Rule/details/index?savedSearchId=&scheduleId=", - "startDateTime": "2018-09-13T15:51:02Z", - "lastModifiedDateTime": "2018-09-13T15:51:02Z", - "lastModifiedUserName": "System", - "monitorConditionResolvedDateTime": "2018-09-13T15:51:02Z", - "actionStatus": { - "isSuppressed": false - }, - "hasEnrichments": true, - "isStatefulAlert": true, - "description": "description of the alert" - }, - "egressConfig": {}, - "context": {} - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", - "type": "Microsoft.AlertsManagement/alerts", - "name": "cpu alert" - } - ] - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_ListEnrichments.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_ListEnrichments.json deleted file mode 100644 index 2bc8c9d23e17..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_ListEnrichments.json +++ /dev/null @@ -1,69 +0,0 @@ -{ - "parameters": { - "api-version": "2024-01-01-preview", - "scope": "subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502101" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502101/enrichments/default", - "type": "Microsoft.AlertsManagement/alerts/enrichments", - "name": "default", - "properties": { - "alertId": "66114d64-d9d9-478b-95c9-b789d6502101", - "enrichments": [ - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Succeeded", - "type": "PrometheusInstantQuery", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace1'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "time": "2015-07-01T20:10:51.781Z" - }, - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Succeeded", - "type": "PrometheusRangeQuery", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "start": "2015-07-01T20:10:51.781Z", - "end": "2015-07-01T20:20:51.781Z", - "step": "PT15S" - }, - { - "title": "Number of OOM killed events by container", - "description": "Enrichment description", - "status": "Failed", - "type": "PrometheusRangeQuery", - "linkToApi": "https://test-3sxl.eastus.prometheus.monitor.azure.com/api/v1/query_range?...", - "grafanaExplorePath": "/explore?left=%7B%22datasource%22...", - "errorMessage": "Calling Prometheus query API failed", - "datasources": [ - "/subscriptions/72fa99ef-9c84-4a7c-b343-ec62da107d81/resourceGroups/SyntheticRules/providers/microsoft.monitor/accounts/canaryamw" - ], - "query": "sum by (cluster,container,replicaset,namespace)(label_replace( kube_pod_container_status_last_terminated_reason{reason='OOMKilled', cluster='cluster1', namespace='namespace'}'}, 'replicaset', '$1', 'pod', '(.*)(-[a-z0-9]{5})$')) > 0", - "start": "2015-07-01T20:10:51.781Z", - "end": "2015-07-01T20:20:51.781Z", - "step": "PT15S" - } - ] - } - } - ] - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_Summary.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_Summary.json deleted file mode 100644 index fca62a562b10..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Alerts_Summary.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "parameters": { - "api-version": "2024-01-01-preview", - "scope": "subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d", - "groupby": "severity,alertState" - }, - "responses": { - "200": { - "body": { - "properties": { - "groupedby": "severity", - "smartGroupsCount": 100, - "total": 14189, - "values": [ - { - "name": "Sev0", - "count": 6517, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 6517 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev1", - "count": 3175, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 3175 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev2", - "count": 1120, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 1120 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev3", - "count": 1902, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 1902 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev4", - "count": 1475, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 1475 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - } - ] - }, - "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alertsSummary/current", - "type": "Microsoft.AlertsManagement/alertsSummary", - "name": "current" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Operations_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Operations_List.json deleted file mode 100644 index f6b9907ad08c..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2024-01-01-preview/examples/Operations_List.json +++ /dev/null @@ -1,211 +0,0 @@ -{ - "parameters": { - "api-version": "2024-01-01-preview" - }, - "responses": { - "200": { - "body": { - "value": [ - { - "name": "Microsoft.AlertsManagement/register/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "Subscription", - "operation": "Subscription Registration Action", - "description": "Subscription Registration Action" - } - }, - { - "name": "Microsoft.AlertsManagement/register/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "register", - "operation": "Register subscription", - "description": "Registers the subscription for the Microsoft Alerts Management" - } - }, - { - "name": "Microsoft.AlertsManagement/alerts/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "alerts", - "operation": "Read alerts", - "description": "Get all the alerts for the input filters." - } - }, - { - "name": "Microsoft.AlertsManagement/alerts/changestate/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "alerts", - "operation": "Resolve alerts", - "description": "Change the state of the alert." - } - }, - { - "name": "Microsoft.AlertsManagement/alerts/history/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "alerts", - "operation": "Read alert history", - "description": "Get history of the alert" - } - }, - { - "name": "Microsoft.AlertsManagement/smartDetectorAlertRules/write", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartDetectorAlertRules", - "operation": "Create Smart Detector alert rule", - "description": "Create or update Smart Detector alert rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/smartDetectorAlertRules/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartDetectorAlertRules", - "operation": "Read Smart Detector alert rules", - "description": "Get all the Smart Detector alert rules for the input filters" - } - }, - { - "name": "Microsoft.AlertsManagement/smartDetectorAlertRules/delete", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartDetectorAlertRules", - "operation": "Delete Smart Detector alert rule", - "description": "Delete Smart Detector alert rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/resourceHealthAlertRules/write", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "resourceHealthAlertRules", - "operation": "Create Resource Health alert rule", - "description": "Create or update Resource Health alert rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/resourceHealthAlertRules/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "resourceHealthAlertRules", - "operation": "Read Resource Health alert rules", - "description": "Get all the Resource Health alert rules for the input filters" - } - }, - { - "name": "Microsoft.AlertsManagement/resourceHealthAlertRules/delete", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "resourceHealthAlertRules", - "operation": "Delete Resource Health alert rule", - "description": "Delete Resource Health alert rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/migrateFromSmartDetection/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "migrateFromSmartDetection", - "operation": "Get Smart Detection Migration status", - "description": "Get the status of an asynchronous Smart Detection to smart alerts migration process" - } - }, - { - "name": "Microsoft.AlertsManagement/migrateFromSmartDetection/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "migrateFromSmartDetection", - "operation": "Migrate From Smart Detection", - "description": "Starts an asynchronous migration process of Smart Detection to smart alerts in an Application Insights resource" - } - }, - { - "name": "Microsoft.AlertsManagement/alertsSummary/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "alertsSummary", - "operation": "Read alerts summary", - "description": "Get the summary of alerts" - } - }, - { - "name": "Microsoft.AlertsManagement/smartGroups/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartGroups", - "operation": "Read smart groups", - "description": "Get all the smart groups for the input filters" - } - }, - { - "name": "Microsoft.AlertsManagement/smartGroups/changestate/action", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartGroups", - "operation": "Read smart groups", - "description": "Change the state of the smart group" - } - }, - { - "name": "Microsoft.AlertsManagement/smartGroups/history/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "smartGroups", - "operation": "Read smart group history", - "description": "Get history of the smart group" - } - }, - { - "name": "Microsoft.AlertsManagement/actionRules/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "actionRules", - "operation": "Read action rules", - "description": "Get all the alert processing rules for the input filters." - } - }, - { - "name": "Microsoft.AlertsManagement/actionRules/write", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "actionRules", - "operation": "Write action rule", - "description": "Create or update alert processing rule in a given subscription" - } - }, - { - "name": "Microsoft.AlertsManagement/actionRules/delete", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "actionRules", - "operation": "Delete action rule", - "description": "Delete alert processing rule in a given subscription." - } - }, - { - "name": "Microsoft.AlertsManagement/alertsMetaData/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "Microsoft.AlertsManagement/alertsMetaData", - "operation": "Read alerts meta data", - "description": "Get alerts meta data for the input parameter." - } - }, - { - "name": "Microsoft.AlertsManagement/Operations/read", - "display": { - "provider": "Microsoft.AlertsManagement", - "resource": "operations", - "operation": "Read operations", - "description": "Reads the operations provided" - } - } - ] - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/readme.go.md b/specification/alertsmanagement/resource-manager/readme.go.md index 2366e80b9c35..5afc8d811971 100644 --- a/specification/alertsmanagement/resource-manager/readme.go.md +++ b/specification/alertsmanagement/resource-manager/readme.go.md @@ -8,4 +8,9 @@ module-name: sdk/resourcemanager/alertsmanagement/armalertsmanagement module: github.com/Azure/azure-sdk-for-go/$(module-name) output-folder: $(go-sdk-folder)/$(module-name) azure-arm: true + +directive: +- rename-model: + from: 'AlertsManagementErrorResponse' + to: 'ErrorResponseForAlertsManagement' ``` diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index f832dfb14ea3..2a6a70ea1183 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -68,7 +68,7 @@ These settings apply only when `--tag=package-preview-2025-05-01-preview` is spe ```yaml $(tag) == 'package-preview-2025-05-01-preview' input-file: - Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json - - Microsoft.AlertsManagement/preview/2024-01-01-preview/AlertsManagement.json + - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json - Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertProcessingRules.json @@ -83,29 +83,13 @@ These settings apply only when `--tag=package-preview-2025-03-01-preview` is spe input-file: - Microsoft.AlertsManagement/preview/2025-03-01-preview/Issues.json ``` -### Tag: package-preview-2024-01 - -These settings apply only when `--tag=package-preview-2024-01` is specified on the command line. - -```yaml $(tag) == 'package-preview-2024-01' -input-file: - - Microsoft.AlertsManagement/preview/2024-01-01-preview/AlertsManagement.json -``` ### Tag: package-preview-2023-08 These settings apply only when `--tag=package-preview-2023-08` is specified on the command line. ```yaml $(tag) == 'package-preview-2023-08' input-file: - - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json -``` -### Tag: package-preview-2023-07 - -These settings apply only when `--tag=package-preview-2023-07` is specified on the command line. - -```yaml $(tag) == 'package-preview-2023-07' -input-file: - - Microsoft.AlertsManagement/preview/2023-07-12-preview/AlertsManagement.json + - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json ``` ### Tag: package-preview-2023-04 @@ -130,12 +114,19 @@ These settings apply only when `--tag=package-2023-03` is specified on the comma ```yaml $(tag) == 'package-2023-03' input-file: - Microsoft.AlertsManagement/stable/2023-03-01/PrometheusRuleGroups.json - - Microsoft.AlertsManagement/preview/2024-01-01-preview/AlertsManagement.json + - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json - Microsoft.AlertsManagement/preview/2019-05-05-preview/SmartGroups.json - Microsoft.AlertsManagement/preview/2023-08-01-preview/AlertRuleRecommendations.json - Microsoft.AlertsManagement/preview/2021-08-08-preview/AlertProcessingRules.json - Microsoft.AlertsManagement/preview/2025-03-01-preview/Issues.json ``` + +### Important Note +The following preview versions have been deprecated and their functionality is available in the stable version (Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json): +- 2023-07-12-preview/AlertsManagement.json +- 2024-01-01-preview/AlertsManagement.json + +Please use the stable version for all Alerts Management operations. ### Tag: package-2021-08 These settings apply only when `--tag=package-2021-08` is specified on the command line. @@ -283,6 +274,3 @@ See configuration in [readme.go.md](./readme.go.md) ## Java See configuration in [readme.java.md](./readme.java.md) - - -