diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/AlertsManagement.json new file mode 100644 index 000000000000..6446c5077847 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/AlertsManagement.json @@ -0,0 +1,2150 @@ +{ + "swagger": "2.0", + "info": { + "version": "2018-11-02-privatepreview", + "title": "Azure Alerts Management Service Resource Provider", + "description": "REST APIs for Azure Alerts Management Service." + }, + "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. Successfully 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/targetResourceGroup" + }, + { + "$ref": "#/parameters/targetResourceType" + }, + { + "$ref": "#/parameters/monitorService" + }, + { + "$ref": "#/parameters/monitorCondition" + }, + { + "$ref": "#/parameters/severity" + }, + { + "$ref": "#/parameters/alertState" + }, + { + "$ref": "#/parameters/smartGroupIdFilter" + }, + { + "$ref": "#/parameters/includePayload" + }, + { + "$ref": "#/parameters/pageCount" + }, + { + "$ref": "#/parameters/alertsSortBy" + }, + { + "$ref": "#/parameters/sortOrder" + }, + { + "$ref": "#/parameters/timeRange" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "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" + } + } + } + }, + "/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/targetResourceGroup" + }, + { + "$ref": "#/parameters/timeRange" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK. Alert state updated.", + "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" + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/actionRules": { + "get": { + "summary": "Get all action rule in a given subscription", + "description": "List all action rules of the subscription and given input filters", + "operationId": "ActionRules_GetAll_Subscription", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/targetResourceGroup" + }, + { + "$ref": "#/parameters/targetResourceType" + }, + { + "$ref": "#/parameters/targetResource" + }, + { + "$ref": "#/parameters/severity" + }, + { + "$ref": "#/parameters/monitorService" + } + ], + "responses": { + "200": { + "description": "OK. Return the list of action rules", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/actionRulesList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AlertsManagement/actionRules": { + "get": { + "summary": "Get all action rules created in a resource group", + "operationId": "ActionRules_GetAll_ResourceGroup", + "description": "List all action rules of the subscription, created in given resource group and given input filters", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroup" + }, + { + "$ref": "#/parameters/targetResourceGroup" + }, + { + "$ref": "#/parameters/targetResourceType" + }, + { + "$ref": "#/parameters/targetResource" + }, + { + "$ref": "#/parameters/severity" + }, + { + "$ref": "#/parameters/monitorService" + } + ], + "responses": { + "200": { + "description": "OK. Return the list of action rules", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/actionRulesList" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AlertsManagement/actionRules/{actionRuleName}": { + "get": { + "summary": "Get action rule by name", + "operationId": "ActionRules_GetByName", + "description": "Get a specific action rule", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroup" + }, + { + "name": "actionRuleName", + "in": "path", + "description": "The name of action rule that needs to be fetched", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. Returns the specific action rule", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/actionRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + } + }, + "put": { + "summary": "Create/update an action rule", + "operationId": "ActionRules_CreateUpdate", + "description": "Creates/Updates a specific action rule", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroup" + }, + { + "name": "actionRuleName", + "in": "path", + "description": "The name of action rule that needs to be created/updated", + "required": true, + "type": "string" + }, + { + "name": "actionRule", + "in": "body", + "description": "action rule to be created/updated", + "required": true, + "schema": { + "$ref": "#/definitions/actionRule" + } + } + ], + "responses": { + "200": { + "description": "OK. Returns the created/updated action rule", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + }, + "schema": { + "$ref": "#/definitions/actionRule" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + } + }, + "delete": { + "summary": "Delete action rule", + "description": "Deletes a given action rule", + "operationId": "ActionRules_Delete", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroup" + }, + { + "name": "actionRuleName", + "in": "path", + "description": "The name that needs to be deleted", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "OK. Returns true if deleted successfully", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + } + }, + "patch": { + "summary": "Patch action rule", + "description": "Update enabled flag and/or tags for the given action rule", + "operationId": "ActionRules_Patch", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/resourceGroup" + }, + { + "name": "actionRuleName", + "in": "path", + "description": "The name that needs to be updated", + "required": true, + "type": "string" + }, + { + "name": "actionRulePatch", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/patchObject" + }, + "description": "Parameters supplied to the operation." + } + ], + "responses": { + "200": { + "description": "OK. Returns the created/updated action rule", + "headers": { + "x-ms-request-id": { + "type": "string", + "description": "Service generated Request ID." + } + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/errorResponse" + } + } + } + } + } + }, + "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 + }, + "resourceGroup": { + "name": "resourceGroup", + "description": "Resource group name where the resource is created.", + "type": "string", + "in": "path", + "required": true + }, + "api-version": { + "name": "api-version", + "description": "client API version", + "type": "string", + "in": "query", + "required": true, + "enum": [ + "2018-11-02-privatepreview", + "2018-05-05" + ], + "x-ms-enum": { + "name": "api-version", + "modelAsString": true + } + }, + "alertId": { + "name": "alertId", + "description": "Unique ID of an alert object.", + "type": "string", + "in": "path", + "required": true, + "x-ms-parameter-location": "method" + }, + "targetResourceGroup": { + "description": "filter by target resource group name", + "name": "targetResourceGroup", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "targetResource": { + "description": "filter by target resource", + "name": "targetResource", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "targetResourceType": { + "description": "filter by target resource type", + "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 object.", + "name": "monitorService", + "type": "string", + "in": "query", + "required": false, + "enum": [ + "Platform", + "Application Insights", + "Log Analytics", + "Zabbix", + "SCOM", + "Nagios", + "Infrastructure Insights", + "ActivityLog Administrative", + "ActivityLog Security", + "ActivityLog Recommendation", + "ActivityLog Policy", + "ActivityLog Autoscale", + "ServiceHealth", + "SmartDetector" + ], + "x-ms-enum": { + "name": "MonitorService", + "modelAsString": true + } + }, + "severity": { + "description": "filter by severity", + "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 by smart Group Id", + "name": "smartGroupId", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "smartGroupId": { + "description": "Smart Group Id", + "name": "smartGroupId", + "type": "string", + "in": "path", + "required": true, + "x-ms-parameter-location": "method" + }, + "newState": { + "description": "filter by state", + "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", + "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", + "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 alert at monitor service", + "name": "monitorCondition", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "enum": [ + "Fired", + "Resolved" + ], + "x-ms-enum": { + "name": "MonitorCondition", + "modelAsString": true + } + }, + "timeRange": { + "description": "filter by time range, 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 + } + }, + "includePayload": { + "description": "include payload field content, default value is 'false'.", + "name": "includePayload", + "type": "boolean", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "pageCount": { + "description": "number of items per page, 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 + } + }, + "smartGroupsSortBy": { + "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": [ + "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" + ] + } + }, + "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" + } + } + }, + "ManagedResource": { + "x-ms-azure-resource": true, + "description": "An azure managed resource object", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "location": { + "type": "string", + "description": "Resource location", + "x-ms-mutability": [ + "create", + "read" + ] + }, + "tags": { + "additionalProperties": { + "type": "string" + }, + "description": "Resource tags" + } + }, + "required": [ + "location" + ] + }, + "alert": { + "description": "An alert created in alert management service.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/alertProperties", + "x-ms-client-flatten": true + } + } + }, + "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": "An alert created in alert management service.", + "properties": { + "severity": { + "type": "string", + "description": "Severity of alert Sev1 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", + "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", + "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": "Target ARM resource name, on which alert got created." + }, + "targetResourceGroup": { + "type": "string", + "description": "Resource group of target ARM resource." + }, + "targetResourceType": { + "type": "string", + "description": "Resource type of target ARM resource" + }, + "monitorService": { + "type": "string", + "description": "Monitor service which is the source of the alert object.", + "readOnly": true, + "enum": [ + "Platform", + "Application Insights", + "Log Analytics", + "Infrastructure Insights", + "ActivityLog Administrative", + "ActivityLog Security", + "ActivityLog Recommendation", + "ActivityLog Policy", + "ActivityLog Autoscale", + "ServiceHealth", + "SmartDetector", + "Zabbix", + "SCOM", + "Nagios" + ], + "x-ms-enum": { + "name": "MonitorService", + "modelAsString": true + } + }, + "sourceCreatedId": { + "type": "string", + "description": "Unique Id created by monitor service", + "readOnly": true + }, + "smartGroupId": { + "type": "string", + "description": "Unique Id of the smart group", + "readOnly": true + }, + "smartGroupingReason": { + "type": "string", + "description": "Reason for addition to a smart group", + "readOnly": true + }, + "startDateTime": { + "type": "string", + "format": "date-time", + "description": "Creation time(ISO-8601 format).", + "readOnly": true + }, + "lastModifiedDateTime": { + "type": "string", + "format": "date-time", + "description": "Last modification time(ISO-8601 format).", + "readOnly": true + }, + "lastModifiedUserName": { + "type": "string", + "description": "User who last modified the alert.", + "readOnly": true + }, + "payload": { + "type": "object", + "description": "More details which are contextual to the monitor service.", + "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 the alerts.", + "allOf": [ + { + "$ref": "#/definitions/Resource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/alertsSummaryProperties", + "x-ms-client-flatten": true + } + } + }, + "alertsSummaryProperties": { + "type": "object", + "description": "Summary of the alerts", + "properties": { + "total": { + "type": "integer", + "description": "Total number of alerts." + }, + "smartGroupsCount": { + "type": "integer", + "description": "Total number of smart groups." + }, + "summaryByState": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByState" + } + ], + "type": "object", + "description": "Summary of alerts by state" + }, + "summaryBySeverity": { + "type": "object", + "description": "Summary of alerts by severity", + "properties": { + "sev0": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByState" + } + ], + "type": "object", + "description": "Summary of alerts by severity 'Sev0'" + }, + "sev1": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByState" + } + ], + "type": "object", + "description": "Summary of alerts by severity 'Sev1'" + }, + "sev2": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByState" + } + ], + "type": "object", + "description": "Summary of alerts by severity 'Sev2'" + }, + "sev3": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByState" + } + ], + "type": "object", + "description": "Summary of alerts by severity 'Sev3'" + }, + "sev4": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByState" + } + ], + "type": "object", + "description": "Summary of alerts by severity 'Sev4'" + } + } + }, + "summaryBySeverityAndMonitorCondition": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryBySeverityAndMonitorCondition" + } + ], + "type": "object", + "description": "Summary of alerts by severity and monitor condition" + }, + "summaryByMonitorService": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByMonitorService" + } + ], + "type": "object", + "description": "Summary of alerts by severity" + }, + "nextLink": { + "description": "URL to fetch the next set of results.", + "type": "string" + } + } + }, + "alertsSummaryByState": { + "type": "object", + "description": "Summary of alerts by state", + "properties": { + "new": { + "type": "integer", + "description": "Count of alerts with state 'New'" + }, + "acknowledged": { + "type": "integer", + "description": "Count of alerts with state 'Acknowledged'" + }, + "closed": { + "type": "integer", + "description": "Count of alerts with state 'Closed'" + } + } + }, + "alertsSummaryBySeverityAndMonitorCondition": { + "type": "object", + "description": "Summary of the alerts by severity and monitor condition", + "properties": { + "sev0": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByMonitorCondition" + } + ], + "description": "Summary of alerts by monitor condition with severity 'Sev0'" + }, + "sev1": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByMonitorCondition" + } + ], + "description": "Summary of alerts by monitor condition with severity 'Sev1'" + }, + "sev2": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByMonitorCondition" + } + ], + "description": "Summary of alerts by monitor condition with severity 'Sev2'" + }, + "sev3": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByMonitorCondition" + } + ], + "description": "Summary of alerts by monitor condition with severity 'Sev3'" + }, + "sev4": { + "allOf": [ + { + "$ref": "#/definitions/alertsSummaryByMonitorCondition" + } + ], + "description": "Summary of alerts by monitor condition with severity 'Sev4'" + } + } + }, + "alertsSummaryByMonitorCondition": { + "type": "object", + "description": "Summary of the alerts by monitor condition", + "properties": { + "fired": { + "type": "integer", + "description": "Count of alerts with monitorCondition 'Fired'" + }, + "resolved": { + "type": "integer", + "description": "Count of alerts with monitorCondition 'Resolved'" + } + } + }, + "alertsSummaryByMonitorService": { + "type": "object", + "description": "Summary of the alerts by monitor service", + "properties": { + "platform": { + "type": "integer", + "description": "Count of alerts of \"Platform\"" + }, + "application Insights": { + "type": "integer", + "description": "Count of alerts of \"Application Insights\"" + }, + "log Analytics": { + "type": "integer", + "description": "Count of alerts of \"Log Analytics\"" + }, + "zabbix": { + "type": "integer", + "description": "Count of alerts of \"Zabbix\"" + }, + "scom": { + "type": "integer", + "description": "Count of alerts of \"SCOM\"" + }, + "nagios": { + "type": "integer", + "description": "Count of alerts of \"Nagios\"" + }, + "infrastructure Insights": { + "type": "integer", + "description": "Count of alerts of \"Infrastructure Insights\"" + }, + "activityLog Administrative": { + "type": "integer", + "description": "Count of alerts of \"ActivityLog Administrative\"" + }, + "activityLog Security": { + "type": "integer", + "description": "Count of alerts of \"ActivityLog Security\"" + }, + "activityLog Recommendation": { + "type": "integer", + "description": "Count of alerts of \"ActivityLog Recommendation\"" + }, + "activityLog Policy": { + "type": "integer", + "description": "Count of alerts of \"ActivityLog Policy\"" + }, + "activityLog Autoscale": { + "type": "integer", + "description": "Count of alerts of \"ActivityLog Autoscale\"" + }, + "serviceHealth": { + "type": "integer", + "description": "Count of alerts of \"ServiceHealth\"" + }, + "smartDetector": { + "type": "integer", + "description": "Count of alerts of \"Smart Detector\"" + } + } + }, + "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." + } + } + }, + "scope": { + "type": "object", + "description": "Target scope for a given action rule. By default scope will be the subscription. User can also provide list of resource groups or list of resources from the scope subscription as well.", + "properties": { + "type": { + "type": "string", + "description": "type of target scope", + "enum": [ + "ResourceGroup", + "Resource" + ], + "x-ms-enum": { + "name": "ScopeType", + "modelAsString": true + } + }, + "values": { + "type": "array", + "description": "list of ARM IDs of the given scope type which will be the target of the given action rule.", + "items": { + "type": "string" + } + } + } + }, + "condition": { + "type": "object", + "description": "condition to trigger an action rule", + "properties": { + "operator": { + "type": "string", + "description": "operator for a given condition", + "enum": [ + "Equals", + "NotEquals", + "Contains", + "DoesNotContain" + ], + "x-ms-enum": { + "name": "ScopeType", + "modelAsString": true + } + }, + "values": { + "type": "array", + "description": "list of values to match for a given condition.", + "items": { + "type": "string" + } + } + } + }, + "conditions": { + "type": "object", + "description": "Conditions in alert instance to be matched for a given action rule. Default value is all. Multiple values could be provided with comma separation.", + "properties": { + "severity": { + "$ref": "#/definitions/condition" + }, + "monitorService": { + "$ref": "#/definitions/condition" + }, + "monitorCondition": { + "$ref": "#/definitions/condition" + }, + "signalType": { + "$ref": "#/definitions/condition" + }, + "targetResource": { + "$ref": "#/definitions/condition" + }, + "targetResourceGroup": { + "$ref": "#/definitions/condition" + }, + "targetResourceType": { + "$ref": "#/definitions/condition" + }, + "alertRuleId": { + "$ref": "#/definitions/condition" + }, + "description": { + "$ref": "#/definitions/condition" + }, + "logAnalyticsSearchResults": { + "$ref": "#/definitions/condition" + }, + "applicationInsightsSearchResults": { + "$ref": "#/definitions/condition" + } + } + }, + "suppressionConfig": { + "type": "object", + "discriminator": "recurrenceType", + "description": "Suppression logic for a given action rule", + "required": [ + "recurrenceType" + ], + "properties": { + "recurrenceType": { + "type": "string", + "description": "Specifies when the suppression should be applied", + "enum": [ + "Always", + "Once", + "Daily", + "Weekly", + "Monthly" + ], + "x-ms-enum": { + "name": "SuppressionType", + "modelAsString": true + } + }, + "schedule": { + "$ref": "#/definitions/suppressionSchedule" + } + } + }, + "suppressionSchedule": { + "type": "object", + "description": "Schedule for a given suppression configuration.", + "properties": { + "startDate": { + "type": "string", + "description": "Start date for suppression" + }, + "endDate": { + "type": "string", + "description": "End date for suppression" + }, + "startTime": { + "type": "string", + "description": "Start time for suppression" + }, + "endTime": { + "type": "string", + "description": "End date for suppression" + }, + "recurrenceValues": { + "type": "array", + "description": "Specifies the values for recurrence pattern", + "items": { + "type": "integer" + } + } + } + }, + "actionRule": { + "description": "Action rule object containing target scope, conditions and suppression logic", + "allOf": [ + { + "$ref": "#/definitions/ManagedResource" + } + ], + "properties": { + "properties": { + "$ref": "#/definitions/actionRuleProperties" + } + } + }, + "actionRuleProperties": { + "description": "Action rule properties defining scope, conditions, suppression logic for action rule", + "properties": { + "scope": { + "$ref": "#/definitions/scope" + }, + "conditions": { + "$ref": "#/definitions/conditions" + }, + "suppressionConfig": { + "$ref": "#/definitions/suppressionConfig" + }, + "description": { + "type": "string", + "description": "Description of action rule" + }, + "resourceGroup": { + "type": "string", + "description": "Resource group where action rule is stored", + "readOnly": true + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "Creation time of action rule. Date-Time in ISO-8601 format.", + "readOnly": true + }, + "lastModifiedAt": { + "type": "string", + "format": "date-time", + "description": "Last updated time of action rule. Date-Time in ISO-8601 format.", + "readOnly": true + }, + "createdBy": { + "type": "string", + "description": "Created by user name.", + "readOnly": true + }, + "lastModifiedBy": { + "type": "string", + "description": "Last modified by user name.", + "readOnly": true + }, + "status": { + "type": "string", + "description": "Indicates if the given action rule is enabled or disabled", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "ActionRuleStatus", + "modelAsString": true + } + } + } + }, + "actionRulesList": { + "description": "List of action rules", + "properties": { + "nextLink": { + "type": "string", + "description": "URL to fetch the next set of action rules" + }, + "value": { + "type": "array", + "description": "List of action rules", + "items": { + "$ref": "#/definitions/actionRule" + } + } + } + }, + "patchObject": { + "description": "Properties supported by patch", + "properties": { + "status": { + "type": "string", + "description": "Indicates if the given action rule is enabled or disabled", + "enum": [ + "enabled", + "disabled" + ], + "x-ms-enum": { + "name": "ActionRuleStatus", + "modelAsString": true + } + }, + "tags": { + "type": "object", + "description": "tags to be updated" + } + } + } + } +} \ No newline at end of file diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_Create.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_Create.json new file mode 100644 index 000000000000..0b4141b3d087 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_Create.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2018-11-02-privatepreview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroup": "alertscorrelationrg", + "actionRuleName": "DailySuppression", + "actionRule": { + "location": "Global", + "tags": {}, + "properties": { + "scope": { + "type": "ResourceGroup", + "values": ["/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg"] + }, + "conditions": { + "severity": { + "operator": "Equals", + "values": [ "Sev0", "Sev2" ] + }, + "monitorService": { + "operator": "Equals", + "values":[ "Platform", "Application Insights" ] + }, + "monitorCondition": { + "operator": "Equals", + "values":[ "Fired" ] + }, + "targetResourceType": { + "operator": "NotEquals", + "values":[ "Microsoft.Compute/VirtualMachines" ] + } + }, + "suppressionConfig": { + "recurrenceType" : "Daily", + "schedule": { + "startDate": "12/09/2018", + "endDate": "12/18/2018", + "startTime": "06:00:00", + "endTime": "14:00:00" + }, + }, + "description": "Action rule on resource group for daily suppression", + "resourceGroup": "alertscorrelationrg", + "status": "enabled" + } + } + }, + "responses": { + "200": { + "body": { + "properties":{ + "scope": { + "type": "ResourceGroup", + "values": ["/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg"] + }, + "conditions": { + "severity": { + "operator": "Equals", + "values": [ "Sev0", "Sev2" ] + }, + "monitorService": { + "operator": "Equals", + "values":[ "Platform", "Application Insights" ] + }, + "monitorCondition": { + "operator": "Equals", + "values":[ "Fired" ] + }, + "targetResourceType": { + "operator": "NotEquals", + "values":[ "Microsoft.Compute/VirtualMachines" ] + } + }, + "suppressionConfig": { + "recurrenceType" : "Daily", + "schedule": { + "startDate": "12/09/2018", + "endDate": "12/18/2018", + "startTime": "06:00:00", + "endTime": "14:00:00" + } + }, + "description": "Action rule on resource group for daily suppression", + "resourceGroup": "alertscorrelationrg", + "status": "enabled", + "startDateTime":"2018-06-12T22:05:09Z", + "lastModifiedDateTime":"2018-06-12T22:05:09Z", + "createdUserName":"abc@microsoft.com", + "lastModifiedUserName":"xyz@microsoft.com" + }, + "id":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "type":"Microsoft.AlertsManagement/actionRules", + "name":"DailySuppression", + "location": "Global", + "tags": {} + } + } + } +} + diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_Delete.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_Delete.json new file mode 100644 index 000000000000..c172fa0febef --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_Delete.json @@ -0,0 +1,14 @@ +{ + "parameters": { + "api-version": "2018-11-02-privatepreview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroup": "alertscorrelationrg", + "actionRuleName": "DailySuppression", + }, + "responses": { + "200": { + "body": true + } + } +} + diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_GetById.json new file mode 100644 index 000000000000..8f71d7768461 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_GetById.json @@ -0,0 +1,60 @@ +{ + "parameters": { + "api-version": "2018-11-02-privatepreview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroup": "alertscorrelationrg", + "actionRuleName": "DailySuppression" + }, + "responses": { + "200": { + "body": { + "properties":{ + "scope": { + "type": "ResourceGroup", + "values": ["/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg"] + }, + "conditions": { + "severity": { + "operator": "Equals", + "values": [ "Sev0", "Sev2" ] + }, + "monitorService": { + "operator": "Equals", + "values":[ "Platform", "Application Insights" ] + }, + "monitorCondition": { + "operator": "Equals", + "values":[ "Fired" ] + }, + "targetResourceType": { + "operator": "NotEquals", + "values":[ "Microsoft.Compute/VirtualMachines" ] + } + }, + "suppressionConfig": { + "recurrenceType" : "Daily", + "schedule": { + "startDate": "12/09/2018", + "endDate": "12/18/2018", + "startTime": "06:00:00", + "endTime": "14:00:00" + } + }, + "description": "Action rule on resource group for daily suppression", + "resourceGroup": "alertscorrelationrg", + "status": "enabled", + "createdAt":"2018-06-12T22:05:09Z", + "lastModifiedAt":"2018-06-12T22:05:09Z", + "createdBy":"abc@microsoft.com", + "lastModifiedBy":"xyz@microsoft.com" + }, + "id":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "type":"Microsoft.AlertsManagement/actionRules", + "name":"DailySuppression", + "location": "Global", + "tags": {} + } + } + } +} + diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_List_ResourceGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_List_ResourceGroup.json new file mode 100644 index 000000000000..94d0c89ad3bf --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_List_ResourceGroup.json @@ -0,0 +1,104 @@ +{ + "parameters": { + "api-version": "2018-11-02-privatepreview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroup": "alertscorrelationrg" + }, + "responses": { + "200": { + "body": { + "nextLink":"https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules?api-version=2018-11-02-privatepreview&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "properties":{ + "scope": { + "type": "ResourceGroup", + "values": ["/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg"] + }, + "conditions": { + "severity": { + "operator": "Equals", + "values": [ "Sev0", "Sev2" ] + }, + "monitorService": { + "operator": "Equals", + "values":[ "Platform", "Application Insights" ] + }, + "targetResourceType": { + "operator": "NotEquals", + "values":[ "Microsoft.Compute/VirtualMachines" ] + } + }, + "suppressionConfig": { + "recurrenceType" : "Daily", + "schedule": { + "startDate": "12/09/2018", + "endDate": "12/18/2018", + "startTime": "06:00:00", + "endTime": "14:00:00" + } + }, + "description": "Action rule on resource group for daily suppression", + "resourceGroup": "alertscorrelationrg", + "status": "enabled", + "createdAt":"2018-06-12T22:05:09Z", + "lastModifiedAt":"2018-06-12T22:05:09Z", + "createdBy":"abc@microsoft.com", + "lastModifiedBy":"xyz@microsoft.com" + }, + "id":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "type":"Microsoft.AlertsManagement/actionRules", + "name":"DailySuppression", + "location": "Global", + "tags": {} + }, + { + "properties":{ + "scope": { + "type": "Resource", + "values": ["/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource"] + }, + "conditions": { + "monitorCondition": { + "operator": "Equals", + "values": [ "Fired" ] + }, + "description": { + "operator": "Contains", + "values":[ "Percentage CPU greater than 80%", "Metric alert on resource foo" ] + }, + "targetResource": { + "operator": "DoesNotContain", + "values":[ "testresource", "foo" ] + } + }, + "suppressionConfig": { + "recurrenceType" : "Weekly", + "schedule": { + "startDate": "12/09/2018", + "endDate": "12/18/2018", + "startTime": "19:00:00", + "endTime": "10:00:00", + "recurrenceValues": [ 0, 3, 6 ] + } + }, + "description": "Action rule on resource group for weekly suppression", + "resourceGroup": "alertscorrelationrg", + "status": "enabled", + "createdAt":"2018-06-12T22:05:09Z", + "lastModifiedAt":"2018-06-12T22:05:09Z", + "createdBy":"abc@microsoft.com", + "lastModifiedBy":"xyz@microsoft.com" + }, + "id":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "type":"Microsoft.AlertsManagement/actionRules", + "name":"WeeklySuppression", + "location": "Global", + "tags": {} + } + ] + } + } + } +} + diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_List_Subscription.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_List_Subscription.json new file mode 100644 index 000000000000..5d5bbf2be548 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_List_Subscription.json @@ -0,0 +1,99 @@ +{ + "parameters": { + "api-version": "2018-11-02-privatepreview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "nextLink":"https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/actionRules?api-version=2018-11-02-privatepreview&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "properties":{ + "scope": { + "type": "ResourceGroup", + "values": ["/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg"] + }, + "conditions": { + "severity": { + "operator": "Equals", + "values": [ "Sev0", "Sev2" ] + }, + "monitorService": { + "operator": "Equals", + "values":[ "Platform", "Application Insights" ] + }, + "targetResourceType": { + "operator": "NotEquals", + "values":[ "Microsoft.Compute/VirtualMachines" ] + } + }, + "suppressionConfig": { + "recurrenceType" : "Daily", + "schedule": { + "startDate": "12/09/2018", + "endDate": "12/18/2018", + "startTime": "06:00:00", + "endTime": "14:00:00" + } + }, + "description": "Action rule on resource group for daily suppression", + "resourceGroup": "alertscorrelationrg", + "status": "enabled", + "createdAt":"2018-06-12T22:05:09Z", + "lastModifiedAt":"2018-06-12T22:05:09Z", + "createdBy":"abc@microsoft.com", + "lastModifiedBy":"xyz@microsoft.com" + }, + "id":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "type":"Microsoft.AlertsManagement/actionRules", + "name":"DailySuppression", + "location": "Global", + "tags": {} + }, + { + "properties":{ + "scope": { + "type": "Resource", + "values": ["/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.Compute/VirtualMachines/testResource"] + }, + "conditions": { + "monitorCondition": { + "operator": "Equals", + "values": [ "Fired" ] + }, + "description": { + "operator": "Contains", + "values":[ "Percentage CPU greater than 80%", "Metric alert on resource foo" ] + } + }, + "suppressionConfig": { + "recurrenceType" : "Weekly", + "schedule": { + "startDate": "12/09/2018", + "endDate": "12/18/2018", + "startTime": "19:00:00", + "endTime": "10:00:00", + "recurrenceValues": [ 0, 3, 6 ] + } + }, + "description": "Action rule on resource group for weekly suppression", + "resourceGroup": "alertsrg", + "status": "enabled", + "createdAt":"2018-06-12T22:05:09Z", + "lastModifiedAt":"2018-06-12T22:05:09Z", + "createdBy":"abc@microsoft.com", + "lastModifiedBy":"xyz@microsoft.com" + }, + "id":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/WeeklySuppression", + "type":"Microsoft.AlertsManagement/actionRules", + "name":"WeeklySuppression", + "location": "Global", + "tags": {} + } + ] + } + } + } +} + diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_Patch.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_Patch.json new file mode 100644 index 000000000000..52adeedd67e9 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/ActionRules_Patch.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2018-11-02-privatepreview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d", + "resourceGroup": "alertscorrelationrg", + "actionRuleName": "DailySuppression", + "actionRulePatch": { + "tags": { "key1": "value1", "key2": "value2" }, + "properties": { + "status": "disabled" + } + } + }, + "responses": { + "200": { + "body": { + "properties":{ + "scope": { + "type": "ResourceGroup", + "values": ["/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg"] + }, + "conditions": { + "severity": { + "operator": "Equals", + "values": [ "Sev0", "Sev2" ] + }, + "monitorService": { + "operator": "Equals", + "values":[ "Platform", "Application Insights" ] + }, + "targetResourceType": { + "operator": "NotEquals", + "values":[ "Microsoft.Compute/VirtualMachines" ] + } + }, + "suppressionConfig": { + "recurrenceType" : "Daily", + "schedule": { + "startDate": "12/09/2018", + "endDate": "12/18/2018", + "startTime": "06:00:00", + "endTime": "14:00:00" + } + }, + "description": "Action rule on resource group for daily suppression", + "resourceGroup": "alertscorrelationrg", + "status": "disabled", + "createdAt":"2018-06-12T22:05:09Z", + "lastModifiedAt":"2018-06-12T22:05:09Z", + "createdBy":"abc@microsoft.com", + "lastModifiedBy":"xyz@microsoft.com" + }, + "id":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourceGroups/alertscorrelationrg/providers/Microsoft.AlertsManagement/actionRules/DailySuppression", + "type":"Microsoft.AlertsManagement/actionRules", + "name":"DailySuppression", + "location": "Global", + "tags": { "key1": "value1", "key2": "value2" } + } + } + } +} + diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_ChangeState.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_ChangeState.json new file mode 100644 index 000000000000..b77a6029fb67 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_ChangeState.json @@ -0,0 +1,38 @@ +{ + "parameters": { + "api-version": "2018-05-05-preview", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a", + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "newState": "Acknowledged", + "body":{ + "comments" : "Acknowledging alert" + } + }, + "responses": { + "200": { + "body": { + "properties": { + "severity":"Sev3", + "signalType":"Log", + "alertState":"New", + "monitorCondition":"Fired", + "monitorService":"Application Insights", + "targetResourceName":"alertscorrelationworkerrole_int", + "targetResourceGroup":"alertscorrelationrg", + "targetResource":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "targetResourceType":"components", + "sourceCreatedId":"57c049b5-9654-4bb4-a443-3bac3f725d34", + "smartGroupId":"a808445e-bb38-4751-85c2-1b109ccc1059", + "smartGroupingReason":"Alerts that frequently occur together have been grouped.", + "startDateTime":"2018-06-12T22:05:09Z", + "lastModifiedDateTime":"2018-06-12T22:05:09Z", + "lastModifiedUserName":"vikramm@microsoft.com", + "payload":{} + }, + "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/2018-11-02-privatepreview/examples/Alerts_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_GetById.json new file mode 100644 index 000000000000..e86cf49039d2 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_GetById.json @@ -0,0 +1,36 @@ +{ + "parameters": { + "api-version": "2018-05-05-preview", + "subscriptionId": "9e261de7-c804-4b9d-9ebf-6f50fe350a9a", + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100" + }, + "responses": { + "200": { + "body": { + + "properties":{ + "severity":"Sev3", + "signalType":"Log", + "alertState":"New", + "monitorCondition":"Fired", + "monitorService":"Application Insights", + "targetResourceName":"alertscorrelationworkerrole_int", + "targetResourceGroup":"alertscorrelationrg", + "targetResource":"/subscriptions/dd91de05-d791-4ceb-b6dc-988682dc7d72/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "targetResourceType":"components", + "sourceCreatedId":"57c049b5-9654-4bb4-a443-3bac3f725d34", + "smartGroupId":"a808445e-bb38-4751-85c2-1b109ccc1059", + "smartGroupingReason":"Alerts that frequently occur together have been grouped.", + "startDateTime":"2018-06-12T22:05:09Z", + "lastModifiedDateTime":"2018-06-12T22:05:09Z", + "lastModifiedUserName":"System", + "payload":{} + }, + "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/2018-11-02-privatepreview/examples/Alerts_History.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_History.json new file mode 100644 index 000000000000..2305f2aa9598 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_History.json @@ -0,0 +1,40 @@ +{ + "parameters": { + "api-version": "2018-05-05-preview", + "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/preview/2018-11-02-privatepreview/examples/Alerts_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_List.json new file mode 100644 index 000000000000..ae3b603b6b98 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_List.json @@ -0,0 +1,62 @@ +{ + "parameters": { + "api-version": "2018-05-05-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "nextLink":"https://management.azure.com:443/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alerts?api-version=2018-05-05-preview&timeRange=1d&ctoken=%2bRID%3aPlwOAPHEGwB9UwEAAAAgCw%3d%3d%23RT%3a2%23TRC%3a500%23RTD%3aqtQyMDE4LTA2LTEyVDE1OjEyOjE1", + "value": [ + { + "properties":{ + "severity":"Sev3", + "signalType":"Log", + "alertState":"New", + "monitorCondition":"Fired", + "monitorService":"Application Insights", + "targetResourceName":"alertscorrelationworkerrole_int", + "targetResourceGroup":"alertscorrelationrg", + "targetResource":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "targetResourceType":"components", + "sourceCreatedId":"57c049b5-9654-4bb4-a443-3bac3f725d34", + "smartGroupId":"a808445e-bb38-4751-85c2-1b109ccc1059", + "smartGroupingReason":"Alerts that frequently occur together have been grouped.", + "startDateTime":"2018-06-12T22:05:09Z", + "lastModifiedDateTime":"2018-06-12T22:05:09Z", + "lastModifiedUserName":"System", + "payload":{} + }, + "id":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100", + "type":"Microsoft.AlertsManagement/alerts", + "name":"cpu alert" + }, + { + "properties":{ + "severity":"Sev3", + "signalType":"Log", + "alertState":"New", + "monitorCondition":"Fired", + "monitorService":"Application Insights", + "targetResourceName":"alertscorrelationworkerrole_int", + "targetResourceGroup":"alertscorrelationrg", + "targetResource":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/resourcegroups/alertscorrelationrg/providers/microsoft.insights/components/alertscorrelationworkerrole_int", + "targetResourceType":"components", + "sourceCreatedId":"e1c5c974-b796-46a1-bb59-740eeca48c15", + "smartGroupId":"a808445e-bb38-4751-85c2-1b109ccc1059", + "smartGroupingReason":"Alerts that frequently occur together have been grouped.", + "startDateTime":"2018-06-12T21:40:09Z", + "lastModifiedDateTime":"2018-06-12T21:40:09Z", + "lastModifiedUserName":"System", + "payload":{} + }, + "id":"/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alerts/239f0e9f-9871-4c8b-a6a2-b893853d1066", + "type":"Microsoft.AlertsManagement/alerts", + "name":"cpu alert" + } + ] + } + } + } +} + diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_Summary.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_Summary.json new file mode 100644 index 000000000000..06f70e61e736 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/Alerts_Summary.json @@ -0,0 +1,90 @@ +{ + "parameters": { + "api-version": "2018-05-05-preview", + "subscriptionId": "1e3ff1c0-771a-4119-a03b-be82a51e232d" + }, + "responses": { + "200": { + "body": { + "properties":{ + "total":885, + "smartGroupsCount":2, + "summaryByState":{ + "new":884, + "acknowledged":1, + "closed":0 + }, + "summaryBySeverity":{ + "sev0":{ + "new":286, + "acknowledged":0, + "closed":0 + }, + "sev1":{ + "new":309, + "acknowledged":0, + "closed":0 + }, + "sev2":{ + "new":0, + "acknowledged":0, + "closed":0 + }, + "sev3":{ + "new":289, + "acknowledged":1, + "closed":0 + }, + "sev4":{ + "new":0, + "acknowledged":0, + "closed":0 + } + }, + "summaryBySeverityAndMonitorCondition":{ + "sev0":{ + "fired":286, + "resolved":0 + }, + "sev1":{ + "fired":309, + "resolved":0 + }, + "sev2":{ + "fired":0, + "resolved":0 + }, + "sev3":{ + "fired":290, + "resolved":0 + }, + "sev4":{ + "fired":0, + "resolved":0 + } + }, + "summaryByMonitorService":{ + "platform":0, + "application Insights":290, + "log Analytics":595, + "zabbix":0, + "scom":0, + "nagios":0, + "infrastructure Insights":0, + "activityLog Administrative":0, + "activityLog Security":0, + "activityLog Recommendation":0, + "activityLog Policy":0, + "activityLog Autoscale":0, + "serviceHealth":0, + "smartDetector":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/2018-11-02-privatepreview/examples/SmartGroups_ChangeState.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_ChangeState.json new file mode 100644 index 000000000000..f620cdb8fad5 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_ChangeState.json @@ -0,0 +1,75 @@ +{ + "parameters": { + "api-version": "2018-05-05-preview", + "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" + } + } + } +} + diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_GetById.json new file mode 100644 index 000000000000..41967911e018 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_GetById.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2018-05-05-preview", + "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" + } + } + } +} + diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_History.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_History.json new file mode 100644 index 000000000000..8388cabc6940 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_History.json @@ -0,0 +1,31 @@ +{ + "parameters": { + "api-version": "2018-05-05-preview", + "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/preview/2018-11-02-privatepreview/examples/SmartGroups_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_List.json new file mode 100644 index 000000000000..582e9b137ec5 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/preview/2018-11-02-privatepreview/examples/SmartGroups_List.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2018-05-05-preview", + "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" + } + ] + } + } + } +} +