From d390eb4fa53bd325dd4901a28000191464852137 Mon Sep 17 00:00:00 2001 From: SDK Automation Date: Mon, 21 Sep 2020 12:20:52 +0000 Subject: [PATCH] Generated from 692005a0f4e7bf6408bf20193ec16166b80b4a38 --- .../Microsoft.AlertsManagement.json | 258 ++++++++++++++++++ schemas/common/autogeneratedResources.json | 3 + 2 files changed, 261 insertions(+) create mode 100644 schemas/2020-08-04-preview/Microsoft.AlertsManagement.json diff --git a/schemas/2020-08-04-preview/Microsoft.AlertsManagement.json b/schemas/2020-08-04-preview/Microsoft.AlertsManagement.json new file mode 100644 index 0000000000..2ff20a6c79 --- /dev/null +++ b/schemas/2020-08-04-preview/Microsoft.AlertsManagement.json @@ -0,0 +1,258 @@ +{ + "id": "https://schema.management.azure.com/schemas/2020-08-04-preview/Microsoft.AlertsManagement.json#", + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Microsoft.AlertsManagement", + "description": "Microsoft AlertsManagement Resource Types", + "resourceDefinitions": { + "resourceHealthAlerts": { + "type": "object", + "properties": { + "apiVersion": { + "type": "string", + "enum": [ + "2020-08-04-preview" + ] + }, + "location": { + "type": "string", + "description": "Resource location" + }, + "name": { + "type": "string", + "description": "The name of the rule." + }, + "properties": { + "oneOf": [ + { + "$ref": "#/definitions/HealthAlertProperties" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "An alert rule." + }, + "tags": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Resource tags" + }, + "type": { + "type": "string", + "enum": [ + "Microsoft.AlertsManagement/resourceHealthAlerts" + ] + } + }, + "required": [ + "apiVersion", + "location", + "name", + "properties", + "type" + ], + "description": "Microsoft.AlertsManagement/resourceHealthAlerts" + } + }, + "definitions": { + "HealthAlertAction": { + "type": "object", + "properties": { + "actionGroupId": { + "type": "string", + "description": "the id of the action group to use." + }, + "webHookProperties": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "string" + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The properties of a webhook object." + } + }, + "description": "An alert action." + }, + "HealthAlertCriteria": { + "type": "object", + "properties": { + "allOf": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/HealthAlertCriterion" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "The list of metric criteria for this 'all of' operation. " + } + }, + "description": "Specifies the resource health alert criteria for a single resource that has multiple metric criteria." + }, + "HealthAlertCriterion": { + "type": "object", + "oneOf": [ + { + "$ref": "#/definitions/VmGuestHealthAlertCriterion" + } + ], + "properties": { + "additionalProperties": { + "oneOf": [ + { + "type": "object", + "additionalProperties": { + "type": "object", + "properties": {} + }, + "properties": {} + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Unmatched properties from the message are deserialized this collection" + } + }, + "description": "The rule criterion that defines the conditions of the alert rule." + }, + "HealthAlertProperties": { + "type": "object", + "properties": { + "actions": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/HealthAlertAction" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved." + }, + "criteria": { + "oneOf": [ + { + "$ref": "#/definitions/HealthAlertCriteria" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Specifies the resource health alert criteria for a single resource that has multiple metric criteria." + }, + "description": { + "type": "string", + "description": "the description of the health alert that will be included in the alert email." + }, + "enabled": { + "oneOf": [ + { + "type": "boolean" + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "the flag that indicates whether the health alert is enabled." + }, + "scopes": { + "oneOf": [ + { + "type": "array", + "items": { + "type": "string" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "the list of resource id's that this health alert is scoped to." + } + }, + "required": [ + "criteria", + "description", + "enabled" + ], + "description": "An alert rule." + }, + "HealthState": { + "type": "object", + "properties": { + "healthStateName": { + "type": "string", + "description": "Health state" + }, + "severity": { + "type": "string", + "description": "Severity of alert fired" + } + }, + "required": [ + "healthStateName", + "severity" + ], + "description": "Specifies the health state to alert on and the corresponding severity" + }, + "VmGuestHealthAlertCriterion": { + "type": "object", + "properties": { + "healthMonitorName": { + "type": "string", + "description": "Name of health monitor on which to define alert" + }, + "healthStates": { + "oneOf": [ + { + "type": "array", + "items": { + "$ref": "#/definitions/HealthState" + } + }, + { + "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" + } + ], + "description": "Health states to alert on" + }, + "namespace": { + "type": "string", + "enum": [ + "VmGuestHealth" + ] + } + }, + "required": [ + "healthMonitorName", + "namespace" + ], + "description": "Specifies the health alert criteria to alert on." + } + } +} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index cd5b1cf8d6..3cb639a75e 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -46,6 +46,9 @@ { "$ref": "https://schema.management.azure.com/schemas/2019-06-01/Microsoft.AlertsManagement.json#/resourceDefinitions/smartDetectorAlertRules" }, + { + "$ref": "https://schema.management.azure.com/schemas/2020-08-04-preview/Microsoft.AlertsManagement.json#/resourceDefinitions/resourceHealthAlerts" + }, { "$ref": "https://schema.management.azure.com/schemas/2016-05-16/Microsoft.AnalysisServices.json#/resourceDefinitions/servers" },