From a8d22837f2fd55254a51466119367e9f0b28a828 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Sun, 19 Apr 2020 13:56:11 +0300 Subject: [PATCH 1/5] update patch required fields to nothing --- azure-rest-api-specs | 1 + .../stable/2018-03-01/metricAlert_API.json | 69 ++++++++++++++++++- 2 files changed, 68 insertions(+), 2 deletions(-) create mode 160000 azure-rest-api-specs diff --git a/azure-rest-api-specs b/azure-rest-api-specs new file mode 160000 index 000000000000..8132d9b5619b --- /dev/null +++ b/azure-rest-api-specs @@ -0,0 +1 @@ +Subproject commit 8132d9b5619b2a7c17f3239a8346bddfd0082264 diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json index 79be5f2a8c27..ab6abe6a6581 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json @@ -541,7 +541,72 @@ "description": "Last time the rule was updated in ISO8601 format." } }, - "description": "An alert rule." + "description": "An alert rule properties." + }, + "MetricAlertPropertiesPatch": { + "properties": { + "description": { + "type": "string", + "description": "the description of the metric alert that will be included in the alert email." + }, + "severity": { + "type": "integer", + "description": "Alert severity {0, 1, 2, 3, 4}" + }, + "enabled": { + "type": "boolean", + "description": "the flag that indicates whether the metric alert is enabled." + }, + "scopes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "the list of resource id's that this metric alert is scoped to." + }, + "evaluationFrequency": { + "type": "string", + "format": "duration", + "description": "how often the metric alert is evaluated represented in ISO 8601 duration format." + }, + "windowSize": { + "type": "string", + "format": "duration", + "description": "the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold." + }, + "targetResourceType": { + "readOnly": true, + "type": "string", + "description": "the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." + }, + "targetResourceRegion": { + "readOnly": true, + "type": "string", + "description": "the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." + }, + "criteria": { + "$ref": "#/definitions/MetricAlertCriteria", + "description": "defines the specific alert criteria information." + }, + "autoMitigate": { + "type": "boolean", + "description": "the flag that indicates whether the alert should be auto resolved or not. The default is true." + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricAlertAction" + }, + "description": "the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved." + }, + "lastUpdatedTime": { + "readOnly": true, + "type": "string", + "format": "date-time", + "description": "Last time the rule was updated in ISO8601 format." + } + }, + "description": "An alert rule properties for patch." }, "MetricAlertResource": { "type": "object", @@ -572,7 +637,7 @@ }, "properties": { "x-ms-client-flatten": true, - "$ref": "#/definitions/MetricAlertProperties", + "$ref": "#/definitions/MetricAlertPropertiesPatch", "description": "The alert rule properties of the resource." } }, From 1393ad625a235d57103ab8ad9e3a7cd37b3e53ec Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Wed, 9 Sep 2020 08:15:51 +0300 Subject: [PATCH 2/5] removed readonly properties from patch --- .../stable/2018-03-01/metricAlert_API.json | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json index ab6abe6a6581..383b23989965 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json @@ -574,16 +574,6 @@ "format": "duration", "description": "the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold." }, - "targetResourceType": { - "readOnly": true, - "type": "string", - "description": "the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." - }, - "targetResourceRegion": { - "readOnly": true, - "type": "string", - "description": "the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." - }, "criteria": { "$ref": "#/definitions/MetricAlertCriteria", "description": "defines the specific alert criteria information." From 0792187f4cb07b88be1f5a5defab04947fbf0f0a Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Wed, 9 Sep 2020 09:30:16 +0300 Subject: [PATCH 3/5] removed sub module --- azure-rest-api-specs | 1 - 1 file changed, 1 deletion(-) delete mode 160000 azure-rest-api-specs diff --git a/azure-rest-api-specs b/azure-rest-api-specs deleted file mode 160000 index 8132d9b5619b..000000000000 --- a/azure-rest-api-specs +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 8132d9b5619b2a7c17f3239a8346bddfd0082264 From 4d798d56100d16dffd3d0648fcecfb8a57a9b2a8 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Wed, 9 Sep 2020 14:40:46 +0300 Subject: [PATCH 4/5] fix CI checks which failed --- .../stable/2018-03-01/metricAlert_API.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json index 383b23989965..b1cb2d41a32a 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json @@ -551,6 +551,7 @@ }, "severity": { "type": "integer", + "format": "int32", "description": "Alert severity {0, 1, 2, 3, 4}" }, "enabled": { @@ -574,6 +575,14 @@ "format": "duration", "description": "the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold." }, + "targetResourceType": { + "type": "string", + "description": "the resource type of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." + }, + "targetResourceRegion": { + "type": "string", + "description": "the region of the target resource(s) on which the alert is created/updated. Mandatory for MultipleResourceMultipleMetricCriteria." + }, "criteria": { "$ref": "#/definitions/MetricAlertCriteria", "description": "defines the specific alert criteria information." From f6e8cff81794e72e7fde5113d9dfb49c555afb97 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Mon, 4 Jan 2021 15:59:32 +0200 Subject: [PATCH 5/5] reverted description --- .../Microsoft.Insights/stable/2018-03-01/metricAlert_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json index b1cb2d41a32a..144a57d9ca92 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-03-01/metricAlert_API.json @@ -541,7 +541,7 @@ "description": "Last time the rule was updated in ISO8601 format." } }, - "description": "An alert rule properties." + "description": "An alert rule." }, "MetricAlertPropertiesPatch": { "properties": {