From a96bd6041fc186e54ba8622cd09f2fc562b8faa4 Mon Sep 17 00:00:00 2001 From: SDKAuto Date: Tue, 14 Dec 2021 04:52:03 +0000 Subject: [PATCH] CodeGen from PR 17060 in Azure/azure-rest-api-specs Remove Preview PrometheusRuleGroups resource type (#17060) This reverts commit 9dee51c3deb2b76628f6496665d53861cdb7efcf. --- .../Microsoft.AlertsManagement.json | 248 ------------------ schemas/common/autogeneratedResources.json | 3 - 2 files changed, 251 deletions(-) delete mode 100644 schemas/2021-07-22-preview/Microsoft.AlertsManagement.json diff --git a/schemas/2021-07-22-preview/Microsoft.AlertsManagement.json b/schemas/2021-07-22-preview/Microsoft.AlertsManagement.json deleted file mode 100644 index 67832d3c19..0000000000 --- a/schemas/2021-07-22-preview/Microsoft.AlertsManagement.json +++ /dev/null @@ -1,248 +0,0 @@ -{ - "id": "https://schema.management.azure.com/schemas/2021-07-22-preview/Microsoft.AlertsManagement.json#", - "$schema": "http://json-schema.org/draft-04/schema#", - "title": "Microsoft.AlertsManagement", - "description": "Microsoft AlertsManagement Resource Types", - "resourceDefinitions": { - "prometheusRuleGroups": { - "type": "object", - "properties": { - "apiVersion": { - "type": "string", - "enum": [ - "2021-07-22-preview" - ] - }, - "location": { - "type": "string", - "description": "The geo-location where the resource lives" - }, - "name": { - "type": "string", - "description": "The name of the rule group." - }, - "properties": { - "oneOf": [ - { - "$ref": "#/definitions/PrometheusRuleGroupProperties" - }, - { - "$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/prometheusRuleGroups" - ] - } - }, - "required": [ - "apiVersion", - "location", - "name", - "properties", - "type" - ], - "description": "Microsoft.AlertsManagement/prometheusRuleGroups" - } - }, - "definitions": { - "PrometheusRule": { - "type": "object", - "properties": { - "actions": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/PrometheusRuleGroupAction" - } - }, - { - "$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." - }, - "alert": { - "type": "string", - "description": "the name of the alert rule." - }, - "annotations": { - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "properties": {} - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "annotations for rule group" - }, - "expression": { - "type": "string", - "description": "the expression to run for the rule." - }, - "for": { - "type": "string", - "description": "the amount of time alert must be active before firing." - }, - "labels": { - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "properties": {} - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "labels for rule group" - }, - "record": { - "type": "string", - "description": "the name of the recording rule." - }, - "resolveConfiguration": { - "oneOf": [ - { - "$ref": "#/definitions/PrometheusRuleResolveConfiguration" - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "Specifies the Prometheus alert rule configuration." - }, - "severity": { - "oneOf": [ - { - "type": "integer" - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "the severity of the alerts fired by the rule." - } - } - }, - "PrometheusRuleGroupAction": { - "type": "object", - "properties": { - "actionGroupId": { - "type": "string", - "description": "the id of the action group to use." - }, - "actionProperties": { - "oneOf": [ - { - "type": "object", - "additionalProperties": { - "type": "string" - }, - "properties": {} - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "The properties of an action group object." - } - }, - "description": "An alert action." - }, - "PrometheusRuleGroupProperties": { - "type": "object", - "properties": { - "description": { - "type": "string", - "description": "the description of the Prometheus rule group that will be included in the alert email." - }, - "interval": { - "type": "string", - "description": "the interval in which to run the Prometheus rule group represented in ISO 8601 duration format." - }, - "rules": { - "oneOf": [ - { - "type": "array", - "items": { - "$ref": "#/definitions/PrometheusRule" - } - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "defines the rules in the Prometheus rule group." - }, - "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 rule group is scoped to." - } - }, - "required": [ - "rules", - "scopes" - ], - "description": "An alert rule." - }, - "PrometheusRuleResolveConfiguration": { - "type": "object", - "properties": { - "autoResolved": { - "oneOf": [ - { - "type": "boolean" - }, - { - "$ref": "https://schema.management.azure.com/schemas/common/definitions.json#/definitions/expression" - } - ], - "description": "the flag that indicates whether or not to auto resolve a fired alert." - }, - "timeToResolve": { - "type": "string", - "description": "the duration a rule must evaluate as healthy before the fired alert is automatically resolved represented in ISO 8601 duration format." - } - }, - "description": "Specifies the Prometheus alert rule configuration." - } - } -} \ No newline at end of file diff --git a/schemas/common/autogeneratedResources.json b/schemas/common/autogeneratedResources.json index 7f421014a6..24858e6bc2 100644 --- a/schemas/common/autogeneratedResources.json +++ b/schemas/common/autogeneratedResources.json @@ -70,9 +70,6 @@ { "$ref": "https://schema.management.azure.com/schemas/2021-04-01/Microsoft.AlertsManagement.json#/resourceDefinitions/smartDetectorAlertRules" }, - { - "$ref": "https://schema.management.azure.com/schemas/2021-07-22-preview/Microsoft.AlertsManagement.json#/resourceDefinitions/prometheusRuleGroups" - }, { "$ref": "https://schema.management.azure.com/schemas/2021-08-08-preview/Microsoft.AlertsManagement.json#/resourceDefinitions/actionRules" },