From ce770981c16efc89f53ff4522de8f57a3d8fec82 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Tue, 14 Feb 2023 15:23:16 -0800 Subject: [PATCH 1/7] Add 200 responses for Return to fix SDK --- .../stable/2022-11-01/examples/Return.json | 24 +++++++++++++++++++ .../stable/2022-11-01/reservations.json | 6 +++++ 2 files changed, 30 insertions(+) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json index 1e892b5c39cb..bcce783a8c5b 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json @@ -15,6 +15,30 @@ } }, "responses": { + "200": { + "body": { + "id": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004", + "type": "Microsoft.Capacity/reservationOrders", + "name": "50000000-aaaa-bbbb-cccc-100000000004", + "etag": 7, + "properties": { + "displayName": "cabri", + "requestDateTime": "2017-08-30T03:49:19.0252126Z", + "createdDateTime": "2017-08-30T03:51:49.8083758Z", + "expiryDate": "2018-08-30", + "expiryDateTime": "2018-08-30T03:51:49.8083758Z", + "term": "P1Y", + "billingPlan": "Monthly", + "provisioningState": "Succeeded", + "reservations": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000" + } + ], + "originalQuantity": 7 + } + } + }, "202": { "headers": { "Location": "https://management.azure.com/providers/Microsoft.Capacity/reservationorders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000?api-version=2022-11-01" diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json index d0a63c83a5e5..5f07f02792dd 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json @@ -867,6 +867,12 @@ "Return" ], "responses": { + "200": { + "description": "The resource has been returned", + "schema": { + "$ref": "#/definitions/ReservationOrderResponse" + } + }, "202": { "description": "Detailed refund info of a reservation", "headers": { From 16a5753624b2214b584e3f788181cb161ca1afea Mon Sep 17 00:00:00 2001 From: chchen3 Date: Tue, 14 Feb 2023 16:08:37 -0800 Subject: [PATCH 2/7] Add additional non required property and extra info in description --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json index 5f07f02792dd..a8ae5a93e3dd 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json @@ -2798,6 +2798,10 @@ } } }, + "instanceFlexibility": { + "description": "Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility.", + "$ref": "#/definitions/InstanceFlexibility" + }, "reviewDateTime": { "type": "string", "format": "date-time", @@ -3264,7 +3268,7 @@ }, "AppliedScopes": { "type": "array", - "description": "List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.", + "description": "List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Sinlge AppliedScopeType.", "items": { "type": "string", "minItems": 1, From 83f306dc4b568e46991bb507001cb037279c4fdc Mon Sep 17 00:00:00 2001 From: chchen3 Date: Wed, 15 Feb 2023 15:12:59 -0800 Subject: [PATCH 3/7] Add p3Y, p5Y for msrp response. Fix typo --- .../stable/2022-11-01/reservations.json | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json index a8ae5a93e3dd..999177cd12f4 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json @@ -1592,6 +1592,16 @@ "type": "object", "$ref": "#/definitions/Price", "description": "Amount in pricing currency. Tax not included." + }, + "p3Y": { + "type": "object", + "$ref": "#/definitions/Price", + "description": "Amount in pricing currency. Tax not included." + }, + "p5Y": { + "type": "object", + "$ref": "#/definitions/Price", + "description": "Amount in pricing currency. Tax not included." } } }, @@ -3268,7 +3278,7 @@ }, "AppliedScopes": { "type": "array", - "description": "List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Sinlge AppliedScopeType.", + "description": "List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared. This property will be deprecated and replaced by appliedScopeProperties instead for Single AppliedScopeType.", "items": { "type": "string", "minItems": 1, From 308df1dd4e491bcc24da74ef0797b23ef017ad1d Mon Sep 17 00:00:00 2001 From: chchen3 Date: Thu, 16 Feb 2023 18:10:16 -0800 Subject: [PATCH 4/7] update example to use reservationOrder call --- .../Microsoft.Capacity/stable/2022-11-01/examples/Return.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json index bcce783a8c5b..ba59aac9bc89 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json @@ -41,7 +41,7 @@ }, "202": { "headers": { - "Location": "https://management.azure.com/providers/Microsoft.Capacity/reservationorders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000?api-version=2022-11-01" + "Location": "https://management.azure.com/providers/Microsoft.Capacity/reservationorders/50000000-aaaa-bbbb-cccc-100000000004?api-version=2022-11-01" }, "body": { "id": "/providers/Microsoft.Capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", From ec68e177ad51d3ed3048c385b04e6d0a27dfe03d Mon Sep 17 00:00:00 2001 From: chchen3 Date: Mon, 27 Feb 2023 10:37:28 -0800 Subject: [PATCH 5/7] remove instanceFlexibility which will be deprecated in the near future --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 4 ---- 1 file changed, 4 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json index 999177cd12f4..a88ca69b2566 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json @@ -2808,10 +2808,6 @@ } } }, - "instanceFlexibility": { - "description": "Allows reservation discount to be applied across skus within the same auto fit group. Not all skus support instance size flexibility.", - "$ref": "#/definitions/InstanceFlexibility" - }, "reviewDateTime": { "type": "string", "format": "date-time", From d88c5ba12e6c1e2579be3bf804c5bdb429443113 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Mon, 27 Feb 2023 11:04:32 -0800 Subject: [PATCH 6/7] add final state schema in long running operations field instead of introduce 200 --- .../stable/2022-11-01/reservations.json | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json index a88ca69b2566..8e6077c996aa 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json @@ -850,7 +850,8 @@ }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { - "final-state-via": "location" + "final-state-via": "location", + "final-state-schema": "#/definitions/ReservationOrderResponse" }, "parameters": [ { @@ -867,12 +868,6 @@ "Return" ], "responses": { - "200": { - "description": "The resource has been returned", - "schema": { - "$ref": "#/definitions/ReservationOrderResponse" - } - }, "202": { "description": "Detailed refund info of a reservation", "headers": { From ffdb0a2d72b7f2c747d28c4f0b701535b97c1f33 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Wed, 1 Mar 2023 10:50:47 -0800 Subject: [PATCH 7/7] add 200 back since azure cli and powershell currently still doesn't support final-state-schema --- .../stable/2022-11-01/reservations.json | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json index 8e6077c996aa..a88ca69b2566 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json @@ -850,8 +850,7 @@ }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { - "final-state-via": "location", - "final-state-schema": "#/definitions/ReservationOrderResponse" + "final-state-via": "location" }, "parameters": [ { @@ -868,6 +867,12 @@ "Return" ], "responses": { + "200": { + "description": "The resource has been returned", + "schema": { + "$ref": "#/definitions/ReservationOrderResponse" + } + }, "202": { "description": "Detailed refund info of a reservation", "headers": {