From aa9fde1397983728c903404fa349fa5e2f01ca81 Mon Sep 17 00:00:00 2001 From: Prajakta Pednekar Date: Mon, 15 Nov 2021 15:22:31 -0800 Subject: [PATCH 1/3] Fix s360 error --- .../stable/2021-10-01/consumption.json | 27 +++++++++++++++++++ ...rvationRecommendationsByResourceGroup.json | 6 +++-- ...ervationRecommendationsBySubscription.json | 6 +++-- ...rBySubscriptionForScopeLookBackPeriod.json | 6 +++-- 4 files changed, 39 insertions(+), 6 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json index a4fdc3bcf6e1..88ef724e44b8 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json @@ -3391,6 +3391,7 @@ }, "LegacyReservationRecommendationProperties": { "description": "The properties of the reservation recommendation.", + "discriminator": "scope", "properties": { "lookBackPeriod": { "description": "The number of days of usage to look back for recommendation.", @@ -3478,6 +3479,32 @@ } } }, + "LegacySingleScopeReservationRecommendationProperties": { + "description": "The properties of the legacy reservation recommendation for single scope.", + "x-ms-discriminator-value": "Single", + "properties": { + "subscriptionId": { + "description": "Subscription id associated with single scoped recommendation.", + "type": "string", + "format": "uuid", + "readOnly": true + } + }, + "allOf": [ + { + "$ref": "#/definitions/LegacyReservationRecommendationProperties" + } + ] + }, + "LegacySharedScopeReservationRecommendationProperties": { + "description": "The properties of the legacy reservation recommendation for shared scope.", + "x-ms-discriminator-value": "Shared", + "allOf": [ + { + "$ref": "#/definitions/LegacyReservationRecommendationProperties" + } + ] + }, "SkuProperty": { "description": "The Sku property", "properties": { diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByResourceGroup.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByResourceGroup.json index b8bffa6f6599..1a1c1fb6979e 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByResourceGroup.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsByResourceGroup.json @@ -23,7 +23,8 @@ "totalCostWithReservedInstances": 0.0, "netSavings": 4.634521202630137, "firstUsageDate": "2018-03-06T00:00:00Z", - "scope": "Single" + "scope": "Single", + "subscriptionId": "00000000-0000-0000-0000-000000000000" } }, { @@ -42,7 +43,8 @@ "totalCostWithReservedInstances": 0.0, "netSavings": 7.2893157231780812, "firstUsageDate": "2018-03-06T00:00:00Z", - "scope": "Single" + "scope": "Single", + "subscriptionId": "00000000-0000-0000-0000-000000000000" } } ], diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsBySubscription.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsBySubscription.json index 36621416fe9a..eb4ec8490475 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsBySubscription.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsBySubscription.json @@ -23,7 +23,8 @@ "totalCostWithReservedInstances": 0.0, "netSavings": 4.634521202630137, "firstUsageDate": "2018-03-06T00:00:00Z", - "scope": "Single" + "scope": "Single", + "subscriptionId": "00000000-0000-0000-0000-000000000000" } }, { @@ -42,7 +43,8 @@ "totalCostWithReservedInstances": 0.0, "netSavings": 7.2893157231780812, "firstUsageDate": "2018-03-06T00:00:00Z", - "scope": "Single" + "scope": "Single", + "subscriptionId": "00000000-0000-0000-0000-000000000000" } } ], diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json index 4c24a92af6a3..bbca5db6fd42 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/examples/ReservationRecommendationsFilterBySubscriptionForScopeLookBackPeriod.json @@ -34,7 +34,8 @@ "name": "Ram", "value": "1" } - ] + ], + "subscriptionId": "00000000-0000-0000-0000-000000000000" } }, { @@ -63,7 +64,8 @@ "name": "CPU", "value": "1" } - ] + ], + "subscriptionId": "00000000-0000-0000-0000-000000000000" } } ], From 9b9bfc8f6a1bf40c5c34b45aa19a4220a5089c62 Mon Sep 17 00:00:00 2001 From: Prajakta Pednekar Date: Mon, 15 Nov 2021 15:41:15 -0800 Subject: [PATCH 2/3] Fix errors --- .../stable/2021-10-01/consumption.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json index 88ef724e44b8..ee47d598f4be 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json @@ -3391,6 +3391,7 @@ }, "LegacyReservationRecommendationProperties": { "description": "The properties of the reservation recommendation.", + "type": "object", "discriminator": "scope", "properties": { "lookBackPeriod": { @@ -3477,7 +3478,10 @@ }, "readOnly": true } - } + }, + "required": [ + "scope" + ] }, "LegacySingleScopeReservationRecommendationProperties": { "description": "The properties of the legacy reservation recommendation for single scope.", From c15c0092f0d0ddf9f8abe96d2b42799d32e238e1 Mon Sep 17 00:00:00 2001 From: Prajakta Pednekar Date: Mon, 15 Nov 2021 15:48:51 -0800 Subject: [PATCH 3/3] Fix errors --- .../Microsoft.Consumption/stable/2021-10-01/consumption.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json index ee47d598f4be..5e0cf981b646 100644 --- a/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json +++ b/specification/consumption/resource-manager/Microsoft.Consumption/stable/2021-10-01/consumption.json @@ -3467,8 +3467,7 @@ }, "scope": { "description": "Shared or single recommendation.", - "type": "string", - "readOnly": true + "type": "string" }, "skuProperties": { "description": "List of sku properties", @@ -3485,6 +3484,7 @@ }, "LegacySingleScopeReservationRecommendationProperties": { "description": "The properties of the legacy reservation recommendation for single scope.", + "type": "object", "x-ms-discriminator-value": "Single", "properties": { "subscriptionId": { @@ -3502,6 +3502,7 @@ }, "LegacySharedScopeReservationRecommendationProperties": { "description": "The properties of the legacy reservation recommendation for shared scope.", + "type": "object", "x-ms-discriminator-value": "Shared", "allOf": [ {