From 7c721328a78bb37c1b572dc35a40dabfc8c3d401 Mon Sep 17 00:00:00 2001 From: Noam Dishon <30979046+dishonono@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:35:25 +0300 Subject: [PATCH 01/12] Adds base for updating Microsoft.AlertsManagement from version stable/2019-06-01 to version 2021-04-01 --- .../SmartDetectorAlertRulesApi.json | 659 ++++++++++++++++++ ...SmartDetectorAlertRule_CreateOrUpdate.json | 92 +++ .../SmartDetectorAlertRule_Delete.json | 12 + .../examples/SmartDetectorAlertRule_Get.json | 39 ++ .../examples/SmartDetectorAlertRule_List.json | 67 ++ ...DetectorAlertRule_ListByResourceGroup.json | 67 ++ .../SmartDetectorAlertRule_Patch.json | 50 ++ 7 files changed, 986 insertions(+) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Delete.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_List.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_ListByResourceGroup.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Patch.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json new file mode 100644 index 000000000000..8afcd4fab926 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json @@ -0,0 +1,659 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Alerts Management Service Resource Provider", + "description": "APIs for Azure Smart Detector Alert Rules CRUD operations.", + "version": "2019-06-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "security": [ + { + "azure_auth": [ + "user_impersonation" + ] + } + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules": { + "get": { + "tags": [ + "SmartDetectorAlertRules" + ], + "operationId": "SmartDetectorAlertRules_List", + "description": "List all the existing Smart Detector alert rules within the subscription.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ExpandDetectorParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SmartDetectorErrorResponse" + } + }, + "200": { + "description": "Successful request to list Smart Detector alert rules.", + "schema": { + "$ref": "#/definitions/AlertRulesList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List Smart Detector alert rules": { + "$ref": "./examples/SmartDetectorAlertRule_List.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules": { + "get": { + "tags": [ + "SmartDetectorAlertRules" + ], + "operationId": "SmartDetectorAlertRules_ListByResourceGroup", + "description": "List all the existing Smart Detector alert rules within the subscription and resource group.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ExpandDetectorParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SmartDetectorErrorResponse" + } + }, + "200": { + "description": "Successful request to list Smart Detector alert rules.", + "schema": { + "$ref": "#/definitions/AlertRulesList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "List alert rules": { + "$ref": "./examples/SmartDetectorAlertRule_ListByResourceGroup.json" + } + } + } + }, + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}": { + "get": { + "tags": [ + "SmartDetectorAlertRules" + ], + "operationId": "SmartDetectorAlertRules_Get", + "description": "Get a specific Smart Detector alert rule.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/AlertRuleNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ExpandDetectorParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SmartDetectorErrorResponse" + } + }, + "200": { + "description": "Successful request to get Smart Detector alert rule.", + "schema": { + "$ref": "#/definitions/AlertRule" + } + } + }, + "x-ms-examples": { + "Get a Smart Detector alert rule": { + "$ref": "./examples/SmartDetectorAlertRule_Get.json" + } + } + }, + "put": { + "tags": [ + "SmartDetectorAlertRules" + ], + "operationId": "SmartDetectorAlertRules_CreateOrUpdate", + "description": "Create or update a Smart Detector alert rule.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/AlertRuleNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "description": "Parameters supplied to the operation.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AlertRule" + } + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SmartDetectorErrorResponse" + } + }, + "200": { + "description": "Successful request to update a Smart Detector alert rule.", + "schema": { + "$ref": "#/definitions/AlertRule" + } + }, + "201": { + "description": "Successful request to create a Smart Detector alert rule.", + "schema": { + "$ref": "#/definitions/AlertRule" + } + } + }, + "x-ms-examples": { + "Create or update a Smart Detector alert rule": { + "$ref": "./examples/SmartDetectorAlertRule_CreateOrUpdate.json" + } + } + }, + "patch": { + "tags": [ + "SmartDetectorAlertRules" + ], + "operationId": "SmartDetectorAlertRules_Patch", + "description": "Patch a specific Smart Detector alert rule.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/AlertRuleNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "parameters", + "description": "Parameters supplied to the operation.", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AlertRulePatchObject" + } + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SmartDetectorErrorResponse" + } + }, + "200": { + "description": "Successful request to patch Smart Detector alert rule.", + "schema": { + "$ref": "#/definitions/AlertRule" + } + } + }, + "x-ms-examples": { + "Patch alert rules": { + "$ref": "./examples/SmartDetectorAlertRule_Patch.json" + } + } + }, + "delete": { + "tags": [ + "SmartDetectorAlertRules" + ], + "operationId": "SmartDetectorAlertRules_Delete", + "description": "Delete an existing Smart Detector alert rule.", + "parameters": [ + { + "$ref": "#/parameters/subscriptionId" + }, + { + "$ref": "#/parameters/ResourceGroupNameParameter" + }, + { + "$ref": "#/parameters/AlertRuleNameParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/SmartDetectorErrorResponse" + } + }, + "200": { + "description": "Successful request to delete a Smart Detector alert rule." + }, + "204": { + "description": "The Smart Detector alert rule does not exist. It may have already been deleted." + } + }, + "x-ms-examples": { + "Delete a Smart Detector alert rule": { + "$ref": "./examples/SmartDetectorAlertRule_Delete.json" + } + } + } + } + }, + "definitions": { + "SmartDetectorErrorResponse": { + "description": "Describe the format of an Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "ActionGroupsInformation": { + "properties": { + "customEmailSubject": { + "description": "An optional custom email subject to use in email notifications.", + "type": "string" + }, + "customWebhookPayload": { + "description": "An optional custom web-hook payload to use in web-hook notifications.", + "type": "string" + }, + "groupIds": { + "description": "The Action Group resource IDs.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": [ + "groupIds" + ], + "description": "The Action Groups information, used by the alert rule." + }, + "ThrottlingInformation": { + "properties": { + "duration": { + "description": "The required duration (in ISO8601 format) to wait before notifying on the alert rule again. The time granularity must be in minutes and minimum value is 0 minutes", + "type": "string", + "format": "duration" + } + }, + "description": "Optional throttling information for the alert rule." + }, + "AzureResource": { + "type": "object", + "properties": { + "id": { + "description": "The resource ID.", + "readOnly": true, + "type": "string" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "The resource type." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "The resource name." + }, + "location": { + "type": "string", + "description": "The resource location.", + "default": "global" + }, + "tags": { + "type": "object", + "description": "The resource tags.", + "additionalProperties": { + "type": "string" + } + } + }, + "x-ms-azure-resource": true, + "description": "An Azure resource object" + }, + "AlertRule": { + "allOf": [ + { + "$ref": "#/definitions/AzureResource" + } + ], + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AlertRuleProperties", + "description": "The properties of the alert rule." + } + }, + "description": "The alert rule information" + }, + "AlertRulesList": { + "description": "List of Smart Detector alert rules.", + "properties": { + "value": { + "description": "List of Smart Detector alert rules.", + "type": "array", + "items": { + "$ref": "#/definitions/AlertRule" + } + }, + "nextLink": { + "type": "string", + "description": "The URL to get the next set of results." + } + } + }, + "AlertRulePatchObject": { + "properties": { + "id": { + "description": "The resource ID.", + "readOnly": true, + "type": "string" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "The resource type." + }, + "name": { + "type": "string", + "readOnly": true, + "description": "The resource name." + }, + "tags": { + "type": "object", + "description": "The resource tags.", + "additionalProperties": { + "type": "string" + } + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AlertRulePatchProperties", + "description": "The properties of the alert rule.", + "minProperties": 1 + } + }, + "description": "The alert rule patch information" + }, + "Detector": { + "properties": { + "id": { + "type": "string", + "description": "The detector id." + }, + "parameters": { + "description": "The detector's parameters.'", + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "name": { + "description": "The Smart Detector name. By default this is not populated, unless it's specified in expandDetector", + "type": "string" + }, + "description": { + "type": "string", + "description": "The Smart Detector description. By default this is not populated, unless it's specified in expandDetector" + }, + "supportedResourceTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The Smart Detector supported resource types. By default this is not populated, unless it's specified in expandDetector" + }, + "imagePaths": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The Smart Detector image path. By default this is not populated, unless it's specified in expandDetector" + } + }, + "required": [ + "id" + ], + "description": "The detector information. By default this is not populated, unless it's specified in expandDetector" + }, + "AlertRuleProperties": { + "properties": { + "description": { + "description": "The alert rule description.", + "type": "string" + }, + "state": { + "description": "The alert rule state.", + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "AlertRuleState", + "modelAsString": true + } + }, + "severity": { + "description": "The alert rule severity.", + "type": "string", + "enum": [ + "Sev0", + "Sev1", + "Sev2", + "Sev3", + "Sev4" + ], + "x-ms-enum": { + "name": "Severity", + "modelAsString": true + } + }, + "frequency": { + "description": "The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 5 minutes.", + "type": "string", + "format": "duration" + }, + "detector": { + "description": "The alert rule's detector.", + "$ref": "#/definitions/Detector" + }, + "scope": { + "description": "The alert rule resources scope.", + "type": "array", + "items": { + "type": "string" + } + }, + "actionGroups": { + "description": "The alert rule actions.", + "$ref": "#/definitions/ActionGroupsInformation" + }, + "throttling": { + "description": "The alert rule throttling information.", + "$ref": "#/definitions/ThrottlingInformation" + } + }, + "required": [ + "state", + "severity", + "frequency", + "detector", + "scope", + "actionGroups" + ], + "description": "The alert rule properties." + }, + "AlertRulePatchProperties": { + "properties": { + "description": { + "description": "The alert rule description.", + "type": "string" + }, + "state": { + "description": "The alert rule state.", + "type": "string", + "enum": [ + "Enabled", + "Disabled" + ], + "x-ms-enum": { + "name": "AlertRuleState", + "modelAsString": true + } + }, + "severity": { + "description": "The alert rule severity.", + "type": "string", + "enum": [ + "Sev0", + "Sev1", + "Sev2", + "Sev3", + "Sev4" + ], + "x-ms-enum": { + "name": "Severity", + "modelAsString": true + } + }, + "frequency": { + "description": "The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 5 minutes.", + "type": "string", + "format": "duration" + }, + "actionGroups": { + "description": "The alert rule actions.", + "$ref": "#/definitions/ActionGroupsInformation" + }, + "throttling": { + "description": "The alert rule throttling information.", + "$ref": "#/definitions/ThrottlingInformation" + } + }, + "description": "The alert rule properties." + } + }, + "parameters": { + "subscriptionId": { + "name": "subscriptionId", + "in": "path", + "required": true, + "type": "string", + "description": "The ID of the target subscription.", + "minLength": 1 + }, + "ResourceGroupNameParameter": { + "name": "resourceGroupName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the resource group.", + "x-ms-parameter-location": "method" + }, + "AlertRuleNameParameter": { + "name": "alertRuleName", + "in": "path", + "required": true, + "type": "string", + "description": "The name of the alert rule.", + "x-ms-parameter-location": "method" + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + }, + "ExpandDetectorParameter": { + "name": "expandDetector", + "in": "query", + "type": "boolean", + "description": "Indicates if Smart Detector should be expanded.", + "x-ms-parameter-location": "method" + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json new file mode 100644 index 000000000000..635505e2f36b --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json @@ -0,0 +1,92 @@ +{ + "parameters": { + "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", + "resourceGroupName": "MyAlertRules", + "alertRuleName": "MyAlertRule", + "api-version": "2019-06-01", + "parameters": { + "properties": { + "description": "Sample smart detector alert rule description", + "state": "Enabled", + "severity": "Sev3", + "frequency": "PT5M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" + ], + "actionGroups": { + "customEmailSubject": "My custom email subject", + "customWebhookPayload": "{\"AlertRuleName\":\"#alertrulename\"}", + "groupIds": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup" + ] + }, + "throttling": { + "duration": "PT20M" + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule", + "type": "Microsoft.AlertsManagement/smartDetectorAlertRules", + "name": "MyAlertRule", + "location": "global", + "tags": {}, + "properties": { + "description": "Sample smart detector alert rule description", + "state": "Enabled", + "severity": "Sev3", + "frequency": "PT5M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" + ], + "actionGroups": [ + { + "actionGroupId": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup" + } + ], + "throttling": { + "duration": "PT20M" + } + } + } + }, + "201": { + "body": { + "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule", + "type": "Microsoft.AlertsManagement/smartDetectorAlertRules", + "name": "MyAlertRule", + "location": "global", + "tags": {}, + "properties": { + "description": "Sample smart detector alert rule description", + "state": "Enabled", + "severity": "Sev3", + "frequency": "PT5M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" + ], + "actionGroups": [ + { + "actionGroupId": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup" + } + ], + "throttling": { + "duration": "PT20M" + } + } + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Delete.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Delete.json new file mode 100644 index 000000000000..f929164fc5c2 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Delete.json @@ -0,0 +1,12 @@ +{ + "parameters": { + "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", + "resourceGroupName": "MyAlertRules", + "alertRuleName": "MyAlertRule", + "api-version": "2019-06-01" + }, + "responses": { + "200": {}, + "204": {} + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json new file mode 100644 index 000000000000..c7e975931c6a --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", + "resourceGroupName": "MyAlertRules", + "alertRuleName": "MyAlertRule", + "api-version": "2019-06-01" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule", + "type": "Microsoft.AlertsManagement/smartDetectorAlertRules", + "name": "MyAlertRule", + "location": "global", + "tags": {}, + "properties": { + "description": "Sample smart detector alert rule description", + "state": "Enabled", + "severity": "Sev3", + "frequency": "PT5M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" + ], + "actionGroups": [ + { + "actionGroupId": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup" + } + ], + "throttling": { + "duration": "PT20M" + } + } + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_List.json new file mode 100644 index 000000000000..adc1644e7f9c --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_List.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", + "resourceGroupName": "MyAlertRules", + "api-version": "2019-06-01" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule", + "type": "Microsoft.AlertsManagement/smartDetectorAlertRules", + "name": "MyAlertRule", + "location": "global", + "tags": {}, + "properties": { + "description": "Sample smart detector alert rule description", + "state": "Enabled", + "severity": "Sev3", + "frequency": "PT5M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm1" + ], + "actionGroups": [ + { + "actionGroupId": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup" + } + ], + "throttling": { + "duration": "PT20M" + } + } + }, + { + "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MySecondAlertRule", + "type": "Microsoft.AlertsManagement/smartDetectorAlertRules", + "name": "MySecondAlertRule", + "location": "global", + "tags": {}, + "properties": { + "description": "Sample smart detector alert rule description", + "state": "Disabled", + "severity": "Sev2", + "frequency": "PT15M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/vms/providers/Microsoft.Compute/virtualMachines/vm2" + ], + "actionGroups": [ + { + "actionGroupId": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_ListByResourceGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_ListByResourceGroup.json new file mode 100644 index 000000000000..8283132d39fe --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_ListByResourceGroup.json @@ -0,0 +1,67 @@ +{ + "parameters": { + "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", + "resourceGroupName": "MyAlertRules", + "api-version": "2019-06-01" + }, + "responses": { + "200": { + "body": { + "nextLink": null, + "value": [ + { + "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule", + "type": "Microsoft.AlertsManagement/smartDetectorAlertRules", + "name": "MyAlertRule", + "location": "global", + "tags": {}, + "properties": { + "description": "Sample smart detector alert rule description", + "state": "Enabled", + "severity": "Sev3", + "frequency": "PT5M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default" + ], + "actionGroups": [ + { + "actionGroupId": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup" + } + ], + "throttling": { + "duration": "PT20M" + } + } + }, + { + "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MySecondAlertRule", + "type": "Microsoft.AlertsManagement/smartDetectorAlertRules", + "name": "MySecondAlertRule", + "location": "global", + "tags": {}, + "properties": { + "description": "Sample smart detector alert rule description", + "state": "Disabled", + "severity": "Sev2", + "frequency": "PT15M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b324c52b-4073-4807-93af-e07d289c093e/resourceGroups/test/providers/Microsoft.Storage/storageAccounts/larryshoebox/blobServices/default" + ], + "actionGroups": [ + { + "actionGroupId": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/MyActionGroups/providers/microsoft.insights/actionGroups/MyActionGroup" + } + ] + } + } + ] + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Patch.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Patch.json new file mode 100644 index 000000000000..ab4de65dc113 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Patch.json @@ -0,0 +1,50 @@ +{ + "parameters": { + "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", + "resourceGroupName": "MyAlertRules", + "alertRuleName": "MyAlertRule", + "api-version": "2019-06-01", + "parameters": { + "tags": { + "newKey": "newVal" + }, + "properties": { + "description": "New description for patching", + "frequency": "PT1M" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyAlertRules/providers/microsoft.alertsManagement/smartDetectorAlertRules/MyAlertRule", + "type": "Microsoft.AlertsManagement/smartDetectorAlertRules", + "name": "MyAlertRule", + "location": "global", + "tags": { + "newKey": "newVal" + }, + "properties": { + "description": "New description for patching", + "state": "Enabled", + "severity": "Sev3", + "frequency": "PT1M", + "detector": { + "id": "VMMemoryLeak" + }, + "scope": [ + "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" + ], + "actionGroups": [ + { + "actionGroupId": "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourcegroups/actionGroups/providers/microsoft.insights/actiongroups/MyActionGroup" + } + ], + "throttling": { + "duration": "PT20M" + } + } + } + } + } +} From e2e3b145e24c91c3bc933e3a7602da05118aa575 Mon Sep 17 00:00:00 2001 From: Noam Dishon <30979046+dishonono@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:35:45 +0300 Subject: [PATCH 02/12] Updates readme --- .../alertsmanagement/resource-manager/readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 61382bb09f41..7d28cd9bd85e 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -45,6 +45,15 @@ tag: package-2019-06-preview ``` + +### Tag: package-2021-04 + +These settings apply only when `--tag=package-2021-04` is specified on the command line. + +```yaml $(tag) == 'package-2021-04' +input-file: + - Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json +``` ### Tag: package-preview-2021-01 These settings apply only when `--tag=package-preview-2021-01` is specified on the command line. From a3fd5ec43d1198c519540b65fd669f69f3a16725 Mon Sep 17 00:00:00 2001 From: Noam Dishon <30979046+dishonono@users.noreply.github.com> Date: Mon, 12 Apr 2021 14:35:46 +0300 Subject: [PATCH 03/12] Updates API version in new specs and examples --- .../stable/2021-04-01/SmartDetectorAlertRulesApi.json | 2 +- .../examples/SmartDetectorAlertRule_CreateOrUpdate.json | 2 +- .../2021-04-01/examples/SmartDetectorAlertRule_Delete.json | 2 +- .../stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json | 2 +- .../stable/2021-04-01/examples/SmartDetectorAlertRule_List.json | 2 +- .../examples/SmartDetectorAlertRule_ListByResourceGroup.json | 2 +- .../2021-04-01/examples/SmartDetectorAlertRule_Patch.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json index 8afcd4fab926..8856c29f658b 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json @@ -3,7 +3,7 @@ "info": { "title": "Azure Alerts Management Service Resource Provider", "description": "APIs for Azure Smart Detector Alert Rules CRUD operations.", - "version": "2019-06-01" + "version": "2021-04-01" }, "host": "management.azure.com", "schemes": [ diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json index 635505e2f36b..8eeb0cbc7eb1 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json @@ -3,7 +3,7 @@ "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", "resourceGroupName": "MyAlertRules", "alertRuleName": "MyAlertRule", - "api-version": "2019-06-01", + "api-version": "2021-04-01", "parameters": { "properties": { "description": "Sample smart detector alert rule description", diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Delete.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Delete.json index f929164fc5c2..e643abd765c2 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Delete.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Delete.json @@ -3,7 +3,7 @@ "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", "resourceGroupName": "MyAlertRules", "alertRuleName": "MyAlertRule", - "api-version": "2019-06-01" + "api-version": "2021-04-01" }, "responses": { "200": {}, diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json index c7e975931c6a..c6ab35d9b6ae 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json @@ -3,7 +3,7 @@ "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", "resourceGroupName": "MyAlertRules", "alertRuleName": "MyAlertRule", - "api-version": "2019-06-01" + "api-version": "2021-04-01" }, "responses": { "200": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_List.json index adc1644e7f9c..44790632e009 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_List.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_List.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", "resourceGroupName": "MyAlertRules", - "api-version": "2019-06-01" + "api-version": "2021-04-01" }, "responses": { "200": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_ListByResourceGroup.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_ListByResourceGroup.json index 8283132d39fe..ab7783902c79 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_ListByResourceGroup.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_ListByResourceGroup.json @@ -2,7 +2,7 @@ "parameters": { "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", "resourceGroupName": "MyAlertRules", - "api-version": "2019-06-01" + "api-version": "2021-04-01" }, "responses": { "200": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Patch.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Patch.json index ab4de65dc113..9ece49807712 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Patch.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Patch.json @@ -3,7 +3,7 @@ "subscriptionId": "b368ca2f-e298-46b7-b0ab-012281956afa", "resourceGroupName": "MyAlertRules", "alertRuleName": "MyAlertRule", - "api-version": "2019-06-01", + "api-version": "2021-04-01", "parameters": { "tags": { "newKey": "newVal" From 52a20d3661a9836ee05023ed0d59f4f8b0a7fc10 Mon Sep 17 00:00:00 2001 From: Noam Dishon Date: Mon, 12 Apr 2021 15:35:05 +0300 Subject: [PATCH 04/12] first commit --- .../stable/2021-04-01/AlertsManagement.json | 117 ++++++++++++++++++ .../SmartDetectorAlertRulesApi.json | 109 ++++++++++++++-- ...SmartDetectorAlertRule_CreateOrUpdate.json | 22 +++- .../examples/SmartDetectorAlertRule_Get.json | 11 +- 4 files changed, 247 insertions(+), 12 deletions(-) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json new file mode 100644 index 000000000000..59d347c1f4f6 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json @@ -0,0 +1,117 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-04-01", + "title": "Azure Alerts Management Service Resource Provider", + "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.AlertsManagement/operations": { + "get": { + "operationId": "Operations_List", + "description": "List all operations available through Azure Alerts Management Resource Provider.", + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved operations list.", + "schema": { + "$ref": "#/definitions/operationsList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + } + }, + "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 operations.", + "type": "string" + }, + "value": { + "description": "Array of operations", + "type": "array", + "items": { + "$ref": "#/definitions/operation" + } + } + }, + "required": [ + "value" + ] + } + }, + "parameters": { + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json index 8856c29f658b..07e3642c0ae2 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json @@ -34,7 +34,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules": { + "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartDetectorAlertRules": { "get": { "tags": [ "SmartDetectorAlertRules" @@ -76,7 +76,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/smartDetectorAlertRules": { "get": { "tags": [ "SmartDetectorAlertRules" @@ -121,7 +121,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/smartDetectorAlertRules/{alertRuleName}": { "get": { "tags": [ "SmartDetectorAlertRules" @@ -313,7 +313,18 @@ }, "definitions": { "SmartDetectorErrorResponse": { - "description": "Describe the format of an Error response.", + "description": "API error.", + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/SmartDetectorErrorResponseBody", + "description": "The API error body.", + "x-ms-client-flatten": true + } + } + }, + "SmartDetectorErrorResponseBody": { + "description": "API error body.", "type": "object", "properties": { "code": { @@ -471,26 +482,48 @@ } }, "name": { - "description": "The Smart Detector name. By default this is not populated, unless it's specified in expandDetector", - "type": "string" + "type": "string", + "readOnly": true, + "description": "The Smart Detector name." }, "description": { "type": "string", - "description": "The Smart Detector description. By default this is not populated, unless it's specified in expandDetector" + "readOnly": true, + "description": "The Smart Detector description." }, "supportedResourceTypes": { "type": "array", + "readOnly": true, "items": { "type": "string" }, - "description": "The Smart Detector supported resource types. By default this is not populated, unless it's specified in expandDetector" + "description": "The Smart Detector supported resource types." }, "imagePaths": { "type": "array", + "readOnly": true, "items": { "type": "string" }, "description": "The Smart Detector image path. By default this is not populated, unless it's specified in expandDetector" + }, + "parameterDefinitions": { + "type": "array", + "readOnly": true, + "description": "The Smart Detector parameters definitions.'", + "items": { + "type": "object", + "$ref": "#/definitions/DetectorParameterDefinition" + } + }, + "supportedCadences": { + "type": "array", + "readOnly": true, + "description": "The Smart Detector supported cadences.", + "items": { + "type": "integer", + "format": "int32" + } } }, "required": [ @@ -532,7 +565,7 @@ } }, "frequency": { - "description": "The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 5 minutes.", + "description": "The alert rule frequency in ISO8601 format. The time granularity must be in minutes and minimum value is 1 minute, depending on the detector.", "type": "string", "format": "duration" }, @@ -614,6 +647,64 @@ } }, "description": "The alert rule properties." + }, + "DetectorParameterDefinition": { + "properties": { + "name": { + "description": "The detector parameter name.", + "type": "string" + }, + "displayName": { + "description": "The detector parameter display name.", + "type": "string" + }, + "description": { + "description": "The detector parameter description.", + "type": "string" + }, + "type": { + "description": "The alert rule type.", + "type": "string", + "enum": [ + "String", + "Integer", + "Double", + "Boolean", + "DateTime" + ], + "x-ms-enum": { + "name": "DetectorParameterType", + "values": [ + { + "value": "String", + "description": "Defines a string parameter." + }, + { + "value": "Integer", + "description": "Defines an integer parameter." + }, + { + "value": "Double", + "description": "Defines a double parameter." + }, + { + "value": "Boolean", + "description": "Defines a boolean parameter." + }, + { + "value": "DateTime", + "description": "Defines a DateTime parameter." + } + ], + "modelAsString": true + } + }, + "isMandatory": { + "description": "A value indicating whether this detector parameter is mandatory.", + "type": "boolean" + } + }, + "description": "The alert rule properties." } }, "parameters": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json index 8eeb0cbc7eb1..0221c7f24e15 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json @@ -43,7 +43,16 @@ "severity": "Sev3", "frequency": "PT5M", "detector": { - "id": "VMMemoryLeak" + "id": "VMMemoryLeak", + "name": "Memory Leak in VM", + "description": "Alerts on a consistent increase in memory consumption over a long period of time", + "supportedCadences": [ + 1 + ], + "supportedResourceTypes": [ + "VirtualMachine" + ], + "parameterDefinitions": [] }, "scope": [ "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" @@ -72,7 +81,16 @@ "severity": "Sev3", "frequency": "PT5M", "detector": { - "id": "VMMemoryLeak" + "id": "VMMemoryLeak", + "name": "Memory Leak in VM", + "description": "Alerts on a consistent increase in memory consumption over a long period of time", + "supportedCadences": [ + 1 + ], + "supportedResourceTypes": [ + "VirtualMachine" + ], + "parameterDefinitions": [] }, "scope": [ "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json index c6ab35d9b6ae..ce73878725a3 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_Get.json @@ -19,7 +19,16 @@ "severity": "Sev3", "frequency": "PT5M", "detector": { - "id": "VMMemoryLeak" + "id": "VMMemoryLeak", + "name": "Memory Leak in VM", + "description": "Alerts on a consistent increase in memory consumption over a long period of time", + "supportedCadences": [ + 1 + ], + "supportedResourceTypes": [ + "VirtualMachine" + ], + "parameterDefinitions": [] }, "scope": [ "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" From 7139b788258b8c6ff5c88b995076eb539b34d1ff Mon Sep 17 00:00:00 2001 From: Noam Dishon Date: Mon, 12 Apr 2021 16:01:37 +0300 Subject: [PATCH 05/12] some fixes --- ...SmartDetectorAlertRule_CreateOrUpdate.json | 22 ++----------------- .../resource-manager/readme.md | 1 + 2 files changed, 3 insertions(+), 20 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json index 0221c7f24e15..8eeb0cbc7eb1 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/SmartDetectorAlertRule_CreateOrUpdate.json @@ -43,16 +43,7 @@ "severity": "Sev3", "frequency": "PT5M", "detector": { - "id": "VMMemoryLeak", - "name": "Memory Leak in VM", - "description": "Alerts on a consistent increase in memory consumption over a long period of time", - "supportedCadences": [ - 1 - ], - "supportedResourceTypes": [ - "VirtualMachine" - ], - "parameterDefinitions": [] + "id": "VMMemoryLeak" }, "scope": [ "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" @@ -81,16 +72,7 @@ "severity": "Sev3", "frequency": "PT5M", "detector": { - "id": "VMMemoryLeak", - "name": "Memory Leak in VM", - "description": "Alerts on a consistent increase in memory consumption over a long period of time", - "supportedCadences": [ - 1 - ], - "supportedResourceTypes": [ - "VirtualMachine" - ], - "parameterDefinitions": [] + "id": "VMMemoryLeak" }, "scope": [ "/subscriptions/b368ca2f-e298-46b7-b0ab-012281956afa/resourceGroups/MyVms/providers/Microsoft.Compute/virtualMachines/vm1" diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 7d28cd9bd85e..499538c15e37 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -52,6 +52,7 @@ These settings apply only when `--tag=package-2021-04` is specified on the comma ```yaml $(tag) == 'package-2021-04' input-file: + - Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json - Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json ``` ### Tag: package-preview-2021-01 From ac14ecb6a0868af6155d6c13ea5b28f3160ef073 Mon Sep 17 00:00:00 2001 From: Noam Dishon Date: Tue, 13 Apr 2021 12:02:18 +0300 Subject: [PATCH 06/12] try without alert management --- .../stable/2021-04-01/AlertsManagement.json | 117 ------------------ .../resource-manager/readme.md | 1 - 2 files changed, 118 deletions(-) delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json deleted file mode 100644 index 59d347c1f4f6..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json +++ /dev/null @@ -1,117 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-04-01", - "title": "Azure Alerts Management Service Resource Provider", - "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/providers/Microsoft.AlertsManagement/operations": { - "get": { - "operationId": "Operations_List", - "description": "List all operations available through Azure Alerts Management Resource Provider.", - "parameters": [ - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully retrieved operations list.", - "schema": { - "$ref": "#/definitions/operationsList" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - } - }, - "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 operations.", - "type": "string" - }, - "value": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/operation" - } - } - }, - "required": [ - "value" - ] - } - }, - "parameters": { - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "Client Api Version." - } - } -} diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 499538c15e37..7d28cd9bd85e 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -52,7 +52,6 @@ These settings apply only when `--tag=package-2021-04` is specified on the comma ```yaml $(tag) == 'package-2021-04' input-file: - - Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json - Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json ``` ### Tag: package-preview-2021-01 From 5dc928e7c6e6e5a27bc699d5b7c13316a48b3a2d Mon Sep 17 00:00:00 2001 From: Noam Dishon Date: Tue, 13 Apr 2021 14:57:34 +0300 Subject: [PATCH 07/12] revert change to name of namespace --- .../stable/2021-04-01/SmartDetectorAlertRulesApi.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json index 07e3642c0ae2..33e2868e70a3 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json @@ -34,7 +34,7 @@ } }, "paths": { - "/subscriptions/{subscriptionId}/providers/Microsoft.AlertsManagement/smartDetectorAlertRules": { + "/subscriptions/{subscriptionId}/providers/microsoft.alertsManagement/smartDetectorAlertRules": { "get": { "tags": [ "SmartDetectorAlertRules" @@ -76,7 +76,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/smartDetectorAlertRules": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules": { "get": { "tags": [ "SmartDetectorAlertRules" @@ -121,7 +121,7 @@ } } }, - "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.AlertsManagement/smartDetectorAlertRules/{alertRuleName}": { + "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/microsoft.alertsManagement/smartDetectorAlertRules/{alertRuleName}": { "get": { "tags": [ "SmartDetectorAlertRules" From d9c9b09b17539f7e35f1625f58288cc0dd55d9b4 Mon Sep 17 00:00:00 2001 From: Noam Dishon Date: Sun, 25 Apr 2021 10:35:40 +0300 Subject: [PATCH 08/12] Resolve lintdiff issues --- .../stable/2021-04-01/AlertsManagement.json | 1464 +++++++++++++++++ .../SmartDetectorAlertRulesApi.json | 7 +- .../AlertsMetaData_MonitorService.json | 89 + .../examples/Alerts_ChangeState.json | 43 + .../2021-04-01/examples/Alerts_GetById.json | 39 + .../2021-04-01/examples/Alerts_History.json | 39 + .../2021-04-01/examples/Alerts_List.json | 71 + .../2021-04-01/examples/Alerts_Summary.json | 118 ++ .../resource-manager/readme.md | 7 +- 9 files changed, 1871 insertions(+), 6 deletions(-) create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/AlertsMetaData_MonitorService.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_ChangeState.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_GetById.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_History.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_List.json create mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_Summary.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json new file mode 100644 index 000000000000..25105f15a95a --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json @@ -0,0 +1,1464 @@ +{ + "swagger": "2.0", + "info": { + "version": "2021-04-01", + "title": "Azure Alerts Management Service Resource Provider", + "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "securityDefinitions": { + "azure_auth": { + "type": "oauth2", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "flow": "implicit", + "description": "Azure Active Directory OAuth2 Flow", + "scopes": { + "user_impersonation": "impersonate your user account" + } + } + }, + "paths": { + "/providers/Microsoft.AlertsManagement/operations": { + "get": { + "operationId": "Operations_List", + "description": "List all operations available through Azure Alerts Management Resource Provider.", + "parameters": [ + { + "$ref": "#/parameters/api-version" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK. Successfully retrieved operations list.", + "schema": { + "$ref": "#/definitions/operationsList" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.AlertsManagement/alertsMetaData": { + "get": { + "operationId": "Alerts_MetaData", + "description": "List alerts meta data information based on value of identifier parameter.", + "parameters": [ + { + "$ref": "#/parameters/api-version" + }, + { + "$ref": "#/parameters/identifier" + } + ], + "produces": [ + "application/json" + ], + "responses": { + "200": { + "description": "OK. Successfully listed alert meta data.", + "schema": { + "$ref": "#/definitions/alertsMetaData" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/AlertsManagementErrorResponse" + } + } + }, + "x-ms-examples": { + "MonService": { + "$ref": "./examples/AlertsMetaData_MonitorService.json" + } + } + } + }, + "/{scope}/providers/Microsoft.AlertsManagement/alerts": { + "get": { + "operationId": "Alerts_GetAll", + "description": "List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. ", + "parameters": [ + { + "$ref": "#/parameters/scope" + }, + { + "$ref": "#/parameters/targetResource" + }, + { + "$ref": "#/parameters/targetResourceType" + }, + { + "$ref": "#/parameters/targetResourceGroup" + }, + { + "$ref": "#/parameters/monitorService" + }, + { + "$ref": "#/parameters/monitorCondition" + }, + { + "$ref": "#/parameters/severity" + }, + { + "$ref": "#/parameters/alertState" + }, + { + "$ref": "#/parameters/alertRule" + }, + { + "$ref": "#/parameters/smartGroupIdFilter" + }, + { + "$ref": "#/parameters/includeContext" + }, + { + "$ref": "#/parameters/includeEgressConfig" + }, + { + "$ref": "#/parameters/pageCount" + }, + { + "$ref": "#/parameters/alertsSortBy" + }, + { + "$ref": "#/parameters/sortOrder" + }, + { + "$ref": "#/parameters/select" + }, + { + "$ref": "#/parameters/timeRange" + }, + { + "$ref": "#/parameters/customTimeRange" + }, + { + "$ref": "#/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/AlertsManagementErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "x-ms-examples": { + "ListAlerts": { + "$ref": "./examples/Alerts_List.json" + } + } + } + }, + "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}": { + "get": { + "operationId": "Alerts_GetById", + "summary": "Get a specific alert.", + "description": "Get information related to a specific alert. If scope is a deleted resource then please use scope as parent resource of the delete resource. For example if my alert id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/alerts/{alertId}' and 'vm1' is deleted then if you want to get alert by id then use parent resource of scope. So in this example get alert by id call will look like this: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AlertsManagement/alerts/{alertId}'.", + "produces": [ + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/scope" + }, + { + "$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/AlertsManagementErrorResponse" + } + } + }, + "x-ms-examples": { + "GetById": { + "$ref": "./examples/Alerts_GetById.json" + } + } + } + }, + "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate": { + "post": { + "operationId": "Alerts_ChangeState", + "description": "Change the state of an alert. If scope is a deleted resource then please use scope as parent resource of the delete resource. For example if my alert id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/alerts/{alertId}' and 'vm1' is deleted then if you want to change state of this particular alert then use parent resource of scope. So in this example change state call will look like this: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AlertsManagement/alerts/{alertId}'.", + "parameters": [ + { + "$ref": "#/parameters/scope" + }, + { + "$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/AlertsManagementErrorResponse" + } + } + }, + "x-ms-examples": { + "Resolve": { + "$ref": "./examples/Alerts_ChangeState.json" + } + } + } + }, + "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history": { + "get": { + "operationId": "Alerts_GetHistory", + "description": "Get the history of an alert, which captures any monitor condition changes (Fired/Resolved), alert state changes (New/Acknowledged/Closed) and applied action rules for that particular alert. If scope is a deleted resource then please use scope as parent resource of the delete resource. For example if my alert id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/alerts/{alertId}' and 'vm1' is deleted then if you want to get history of this particular alert then use parent resource of scope. So in this example get history call will look like this: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history'.", + "parameters": [ + { + "$ref": "#/parameters/scope" + }, + { + "$ref": "#/parameters/alertId" + }, + { + "$ref": "#/parameters/api-version" + } + ], + "responses": { + "200": { + "description": "OK. Returns the history of the specified alert.", + "schema": { + "$ref": "#/definitions/alertModification" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/AlertsManagementErrorResponse" + } + } + }, + "x-ms-examples": { + "Resolve": { + "$ref": "./examples/Alerts_History.json" + } + } + } + }, + "/{scope}/providers/Microsoft.AlertsManagement/alertsSummary": { + "get": { + "operationId": "Alerts_GetSummary", + "description": "Get a summarized count of your alerts grouped by various parameters (e.g. grouping by 'Severity' returns the count of alerts for each severity).", + "parameters": [ + { + "$ref": "#/parameters/scope" + }, + { + "$ref": "#/parameters/alertsSummaryGroupBy" + }, + { + "$ref": "#/parameters/includeSmartGroupsCount" + }, + { + "$ref": "#/parameters/targetResource" + }, + { + "$ref": "#/parameters/targetResourceType" + }, + { + "$ref": "#/parameters/targetResourceGroup" + }, + { + "$ref": "#/parameters/monitorService" + }, + { + "$ref": "#/parameters/monitorCondition" + }, + { + "$ref": "#/parameters/severity" + }, + { + "$ref": "#/parameters/alertState" + }, + { + "$ref": "#/parameters/alertRule" + }, + { + "$ref": "#/parameters/timeRange" + }, + { + "$ref": "#/parameters/customTimeRange" + }, + { + "$ref": "#/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/AlertsManagementErrorResponse" + } + } + }, + "x-ms-examples": { + "Summary": { + "$ref": "./examples/Alerts_Summary.json" + } + } + } + } + }, + "parameters": { + "scope": { + "name": "scope", + "description": "scope here is resourceId for which alert is created.", + "type": "string", + "in": "path", + "required": true, + "x-ms-skip-url-encoding": true, + "x-ms-parameter-location": "client" + }, + "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-05" + ], + "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 generates the alert instance. Default value is select all.", + "name": "monitorService", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "enum": [ + "Application Insights", + "ActivityLog Administrative", + "ActivityLog Security", + "ActivityLog Recommendation", + "ActivityLog Policy", + "ActivityLog Autoscale", + "Log Analytics", + "Nagios", + "Platform", + "SCOM", + "ServiceHealth", + "SmartDetector", + "VM Insights", + "Zabbix", + "Resource Health" + ], + "x-ms-enum": { + "name": "MonitorService", + "modelAsString": true + } + }, + "severity": { + "description": "Filter by severity. Default value is select all.", + "name": "severity", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "enum": [ + "Sev0", + "Sev1", + "Sev2", + "Sev3", + "Sev4" + ], + "x-ms-enum": { + "name": "Severity", + "modelAsString": true + } + }, + "smartGroupIdFilter": { + "description": "Filter the alerts list by the Smart Group Id. Default value is none.", + "name": "smartGroupId", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "smartGroupId": { + "description": "Smart group unique id. ", + "name": "smartGroupId", + "type": "string", + "in": "path", + "required": true, + "x-ms-parameter-location": "method" + }, + "newState": { + "description": "New state of the alert.", + "name": "newState", + "type": "string", + "in": "query", + "required": true, + "x-ms-parameter-location": "method", + "enum": [ + "New", + "Acknowledged", + "Closed" + ], + "x-ms-enum": { + "name": "AlertState", + "modelAsString": true + } + }, + "alertState": { + "description": "Filter by state of the alert instance. Default value is to select all.", + "name": "alertState", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "enum": [ + "New", + "Acknowledged", + "Closed" + ], + "x-ms-enum": { + "name": "AlertState", + "modelAsString": true + } + }, + "smartGroupState": { + "description": "Filter by state of the smart group. Default value is to select all.", + "name": "smartGroupState", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "enum": [ + "New", + "Acknowledged", + "Closed" + ], + "x-ms-enum": { + "name": "AlertState", + "modelAsString": true + } + }, + "monitorCondition": { + "description": "Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.", + "name": "monitorCondition", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "enum": [ + "Fired", + "Resolved" + ], + "x-ms-enum": { + "name": "MonitorCondition", + "modelAsString": true + } + }, + "alertRule": { + "description": "Filter by specific alert rule. Default value is to select all.", + "name": "alertRule", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "timeRange": { + "description": "Filter by time range by below listed values. Default value is 1 day.", + "name": "timeRange", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "enum": [ + "1h", + "1d", + "7d", + "30d" + ], + "x-ms-enum": { + "name": "TimeRange", + "modelAsString": true + } + }, + "customTimeRange": { + "description": "Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.", + "name": "customTimeRange", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "includeContext": { + "description": "Include context which has contextual data specific to the monitor service. Default value is false'", + "name": "includeContext", + "type": "boolean", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "includeEgressConfig": { + "description": "Include egress config which would be used for displaying the content in portal. Default value is 'false'.", + "name": "includeEgressConfig", + "type": "boolean", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "includeSmartGroupsCount": { + "description": "Include count of the SmartGroups as part of the summary. Default value is 'false'.", + "name": "includeSmartGroupsCount", + "type": "boolean", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "pageCount": { + "description": "Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.", + "name": "pageCount", + "type": "integer", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "alertsSortBy": { + "description": "Sort the query results by input field, Default value is 'lastModifiedDateTime'.", + "name": "sortBy", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method", + "enum": [ + "name", + "severity", + "alertState", + "monitorCondition", + "targetResource", + "targetResourceName", + "targetResourceGroup", + "targetResourceType", + "startDateTime", + "lastModifiedDateTime" + ], + "x-ms-enum": { + "name": "AlertsSortByFields", + "modelAsString": true + } + }, + "alertsSummaryGroupBy": { + "description": "This parameter allows the result set to be grouped by input fields. 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 separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section.", + "name": "select", + "type": "string", + "in": "query", + "required": false, + "x-ms-parameter-location": "method" + }, + "identifier": { + "name": "identifier", + "description": "Identification of the information to be retrieved by API call.", + "type": "string", + "in": "query", + "required": true, + "enum": [ + "MonitorServiceList" + ], + "x-ms-enum": { + "name": "identifier", + "modelAsString": true + }, + "x-ms-parameter-location": "method" + } + }, + "definitions": { + "operation": { + "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" + ] + }, + "AlertsManagementErrorResponse": { + "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" + } + } + } + }, + "ProxyResource": { + "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/ProxyResource" + } + ], + "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": "Information specific to the monitor service that gives more contextual details about the alert.", + "readOnly": true + }, + "essentials": { + "type": "object", + "description": "This object contains consistent fields across different monitor services.", + "properties": { + "severity": { + "type": "string", + "description": "Severity of alert Sev0 being highest and Sev4 being lowest.", + "readOnly": true, + "enum": [ + "Sev0", + "Sev1", + "Sev2", + "Sev3", + "Sev4" + ], + "x-ms-enum": { + "name": "Severity", + "modelAsString": true + } + }, + "signalType": { + "type": "string", + "description": "The type of signal the alert is based on, which could be metrics, logs or activity logs.", + "readOnly": true, + "enum": [ + "Metric", + "Log", + "Unknown" + ], + "x-ms-enum": { + "name": "SignalType", + "modelAsString": true + } + }, + "alertState": { + "type": "string", + "description": "Alert object state, which can be modified by the user.", + "readOnly": true, + "enum": [ + "New", + "Acknowledged", + "Closed" + ], + "x-ms-enum": { + "name": "AlertState", + "modelAsString": true + } + }, + "monitorCondition": { + "type": "string", + "description": "Can be 'Fired' or 'Resolved', which represents whether the underlying conditions have crossed the defined alert rule thresholds.", + "readOnly": true, + "enum": [ + "Fired", + "Resolved" + ], + "x-ms-enum": { + "name": "MonitorCondition", + "modelAsString": true + } + }, + "targetResource": { + "type": "string", + "description": "Target ARM resource, on which alert got created." + }, + "targetResourceName": { + "type": "string", + "description": "Name of the target ARM resource name, on which alert got created." + }, + "targetResourceGroup": { + "type": "string", + "description": "Resource group of target ARM resource, on which alert got created." + }, + "targetResourceType": { + "type": "string", + "description": "Resource type of target ARM resource, on which alert got created." + }, + "monitorService": { + "type": "string", + "description": "Monitor service on which the rule(monitor) is set.", + "readOnly": true, + "enum": [ + "Application Insights", + "ActivityLog Administrative", + "ActivityLog Security", + "ActivityLog Recommendation", + "ActivityLog Policy", + "ActivityLog Autoscale", + "Log Analytics", + "Nagios", + "Platform", + "SCOM", + "ServiceHealth", + "SmartDetector", + "VM Insights", + "Zabbix", + "Resource Health" + ], + "x-ms-enum": { + "name": "MonitorService", + "modelAsString": true + } + }, + "alertRule": { + "type": "string", + "description": "Rule(monitor) which fired alert instance. Depending on the monitor service, this would be ARM id or name of the rule.", + "readOnly": true + }, + "sourceCreatedId": { + "type": "string", + "description": "Unique Id created by monitor service for each alert instance. This could be used to track the issue at the monitor service, in case of Nagios, Zabbix, SCOM etc.", + "readOnly": true + }, + "smartGroupId": { + "type": "string", + "description": "Unique Id of the smart group", + "readOnly": true + }, + "smartGroupingReason": { + "type": "string", + "description": "Verbose reason describing the reason why this alert instance is added to a smart group", + "readOnly": true + }, + "startDateTime": { + "type": "string", + "format": "date-time", + "description": "Creation time(ISO-8601 format) of alert instance.", + "readOnly": true + }, + "lastModifiedDateTime": { + "type": "string", + "format": "date-time", + "description": "Last modification time(ISO-8601 format) of alert instance.", + "readOnly": true + }, + "monitorConditionResolvedDateTime": { + "type": "string", + "format": "date-time", + "description": "Resolved time(ISO-8601 format) of alert instance. This will be updated when monitor service resolves the alert instance because the rule condition is no longer met.", + "readOnly": true + }, + "lastModifiedUserName": { + "type": "string", + "description": "User who last modified the alert, in case of monitor service updates user would be 'system', otherwise name of the user.", + "readOnly": true + } + } + }, + "alertModification": { + "description": "Alert Modification details", + "allOf": [ + { + "$ref": "#/definitions/ProxyResource" + } + ], + "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/ProxyResource" + } + ], + "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/ProxyResource" + } + ], + "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" + } + } + } + }, + "alertsMetaData": { + "description": "alert meta data information.", + "properties": { + "properties": { + "$ref": "#/definitions/alertsMetaDataProperties" + } + } + }, + "alertsMetaDataProperties": { + "description": "alert meta data property bag", + "discriminator": "metadataIdentifier", + "required": [ + "metadataIdentifier" + ], + "properties": { + "metadataIdentifier": { + "type": "string", + "description": "Identification of the information to be retrieved by API call", + "enum": [ + "MonitorServiceList" + ], + "x-ms-enum": { + "name": "metadataIdentifier", + "modelAsString": true + } + } + } + }, + "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/ProxyResource" + } + ], + "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." + } + } + }, + "MonitorServiceList": { + "title": "Monitor service details", + "description": "Monitor service details", + "required": [ + "data" + ], + "allOf": [ + { + "$ref": "#/definitions/alertsMetaDataProperties" + }, + { + "type": "object" + } + ], + "properties": { + "data": { + "description": "Array of operations", + "type": "array", + "items": { + "$ref": "#/definitions/MonitorServiceDetails" + } + } + } + }, + "MonitorServiceDetails": { + "description": "Details of a monitor service", + "properties": { + "name": { + "type": "string", + "description": "Monitor service name" + }, + "displayName": { + "type": "string", + "description": "Monitor service display name" + } + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json index 33e2868e70a3..4f771cd7c4f5 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json @@ -649,6 +649,8 @@ "description": "The alert rule properties." }, "DetectorParameterDefinition": { + "type": "object", + "description": "The detector parameter definition.", "properties": { "name": { "description": "The detector parameter name.", @@ -663,7 +665,7 @@ "type": "string" }, "type": { - "description": "The alert rule type.", + "description": "The detector parameter type.", "type": "string", "enum": [ "String", @@ -703,8 +705,7 @@ "description": "A value indicating whether this detector parameter is mandatory.", "type": "boolean" } - }, - "description": "The alert rule properties." + } } }, "parameters": { diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/AlertsMetaData_MonitorService.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/AlertsMetaData_MonitorService.json new file mode 100644 index 000000000000..6c3586a6e8d4 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/AlertsMetaData_MonitorService.json @@ -0,0 +1,89 @@ +{ + "parameters": { + "api-version": "2021-04-01", + "identifier": "MonitorServiceList" + }, + "responses": { + "200": { + "body": { + "properties": { + "metadataIdentifier": "MonitorServiceList", + "data": [ + { + "name": "ActivityLog Administrative", + "displayName": "Activity Log - Administrative" + }, + { + "name": "ActivityLog Autoscale", + "displayName": "Activity Log - Autoscale" + }, + { + "name": "ActivityLog Policy", + "displayName": "Activity Log - Policy" + }, + { + "name": "ActivityLog Recommendation", + "displayName": "Activity Log - Recommendation" + }, + { + "name": "ActivityLog Security", + "displayName": "Activity Log - Security" + }, + { + "name": "Application Insights", + "displayName": "Application Insights" + }, + { + "name": "Azure Backup", + "displayName": "Azure Backup" + }, + { + "name": "Custom", + "displayName": "Custom" + }, + { + "name": "Data Box Edge", + "displayName": "Data Box Edge" + }, + { + "name": "VM Insights", + "displayName": "VM Insights" + }, + { + "name": "Log Analytics", + "displayName": "Log Analytics" + }, + { + "name": "Nagios", + "displayName": "NAGIOS" + }, + { + "name": "Platform", + "displayName": "Platform" + }, + { + "name": "Resource Health", + "displayName": "Resource Health" + }, + { + "name": "SCOM", + "displayName": "SCOM" + }, + { + "name": "ServiceHealth", + "displayName": "Service Health" + }, + { + "name": "Smart Detector", + "displayName": "SmartDetector" + }, + { + "name": "Zabbix", + "displayName": "ZABBIX" + } + ] + } + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_ChangeState.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_ChangeState.json new file mode 100644 index 000000000000..3a1a648f4d6b --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_ChangeState.json @@ -0,0 +1,43 @@ +{ + "parameters": { + "api-version": "2021-04-01", + "scope": "subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", + "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/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight/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/2021-04-01/examples/Alerts_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_GetById.json new file mode 100644 index 000000000000..6531551f3412 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_GetById.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2021-04-01", + "scope": "subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", + "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/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight/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/2021-04-01/examples/Alerts_History.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_History.json new file mode 100644 index 000000000000..0e12a9eaf724 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_History.json @@ -0,0 +1,39 @@ +{ + "parameters": { + "api-version": "2021-04-01", + "scope": "subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a", + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100" + }, + "responses": { + "200": { + "body": { + "properties": { + "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", + "modifications": [ + { + "modificationEvent": "StateChange", + "oldValue": "New", + "newValue": "Acknowledged", + "modifiedAt": "2018-06-13T06:14:15.7378737Z", + "modifiedBy": "vikramm@microsoft.com", + "comments": "Acknowledging alert", + "description": "State changed from 'New' to 'Acknowledged'" + }, + { + "modificationEvent": "AlertCreated", + "oldValue": "", + "newValue": "", + "modifiedAt": "2018-06-13T06:09:01Z", + "modifiedBy": "System", + "comments": "", + "description": "New Alert Object is created" + } + ] + }, + "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history/default", + "type": "Microsoft.AlertsManagement/alerts", + "name": "CPU Alert" + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_List.json new file mode 100644 index 000000000000..b568afc955df --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_List.json @@ -0,0 +1,71 @@ +{ + "parameters": { + "api-version": "2021-04-01", + "scope": "subscriptions/3b540246-808d-4331-99aa-917b808a9166" + }, + "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/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight/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/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/cind/providers/microsoft.operationalinsights/workspaces/servicedeskwcus/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/2021-04-01/examples/Alerts_Summary.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_Summary.json new file mode 100644 index 000000000000..f6ac3b30a991 --- /dev/null +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_Summary.json @@ -0,0 +1,118 @@ +{ + "parameters": { + "api-version": "2021-04-01", + "scope": "subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d", + "groupby": "severity,alertState" + }, + "responses": { + "200": { + "body": { + "properties": { + "groupedby": "severity", + "smartGroupsCount": 100, + "total": 14189, + "values": [ + { + "name": "Sev0", + "count": 6517, + "groupedby": "alertState", + "values": [ + { + "name": "New", + "count": 6517 + }, + { + "name": "Acknowledged", + "count": 0 + }, + { + "name": "Closed", + "count": 0 + } + ] + }, + { + "name": "Sev1", + "count": 3175, + "groupedby": "alertState", + "values": [ + { + "name": "New", + "count": 3175 + }, + { + "name": "Acknowledged", + "count": 0 + }, + { + "name": "Closed", + "count": 0 + } + ] + }, + { + "name": "Sev2", + "count": 1120, + "groupedby": "alertState", + "values": [ + { + "name": "New", + "count": 1120 + }, + { + "name": "Acknowledged", + "count": 0 + }, + { + "name": "Closed", + "count": 0 + } + ] + }, + { + "name": "Sev3", + "count": 1902, + "groupedby": "alertState", + "values": [ + { + "name": "New", + "count": 1902 + }, + { + "name": "Acknowledged", + "count": 0 + }, + { + "name": "Closed", + "count": 0 + } + ] + }, + { + "name": "Sev4", + "count": 1475, + "groupedby": "alertState", + "values": [ + { + "name": "New", + "count": 1475 + }, + { + "name": "Acknowledged", + "count": 0 + }, + { + "name": "Closed", + "count": 0 + } + ] + } + ] + }, + "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alertsSummary/current", + "type": "Microsoft.AlertsManagement/alertsSummary", + "name": "current" + } + } + } +} diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 7d28cd9bd85e..9856ddfc4ac3 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -46,12 +46,13 @@ tag: package-2019-06-preview -### Tag: package-2021-04 +### Tag: package-2021-04-only -These settings apply only when `--tag=package-2021-04` is specified on the command line. +These settings apply only when `--tag=package-2021-04-only` is specified on the command line. -```yaml $(tag) == 'package-2021-04' +```yaml $(tag) == 'package-2021-04-only' input-file: + - Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json - Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json ``` ### Tag: package-preview-2021-01 From 87a0ed6cd656f2c62ba8627823dfade93460061f Mon Sep 17 00:00:00 2001 From: Noam Dishon Date: Tue, 27 Apr 2021 11:35:35 +0300 Subject: [PATCH 09/12] remove the copy of files and reference alert managment previous version --- .../stable/2021-04-01/AlertsManagement.json | 1464 ----------------- .../AlertsMetaData_MonitorService.json | 89 - .../examples/Alerts_ChangeState.json | 43 - .../2021-04-01/examples/Alerts_GetById.json | 39 - .../2021-04-01/examples/Alerts_History.json | 39 - .../2021-04-01/examples/Alerts_List.json | 71 - .../2021-04-01/examples/Alerts_Summary.json | 118 -- .../resource-manager/readme.md | 2 +- 8 files changed, 1 insertion(+), 1864 deletions(-) delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/AlertsMetaData_MonitorService.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_ChangeState.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_GetById.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_History.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_List.json delete mode 100644 specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_Summary.json diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json deleted file mode 100644 index 25105f15a95a..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json +++ /dev/null @@ -1,1464 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "version": "2021-04-01", - "title": "Azure Alerts Management Service Resource Provider", - "description": "Azure Alerts Management Service provides a single pane of glass of alerts across Azure Monitor." - }, - "host": "management.azure.com", - "schemes": [ - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "securityDefinitions": { - "azure_auth": { - "type": "oauth2", - "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", - "flow": "implicit", - "description": "Azure Active Directory OAuth2 Flow", - "scopes": { - "user_impersonation": "impersonate your user account" - } - } - }, - "paths": { - "/providers/Microsoft.AlertsManagement/operations": { - "get": { - "operationId": "Operations_List", - "description": "List all operations available through Azure Alerts Management Resource Provider.", - "parameters": [ - { - "$ref": "#/parameters/api-version" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully retrieved operations list.", - "schema": { - "$ref": "#/definitions/operationsList" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - } - } - }, - "/providers/Microsoft.AlertsManagement/alertsMetaData": { - "get": { - "operationId": "Alerts_MetaData", - "description": "List alerts meta data information based on value of identifier parameter.", - "parameters": [ - { - "$ref": "#/parameters/api-version" - }, - { - "$ref": "#/parameters/identifier" - } - ], - "produces": [ - "application/json" - ], - "responses": { - "200": { - "description": "OK. Successfully listed alert meta data.", - "schema": { - "$ref": "#/definitions/alertsMetaData" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/AlertsManagementErrorResponse" - } - } - }, - "x-ms-examples": { - "MonService": { - "$ref": "./examples/AlertsMetaData_MonitorService.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts": { - "get": { - "operationId": "Alerts_GetAll", - "description": "List all existing alerts, where the results can be filtered on the basis of multiple parameters (e.g. time range). The results can then be sorted on the basis specific fields, with the default being lastModifiedDateTime. ", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/targetResource" - }, - { - "$ref": "#/parameters/targetResourceType" - }, - { - "$ref": "#/parameters/targetResourceGroup" - }, - { - "$ref": "#/parameters/monitorService" - }, - { - "$ref": "#/parameters/monitorCondition" - }, - { - "$ref": "#/parameters/severity" - }, - { - "$ref": "#/parameters/alertState" - }, - { - "$ref": "#/parameters/alertRule" - }, - { - "$ref": "#/parameters/smartGroupIdFilter" - }, - { - "$ref": "#/parameters/includeContext" - }, - { - "$ref": "#/parameters/includeEgressConfig" - }, - { - "$ref": "#/parameters/pageCount" - }, - { - "$ref": "#/parameters/alertsSortBy" - }, - { - "$ref": "#/parameters/sortOrder" - }, - { - "$ref": "#/parameters/select" - }, - { - "$ref": "#/parameters/timeRange" - }, - { - "$ref": "#/parameters/customTimeRange" - }, - { - "$ref": "#/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/AlertsManagementErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, - "x-ms-examples": { - "ListAlerts": { - "$ref": "./examples/Alerts_List.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}": { - "get": { - "operationId": "Alerts_GetById", - "summary": "Get a specific alert.", - "description": "Get information related to a specific alert. If scope is a deleted resource then please use scope as parent resource of the delete resource. For example if my alert id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/alerts/{alertId}' and 'vm1' is deleted then if you want to get alert by id then use parent resource of scope. So in this example get alert by id call will look like this: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AlertsManagement/alerts/{alertId}'.", - "produces": [ - "application/json" - ], - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$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/AlertsManagementErrorResponse" - } - } - }, - "x-ms-examples": { - "GetById": { - "$ref": "./examples/Alerts_GetById.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/changestate": { - "post": { - "operationId": "Alerts_ChangeState", - "description": "Change the state of an alert. If scope is a deleted resource then please use scope as parent resource of the delete resource. For example if my alert id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/alerts/{alertId}' and 'vm1' is deleted then if you want to change state of this particular alert then use parent resource of scope. So in this example change state call will look like this: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AlertsManagement/alerts/{alertId}'.", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$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/AlertsManagementErrorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_ChangeState.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history": { - "get": { - "operationId": "Alerts_GetHistory", - "description": "Get the history of an alert, which captures any monitor condition changes (Fired/Resolved), alert state changes (New/Acknowledged/Closed) and applied action rules for that particular alert. If scope is a deleted resource then please use scope as parent resource of the delete resource. For example if my alert id is '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.Compute/virtualMachines/vm1/providers/Microsoft.AlertsManagement/alerts/{alertId}' and 'vm1' is deleted then if you want to get history of this particular alert then use parent resource of scope. So in this example get history call will look like this: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroup}/providers/Microsoft.AlertsManagement/alerts/{alertId}/history'.", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertId" - }, - { - "$ref": "#/parameters/api-version" - } - ], - "responses": { - "200": { - "description": "OK. Returns the history of the specified alert.", - "schema": { - "$ref": "#/definitions/alertModification" - } - }, - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/AlertsManagementErrorResponse" - } - } - }, - "x-ms-examples": { - "Resolve": { - "$ref": "./examples/Alerts_History.json" - } - } - } - }, - "/{scope}/providers/Microsoft.AlertsManagement/alertsSummary": { - "get": { - "operationId": "Alerts_GetSummary", - "description": "Get a summarized count of your alerts grouped by various parameters (e.g. grouping by 'Severity' returns the count of alerts for each severity).", - "parameters": [ - { - "$ref": "#/parameters/scope" - }, - { - "$ref": "#/parameters/alertsSummaryGroupBy" - }, - { - "$ref": "#/parameters/includeSmartGroupsCount" - }, - { - "$ref": "#/parameters/targetResource" - }, - { - "$ref": "#/parameters/targetResourceType" - }, - { - "$ref": "#/parameters/targetResourceGroup" - }, - { - "$ref": "#/parameters/monitorService" - }, - { - "$ref": "#/parameters/monitorCondition" - }, - { - "$ref": "#/parameters/severity" - }, - { - "$ref": "#/parameters/alertState" - }, - { - "$ref": "#/parameters/alertRule" - }, - { - "$ref": "#/parameters/timeRange" - }, - { - "$ref": "#/parameters/customTimeRange" - }, - { - "$ref": "#/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/AlertsManagementErrorResponse" - } - } - }, - "x-ms-examples": { - "Summary": { - "$ref": "./examples/Alerts_Summary.json" - } - } - } - } - }, - "parameters": { - "scope": { - "name": "scope", - "description": "scope here is resourceId for which alert is created.", - "type": "string", - "in": "path", - "required": true, - "x-ms-skip-url-encoding": true, - "x-ms-parameter-location": "client" - }, - "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-05" - ], - "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 generates the alert instance. Default value is select all.", - "name": "monitorService", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "Application Insights", - "ActivityLog Administrative", - "ActivityLog Security", - "ActivityLog Recommendation", - "ActivityLog Policy", - "ActivityLog Autoscale", - "Log Analytics", - "Nagios", - "Platform", - "SCOM", - "ServiceHealth", - "SmartDetector", - "VM Insights", - "Zabbix", - "Resource Health" - ], - "x-ms-enum": { - "name": "MonitorService", - "modelAsString": true - } - }, - "severity": { - "description": "Filter by severity. Default value is select all.", - "name": "severity", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "Sev0", - "Sev1", - "Sev2", - "Sev3", - "Sev4" - ], - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "smartGroupIdFilter": { - "description": "Filter the alerts list by the Smart Group Id. Default value is none.", - "name": "smartGroupId", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "smartGroupId": { - "description": "Smart group unique id. ", - "name": "smartGroupId", - "type": "string", - "in": "path", - "required": true, - "x-ms-parameter-location": "method" - }, - "newState": { - "description": "New state of the alert.", - "name": "newState", - "type": "string", - "in": "query", - "required": true, - "x-ms-parameter-location": "method", - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "alertState": { - "description": "Filter by state of the alert instance. Default value is to select all.", - "name": "alertState", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "smartGroupState": { - "description": "Filter by state of the smart group. Default value is to select all.", - "name": "smartGroupState", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "monitorCondition": { - "description": "Filter by monitor condition which is either 'Fired' or 'Resolved'. Default value is to select all.", - "name": "monitorCondition", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "Fired", - "Resolved" - ], - "x-ms-enum": { - "name": "MonitorCondition", - "modelAsString": true - } - }, - "alertRule": { - "description": "Filter by specific alert rule. Default value is to select all.", - "name": "alertRule", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "timeRange": { - "description": "Filter by time range by below listed values. Default value is 1 day.", - "name": "timeRange", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "1h", - "1d", - "7d", - "30d" - ], - "x-ms-enum": { - "name": "TimeRange", - "modelAsString": true - } - }, - "customTimeRange": { - "description": "Filter by custom time range in the format / where time is in (ISO-8601 format)'. Permissible values is within 30 days from query time. Either timeRange or customTimeRange could be used but not both. Default is none.", - "name": "customTimeRange", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "includeContext": { - "description": "Include context which has contextual data specific to the monitor service. Default value is false'", - "name": "includeContext", - "type": "boolean", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "includeEgressConfig": { - "description": "Include egress config which would be used for displaying the content in portal. Default value is 'false'.", - "name": "includeEgressConfig", - "type": "boolean", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "includeSmartGroupsCount": { - "description": "Include count of the SmartGroups as part of the summary. Default value is 'false'.", - "name": "includeSmartGroupsCount", - "type": "boolean", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "pageCount": { - "description": "Determines number of alerts returned per page in response. Permissible value is between 1 to 250. When the \"includeContent\" filter is selected, maximum value allowed is 25. Default value is 25.", - "name": "pageCount", - "type": "integer", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "alertsSortBy": { - "description": "Sort the query results by input field, Default value is 'lastModifiedDateTime'.", - "name": "sortBy", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method", - "enum": [ - "name", - "severity", - "alertState", - "monitorCondition", - "targetResource", - "targetResourceName", - "targetResourceGroup", - "targetResourceType", - "startDateTime", - "lastModifiedDateTime" - ], - "x-ms-enum": { - "name": "AlertsSortByFields", - "modelAsString": true - } - }, - "alertsSummaryGroupBy": { - "description": "This parameter allows the result set to be grouped by input fields. 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 separated) which would be part of the essential section. This would allow to project only the required fields rather than getting entire content. Default is to fetch all the fields in the essentials section.", - "name": "select", - "type": "string", - "in": "query", - "required": false, - "x-ms-parameter-location": "method" - }, - "identifier": { - "name": "identifier", - "description": "Identification of the information to be retrieved by API call.", - "type": "string", - "in": "query", - "required": true, - "enum": [ - "MonitorServiceList" - ], - "x-ms-enum": { - "name": "identifier", - "modelAsString": true - }, - "x-ms-parameter-location": "method" - } - }, - "definitions": { - "operation": { - "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" - ] - }, - "AlertsManagementErrorResponse": { - "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" - } - } - } - }, - "ProxyResource": { - "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/ProxyResource" - } - ], - "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": "Information specific to the monitor service that gives more contextual details about the alert.", - "readOnly": true - }, - "essentials": { - "type": "object", - "description": "This object contains consistent fields across different monitor services.", - "properties": { - "severity": { - "type": "string", - "description": "Severity of alert Sev0 being highest and Sev4 being lowest.", - "readOnly": true, - "enum": [ - "Sev0", - "Sev1", - "Sev2", - "Sev3", - "Sev4" - ], - "x-ms-enum": { - "name": "Severity", - "modelAsString": true - } - }, - "signalType": { - "type": "string", - "description": "The type of signal the alert is based on, which could be metrics, logs or activity logs.", - "readOnly": true, - "enum": [ - "Metric", - "Log", - "Unknown" - ], - "x-ms-enum": { - "name": "SignalType", - "modelAsString": true - } - }, - "alertState": { - "type": "string", - "description": "Alert object state, which can be modified by the user.", - "readOnly": true, - "enum": [ - "New", - "Acknowledged", - "Closed" - ], - "x-ms-enum": { - "name": "AlertState", - "modelAsString": true - } - }, - "monitorCondition": { - "type": "string", - "description": "Can be 'Fired' or 'Resolved', which represents whether the underlying conditions have crossed the defined alert rule thresholds.", - "readOnly": true, - "enum": [ - "Fired", - "Resolved" - ], - "x-ms-enum": { - "name": "MonitorCondition", - "modelAsString": true - } - }, - "targetResource": { - "type": "string", - "description": "Target ARM resource, on which alert got created." - }, - "targetResourceName": { - "type": "string", - "description": "Name of the target ARM resource name, on which alert got created." - }, - "targetResourceGroup": { - "type": "string", - "description": "Resource group of target ARM resource, on which alert got created." - }, - "targetResourceType": { - "type": "string", - "description": "Resource type of target ARM resource, on which alert got created." - }, - "monitorService": { - "type": "string", - "description": "Monitor service on which the rule(monitor) is set.", - "readOnly": true, - "enum": [ - "Application Insights", - "ActivityLog Administrative", - "ActivityLog Security", - "ActivityLog Recommendation", - "ActivityLog Policy", - "ActivityLog Autoscale", - "Log Analytics", - "Nagios", - "Platform", - "SCOM", - "ServiceHealth", - "SmartDetector", - "VM Insights", - "Zabbix", - "Resource Health" - ], - "x-ms-enum": { - "name": "MonitorService", - "modelAsString": true - } - }, - "alertRule": { - "type": "string", - "description": "Rule(monitor) which fired alert instance. Depending on the monitor service, this would be ARM id or name of the rule.", - "readOnly": true - }, - "sourceCreatedId": { - "type": "string", - "description": "Unique Id created by monitor service for each alert instance. This could be used to track the issue at the monitor service, in case of Nagios, Zabbix, SCOM etc.", - "readOnly": true - }, - "smartGroupId": { - "type": "string", - "description": "Unique Id of the smart group", - "readOnly": true - }, - "smartGroupingReason": { - "type": "string", - "description": "Verbose reason describing the reason why this alert instance is added to a smart group", - "readOnly": true - }, - "startDateTime": { - "type": "string", - "format": "date-time", - "description": "Creation time(ISO-8601 format) of alert instance.", - "readOnly": true - }, - "lastModifiedDateTime": { - "type": "string", - "format": "date-time", - "description": "Last modification time(ISO-8601 format) of alert instance.", - "readOnly": true - }, - "monitorConditionResolvedDateTime": { - "type": "string", - "format": "date-time", - "description": "Resolved time(ISO-8601 format) of alert instance. This will be updated when monitor service resolves the alert instance because the rule condition is no longer met.", - "readOnly": true - }, - "lastModifiedUserName": { - "type": "string", - "description": "User who last modified the alert, in case of monitor service updates user would be 'system', otherwise name of the user.", - "readOnly": true - } - } - }, - "alertModification": { - "description": "Alert Modification details", - "allOf": [ - { - "$ref": "#/definitions/ProxyResource" - } - ], - "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/ProxyResource" - } - ], - "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/ProxyResource" - } - ], - "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" - } - } - } - }, - "alertsMetaData": { - "description": "alert meta data information.", - "properties": { - "properties": { - "$ref": "#/definitions/alertsMetaDataProperties" - } - } - }, - "alertsMetaDataProperties": { - "description": "alert meta data property bag", - "discriminator": "metadataIdentifier", - "required": [ - "metadataIdentifier" - ], - "properties": { - "metadataIdentifier": { - "type": "string", - "description": "Identification of the information to be retrieved by API call", - "enum": [ - "MonitorServiceList" - ], - "x-ms-enum": { - "name": "metadataIdentifier", - "modelAsString": true - } - } - } - }, - "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/ProxyResource" - } - ], - "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." - } - } - }, - "MonitorServiceList": { - "title": "Monitor service details", - "description": "Monitor service details", - "required": [ - "data" - ], - "allOf": [ - { - "$ref": "#/definitions/alertsMetaDataProperties" - }, - { - "type": "object" - } - ], - "properties": { - "data": { - "description": "Array of operations", - "type": "array", - "items": { - "$ref": "#/definitions/MonitorServiceDetails" - } - } - } - }, - "MonitorServiceDetails": { - "description": "Details of a monitor service", - "properties": { - "name": { - "type": "string", - "description": "Monitor service name" - }, - "displayName": { - "type": "string", - "description": "Monitor service display name" - } - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/AlertsMetaData_MonitorService.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/AlertsMetaData_MonitorService.json deleted file mode 100644 index 6c3586a6e8d4..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/AlertsMetaData_MonitorService.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "parameters": { - "api-version": "2021-04-01", - "identifier": "MonitorServiceList" - }, - "responses": { - "200": { - "body": { - "properties": { - "metadataIdentifier": "MonitorServiceList", - "data": [ - { - "name": "ActivityLog Administrative", - "displayName": "Activity Log - Administrative" - }, - { - "name": "ActivityLog Autoscale", - "displayName": "Activity Log - Autoscale" - }, - { - "name": "ActivityLog Policy", - "displayName": "Activity Log - Policy" - }, - { - "name": "ActivityLog Recommendation", - "displayName": "Activity Log - Recommendation" - }, - { - "name": "ActivityLog Security", - "displayName": "Activity Log - Security" - }, - { - "name": "Application Insights", - "displayName": "Application Insights" - }, - { - "name": "Azure Backup", - "displayName": "Azure Backup" - }, - { - "name": "Custom", - "displayName": "Custom" - }, - { - "name": "Data Box Edge", - "displayName": "Data Box Edge" - }, - { - "name": "VM Insights", - "displayName": "VM Insights" - }, - { - "name": "Log Analytics", - "displayName": "Log Analytics" - }, - { - "name": "Nagios", - "displayName": "NAGIOS" - }, - { - "name": "Platform", - "displayName": "Platform" - }, - { - "name": "Resource Health", - "displayName": "Resource Health" - }, - { - "name": "SCOM", - "displayName": "SCOM" - }, - { - "name": "ServiceHealth", - "displayName": "Service Health" - }, - { - "name": "Smart Detector", - "displayName": "SmartDetector" - }, - { - "name": "Zabbix", - "displayName": "ZABBIX" - } - ] - } - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_ChangeState.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_ChangeState.json deleted file mode 100644 index 3a1a648f4d6b..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_ChangeState.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "parameters": { - "api-version": "2021-04-01", - "scope": "subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", - "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/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight/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/2021-04-01/examples/Alerts_GetById.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_GetById.json deleted file mode 100644 index 6531551f3412..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_GetById.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "parameters": { - "api-version": "2021-04-01", - "scope": "subscriptions/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight", - "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/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight/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/2021-04-01/examples/Alerts_History.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_History.json deleted file mode 100644 index 0e12a9eaf724..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_History.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "parameters": { - "api-version": "2021-04-01", - "scope": "subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a", - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100" - }, - "responses": { - "200": { - "body": { - "properties": { - "alertId": "66114d64-d9d9-478b-95c9-b789d6502100", - "modifications": [ - { - "modificationEvent": "StateChange", - "oldValue": "New", - "newValue": "Acknowledged", - "modifiedAt": "2018-06-13T06:14:15.7378737Z", - "modifiedBy": "vikramm@microsoft.com", - "comments": "Acknowledging alert", - "description": "State changed from 'New' to 'Acknowledged'" - }, - { - "modificationEvent": "AlertCreated", - "oldValue": "", - "newValue": "", - "modifiedAt": "2018-06-13T06:09:01Z", - "modifiedBy": "System", - "comments": "", - "description": "New Alert Object is created" - } - ] - }, - "id": "/subscriptions/9e261de7-c804-4b9d-9ebf-6f50fe350a9a/providers/Microsoft.AlertsManagement/alerts/66114d64-d9d9-478b-95c9-b789d6502100/history/default", - "type": "Microsoft.AlertsManagement/alerts", - "name": "CPU Alert" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_List.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_List.json deleted file mode 100644 index b568afc955df..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_List.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "parameters": { - "api-version": "2021-04-01", - "scope": "subscriptions/3b540246-808d-4331-99aa-917b808a9166" - }, - "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/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/servicedeskresourcegroup/providers/microsoft.insights/components/servicedeskappinsight/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/3b540246-808d-4331-99aa-917b808a9166/resourcegroups/cind/providers/microsoft.operationalinsights/workspaces/servicedeskwcus/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/2021-04-01/examples/Alerts_Summary.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_Summary.json deleted file mode 100644 index f6ac3b30a991..000000000000 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/examples/Alerts_Summary.json +++ /dev/null @@ -1,118 +0,0 @@ -{ - "parameters": { - "api-version": "2021-04-01", - "scope": "subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d", - "groupby": "severity,alertState" - }, - "responses": { - "200": { - "body": { - "properties": { - "groupedby": "severity", - "smartGroupsCount": 100, - "total": 14189, - "values": [ - { - "name": "Sev0", - "count": 6517, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 6517 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev1", - "count": 3175, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 3175 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev2", - "count": 1120, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 1120 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev3", - "count": 1902, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 1902 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - }, - { - "name": "Sev4", - "count": 1475, - "groupedby": "alertState", - "values": [ - { - "name": "New", - "count": 1475 - }, - { - "name": "Acknowledged", - "count": 0 - }, - { - "name": "Closed", - "count": 0 - } - ] - } - ] - }, - "id": "/subscriptions/1e3ff1c0-771a-4119-a03b-be82a51e232d/providers/Microsoft.AlertsManagement/alertsSummary/current", - "type": "Microsoft.AlertsManagement/alertsSummary", - "name": "current" - } - } - } -} diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 9856ddfc4ac3..4b4a33f85c48 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -52,7 +52,7 @@ These settings apply only when `--tag=package-2021-04-only` is specified on the ```yaml $(tag) == 'package-2021-04-only' input-file: - - Microsoft.AlertsManagement/stable/2021-04-01/AlertsManagement.json + - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json - Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json ``` ### Tag: package-preview-2021-01 From 9ec0c512e4b8a752ed5a4389a02421a5df28652b Mon Sep 17 00:00:00 2001 From: Noam Dishon Date: Wed, 28 Apr 2021 14:47:28 +0300 Subject: [PATCH 10/12] update description of subscriptionId to solve error --- .../stable/2019-03-01/AlertsManagement.json | 2 +- .../stable/2021-04-01/SmartDetectorAlertRulesApi.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json index b5be751defbb..c7f52dfc4257 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json @@ -375,7 +375,7 @@ }, "subscriptionId": { "name": "subscriptionId", - "description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.", + "description": "The Azure subscription Id.", "type": "string", "in": "path", "required": true diff --git a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json index 4f771cd7c4f5..3b0b1f8c2644 100644 --- a/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json +++ b/specification/alertsmanagement/resource-manager/Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json @@ -714,7 +714,7 @@ "in": "path", "required": true, "type": "string", - "description": "The ID of the target subscription.", + "description": "The Azure subscription Id.", "minLength": 1 }, "ResourceGroupNameParameter": { From 3f86417ffdfea25c23ffefa7117d2437f88f073b Mon Sep 17 00:00:00 2001 From: Noam Dishon Date: Thu, 29 Apr 2021 10:08:28 +0300 Subject: [PATCH 11/12] attemp to remove AlertsManagement from the package --- specification/alertsmanagement/resource-manager/readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 4b4a33f85c48..4c722e1fa6fb 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -52,7 +52,6 @@ These settings apply only when `--tag=package-2021-04-only` is specified on the ```yaml $(tag) == 'package-2021-04-only' input-file: - - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json - Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json ``` ### Tag: package-preview-2021-01 From 8a9bfe25f7038479b886e08a681c446b9a17956a Mon Sep 17 00:00:00 2001 From: Noam Dishon Date: Thu, 29 Apr 2021 10:32:33 +0300 Subject: [PATCH 12/12] revert (put back AlertsManagment) --- specification/alertsmanagement/resource-manager/readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/alertsmanagement/resource-manager/readme.md b/specification/alertsmanagement/resource-manager/readme.md index 4c722e1fa6fb..4b4a33f85c48 100644 --- a/specification/alertsmanagement/resource-manager/readme.md +++ b/specification/alertsmanagement/resource-manager/readme.md @@ -52,6 +52,7 @@ These settings apply only when `--tag=package-2021-04-only` is specified on the ```yaml $(tag) == 'package-2021-04-only' input-file: + - Microsoft.AlertsManagement/stable/2019-03-01/AlertsManagement.json - Microsoft.AlertsManagement/stable/2021-04-01/SmartDetectorAlertRulesApi.json ``` ### Tag: package-preview-2021-01