From dd21cfc75c5d51d7ed017b62d43151aca41ffdb0 Mon Sep 17 00:00:00 2001 From: Hyuk Jun Park Date: Tue, 21 Jan 2020 16:26:34 -0800 Subject: [PATCH 1/5] add disabled property to digest config, change type of frequency property --- .../Microsoft.Advisor/stable/2020-01-01/advisor.json | 11 ++++++++--- .../2020-01-01/examples/CreateConfiguration.json | 4 ++-- .../2020-01-01/examples/ListConfigurations.json | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json index a27ec8719e47..3e6fbf8a593a 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json @@ -863,8 +863,9 @@ "type": "string" }, "frequency": { - "description": "Frequency that digest will be triggered. Value must conform to ISO 8601 standard and must be greater than equal to 7 day and less than or equal to 30 days.", - "type": "string" + "format": "int32", + "description": "Frequency that digest will be triggered, in days. Value must be greater than equal to 7 day and less than or equal to 30 days.", + "type": "integer" }, "categories": { "description": "Categories to send digest for. If categories are not provided, then digest will be sent for all categories.", @@ -887,7 +888,11 @@ "language": { "description": "Language for digest content body. Value must be ISO 639-1 code for one of Azure portal supported languages. Otherwise, it will be converted into one. Default value is English (en).", "type": "string" - } + }, + "disabled": { + "description": "Flag that determines if this digest configuration is disabled or not.", + "type": "boolean" + } } }, "ArmErrorResponse": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json index 0fca0235a9a8..d0b4a17b0dfa 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json @@ -10,7 +10,7 @@ "digests": [ { "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", - "frequency": "P30D", + "frequency": "30", "categories": [ "HighAvailability", "Security", @@ -37,7 +37,7 @@ "digests": [ { "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", - "frequency": "P30D", + "frequency": "30", "categories": [ "HighAvailability", "Security", diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json index 256e6795202f..77b978909974 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json @@ -18,7 +18,7 @@ "digests": [ { "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", - "frequency": "P30D", + "frequency": "30", "categories": [ "HighAvailability", "Security", From 09e1aa45306b5097a7642a3be6f7eec32c817487 Mon Sep 17 00:00:00 2001 From: Hyuk Jun Park Date: Tue, 21 Jan 2020 16:32:11 -0800 Subject: [PATCH 2/5] fix examples --- .../2020-01-01/examples/CreateConfiguration.json | 10 ++++++---- .../stable/2020-01-01/examples/ListConfigurations.json | 5 +++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json index d0b4a17b0dfa..e5828688a84b 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json @@ -10,7 +10,7 @@ "digests": [ { "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", - "frequency": "30", + "frequency": 30, "categories": [ "HighAvailability", "Security", @@ -18,7 +18,8 @@ "Cost", "OperationalExcellence" ], - "language": "en" + "language": "en", + "disabled": false } ] } @@ -37,7 +38,7 @@ "digests": [ { "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", - "frequency": "30", + "frequency": 30, "categories": [ "HighAvailability", "Security", @@ -45,7 +46,8 @@ "Cost", "OperationalExcellence" ], - "language": "en" + "language": "en", + "disabled": false } ] } diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json index 77b978909974..a780972ab81c 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json @@ -18,7 +18,7 @@ "digests": [ { "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", - "frequency": "30", + "frequency": 30, "categories": [ "HighAvailability", "Security", @@ -26,7 +26,8 @@ "Cost", "OperationalExcellence" ], - "language": "en" + "language": "en", + "disabled": false } ] } From fb66ef11c8d6dd231a443831774a0f2b766a72db Mon Sep 17 00:00:00 2001 From: Hyuk Jun Park Date: Wed, 22 Jan 2020 13:08:14 -0800 Subject: [PATCH 3/5] change bool to enum --- .../stable/2020-01-01/advisor.json | 16 ++++++++++++---- .../2020-01-01/examples/CreateConfiguration.json | 4 ++-- .../2020-01-01/examples/ListConfigurations.json | 2 +- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json index 3e6fbf8a593a..74d324890dec 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json @@ -889,10 +889,18 @@ "description": "Language for digest content body. Value must be ISO 639-1 code for one of Azure portal supported languages. Otherwise, it will be converted into one. Default value is English (en).", "type": "string" }, - "disabled": { - "description": "Flag that determines if this digest configuration is disabled or not.", - "type": "boolean" - } + "state": { + "description": "State of digest configuration.", + "enum": [ + "Active", + "Disabled" + ], + "type": "string", + "x-ms-enum": { + "name": "DigestConfigState", + "modelAsString": true + } + } } }, "ArmErrorResponse": { diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json index e5828688a84b..66c29d42a756 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json @@ -19,7 +19,7 @@ "OperationalExcellence" ], "language": "en", - "disabled": false + "state": "Active" } ] } @@ -47,7 +47,7 @@ "OperationalExcellence" ], "language": "en", - "disabled": false + "state": "Active" } ] } diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json index a780972ab81c..70bd452ab43a 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json @@ -27,7 +27,7 @@ "OperationalExcellence" ], "language": "en", - "disabled": false + "state": "Active" } ] } From 28509dd5b9e9de3bdc7447fbc22be8808e6566ca Mon Sep 17 00:00:00 2001 From: Hyuk Jun Park Date: Wed, 22 Jan 2020 17:29:08 -0800 Subject: [PATCH 4/5] add name property --- .../Microsoft.Advisor/stable/2020-01-01/advisor.json | 4 ++++ .../stable/2020-01-01/examples/CreateConfiguration.json | 2 ++ .../stable/2020-01-01/examples/ListConfigurations.json | 1 + 3 files changed, 7 insertions(+) diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json index 74d324890dec..e78776640ae9 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json @@ -858,6 +858,10 @@ "description": "Advisor Digest configuration entity", "type": "object", "properties": { + "name": { + "description": "Name of digest configuration. Value is case-insensitive and must be unique within a subscription.", + "type": "string" + }, "actionGroupResourceId": { "description": "Action group resource id used by digest.", "type": "string" diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json index 66c29d42a756..46c40dda7cc8 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json @@ -9,6 +9,7 @@ "exclude": true, "digests": [ { + "name": "digestConfigName", "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", "frequency": 30, "categories": [ @@ -37,6 +38,7 @@ "exclude": true, "digests": [ { + "name": "digestConfigName", "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", "frequency": 30, "categories": [ diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json index 70bd452ab43a..53ca4acd1cef 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json @@ -17,6 +17,7 @@ "exclude": false, "digests": [ { + "name": "digestConfigName", "actionGroupResourceId": "/subscriptions/subscriptionId/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName", "frequency": 30, "categories": [ From e6c7e0828bd4f9d8d06428156b5e4ce14cce5792 Mon Sep 17 00:00:00 2001 From: Hyuk Jun Park Date: Thu, 23 Jan 2020 10:49:14 -0800 Subject: [PATCH 5/5] apply prettier and fix frequency description --- .../Microsoft.Advisor/stable/2020-01-01/advisor.json | 12 ++++++++---- .../2020-01-01/examples/CreateConfiguration.json | 2 +- .../2020-01-01/examples/ListConfigurations.json | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json index e78776640ae9..1b828b108923 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/advisor.json @@ -157,7 +157,9 @@ "description": "Advisor configuration name. Value must be 'default'", "required": true, "type": "string", - "enum": ["default"], + "enum": [ + "default" + ], "x-ms-enum": { "name": "ConfigurationName", "modelAsString": true @@ -262,7 +264,9 @@ "description": "Advisor configuration name. Value must be 'default'", "required": true, "type": "string", - "enum": ["default"], + "enum": [ + "default" + ], "x-ms-enum": { "name": "ConfigurationName", "modelAsString": true @@ -868,8 +872,8 @@ }, "frequency": { "format": "int32", - "description": "Frequency that digest will be triggered, in days. Value must be greater than equal to 7 day and less than or equal to 30 days.", - "type": "integer" + "description": "Frequency that digest will be triggered, in days. Value must be between 7 and 30 days inclusive.", + "type": "integer" }, "categories": { "description": "Categories to send digest for. If categories are not provided, then digest will be sent for all categories.", diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json index 46c40dda7cc8..89c602edafc0 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/CreateConfiguration.json @@ -56,4 +56,4 @@ } } } -} \ No newline at end of file +} diff --git a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json index 53ca4acd1cef..338c67ebfaa4 100644 --- a/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json +++ b/specification/advisor/resource-manager/Microsoft.Advisor/stable/2020-01-01/examples/ListConfigurations.json @@ -38,4 +38,4 @@ } } } -} \ No newline at end of file +}