From 6a11110a9be17eb7cbb628ccf5ebd39d8083ee97 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Thu, 24 Dec 2020 19:25:03 +0200 Subject: [PATCH 01/15] Fix swagger validation for 2018-09-01 version --- .../stable/2018-09-01/baseline_API.json | 11 ++- .../2018-09-01/calculateBaseline_API.json | 76 +++++++++++++++++-- 2 files changed, 78 insertions(+), 9 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json index fbf213aaa465..50f8764d7ebc 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json @@ -36,7 +36,7 @@ } }, "paths": { - "/{resourceUri}/providers/microsoft.insights/baseline/{metricName}": { + "/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}": { "get": { "tags": [ "Baseline" @@ -312,6 +312,15 @@ "description": "A single high threshold value." }, "description": "The high thresholds of the baseline." + }, + "timestamps": { + "type": "array", + "items": { + "type": "string", + "format": "date-time", + "description": "the timestamp for the baseline value in ISO 8601 format." + }, + "description": "the array of timestamps of the baselines." } }, "required": [ diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json index 39ba5120dd9e..d51a3f28d0f8 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json @@ -36,7 +36,7 @@ } }, "paths": { - "/{resourceUri}/providers/microsoft.insights/calculatebaseline": { + "/{resourceUri}/providers/Microsoft.Insights/calculatebaseline": { "post": { "tags": [ "Baseline" @@ -83,17 +83,49 @@ } }, "definitions": { - "ErrorResponse": { - "description": "Describes the format of Error response.", - "type": "object", + "ErrorDetail": { + "description": "The error detail.", "properties": { "code": { - "description": "Error code", - "type": "string" + "readOnly": true, + "type": "string", + "description": "The error code." }, "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + } + }, + "ErrorResponse": { + "title": "Error response", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "properties": { + "error": { + "description": "The error object.", + "$ref": "#/definitions/ErrorDetail" } } }, @@ -154,6 +186,34 @@ "$ref": "#/definitions/Baseline" }, "description": "The baseline values for each sensitivity." + }, + "statistics": { + "type": "object", + "properties": { + "isEligible": { + "type": "string", + "description": "is series eligible for dynamic threshold analysis" + }, + "statusExtended": { + "type": "string", + "description": "Namespace of the metric." + }, + "extendedSeriesStatistics": { + "type": "int", + "enum": [ + 1, + 2, + 4, + 8, + 16 + ], + "x-ms-enum": { + "name": "extendedSeriesStatistics" + }, + "description": "The extended status." + } + }, + "description": "The statistics" } }, "required": [ From 2bb146429362df70ab8736f1a7971f6d07f998bb Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Thu, 24 Dec 2020 19:27:50 +0200 Subject: [PATCH 02/15] Fixed swagger validations for version 2017-11-01 --- .../2017-11-01-preview/baseline_API.json | 57 ++++++++++++++++--- .../calculateBaseline_API.json | 46 ++++++++++++--- 2 files changed, 88 insertions(+), 15 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json index 4ba3123874d4..be1934a4689e 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json @@ -36,7 +36,7 @@ } }, "paths": { - "/{resourceUri}/providers/microsoft.insights/baseline/{metricName}": { + "/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}": { "get": { "tags": [ "Baseline" @@ -124,17 +124,49 @@ }, "description": "Represents a baseline metadata value." }, - "ErrorResponse": { - "description": "Describes the format of Error response.", - "type": "object", + "ErrorDetail": { + "description": "The error detail.", "properties": { "code": { - "description": "Error code", - "type": "string" + "readOnly": true, + "type": "string", + "description": "The error code." }, "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + } + }, + "ErrorResponse": { + "title": "Error response", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "properties": { + "error": { + "description": "The error object.", + "$ref": "#/definitions/ErrorDetail" } } }, @@ -238,6 +270,15 @@ "description": "A single high threshold value." }, "description": "The high thresholds of the baseline." + }, + "timestamps": { + "type": "array", + "items": { + "type": "string", + "format": "date-time", + "description": "the timestamp for the baseline value in ISO 8601 format." + }, + "description": "the array of timestamps of the baselines." } }, "required": [ diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json index e1ce81ced40d..4a03a3f93412 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json @@ -83,17 +83,49 @@ } }, "definitions": { - "ErrorResponse": { - "description": "Describes the format of Error response.", - "type": "object", + "ErrorDetail": { + "description": "The error detail.", "properties": { "code": { - "description": "Error code", - "type": "string" + "readOnly": true, + "type": "string", + "description": "The error code." }, "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" + "readOnly": true, + "type": "string", + "description": "The error message." + }, + "target": { + "readOnly": true, + "type": "string", + "description": "The error target." + }, + "details": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorDetail" + }, + "description": "The error details." + }, + "additionalInfo": { + "readOnly": true, + "type": "array", + "items": { + "$ref": "#/definitions/ErrorAdditionalInfo" + }, + "description": "The error additional info." + } + } + }, + "ErrorResponse": { + "title": "Error response", + "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", + "properties": { + "error": { + "description": "The error object.", + "$ref": "#/definitions/ErrorDetail" } } }, From af2666db21a63c6950afebd79b646f03811a76e6 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Thu, 24 Dec 2020 19:46:49 +0200 Subject: [PATCH 03/15] reverted 2017 changes! --- .../2017-11-01-preview/baseline_API.json | 57 +++---------------- .../calculateBaseline_API.json | 46 +++------------ 2 files changed, 15 insertions(+), 88 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json index be1934a4689e..4ba3123874d4 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/baseline_API.json @@ -36,7 +36,7 @@ } }, "paths": { - "/{resourceUri}/providers/Microsoft.Insights/baseline/{metricName}": { + "/{resourceUri}/providers/microsoft.insights/baseline/{metricName}": { "get": { "tags": [ "Baseline" @@ -124,49 +124,17 @@ }, "description": "Represents a baseline metadata value." }, - "ErrorDetail": { - "description": "The error detail.", + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", "properties": { "code": { - "readOnly": true, - "type": "string", - "description": "The error code." + "description": "Error code", + "type": "string" }, "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - }, - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "description": "The error additional info." - } - } - }, - "ErrorResponse": { - "title": "Error response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", - "properties": { - "error": { - "description": "The error object.", - "$ref": "#/definitions/ErrorDetail" + "description": "Error message indicating why the operation failed.", + "type": "string" } } }, @@ -270,15 +238,6 @@ "description": "A single high threshold value." }, "description": "The high thresholds of the baseline." - }, - "timestamps": { - "type": "array", - "items": { - "type": "string", - "format": "date-time", - "description": "the timestamp for the baseline value in ISO 8601 format." - }, - "description": "the array of timestamps of the baselines." } }, "required": [ diff --git a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json index 4a03a3f93412..e1ce81ced40d 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/preview/2017-11-01-preview/calculateBaseline_API.json @@ -83,49 +83,17 @@ } }, "definitions": { - "ErrorDetail": { - "description": "The error detail.", + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", "properties": { "code": { - "readOnly": true, - "type": "string", - "description": "The error code." + "description": "Error code", + "type": "string" }, "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - }, - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "description": "The error additional info." - } - } - }, - "ErrorResponse": { - "title": "Error response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", - "properties": { - "error": { - "description": "The error object.", - "$ref": "#/definitions/ErrorDetail" + "description": "Error message indicating why the operation failed.", + "type": "string" } } }, From 2bdc515c96dcaa956d1d120493d978f3f9b8465d Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Tue, 29 Dec 2020 11:29:25 +0200 Subject: [PATCH 04/15] reverted ErrorResponse thing and add a suppresion --- .../2018-09-01/calculateBaseline_API.json | 46 +++---------------- .../monitor/resource-manager/readme.md | 3 ++ 2 files changed, 10 insertions(+), 39 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json index d51a3f28d0f8..15bfbab2eb35 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json @@ -83,49 +83,17 @@ } }, "definitions": { - "ErrorDetail": { - "description": "The error detail.", + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", "properties": { "code": { - "readOnly": true, - "type": "string", - "description": "The error code." + "description": "Error code", + "type": "string" }, "message": { - "readOnly": true, - "type": "string", - "description": "The error message." - }, - "target": { - "readOnly": true, - "type": "string", - "description": "The error target." - }, - "details": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorDetail" - }, - "description": "The error details." - }, - "additionalInfo": { - "readOnly": true, - "type": "array", - "items": { - "$ref": "#/definitions/ErrorAdditionalInfo" - }, - "description": "The error additional info." - } - } - }, - "ErrorResponse": { - "title": "Error response", - "description": "Common error response for all Azure Resource Manager APIs to return error details for failed operations.", - "properties": { - "error": { - "description": "The error object.", - "$ref": "#/definitions/ErrorDetail" + "description": "Error message indicating why the operation failed.", + "type": "string" } } }, diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 89ad698475e8..9dafd5b4bdec 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -618,6 +618,9 @@ directive: from: dataCollectionRuleAssociations_API.json where: $.paths reason: 'Operations API is defined in a separate swagger spec for Microsoft.Insights namespace (https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json)' + - suppress: DefaultErrorResponseSchema + from: calculateBaseline_API.json + reason: 'Updating the error response to the new format would be a breaking change.' ``` ### Tag: profile-hybrid-2019-03-01 From 5c5fa27159a931117470e1f8131087731308d1b0 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Tue, 29 Dec 2020 11:32:58 +0200 Subject: [PATCH 05/15] added suppresion for baseline_API --- specification/monitor/resource-manager/readme.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 9dafd5b4bdec..9b920c76d7de 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -621,6 +621,9 @@ directive: - suppress: DefaultErrorResponseSchema from: calculateBaseline_API.json reason: 'Updating the error response to the new format would be a breaking change.' + - suppress: DefaultErrorResponseSchema + from: baseline_API.json + reason: 'Updating the error response to the new format would be a breaking change.' ``` ### Tag: profile-hybrid-2019-03-01 From 2c00e1f2a65a2d9ca6932a365b4f5afcdbf44273 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Tue, 29 Dec 2020 11:56:48 +0200 Subject: [PATCH 06/15] fixed enum --- .../stable/2018-09-01/calculateBaseline_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json index 15bfbab2eb35..7d3d94e269b9 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json @@ -167,7 +167,7 @@ "description": "Namespace of the metric." }, "extendedSeriesStatistics": { - "type": "int", + "type": "integer", "enum": [ 1, 2, From d487a2425e93847a00b049748a531451af1a7be0 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Wed, 30 Dec 2020 14:30:22 +0200 Subject: [PATCH 07/15] fixed the statistics --- .../2018-09-01/calculateBaseline_API.json | 23 +++++++------------ 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json index 7d3d94e269b9..95d7447a216f 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json @@ -162,23 +162,16 @@ "type": "string", "description": "is series eligible for dynamic threshold analysis" }, - "statusExtended": { - "type": "string", - "description": "Namespace of the metric." + "status": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The list of extended status for calculating the baseline." }, - "extendedSeriesStatistics": { + "seasonalityPeriod": { "type": "integer", - "enum": [ - 1, - 2, - 4, - 8, - 16 - ], - "x-ms-enum": { - "name": "extendedSeriesStatistics" - }, - "description": "The extended status." + "description": "The seasonality period for calculating the baseline." } }, "description": "The statistics" From 4083599b81ee3251d6e052562ef816609889b889 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Mon, 4 Jan 2021 09:31:19 +0200 Subject: [PATCH 08/15] renamed suppression rule --- specification/monitor/resource-manager/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 9b920c76d7de..048105abcf29 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -618,10 +618,10 @@ directive: from: dataCollectionRuleAssociations_API.json where: $.paths reason: 'Operations API is defined in a separate swagger spec for Microsoft.Insights namespace (https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json)' - - suppress: DefaultErrorResponseSchema + - suppress: DefaultErrorResponseSchemaCalculateBaseline_API from: calculateBaseline_API.json reason: 'Updating the error response to the new format would be a breaking change.' - - suppress: DefaultErrorResponseSchema + - suppress: DefaultErrorResponseSchemaBaseline_API from: baseline_API.json reason: 'Updating the error response to the new format would be a breaking change.' ``` From 7746a0893a37c0f61375d1dcb473f55c00f0818e Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Mon, 4 Jan 2021 17:26:56 +0200 Subject: [PATCH 09/15] added missing timestamps --- .../stable/2018-09-01/calculateBaseline_API.json | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json index 95d7447a216f..1b12aef73f81 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json @@ -216,6 +216,15 @@ "description": "A single high threshold value." }, "description": "The high thresholds of the baseline." + }, + "timestamps": { + "type": "array", + "items": { + "type": "string", + "format": "date-time", + "description": "the timestamp for the baseline value in ISO 8601 format." + }, + "description": "the array of timestamps of the baselines." } }, "required": [ From d5814d4a38a72ee07b04160eadf8f38187a9aca3 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Mon, 4 Jan 2021 17:50:40 +0200 Subject: [PATCH 10/15] added int format --- .../stable/2018-09-01/calculateBaseline_API.json | 1 + 1 file changed, 1 insertion(+) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json index 1b12aef73f81..1a7dc013fb17 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/calculateBaseline_API.json @@ -171,6 +171,7 @@ }, "seasonalityPeriod": { "type": "integer", + "format": "int32", "description": "The seasonality period for calculating the baseline." } }, From 6a8a6795b4563e108c13d20a5e76a183b93d1e49 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Mon, 4 Jan 2021 17:55:59 +0200 Subject: [PATCH 11/15] fixed namespace --- .../Microsoft.Insights/stable/2018-09-01/baseline_API.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json index 50f8764d7ebc..131de35b7b15 100644 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/baseline_API.json @@ -103,7 +103,7 @@ } } }, - "/{resourceUri}/providers/microsoft.insights/baseline": { + "/{resourceUri}/providers/Microsoft.Insights/baseline": { "get": { "tags": [ "Baseline" From c74266ff13ccdf45620df514f88a2318ab94c060 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Tue, 5 Jan 2021 16:22:54 +0200 Subject: [PATCH 12/15] fixed suppression --- specification/monitor/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 048105abcf29..5d530f072ea6 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -621,7 +621,7 @@ directive: - suppress: DefaultErrorResponseSchemaCalculateBaseline_API from: calculateBaseline_API.json reason: 'Updating the error response to the new format would be a breaking change.' - - suppress: DefaultErrorResponseSchemaBaseline_API + - suppress: R4007 from: baseline_API.json reason: 'Updating the error response to the new format would be a breaking change.' ``` From a160f56543526b3246e5d53da4e56d768641bee1 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Wed, 6 Jan 2021 10:29:16 +0200 Subject: [PATCH 13/15] added missing API --- .../2018-09-01/metricBaselines_API.json | 399 ++++++++++++++++++ 1 file changed, 399 insertions(+) create mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json new file mode 100644 index 000000000000..e2f810f95244 --- /dev/null +++ b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json @@ -0,0 +1,399 @@ +{ + "swagger": "2.0", + "info": { + "title": "MonitorManagementClient", + "x-ms-code-generation-settings": { + "name": "MonitorManagementClient" + }, + "version": "2018-09-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": { + "/{resourceUri}/providers/Microsoft.Insights/metricBaselines": { + "get": { + "tags": [ + "Baseline", + "Metric" + ], + "operationId": "Baselines_List", + "description": "**Lists the metric baseline values for a resource**.", + "x-ms-examples": { + "Get metric baselines": { + "$ref": "./examples/metricBaselines.json" + } + }, + "x-ms-pageable": { + "nextLinkName": null + }, + "parameters": [ + { + "$ref": "#/parameters/ResourceUriParameter" + }, + { + "$ref": "#/parameters/MetricNamesParameter" + }, + { + "$ref": "#/parameters/MetricNamespaceParameter" + }, + { + "$ref": "#/parameters/TimespanParameter" + }, + { + "$ref": "#/parameters/IntervalParameter" + }, + { + "$ref": "#/parameters/AggregationsParameter" + }, + { + "$ref": "#/parameters/SensitivitiesParameter" + }, + { + "name": "$filter", + "in": "query", + "type": "string", + "description": "The **$filter** is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.", + "required": false + }, + { + "$ref": "#/parameters/BaselineResultTypeParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "responses": { + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + }, + "200": { + "description": "Successful request to get the list of metric baseline values.", + "schema": { + "$ref": "#/definitions/MetricBaselinesResponse" + } + } + } + } + } + }, + "definitions": { + "ErrorResponse": { + "description": "Describes the format of Error response.", + "type": "object", + "properties": { + "code": { + "description": "Error code", + "type": "string" + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string" + } + } + }, + "MetricBaselinesResponse": { + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/SingleMetricBaseline" + }, + "description": "The list of metric baselines." + } + }, + "description": "A list of metric baselines." + }, + "SingleMetricBaseline": { + "properties": { + "id": { + "type": "string", + "description": "The metric baseline Id." + }, + "type": { + "type": "string", + "description": "The resource type of the metric baseline resource." + }, + "name": { + "type": "string", + "description": "The name of the metric for which the baselines were retrieved." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/MetricBaselinesProperties", + "description": "The metric baseline properties of the metric." + } + }, + "required": [ + "id", + "type", + "name", + "properties" + ], + "description": "The baseline results of a single metric." + }, + "MetricBaselinesProperties": { + "type": "object", + "properties": { + "timespan": { + "type": "string", + "description": "The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested." + }, + "interval": { + "type": "string", + "format": "duration", + "description": "The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made." + }, + "namespace": { + "type": "string", + "description": "The namespace of the metrics been queried." + }, + "baselines": { + "type": "array", + "items": { + "$ref": "#/definitions/TimeSeriesBaseline" + }, + "description": "The baseline for each time series that was queried." + } + }, + "required": [ + "timespan", + "interval", + "baselines" + ], + "description": "The response to a metric baselines query." + }, + "TimeSeriesBaseline": { + "properties": { + "aggregation": { + "type": "string", + "description": "The aggregation type of the metric." + }, + "dimensions": { + "type": "array", + "items": { + "$ref": "#/definitions/MetricSingleDimension" + }, + "description": "The dimensions of this time series." + }, + "timestamps": { + "type": "array", + "items": { + "type": "string", + "format": "date-time", + "description": "The timestamp for the baseline value in ISO 8601 format." + }, + "description": "The list of timestamps of the baselines." + }, + "data": { + "type": "array", + "items": { + "$ref": "#/definitions/SingleBaseline" + }, + "description": "The baseline values for each sensitivity." + }, + "metadata": { + "type": "array", + "items": { + "$ref": "#/definitions/BaselineMetadata" + }, + "description": "The baseline metadata values." + } + }, + "required": [ + "aggregation", + "timestamps", + "data" + ], + "description": "The baseline values for a single time series." + }, + "MetricSingleDimension": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the dimension." + }, + "value": { + "type": "string", + "description": "Value of the dimension." + } + }, + "required": [ + "name", + "value" + ], + "description": "The metric dimension name and value." + }, + "SingleBaseline": { + "type": "object", + "properties": { + "sensitivity": { + "type": "string", + "enum": [ + "Low", + "Medium", + "High" + ], + "x-ms-enum": { + "name": "BaselineSensitivity", + "modelAsString": true + }, + "description": "the sensitivity of the baseline." + }, + "lowThresholds": { + "type": "array", + "items": { + "type": "number", + "format": "double", + "description": "A single low threshold value." + }, + "description": "The low thresholds of the baseline." + }, + "highThresholds": { + "type": "array", + "items": { + "type": "number", + "format": "double", + "description": "A single high threshold value." + }, + "description": "The high thresholds of the baseline." + } + }, + "required": [ + "sensitivity", + "lowThresholds", + "highThresholds" + ], + "description": "The baseline values for a single sensitivity value." + }, + "BaselineMetadata": { + "properties": { + "name": { + "type": "string", + "description": "Name of the baseline metadata." + }, + "value": { + "type": "string", + "description": "Value of the baseline metadata." + } + }, + "required": [ + "name", + "value" + ], + "description": "Represents a baseline metadata value." + } + }, + "parameters": { + "ResourceUriParameter": { + "name": "resourceUri", + "in": "path", + "required": true, + "type": "string", + "description": "The identifier of the resource.", + "x-ms-parameter-location": "method", + "x-ms-skip-url-encoding": true + }, + "TimespanParameter": { + "name": "timespan", + "in": "query", + "required": false, + "type": "string", + "description": "The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.", + "x-ms-parameter-location": "method" + }, + "IntervalParameter": { + "name": "interval", + "in": "query", + "required": false, + "type": "string", + "format": "duration", + "description": "The interval (i.e. timegrain) of the query.", + "x-ms-parameter-location": "method" + }, + "MetricNamesParameter": { + "name": "metricnames", + "in": "query", + "required": false, + "type": "string", + "description": "The names of the metrics (comma separated) to retrieve.", + "x-ms-parameter-location": "method" + }, + "MetricNamespaceParameter": { + "name": "metricnamespace", + "in": "query", + "required": false, + "type": "string", + "description": "Metric namespace to query metric definitions for.", + "x-ms-parameter-location": "method" + }, + "AggregationsParameter": { + "name": "aggregation", + "in": "query", + "required": false, + "type": "string", + "description": "The list of aggregation types (comma separated) to retrieve.", + "x-ms-parameter-location": "method" + }, + "SensitivitiesParameter": { + "name": "sensitivities", + "in": "query", + "required": false, + "type": "string", + "description": "The list of sensitivities (comma separated) to retrieve.", + "x-ms-parameter-location": "method" + }, + "BaselineResultTypeParameter": { + "name": "resultType", + "in": "query", + "type": "string", + "enum": [ + "Data", + "Metadata" + ], + "x-ms-enum": { + "name": "ResultType", + "modelAsString": false + }, + "description": "Allows retrieving only metadata of the baseline. On data request all information is retrieved.", + "x-ms-parameter-location": "method", + "required": false + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "required": true, + "type": "string", + "description": "Client Api Version." + } + } +} From 086389fa2d730e159a3915dd9b94ba4d412615da Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Wed, 6 Jan 2021 10:31:19 +0200 Subject: [PATCH 14/15] fixed 4007 thing --- specification/monitor/resource-manager/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/monitor/resource-manager/readme.md b/specification/monitor/resource-manager/readme.md index 5d530f072ea6..a5a82acb7a79 100644 --- a/specification/monitor/resource-manager/readme.md +++ b/specification/monitor/resource-manager/readme.md @@ -618,7 +618,7 @@ directive: from: dataCollectionRuleAssociations_API.json where: $.paths reason: 'Operations API is defined in a separate swagger spec for Microsoft.Insights namespace (https://github.com/Azure/azure-rest-api-specs/blob/master/specification/monitor/resource-manager/Microsoft.Insights/stable/2015-04-01/operations_API.json)' - - suppress: DefaultErrorResponseSchemaCalculateBaseline_API + - suppress: R4007 from: calculateBaseline_API.json reason: 'Updating the error response to the new format would be a breaking change.' - suppress: R4007 From 364cfee0cb5bfdf0e17bf2e6cb036fe9e9f8f2c9 Mon Sep 17 00:00:00 2001 From: Yaniv Shmueli Date: Wed, 6 Jan 2021 12:04:27 +0200 Subject: [PATCH 15/15] deleted api version i've added --- .../2018-09-01/metricBaselines_API.json | 399 ------------------ 1 file changed, 399 deletions(-) delete mode 100644 specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json diff --git a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json b/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json deleted file mode 100644 index e2f810f95244..000000000000 --- a/specification/monitor/resource-manager/Microsoft.Insights/stable/2018-09-01/metricBaselines_API.json +++ /dev/null @@ -1,399 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "MonitorManagementClient", - "x-ms-code-generation-settings": { - "name": "MonitorManagementClient" - }, - "version": "2018-09-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": { - "/{resourceUri}/providers/Microsoft.Insights/metricBaselines": { - "get": { - "tags": [ - "Baseline", - "Metric" - ], - "operationId": "Baselines_List", - "description": "**Lists the metric baseline values for a resource**.", - "x-ms-examples": { - "Get metric baselines": { - "$ref": "./examples/metricBaselines.json" - } - }, - "x-ms-pageable": { - "nextLinkName": null - }, - "parameters": [ - { - "$ref": "#/parameters/ResourceUriParameter" - }, - { - "$ref": "#/parameters/MetricNamesParameter" - }, - { - "$ref": "#/parameters/MetricNamespaceParameter" - }, - { - "$ref": "#/parameters/TimespanParameter" - }, - { - "$ref": "#/parameters/IntervalParameter" - }, - { - "$ref": "#/parameters/AggregationsParameter" - }, - { - "$ref": "#/parameters/SensitivitiesParameter" - }, - { - "name": "$filter", - "in": "query", - "type": "string", - "description": "The **$filter** is used to reduce the set of metric data returned.
Example:
Metric contains metadata A, B and C.
- Return all time series of C where A = a1 and B = b1 or b2
**$filter=A eq ‘a1’ and B eq ‘b1’ or B eq ‘b2’ and C eq ‘*’**
- Invalid variant:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘*’ or B = ‘b2’**
This is invalid because the logical or operator cannot separate two different metadata names.
- Return all time series where A = a1, B = b1 and C = c1:
**$filter=A eq ‘a1’ and B eq ‘b1’ and C eq ‘c1’**
- Return all time series where A = a1
**$filter=A eq ‘a1’ and B eq ‘*’ and C eq ‘*’**.", - "required": false - }, - { - "$ref": "#/parameters/BaselineResultTypeParameter" - }, - { - "$ref": "#/parameters/ApiVersionParameter" - } - ], - "responses": { - "default": { - "description": "Error response describing why the operation failed.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - }, - "200": { - "description": "Successful request to get the list of metric baseline values.", - "schema": { - "$ref": "#/definitions/MetricBaselinesResponse" - } - } - } - } - } - }, - "definitions": { - "ErrorResponse": { - "description": "Describes the format of Error response.", - "type": "object", - "properties": { - "code": { - "description": "Error code", - "type": "string" - }, - "message": { - "description": "Error message indicating why the operation failed.", - "type": "string" - } - } - }, - "MetricBaselinesResponse": { - "properties": { - "value": { - "type": "array", - "items": { - "$ref": "#/definitions/SingleMetricBaseline" - }, - "description": "The list of metric baselines." - } - }, - "description": "A list of metric baselines." - }, - "SingleMetricBaseline": { - "properties": { - "id": { - "type": "string", - "description": "The metric baseline Id." - }, - "type": { - "type": "string", - "description": "The resource type of the metric baseline resource." - }, - "name": { - "type": "string", - "description": "The name of the metric for which the baselines were retrieved." - }, - "properties": { - "x-ms-client-flatten": true, - "$ref": "#/definitions/MetricBaselinesProperties", - "description": "The metric baseline properties of the metric." - } - }, - "required": [ - "id", - "type", - "name", - "properties" - ], - "description": "The baseline results of a single metric." - }, - "MetricBaselinesProperties": { - "type": "object", - "properties": { - "timespan": { - "type": "string", - "description": "The timespan for which the data was retrieved. Its value consists of two datetimes concatenated, separated by '/'. This may be adjusted in the future and returned back from what was originally requested." - }, - "interval": { - "type": "string", - "format": "duration", - "description": "The interval (window size) for which the metric data was returned in. This may be adjusted in the future and returned back from what was originally requested. This is not present if a metadata request was made." - }, - "namespace": { - "type": "string", - "description": "The namespace of the metrics been queried." - }, - "baselines": { - "type": "array", - "items": { - "$ref": "#/definitions/TimeSeriesBaseline" - }, - "description": "The baseline for each time series that was queried." - } - }, - "required": [ - "timespan", - "interval", - "baselines" - ], - "description": "The response to a metric baselines query." - }, - "TimeSeriesBaseline": { - "properties": { - "aggregation": { - "type": "string", - "description": "The aggregation type of the metric." - }, - "dimensions": { - "type": "array", - "items": { - "$ref": "#/definitions/MetricSingleDimension" - }, - "description": "The dimensions of this time series." - }, - "timestamps": { - "type": "array", - "items": { - "type": "string", - "format": "date-time", - "description": "The timestamp for the baseline value in ISO 8601 format." - }, - "description": "The list of timestamps of the baselines." - }, - "data": { - "type": "array", - "items": { - "$ref": "#/definitions/SingleBaseline" - }, - "description": "The baseline values for each sensitivity." - }, - "metadata": { - "type": "array", - "items": { - "$ref": "#/definitions/BaselineMetadata" - }, - "description": "The baseline metadata values." - } - }, - "required": [ - "aggregation", - "timestamps", - "data" - ], - "description": "The baseline values for a single time series." - }, - "MetricSingleDimension": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the dimension." - }, - "value": { - "type": "string", - "description": "Value of the dimension." - } - }, - "required": [ - "name", - "value" - ], - "description": "The metric dimension name and value." - }, - "SingleBaseline": { - "type": "object", - "properties": { - "sensitivity": { - "type": "string", - "enum": [ - "Low", - "Medium", - "High" - ], - "x-ms-enum": { - "name": "BaselineSensitivity", - "modelAsString": true - }, - "description": "the sensitivity of the baseline." - }, - "lowThresholds": { - "type": "array", - "items": { - "type": "number", - "format": "double", - "description": "A single low threshold value." - }, - "description": "The low thresholds of the baseline." - }, - "highThresholds": { - "type": "array", - "items": { - "type": "number", - "format": "double", - "description": "A single high threshold value." - }, - "description": "The high thresholds of the baseline." - } - }, - "required": [ - "sensitivity", - "lowThresholds", - "highThresholds" - ], - "description": "The baseline values for a single sensitivity value." - }, - "BaselineMetadata": { - "properties": { - "name": { - "type": "string", - "description": "Name of the baseline metadata." - }, - "value": { - "type": "string", - "description": "Value of the baseline metadata." - } - }, - "required": [ - "name", - "value" - ], - "description": "Represents a baseline metadata value." - } - }, - "parameters": { - "ResourceUriParameter": { - "name": "resourceUri", - "in": "path", - "required": true, - "type": "string", - "description": "The identifier of the resource.", - "x-ms-parameter-location": "method", - "x-ms-skip-url-encoding": true - }, - "TimespanParameter": { - "name": "timespan", - "in": "query", - "required": false, - "type": "string", - "description": "The timespan of the query. It is a string with the following format 'startDateTime_ISO/endDateTime_ISO'.", - "x-ms-parameter-location": "method" - }, - "IntervalParameter": { - "name": "interval", - "in": "query", - "required": false, - "type": "string", - "format": "duration", - "description": "The interval (i.e. timegrain) of the query.", - "x-ms-parameter-location": "method" - }, - "MetricNamesParameter": { - "name": "metricnames", - "in": "query", - "required": false, - "type": "string", - "description": "The names of the metrics (comma separated) to retrieve.", - "x-ms-parameter-location": "method" - }, - "MetricNamespaceParameter": { - "name": "metricnamespace", - "in": "query", - "required": false, - "type": "string", - "description": "Metric namespace to query metric definitions for.", - "x-ms-parameter-location": "method" - }, - "AggregationsParameter": { - "name": "aggregation", - "in": "query", - "required": false, - "type": "string", - "description": "The list of aggregation types (comma separated) to retrieve.", - "x-ms-parameter-location": "method" - }, - "SensitivitiesParameter": { - "name": "sensitivities", - "in": "query", - "required": false, - "type": "string", - "description": "The list of sensitivities (comma separated) to retrieve.", - "x-ms-parameter-location": "method" - }, - "BaselineResultTypeParameter": { - "name": "resultType", - "in": "query", - "type": "string", - "enum": [ - "Data", - "Metadata" - ], - "x-ms-enum": { - "name": "ResultType", - "modelAsString": false - }, - "description": "Allows retrieving only metadata of the baseline. On data request all information is retrieved.", - "x-ms-parameter-location": "method", - "required": false - }, - "ApiVersionParameter": { - "name": "api-version", - "in": "query", - "required": true, - "type": "string", - "description": "Client Api Version." - } - } -}