diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/AlertsManagement.json new file mode 100644 index 000000000000..ca549e250e7a --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/AlertsManagement.json @@ -0,0 +1,1534 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-05-05", + "title": "Azure Alerts Management Service Resource Provider", + "description": "Azure Alerts Management Service provides a single pane of glass of alerts borne from Azure Monitor." + }, + "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": "#/parameters/api-version" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK. Succesfully retrieved operations list.", + "schema": { + "$ref": "#/definitions/operationsList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts": { + "get": { + "operationId": "Alerts_GetAll", + "description": "List all the existing alerts, where the results can be selective by passing multiple filter parameters including time range and sorted on specific fields. ", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$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": "#/parameters/api-version" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK. Succesfully 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" + } + } + } + }, + "/subscriptions/{subscriptionId}/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/subscriptionId" + }, + { + "$ref": "#/parameters/alertId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "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" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate": { + "post": { + "operationId": "Alerts_ChangeState", + "description": "Change the state of the alert.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/alertId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/newState" + } + ], + "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" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history": { + "get": { + "operationId": "Alerts_GetHistory", + "description": "Get the history of the changes of an alert.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/alertId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK. Returns the list of changes of 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" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/alertsSummary": { + "get": { + "operationId": "Alerts_GetSummary", + "description": "Summary of alerts with the count each severity.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$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": "#/parameters/api-version" + } + ], + "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" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups": { + "get": { + "operationId": "SmartGroups_GetAll", + "summary": "Get all smartGroups within the subscription", + "description": "List all the smartGroups within the specified subscription. ", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/targetResource" + }, + { + "$ref": "#/parameters/targetResourceGroup" + }, + { + "$ref": "#/parameters/targetResourceType" + }, + { + "$ref": "#/parameters/monitorService" + }, + { + "$ref": "#/parameters/monitorCondition" + }, + { + "$ref": "#/parameters/severity" + }, + { + "$ref": "#/parameters/smartGroupState" + }, + { + "$ref": "#/parameters/timeRange" + }, + { + "$ref": "#/parameters/pageCount" + }, + { + "$ref": "#/parameters/smartGroupsSortBy" + }, + { + "$ref": "#/parameters/sortOrder" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK. Returns list of all smartGroups.", + "schema": { + "$ref": "#/definitions/smartGroupsList", + "description": "List of smart groups in value property." + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-examples": { + "List": { + "$ref": "./examples/SmartGroups_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}": { + "get": { + "operationId": "SmartGroups_GetById", + "summary": "Get information of smart alerts group.", + "description": "Get details of smart group.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/smartGroupId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK. Returns the group with the specified smart group Id.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/smartGroup" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-examples": { + "Get": { + "$ref": "./examples/SmartGroups_GetbyId.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/changeState": { + "post": { + "operationId": "SmartGroups_ChangeState", + "description": "Change the state from unresolved to resolved and all the alerts within the smart group will also be resolved.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/smartGroupId" + }, + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/newState" + } + ], + "responses": { + "200": { + "description": "OK. Alert state updated.", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/smartGroup" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-examples": { + "changestate": { + "$ref": "./examples/SmartGroups_ChangeState.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartGroups/{smartGroupId}/history": { + "get": { + "operationId": "SmartGroups_GetHistory", + "description": "Get the history of the changes of smart group.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/smartGroupId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK. Returns the list of changes of smart group.", + "schema": { + "$ref": "#/definitions/smartGroupModification" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + }, + "x-ms-examples": { + "Resolve": { + "$ref": "./examples/SmartGroups_History.json" + } + } + } + } + }, + "parameters": { + "subscriptionId": { + "name": "subscriptionId", + "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "type": "string", + "in": "path", + "required": true + }, + "api-version": { + "name": "api-version", + "description": "API version.", + "type": "string", + "in": "query", + "required": true, + "enum": [ + "2018-05-05T00:00:00.000Z" + ], + "x-ms-enum": { + "name": "api-version", + "modelAsString": true + } + }, + "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 is the source of 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" + ], + "x-ms-enum": { + "name": "MonitorService", + "modelAsString": true + } + }, + "severity": { + "description": "Filter by severity. Defaut 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 + } + }, + "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 the state of the monitor(alertRule) at monitor service. 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 alert rule(monitor) which fired alert instance. 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 data contextual 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", + "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 aggregated by input fields. For example, 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" + ] + }, + "select": { + "description": "This filter allows to selection of the fields(comma seperated) which would be part of the 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" + } + }, + "definitions": { + "operation": { + "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" + } + } + } + } + }, + "operationsList": { + "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" + } + } + }, + "required": [ + "value" + ] + }, + "errorResponse": { + "description": "An error response from the service.", + "x-ms-external": true, + "properties": { + "error": { + "$ref": "#/definitions/errorResponseBody" + } + } + }, + "errorResponseBody": { + "description": "Details of error response.", + "x-ms-external": true, + "properties": { + "code": { + "type": "string", + "description": "Error code, intended to be consumed programmatically." + }, + "message": { + "type": "string", + "description": "Description of the error, intended for display in user interface." + }, + "target": { + "type": "string", + "description": "Target of the particular error, for example name of the property." + }, + "details": { + "type": "array", + "description": "A list of additional details about the error.", + "items": { + "$ref": "#/definitions/errorResponseBody" + } + } + } + }, + "Resource": { + "x-ms-azure-resource": true, + "description": "An azure resource object", + "properties": { + "id": { + "type": "string", + "readOnly": true, + "description": "Azure resource Id" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Azure resource type" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Azure resource name" + } + } + }, + "alert": { + "description": "An alert created in alert management service.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/alertProperties" + } + } + }, + "alertsList": { + "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" + } + } + }, + "egressConfig": { + "type": "object", + "description": "Config which would be used for displaying the data in portal.", + "readOnly": true + }, + "alertContext": { + "type": "object", + "description": "More details which are contextual to the monitor service.", + "readOnly": true + }, + "essentials": { + "type": "object", + "description": "This object contains normalized fields across different monitor service and also contains state related fields.", + "properties": { + "severity": { + "type": "string", + "description": "Severity of alert Sev0 being highest and Sev3 being lowest.", + "readOnly": true, + "enum": [ + "Sev0", + "Sev1", + "Sev2", + "Sev3", + "Sev4" + ], + "x-ms-enum": { + "name": "Severity", + "modelAsString": true + } + }, + "signalType": { + "type": "string", + "description": "Log based alert or metric based alert", + "readOnly": true, + "enum": [ + "Metric", + "Log", + "Unknown" + ], + "x-ms-enum": { + "name": "SignalType", + "modelAsString": true + } + }, + "alertState": { + "type": "string", + "description": "Alert object state, which is modified by the user.", + "readOnly": true, + "enum": [ + "New", + "Acknowledged", + "Closed" + ], + "x-ms-enum": { + "name": "AlertState", + "modelAsString": true + } + }, + "monitorCondition": { + "type": "string", + "description": "Represents rule condition(Fired/Resolved) maintained by monitor service depending on the state of the state.", + "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" + ], + "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 of the rule condition is not 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 + } + } + }, + "alertModification": { + "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" + } + } + } + }, + "alertModificationItem": { + "description": "Alert modification item.", + "properties": { + "modificationEvent": { + "type": "string", + "description": "Reason for the modification", + "enum": [ + "AlertCreated", + "StateChange", + "MonitorConditionChange" + ], + "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" + } + } + }, + "smartGroupModification": { + "description": "Alert Modification details", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/smartGroupModificationProperties" + } + } + }, + "smartGroupModificationProperties": { + "description": "Properties of the smartGroup modification item.", + "properties": { + "smartGroupId": { + "type": "string", + "description": "Unique Id of the smartGroup for which the history is being retrieved", + "readOnly": true + }, + "modifications": { + "type": "array", + "description": "Modification details", + "items": { + "$ref": "#/definitions/smartGroupModificationItem" + } + }, + "nextLink": { + "description": "URL to fetch the next set of results.", + "type": "string" + } + } + }, + "smartGroupModificationItem": { + "description": "smartGroup modification item.", + "properties": { + "modificationEvent": { + "type": "string", + "description": "Reason for the modification", + "enum": [ + "SmartGroupCreated", + "StateChange", + "AlertAdded", + "AlertRemoved" + ], + "x-ms-enum": { + "name": "SmartGroupModificationEvent" + } + }, + "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": { + "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", + "description": "Total count of the result set." + }, + "smartGroupsCount": { + "type": "integer", + "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" + } + } + } + }, + "alertsSummaryGroupItem": { + "type": "object", + "description": "Alerts summary group item", + "properties": { + "name": { + "type": "string", + "description": "Value of the aggregated field" + }, + "count": { + "type": "integer", + "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" + } + } + } + }, + "smartGroupsList": { + "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/smartGroup" + } + } + } + }, + "smartGroup": { + "description": "Set of related alerts grouped together smartly by AMS.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/smartGroupProperties" + } + } + }, + "smartGroupProperties": { + "type": "object", + "description": "Properties of smart group.", + "properties": { + "alertsCount": { + "type": "integer", + "description": "Total number of alerts in smart group" + }, + "smartGroupState": { + "type": "string", + "description": "Smart group state", + "readOnly": true, + "enum": [ + "New", + "Acknowledged", + "Closed" + ], + "x-ms-enum": { + "name": "State", + "modelAsString": true + } + }, + "severity": { + "type": "string", + "description": "Severity of smart group is the highest(Sev0 >... > Sev4) severity of all the alerts in the group.", + "readOnly": true, + "enum": [ + "Sev0", + "Sev1", + "Sev2", + "Sev3", + "Sev4" + ], + "x-ms-enum": { + "name": "Severity", + "modelAsString": true + } + }, + "startDateTime": { + "type": "string", + "format": "date-time", + "description": "Creation time of smart group. Date-Time in ISO-8601 format.", + "readOnly": true + }, + "lastModifiedDateTime": { + "type": "string", + "format": "date-time", + "description": "Last updated time of smart group. Date-Time in ISO-8601 format.", + "readOnly": true + }, + "lastModifiedUserName": { + "type": "string", + "description": "Last modified by user name.", + "readOnly": true + }, + "resources": { + "items": { + "$ref": "#/definitions/smartGroupAggregatedProperty" + }, + "type": "array", + "description": "Summary of target resources in the smart group" + }, + "resourceTypes": { + "items": { + "$ref": "#/definitions/smartGroupAggregatedProperty" + }, + "type": "array", + "description": "Summary of target resource types in the smart group" + }, + "resourceGroups": { + "items": { + "$ref": "#/definitions/smartGroupAggregatedProperty" + }, + "type": "array", + "description": "Summary of target resource groups in the smart group" + }, + "monitorServices": { + "items": { + "$ref": "#/definitions/smartGroupAggregatedProperty" + }, + "type": "array", + "description": "Summary of monitorServices in the smart group" + }, + "monitorConditions": { + "items": { + "$ref": "#/definitions/smartGroupAggregatedProperty" + }, + "type": "array", + "description": "Summary of monitorConditions in the smart group" + }, + "alertStates": { + "items": { + "$ref": "#/definitions/smartGroupAggregatedProperty" + }, + "type": "array", + "description": "Summary of alertStates in the smart group" + }, + "alertSeverities": { + "items": { + "$ref": "#/definitions/smartGroupAggregatedProperty" + }, + "type": "array", + "description": "Summary of alertSeverities in the smart group" + }, + "nextLink": { + "type": "string", + "description": "The URI to fetch the next page of alerts. Call ListNext() with this URI to fetch the next page alerts." + } + } + }, + "smartGroupAggregatedProperty": { + "type": "object", + "description": "Aggregated property of each type", + "properties": { + "name": { + "type": "string", + "description": "Name of the type." + }, + "count": { + "type": "integer", + "description": "Total number of items of type." + } + } + } + } +} \ No newline at end of file diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_ChangeState.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_ChangeState.json new file mode 100644 index 000000000000..fdcdb0b21e95 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_ChangeState.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2018-05-05", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a", + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "newState": "Acknowledged", + "body":{ + "comments" : "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" + }, + "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/stable/2018-05-05/examples/Alerts_GetbyId.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_GetbyId.json new file mode 100644 index 000000000000..99627f0e1a2e --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_GetbyId.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2018-05-05", + "subscriptionId": "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" + }, + "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" + } + } + } +} \ No newline at end of file diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_History.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_History.json new file mode 100644 index 000000000000..6a678f73cc9a --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_History.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2018-05-05", + "subscriptionId": "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/stable/2018-05-05/examples/Alerts_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_List.json new file mode 100644 index 000000000000..921f7127863b --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_List.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2018-05-05", + "subscriptionId": "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" + }, + "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" + }, + "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" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_Summary.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_Summary.json new file mode 100644 index 000000000000..a845e891daa4 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/Alerts_Summary.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "api-version": "2018-05-05", + "subscriptionId": "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" + } + } + } +} \ No newline at end of file diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_ChangeState.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_ChangeState.json new file mode 100644 index 000000000000..8c100af5bd1f --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_ChangeState.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2018-05-05", + "subscriptionId": "dd91de05-d791-4ceb-b6dc-988682dc7d72", + "smartGroupId": "a808445e-bb38-4751-85c2-1b109ccc1059", + "newState": "Acknowledged", + "body":{ + "comments" : "Acknowledging smart group" + } + }, + "responses": { + "200": { + "body": { + "properties":{ + "alertsCount":1942, + "smartGroupState":"Acknowledged", + "severity":"Sev3", + "startDateTime":"2018-06-06T12:35:09Z", + "lastModifiedDateTime":"2018-06-13T06:30:09Z", + "lastModifiedUserName":"System", + "resources":[ + { + "name":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "count":1942 + } + ], + "resourceTypes":[ + { + "name":"components", + "count":1942 + } + ], + "resourceGroups":[ + { + "name":"alertscorrelationrg", + "count":1942 + } + ], + "monitorServices":[ + { + "name":"Application Insights", + "count":1942 + } + ], + "monitorConditions":[ + { + "name":"Fired", + "count":1942 + } + ], + "alertStates":[ + { + "name":"New", + "count":1941 + }, + { + "name":"Acknowledged", + "count":1 + } + ], + "alertSeverities":[ + { + "name":"Sev3", + "count":1942 + } + ] + }, + "id":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059", + "type":"Microsoft.AlertsManagement/smartGroups", + "name":"cpu alert" + } + } + } +} \ No newline at end of file diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_GetbyId.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_GetbyId.json new file mode 100644 index 000000000000..63dc3358d594 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_GetbyId.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2018-05-05", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a", + "smartGroupId": "603675da-9851-4b26-854a-49fc53d32715" + }, + "responses": { + "200": { + "body": { + "properties":{ + "alertsCount":1942, + "smartGroupState":"New", + "severity":"Sev3", + "startDateTime":"2018-06-06T12:35:09Z", + "lastModifiedDateTime":"2018-06-13T06:30:09Z", + "lastModifiedUserName":"System", + "resources":[ + { + "name":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "count":1942 + } + ], + "resourceTypes":[ + { + "name":"components", + "count":1942 + } + ], + "resourceGroups":[ + { + "name":"alertscorrelationrg", + "count":1942 + } + ], + "monitorServices":[ + { + "name":"Application Insights", + "count":1942 + } + ], + "monitorConditions":[ + { + "name":"Fired", + "count":1942 + } + ], + "alertStates":[ + { + "name":"New", + "count":1941 + }, + { + "name":"Acknowledged", + "count":1 + } + ], + "alertSeverities":[ + { + "name":"Sev3", + "count":1942 + } + ] + }, + "id":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059", + "type":"Microsoft.AlertsManagement/smartGroups", + "name":"cpu alert" + } + } + } +} \ No newline at end of file diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_History.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_History.json new file mode 100644 index 000000000000..f2caa9c6adbe --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_History.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2018-05-05", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a", + "smartGroupId": "a808445e-bb38-4751-85c2-1b109ccc1059" + }, + "responses": { + "200": { + "body": { + "properties":{ + "smartGroupId":"a808445e-bb38-4751-85c2-1b109ccc1059", + "modifications":[ + { + "modificationEvent":"SmartGroupCreated", + "oldValue":"", + "newValue":"", + "modifiedAt":"2018-06-06T12:35:09Z", + "modifiedBy":"System", + "comments":"", + "description":"New Smart Group is created" + } + ] + }, + "id":"/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059/history/default", + "type":"Microsoft.AlertsManagement/alerts", + "name":"cpu alert" + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_List.json new file mode 100644 index 000000000000..afd484d47165 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2018-05-05/examples/SmartGroups_List.json @@ -0,0 +1,145 @@ +{ + "parameters": { + "api-version": "2018-05-05", + "subscriptionId": "dd91de05-d791-4ceb-b6dc-988682dc7d72" + }, + "responses": { + "200": { + "body": { + "nextLink": "", + "value": [ + { + "properties":{ + "alertsCount":1942, + "smartGroupState":"New", + "severity":"Sev3", + "startDateTime":"2018-06-06T12:35:09Z", + "lastModifiedDateTime":"2018-06-13T06:30:09Z", + "lastModifiedUserName":"System", + "resources":[ + { + "name":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "count":1942 + } + ], + "resourceTypes":[ + { + "name":"components", + "count":1942 + } + ], + "resourceGroups":[ + { + "name":"alertscorrelationrg", + "count":1942 + } + ], + "monitorServices":[ + { + "name":"Application Insights", + "count":1942 + } + ], + "monitorConditions":[ + { + "name":"Fired", + "count":1942 + } + ], + "alertStates":[ + { + "name":"New", + "count":1941 + }, + { + "name":"Acknowledged", + "count":1 + } + ], + "alertSeverities":[ + { + "name":"Sev3", + "count":1942 + } + ] + }, + "id":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/a808445e-bb38-4751-85c2-1b109ccc1059", + "type":"Microsoft.AlertsManagement/smartGroups", + "name":"cpu alert" + }, + { + "properties":{ + "alertsCount":15374, + "smartGroupState":"Acknowledged", + "severity":"Sev0", + "startDateTime":"2018-05-17T10:18:44.2020997Z", + "lastModifiedDateTime":"2018-06-13T06:29:01Z", + "lastModifiedUserName":"System", + "resources":[ + { + "name":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/mms-eus/providers/microsoft.operationalinsights/workspaces/alertsint", + "count":15374 + } + ], + "resourceTypes":[ + { + "name":"microsoft.operationalinsights/workspaces", + "count":6912 + }, + { + "name":"workspaces", + "count":8462 + } + ], + "resourceGroups":[ + { + "name":"mms-eus", + "count":15374 + } + ], + "monitorServices":[ + { + "name":"Log Analytics", + "count":13911 + } + ], + "monitorConditions":[ + { + "name":"Fired", + "count":15374 + } + ], + "alertStates":[ + { + "name":"New", + "count":15358 + }, + { + "name":"Acknowledged", + "count":12 + }, + { + "name":"Closed", + "count":4 + } + ], + "alertSeverities":[ + { + "name":"Sev0", + "count":6984 + }, + { + "name":"Sev1", + "count":6927 + } + ] + }, + "id":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/providers/Microsoft.AlertsManagement/smartGroups/01114c7c-769f-4fd4-b6fa-ab77693b83cd", + "type":"Microsoft.AlertsManagement/smartGroups", + "name":"CPU Alert" + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 9b0e0ad651dd..35e9e8fbd821 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -26,7 +26,16 @@ These are the global settings for the AlertManagement API. title: AlertsManagementClient description: AlertsManagement Client openapi-type: arm -tag: package-2018-05-preview +tag: package-2018-05 +``` + +### Tag: package-2018-05 + +These settings apply only when `--tag=package-2018-05` is specified on the command line. + +``` yaml $(tag) == 'package-2018-05' +input-file: +- Microsoft.AlertsManagement/stable/2018-05-05/AlertsManagement.json ``` ### Tag: package-2018-05-preview