From 18d9804d80e2468d9d3021da658d4bc3e05be2ff Mon Sep 17 00:00:00 2001 From: gaoyp830 <51546332+gaoyp830@users.noreply.github.com> Date: Thu, 10 Nov 2022 16:28:19 -0800 Subject: [PATCH 01/30] Adds base for updating Microsoft.Capacity from version stable/2022-03-01 to version 2022-11-01 --- .../stable/2022-11-01/examples/Archive.json | 10 + .../examples/CalculateExchange.json | 123 + .../2022-11-01/examples/CalculateRefund.json | 70 + .../examples/CalculateReservationOrder.json | 70 + .../ChangeDirectoryReservationOrder.json | 29 + .../stable/2022-11-01/examples/Exchange.json | 100 + .../examples/GetAppliedReservations.json | 34 + .../examples/GetAvailableScope.json | 28 + .../2022-11-01/examples/GetCatalog.json | 169 + .../2022-11-01/examples/GetOperations.json | 103 + .../examples/GetReservationDetails.json | 81 + .../examples/GetReservationOrderDetails.json | 32 + ...OrderDetailsWithExpandPlanInformation.json | 131 + .../examples/GetReservationOrders.json | 80 + .../examples/GetReservationRevisions.json | 146 + .../2022-11-01/examples/GetReservations.json | 78 + .../examples/GetReservationsFromOrder.json | 198 + .../examples/MergeReservations.json | 131 + .../examples/PurchaseReservationOrder.json | 74 + .../stable/2022-11-01/examples/Return.json | 66 + .../2022-11-01/examples/SplitReservation.json | 122 + .../stable/2022-11-01/examples/Unarchive.json | 10 + .../examples/UpdateReservation.json | 49 + .../stable/2022-11-01/reservations.json | 3258 +++++++++++++++++ 24 files changed, 5192 insertions(+) create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Archive.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateRefund.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateReservationOrder.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/ChangeDirectoryReservationOrder.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAppliedReservations.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAvailableScope.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetOperations.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Unarchive.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json create mode 100644 specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Archive.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Archive.json new file mode 100644 index 000000000000..1ad4154bf435 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Archive.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "reservationId": "356e7ae4-84d0-4da6-ab4b-d6b94f3557da" + }, + "responses": { + "200": {} + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json new file mode 100644 index 000000000000..ad5b0e0b41e3 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json @@ -0,0 +1,123 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "body": { + "properties": { + "reservationsToPurchase": [ + { + "sku": { + "name": "Standard_B1ls" + }, + "location": "westus", + "properties": { + "reservedResourceType": "VirtualMachines", + "billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83", + "term": "P1Y", + "billingPlan": "Upfront", + "quantity": 1, + "displayName": "testDisplayName", + "appliedScopeType": "Shared", + "appliedScopes": null, + "renew": false, + "reservedResourceProperties": { + "instanceFlexibility": "On" + } + } + } + ], + "reservationsToExchange": [ + { + "reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6", + "quantity": 1 + } + ] + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/microsoft.capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188", + "name": "4e2ffff7-b331-4fcb-ab11-b5fa49368188", + "status": "Succeeded", + "properties": { + "sessionId": "66e2ac8f-439e-4345-8235-6fef07608081", + "netPayable": { + "currencyCode": "USD", + "amount": 15840.0 + }, + "refundsTotal": { + "currencyCode": "USD", + "amount": 3960.0 + }, + "purchasesTotal": { + "currencyCode": "USD", + "amount": 19800.0 + }, + "policyResult": { + "policyErrors": null + }, + "reservationsToPurchase": [ + { + "properties": { + "sku": { + "name": "Standard_B1ls" + }, + "location": "westus", + "properties": { + "reservedResourceType": "VirtualMachines", + "billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83", + "term": "P1Y", + "billingPlan": "Upfront", + "quantity": 1, + "displayName": "testDisplayName", + "appliedScopeType": "Shared", + "appliedScopes": null, + "renew": false, + "reservedResourceProperties": { + "instanceFlexibility": "On" + } + } + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 19800.0 + } + } + ], + "reservationsToExchange": [ + { + "reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6", + "quantity": 1, + "billingRefundAmount": { + "currencyCode": "USD", + "amount": 3960.0 + }, + "billingInformation": { + "billingCurrencyTotalPaidAmount": { + "currencyCode": "USD", + "amount": 19800.0 + }, + "billingCurrencyProratedAmount": { + "currencyCode": "USD", + "amount": 15840.0 + }, + "billingCurrencyRemainingCommitmentAmount": { + "currencyCode": "USD", + "amount": 0.0 + } + } + } + ] + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-03-01", + "Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-03-01", + "Retry-After": 5 + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateRefund.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateRefund.json new file mode 100644 index 000000000000..923a3eafe54e --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateRefund.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "body": { + "id": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004", + "properties": { + "scope": "Reservation", + "reservationToReturn": { + "reservationId": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", + "quantity": 1 + } + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/Microsoft.Capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", + "properties": { + "sessionId": "10000000-aaaa-bbbb-cccc-200000000000", + "quantity": 1, + "billingRefundAmount": { + "currencyCode": "GBP", + "amount": 20.72 + }, + "pricingRefundAmount": { + "currencyCode": "USD", + "amount": 24.92 + }, + "policyResult": { + "properties": { + "consumedRefundsTotal": { + "currencyCode": "USD", + "amount": 83.69 + }, + "maxRefundLimit": { + "currencyCode": "USD", + "amount": 50000.0 + }, + "policyErrors": [ + { + "code": "SelfServiceRefundNotSupported", + "message": "Self Service refunds are currently not supported for this resource, please contact support." + } + ] + } + }, + "billingInformation": { + "billingPlan": "Upfront", + "completedTransactions": 1, + "totalTransactions": 1, + "billingCurrencyTotalPaidAmount": { + "currencyCode": "GBP", + "amount": 24.0 + }, + "billingCurrencyProratedAmount": { + "currencyCode": "GBP", + "amount": 3.28 + }, + "billingCurrencyRemainingCommitmentAmount": { + "currencyCode": "GBP", + "amount": 0.0 + } + } + } + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateReservationOrder.json new file mode 100644 index 000000000000..7756fd1974c5 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateReservationOrder.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "body": { + "sku": { + "name": "standard_D1" + }, + "location": "westus", + "properties": { + "reservedResourceType": "VirtualMachines", + "billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83", + "term": "P1Y", + "billingPlan": "Monthly", + "quantity": 1, + "displayName": "TestReservationOrder", + "appliedScopes": null, + "appliedScopeType": "Shared", + "reservedResourceProperties": { + "instanceFlexibility": "On" + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 46.0 + }, + "reservationOrderId": "6d9cec54-7de8-abcd-9de7-80f5d634f2d2", + "skuTitle": "Reserved VM Instance, Standard_D1, US West, 1 Year", + "skuDescription": "standard_D1", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 46.0 + }, + "paymentSchedule": [ + { + "dueDate": "2019-05-14", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 46 + }, + "billingCurrencyTotal": { + "currencyCode": "EUR", + "amount": 40 + } + }, + { + "dueDate": "2019-06-14", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 46 + } + }, + { + "dueDate": "2019-07-14", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 46 + } + } + ] + } + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/ChangeDirectoryReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/ChangeDirectoryReservationOrder.json new file mode 100644 index 000000000000..22b4b553806a --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/ChangeDirectoryReservationOrder.json @@ -0,0 +1,29 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9", + "body": { + "destinationTenantId": "906655ea-30be-4587-9d12-b50e077b0f32" + } + }, + "responses": { + "200": { + "body": { + "reservationOrder": { + "id": "a075419f-44cc-497f-b68a-14ee811d48b9", + "name": "VM_RI_10-02-2020_15-21", + "isSucceeded": true, + "error": "error string" + }, + "reservations": [ + { + "id": "1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "name": "VM_RI_10-02-2020_15-21", + "isSucceeded": true, + "error": "error string" + } + ] + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json new file mode 100644 index 000000000000..a63ff0aed628 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json @@ -0,0 +1,100 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "body": { + "properties": { + "sessionId": "66e2ac8f-439e-4345-8235-6fef07608081" + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/microsoft.capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188", + "name": "4e2ffff7-b331-4fcb-ab11-b5fa49368188", + "status": "Succeeded", + "properties": { + "sessionId": "66e2ac8f-439e-4345-8235-6fef07608081", + "netPayable": { + "currencyCode": "USD", + "amount": 15840.0 + }, + "refundsTotal": { + "currencyCode": "USD", + "amount": 3960.0 + }, + "purchasesTotal": { + "currencyCode": "USD", + "amount": 19800.0 + }, + "policyResult": { + "policyErrors": null + }, + "reservationsToPurchase": [ + { + "reservationOrderId": "/providers/microsoft.capacity/reservationOrders/1e85c519-b815-4169-8d79-62fc460c608f", + "reservationId": "/providers/microsoft.capacity/reservationOrders/1e85c519-b815-4169-8d79-62fc460c608f/reservations/0c80fceb-305c-40a8-b5a6-11445807bbb3", + "properties": { + "sku": { + "name": "Standard_B1ls" + }, + "location": "westus", + "properties": { + "reservedResourceType": "VirtualMachines", + "billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83", + "term": "P1Y", + "billingPlan": "Upfront", + "quantity": 1, + "displayName": "testDisplayName", + "appliedScopeType": "Shared", + "appliedScopes": null, + "renew": false, + "reservedResourceProperties": { + "instanceFlexibility": "On" + } + } + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 19800.0 + }, + "status": "Succeeded" + } + ], + "reservationsToExchange": [ + { + "reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6", + "quantity": 1, + "billingRefundAmount": { + "currencyCode": "USD", + "amount": 3960.0 + }, + "billingInformation": { + "billingCurrencyTotalPaidAmount": { + "currencyCode": "USD", + "amount": 19800.0 + }, + "billingCurrencyProratedAmount": { + "currencyCode": "USD", + "amount": 15840.0 + }, + "billingCurrencyRemainingCommitmentAmount": { + "currencyCode": "USD", + "amount": 0.0 + } + }, + "status": "Succeeded" + } + ] + } + } + }, + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-03-01", + "Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-03-01", + "Retry-After": 5 + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAppliedReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAppliedReservations.json new file mode 100644 index 000000000000..f4fb03ebbd12 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAppliedReservations.json @@ -0,0 +1,34 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "subscriptionId": "23bc208b-083f-4901-ae85-4f98c0c3b4b6" + }, + "responses": { + "200": { + "body": { + "id": "/subscriptions/23bc208b-083f-4901-ae85-4f98c0c3b4b6/providers/microsoft.capacity/AppliedReservations/default", + "type": "Microsoft.Capacity/AppliedReservations", + "name": "default", + "properties": { + "reservationOrderIds": { + "value": [ + "/providers/Microsoft.Capacity/reservationorders/e1eccf0b-2db4-4e84-97e7-98b50e9d46f7", + "/providers/Microsoft.Capacity/reservationorders/741a32eb-6158-4cee-9642-a0243ae79fac", + "/providers/Microsoft.Capacity/reservationorders/e061223d-fcff-4d10-bd49-56a740cfb96a", + "/providers/Microsoft.Capacity/reservationorders/2eeb7234-970e-4663-b60b-85241b515901", + "/providers/Microsoft.Capacity/reservationorders/9db2f4c5-b1c5-42a8-bd79-ee56cdde2c7f", + "/providers/Microsoft.Capacity/reservationorders/5da7a877-6d6e-44af-8880-ed3f533bf928", + "/providers/Microsoft.Capacity/reservationorders/f65b0d0a-f945-4105-821c-d00bc8bacde8", + "/providers/Microsoft.Capacity/reservationorders/51304124-e477-4b07-b9fa-03b05c8b924b", + "/providers/Microsoft.Capacity/reservationorders/f5409b98-8a42-4dc6-be0a-cc59bef4d0db", + "/providers/Microsoft.Capacity/reservationorders/a495550a-80a4-46f8-8843-34d4df46f9a6", + "/providers/Microsoft.Capacity/reservationorders/1a966e18-c272-4ce1-a0c2-d4e1039023c3", + "/providers/Microsoft.Capacity/reservationorders/939310b4-f9de-4645-9569-ab5b6cfe958e", + "/providers/Microsoft.Capacity/reservationorders/4193a889-7c3b-44dc-8b7b-bfd7aad6c723" + ] + } + } + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAvailableScope.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAvailableScope.json new file mode 100644 index 000000000000..839bdec88eca --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAvailableScope.json @@ -0,0 +1,28 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "reservationId": "356e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "body": { + "properties": { + "scopes": [ + "/subscriptions/efc7c997-7700-4a74-b731-55aec16c15e9" + ] + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "scopes": [ + { + "scope": "/subscriptions/efc7c997-7700-4a74-b731-55aec16c15e9", + "valid": true + } + ] + } + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json new file mode 100644 index 000000000000..534acf51a3b1 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json @@ -0,0 +1,169 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "subscriptionId": "23bc208b-083f-4901-ae85-4f98c0c3b4b6", + "reservedResourceType": "VirtualMachines", + "location": "eastus" + }, + "responses": { + "200": { + "body": [ + { + "resourceType": "VirtualMachines", + "name": "Standard_DS5_v2", + "terms": [ + "P1Y", + "P3Y" + ], + "billingPlans": { + "P1Y": [ + "Upfront", + "Monthly" + ], + "P3Y": [ + "Upfront", + "Monthly" + ] + }, + "locations": [ + "eastus" + ], + "skuProperties": [ + { + "name": "Cores", + "value": "16" + }, + { + "name": "ProductTitle", + "value": "DSv2 Series, DS5" + }, + { + "name": "ProductShortName", + "value": "DSv2 Series" + }, + { + "name": "SKUName", + "value": "DS5 v2" + }, + { + "name": "MeterId", + "value": "12bc208b-083f-4901-ae85-4f98c0c3b4b8" + } + ], + "restrictions": [] + }, + { + "resourceType": "VirtualMachines", + "name": "Standard_D1", + "terms": [ + "P1Y", + "P3Y" + ], + "billingPlans": { + "P1Y": [ + "Upfront", + "Monthly" + ], + "P3Y": [ + "Upfront", + "Monthly" + ] + }, + "locations": [ + "eastus" + ], + "skuProperties": [ + { + "name": "Cores", + "value": "1" + }, + { + "name": "ProductTitle", + "value": "D Series, D1" + }, + { + "name": "ProductShortName", + "value": "D Series" + }, + { + "name": "SKUName", + "value": "D1" + }, + { + "name": "MeterId", + "value": "12bc208b-083f-4901-ae85-4f98c0c3b4b8" + } + ], + "restrictions": [ + { + "type": "Term", + "values": [ + "P1Y" + ], + "reasonCode": "NotAvailableForSubscription" + }, + { + "type": "Term", + "values": [ + "P3Y" + ], + "reasonCode": "NotAvailableForSubscription" + } + ] + }, + { + "resourceType": "VirtualMachines", + "name": "Standard_F2", + "terms": [ + "P1Y", + "P3Y" + ], + "billingPlans": { + "P1Y": [ + "Upfront", + "Monthly" + ], + "P3Y": [ + "Upfront", + "Monthly" + ] + }, + "locations": [ + "eastus" + ], + "skuProperties": [ + { + "name": "Cores", + "value": "2" + }, + { + "name": "ProductTitle", + "value": "F Series, F2" + }, + { + "name": "ProductShortName", + "value": "F Series" + }, + { + "name": "SKUName", + "value": "F2" + }, + { + "name": "MeterId", + "value": "12bc208b-083f-4901-ae85-4f98c0c3b4b8" + } + ], + "restrictions": [ + { + "type": "Location", + "values": [ + "eastus" + ], + "reasonCode": "NotAvailableForSubscription" + } + ] + } + ] + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetOperations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetOperations.json new file mode 100644 index 000000000000..b59341efb650 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetOperations.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "api-version": "2022-03-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "name": "Microsoft.Capacity/reservationorders/read", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Get Reservations", + "description": "Read All Reservations" + } + }, + { + "name": "Microsoft.Capacity/reservationorders/write", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Create Reservations", + "description": "Create any Reservation" + } + }, + { + "name": "Microsoft.Capacity/reservationorders/action", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Update Reservations", + "description": "Update any Reservation" + } + }, + { + "name": "Microsoft.Capacity/reservationorders/delete", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Delete Reservations", + "description": "Delete any Reservation" + } + }, + { + "name": "Microsoft.Capacity/reservationorders/reservations/read", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Get Reservations", + "description": "Read All Reservations" + } + }, + { + "name": "Microsoft.Capacity/reservationorders/reservations/write", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Create Reservations", + "description": "Create any Reservation" + } + }, + { + "name": "Microsoft.Capacity/reservationorders/reservations/action", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Update Reservations", + "description": "Update any Reservation" + } + }, + { + "name": "Microsoft.Capacity/reservationorders/reservations/delete", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Delete Reservations", + "description": "Delete any Reservation" + } + }, + { + "name": "Microsoft.Capacity/reservationorders/reservations/revisions/read", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Get Reservations", + "description": "Read All Reservations" + } + }, + { + "name": "Microsoft.Capacity/register/action", + "display": { + "provider": "Microsoft Capacity", + "resource": "Reservations", + "operation": "Registers the Capacity Resource Provider.", + "description": "Registers the Capacity resource provider and enables the creation of Capacity resources." + } + } + ] + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json new file mode 100644 index 000000000000..bb5946a16bbd --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json @@ -0,0 +1,81 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "reservationId": "6ef59113-3482-40da-8d79-787f823e34bc", + "expand": "renewProperties" + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc", + "etag": 2, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "renewSource": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "renewDestination": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "billingPlan": "Monthly", + "quantity": 3, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", + "benefitStartTime": "2017-09-22T22:46:32.7632798Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "Off", + "skuDescription": "D1 v2", + "term": "P1Y", + "mergeProperties": { + "mergeSources": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + }, + "renewProperties": { + "purchaseProperties": { + "sku": { + "name": "Standard_D1" + }, + "location": "westus", + "properties": { + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "term": "P1Y", + "quantity": 2, + "displayName": "Renew_Test_0618", + "appliedScopeType": "Shared", + "reservedResourceType": "VirtualMachines", + "reservedResourceProperties": { + "instanceFlexibility": "On" + }, + "renew": false + } + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466.0 + }, + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466.0 + } + }, + "swapProperties": { + "swapSource": "/providers/microsoft.capacity/reservationOrders/63037ae3-385a-4716-ad77-02f42ce93c06/reservations/5c6383f5-3f2c-4159-ae74-j72i1c1a49bc" + } + } + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json new file mode 100644 index 000000000000..55e2f9f09c95 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9" + }, + "responses": { + "200": { + "body": { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "type": "Microsoft.Capacity/reservationOrders", + "name": "1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "etag": 7, + "properties": { + "displayName": "cabri", + "benefitStartTime": "2017-08-30T03:49:19.0252126Z", + "requestDateTime": "2017-08-30T03:49:19.0252126Z", + "createdDateTime": "2017-08-30T03:51:49.8083758Z", + "expiryDate": "2018-08-30", + "term": "P1Y", + "billingPlan": "Monthly", + "provisioningState": "Succeeded", + "reservations": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6" + } + ], + "originalQuantity": 7 + } + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json new file mode 100644 index 000000000000..bda636e7e605 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9", + "$expand": "schedule" + }, + "responses": { + "200": { + "body": { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "type": "Microsoft.Capacity/reservationOrders", + "name": "1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "etag": 7, + "properties": { + "displayName": "cabri", + "requestDateTime": "2019-08-30T03:49:19Z", + "createdDateTime": "2019-08-30T03:51:49Z", + "benefitStartTime": "2019-08-30T03:51:49Z", + "expiryDate": "2018-08-30", + "term": "P1Y", + "billingPlan": "Monthly", + "provisioningState": "Succeeded", + "reservations": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6" + } + ], + "originalQuantity": 7, + "planInformation": { + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "startDate": "2019-08-30", + "nextPaymentDueDate": "2019-09-30", + "transactions": [ + { + "dueDate": "2019-09-30", + "paymentDate": "2019-09-30", + "status": "Succeeded", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingAccount": "23456" + }, + { + "dueDate": "2019-10-30", + "paymentDate": "2019-10-30", + "status": "Failed", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "extendedStatusInfo": { + "statusCode": "PaymentDeclined", + "message": "Credit card charge failed." + }, + "billingAccount": "23456" + }, + { + "dueDate": "2019-10-31", + "paymentDate": "2019-10-31", + "status": "Succeeded", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingAccount": "23456" + }, + { + "dueDate": "2019-11-30", + "paymentDate": "2019-11-30", + "status": "Succeeded", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingAccount": "23456" + }, + { + "dueDate": "2019-07-14", + "paymentDate": "2019-06-14", + "status": "Scheduled", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingAccount": "23456" + }, + { + "dueDate": "2019-06-14", + "paymentDate": "2019-08-14", + "status": "Scheduled", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466 + }, + "billingAccount": "23456" + } + ] + } + } + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json new file mode 100644 index 000000000000..61ef57a4a274 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json @@ -0,0 +1,80 @@ +{ + "parameters": { + "api-version": "2022-03-01" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/1e6407ba-37a5-499f-80ed-a3f0f338e443", + "type": "Microsoft.Capacity/reservationOrders", + "name": "1e6407ba-37a5-499f-80ed-a3f0f338e443", + "etag": 7, + "properties": { + "displayName": "cabri", + "requestDateTime": "2017-08-29T21:20:23.8134834Z", + "createdDateTime": "2017-08-29T21:22:56.8541664Z", + "benefitStartTime": "2017-08-29T21:20:23.8134834Z", + "expiryDate": "2018-08-29", + "term": "P1Y", + "billingPlan": "Monthly", + "provisioningState": "Succeeded", + "reservations": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/1e6407ba-37a5-499f-80ed-a3f0f338e443/reservations/cae5924e-7a15-419f-a369-124f52d4a106" + } + ], + "originalQuantity": 1 + } + }, + { + "id": "/providers/microsoft.capacity/reservationOrders/1ea6e203-288e-4732-b9e1-da8bbe10c614", + "type": "Microsoft.Capacity/reservationOrders", + "name": "1ea6e203-288e-4732-b9e1-da8bbe10c614", + "etag": 7, + "properties": { + "displayName": "cabri", + "benefitStartTime": "2017-08-30T12:55:40.2799114Z", + "requestDateTime": "2017-08-30T12:55:40.2799114Z", + "createdDateTime": "2017-08-30T12:58:20.526Z", + "expiryDate": "2018-08-30", + "term": "P1Y", + "billingPlan": "Monthly", + "provisioningState": "Succeeded", + "reservations": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/1ea6e203-288e-4732-b9e1-da8bbe10c614/reservations/d04fd48d-e3f6-42a3-a8f6-1ad0b7513e48" + } + ], + "originalQuantity": 9 + } + }, + { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "type": "Microsoft.Capacity/reservationOrders", + "name": "1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "etag": 7, + "properties": { + "displayName": "cabri", + "benefitStartTime": "2017-08-30T03:49:19.0252126Z", + "requestDateTime": "2017-08-30T03:49:19.0252126Z", + "createdDateTime": "2017-08-30T03:51:49.8083758Z", + "expiryDate": "2018-08-30", + "term": "P1Y", + "billingPlan": "Monthly", + "provisioningState": "Succeeded", + "reservations": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6" + } + ], + "originalQuantity": 7 + } + } + ], + "nextLink": "https://management.azure.com/providers/Microsoft.Capacity/reservationOrders?api-version=2017-11-01&%24skiptoken=eyJyZyI6IjIwNTkyMzdlLWY3MmYtNDczYi1hNTZiLWExOGJkM2UwMDhlZCIsImlnIjpudWxsLCJzdCI6bnVsbH0%3d" + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json new file mode 100644 index 000000000000..646d30e9d72e --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json @@ -0,0 +1,146 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "reservationId": "6ef59113-3482-40da-8d79-787f823e34bc" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc/revisions/4", + "type": "Microsoft.Capacity/reservationOrders/reservations/revisions", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc/4", + "etag": 4, + "location": "eastus", + "properties": { + "appliedScopeType": "Shared", + "quantity": 3, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T23:57:48.1891638Z", + "lastUpdatedDateTime": "2017-09-22T23:57:54.3768768Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "On", + "skuDescription": "D1 v2", + "mergeProperties": { + "mergeSources": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc/revisions/3", + "type": "Microsoft.Capacity/reservationOrders/reservations/revisions", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc/3", + "etag": 3, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "extendedStatusInfo": { + "statusCode": "Pending", + "message": "An operation is in progress on your reservation. Please wait for operation to complete before taking further action" + }, + "lastUpdatedDateTime": "2017-09-22T23:57:47.488284Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "On", + "skuDescription": "D1 v2", + "mergeProperties": { + "mergeSources": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc/revisions/2", + "type": "Microsoft.Capacity/reservationOrders/reservations/revisions", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc/2", + "etag": 2, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "On", + "skuDescription": "D1 v2", + "mergeProperties": { + "mergeSources": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + }, + "swapProperties": { + "swapDestination": "/providers/microsoft.capacity/reservationOrders/afadf486-3432-4254-b297-4db8ef055f38/reservations/317efb41-b3ef-3706-8447-c2c045ab3ef5" + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc/revisions/1", + "type": "Microsoft.Capacity/reservationOrders/reservations/revisions", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc/1", + "etag": 1, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Creating", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "effectiveDateTime": "2017-09-22T22:46:27.3313607Z", + "lastUpdatedDateTime": "2017-09-22T22:46:27.3313607Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "On", + "skuDescription": "D1 v2", + "mergeProperties": { + "mergeSources": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + } + } + } + ] + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json new file mode 100644 index 000000000000..dac2d9a407ac --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json @@ -0,0 +1,78 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "$filter": "(properties%2farchived+eq+false)", + "$orderby": "properties/displayName asc", + "$skiptoken": "50", + "refreshsummary": "true", + "take": "1" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/00000000-0000-0000-0000-000000000001/reservations/00000000-0000-0000-0000-000000000000", + "name": "00000000-0000-0000-0000-000000000001/00000000-0000-0000-0000-000000000000", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "location": "westus", + "sku": { + "name": "Standard_D1" + }, + "properties": { + "appliedScopes": null, + "appliedScopeType": "Shared", + "displayName": "VM_RI_07-21-2020_12-06", + "displayProvisioningState": "Succeeded", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "expiryDate": "2023-07-21", + "provisioningState": "Succeeded", + "provisioningSubState": null, + "purchaseDate": "2021-04-22", + "quantity": 2, + "renew": false, + "renewSource": "/providers/Microsoft.Capacity/reservationorders/00000000-0000-0000-0000-000000000002/reservations/00000000-0000-0000-0000-000000000003", + "reservedResourceType": "VirtualMachines", + "skuDescription": null, + "term": "P3Y", + "userFriendlyAppliedScopeType": "Shared", + "userFriendlyRenewState": "Off", + "utilization": { + "trend": "UP", + "aggregates": [ + { + "grain": 1.0, + "grainUnit": "days", + "value": 0.05, + "valueUnit": "percentage" + }, + { + "grain": 7.0, + "grainUnit": "days", + "value": 0.05, + "valueUnit": "percentage" + }, + { + "grain": 30.0, + "grainUnit": "days", + "value": 0.05, + "valueUnit": "percentage" + } + ] + } + } + } + ], + "summary": { + "succeededCount": 1, + "failedCount": 0, + "expiringCount": 0, + "expiredCount": 0, + "pendingCount": 0, + "cancelledCount": 0 + }, + "nextLink": null + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json new file mode 100644 index 000000000000..e5e035a012e2 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json @@ -0,0 +1,198 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da" + }, + "responses": { + "200": { + "body": { + "value": [ + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/bcae77cd-3119-4766-919f-b50d36c75c7a", + "etag": 10, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "benefitStartTime": "2017-09-22T01:00:30.9253826Z", + "effectiveDateTime": "2017-09-22T01:00:30.9253826Z", + "extendedStatusInfo": { + "statusCode": "Split", + "message": "This reservation was split and is no longer active." + }, + "lastUpdatedDateTime": "2017-09-22T01:00:36.3191627Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "On", + "skuDescription": "D1 v2", + "splitProperties": { + "splitDestinations": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/00238563-7312-4c20-a134-8c030bf938a7", + "etag": 5, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 1, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "benefitStartTime": "2017-09-22T22:46:32.7632798Z", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "extendedStatusInfo": { + "statusCode": "Merged", + "message": "This reservation was merged and is no longer active." + }, + "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "On", + "skuDescription": "D1 v2", + "splitProperties": { + "splitSource": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a" + }, + "mergeProperties": { + "mergeDestination": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc" + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", + "etag": 4, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 2, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "benefitStartTime": "2017-09-22T22:46:32.7632798Z", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "extendedStatusInfo": { + "statusCode": "Merged", + "message": "This reservation was merged and is no longer active." + }, + "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "On", + "skuDescription": "D1 v2", + "splitProperties": { + "splitSource": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a" + }, + "mergeProperties": { + "mergeDestination": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc" + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc", + "etag": 2, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "benefitStartTime": "2017-09-22T22:46:32.7632798Z", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "On", + "skuDescription": "D1 v2", + "mergeProperties": { + "mergeSources": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + } + } + }, + { + "sku": { + "name": "Standard_D1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/5se63214-3382-40da-ed79-787f823e34bc", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/5se63214-3382-40da-ed79-787f823e34bc", + "etag": 2, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", + "benefitStartTime": "2017-09-22T22:40:32.7632798Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "On", + "skuDescription": "D1 v2", + "swapProperties": { + "swapDestination": "/providers/microsoft.capacity/reservationOrders/63027ae3-389a-4716-ad77-04f42ce93c06/reservations/4jf50113-3382-40da-ed79-787f823e34bc" + } + } + } + ] + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json new file mode 100644 index 000000000000..d564e8b3779f --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json @@ -0,0 +1,131 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "body": { + "properties": { + "sources": [ + "/providers/Microsoft.Capacity/reservationOrders/c0565a8a-4491-4e77-b07b-5e6d66718e1c/reservations/cea04232-932e-47db-acb5-e29a945ecc73", + "/providers/Microsoft.Capacity/reservationOrders/c0565a8a-4491-4e77-b07b-5e6d66718e1c/reservations/5bf54dc7-dacd-4f46-a16b-7b78f4a59799" + ] + } + } + }, + "responses": { + "200": { + "body": [ + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/00238563-7312-4c20-a134-8c030bf938a7", + "etag": 5, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 1, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "extendedStatusInfo": { + "statusCode": "Merged", + "message": "This reservation was merged and is no longer active." + }, + "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "Off", + "skuDescription": "D1 v2", + "splitProperties": { + "splitSource": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a" + }, + "mergeProperties": { + "mergeDestination": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc" + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", + "etag": 4, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 2, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "extendedStatusInfo": { + "statusCode": "Merged", + "message": "This reservation was merged and is no longer active." + }, + "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "Off", + "skuDescription": "D1 v2", + "splitProperties": { + "splitSource": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a" + }, + "mergeProperties": { + "mergeDestination": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc" + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc", + "etag": 2, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "Off", + "skuDescription": "D1 v2", + "mergeProperties": { + "mergeSources": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + } + } + } + ] + }, + "202": {} + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json new file mode 100644 index 000000000000..87a2de8f1870 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9", + "body": { + "sku": { + "name": "standard_D1" + }, + "location": "westus", + "properties": { + "reservedResourceType": "VirtualMachines", + "billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83", + "term": "P1Y", + "billingPlan": "Monthly", + "quantity": 1, + "displayName": "TestReservationOrder", + "appliedScopes": null, + "appliedScopeType": "Shared", + "reservedResourceProperties": { + "instanceFlexibility": "On" + }, + "renew": false + } + } + }, + "responses": { + "200": { + "body": { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "type": "Microsoft.Capacity/reservationOrders", + "name": "1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "etag": 7, + "properties": { + "displayName": "cabri", + "requestDateTime": "2017-08-30T03:49:19.0252126Z", + "createdDateTime": "2017-08-30T03:51:49.8083758Z", + "expiryDate": "2018-08-30", + "term": "P1Y", + "billingPlan": "Monthly", + "provisioningState": "Succeeded", + "reservations": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6" + } + ], + "originalQuantity": 7 + } + } + }, + "202": { + "body": { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "type": "Microsoft.Capacity/reservationOrders", + "name": "1f14354c-dc12-4c8d-8090-6f295a3a34aa", + "etag": 7, + "properties": { + "displayName": "cabri", + "billingPlan": "Monthly", + "requestDateTime": "2017-08-30T03:49:19.0252126Z", + "createdDateTime": "2017-08-30T03:51:49.8083758Z", + "expiryDate": "2018-08-30", + "term": "P1Y", + "provisioningState": "Succeeded", + "reservations": [ + { + "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6" + } + ], + "originalQuantity": 7 + } + } + } + } +} 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 new file mode 100644 index 000000000000..0b8e6bb73900 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Return.json @@ -0,0 +1,66 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "body": { + "properties": { + "sessionId": "10000000-aaaa-bbbb-cccc-200000000000", + "scope": "Reservation", + "reservationToReturn": { + "reservationId": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", + "quantity": 1 + }, + "returnReason": "PurchasedWrongProduct" + } + } + }, + "responses": { + "202": { + "body": { + "id": "/providers/Microsoft.Capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", + "properties": { + "sessionId": "10000000-aaaa-bbbb-cccc-200000000000", + "quantity": 1, + "billingRefundAmount": { + "currencyCode": "GBP", + "amount": 20.52 + }, + "pricingRefundAmount": { + "currencyCode": "USD", + "amount": 24.68 + }, + "policyResult": { + "properties": { + "consumedRefundsTotal": { + "currencyCode": "USD", + "amount": 83.69 + }, + "maxRefundLimit": { + "currencyCode": "USD", + "amount": 50000.0 + }, + "policyErrors": [] + } + }, + "billingInformation": { + "billingPlan": "Upfront", + "completedTransactions": 1, + "totalTransactions": 1, + "billingCurrencyTotalPaidAmount": { + "currencyCode": "GBP", + "amount": 24.0 + }, + "billingCurrencyProratedAmount": { + "currencyCode": "GBP", + "amount": 3.48 + }, + "billingCurrencyRemainingCommitmentAmount": { + "currencyCode": "GBP", + "amount": 0.0 + } + } + } + } + } + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json new file mode 100644 index 000000000000..ec82a3492cf7 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json @@ -0,0 +1,122 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "body": { + "properties": { + "quantities": [ + 1, + 2 + ], + "reservationId": "/providers/Microsoft.Capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a" + } + } + }, + "responses": { + "200": { + "body": [ + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/00238563-7312-4c20-a134-8c030bf938a7", + "etag": 2, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 1, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T01:00:30.9253826Z", + "lastUpdatedDateTime": "2017-09-22T01:00:36.3191627Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "Off", + "skuDescription": "D1 v2", + "splitProperties": { + "splitSource": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a" + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", + "etag": 2, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 2, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T01:00:30.9253826Z", + "lastUpdatedDateTime": "2017-09-22T01:00:36.3191627Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "Off", + "skuDescription": "D1 v2", + "splitProperties": { + "splitSource": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a" + } + } + }, + { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/bcae77cd-3119-4766-919f-b50d36c75c7a", + "etag": 10, + "location": "eastus", + "properties": { + "appliedScopes": [ + "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" + ], + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T01:00:30.9253826Z", + "extendedStatusInfo": { + "statusCode": "Split", + "message": "This reservation was split and is no longer active." + }, + "lastUpdatedDateTime": "2017-09-22T01:00:36.3191627Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "Off", + "skuDescription": "D1 v2", + "splitProperties": { + "splitDestinations": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + } + } + } + ] + }, + "202": {} + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Unarchive.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Unarchive.json new file mode 100644 index 000000000000..1ad4154bf435 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Unarchive.json @@ -0,0 +1,10 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "reservationId": "356e7ae4-84d0-4da6-ab4b-d6b94f3557da" + }, + "responses": { + "200": {} + } +} diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json new file mode 100644 index 000000000000..6cac8a88c7a7 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json @@ -0,0 +1,49 @@ +{ + "parameters": { + "api-version": "2022-03-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "reservationId": "6ef59113-3482-40da-8d79-787f823e34bc", + "parameters": { + "properties": { + "appliedScopeType": "Shared", + "instanceFlexibility": "Off" + } + } + }, + "responses": { + "200": { + "body": { + "sku": { + "name": "Standard_DS1_v2" + }, + "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc", + "type": "Microsoft.Capacity/reservationOrders/reservations", + "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc", + "etag": 4, + "location": "eastus", + "properties": { + "appliedScopeType": "Shared", + "renew": false, + "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", + "quantity": 3, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "billingPlan": "Monthly", + "effectiveDateTime": "2017-09-22T23:57:48.1891638Z", + "lastUpdatedDateTime": "2017-09-22T23:57:54.3768768Z", + "reservedResourceType": "VirtualMachines", + "instanceFlexibility": "Off", + "skuDescription": "D1 v2", + "mergeProperties": { + "mergeSources": [ + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", + "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de" + ] + } + } + } + }, + "202": {} + } +} 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 new file mode 100644 index 000000000000..ab18e743beab --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/reservations.json @@ -0,0 +1,3258 @@ +{ + "swagger": "2.0", + "info": { + "title": "Azure Reservation API", + "description": "This API describe Azure Reservation", + "version": "2022-03-01" + }, + "host": "management.azure.com", + "schemes": [ + "https" + ], + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "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": { + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes": { + "post": { + "summary": "Get Available Scopes for `Reservation`.", + "description": "Get Available Scopes for `Reservation`.\n", + "operationId": "Reservation_AvailableScopes", + "x-ms-examples": { + "AvailableScopes": { + "$ref": "./examples/GetAvailableScope.json" + } + }, + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ReservationIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ScopeParameter" + } + ], + "tags": [ + "Reservation, AvailableScopes" + ], + "responses": { + "200": { + "description": "List of `Subscription`s created after the filter.", + "schema": { + "$ref": "#/definitions/AvailableScopeProperties" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/catalogs": { + "get": { + "summary": "Get the regions and skus that are available for RI purchase for the specified Azure subscription.", + "operationId": "GetCatalog", + "x-ms-examples": { + "Catalog": { + "$ref": "./examples/GetCatalog.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + }, + { + "$ref": "#/parameters/ReservedResourceTypeIdParameter" + }, + { + "$ref": "#/parameters/LocationIdParameter" + }, + { + "name": "publisherId", + "description": "Publisher id used to get the third party products", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offerId", + "description": "Offer id used to get the third party products", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "planId", + "description": "Plan id used to get the third party products", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Catalog" + ], + "responses": { + "200": { + "description": "List of available resources", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/Catalog" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/subscriptions/{subscriptionId}/providers/Microsoft.Capacity/appliedReservations": { + "get": { + "summary": "Get list of applicable `Reservation`s.", + "description": "Get applicable `Reservation`s that are applied to this subscription or a resource group under this subscription.", + "operationId": "GetAppliedReservationList", + "x-ms-examples": { + "AppliedReservationList": { + "$ref": "./examples/GetAppliedReservations.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SubscriptionIdParameter" + } + ], + "tags": [ + "AppliedReservation" + ], + "responses": { + "200": { + "description": "Applicable `Reservation`s.", + "schema": { + "$ref": "#/definitions/AppliedReservations" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/calculatePrice": { + "post": { + "summary": "Calculate price for a `ReservationOrder`.", + "description": "Calculate price for placing a `ReservationOrder`.", + "operationId": "ReservationOrder_Calculate", + "x-ms-examples": { + "Purchase": { + "$ref": "./examples/CalculateReservationOrder.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/PurchaseParameter" + } + ], + "tags": [ + "Reservation, Calculate" + ], + "responses": { + "200": { + "description": "Detailed price info for purchasing `ReservationOrder`", + "schema": { + "$ref": "#/definitions/CalculatePriceResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders": { + "get": { + "summary": "Get all `ReservationOrder`s.", + "description": "List of all the `ReservationOrder`s that the user has access to in the current tenant.", + "operationId": "ReservationOrder_List", + "x-ms-examples": { + "ReservationOrderList": { + "$ref": "./examples/GetReservationOrders.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "tags": [ + "Reservation" + ], + "responses": { + "200": { + "description": "List of `ReservationOrder`s", + "schema": { + "$ref": "#/definitions/ReservationOrderList" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}": { + "put": { + "summary": "Purchase `ReservationOrder`", + "description": "Purchase `ReservationOrder` and create resource under the specified URI.", + "operationId": "ReservationOrder_Purchase", + "x-ms-examples": { + "Purchase": { + "$ref": "./examples/PurchaseReservationOrder.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/PurchaseParameter" + } + ], + "tags": [ + "Reservation, Purchase" + ], + "responses": { + "200": { + "description": "The resource has been created", + "schema": { + "$ref": "#/definitions/ReservationOrderResponse" + } + }, + "202": { + "description": "The request is accepted and is being processed. Operation result link is in location header.", + "schema": { + "$ref": "#/definitions/ReservationOrderResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "get": { + "summary": "Get a specific `ReservationOrder`.", + "description": "Get the details of the `ReservationOrder`.", + "operationId": "ReservationOrder_Get", + "x-ms-examples": { + "GetReservation": { + "$ref": "./examples/GetReservationOrderDetails.json" + }, + "GetReservationWithExpandPayments": { + "$ref": "./examples/GetReservationOrderDetailsWithExpandPlanInformation.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "$expand", + "description": "May be used to expand the planInformation.", + "in": "query", + "required": false, + "type": "string" + } + ], + "tags": [ + "Reservation" + ], + "responses": { + "200": { + "description": "Get the details of the `ReservationOrder`.", + "schema": { + "$ref": "#/definitions/ReservationOrderResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/split": { + "post": { + "summary": "Split the `Reservation`.", + "description": "Split a `Reservation` into two `Reservation`s with specified quantity distribution.", + "operationId": "Reservation_Split", + "x-ms-examples": { + "Split": { + "$ref": "./examples/SplitReservation.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/SplitParameter" + } + ], + "tags": [ + "Reservation, Split" + ], + "responses": { + "200": { + "description": "List of `Reservation`s created after the split operation.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ReservationResponse" + } + } + }, + "202": { + "description": "The request is accepted and is being processed" + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/merge": { + "post": { + "summary": "Merges two `Reservation`s.", + "description": "Merge the specified `Reservation`s into a new `Reservation`. The two `Reservation`s being merged must have same properties.", + "operationId": "Reservation_Merge", + "x-ms-examples": { + "Merge": { + "$ref": "./examples/MergeReservations.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/MergeParameter" + } + ], + "tags": [ + "Reservation, Merge" + ], + "responses": { + "200": { + "description": "Returns the `Reservation` created after the merge.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/ReservationResponse" + } + } + }, + "202": { + "description": "The request is accepted and is being processed" + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations": { + "get": { + "summary": "Get `Reservation`s in a given reservation Order", + "description": "List `Reservation`s within a single `ReservationOrder`.", + "operationId": "Reservation_List", + "x-ms-examples": { + "ReservationList": { + "$ref": "./examples/GetReservationsFromOrder.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "tags": [ + "Reservation" + ], + "responses": { + "200": { + "description": "List `Reservation`s within a single `ReservationOrder`.", + "schema": { + "$ref": "#/definitions/ReservationList" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}": { + "get": { + "summary": "Get `Reservation` details.", + "description": "Get specific `Reservation` details.", + "operationId": "Reservation_Get", + "x-ms-examples": { + "GetReservation": { + "$ref": "./examples/GetReservationDetails.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationIdParameter" + }, + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ExpandRenewPropertiesParameter" + } + ], + "tags": [ + "Reservation" + ], + "responses": { + "200": { + "description": "Get `Reservation` details.", + "schema": { + "$ref": "#/definitions/ReservationResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + }, + "patch": { + "summary": "Updates a `Reservation`.", + "description": "Updates the applied scopes of the `Reservation`.", + "operationId": "Reservation_Update", + "x-ms-examples": { + "PatchReservation": { + "$ref": "./examples/UpdateReservation.json" + } + }, + "x-ms-long-running-operation": true, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ReservationIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/PatchParameter" + } + ], + "tags": [ + "Reservation", + "ApplyScope" + ], + "responses": { + "200": { + "description": "Returns the updated `Reservation`.", + "schema": { + "$ref": "#/definitions/ReservationResponse" + } + }, + "202": { + "description": "The request is accepted and is being processed" + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/archive": { + "post": { + "summary": "Archive a `Reservation`.", + "description": "Archiving a `Reservation` moves it to `Archived` state.", + "operationId": "Reservation_Archive", + "x-ms-examples": { + "Archive": { + "$ref": "./examples/Archive.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ReservationIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "tags": [ + "Reservation, Archive" + ], + "responses": { + "200": { + "description": "Archived a reservation." + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive": { + "post": { + "summary": "Unarchive a `Reservation`.", + "description": "Unarchiving a `Reservation` moves it to the state it was before archiving.\n", + "operationId": "Reservation_Unarchive", + "x-ms-examples": { + "Unarchive": { + "$ref": "./examples/Unarchive.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ReservationIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "tags": [ + "Reservation, Unarchive" + ], + "responses": { + "200": { + "description": "Unarchive complete for the reservation." + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/revisions": { + "get": { + "summary": "Get `Reservation` revisions.", + "description": "List of all the revisions for the `Reservation`.", + "operationId": "Reservation_ListRevisions", + "x-ms-examples": { + "ReservationRevisions": { + "$ref": "./examples/GetReservationRevisions.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationIdParameter" + }, + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "tags": [ + "Reservation" + ], + "responses": { + "200": { + "description": "List of all the revisions for the `Reservation`.", + "schema": { + "$ref": "#/definitions/ReservationList" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/operations": { + "get": { + "summary": "Get operations.", + "description": "List all the operations.", + "operationId": "Operation_List", + "x-ms-examples": { + "GetOperations": { + "$ref": "./examples/GetOperations.json" + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + } + ], + "tags": [ + "Operation" + ], + "responses": { + "200": { + "description": "List all the operations.", + "schema": { + "$ref": "#/definitions/OperationList" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/calculateRefund": { + "post": { + "summary": "Calculate the refund amount of a reservation order.", + "description": "Calculate price for returning `Reservations` if there are no policy errors.\n", + "operationId": "CalculateRefund_Post", + "x-ms-examples": { + "Purchase": { + "$ref": "./examples/CalculateRefund.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CalculateRefundRequestParameter" + } + ], + "tags": [ + "CalculateRefund" + ], + "responses": { + "200": { + "description": "Detailed refund info of a reservation", + "schema": { + "$ref": "#/definitions/CalculateRefundResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/return": { + "post": { + "summary": "Return a reservation.", + "description": "Return a reservation.", + "operationId": "Return_Post", + "x-ms-examples": { + "Purchase": { + "$ref": "./examples/Return.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/RefundRequestParameter" + } + ], + "tags": [ + "Return" + ], + "responses": { + "202": { + "description": "Detailed refund info of a reservation", + "headers": { + "Location": { + "type": "string" + } + }, + "schema": { + "$ref": "#/definitions/RefundResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/calculateExchange": { + "post": { + "summary": "Calculates the refund amounts and price of the new purchases.", + "description": "Calculates price for exchanging `Reservations` if there are no policy errors.\n", + "operationId": "CalculateExchange_Post", + "x-ms-examples": { + "CalculateExchange": { + "$ref": "./examples/CalculateExchange.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/CalculateExchangeRequestParameter" + } + ], + "tags": [ + "Exchange" + ], + "responses": { + "200": { + "description": "The request is completed.", + "schema": { + "$ref": "#/definitions/CalculateExchangeOperationResultResponse" + } + }, + "202": { + "description": "The request is accepted and is being processed.", + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "URL for checking the ongoing status of the operation." + }, + "Location": { + "type": "string", + "description": "URL for determining when an operation has completed. Only use this value only when Azure-AsyncOperation isn't returned." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "Clients should wait for the Retry-After interval before polling again" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/exchange": { + "post": { + "summary": "Exchange Reservation(s)", + "description": "Returns one or more `Reservations` in exchange for one or more `Reservation` purchases.\n", + "operationId": "Exchange_Post", + "x-ms-examples": { + "Exchange": { + "$ref": "./examples/Exchange.json" + } + }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ExchangeRequestParameter" + } + ], + "tags": [ + "Exchange" + ], + "responses": { + "200": { + "description": "The request is completed.", + "schema": { + "$ref": "#/definitions/ExchangeOperationResultResponse" + } + }, + "202": { + "description": "The request is accepted and is being processed.", + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "URL for checking the ongoing status of the operation." + }, + "Location": { + "type": "string", + "description": "URL for determining when an operation has completed. Only use this value only when Azure-AsyncOperation isn't returned." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "Clients should wait for the Retry-After interval before polling again" + } + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + }, + "/providers/Microsoft.Capacity/reservations": { + "get": { + "description": "List the reservations and the roll up counts of reservations group by provisioning states that the user has access to in the current tenant.", + "operationId": "Reservation_ListAll", + "x-ms-examples": { + "Catalog": { + "$ref": "./examples/GetReservations.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "name": "$filter", + "description": "May be used to filter by reservation properties. The filter supports 'eq', 'or', and 'and'. It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDate, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$orderby", + "description": "May be used to sort order by reservation properties.", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "refreshSummary", + "description": "To indicate whether to refresh the roll up counts of the reservations group by provisioning states", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "$skiptoken", + "description": "The number of reservations to skip from the list before returning results", + "in": "query", + "required": false, + "type": "number" + }, + { + "name": "selectedState", + "description": "The selected provisioning state", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "take", + "description": "To number of reservations to return", + "in": "query", + "required": false, + "type": "number" + } + ], + "responses": { + "200": { + "description": "OK. The request has succeeded.", + "schema": { + "$ref": "#/definitions/ReservationsListResult" + } + }, + "default": { + "description": "Error response describing why the operation failed.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + } + } + }, + "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/changeDirectory": { + "post": { + "summary": "Change directory of `ReservationOrder`.", + "description": "Change directory (tenant) of `ReservationOrder` and all `Reservation` under it to specified tenant id", + "operationId": "ReservationOrder_ChangeDirectory", + "x-ms-examples": { + "ChangeDirectory": { + "$ref": "./examples/ChangeDirectoryReservationOrder.json" + } + }, + "parameters": [ + { + "$ref": "#/parameters/ReservationOrderIdParameter" + }, + { + "$ref": "#/parameters/ApiVersionParameter" + }, + { + "$ref": "#/parameters/ChangeDirectoryParameter" + } + ], + "tags": [ + "ReservationOrder, ChangeDirectory" + ], + "responses": { + "200": { + "description": "List of `Reservation`s created after the change directory operation.", + "schema": { + "$ref": "#/definitions/ChangeDirectoryResponse" + } + }, + "default": { + "description": "Unexpected error", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + } + }, + "definitions": { + "ErrorResponseCode": { + "type": "string", + "enum": [ + "NotSpecified", + "InternalServerError", + "ServerTimeout", + "AuthorizationFailed", + "BadRequest", + "ClientCertificateThumbprintNotSet", + "InvalidRequestContent", + "OperationFailed", + "HttpMethodNotSupported", + "InvalidRequestUri", + "MissingTenantId", + "InvalidTenantId", + "InvalidReservationOrderId", + "InvalidReservationId", + "ReservationIdNotInReservationOrder", + "ReservationOrderNotFound", + "InvalidSubscriptionId", + "InvalidAccessToken", + "InvalidLocationId", + "UnauthenticatedRequestsThrottled", + "InvalidHealthCheckType", + "Forbidden", + "BillingScopeIdCannotBeChanged", + "AppliedScopesNotAssociatedWithCommerceAccount", + "PatchValuesSameAsExisting", + "RoleAssignmentCreationFailed", + "ReservationOrderCreationFailed", + "ReservationOrderNotEnabled", + "CapacityUpdateScopesFailed", + "UnsupportedReservationTerm", + "ReservationOrderIdAlreadyExists", + "RiskCheckFailed", + "CreateQuoteFailed", + "ActivateQuoteFailed", + "NonsupportedAccountId", + "PaymentInstrumentNotFound", + "MissingAppliedScopesForSingle", + "NoValidReservationsToReRate", + "ReRateOnlyAllowedForEA", + "OperationCannotBePerformedInCurrentState", + "InvalidSingleAppliedScopesCount", + "InvalidFulfillmentRequestParameters", + "NotSupportedCountry", + "InvalidRefundQuantity", + "PurchaseError", + "BillingCustomerInputError", + "BillingPaymentInstrumentSoftError", + "BillingPaymentInstrumentHardError", + "BillingTransientError", + "BillingError", + "FulfillmentConfigurationError", + "FulfillmentOutOfStockError", + "FulfillmentTransientError", + "FulfillmentError", + "CalculatePriceFailed", + "AppliedScopesSameAsExisting", + "SelfServiceRefundNotSupported", + "RefundLimitExceeded" + ], + "x-ms-enum": { + "name": "ErrorResponseCode", + "modelAsString": true + } + }, + "ProvisioningState": { + "type": "string", + "description": "Represent the current state of the Reservation.", + "enum": [ + "Creating", + "PendingResourceHold", + "ConfirmedResourceHold", + "PendingBilling", + "ConfirmedBilling", + "Created", + "Succeeded", + "Cancelled", + "Expired", + "BillingFailed", + "Failed", + "Split", + "Merged" + ], + "x-ms-enum": { + "name": "ProvisioningState", + "modelAsString": true + } + }, + "ReservedResourceType": { + "type": "string", + "description": "The type of the resource that is being reserved.", + "enum": [ + "VirtualMachines", + "SqlDatabases", + "SuseLinux", + "CosmosDb", + "RedHat", + "SqlDataWarehouse", + "VMwareCloudSimple", + "RedHatOsa", + "Databricks", + "AppService", + "ManagedDisk", + "BlockBlob", + "RedisCache", + "AzureDataExplorer", + "MySql", + "MariaDb", + "PostgreSql", + "DedicatedHost", + "SapHana", + "SqlAzureHybridBenefit", + "AVS", + "DataFactory", + "NetAppStorage", + "AzureFiles", + "SqlEdge", + "VirtualMachineSoftware" + ], + "x-ms-enum": { + "name": "ReservedResourceType", + "modelAsString": true + } + }, + "Location": { + "type": "string", + "description": "Location in which the Resources needs to be reserved. It cannot be changed after the resource has been created.", + "enum": [ + "westus", + "eastus", + "eastus2", + "northcentralus", + "westus2", + "southcentralus", + "centralus", + "westeurope", + "northeurope", + "eastasia", + "southeastasia", + "japaneast", + "japanwest", + "brazilsouth", + "australiaeast", + "australiasoutheast", + "southindia", + "westindia", + "centralindia", + "canadacentral", + "canadaeast", + "uksouth", + "westcentralus", + "ukwest" + ], + "x-ms-enum": { + "name": "Location", + "modelAsString": true + } + }, + "AvailableScopeRequest": { + "type": "object", + "description": "Available scope", + "properties": { + "properties": { + "$ref": "#/definitions/AvailableScopeRequestProperties" + } + } + }, + "AvailableScopeRequestProperties": { + "type": "object", + "description": "Available scope request properties", + "properties": { + "scopes": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "CalculateRefundRequest": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fully qualified identifier of the reservation order being returned" + }, + "properties": { + "$ref": "#/definitions/CalculateRefundRequestProperties" + } + } + }, + "RefundRequest": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/RefundRequestProperties" + } + } + }, + "CalculateRefundRequestProperties": { + "type": "object", + "properties": { + "scope": { + "type": "string", + "description": "The scope of the refund, e.g. Reservation" + }, + "reservationToReturn": { + "$ref": "#/definitions/ReservationToReturn" + } + } + }, + "RefundRequestProperties": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "SessionId that was returned by CalculateRefund API." + }, + "scope": { + "type": "string", + "description": "The scope of the refund, e.g. Reservation" + }, + "reservationToReturn": { + "$ref": "#/definitions/ReservationToReturn" + }, + "returnReason": { + "type": "string", + "description": "The reason of returning the reservation" + } + } + }, + "CalculateExchangeRequest": { + "type": "object", + "description": "Calculate exchange request", + "properties": { + "properties": { + "$ref": "#/definitions/CalculateExchangeRequestProperties" + } + } + }, + "ExchangeRequest": { + "type": "object", + "description": "Exchange request", + "properties": { + "properties": { + "$ref": "#/definitions/ExchangeRequestProperties" + } + } + }, + "CalculateExchangeRequestProperties": { + "type": "object", + "description": "Calculate exchange request properties", + "properties": { + "reservationsToPurchase": { + "type": "array", + "description": "List of reservations that are being purchased in this exchange.", + "items": { + "$ref": "#/definitions/PurchaseRequest" + } + }, + "reservationsToExchange": { + "type": "array", + "description": "List of reservations that are being returned in this exchange.", + "items": { + "$ref": "#/definitions/ReservationToReturn" + } + } + } + }, + "ExchangeRequestProperties": { + "type": "object", + "description": "Exchange request properties", + "properties": { + "sessionId": { + "type": "string", + "description": "SessionId that was returned by CalculateExchange API." + } + } + }, + "ReservationToReturn": { + "type": "object", + "description": "Reservation to return", + "properties": { + "reservationId": { + "type": "string", + "description": "Fully qualified identifier of the Reservation being returned" + }, + "quantity": { + "type": "integer", + "format": "int32", + "description": "Quantity to be returned. Must be greater than zero." + } + } + }, + "ReservationToReturnForExchange": { + "type": "object", + "description": "Reservation refund details", + "properties": { + "reservationId": { + "type": "string", + "description": "Fully qualified id of the Reservation being returned." + }, + "quantity": { + "type": "integer", + "format": "int32", + "description": "Quantity to be returned" + }, + "billingRefundAmount": { + "$ref": "#/definitions/Price" + }, + "billingInformation": { + "$ref": "#/definitions/BillingInformation" + }, + "status": { + "$ref": "#/definitions/OperationStatus" + } + } + }, + "BillingInformation": { + "type": "object", + "description": "billing information", + "properties": { + "billingCurrencyTotalPaidAmount": { + "$ref": "#/definitions/Price" + }, + "billingCurrencyProratedAmount": { + "$ref": "#/definitions/Price" + }, + "billingCurrencyRemainingCommitmentAmount": { + "$ref": "#/definitions/Price" + } + } + }, + "RefundBillingInformation": { + "type": "object", + "description": "billing information", + "properties": { + "billingPlan": { + "$ref": "#/definitions/ReservationBillingPlan" + }, + "completedTransactions": { + "type": "integer", + "format": "int32", + "description": "The number of completed transactions in this reservation's payment" + }, + "totalTransactions": { + "type": "integer", + "format": "int32", + "description": "The number of total transactions in this reservation's payment" + }, + "billingCurrencyTotalPaidAmount": { + "$ref": "#/definitions/Price" + }, + "billingCurrencyProratedAmount": { + "$ref": "#/definitions/Price" + }, + "billingCurrencyRemainingCommitmentAmount": { + "$ref": "#/definitions/Price" + } + } + }, + "Catalog": { + "type": "object", + "properties": { + "resourceType": { + "type": "string", + "description": "The type of resource the SKU applies to.", + "readOnly": true + }, + "name": { + "type": "string", + "description": "The name of SKU", + "readOnly": true + }, + "billingPlans": { + "type": "object", + "description": "The billing plan options available for this SKU.", + "additionalProperties": { + "type": "array", + "items": { + "$ref": "#/definitions/ReservationBillingPlan" + } + } + }, + "terms": { + "type": "array", + "readOnly": true, + "description": "Available reservation terms for this resource", + "items": { + "$ref": "#/definitions/ReservationTerm" + } + }, + "locations": { + "type": "array", + "readOnly": true, + "items": { + "type": "string", + "description": "The set of locations that the SKU is available. If not specified, the SKU is available in all locations." + } + }, + "skuProperties": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SkuProperty" + } + }, + "msrp": { + "type": "object", + "readOnly": true, + "description": "Pricing information about the SKU", + "properties": { + "p1Y": { + "type": "object", + "$ref": "#/definitions/Price", + "description": "Amount in pricing currency. Tax not included." + } + } + }, + "restrictions": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SkuRestriction" + } + }, + "tier": { + "type": "string", + "description": "The tier of this SKU", + "readOnly": true + }, + "size": { + "type": "string", + "description": "The size of this SKU", + "readOnly": true + }, + "capabilities": { + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/SkuCapability" + } + } + } + }, + "SkuCapability": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "An invariant to describe the feature." + }, + "value": { + "type": "string", + "description": "An invariant if the feature is measured by quantity." + } + } + }, + "SkuProperty": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "An invariant to describe the feature." + }, + "value": { + "type": "string", + "description": "An invariant if the feature is measured by quantity." + } + } + }, + "SkuRestriction": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "The type of restrictions." + }, + "values": { + "type": "array", + "items": { + "type": "string" + }, + "description": "The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted." + }, + "reasonCode": { + "type": "string", + "description": "The reason for restriction." + } + } + }, + "ReservationOrderResponse": { + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "etag": { + "type": "integer", + "format": "int32" + }, + "id": { + "type": "string", + "readOnly": true, + "description": "Identifier of the reservation" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the reservation" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/ReservationOrderProperties" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Type of resource. \"Microsoft.Capacity/reservations\"" + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/systemData", + "readOnly": true + } + } + }, + "PaymentStatus": { + "type": "string", + "description": "Describes whether the payment is completed, failed, cancelled or scheduled in the future.", + "enum": [ + "Succeeded", + "Failed", + "Scheduled", + "Cancelled" + ], + "x-ms-enum": { + "name": "PaymentStatus", + "modelAsString": true + } + }, + "PaymentDetail": { + "type": "object", + "description": "Information about payment related to a reservation order.", + "properties": { + "dueDate": { + "type": "string", + "format": "date", + "description": "Date when the payment needs to be done." + }, + "paymentDate": { + "type": "string", + "format": "date", + "description": "Date when the transaction is completed. Is null when it is scheduled." + }, + "pricingCurrencyTotal": { + "$ref": "#/definitions/Price", + "description": "Amount in pricing currency. Tax not included." + }, + "billingCurrencyTotal": { + "$ref": "#/definitions/Price", + "description": "Amount charged in Billing currency. Tax not included. Is null for future payments" + }, + "billingAccount": { + "type": "string", + "description": "Shows the Account that is charged for this payment." + }, + "status": { + "$ref": "#/definitions/PaymentStatus" + }, + "extendedStatusInfo": { + "$ref": "#/definitions/ExtendedStatusInfo" + } + } + }, + "ReservationOrderBillingPlanInformation": { + "type": "object", + "description": "Information describing the type of billing plan for this reservation.", + "properties": { + "pricingCurrencyTotal": { + "$ref": "#/definitions/Price", + "description": "Amount of money to be paid for the Order. Tax is not included." + }, + "startDate": { + "type": "string", + "format": "date", + "description": "Date when the billing plan has started." + }, + "nextPaymentDueDate": { + "type": "string", + "format": "date", + "description": "For recurring billing plans, indicates the date when next payment will be processed. Null when total is paid off." + }, + "transactions": { + "type": "array", + "items": { + "$ref": "#/definitions/PaymentDetail" + } + } + } + }, + "ReservationOrderProperties": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Friendly name for user to easily identified the reservation." + }, + "requestDateTime": { + "type": "string", + "format": "date-time", + "description": "This is the DateTime when the reservation was initially requested for purchase." + }, + "createdDateTime": { + "type": "string", + "format": "date-time", + "description": "This is the DateTime when the reservation was created." + }, + "expiryDate": { + "type": "string", + "format": "date", + "description": "This is the date when the Reservation will expire." + }, + "benefitStartTime": { + "type": "string", + "format": "date-time", + "description": "This is the DateTime when the reservation benefit started." + }, + "originalQuantity": { + "type": "integer", + "format": "int32", + "description": "Total Quantity of the SKUs purchased in the Reservation." + }, + "term": { + "$ref": "#/definitions/ReservationTerm" + }, + "provisioningState": { + "description": "Current state of the reservation.", + "$ref": "#/definitions/ProvisioningState" + }, + "billingPlan": { + "$ref": "#/definitions/ReservationBillingPlan" + }, + "planInformation": { + "$ref": "#/definitions/ReservationOrderBillingPlanInformation" + }, + "reservations": { + "type": "array", + "items": { + "$ref": "#/definitions/ReservationResponse" + } + } + } + }, + "DisplayProvisioningState": { + "type": "string", + "description": "Represent the current display state of the Reservation.", + "enum": [ + "Succeeded", + "Expiring", + "Expired", + "Pending", + "Processing", + "Cancelled", + "Failed" + ], + "x-ms-enum": { + "name": "DisplayProvisioningState", + "modelAsString": true + } + }, + "UserFriendlyAppliedScopeType": { + "type": "string", + "description": "The applied scope type", + "enum": [ + "None", + "Shared", + "Single", + "ResourceGroup", + "ManagementGroup" + ], + "x-ms-enum": { + "name": "UserFriendlyAppliedScopeType", + "modelAsString": true + } + }, + "UserFriendlyRenewState": { + "type": "string", + "description": "The renew state of the reservation", + "enum": [ + "On", + "Off", + "Renewed", + "NotRenewed", + "NotApplicable" + ], + "x-ms-enum": { + "name": "UserFriendlyRenewState", + "modelAsString": true + } + }, + "ReservationTerm": { + "type": "string", + "description": "Represent the term of Reservation.", + "enum": [ + "P1Y", + "P3Y", + "P5Y" + ], + "x-ms-enum": { + "name": "ReservationTerm", + "modelAsString": true + } + }, + "ReservationsListResult": { + "type": "object", + "description": "The list of reservations and summary of roll out count of reservations in each state.", + "properties": { + "value": { + "description": "The list of reservations.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/ReservationResponse" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + }, + "summary": { + "description": "The roll out count summary of the reservations", + "type": "object", + "$ref": "#/definitions/ReservationSummary" + } + } + }, + "ReservationResponse": { + "description": "The definition of the reservation.", + "type": "object", + "x-ms-azure-resource": true, + "properties": { + "location": { + "type": "string", + "description": "The Azure Region where the reserved resource lives." + }, + "etag": { + "type": "integer", + "format": "int32" + }, + "id": { + "type": "string", + "readOnly": true, + "description": "Identifier of the reservation" + }, + "name": { + "type": "string", + "readOnly": true, + "description": "Name of the reservation" + }, + "sku": { + "description": "The sku information associated to this reservation ", + "$ref": "#/definitions/SkuName" + }, + "properties": { + "description": "The properties associated to this reservation ", + "$ref": "#/definitions/ReservationsProperties" + }, + "type": { + "type": "string", + "readOnly": true, + "description": "Type of resource. \"Microsoft.Capacity/reservationOrders/reservations\"" + }, + "kind": { + "type": "string", + "description": "Resource Provider type to be reserved.", + "enum": [ + "Microsoft.Compute" + ], + "x-ms-enum": { + "name": "Kind", + "modelAsString": false + } + }, + "systemData": { + "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/systemData", + "readOnly": true + } + } + }, + "ReservationQuantity": { + "type": "integer", + "format": "int32", + "description": "Quantity of the SKUs that are part of the Reservation. Must be greater than zero." + }, + "AvailableScopeProperties": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/SubscriptionScopeProperties" + } + } + }, + "SubscriptionScopeProperties": { + "type": "object", + "properties": { + "scopes": { + "type": "array", + "items": { + "$ref": "#/definitions/ScopeProperties" + } + } + } + }, + "ScopeProperties": { + "type": "object", + "properties": { + "scope": { + "type": "string" + }, + "valid": { + "type": "boolean" + } + } + }, + "InstanceFlexibility": { + "type": "string", + "description": "Turning this on will apply the reservation discount to other VMs in the same VM size group. Only specify for VirtualMachines reserved resource type.", + "enum": [ + "On", + "Off" + ], + "x-ms-enum": { + "name": "InstanceFlexibility", + "modelAsString": true + } + }, + "ReservationStatusCode": { + "type": "string", + "enum": [ + "None", + "Pending", + "Processing", + "Active", + "PurchaseError", + "PaymentInstrumentError", + "Split", + "Merged", + "Expired", + "Succeeded" + ], + "x-ms-enum": { + "name": "ReservationStatusCode", + "modelAsString": true + } + }, + "ExtendedStatusInfo": { + "type": "object", + "properties": { + "statusCode": { + "$ref": "#/definitions/ReservationStatusCode" + }, + "message": { + "type": "string", + "description": "The message giving detailed information about the status code." + } + } + }, + "ReservationBillingPlan": { + "type": "string", + "description": "Represent the billing plans.", + "enum": [ + "Upfront", + "Monthly" + ], + "x-ms-enum": { + "name": "ReservationBillingPlan", + "modelAsString": true + } + }, + "Renew": { + "type": "boolean", + "default": false, + "description": "Setting this to true will automatically purchase a new reservation on the expiration date time." + }, + "RenewPropertiesResponse": { + "type": "object", + "properties": { + "purchaseProperties": { + "$ref": "#/definitions/PurchaseRequest" + }, + "pricingCurrencyTotal": { + "type": "object", + "description": "Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included. This is locked price 30 days before expiry.", + "properties": { + "currencyCode": { + "type": "string", + "description": "The ISO 4217 3-letter currency code for the currency used by this purchase record." + }, + "amount": { + "type": "number" + } + } + }, + "billingCurrencyTotal": { + "type": "object", + "description": "Currency and amount that customer will be charged in customer's local currency for renewal purchase. Tax is not included.", + "properties": { + "currencyCode": { + "type": "string", + "description": "The ISO 4217 3-letter currency code for the currency used by this purchase record." + }, + "amount": { + "type": "number" + } + } + } + } + }, + "SkuName": { + "type": "object", + "properties": { + "name": { + "type": "string" + } + } + }, + "CalculateRefundResponse": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fully qualified identifier of the reservation being returned" + }, + "properties": { + "$ref": "#/definitions/RefundResponseProperties" + } + } + }, + "RefundResponse": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fully qualified identifier of the reservation being returned" + }, + "properties": { + "$ref": "#/definitions/RefundResponseProperties" + } + } + }, + "RefundResponseProperties": { + "type": "object", + "properties": { + "sessionId": { + "type": "string", + "description": "Refund session identifier" + }, + "quantity": { + "type": "integer", + "format": "int32", + "description": "Quantity to be returned" + }, + "billingRefundAmount": { + "$ref": "#/definitions/Price" + }, + "pricingRefundAmount": { + "$ref": "#/definitions/Price" + }, + "policyResult": { + "$ref": "#/definitions/RefundPolicyResult" + }, + "billingInformation": { + "$ref": "#/definitions/RefundBillingInformation" + } + } + }, + "CalculateExchangeOperationResultResponse": { + "type": "object", + "description": "CalculateExchange operation result", + "properties": { + "id": { + "type": "string", + "description": "It should match what is used to GET the operation result." + }, + "name": { + "type": "string", + "description": "It must match the last segment of the id field, and will typically be a GUID / system generated value." + }, + "status": { + "type": "string", + "description": "Status of the operation.", + "enum": [ + "Succeeded", + "Failed", + "Cancelled", + "Pending" + ], + "x-ms-enum": { + "name": "CalculateExchangeOperationResultStatus", + "modelAsString": true + } + }, + "properties": { + "$ref": "#/definitions/CalculateExchangeResponseProperties" + }, + "error": { + "$ref": "#/definitions/OperationResultError" + } + } + }, + "ExchangeOperationResultResponse": { + "type": "object", + "description": "Exchange operation result", + "properties": { + "id": { + "type": "string", + "description": "It should match what is used to GET the operation result." + }, + "name": { + "type": "string", + "description": "It must match the last segment of the id field, and will typically be a GUID / system generated value." + }, + "status": { + "type": "string", + "description": "Status of the operation.", + "enum": [ + "Succeeded", + "Failed", + "Cancelled", + "PendingRefunds", + "PendingPurchases" + ], + "x-ms-enum": { + "name": "ExchangeOperationResultStatus", + "modelAsString": true + } + }, + "properties": { + "$ref": "#/definitions/ExchangeResponseProperties" + }, + "error": { + "$ref": "#/definitions/OperationResultError" + } + } + }, + "OperationResultError": { + "type": "object", + "description": "Required if status == failed or status == canceled.", + "properties": { + "code": { + "type": "string", + "description": "Required if status == failed or status == cancelled. If status == failed, provide an invariant error code used for error troubleshooting, aggregation, and analysis." + }, + "message": { + "type": "string", + "description": "Required if status == failed. Localized. If status == failed, provide an actionable error message indicating what error occurred, and what the user can do to address the issue." + } + } + }, + "CalculateExchangeResponseProperties": { + "type": "object", + "description": "CalculateExchange response properties", + "properties": { + "sessionId": { + "type": "string", + "description": "Exchange session identifier" + }, + "netPayable": { + "$ref": "#/definitions/Price" + }, + "refundsTotal": { + "$ref": "#/definitions/Price" + }, + "purchasesTotal": { + "$ref": "#/definitions/Price" + }, + "reservationsToPurchase": { + "type": "array", + "description": "Details of the reservations being purchased", + "items": { + "$ref": "#/definitions/ReservationToPurchaseCalculateExchange" + } + }, + "reservationsToExchange": { + "type": "array", + "description": "Details of the reservations being returned", + "items": { + "$ref": "#/definitions/ReservationToExchange" + } + }, + "policyResult": { + "$ref": "#/definitions/ExchangePolicyErrors" + } + } + }, + "ExchangeResponseProperties": { + "type": "object", + "description": "Exchange response properties", + "properties": { + "sessionId": { + "type": "string", + "description": "Exchange session identifier" + }, + "netPayable": { + "$ref": "#/definitions/Price" + }, + "refundsTotal": { + "$ref": "#/definitions/Price" + }, + "purchasesTotal": { + "$ref": "#/definitions/Price" + }, + "reservationsToPurchase": { + "type": "array", + "description": "Details of the reservations being purchased", + "items": { + "$ref": "#/definitions/ReservationToPurchaseExchange" + } + }, + "reservationsToExchange": { + "type": "array", + "description": "Details of the reservations being returned", + "items": { + "$ref": "#/definitions/ReservationToReturnForExchange" + } + }, + "policyResult": { + "$ref": "#/definitions/ExchangePolicyErrors" + } + } + }, + "RefundPolicyResult": { + "type": "object", + "description": "Refund policy result", + "properties": { + "properties": { + "$ref": "#/definitions/RefundPolicyResultProperty" + } + } + }, + "RefundPolicyResultProperty": { + "type": "object", + "description": "Refund policy result property", + "properties": { + "consumedRefundsTotal": { + "$ref": "#/definitions/Price" + }, + "maxRefundLimit": { + "$ref": "#/definitions/Price" + }, + "policyErrors": { + "type": "array", + "description": "Refund Policy errors", + "items": { + "$ref": "#/definitions/RefundPolicyError" + }, + "x-ms-identifiers": [] + } + } + }, + "RefundPolicyError": { + "type": "object", + "description": "error details", + "properties": { + "code": { + "$ref": "#/definitions/ErrorResponseCode" + }, + "message": { + "type": "string" + } + } + }, + "ExchangePolicyErrors": { + "type": "object", + "description": "Exchange policy errors", + "properties": { + "policyErrors": { + "type": "array", + "description": "Exchange Policy errors", + "items": { + "$ref": "#/definitions/ExchangePolicyError" + } + } + } + }, + "ExchangePolicyError": { + "type": "object", + "description": "error details", + "properties": { + "code": { + "type": "string" + }, + "message": { + "type": "string" + } + } + }, + "ReservationToExchange": { + "type": "object", + "description": "Reservation refund details", + "properties": { + "reservationId": { + "type": "string", + "description": "Fully qualified id of the Reservation being returned." + }, + "quantity": { + "type": "integer", + "format": "int32", + "description": "Quantity to be returned" + }, + "billingRefundAmount": { + "$ref": "#/definitions/Price" + }, + "billingInformation": { + "$ref": "#/definitions/BillingInformation" + } + } + }, + "ReservationToPurchaseCalculateExchange": { + "type": "object", + "description": "Reservation purchase details", + "properties": { + "properties": { + "$ref": "#/definitions/PurchaseRequest" + }, + "billingCurrencyTotal": { + "$ref": "#/definitions/Price" + } + } + }, + "ReservationToPurchaseExchange": { + "type": "object", + "description": "Reservation purchase details", + "properties": { + "reservationOrderId": { + "type": "string", + "description": "Fully qualified id of the ReservationOrder being purchased" + }, + "reservationId": { + "type": "string", + "description": "Fully qualified id of the Reservation being purchased. This value is only guaranteed to be non-null if the purchase is successful." + }, + "properties": { + "$ref": "#/definitions/PurchaseRequest" + }, + "billingCurrencyTotal": { + "$ref": "#/definitions/Price" + }, + "status": { + "$ref": "#/definitions/OperationStatus" + } + } + }, + "ReservationsProperties": { + "type": "object", + "description": "The properties of the reservations", + "properties": { + "reservedResourceType": { + "description": "The type of the resource that is being reserved.", + "$ref": "#/definitions/ReservedResourceType" + }, + "instanceFlexibility": { + "description": "Allows reservation discount to be applied across skus within the same Autofit group. Not all skus support instance size flexibility.", + "$ref": "#/definitions/InstanceFlexibility" + }, + "displayName": { + "type": "string", + "description": "Friendly name for user to easily identify the reservation" + }, + "appliedScopes": { + "description": "The list of applied scopes", + "$ref": "#/definitions/AppliedScopes" + }, + "appliedScopeType": { + "description": "The applied scope type", + "$ref": "#/definitions/AppliedScopeType" + }, + "archived": { + "description": "Indicates if the reservation is archived", + "type": "boolean" + }, + "capabilities": { + "description": "Capabilities of the reservation", + "type": "string" + }, + "quantity": { + "description": "Quantity of the SKUs that are part of the Reservation.", + "$ref": "#/definitions/ReservationQuantity" + }, + "provisioningState": { + "description": "Current state of the reservation.", + "$ref": "#/definitions/ProvisioningState" + }, + "effectiveDateTime": { + "type": "string", + "format": "date-time", + "description": "DateTime of the Reservation starting when this version is effective from." + }, + "benefitStartTime": { + "type": "string", + "format": "date-time", + "description": "This is the DateTime when the reservation benefit started." + }, + "lastUpdatedDateTime": { + "type": "string", + "format": "date-time", + "description": "DateTime of the last time the Reservation was updated.", + "readOnly": true + }, + "expiryDate": { + "type": "string", + "format": "date", + "description": "This is the date when the Reservation will expire." + }, + "skuDescription": { + "type": "string", + "description": "Description of the SKU in english." + }, + "extendedStatusInfo": { + "description": "The message giving detailed information about the status code.", + "$ref": "#/definitions/ExtendedStatusInfo" + }, + "billingPlan": { + "description": "The billing plan options available for this SKU.", + "$ref": "#/definitions/ReservationBillingPlan" + }, + "displayProvisioningState": { + "description": "The provisioning state of the reservation for display, e.g. Succeeded", + "type": "string", + "readOnly": true + }, + "provisioningSubState": { + "description": "The provisioning state of the reservation, e.g. Succeeded", + "type": "string", + "readOnly": true + }, + "purchaseDate": { + "type": "string", + "format": "date", + "description": "This is the date when the Reservation was purchased." + }, + "splitProperties": { + "$ref": "#/definitions/ReservationSplitProperties" + }, + "mergeProperties": { + "$ref": "#/definitions/ReservationMergeProperties" + }, + "swapProperties": { + "$ref": "#/definitions/ReservationSwapProperties" + }, + "appliedScopeProperties": { + "$ref": "#/definitions/AppliedScopeProperties" + }, + "billingScopeId": { + "$ref": "#/definitions/BillingScopeId" + }, + "renew": { + "description": "Setting this to true will automatically purchase a new reservation on the expiration date time.", + "$ref": "#/definitions/Renew" + }, + "renewSource": { + "type": "string", + "description": "Reservation Id of the reservation from which this reservation is renewed. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}." + }, + "renewDestination": { + "type": "string", + "description": "Reservation Id of the reservation which is purchased because of renew. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}." + }, + "renewProperties": { + "$ref": "#/definitions/RenewPropertiesResponse" + }, + "term": { + "description": "Represent the term of Reservation.", + "$ref": "#/definitions/ReservationTerm" + }, + "userFriendlyAppliedScopeType": { + "description": "The applied scope type of the reservation for display, e.g. Shared", + "type": "string", + "readOnly": true + }, + "userFriendlyRenewState": { + "description": "The renew state of the reservation for display, e.g. On", + "type": "string", + "readOnly": true + }, + "utilization": { + "readOnly": true, + "type": "object", + "description": "Reservation utilization", + "properties": { + "trend": { + "description": "The number of days trend for a reservation", + "readOnly": true, + "type": "string" + }, + "aggregates": { + "description": "The array of aggregates of a reservation's utilization", + "type": "array", + "items": { + "$ref": "#/definitions/ReservationUtilizationAggregates" + } + } + } + } + } + }, + "AppliedScopeProperties": { + "type": "object", + "properties": { + "tenantId": { + "type": "string", + "description": "Tenant ID of the applied scope type" + }, + "managementGroupId": { + "type": "string", + "description": "Management group ID of the format /providers/Microsoft.Management/managementGroups/{managementGroupId}" + }, + "displayName": { + "type": "string", + "description": "Management group display name" + } + } + }, + "ReservationSplitProperties": { + "type": "object", + "properties": { + "splitDestinations": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of destination Resource Id that are created due to split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + }, + "splitSource": { + "type": "string", + "description": "Resource Id of the Reservation from which this is split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + } + } + }, + "ReservationMergeProperties": { + "type": "object", + "properties": { + "mergeDestination": { + "type": "string", + "description": "Reservation Resource Id Created due to the merge. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + }, + "mergeSources": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Resource Ids of the Source Reservation's merged to form this Reservation. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + } + } + }, + "ReservationSwapProperties": { + "type": "object", + "properties": { + "swapSource": { + "type": "string", + "description": "Resource Id of the Source Reservation that gets swapped. Format of the resource Id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + }, + "swapDestination": { + "type": "string", + "description": "Reservation Resource Id that the original resource gets swapped to. Format of the resource Id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + } + } + }, + "PurchaseRequestProperties": { + "type": "object", + "properties": { + "reservedResourceType": { + "$ref": "#/definitions/ReservedResourceType" + }, + "billingScopeId": { + "$ref": "#/definitions/BillingScopeId" + }, + "term": { + "$ref": "#/definitions/ReservationTerm" + }, + "billingPlan": { + "$ref": "#/definitions/ReservationBillingPlan" + }, + "quantity": { + "description": "Quantity of the SKUs that are part of the Reservation.", + "$ref": "#/definitions/ReservationQuantity" + }, + "displayName": { + "type": "string", + "description": "Friendly name of the Reservation" + }, + "appliedScopeType": { + "$ref": "#/definitions/AppliedScopeType" + }, + "appliedScopes": { + "$ref": "#/definitions/AppliedScopes" + }, + "renew": { + "$ref": "#/definitions/Renew" + }, + "reservedResourceProperties": { + "type": "object", + "description": "Properties specific to each reserved resource type. Not required if not applicable.", + "properties": { + "instanceFlexibility": { + "$ref": "#/definitions/InstanceFlexibility" + } + } + } + } + }, + "ReservationUtilizationAggregates": { + "description": "The aggregate values of reservation utilization", + "type": "object", + "properties": { + "grain": { + "description": "The grain of the aggregate", + "readOnly": true, + "type": "number" + }, + "grainUnit": { + "description": "The grain unit of the aggregate", + "readOnly": true, + "type": "string" + }, + "value": { + "description": "The aggregate value", + "readOnly": true, + "type": "number" + }, + "valueUnit": { + "description": "The aggregate value unit", + "readOnly": true, + "type": "string" + } + } + }, + "ReservationSummary": { + "description": "The roll up count summary of reservations in each state", + "type": "object", + "properties": { + "succeededCount": { + "description": "The number of reservation in Succeeded state", + "readOnly": true, + "type": "number" + }, + "failedCount": { + "description": "The number of reservation in Failed state", + "readOnly": true, + "type": "number" + }, + "expiringCount": { + "description": "The number of reservation in Expiring state", + "readOnly": true, + "type": "number" + }, + "expiredCount": { + "description": "The number of reservation in Expired state", + "readOnly": true, + "type": "number" + }, + "pendingCount": { + "description": "The number of reservation in Pending state", + "readOnly": true, + "type": "number" + }, + "cancelledCount": { + "description": "The number of reservation in Cancelled state", + "readOnly": true, + "type": "number" + }, + "processingCount": { + "description": "The number of reservation in Processing state", + "readOnly": true, + "type": "number" + } + } + }, + "PatchProperties": { + "type": "object", + "properties": { + "appliedScopeType": { + "$ref": "#/definitions/AppliedScopeType" + }, + "appliedScopes": { + "$ref": "#/definitions/AppliedScopes" + }, + "instanceFlexibility": { + "$ref": "#/definitions/InstanceFlexibility" + }, + "name": { + "type": "string", + "description": "Name of the Reservation" + }, + "renew": { + "$ref": "#/definitions/Renew" + }, + "renewProperties": { + "type": "object", + "properties": { + "purchaseProperties": { + "$ref": "#/definitions/PurchaseRequest" + } + } + } + } + }, + "SplitProperties": { + "type": "object", + "properties": { + "quantities": { + "type": "array", + "description": "List of the quantities in the new reservations to create.", + "items": { + "type": "integer", + "format": "int32", + "minItems": 2, + "maxItems": 2 + } + }, + "reservationId": { + "type": "string", + "description": "Resource id of the reservation to be split. Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + } + } + }, + "MergeProperties": { + "type": "object", + "properties": { + "sources": { + "type": "array", + "description": "Format of the resource id should be /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}", + "items": { + "type": "string" + } + } + } + }, + "MergeRequest": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/MergeProperties" + } + } + }, + "PurchaseRequest": { + "type": "object", + "properties": { + "sku": { + "$ref": "#/definitions/SkuName" + }, + "location": { + "type": "string", + "description": "The Azure Region where the reserved resource lives." + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PurchaseRequestProperties" + } + } + }, + "Patch": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/PatchProperties" + } + } + }, + "SplitRequest": { + "type": "object", + "properties": { + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/SplitProperties" + } + } + }, + "ErrorResponse": { + "description": "Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.", + "type": "object", + "properties": { + "error": { + "description": "The details of the error.", + "$ref": "#/definitions/ErrorDetails" + } + } + }, + "Error": { + "type": "object", + "properties": { + "error": { + "$ref": "#/definitions/ExtendedErrorInfo" + } + } + }, + "ExtendedErrorInfo": { + "type": "object", + "properties": { + "code": { + "$ref": "#/definitions/ErrorResponseCode" + }, + "message": { + "type": "string" + } + } + }, + "ErrorDetails": { + "type": "object", + "description": "The details of the error.", + "properties": { + "code": { + "description": "Error code.", + "type": "string", + "readOnly": true + }, + "message": { + "description": "Error message indicating why the operation failed.", + "type": "string", + "readOnly": true + }, + "target": { + "description": "The target of the particular error.", + "type": "string", + "readOnly": true + } + } + }, + "AppliedReservations": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the applied reservations", + "readOnly": true + }, + "name": { + "type": "string", + "description": "Name of resource", + "readOnly": true + }, + "type": { + "type": "string", + "description": "Type of resource. \"Microsoft.Capacity/AppliedReservations\"", + "readOnly": true + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/AppliedReservationsProperties" + } + } + }, + "AppliedReservationsProperties": { + "type": "object", + "properties": { + "reservationOrderIds": { + "$ref": "#/definitions/AppliedReservationList" + } + } + }, + "AppliedReservationList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "type": "string", + "description": "Reservation resource Id. \"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\"" + } + }, + "nextLink": { + "type": "string", + "description": "Url to get the next page of reservations" + } + } + }, + "OperationList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/OperationResponse" + } + }, + "nextLink": { + "type": "string", + "description": "Url to get the next page of items." + } + } + }, + "OperationResponse": { + "type": "object", + "properties": { + "name": { + "description": "Name of the operation", + "type": "string" + }, + "isDataAction": { + "description": "Indicates whether the operation is a data action", + "type": "boolean" + }, + "display": { + "$ref": "#/definitions/OperationDisplay", + "description": "Display of the operation" + }, + "origin": { + "description": "Origin of the operation", + "type": "string" + }, + "properties": { + "$ref": "#/definitions/OperationProperties", + "description": "Properties of the operation" + } + } + }, + "OperationDisplay": { + "type": "object", + "properties": { + "provider": { + "type": "string" + }, + "resource": { + "type": "string" + }, + "operation": { + "type": "string" + }, + "description": { + "type": "string" + } + } + }, + "OperationProperties": { + "description": "Additional details about an operation.", + "type": "object", + "x-ms-client-flatten": true + }, + "ReservationList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ReservationResponse" + } + }, + "nextLink": { + "type": "string", + "description": "Url to get the next page of reservations." + } + } + }, + "ReservationOrderList": { + "type": "object", + "properties": { + "value": { + "type": "array", + "items": { + "$ref": "#/definitions/ReservationOrderResponse" + } + }, + "nextLink": { + "type": "string", + "description": "Url to get the next page of reservationOrders." + } + } + }, + "AppliedScopeType": { + "type": "string", + "description": "Type of the Applied Scope.", + "enum": [ + "Single", + "Shared" + ], + "x-ms-enum": { + "name": "AppliedScopeType", + "modelAsString": true + } + }, + "AppliedScopes": { + "type": "array", + "description": "List of the subscriptions that the benefit will be applied. Do not specify if AppliedScopeType is Shared.", + "items": { + "type": "string", + "minItems": 1, + "maxItems": 1 + } + }, + "BillingScopeId": { + "type": "string", + "description": "Subscription that will be charged for purchasing Reservation" + }, + "Price": { + "type": "object", + "properties": { + "currencyCode": { + "type": "string", + "description": "The ISO 4217 3-letter currency code for the currency used by this purchase record." + }, + "amount": { + "type": "number", + "format": "double" + } + } + }, + "OperationStatus": { + "type": "string", + "description": "Status of the individual operation.", + "enum": [ + "Succeeded", + "Failed", + "Cancelled", + "Pending" + ], + "x-ms-enum": { + "name": "OperationStatus", + "modelAsString": true + } + }, + "CalculatePriceResponse": { + "type": "object", + "properties": { + "properties": { + "$ref": "#/definitions/CalculatePriceResponseProperties" + } + } + }, + "CalculatePriceResponseProperties": { + "type": "object", + "properties": { + "billingCurrencyTotal": { + "type": "object", + "description": "Currency and amount that customer will be charged in customer's local currency. Tax is not included.", + "properties": { + "currencyCode": { + "type": "string", + "description": "The ISO 4217 3-letter currency code for the currency used by this purchase record." + }, + "amount": { + "type": "number", + "description": "Amount in pricing currency. Tax is not included.", + "format": "double" + } + } + }, + "netTotal": { + "type": "number", + "description": "Net total amount in pricing currency.", + "format": "double" + }, + "taxTotal": { + "type": "number", + "description": "Tax amount in pricing currency.", + "format": "double" + }, + "grandTotal": { + "type": "number", + "description": "Total amount in pricing currency.", + "format": "double" + }, + "isTaxIncluded": { + "type": "boolean", + "description": "Whether or not tax is included in grand total" + }, + "isBillingPartnerManaged": { + "description": "True if billing is managed by Microsoft Partner. Used only for CSP accounts.", + "type": "boolean" + }, + "reservationOrderId": { + "description": "GUID that represents reservation order that can be placed after calculating price.", + "type": "string" + }, + "skuTitle": { + "description": "Title of SKU that is being purchased.", + "type": "string" + }, + "skuDescription": { + "description": "Description of SKU that is being purchased.", + "type": "string" + }, + "pricingCurrencyTotal": { + "type": "object", + "description": "Amount that Microsoft uses for record. Used during refund for calculating refund limit. Tax is not included.", + "properties": { + "currencyCode": { + "type": "string", + "description": "The ISO 4217 3-letter currency code for the currency used by this purchase record." + }, + "amount": { + "type": "number" + } + } + }, + "paymentSchedule": { + "type": "array", + "items": { + "$ref": "#/definitions/PaymentDetail" + } + } + } + }, + "ChangeDirectoryRequest": { + "type": "object", + "properties": { + "destinationTenantId": { + "description": "Tenant id GUID that reservation order is to be transferred to", + "type": "string" + } + } + }, + "ChangeDirectoryResponse": { + "type": "object", + "description": "Change directory response", + "properties": { + "reservationOrder": { + "$ref": "#/definitions/ChangeDirectoryResult" + }, + "reservations": { + "type": "array", + "items": { + "$ref": "#/definitions/ChangeDirectoryResult" + } + } + } + }, + "ChangeDirectoryResult": { + "type": "object", + "description": "Change directory result for reservation order or reservation", + "properties": { + "id": { + "type": "string", + "description": "Identifier of the reservation order or reservation" + }, + "name": { + "type": "string", + "description": "Name of the reservation order or reservation" + }, + "isSucceeded": { + "description": "True if change directory operation succeeded on this reservation order or reservation", + "type": "boolean" + }, + "error": { + "type": "string", + "description": "Error reason if operation failed. Null otherwise" + } + } + } + }, + "parameters": { + "CalculateRefundRequestParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Information needed for calculating refund of a reservation.", + "schema": { + "$ref": "#/definitions/CalculateRefundRequest" + } + }, + "CalculateExchangeRequestParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Request containing purchases and refunds that need to be executed.", + "schema": { + "$ref": "#/definitions/CalculateExchangeRequest" + } + }, + "RefundRequestParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Information needed for returning reservation.", + "schema": { + "$ref": "#/definitions/RefundRequest" + } + }, + "ExchangeRequestParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Request containing the refunds and purchases that need to be executed.", + "schema": { + "$ref": "#/definitions/ExchangeRequest" + } + }, + "PurchaseParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Information needed for calculate or purchase reservation", + "schema": { + "$ref": "#/definitions/PurchaseRequest" + } + }, + "ReservationIdParameter": { + "name": "reservationId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Id of the Reservation Item" + }, + "MergeParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Information needed for commercial request for a reservation", + "schema": { + "$ref": "#/definitions/MergeRequest" + } + }, + "PatchParameter": { + "name": "parameters", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Information needed to patch a reservation item", + "schema": { + "$ref": "#/definitions/Patch" + } + }, + "SplitParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Information needed to Split a reservation item", + "schema": { + "$ref": "#/definitions/SplitRequest" + } + }, + "ScopeParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/AvailableScopeRequest" + } + }, + "ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "Supported version.", + "required": true, + "type": "string" + }, + "ExpandRenewPropertiesParameter": { + "name": "expand", + "x-ms-parameter-location": "method", + "in": "query", + "description": "Supported value of this query is renewProperties", + "required": false, + "type": "string" + }, + "SubscriptionIdParameter": { + "name": "subscriptionId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Id of the subscription" + }, + "ReservedResourceTypeIdParameter": { + "name": "reservedResourceType", + "x-ms-parameter-location": "method", + "in": "query", + "required": false, + "type": "string", + "description": "The type of the resource for which the skus should be provided." + }, + "LocationIdParameter": { + "name": "location", + "x-ms-parameter-location": "method", + "in": "query", + "required": false, + "type": "string", + "description": "Filters the skus based on the location specified in this parameter. This can be an azure region or global" + }, + "ReservationOrderIdParameter": { + "name": "reservationOrderId", + "x-ms-parameter-location": "method", + "in": "path", + "required": true, + "type": "string", + "description": "Order Id of the reservation" + }, + "ChangeDirectoryParameter": { + "name": "body", + "x-ms-parameter-location": "method", + "in": "body", + "required": true, + "description": "Information needed to change directory of reservation order", + "schema": { + "$ref": "#/definitions/ChangeDirectoryRequest" + } + } + } +} From 3d625d736a9d9bba632b0fa88427792e2c23ec43 Mon Sep 17 00:00:00 2001 From: gaoyp830 <51546332+gaoyp830@users.noreply.github.com> Date: Thu, 10 Nov 2022 16:28:23 -0800 Subject: [PATCH 02/30] Updates readme --- .../reservations/resource-manager/readme.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/specification/reservations/resource-manager/readme.md b/specification/reservations/resource-manager/readme.md index 54faaf19cfaa..dce9cdff1746 100644 --- a/specification/reservations/resource-manager/readme.md +++ b/specification/reservations/resource-manager/readme.md @@ -26,19 +26,28 @@ These are the global settings for the Reservations API. ``` yaml openapi-type: arm -tag: package-2022-03 +tag: package-2022-11 ``` +### Tag: package-2022-11 + +These settings apply only when `--tag=package-2022-11` is specified on the command line. + +```yaml $(tag) == 'package-2022-11' +input-file: + - Microsoft.Capacity/stable/2022-11-01/reservations.json +``` ### Tag: package-2022-03 These settings apply only when `--tag=package-2022-03` is specified on the command line. -```yaml $(tag) == 'package-2022-03' +``` yaml $(tag) == 'package-2022-03' input-file: - Microsoft.Capacity/stable/2022-03-01/reservations.json - Microsoft.Capacity/stable/2020-10-25/quota.json ``` + ### Tag: package-2021-07-01 These settings apply only when `--tag=package-2021-07-01` is specified on the command line. From 75bd6d3106060937fcfb917f9569d5b9ada12ad2 Mon Sep 17 00:00:00 2001 From: gaoyp830 <51546332+gaoyp830@users.noreply.github.com> Date: Thu, 10 Nov 2022 16:28:26 -0800 Subject: [PATCH 03/30] Updates API version in new specs and examples --- .../stable/2022-11-01/examples/Archive.json | 2 +- .../stable/2022-11-01/examples/CalculateExchange.json | 6 +++--- .../stable/2022-11-01/examples/CalculateRefund.json | 2 +- .../2022-11-01/examples/CalculateReservationOrder.json | 2 +- .../examples/ChangeDirectoryReservationOrder.json | 2 +- .../stable/2022-11-01/examples/Exchange.json | 6 +++--- .../stable/2022-11-01/examples/GetAppliedReservations.json | 2 +- .../stable/2022-11-01/examples/GetAvailableScope.json | 2 +- .../stable/2022-11-01/examples/GetCatalog.json | 2 +- .../stable/2022-11-01/examples/GetOperations.json | 2 +- .../stable/2022-11-01/examples/GetReservationDetails.json | 2 +- .../2022-11-01/examples/GetReservationOrderDetails.json | 2 +- ...GetReservationOrderDetailsWithExpandPlanInformation.json | 2 +- .../stable/2022-11-01/examples/GetReservationOrders.json | 2 +- .../stable/2022-11-01/examples/GetReservationRevisions.json | 2 +- .../stable/2022-11-01/examples/GetReservations.json | 2 +- .../2022-11-01/examples/GetReservationsFromOrder.json | 2 +- .../stable/2022-11-01/examples/MergeReservations.json | 2 +- .../2022-11-01/examples/PurchaseReservationOrder.json | 2 +- .../stable/2022-11-01/examples/Return.json | 2 +- .../stable/2022-11-01/examples/SplitReservation.json | 2 +- .../stable/2022-11-01/examples/Unarchive.json | 2 +- .../stable/2022-11-01/examples/UpdateReservation.json | 2 +- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 2 +- 24 files changed, 28 insertions(+), 28 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Archive.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Archive.json index 1ad4154bf435..bdecd5bc64bf 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Archive.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Archive.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "reservationId": "356e7ae4-84d0-4da6-ab4b-d6b94f3557da" }, diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json index ad5b0e0b41e3..de0364cbcf18 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "body": { "properties": { "reservationsToPurchase": [ @@ -114,8 +114,8 @@ }, "202": { "headers": { - "Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-03-01", - "Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-03-01", + "Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-11-01", + "Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-11-01", "Retry-After": 5 } } diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateRefund.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateRefund.json index 923a3eafe54e..614d2b4b7a11 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateRefund.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateRefund.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "body": { "id": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateReservationOrder.json index 7756fd1974c5..68148ed15c3d 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateReservationOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateReservationOrder.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "body": { "sku": { "name": "standard_D1" diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/ChangeDirectoryReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/ChangeDirectoryReservationOrder.json index 22b4b553806a..0902fa6031e2 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/ChangeDirectoryReservationOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/ChangeDirectoryReservationOrder.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9", "body": { "destinationTenantId": "906655ea-30be-4587-9d12-b50e077b0f32" diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json index a63ff0aed628..4ac9963e9230 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "body": { "properties": { "sessionId": "66e2ac8f-439e-4345-8235-6fef07608081" @@ -91,8 +91,8 @@ }, "202": { "headers": { - "Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-03-01", - "Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-03-01", + "Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-11-01", + "Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-11-01", "Retry-After": 5 } } diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAppliedReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAppliedReservations.json index f4fb03ebbd12..34d1ff3b97e0 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAppliedReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAppliedReservations.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "subscriptionId": "23bc208b-083f-4901-ae85-4f98c0c3b4b6" }, "responses": { diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAvailableScope.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAvailableScope.json index 839bdec88eca..e29b05a87147 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAvailableScope.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetAvailableScope.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "reservationId": "356e7ae4-84d0-4da6-ab4b-d6b94f3557da", "body": { diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json index 534acf51a3b1..055cb4dc0bf8 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "subscriptionId": "23bc208b-083f-4901-ae85-4f98c0c3b4b6", "reservedResourceType": "VirtualMachines", "location": "eastus" diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetOperations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetOperations.json index b59341efb650..2db808d75ab8 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetOperations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetOperations.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01" + "api-version": "2022-11-01" }, "responses": { "200": { diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json index bb5946a16bbd..4a8a7a49c255 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "reservationId": "6ef59113-3482-40da-8d79-787f823e34bc", "expand": "renewProperties" diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json index 55e2f9f09c95..1babf9cc265a 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9" }, "responses": { diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json index bda636e7e605..1dff0093d447 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9", "$expand": "schedule" }, diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json index 61ef57a4a274..7a5b8d0f9076 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01" + "api-version": "2022-11-01" }, "responses": { "200": { diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json index 646d30e9d72e..917bf69134c8 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "reservationId": "6ef59113-3482-40da-8d79-787f823e34bc" }, diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json index dac2d9a407ac..d6dfc8635769 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "$filter": "(properties%2farchived+eq+false)", "$orderby": "properties/displayName asc", "$skiptoken": "50", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json index e5e035a012e2..dca5dfcd43cc 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da" }, "responses": { diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json index d564e8b3779f..79438cf5719c 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "body": { "properties": { diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json index 87a2de8f1870..a455c4b90359 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9", "body": { "sku": { 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 0b8e6bb73900..99657edaeb98 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 @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "body": { "properties": { diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json index ec82a3492cf7..846acd063dfa 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "body": { "properties": { diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Unarchive.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Unarchive.json index 1ad4154bf435..bdecd5bc64bf 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Unarchive.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Unarchive.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "reservationId": "356e7ae4-84d0-4da6-ab4b-d6b94f3557da" }, diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json index 6cac8a88c7a7..f56b7ea11e17 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json @@ -1,6 +1,6 @@ { "parameters": { - "api-version": "2022-03-01", + "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "reservationId": "6ef59113-3482-40da-8d79-787f823e34bc", "parameters": { 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 ab18e743beab..83d587a4596a 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 @@ -3,7 +3,7 @@ "info": { "title": "Azure Reservation API", "description": "This API describe Azure Reservation", - "version": "2022-03-01" + "version": "2022-11-01" }, "host": "management.azure.com", "schemes": [ From 3e3a45552337dc4b68d7067ae0dec18a5bbc4a6e Mon Sep 17 00:00:00 2001 From: chchen3 Date: Wed, 16 Nov 2022 13:26:55 -0800 Subject: [PATCH 04/30] 2022-02-16-privatepreview CalculateExchange and Exchange, 2022-06-02-privatepreview Reservation properties change --- .../examples/CalculateExchange.json | 56 +++- .../stable/2022-11-01/examples/Exchange.json | 38 ++- .../examples/GetReservationDetails.json | 4 +- .../examples/GetReservationOrderDetails.json | 2 +- ...OrderDetailsWithExpandPlanInformation.json | 2 +- .../examples/GetReservationOrders.json | 6 +- .../examples/GetReservationRevisions.json | 16 +- .../2022-11-01/examples/GetReservations.json | 4 +- .../examples/GetReservationsFromOrder.json | 18 +- .../examples/MergeReservations.json | 12 +- .../examples/PurchaseReservationOrder.json | 4 +- .../2022-11-01/examples/SplitReservation.json | 12 +- .../examples/UpdateReservation.json | 4 +- .../stable/2022-11-01/reservations.json | 306 +++++++++++++++--- 14 files changed, 381 insertions(+), 103 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json index de0364cbcf18..dda013c7e3e7 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json @@ -25,6 +25,27 @@ } } ], + "savingsPlansToPurchase": [ + { + "sku": { + "name": "Compute_Savings_Plan" + }, + "properties": { + "displayName": "ComputeSavingsPlan", + "billingScopeId": "/subscriptions/10000000-0000-0000-0000-000000000000", + "term": "P1Y", + "appliedScopeType": "Single", + "appliedScopeProperties": { + "resourceGroupId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/testrg" + }, + "commitment": { + "currencyCode": "USD", + "amount": 15.23, + "grain": "Hourly" + } + } + } + ], "reservationsToExchange": [ { "reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6", @@ -44,7 +65,7 @@ "sessionId": "66e2ac8f-439e-4345-8235-6fef07608081", "netPayable": { "currencyCode": "USD", - "amount": 15840.0 + "amount": 149254.8 }, "refundsTotal": { "currencyCode": "USD", @@ -52,7 +73,7 @@ }, "purchasesTotal": { "currencyCode": "USD", - "amount": 19800.0 + "amount": 153214.8 }, "policyResult": { "policyErrors": null @@ -85,6 +106,33 @@ } } ], + "savingsPlansToPurchase": [ + { + "properties": { + "sku": { + "name": "Compute_Savings_Plan" + }, + "properties": { + "displayName": "ComputeSavingsPlan", + "billingScopeId": "/subscriptions/10000000-0000-0000-0000-000000000000", + "term": "P1Y", + "appliedScopeType": "Single", + "appliedScopeProperties": { + "resourceGroupId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/testrg" + }, + "commitment": { + "currencyCode": "USD", + "amount": 15.23, + "grain": "Hourly" + } + } + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 133414.8 + } + } + ], "reservationsToExchange": [ { "reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6", @@ -96,11 +144,11 @@ "billingInformation": { "billingCurrencyTotalPaidAmount": { "currencyCode": "USD", - "amount": 19800.0 + "amount": 153214.8 }, "billingCurrencyProratedAmount": { "currencyCode": "USD", - "amount": 15840.0 + "amount": 149254.8 }, "billingCurrencyRemainingCommitmentAmount": { "currencyCode": "USD", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json index 4ac9963e9230..3a41fc167aa8 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json @@ -17,7 +17,7 @@ "sessionId": "66e2ac8f-439e-4345-8235-6fef07608081", "netPayable": { "currencyCode": "USD", - "amount": 15840.0 + "amount": 149254.8 }, "refundsTotal": { "currencyCode": "USD", @@ -25,7 +25,7 @@ }, "purchasesTotal": { "currencyCode": "USD", - "amount": 19800.0 + "amount": 153214.8 }, "policyResult": { "policyErrors": null @@ -61,6 +61,36 @@ "status": "Succeeded" } ], + "savingsPlansToPurchase": [ + { + "savingsPlanOrderId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/20000000-0000-0000-0000-000000000000", + "savingsPlanId": "/providers/Microsoft.BillingBenefits/savingsPlanOrders/20000000-0000-0000-0000-000000000000/savingsPlans/30000000-0000-0000-0000-000000000000", + "properties": { + "sku": { + "name": "Compute_Savings_Plan" + }, + "properties": { + "displayName": "ComputeSavingsPlan", + "billingScopeId": "/subscriptions/10000000-0000-0000-0000-000000000000", + "term": "P1Y", + "appliedScopeType": "Single", + "appliedScopeProperties": { + "resourceGroupId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/testrg" + }, + "commitment": { + "currencyCode": "USD", + "amount": 15.23, + "grain": "Hourly" + } + } + }, + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 133414.8 + }, + "status": "Succeeded" + } + ], "reservationsToExchange": [ { "reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6", @@ -72,11 +102,11 @@ "billingInformation": { "billingCurrencyTotalPaidAmount": { "currencyCode": "USD", - "amount": 19800.0 + "amount": 153214.8 }, "billingCurrencyProratedAmount": { "currencyCode": "USD", - "amount": 15840.0 + "amount": 149254.8 }, "billingCurrencyRemainingCommitmentAmount": { "currencyCode": "USD", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json index 4a8a7a49c255..434f1042908c 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json @@ -13,7 +13,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc", + "name": "6ef59113-3482-40da-8d79-787f823e34bc", "etag": 2, "location": "eastus", "properties": { @@ -28,7 +28,7 @@ "billingPlan": "Monthly", "quantity": 3, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", "lastUpdatedDateTime": "2017-09-22T22:46:32.7632798Z", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json index 1babf9cc265a..fe3e458c2ed2 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json @@ -15,7 +15,7 @@ "benefitStartTime": "2017-08-30T03:49:19.0252126Z", "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", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json index 1dff0093d447..3e7f64441388 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json @@ -16,7 +16,7 @@ "requestDateTime": "2019-08-30T03:49:19Z", "createdDateTime": "2019-08-30T03:51:49Z", "benefitStartTime": "2019-08-30T03:51:49Z", - "expiryDate": "2018-08-30", + "expiryDateTime": "2018-08-30T03:51:49Z", "term": "P1Y", "billingPlan": "Monthly", "provisioningState": "Succeeded", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json index 7a5b8d0f9076..1b4a48a66bae 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json @@ -16,7 +16,7 @@ "requestDateTime": "2017-08-29T21:20:23.8134834Z", "createdDateTime": "2017-08-29T21:22:56.8541664Z", "benefitStartTime": "2017-08-29T21:20:23.8134834Z", - "expiryDate": "2018-08-29", + "expiryDateTime": "2018-08-29T21:20:23.8134834Z", "term": "P1Y", "billingPlan": "Monthly", "provisioningState": "Succeeded", @@ -38,7 +38,7 @@ "benefitStartTime": "2017-08-30T12:55:40.2799114Z", "requestDateTime": "2017-08-30T12:55:40.2799114Z", "createdDateTime": "2017-08-30T12:58:20.526Z", - "expiryDate": "2018-08-30", + "expiryDateTime": "2018-08-30T12:58:20.526Z", "term": "P1Y", "billingPlan": "Monthly", "provisioningState": "Succeeded", @@ -60,7 +60,7 @@ "benefitStartTime": "2017-08-30T03:49:19.0252126Z", "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", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json index 917bf69134c8..d15e783ce8d2 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json @@ -14,14 +14,14 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc/revisions/4", "type": "Microsoft.Capacity/reservationOrders/reservations/revisions", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc/4", + "name": "4", "etag": 4, "location": "eastus", "properties": { "appliedScopeType": "Shared", "quantity": 3, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T23:57:48.1891638Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T23:57:48.1891638Z", @@ -43,7 +43,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc/revisions/3", "type": "Microsoft.Capacity/reservationOrders/reservations/revisions", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc/3", + "name": "3", "etag": 3, "location": "eastus", "properties": { @@ -53,7 +53,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", @@ -79,7 +79,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc/revisions/2", "type": "Microsoft.Capacity/reservationOrders/reservations/revisions", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc/2", + "name": "2", "etag": 2, "location": "eastus", "properties": { @@ -89,7 +89,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", @@ -114,7 +114,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc/revisions/1", "type": "Microsoft.Capacity/reservationOrders/reservations/revisions", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc/1", + "name": "1", "etag": 1, "location": "eastus", "properties": { @@ -124,7 +124,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Creating", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:27.3313607Z", "displayName": "cabri_test", "effectiveDateTime": "2017-09-22T22:46:27.3313607Z", "lastUpdatedDateTime": "2017-09-22T22:46:27.3313607Z", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json index d6dfc8635769..679eb3ef25fa 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json @@ -25,10 +25,10 @@ "displayName": "VM_RI_07-21-2020_12-06", "displayProvisioningState": "Succeeded", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", - "expiryDate": "2023-07-21", + "expiryDateTime": "2023-07-21T22:46:32.7632798Z", "provisioningState": "Succeeded", "provisioningSubState": null, - "purchaseDate": "2021-04-22", + "purchaseDateTime": "2021-04-22T22:46:32.7632798Z", "quantity": 2, "renew": false, "renewSource": "/providers/Microsoft.Capacity/reservationorders/00000000-0000-0000-0000-000000000002/reservations/00000000-0000-0000-0000-000000000003", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json index dca5dfcd43cc..f407b80c1cd0 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json @@ -13,7 +13,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/bcae77cd-3119-4766-919f-b50d36c75c7a", + "name": "bcae77cd-3119-4766-919f-b50d36c75c7a", "etag": 10, "location": "eastus", "properties": { @@ -25,7 +25,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Cancelled", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22", "displayName": "cabri_test", "billingPlan": "Monthly", "benefitStartTime": "2017-09-22T01:00:30.9253826Z", @@ -52,7 +52,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/00238563-7312-4c20-a134-8c030bf938a7", + "name": "00238563-7312-4c20-a134-8c030bf938a7", "etag": 5, "location": "eastus", "properties": { @@ -91,7 +91,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", + "name": "e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", "etag": 4, "location": "eastus", "properties": { @@ -103,7 +103,7 @@ "appliedScopeType": "Single", "quantity": 2, "provisioningState": "Cancelled", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", "benefitStartTime": "2017-09-22T22:46:32.7632798Z", @@ -130,7 +130,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc", + "name": "6ef59113-3482-40da-8d79-787f823e34bc", "etag": 2, "location": "eastus", "properties": { @@ -142,7 +142,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", "benefitStartTime": "2017-09-22T22:46:32.7632798Z", @@ -165,7 +165,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/5se63214-3382-40da-ed79-787f823e34bc", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/5se63214-3382-40da-ed79-787f823e34bc", + "name": "5se63214-3382-40da-ed79-787f823e34bc", "etag": 2, "location": "eastus", "properties": { @@ -177,7 +177,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json index 79438cf5719c..cc36489bdc64 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json @@ -20,7 +20,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/00238563-7312-4c20-a134-8c030bf938a7", + "name": "00238563-7312-4c20-a134-8c030bf938a7", "etag": 5, "location": "eastus", "properties": { @@ -32,7 +32,7 @@ "appliedScopeType": "Single", "quantity": 1, "provisioningState": "Cancelled", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", @@ -58,7 +58,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", + "name": "e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", "etag": 4, "location": "eastus", "properties": { @@ -70,7 +70,7 @@ "appliedScopeType": "Single", "quantity": 2, "provisioningState": "Cancelled", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", @@ -96,7 +96,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc", + "name": "6ef59113-3482-40da-8d79-787f823e34bc", "etag": 2, "location": "eastus", "properties": { @@ -108,7 +108,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json index a455c4b90359..cefe29fbf691 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json @@ -34,7 +34,7 @@ "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", @@ -58,7 +58,7 @@ "billingPlan": "Monthly", "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", "provisioningState": "Succeeded", "reservations": [ diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json index 846acd063dfa..4baf40657e24 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json @@ -21,7 +21,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/00238563-7312-4c20-a134-8c030bf938a7", + "name": "00238563-7312-4c20-a134-8c030bf938a7", "etag": 2, "location": "eastus", "properties": { @@ -33,7 +33,7 @@ "appliedScopeType": "Single", "quantity": 1, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T01:00:30.9253826Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T01:00:30.9253826Z", @@ -52,7 +52,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", + "name": "e0e4b4f5-77ea-4984-9ee4-6bf9850ee6de", "etag": 2, "location": "eastus", "properties": { @@ -64,7 +64,7 @@ "appliedScopeType": "Single", "quantity": 2, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T01:00:30.9253826Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T01:00:30.9253826Z", @@ -83,7 +83,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/bcae77cd-3119-4766-919f-b50d36c75c7a", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/bcae77cd-3119-4766-919f-b50d36c75c7a", + "name": "bcae77cd-3119-4766-919f-b50d36c75c7a", "etag": 10, "location": "eastus", "properties": { @@ -95,7 +95,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Cancelled", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T01:00:30.9253826Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T01:00:30.9253826Z", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json index f56b7ea11e17..a6c7df7a5347 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json @@ -18,7 +18,7 @@ }, "id": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc", "type": "Microsoft.Capacity/reservationOrders/reservations", - "name": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da/6ef59113-3482-40da-8d79-787f823e34bc", + "name": "6ef59113-3482-40da-8d79-787f823e34bc", "etag": 4, "location": "eastus", "properties": { @@ -27,7 +27,7 @@ "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "quantity": 3, "provisioningState": "Succeeded", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T23:57:48.1891638Z", "displayName": "cabri_test", "billingPlan": "Monthly", "effectiveDateTime": "2017-09-22T23:57:48.1891638Z", 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 83d587a4596a..cfb54e9cd16a 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 @@ -944,7 +944,7 @@ }, { "name": "$filter", - "description": "May be used to filter by reservation properties. The filter supports 'eq', 'or', and 'and'. It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDate, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}", + "description": "May be used to filter by reservation properties. The filter supports 'eq', 'or', and 'and'. It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDateTime, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}", "in": "query", "required": false, "type": "string" @@ -1136,6 +1136,22 @@ "modelAsString": true } }, + "ProvisioningSubState": { + "type": "string", + "description": "Represent the current sub state of the Reservation.", + "enum": [ + "None", + "Active", + "Pending", + "AppliedBenefits", + "Warning", + "Orphaned" + ], + "x-ms-enum": { + "name": "ProvisioningSubState", + "modelAsString": true + } + }, "ReservedResourceType": { "type": "string", "description": "The type of the resource that is being reserved.", @@ -1174,7 +1190,7 @@ }, "Location": { "type": "string", - "description": "Location in which the Resources needs to be reserved. It cannot be changed after the resource has been created.", + "description": "The Azure Region where the reserved resource lives.", "enum": [ "westus", "eastus", @@ -1306,14 +1322,24 @@ "description": "List of reservations that are being purchased in this exchange.", "items": { "$ref": "#/definitions/PurchaseRequest" - } + }, + "x-ms-identifiers": [] + }, + "savingsPlansToPurchase": { + "type": "array", + "description": "List of savings plans that are being purchased in this exchange.", + "items": { + "$ref": "#/definitions/SavingsPlanPurchaseRequest" + }, + "x-ms-identifiers": [] }, "reservationsToExchange": { "type": "array", "description": "List of reservations that are being returned in this exchange.", "items": { "$ref": "#/definitions/ReservationToReturn" - } + }, + "x-ms-identifiers": [] } } }, @@ -1663,9 +1689,9 @@ "format": "date-time", "description": "This is the DateTime when the reservation was created." }, - "expiryDate": { + "expiryDateTime": { "type": "string", - "format": "date", + "format": "date-time", "description": "This is the date when the Reservation will expire." }, "benefitStartTime": { @@ -1709,7 +1735,9 @@ "Pending", "Processing", "Cancelled", - "Failed" + "Failed", + "Warning", + "NoBenefit" ], "x-ms-enum": { "name": "DisplayProvisioningState", @@ -1789,8 +1817,7 @@ "x-ms-azure-resource": true, "properties": { "location": { - "type": "string", - "description": "The Azure Region where the reserved resource lives." + "$ref": "#/definitions/Location" }, "etag": { "type": "integer", @@ -2128,14 +2155,24 @@ "description": "Details of the reservations being purchased", "items": { "$ref": "#/definitions/ReservationToPurchaseCalculateExchange" - } + }, + "x-ms-identifiers": [] + }, + "savingsPlansToPurchase": { + "type": "array", + "description": "Details of the savings plans being purchased", + "items": { + "$ref": "#/definitions/SavingsPlanToPurchaseCalculateExchange" + }, + "x-ms-identifiers": [] }, "reservationsToExchange": { "type": "array", "description": "Details of the reservations being returned", "items": { "$ref": "#/definitions/ReservationToExchange" - } + }, + "x-ms-identifiers": [] }, "policyResult": { "$ref": "#/definitions/ExchangePolicyErrors" @@ -2164,14 +2201,24 @@ "description": "Details of the reservations being purchased", "items": { "$ref": "#/definitions/ReservationToPurchaseExchange" - } + }, + "x-ms-identifiers": [] + }, + "savingsPlansToPurchase": { + "type": "array", + "description": "Details of the savings plans being purchased", + "items": { + "$ref": "#/definitions/SavingsPlanToPurchaseExchange" + }, + "x-ms-identifiers": [] }, "reservationsToExchange": { "type": "array", "description": "Details of the reservations being returned", "items": { "$ref": "#/definitions/ReservationToReturnForExchange" - } + }, + "x-ms-identifiers": [] }, "policyResult": { "$ref": "#/definitions/ExchangePolicyErrors" @@ -2228,7 +2275,8 @@ "description": "Exchange Policy errors", "items": { "$ref": "#/definitions/ExchangePolicyError" - } + }, + "x-ms-identifiers": [] } } }, @@ -2277,6 +2325,18 @@ } } }, + "SavingsPlanToPurchaseCalculateExchange": { + "type": "object", + "description": "Savings Plan purchase details", + "properties": { + "properties": { + "$ref": "#/definitions/SavingsPlanPurchaseRequest" + }, + "billingCurrencyTotal": { + "$ref": "#/definitions/Price" + } + } + }, "ReservationToPurchaseExchange": { "type": "object", "description": "Reservation purchase details", @@ -2300,6 +2360,52 @@ } } }, + "SavingsPlanToPurchaseExchange": { + "type": "object", + "description": "Savings Plan purchase details", + "properties": { + "savingsPlanOrderId": { + "type": "string", + "description": "Fully qualified id of the Savings Plan order being purchased" + }, + "savingsPlanId": { + "type": "string", + "description": "Fully qualified id of the Savings Plan being purchased. This value is only guaranteed to be non-null if the purchase is successful." + }, + "properties": { + "$ref": "#/definitions/SavingsPlanPurchaseRequest" + }, + "billingCurrencyTotal": { + "$ref": "#/definitions/Price" + }, + "status": { + "$ref": "#/definitions/OperationStatus" + } + } + }, + "BenefitTerm": { + "type": "string", + "description": "Represent SavingsPlan term in ISO 8601 format.", + "enum": [ + "P1Y", + "P3Y" + ], + "x-ms-enum": { + "name": "SavingsPlanTerm", + "modelAsString": true + } + }, + "BillingPlan": { + "type": "string", + "description": "Represents the billing plan in ISO 8601 format. Required only for monthly billing plans.", + "enum": [ + "P1M" + ], + "x-ms-enum": { + "name": "BillingPlan", + "modelAsString": true + } + }, "ReservationsProperties": { "type": "object", "description": "The properties of the reservations", @@ -2316,10 +2422,6 @@ "type": "string", "description": "Friendly name for user to easily identify the reservation" }, - "appliedScopes": { - "description": "The list of applied scopes", - "$ref": "#/definitions/AppliedScopes" - }, "appliedScopeType": { "description": "The applied scope type", "$ref": "#/definitions/AppliedScopeType" @@ -2330,7 +2432,16 @@ }, "capabilities": { "description": "Capabilities of the reservation", - "type": "string" + "type": "string", + "enum": [ + "None", + "ApiReturnEnabled", + "ApiExchangeEnabled" + ], + "x-ms-enum": { + "name": "capabilities", + "modelAsString": true + } }, "quantity": { "description": "Quantity of the SKUs that are part of the Reservation.", @@ -2356,9 +2467,9 @@ "description": "DateTime of the last time the Reservation was updated.", "readOnly": true }, - "expiryDate": { + "expiryDateTime": { "type": "string", - "format": "date", + "format": "date-time", "description": "This is the date when the Reservation will expire." }, "skuDescription": { @@ -2374,18 +2485,16 @@ "$ref": "#/definitions/ReservationBillingPlan" }, "displayProvisioningState": { - "description": "The provisioning state of the reservation for display, e.g. Succeeded", - "type": "string", + "$ref": "#/definitions/DisplayProvisioningState", "readOnly": true }, "provisioningSubState": { - "description": "The provisioning state of the reservation, e.g. Succeeded", - "type": "string", + "$ref": "#/definitions/ProvisioningSubState", "readOnly": true }, - "purchaseDate": { + "purchaseDateTime": { "type": "string", - "format": "date", + "format": "date-time", "description": "This is the date when the Reservation was purchased." }, "splitProperties": { @@ -2423,13 +2532,11 @@ "$ref": "#/definitions/ReservationTerm" }, "userFriendlyAppliedScopeType": { - "description": "The applied scope type of the reservation for display, e.g. Shared", - "type": "string", + "$ref": "#/definitions/UserFriendlyAppliedScopeType", "readOnly": true }, "userFriendlyRenewState": { - "description": "The renew state of the reservation for display, e.g. On", - "type": "string", + "$ref": "#/definitions/UserFriendlyRenewState", "readOnly": true }, "utilization": { @@ -2438,7 +2545,7 @@ "description": "Reservation utilization", "properties": { "trend": { - "description": "The number of days trend for a reservation", + "description": "last 7 day utilization trend for a reservation", "readOnly": true, "type": "string" }, @@ -2453,23 +2560,6 @@ } } }, - "AppliedScopeProperties": { - "type": "object", - "properties": { - "tenantId": { - "type": "string", - "description": "Tenant ID of the applied scope type" - }, - "managementGroupId": { - "type": "string", - "description": "Management group ID of the format /providers/Microsoft.Management/managementGroups/{managementGroupId}" - }, - "displayName": { - "type": "string", - "description": "Management group display name" - } - } - }, "ReservationSplitProperties": { "type": "object", "properties": { @@ -2558,6 +2648,33 @@ } } }, + "SavingsPlanPurchaseRequestProperties": { + "type": "object", + "properties": { + "displayName": { + "type": "string", + "description": "Friendly name of the Savings Plan" + }, + "billingScopeId": { + "$ref": "#/definitions/BillingScopeId" + }, + "term": { + "$ref": "#/definitions/BenefitTerm" + }, + "billingPlan": { + "$ref": "#/definitions/BillingPlan" + }, + "appliedScopeType": { + "$ref": "#/definitions/AppliedScopeType" + }, + "appliedScopeProperties": { + "$ref": "#/definitions/AppliedScopeProperties" + }, + "commitment": { + "$ref": "#/definitions/Commitment" + } + } + }, "ReservationUtilizationAggregates": { "description": "The aggregate values of reservation utilization", "type": "object", @@ -2622,6 +2739,16 @@ "description": "The number of reservation in Processing state", "readOnly": true, "type": "number" + }, + "warningCount": { + "description": "The number of reservation in Warning state", + "readOnly": true, + "type": "number" + }, + "noBenefitCount": { + "description": "The number of reservation in NoBenefit state", + "readOnly": true, + "type": "number" } } }, @@ -2701,8 +2828,7 @@ "$ref": "#/definitions/SkuName" }, "location": { - "type": "string", - "description": "The Azure Region where the reserved resource lives." + "$ref": "#/definitions/Location" }, "properties": { "x-ms-client-flatten": true, @@ -2710,6 +2836,18 @@ } } }, + "SavingsPlanPurchaseRequest": { + "type": "object", + "properties": { + "sku": { + "$ref": "#/definitions/SkuName" + }, + "properties": { + "x-ms-client-flatten": true, + "$ref": "#/definitions/SavingsPlanPurchaseRequestProperties" + } + } + }, "Patch": { "type": "object", "properties": { @@ -2923,7 +3061,8 @@ "description": "Type of the Applied Scope.", "enum": [ "Single", - "Shared" + "Shared", + "ManagementGroup" ], "x-ms-enum": { "name": "AppliedScopeType", @@ -2937,11 +3076,72 @@ "type": "string", "minItems": 1, "maxItems": 1 + }, + "x-ms-identifiers": [] + }, + "AppliedScopeProperties": { + "type": "object", + "description": "Properties specific to applied scope type. Not required if not applicable.", + "properties": { + "tenantId": { + "$ref": "#/definitions/TenantId" + }, + "managementGroupId": { + "$ref": "#/definitions/ManagementGroupId" + }, + "subscriptionId": { + "$ref": "#/definitions/SubscriptionId" + }, + "resourceGroupId": { + "$ref": "#/definitions/ResourceGroupId" + }, + "displayName": { + "type": "string", + "description": "Display name" + } + } + }, + "TenantId": { + "type": "string", + "description": "Tenant ID where the savings plan should apply benefit." + }, + "ManagementGroupId": { + "type": "string", + "description": "Fully-qualified identifier of the management group where the benefit must be applied." + }, + "SubscriptionId": { + "type": "string", + "description": "Fully-qualified identifier of the subscription." + }, + "ResourceGroupId": { + "type": "string", + "description": "Fully-qualified identifier of the resource group." + }, + "Commitment": { + "type": "object", + "description": "Commitment towards the benefit.", + "allOf": [ + { + "$ref": "#/definitions/Price" + } + ], + "properties": { + "grain": { + "type": "string", + "description": "Commitment grain.", + "enum": [ + "Hourly" + ], + "x-ms-enum": { + "name": "CommitmentGrain", + "modelAsString": true + } + } } }, "BillingScopeId": { "type": "string", - "description": "Subscription that will be charged for purchasing Reservation" + "description": "Subscription that will be charged for purchasing Reservation or Savings Plan" }, "Price": { "type": "object", From 07a5f72d1f4b545809c79c18c0bf278e867bea1a Mon Sep 17 00:00:00 2001 From: chchen3 Date: Wed, 16 Nov 2022 17:15:52 -0800 Subject: [PATCH 05/30] Add appliedScopeProperties to purchase and patch request. Add reviewDateTime to purchase patch request and get response for reservationOrder --- .../stable/2022-11-01/reservations.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) 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 cfb54e9cd16a..04eeecaa02d5 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 @@ -1722,6 +1722,11 @@ "items": { "$ref": "#/definitions/ReservationResponse" } + }, + "reviewDateTime": { + "type": "string", + "format": "date-time", + "description": "This is the date-time when the Azure Hybrid Benefit needs to be reviewed." } } }, @@ -2634,6 +2639,9 @@ "appliedScopes": { "$ref": "#/definitions/AppliedScopes" }, + "appliedScopeProperties": { + "$ref": "#/definitions/AppliedScopeProperties" + }, "renew": { "$ref": "#/definitions/Renew" }, @@ -2645,6 +2653,11 @@ "$ref": "#/definitions/InstanceFlexibility" } } + }, + "reviewDateTime": { + "type": "string", + "format": "date-time", + "description": "This is the date-time when the Azure Hybrid Benefit needs to be reviewed." } } }, @@ -2761,6 +2774,9 @@ "appliedScopes": { "$ref": "#/definitions/AppliedScopes" }, + "appliedScopeProperties": { + "$ref": "#/definitions/AppliedScopeProperties" + }, "instanceFlexibility": { "$ref": "#/definitions/InstanceFlexibility" }, @@ -2778,6 +2794,11 @@ "$ref": "#/definitions/PurchaseRequest" } } + }, + "reviewDateTime": { + "type": "string", + "format": "date-time", + "description": "This is the date-time when the Azure Hybrid Benefit needs to be reviewed." } } }, From a16361a5c8cb3be5dd11f0c2ad45b3041c7be05b Mon Sep 17 00:00:00 2001 From: chchen3 Date: Thu, 17 Nov 2022 11:01:38 -0800 Subject: [PATCH 06/30] Add reviewDateTime to Reservation Response --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 5 +++++ 1 file changed, 5 insertions(+) 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 04eeecaa02d5..4edc8f117712 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 @@ -2477,6 +2477,11 @@ "format": "date-time", "description": "This is the date when the Reservation will expire." }, + "reviewDateTime": { + "type": "string", + "format": "date-time", + "description": "This is the date-time when the Azure Hybrid Benefit needs to be reviewed." + }, "skuDescription": { "type": "string", "description": "Description of the SKU in english." From 31826f8e7ee40e30f099d5d95bf8b5fccf728819 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Thu, 17 Nov 2022 11:12:27 -0800 Subject: [PATCH 07/30] Update operationId to clean up doc heirarchy --- .../stable/2022-11-01/reservations.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 4edc8f117712..312a92004e6a 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 @@ -178,7 +178,7 @@ "post": { "summary": "Calculate price for a `ReservationOrder`.", "description": "Calculate price for placing a `ReservationOrder`.", - "operationId": "ReservationOrder_Calculate", + "operationId": "ReservationOrder_CalculatePrice", "x-ms-examples": { "Purchase": { "$ref": "./examples/CalculateReservationOrder.json" @@ -730,7 +730,7 @@ "post": { "summary": "Calculate the refund amount of a reservation order.", "description": "Calculate price for returning `Reservations` if there are no policy errors.\n", - "operationId": "CalculateRefund_Post", + "operationId": "ReservationOrder_CalculateRefund", "x-ms-examples": { "Purchase": { "$ref": "./examples/CalculateRefund.json" @@ -770,7 +770,7 @@ "post": { "summary": "Return a reservation.", "description": "Return a reservation.", - "operationId": "Return_Post", + "operationId": "ReservationOrder_Return", "x-ms-examples": { "Purchase": { "$ref": "./examples/Return.json" @@ -815,7 +815,7 @@ "post": { "summary": "Calculates the refund amounts and price of the new purchases.", "description": "Calculates price for exchanging `Reservations` if there are no policy errors.\n", - "operationId": "CalculateExchange_Post", + "operationId": "CalculateExchange", "x-ms-examples": { "CalculateExchange": { "$ref": "./examples/CalculateExchange.json" @@ -874,7 +874,7 @@ "post": { "summary": "Exchange Reservation(s)", "description": "Returns one or more `Reservations` in exchange for one or more `Reservation` purchases.\n", - "operationId": "Exchange_Post", + "operationId": "Exchange", "x-ms-examples": { "Exchange": { "$ref": "./examples/Exchange.json" From 6bae505c71e21f14a4f97e59a8f3e660062a6bad Mon Sep 17 00:00:00 2001 From: chchen3 Date: Thu, 17 Nov 2022 14:11:04 -0800 Subject: [PATCH 08/30] Modified examples to address property changes. Added back quota.json. Add readonly to property definitions --- .../examples/CalculateExchange.json | 1 - .../stable/2022-11-01/examples/Exchange.json | 1 - .../examples/GetReservationDetails.json | 7 ++-- .../examples/GetReservationRevisions.json | 21 +++++----- .../2022-11-01/examples/GetReservations.json | 1 - .../examples/GetReservationsFromOrder.json | 39 +++++++++++-------- .../examples/MergeReservations.json | 21 +++++----- .../2022-11-01/examples/SplitReservation.json | 21 +++++----- .../stable/2022-11-01/reservations.json | 16 ++++---- .../reservations/resource-manager/readme.md | 1 + 10 files changed, 71 insertions(+), 58 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json index dda013c7e3e7..3764d8489b8f 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/CalculateExchange.json @@ -93,7 +93,6 @@ "quantity": 1, "displayName": "testDisplayName", "appliedScopeType": "Shared", - "appliedScopes": null, "renew": false, "reservedResourceProperties": { "instanceFlexibility": "On" diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json index 3a41fc167aa8..853d6003a3dc 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/Exchange.json @@ -47,7 +47,6 @@ "quantity": 1, "displayName": "testDisplayName", "appliedScopeType": "Shared", - "appliedScopes": null, "renew": false, "reservedResourceProperties": { "instanceFlexibility": "On" diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json index 434f1042908c..05392fd59946 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json @@ -17,9 +17,10 @@ "etag": 2, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "renewSource": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", "renewDestination": "/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/00238563-7312-4c20-a134-8c030bf938a7", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json index d15e783ce8d2..8f048dccbfde 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json @@ -47,9 +47,10 @@ "etag": 3, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", @@ -83,9 +84,10 @@ "etag": 2, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", @@ -118,9 +120,10 @@ "etag": 1, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Creating", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json index 679eb3ef25fa..be6a823b9ed4 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json @@ -20,7 +20,6 @@ "name": "Standard_D1" }, "properties": { - "appliedScopes": null, "appliedScopeType": "Shared", "displayName": "VM_RI_07-21-2020_12-06", "displayProvisioningState": "Succeeded", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json index f407b80c1cd0..be54941a6a67 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json @@ -17,15 +17,16 @@ "etag": 10, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Cancelled", - "expiryDateTime": "2018-09-22", + "expiryDateTime": "2018-09-22T01:00:30.9253826Z", "displayName": "cabri_test", "billingPlan": "Monthly", "benefitStartTime": "2017-09-22T01:00:30.9253826Z", @@ -56,15 +57,16 @@ "etag": 5, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", "quantity": 1, "provisioningState": "Cancelled", - "expiryDate": "2018-09-22", + "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", "benefitStartTime": "2017-09-22T22:46:32.7632798Z", @@ -95,9 +97,10 @@ "etag": 4, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", @@ -134,9 +137,10 @@ "etag": 2, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", @@ -169,9 +173,10 @@ "etag": 2, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json index cc36489bdc64..09e6a2a62745 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json @@ -24,9 +24,10 @@ "etag": 5, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", @@ -62,9 +63,10 @@ "etag": 4, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", @@ -100,9 +102,10 @@ "etag": 2, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json index 4baf40657e24..519ef17e7545 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json @@ -25,9 +25,10 @@ "etag": 2, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", @@ -56,9 +57,10 @@ "etag": 2, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", @@ -87,9 +89,10 @@ "etag": 10, "location": "eastus", "properties": { - "appliedScopes": [ - "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3" - ], + "appliedScopeProperties": { + "subscriptionId": "/subscriptions/98df3792-7962-4f18-8be2-d5576f122de3", + "displayName": "Azure subscription 1" + }, "renew": false, "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "appliedScopeType": "Single", 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 312a92004e6a..01fbd534c5fb 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 @@ -1139,6 +1139,7 @@ "ProvisioningSubState": { "type": "string", "description": "Represent the current sub state of the Reservation.", + "readOnly": true, "enum": [ "None", "Active", @@ -1733,6 +1734,7 @@ "DisplayProvisioningState": { "type": "string", "description": "Represent the current display state of the Reservation.", + "readOnly": true, "enum": [ "Succeeded", "Expiring", @@ -1752,6 +1754,7 @@ "UserFriendlyAppliedScopeType": { "type": "string", "description": "The applied scope type", + "readOnly": true, "enum": [ "None", "Shared", @@ -1767,6 +1770,7 @@ "UserFriendlyRenewState": { "type": "string", "description": "The renew state of the reservation", + "readOnly": true, "enum": [ "On", "Off", @@ -2495,12 +2499,10 @@ "$ref": "#/definitions/ReservationBillingPlan" }, "displayProvisioningState": { - "$ref": "#/definitions/DisplayProvisioningState", - "readOnly": true + "$ref": "#/definitions/DisplayProvisioningState" }, "provisioningSubState": { - "$ref": "#/definitions/ProvisioningSubState", - "readOnly": true + "$ref": "#/definitions/ProvisioningSubState" }, "purchaseDateTime": { "type": "string", @@ -2542,12 +2544,10 @@ "$ref": "#/definitions/ReservationTerm" }, "userFriendlyAppliedScopeType": { - "$ref": "#/definitions/UserFriendlyAppliedScopeType", - "readOnly": true + "$ref": "#/definitions/UserFriendlyAppliedScopeType" }, "userFriendlyRenewState": { - "$ref": "#/definitions/UserFriendlyRenewState", - "readOnly": true + "$ref": "#/definitions/UserFriendlyRenewState" }, "utilization": { "readOnly": true, diff --git a/specification/reservations/resource-manager/readme.md b/specification/reservations/resource-manager/readme.md index dce9cdff1746..329a78f064ce 100644 --- a/specification/reservations/resource-manager/readme.md +++ b/specification/reservations/resource-manager/readme.md @@ -37,6 +37,7 @@ These settings apply only when `--tag=package-2022-11` is specified on the comma ```yaml $(tag) == 'package-2022-11' input-file: - Microsoft.Capacity/stable/2022-11-01/reservations.json + - Microsoft.Capacity/stable/2020-10-25/quota.json ``` ### Tag: package-2022-03 From a87efddb6c6f343d91a88fde6b65b2cbd67b241e Mon Sep 17 00:00:00 2001 From: chchen3 Date: Thu, 17 Nov 2022 17:30:43 -0800 Subject: [PATCH 09/30] Add 202 headers for Split, Merge, Patch. Add back AppliedScopes in reservation response to match request. --- .../examples/MergeReservations.json | 7 ++- .../2022-11-01/examples/SplitReservation.json | 7 ++- .../examples/UpdateReservation.json | 8 +++- .../stable/2022-11-01/reservations.json | 47 +++++++++++++++++-- 4 files changed, 63 insertions(+), 6 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json index 09e6a2a62745..1d86850f6cdf 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json @@ -129,6 +129,11 @@ } ] }, - "202": {} + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Capacity/reservationorders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/mergeoperationresults/6ef59113-3482-40da-8d79-787f823e34bc_10?api-version=2022-11-01", + "Retry-After": 120 + } + } } } diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json index 519ef17e7545..168d309ef197 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json @@ -120,6 +120,11 @@ } ] }, - "202": {} + "202": { + "headers": { + "Location": "https://management.azure.com/providers/Microsoft.Capacity/reservationorders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/splitoperationresults/bcae77cd-3119-4766-919f-b50d36c75c7a_10?api-version=2022-11-01", + "Retry-After": 120 + } + } } } diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json index a6c7df7a5347..1151dd87a5ff 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json @@ -44,6 +44,12 @@ } } }, - "202": {} + "202": { + "headers": { + "Azure-AsyncOperation": "https://management.azure.com/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc?api-version=2022-11-01", + "Location": "https://management.azure.com/providers/microsoft.capacity/reservationOrders/276e7ae4-84d0-4da6-ab4b-d6b94f3557da/reservations/6ef59113-3482-40da-8d79-787f823e34bc?api-version=2022-11-01", + "Retry-After": 120 + } + } } } 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 01fbd534c5fb..0f1d6cce1de7 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 @@ -382,7 +382,18 @@ } }, "202": { - "description": "The request is accepted and is being processed" + "description": "The request is accepted and is being processed", + "headers": { + "Location": { + "type": "string", + "description": "URL for determining when an operation has completed. Only use this value only when Azure-AsyncOperation isn't returned." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "Clients should wait for the Retry-After interval before polling again" + } + } }, "default": { "description": "Unexpected error", @@ -432,7 +443,18 @@ } }, "202": { - "description": "The request is accepted and is being processed" + "description": "The request is accepted and is being processed", + "headers": { + "Location": { + "type": "string", + "description": "URL for determining when an operation has completed. Only use this value only when Azure-AsyncOperation isn't returned." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "Clients should wait for the Retry-After interval before polling again" + } + } }, "default": { "description": "Unexpected error", @@ -561,7 +583,22 @@ } }, "202": { - "description": "The request is accepted and is being processed" + "description": "The request is accepted and is being processed", + "headers": { + "Azure-AsyncOperation": { + "type": "string", + "description": "URL for checking the ongoing status of the operation." + }, + "Location": { + "type": "string", + "description": "URL for determining when an operation has completed. Only use this value only when Azure-AsyncOperation isn't returned." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "Clients should wait for the Retry-After interval before polling again" + } + } }, "default": { "description": "Unexpected error", @@ -2431,6 +2468,10 @@ "type": "string", "description": "Friendly name for user to easily identify the reservation" }, + "appliedScopes": { + "description": "The list of applied scopes", + "$ref": "#/definitions/AppliedScopes" + }, "appliedScopeType": { "description": "The applied scope type", "$ref": "#/definitions/AppliedScopeType" From e0f6d61e59f301de7c5190b7342944191e937823 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Fri, 18 Nov 2022 16:24:19 -0800 Subject: [PATCH 10/30] Add nextlink and totaItems, filter, skip, take to GetCatalogs --- .../2022-11-01/examples/GetCatalog.json | 298 +++++++++--------- .../stable/2022-11-01/reservations.json | 47 ++- 2 files changed, 185 insertions(+), 160 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json index 055cb4dc0bf8..070cab98f4c7 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetCatalog.json @@ -7,163 +7,167 @@ }, "responses": { "200": { - "body": [ - { - "resourceType": "VirtualMachines", - "name": "Standard_DS5_v2", - "terms": [ - "P1Y", - "P3Y" - ], - "billingPlans": { - "P1Y": [ - "Upfront", - "Monthly" + "body": { + "value": [ + { + "resourceType": "VirtualMachines", + "name": "Standard_DS5_v2", + "terms": [ + "P1Y", + "P3Y" ], - "P3Y": [ - "Upfront", - "Monthly" - ] - }, - "locations": [ - "eastus" - ], - "skuProperties": [ - { - "name": "Cores", - "value": "16" - }, - { - "name": "ProductTitle", - "value": "DSv2 Series, DS5" - }, - { - "name": "ProductShortName", - "value": "DSv2 Series" - }, - { - "name": "SKUName", - "value": "DS5 v2" + "billingPlans": { + "P1Y": [ + "Upfront", + "Monthly" + ], + "P3Y": [ + "Upfront", + "Monthly" + ] }, - { - "name": "MeterId", - "value": "12bc208b-083f-4901-ae85-4f98c0c3b4b8" - } - ], - "restrictions": [] - }, - { - "resourceType": "VirtualMachines", - "name": "Standard_D1", - "terms": [ - "P1Y", - "P3Y" - ], - "billingPlans": { - "P1Y": [ - "Upfront", - "Monthly" + "locations": [ + "eastus" ], - "P3Y": [ - "Upfront", - "Monthly" - ] + "skuProperties": [ + { + "name": "Cores", + "value": "16" + }, + { + "name": "ProductTitle", + "value": "DSv2 Series, DS5" + }, + { + "name": "ProductShortName", + "value": "DSv2 Series" + }, + { + "name": "SKUName", + "value": "DS5 v2" + }, + { + "name": "MeterId", + "value": "12bc208b-083f-4901-ae85-4f98c0c3b4b8" + } + ], + "restrictions": [] }, - "locations": [ - "eastus" - ], - "skuProperties": [ - { - "name": "Cores", - "value": "1" - }, - { - "name": "ProductTitle", - "value": "D Series, D1" - }, - { - "name": "ProductShortName", - "value": "D Series" - }, - { - "name": "SKUName", - "value": "D1" - }, - { - "name": "MeterId", - "value": "12bc208b-083f-4901-ae85-4f98c0c3b4b8" - } - ], - "restrictions": [ - { - "type": "Term", - "values": [ - "P1Y" + { + "resourceType": "VirtualMachines", + "name": "Standard_D1", + "terms": [ + "P1Y", + "P3Y" + ], + "billingPlans": { + "P1Y": [ + "Upfront", + "Monthly" ], - "reasonCode": "NotAvailableForSubscription" + "P3Y": [ + "Upfront", + "Monthly" + ] }, - { - "type": "Term", - "values": [ - "P3Y" - ], - "reasonCode": "NotAvailableForSubscription" - } - ] - }, - { - "resourceType": "VirtualMachines", - "name": "Standard_F2", - "terms": [ - "P1Y", - "P3Y" - ], - "billingPlans": { - "P1Y": [ - "Upfront", - "Monthly" + "locations": [ + "eastus" + ], + "skuProperties": [ + { + "name": "Cores", + "value": "1" + }, + { + "name": "ProductTitle", + "value": "D Series, D1" + }, + { + "name": "ProductShortName", + "value": "D Series" + }, + { + "name": "SKUName", + "value": "D1" + }, + { + "name": "MeterId", + "value": "12bc208b-083f-4901-ae85-4f98c0c3b4b8" + } ], - "P3Y": [ - "Upfront", - "Monthly" + "restrictions": [ + { + "type": "Term", + "values": [ + "P1Y" + ], + "reasonCode": "NotAvailableForSubscription" + }, + { + "type": "Term", + "values": [ + "P3Y" + ], + "reasonCode": "NotAvailableForSubscription" + } ] }, - "locations": [ - "eastus" - ], - "skuProperties": [ - { - "name": "Cores", - "value": "2" - }, - { - "name": "ProductTitle", - "value": "F Series, F2" - }, - { - "name": "ProductShortName", - "value": "F Series" - }, - { - "name": "SKUName", - "value": "F2" - }, - { - "name": "MeterId", - "value": "12bc208b-083f-4901-ae85-4f98c0c3b4b8" - } - ], - "restrictions": [ - { - "type": "Location", - "values": [ - "eastus" + { + "resourceType": "VirtualMachines", + "name": "Standard_F2", + "terms": [ + "P1Y", + "P3Y" + ], + "billingPlans": { + "P1Y": [ + "Upfront", + "Monthly" ], - "reasonCode": "NotAvailableForSubscription" - } - ] - } - ] + "P3Y": [ + "Upfront", + "Monthly" + ] + }, + "locations": [ + "eastus" + ], + "skuProperties": [ + { + "name": "Cores", + "value": "2" + }, + { + "name": "ProductTitle", + "value": "F Series, F2" + }, + { + "name": "ProductShortName", + "value": "F Series" + }, + { + "name": "SKUName", + "value": "F2" + }, + { + "name": "MeterId", + "value": "12bc208b-083f-4901-ae85-4f98c0c3b4b8" + } + ], + "restrictions": [ + { + "type": "Location", + "values": [ + "eastus" + ], + "reasonCode": "NotAvailableForSubscription" + } + ] + } + ], + "nextLink": "https://management.azure.com/providers/Microsoft.Capacity/reservationOrders?api-version=2022-11-01&$filter=(term eq 'P1Y')&$take=50&$skip=50", + "totalItems": 1000 + } } } } 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 0f1d6cce1de7..9d31be6620f1 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 @@ -94,25 +94,25 @@ "$ref": "#/parameters/LocationIdParameter" }, { - "name": "publisherId", - "description": "Publisher id used to get the third party products", + "name": "$filter", + "description": "May be used to filter by Catalog properties. The filter supports 'eq', 'or', and 'and'.", "in": "query", "required": false, "type": "string" }, { - "name": "offerId", - "description": "Offer id used to get the third party products", + "name": "$skip", + "description": "The number of reservations to skip from the list before returning results", "in": "query", "required": false, - "type": "string" + "type": "number" }, { - "name": "planId", - "description": "Plan id used to get the third party products", + "name": "$take", + "description": "To number of reservations to return", "in": "query", "required": false, - "type": "string" + "type": "number" } ], "tags": [ @@ -120,12 +120,9 @@ ], "responses": { "200": { - "description": "List of available resources", + "description": "OK. The request has succeeded.", "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/Catalog" - } + "$ref": "#/definitions/CatalogsResult" } }, "default": { @@ -1473,6 +1470,30 @@ } } }, + "CatalogsResult": { + "type": "object", + "description": "The list of catalogs and pagination information.", + "properties": { + "value": { + "description": "The list of catalogs.", + "type": "array", + "readOnly": true, + "items": { + "$ref": "#/definitions/Catalog" + } + }, + "nextLink": { + "description": "The link (url) to the next page of results.", + "type": "string", + "readOnly": true + }, + "totalItems": { + "description": "The total amount of catalog items.", + "type": "integer", + "format": "int64" + } + } + }, "Catalog": { "type": "object", "properties": { From 9d604aef48007ddf3b95bd27a95618f0ab193919 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Fri, 18 Nov 2022 16:36:15 -0800 Subject: [PATCH 11/30] Fix lint error --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 3 ++- 1 file changed, 2 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 9d31be6620f1..4cc99f6736c3 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 @@ -1480,7 +1480,8 @@ "readOnly": true, "items": { "$ref": "#/definitions/Catalog" - } + }, + "x-ms-identifiers": [] }, "nextLink": { "description": "The link (url) to the next page of results.", From 4aa9531fcbe4fc54edf99718f5837ec9e218e90b Mon Sep 17 00:00:00 2001 From: chchen3 Date: Fri, 18 Nov 2022 17:01:31 -0800 Subject: [PATCH 12/30] Add back publisherId, offerId, planId for GetCatalog API --- .../stable/2022-11-01/reservations.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) 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 4cc99f6736c3..4681e3f2bc90 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 @@ -93,6 +93,27 @@ { "$ref": "#/parameters/LocationIdParameter" }, + { + "name": "publisherId", + "description": "Publisher id used to get the third party products", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "offerId", + "description": "Offer id used to get the third party products", + "in": "query", + "required": false, + "type": "string" + }, + { + "name": "planId", + "description": "Plan id used to get the third party products", + "in": "query", + "required": false, + "type": "string" + }, { "name": "$filter", "description": "May be used to filter by Catalog properties. The filter supports 'eq', 'or', and 'and'.", From 00574cae915ebc1308ded907fa1673349d4071af Mon Sep 17 00:00:00 2001 From: chchen3 Date: Mon, 5 Dec 2022 12:16:09 -0800 Subject: [PATCH 13/30] Revert "Update operationId to clean up doc heirarchy" This reverts commit 31826f8e7ee40e30f099d5d95bf8b5fccf728819. --- .../stable/2022-11-01/reservations.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 4681e3f2bc90..a73457a1245f 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 @@ -196,7 +196,7 @@ "post": { "summary": "Calculate price for a `ReservationOrder`.", "description": "Calculate price for placing a `ReservationOrder`.", - "operationId": "ReservationOrder_CalculatePrice", + "operationId": "ReservationOrder_Calculate", "x-ms-examples": { "Purchase": { "$ref": "./examples/CalculateReservationOrder.json" @@ -785,7 +785,7 @@ "post": { "summary": "Calculate the refund amount of a reservation order.", "description": "Calculate price for returning `Reservations` if there are no policy errors.\n", - "operationId": "ReservationOrder_CalculateRefund", + "operationId": "CalculateRefund_Post", "x-ms-examples": { "Purchase": { "$ref": "./examples/CalculateRefund.json" @@ -825,7 +825,7 @@ "post": { "summary": "Return a reservation.", "description": "Return a reservation.", - "operationId": "ReservationOrder_Return", + "operationId": "Return_Post", "x-ms-examples": { "Purchase": { "$ref": "./examples/Return.json" @@ -870,7 +870,7 @@ "post": { "summary": "Calculates the refund amounts and price of the new purchases.", "description": "Calculates price for exchanging `Reservations` if there are no policy errors.\n", - "operationId": "CalculateExchange", + "operationId": "CalculateExchange_Post", "x-ms-examples": { "CalculateExchange": { "$ref": "./examples/CalculateExchange.json" @@ -929,7 +929,7 @@ "post": { "summary": "Exchange Reservation(s)", "description": "Returns one or more `Reservations` in exchange for one or more `Reservation` purchases.\n", - "operationId": "Exchange", + "operationId": "Exchange_Post", "x-ms-examples": { "Exchange": { "$ref": "./examples/Exchange.json" From 47dd92a32b6c517b7f2d5ca334af11d486bce57b Mon Sep 17 00:00:00 2001 From: chchen3 Date: Mon, 5 Dec 2022 12:59:55 -0800 Subject: [PATCH 14/30] Add back expiryDate and purchaseDate Add back expiryDate and purchaseDate for backward compatibility --- .../examples/GetReservationDetails.json | 1 + .../examples/GetReservationOrderDetails.json | 1 + ...OrderDetailsWithExpandPlanInformation.json | 1 + .../examples/GetReservationOrders.json | 3 +++ .../examples/GetReservationRevisions.json | 4 ++++ .../2022-11-01/examples/GetReservations.json | 2 ++ .../examples/GetReservationsFromOrder.json | 5 ++++ .../examples/MergeReservations.json | 3 +++ .../examples/PurchaseReservationOrder.json | 2 ++ .../2022-11-01/examples/SplitReservation.json | 3 +++ .../examples/UpdateReservation.json | 1 + .../stable/2022-11-01/reservations.json | 23 +++++++++++++++---- 12 files changed, 45 insertions(+), 4 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json index 05392fd59946..79388a55a710 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json @@ -29,6 +29,7 @@ "billingPlan": "Monthly", "quantity": 3, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json index fe3e458c2ed2..3863228fa6f0 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetails.json @@ -15,6 +15,7 @@ "benefitStartTime": "2017-08-30T03:49:19.0252126Z", "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", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json index 3e7f64441388..efd117788341 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrderDetailsWithExpandPlanInformation.json @@ -16,6 +16,7 @@ "requestDateTime": "2019-08-30T03:49:19Z", "createdDateTime": "2019-08-30T03:51:49Z", "benefitStartTime": "2019-08-30T03:51:49Z", + "expiryDate": "2018-08-30", "expiryDateTime": "2018-08-30T03:51:49Z", "term": "P1Y", "billingPlan": "Monthly", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json index 1b4a48a66bae..a88b988790bc 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationOrders.json @@ -16,6 +16,7 @@ "requestDateTime": "2017-08-29T21:20:23.8134834Z", "createdDateTime": "2017-08-29T21:22:56.8541664Z", "benefitStartTime": "2017-08-29T21:20:23.8134834Z", + "expiryDate": "2018-08-29", "expiryDateTime": "2018-08-29T21:20:23.8134834Z", "term": "P1Y", "billingPlan": "Monthly", @@ -38,6 +39,7 @@ "benefitStartTime": "2017-08-30T12:55:40.2799114Z", "requestDateTime": "2017-08-30T12:55:40.2799114Z", "createdDateTime": "2017-08-30T12:58:20.526Z", + "expiryDate": "2018-08-30", "expiryDateTime": "2018-08-30T12:58:20.526Z", "term": "P1Y", "billingPlan": "Monthly", @@ -60,6 +62,7 @@ "benefitStartTime": "2017-08-30T03:49:19.0252126Z", "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", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json index 8f048dccbfde..a17f0479ba47 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationRevisions.json @@ -21,6 +21,7 @@ "appliedScopeType": "Shared", "quantity": 3, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T23:57:48.1891638Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -54,6 +55,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -91,6 +93,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -127,6 +130,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Creating", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:27.3313607Z", "displayName": "cabri_test", "effectiveDateTime": "2017-09-22T22:46:27.3313607Z", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json index be6a823b9ed4..08faaa183a2a 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservations.json @@ -24,9 +24,11 @@ "displayName": "VM_RI_07-21-2020_12-06", "displayProvisioningState": "Succeeded", "effectiveDateTime": "2017-09-22T22:46:32.7632798Z", + "expiryDate": "2023-07-21", "expiryDateTime": "2023-07-21T22:46:32.7632798Z", "provisioningState": "Succeeded", "provisioningSubState": null, + "purchaseDate": "2021-04-22", "purchaseDateTime": "2021-04-22T22:46:32.7632798Z", "quantity": 2, "renew": false, diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json index be54941a6a67..7c8e06b973cf 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationsFromOrder.json @@ -26,6 +26,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T01:00:30.9253826Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -66,6 +67,7 @@ "appliedScopeType": "Single", "quantity": 1, "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -106,6 +108,7 @@ "appliedScopeType": "Single", "quantity": 2, "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -146,6 +149,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -182,6 +186,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json index 1d86850f6cdf..2169da54f6a3 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/MergeReservations.json @@ -33,6 +33,7 @@ "appliedScopeType": "Single", "quantity": 1, "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -72,6 +73,7 @@ "appliedScopeType": "Single", "quantity": 2, "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -111,6 +113,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T22:46:32.7632798Z", "displayName": "cabri_test", "billingPlan": "Monthly", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json index cefe29fbf691..96819442af30 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json @@ -34,6 +34,7 @@ "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", @@ -58,6 +59,7 @@ "billingPlan": "Monthly", "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", "provisioningState": "Succeeded", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json index 168d309ef197..fcbd719709ba 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/SplitReservation.json @@ -34,6 +34,7 @@ "appliedScopeType": "Single", "quantity": 1, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T01:00:30.9253826Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -66,6 +67,7 @@ "appliedScopeType": "Single", "quantity": 2, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T01:00:30.9253826Z", "displayName": "cabri_test", "billingPlan": "Monthly", @@ -98,6 +100,7 @@ "appliedScopeType": "Single", "quantity": 3, "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T01:00:30.9253826Z", "displayName": "cabri_test", "billingPlan": "Monthly", diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json index 1151dd87a5ff..9523d2611aae 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/UpdateReservation.json @@ -27,6 +27,7 @@ "billingScopeId": "/subscriptions/19376483-64b8-49e4-a931-d5248828720a", "quantity": 3, "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", "expiryDateTime": "2018-09-22T23:57:48.1891638Z", "displayName": "cabri_test", "billingPlan": "Monthly", 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 a73457a1245f..a8fefcf4a0e1 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 @@ -999,7 +999,7 @@ }, { "name": "$filter", - "description": "May be used to filter by reservation properties. The filter supports 'eq', 'or', and 'and'. It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDateTime, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}", + "description": "May be used to filter by reservation properties. The filter supports 'eq', 'or', and 'and'. It does not currently support 'ne', 'gt', 'le', 'ge', or 'not'. Reservation properties include sku/name, properties/{appliedScopeType, archived, displayName, displayProvisioningState, effectiveDateTime, expiryDate, expiryDateTime, provisioningState, quantity, renew, reservedResourceType, term, userFriendlyAppliedScopeType, userFriendlyRenewState}", "in": "query", "required": false, "type": "string" @@ -1770,10 +1770,15 @@ "format": "date-time", "description": "This is the DateTime when the reservation was created." }, + "expiryDate": { + "type": "string", + "format": "date", + "description": "This is the date when the Reservation will expire." + }, "expiryDateTime": { "type": "string", "format": "date-time", - "description": "This is the date when the Reservation will expire." + "description": "This is the date-time when the Reservation will expire." }, "benefitStartTime": { "type": "string", @@ -2560,10 +2565,15 @@ "description": "DateTime of the last time the Reservation was updated.", "readOnly": true }, + "expiryDate": { + "type": "string", + "format": "date", + "description": "This is the date when the Reservation will expire." + }, "expiryDateTime": { "type": "string", "format": "date-time", - "description": "This is the date when the Reservation will expire." + "description": "This is the date-time when the Reservation will expire." }, "reviewDateTime": { "type": "string", @@ -2588,10 +2598,15 @@ "provisioningSubState": { "$ref": "#/definitions/ProvisioningSubState" }, + "purchaseDate": { + "type": "string", + "format": "date", + "description": "This is the date when the Reservation was purchased." + }, "purchaseDateTime": { "type": "string", "format": "date-time", - "description": "This is the date when the Reservation was purchased." + "description": "This is the date-time when the Reservation was purchased." }, "splitProperties": { "$ref": "#/definitions/ReservationSplitProperties" From b9028720188e6db09369890bd44ce095ba322d0e Mon Sep 17 00:00:00 2001 From: chchen3 Date: Mon, 5 Dec 2022 14:17:43 -0800 Subject: [PATCH 15/30] Revert string to enum change --- .../stable/2022-11-01/reservations.json | 53 +++++++------------ 1 file changed, 18 insertions(+), 35 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 a8fefcf4a0e1..87adcaadcce5 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 @@ -1191,23 +1191,6 @@ "modelAsString": true } }, - "ProvisioningSubState": { - "type": "string", - "description": "Represent the current sub state of the Reservation.", - "readOnly": true, - "enum": [ - "None", - "Active", - "Pending", - "AppliedBenefits", - "Warning", - "Orphaned" - ], - "x-ms-enum": { - "name": "ProvisioningSubState", - "modelAsString": true - } - }, "ReservedResourceType": { "type": "string", "description": "The type of the resource that is being reserved.", @@ -1246,7 +1229,7 @@ }, "Location": { "type": "string", - "description": "The Azure Region where the reserved resource lives.", + "description": "Location in which the Resources needs to be reserved. It cannot be changed after the resource has been created.", "enum": [ "westus", "eastus", @@ -1819,7 +1802,6 @@ "DisplayProvisioningState": { "type": "string", "description": "Represent the current display state of the Reservation.", - "readOnly": true, "enum": [ "Succeeded", "Expiring", @@ -1911,7 +1893,8 @@ "x-ms-azure-resource": true, "properties": { "location": { - "$ref": "#/definitions/Location" + "type": "string", + "description": "The Azure Region where the reserved resource lives." }, "etag": { "type": "integer", @@ -2530,16 +2513,7 @@ }, "capabilities": { "description": "Capabilities of the reservation", - "type": "string", - "enum": [ - "None", - "ApiReturnEnabled", - "ApiExchangeEnabled" - ], - "x-ms-enum": { - "name": "capabilities", - "modelAsString": true - } + "type": "string" }, "quantity": { "description": "Quantity of the SKUs that are part of the Reservation.", @@ -2593,10 +2567,14 @@ "$ref": "#/definitions/ReservationBillingPlan" }, "displayProvisioningState": { - "$ref": "#/definitions/DisplayProvisioningState" + "description": "The provisioning state of the reservation for display, e.g. Succeeded", + "type": "string", + "readOnly": true }, "provisioningSubState": { - "$ref": "#/definitions/ProvisioningSubState" + "description": "The provisioning sub state of the reservation, e.g. Succeeded", + "type": "string", + "readOnly": true }, "purchaseDate": { "type": "string", @@ -2643,10 +2621,14 @@ "$ref": "#/definitions/ReservationTerm" }, "userFriendlyAppliedScopeType": { - "$ref": "#/definitions/UserFriendlyAppliedScopeType" + "description": "The applied scope type of the reservation for display, e.g. Shared", + "type": "string", + "readOnly": true }, "userFriendlyRenewState": { - "$ref": "#/definitions/UserFriendlyRenewState" + "description": "The renew state of the reservation for display, e.g. On", + "type": "string", + "readOnly": true }, "utilization": { "readOnly": true, @@ -2953,7 +2935,8 @@ "$ref": "#/definitions/SkuName" }, "location": { - "$ref": "#/definitions/Location" + "type": "string", + "description": "The Azure Region where the reserved resource lives." }, "properties": { "x-ms-client-flatten": true, From 9a676f0bcbf79afc3845b0f59eb32f21caf2cc8d Mon Sep 17 00:00:00 2001 From: chchen3 Date: Mon, 5 Dec 2022 16:17:02 -0800 Subject: [PATCH 16/30] Remove readOnly for existing definition to fix breaking change --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 2 -- 1 file changed, 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 87adcaadcce5..6a462c1d3e3e 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 @@ -1821,7 +1821,6 @@ "UserFriendlyAppliedScopeType": { "type": "string", "description": "The applied scope type", - "readOnly": true, "enum": [ "None", "Shared", @@ -1837,7 +1836,6 @@ "UserFriendlyRenewState": { "type": "string", "description": "The renew state of the reservation", - "readOnly": true, "enum": [ "On", "Off", From 7f20066ecdb8dd12aeecaf1452fd97d4ce2ff20f Mon Sep 17 00:00:00 2001 From: chchen3 Date: Tue, 6 Dec 2022 11:48:34 -0800 Subject: [PATCH 17/30] change expand to $expand --- .../stable/2022-11-01/examples/GetReservationDetails.json | 2 +- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json index 79388a55a710..b92809ebefc2 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/GetReservationDetails.json @@ -3,7 +3,7 @@ "api-version": "2022-11-01", "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", "reservationId": "6ef59113-3482-40da-8d79-787f823e34bc", - "expand": "renewProperties" + "$expand": "renewProperties" }, "responses": { "200": { 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 6a462c1d3e3e..0bee5a8e04f5 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 @@ -3511,7 +3511,7 @@ "type": "string" }, "ExpandRenewPropertiesParameter": { - "name": "expand", + "name": "$expand", "x-ms-parameter-location": "method", "in": "query", "description": "Supported value of this query is renewProperties", From cdeda23a6a666d79991b369bfc0aea31edd9d54e Mon Sep 17 00:00:00 2001 From: chchen3 Date: Thu, 8 Dec 2022 19:11:07 -0800 Subject: [PATCH 18/30] Address comments from ARMReview --- .../stable/2022-11-01/reservations.json | 48 +++++++++++++------ 1 file changed, 33 insertions(+), 15 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 0bee5a8e04f5..dbad99ed8de2 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 @@ -165,6 +165,9 @@ "$ref": "./examples/GetAppliedReservations.json" } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" @@ -1378,7 +1381,9 @@ "items": { "$ref": "#/definitions/ReservationToReturn" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "reservationId" + ] } } }, @@ -1648,7 +1653,6 @@ "description": "Name of the reservation" }, "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/ReservationOrderProperties" }, "type": { @@ -1738,6 +1742,7 @@ }, "ReservationOrderProperties": { "type": "object", + "x-ms-client-flatten": true, "properties": { "displayName": { "type": "string", @@ -1969,7 +1974,11 @@ "type": "string" }, "valid": { - "type": "boolean" + "type": "string", + "enum": [ + "true", + "false" + ] } } }, @@ -2247,7 +2256,9 @@ "items": { "$ref": "#/definitions/ReservationToExchange" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "reservationId" + ] }, "policyResult": { "$ref": "#/definitions/ExchangePolicyErrors" @@ -2277,7 +2288,9 @@ "items": { "$ref": "#/definitions/ReservationToPurchaseExchange" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "reservationId" + ] }, "savingsPlansToPurchase": { "type": "array", @@ -2285,7 +2298,9 @@ "items": { "$ref": "#/definitions/SavingsPlanToPurchaseExchange" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "savingsPlanId" + ] }, "reservationsToExchange": { "type": "array", @@ -2293,7 +2308,9 @@ "items": { "$ref": "#/definitions/ReservationToReturnForExchange" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "reservationId" + ] }, "policyResult": { "$ref": "#/definitions/ExchangePolicyErrors" @@ -2696,6 +2713,7 @@ }, "PurchaseRequestProperties": { "type": "object", + "x-ms-client-flatten": true, "properties": { "reservedResourceType": { "$ref": "#/definitions/ReservedResourceType" @@ -2747,6 +2765,7 @@ }, "SavingsPlanPurchaseRequestProperties": { "type": "object", + "x-ms-client-flatten": true, "properties": { "displayName": { "type": "string", @@ -2851,6 +2870,7 @@ }, "PatchProperties": { "type": "object", + "x-ms-client-flatten": true, "properties": { "appliedScopeType": { "$ref": "#/definitions/AppliedScopeType" @@ -2888,6 +2908,7 @@ }, "SplitProperties": { "type": "object", + "x-ms-client-flatten": true, "properties": { "quantities": { "type": "array", @@ -2907,6 +2928,7 @@ }, "MergeProperties": { "type": "object", + "x-ms-client-flatten": true, "properties": { "sources": { "type": "array", @@ -2921,7 +2943,6 @@ "type": "object", "properties": { "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/MergeProperties" } } @@ -2937,7 +2958,6 @@ "description": "The Azure Region where the reserved resource lives." }, "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/PurchaseRequestProperties" } } @@ -2949,7 +2969,6 @@ "$ref": "#/definitions/SkuName" }, "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/SavingsPlanPurchaseRequestProperties" } } @@ -2958,7 +2977,6 @@ "type": "object", "properties": { "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/PatchProperties" } } @@ -2967,7 +2985,6 @@ "type": "object", "properties": { "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/SplitProperties" } } @@ -3041,13 +3058,13 @@ "readOnly": true }, "properties": { - "x-ms-client-flatten": true, "$ref": "#/definitions/AppliedReservationsProperties" } } }, "AppliedReservationsProperties": { "type": "object", + "x-ms-client-flatten": true, "properties": { "reservationOrderIds": { "$ref": "#/definitions/AppliedReservationList" @@ -3062,7 +3079,8 @@ "items": { "type": "string", "description": "Reservation resource Id. \"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\"" - } + }, + "x-ms-identifiers": [] }, "nextLink": { "type": "string", @@ -3247,7 +3265,7 @@ }, "BillingScopeId": { "type": "string", - "description": "Subscription that will be charged for purchasing Reservation or Savings Plan" + "description": "Subscription that will be charged for purchasing reservation or savings plan" }, "Price": { "type": "object", From 9fc0e07ced13e5ec29658037c14372f3a8f4d545 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Thu, 8 Dec 2022 19:49:10 -0800 Subject: [PATCH 19/30] Revert "Address comments from ARMReview" This reverts commit cdeda23a6a666d79991b369bfc0aea31edd9d54e. --- .../stable/2022-11-01/reservations.json | 48 ++++++------------- 1 file changed, 15 insertions(+), 33 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 dbad99ed8de2..0bee5a8e04f5 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 @@ -165,9 +165,6 @@ "$ref": "./examples/GetAppliedReservations.json" } }, - "x-ms-pageable": { - "nextLinkName": "nextLink" - }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" @@ -1381,9 +1378,7 @@ "items": { "$ref": "#/definitions/ReservationToReturn" }, - "x-ms-identifiers": [ - "reservationId" - ] + "x-ms-identifiers": [] } } }, @@ -1653,6 +1648,7 @@ "description": "Name of the reservation" }, "properties": { + "x-ms-client-flatten": true, "$ref": "#/definitions/ReservationOrderProperties" }, "type": { @@ -1742,7 +1738,6 @@ }, "ReservationOrderProperties": { "type": "object", - "x-ms-client-flatten": true, "properties": { "displayName": { "type": "string", @@ -1974,11 +1969,7 @@ "type": "string" }, "valid": { - "type": "string", - "enum": [ - "true", - "false" - ] + "type": "boolean" } } }, @@ -2256,9 +2247,7 @@ "items": { "$ref": "#/definitions/ReservationToExchange" }, - "x-ms-identifiers": [ - "reservationId" - ] + "x-ms-identifiers": [] }, "policyResult": { "$ref": "#/definitions/ExchangePolicyErrors" @@ -2288,9 +2277,7 @@ "items": { "$ref": "#/definitions/ReservationToPurchaseExchange" }, - "x-ms-identifiers": [ - "reservationId" - ] + "x-ms-identifiers": [] }, "savingsPlansToPurchase": { "type": "array", @@ -2298,9 +2285,7 @@ "items": { "$ref": "#/definitions/SavingsPlanToPurchaseExchange" }, - "x-ms-identifiers": [ - "savingsPlanId" - ] + "x-ms-identifiers": [] }, "reservationsToExchange": { "type": "array", @@ -2308,9 +2293,7 @@ "items": { "$ref": "#/definitions/ReservationToReturnForExchange" }, - "x-ms-identifiers": [ - "reservationId" - ] + "x-ms-identifiers": [] }, "policyResult": { "$ref": "#/definitions/ExchangePolicyErrors" @@ -2713,7 +2696,6 @@ }, "PurchaseRequestProperties": { "type": "object", - "x-ms-client-flatten": true, "properties": { "reservedResourceType": { "$ref": "#/definitions/ReservedResourceType" @@ -2765,7 +2747,6 @@ }, "SavingsPlanPurchaseRequestProperties": { "type": "object", - "x-ms-client-flatten": true, "properties": { "displayName": { "type": "string", @@ -2870,7 +2851,6 @@ }, "PatchProperties": { "type": "object", - "x-ms-client-flatten": true, "properties": { "appliedScopeType": { "$ref": "#/definitions/AppliedScopeType" @@ -2908,7 +2888,6 @@ }, "SplitProperties": { "type": "object", - "x-ms-client-flatten": true, "properties": { "quantities": { "type": "array", @@ -2928,7 +2907,6 @@ }, "MergeProperties": { "type": "object", - "x-ms-client-flatten": true, "properties": { "sources": { "type": "array", @@ -2943,6 +2921,7 @@ "type": "object", "properties": { "properties": { + "x-ms-client-flatten": true, "$ref": "#/definitions/MergeProperties" } } @@ -2958,6 +2937,7 @@ "description": "The Azure Region where the reserved resource lives." }, "properties": { + "x-ms-client-flatten": true, "$ref": "#/definitions/PurchaseRequestProperties" } } @@ -2969,6 +2949,7 @@ "$ref": "#/definitions/SkuName" }, "properties": { + "x-ms-client-flatten": true, "$ref": "#/definitions/SavingsPlanPurchaseRequestProperties" } } @@ -2977,6 +2958,7 @@ "type": "object", "properties": { "properties": { + "x-ms-client-flatten": true, "$ref": "#/definitions/PatchProperties" } } @@ -2985,6 +2967,7 @@ "type": "object", "properties": { "properties": { + "x-ms-client-flatten": true, "$ref": "#/definitions/SplitProperties" } } @@ -3058,13 +3041,13 @@ "readOnly": true }, "properties": { + "x-ms-client-flatten": true, "$ref": "#/definitions/AppliedReservationsProperties" } } }, "AppliedReservationsProperties": { "type": "object", - "x-ms-client-flatten": true, "properties": { "reservationOrderIds": { "$ref": "#/definitions/AppliedReservationList" @@ -3079,8 +3062,7 @@ "items": { "type": "string", "description": "Reservation resource Id. \"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\"" - }, - "x-ms-identifiers": [] + } }, "nextLink": { "type": "string", @@ -3265,7 +3247,7 @@ }, "BillingScopeId": { "type": "string", - "description": "Subscription that will be charged for purchasing reservation or savings plan" + "description": "Subscription that will be charged for purchasing Reservation or Savings Plan" }, "Price": { "type": "object", From 22235cbe50b6ad860b2ed7c7f383ce1fe57c0c1b Mon Sep 17 00:00:00 2001 From: chchen3 Date: Thu, 8 Dec 2022 19:57:13 -0800 Subject: [PATCH 20/30] Address comments for arm review --- .../stable/2022-11-01/reservations.json | 25 +++++++++++++------ 1 file changed, 18 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 0bee5a8e04f5..f9c07f9633e3 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 @@ -1378,7 +1378,9 @@ "items": { "$ref": "#/definitions/ReservationToReturn" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "reservationId" + ] } } }, @@ -2247,7 +2249,9 @@ "items": { "$ref": "#/definitions/ReservationToExchange" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "reservationId" + ] }, "policyResult": { "$ref": "#/definitions/ExchangePolicyErrors" @@ -2277,7 +2281,9 @@ "items": { "$ref": "#/definitions/ReservationToPurchaseExchange" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "reservationId" + ] }, "savingsPlansToPurchase": { "type": "array", @@ -2285,7 +2291,9 @@ "items": { "$ref": "#/definitions/SavingsPlanToPurchaseExchange" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "savingsPlanId" + ] }, "reservationsToExchange": { "type": "array", @@ -2293,7 +2301,9 @@ "items": { "$ref": "#/definitions/ReservationToReturnForExchange" }, - "x-ms-identifiers": [] + "x-ms-identifiers": [ + "reservationId" + ] }, "policyResult": { "$ref": "#/definitions/ExchangePolicyErrors" @@ -3062,7 +3072,8 @@ "items": { "type": "string", "description": "Reservation resource Id. \"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\"" - } + }, + "x-ms-identifiers": [] }, "nextLink": { "type": "string", @@ -3247,7 +3258,7 @@ }, "BillingScopeId": { "type": "string", - "description": "Subscription that will be charged for purchasing Reservation or Savings Plan" + "description": "Subscription that will be charged for purchasing reservation or savings plan" }, "Price": { "type": "object", From 65d2fee6013e79b780054be5961a7b034cedccd1 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Fri, 9 Dec 2022 11:48:18 -0800 Subject: [PATCH 21/30] Added x-ms-pageable for catalog api --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 3 +++ 1 file changed, 3 insertions(+) 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 f9c07f9633e3..606f037d3421 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 @@ -80,6 +80,9 @@ "$ref": "./examples/GetCatalog.json" } }, + "x-ms-pageable": { + "nextLinkName": "nextLink" + }, "parameters": [ { "$ref": "#/parameters/ApiVersionParameter" From 2921c73fed787e1335302caaf9bea1220a867f8e Mon Sep 17 00:00:00 2001 From: chchen3 Date: Fri, 9 Dec 2022 14:23:19 -0800 Subject: [PATCH 22/30] Fix spellcheck unknown words --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 4 ++-- 1 file changed, 2 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 606f037d3421..70a4b2458e30 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 @@ -670,7 +670,7 @@ "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive": { "post": { "summary": "Unarchive a `Reservation`.", - "description": "Unarchiving a `Reservation` moves it to the state it was before archiving.\n", + "description": "Moves a `Reservation` to the state it was before archiving.\n", "operationId": "Reservation_Unarchive", "x-ms-examples": { "Unarchive": { @@ -2503,7 +2503,7 @@ "$ref": "#/definitions/ReservedResourceType" }, "instanceFlexibility": { - "description": "Allows reservation discount to be applied across skus within the same Autofit group. Not all skus support instance size flexibility.", + "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" }, "displayName": { From 110c200fd51f1798ffa66d7a90d57d35a4ae583e Mon Sep 17 00:00:00 2001 From: chchen3 Date: Tue, 13 Dec 2022 19:21:40 -0800 Subject: [PATCH 23/30] address comments and legacy lint errors and warnings --- .../examples/PurchaseReservationOrder.json | 4 + .../stable/2022-11-01/reservations.json | 109 +++++++++++------- 2 files changed, 69 insertions(+), 44 deletions(-) diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json index 96819442af30..772cc830d7a5 100644 --- a/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json +++ b/specification/reservations/resource-manager/Microsoft.Capacity/stable/2022-11-01/examples/PurchaseReservationOrder.json @@ -49,6 +49,10 @@ } }, "202": { + "headers": { + "Location": "https://management.azure.com/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa?api-version=2022-11-01", + "Retry-After": 120 + }, "body": { "id": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa", "type": "Microsoft.Capacity/reservationOrders", 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 70a4b2458e30..e05d2d56c248 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 @@ -30,14 +30,13 @@ "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/availableScopes": { "post": { "summary": "Get Available Scopes for `Reservation`.", - "description": "Get Available Scopes for `Reservation`.\n", + "description": "Check whether the scopes from request is valid for `Reservation`.\n", "operationId": "Reservation_AvailableScopes", "x-ms-examples": { "AvailableScopes": { "$ref": "./examples/GetAvailableScope.json" } }, - "x-ms-long-running-operation": true, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" @@ -201,7 +200,7 @@ "description": "Calculate price for placing a `ReservationOrder`.", "operationId": "ReservationOrder_Calculate", "x-ms-examples": { - "Purchase": { + "CalculatePrice": { "$ref": "./examples/CalculateReservationOrder.json" } }, @@ -306,6 +305,17 @@ }, "202": { "description": "The request is accepted and is being processed. Operation result link is in location header.", + "headers": { + "Location": { + "type": "string", + "description": "URL for determining when an operation has completed. Only use this value only when Azure-AsyncOperation isn't returned." + }, + "Retry-After": { + "type": "integer", + "format": "int32", + "description": "Clients should wait for the Retry-After interval before polling again" + } + }, "schema": { "$ref": "#/definitions/ReservationOrderResponse" } @@ -323,7 +333,7 @@ "description": "Get the details of the `ReservationOrder`.", "operationId": "ReservationOrder_Get", "x-ms-examples": { - "GetReservation": { + "GetReservationOrder": { "$ref": "./examples/GetReservationOrderDetails.json" }, "GetReservationWithExpandPayments": { @@ -578,6 +588,9 @@ } }, "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "azure-async-operation" + }, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" @@ -670,7 +683,7 @@ "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}/unarchive": { "post": { "summary": "Unarchive a `Reservation`.", - "description": "Moves a `Reservation` to the state it was before archiving.\n", + "description": "Restores a `Reservation` to the state it was before archiving.\n", "operationId": "Reservation_Unarchive", "x-ms-examples": { "Unarchive": { @@ -790,7 +803,7 @@ "description": "Calculate price for returning `Reservations` if there are no policy errors.\n", "operationId": "CalculateRefund_Post", "x-ms-examples": { - "Purchase": { + "CalculateRefund": { "$ref": "./examples/CalculateRefund.json" } }, @@ -827,13 +840,17 @@ "/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/return": { "post": { "summary": "Return a reservation.", - "description": "Return a reservation.", + "description": "Return a reservation and get refund information.", "operationId": "Return_Post", "x-ms-examples": { - "Purchase": { + "Return": { "$ref": "./examples/Return.json" } }, + "x-ms-long-running-operation": true, + "x-ms-long-running-operation-options": { + "final-state-via": "location" + }, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" @@ -881,7 +898,7 @@ }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { - "final-state-via": "azure-async-operation" + "final-state-via": "location" }, "parameters": [ { @@ -992,7 +1009,7 @@ "description": "List the reservations and the roll up counts of reservations group by provisioning states that the user has access to in the current tenant.", "operationId": "Reservation_ListAll", "x-ms-examples": { - "Catalog": { + "ReservationListAll": { "$ref": "./examples/GetReservations.json" } }, @@ -1106,6 +1123,7 @@ "definitions": { "ErrorResponseCode": { "type": "string", + "description": "Error code describing the reason that service is not able to process the incoming request", "enum": [ "NotSpecified", "InternalServerError", @@ -1403,7 +1421,7 @@ "properties": { "reservationId": { "type": "string", - "description": "Fully qualified identifier of the Reservation being returned" + "description": "Fully qualified identifier of the reservation being returned" }, "quantity": { "type": "integer", @@ -1418,7 +1436,7 @@ "properties": { "reservationId": { "type": "string", - "description": "Fully qualified id of the Reservation being returned." + "description": "Fully qualified id of the reservation being returned." }, "quantity": { "type": "integer", @@ -1761,12 +1779,12 @@ "expiryDate": { "type": "string", "format": "date", - "description": "This is the date when the Reservation will expire." + "description": "This is the date when the reservation will expire." }, "expiryDateTime": { "type": "string", "format": "date-time", - "description": "This is the date-time when the Reservation will expire." + "description": "This is the date-time when the reservation will expire." }, "benefitStartTime": { "type": "string", @@ -1776,7 +1794,7 @@ "originalQuantity": { "type": "integer", "format": "int32", - "description": "Total Quantity of the SKUs purchased in the Reservation." + "description": "Total Quantity of the SKUs purchased in the reservation." }, "term": { "$ref": "#/definitions/ReservationTerm" @@ -1806,7 +1824,7 @@ }, "DisplayProvisioningState": { "type": "string", - "description": "Represent the current display state of the Reservation.", + "description": "Represent the current display state of the reservation.", "enum": [ "Succeeded", "Expiring", @@ -1855,7 +1873,7 @@ }, "ReservationTerm": { "type": "string", - "description": "Represent the term of Reservation.", + "description": "Represent the term of reservation.", "enum": [ "P1Y", "P3Y", @@ -1946,7 +1964,7 @@ "ReservationQuantity": { "type": "integer", "format": "int32", - "description": "Quantity of the SKUs that are part of the Reservation. Must be greater than zero." + "description": "Quantity of the SKUs that are part of the reservation. Must be greater than zero." }, "AvailableScopeProperties": { "type": "object", @@ -2386,7 +2404,7 @@ "properties": { "reservationId": { "type": "string", - "description": "Fully qualified id of the Reservation being returned." + "description": "Fully qualified id of the reservation being returned." }, "quantity": { "type": "integer", @@ -2431,11 +2449,11 @@ "properties": { "reservationOrderId": { "type": "string", - "description": "Fully qualified id of the ReservationOrder being purchased" + "description": "Fully qualified id of the reservationOrder being purchased" }, "reservationId": { "type": "string", - "description": "Fully qualified id of the Reservation being purchased. This value is only guaranteed to be non-null if the purchase is successful." + "description": "Fully qualified id of the reservation being purchased. This value is only guaranteed to be non-null if the purchase is successful." }, "properties": { "$ref": "#/definitions/PurchaseRequest" @@ -2527,7 +2545,7 @@ "type": "string" }, "quantity": { - "description": "Quantity of the SKUs that are part of the Reservation.", + "description": "Quantity of the SKUs that are part of the reservation.", "$ref": "#/definitions/ReservationQuantity" }, "provisioningState": { @@ -2537,7 +2555,7 @@ "effectiveDateTime": { "type": "string", "format": "date-time", - "description": "DateTime of the Reservation starting when this version is effective from." + "description": "DateTime of the reservation starting when this version is effective from." }, "benefitStartTime": { "type": "string", @@ -2547,18 +2565,18 @@ "lastUpdatedDateTime": { "type": "string", "format": "date-time", - "description": "DateTime of the last time the Reservation was updated.", + "description": "DateTime of the last time the reservation was updated.", "readOnly": true }, "expiryDate": { "type": "string", "format": "date", - "description": "This is the date when the Reservation will expire." + "description": "This is the date when the reservation will expire." }, "expiryDateTime": { "type": "string", "format": "date-time", - "description": "This is the date-time when the Reservation will expire." + "description": "This is the date-time when the reservation will expire." }, "reviewDateTime": { "type": "string", @@ -2583,19 +2601,19 @@ "readOnly": true }, "provisioningSubState": { - "description": "The provisioning sub state of the reservation, e.g. Succeeded", + "description": "The provisioning sub-state of the reservation, e.g. Succeeded", "type": "string", "readOnly": true }, "purchaseDate": { "type": "string", "format": "date", - "description": "This is the date when the Reservation was purchased." + "description": "This is the date when the reservation was purchased." }, "purchaseDateTime": { "type": "string", "format": "date-time", - "description": "This is the date-time when the Reservation was purchased." + "description": "This is the date-time when the reservation was purchased." }, "splitProperties": { "$ref": "#/definitions/ReservationSplitProperties" @@ -2628,7 +2646,7 @@ "$ref": "#/definitions/RenewPropertiesResponse" }, "term": { - "description": "Represent the term of Reservation.", + "description": "Represent the term of reservation.", "$ref": "#/definitions/ReservationTerm" }, "userFriendlyAppliedScopeType": { @@ -2670,11 +2688,11 @@ "items": { "type": "string" }, - "description": "List of destination Resource Id that are created due to split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + "description": "List of destination resource id that are created due to split. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" }, "splitSource": { "type": "string", - "description": "Resource Id of the Reservation from which this is split. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + "description": "Resource id of the reservation from which this is split. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" } } }, @@ -2683,14 +2701,14 @@ "properties": { "mergeDestination": { "type": "string", - "description": "Reservation Resource Id Created due to the merge. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + "description": "Reservation resource id Created due to the merge. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" }, "mergeSources": { "type": "array", "items": { "type": "string" }, - "description": "Resource Ids of the Source Reservation's merged to form this Reservation. Format of the resource Id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + "description": "Resource ids of the source reservation's merged to form this reservation. Format of the resource id is /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" } } }, @@ -2699,11 +2717,11 @@ "properties": { "swapSource": { "type": "string", - "description": "Resource Id of the Source Reservation that gets swapped. Format of the resource Id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + "description": "Resource id of the source reservation that gets swapped. Format of the resource id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" }, "swapDestination": { "type": "string", - "description": "Reservation Resource Id that the original resource gets swapped to. Format of the resource Id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" + "description": "Reservation resource id that the original resource gets swapped to. Format of the resource id is /providers/microsoft.capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}" } } }, @@ -2723,12 +2741,12 @@ "$ref": "#/definitions/ReservationBillingPlan" }, "quantity": { - "description": "Quantity of the SKUs that are part of the Reservation.", + "description": "Quantity of the SKUs that are part of the reservation.", "$ref": "#/definitions/ReservationQuantity" }, "displayName": { "type": "string", - "description": "Friendly name of the Reservation" + "description": "Friendly name of the reservation" }, "appliedScopeType": { "$ref": "#/definitions/AppliedScopeType" @@ -2754,16 +2772,17 @@ "reviewDateTime": { "type": "string", "format": "date-time", - "description": "This is the date-time when the Azure Hybrid Benefit needs to be reviewed." + "description": "This is the date-time when the Azure hybrid benefit needs to be reviewed." } } }, "SavingsPlanPurchaseRequestProperties": { "type": "object", + "description": "Properties of a savings plan purchase", "properties": { "displayName": { "type": "string", - "description": "Friendly name of the Savings Plan" + "description": "Friendly name of the savings plan" }, "billingScopeId": { "$ref": "#/definitions/BillingScopeId" @@ -2879,7 +2898,7 @@ }, "name": { "type": "string", - "description": "Name of the Reservation" + "description": "Display name of the reservation" }, "renew": { "$ref": "#/definitions/Renew" @@ -2895,7 +2914,7 @@ "reviewDateTime": { "type": "string", "format": "date-time", - "description": "This is the date-time when the Azure Hybrid Benefit needs to be reviewed." + "description": "This is the date-time when the Azure hybrid benefit needs to be reviewed." } } }, @@ -2957,6 +2976,7 @@ }, "SavingsPlanPurchaseRequest": { "type": "object", + "description": "Request body for savings plan purchase", "properties": { "sku": { "$ref": "#/definitions/SkuName" @@ -3074,7 +3094,7 @@ "type": "array", "items": { "type": "string", - "description": "Reservation resource Id. \"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\"" + "description": "Reservation resource id. \"/providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}\"" }, "x-ms-identifiers": [] }, @@ -3476,7 +3496,7 @@ "in": "path", "required": true, "type": "string", - "description": "Id of the Reservation Item" + "description": "Id of the reservation item" }, "MergeParameter": { "name": "body", @@ -3512,6 +3532,7 @@ "name": "body", "x-ms-parameter-location": "method", "in": "body", + "description": "Scopes to be checked for eligibility.", "required": true, "schema": { "$ref": "#/definitions/AvailableScopeRequest" From a1ee7dcd26f24fa392de67197044e113310e0739 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Wed, 14 Dec 2022 19:20:18 -0800 Subject: [PATCH 24/30] add location for return. address some lint warnings. use proxyResource --- .../stable/2022-11-01/examples/Return.json | 5 ++- .../stable/2022-11-01/reservations.json | 40 +++++++------------ 2 files changed, 18 insertions(+), 27 deletions(-) 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 99657edaeb98..1e892b5c39cb 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 @@ -1,7 +1,7 @@ { "parameters": { "api-version": "2022-11-01", - "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "reservationOrderId": "50000000-aaaa-bbbb-cccc-100000000004", "body": { "properties": { "sessionId": "10000000-aaaa-bbbb-cccc-200000000000", @@ -16,6 +16,9 @@ }, "responses": { "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" + }, "body": { "id": "/providers/Microsoft.Capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000", "properties": { 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 e05d2d56c248..68b32646cdf1 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 @@ -548,10 +548,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ReservationIdParameter" + "$ref": "#/parameters/ReservationOrderIdParameter" }, { - "$ref": "#/parameters/ReservationOrderIdParameter" + "$ref": "#/parameters/ReservationIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -732,10 +732,10 @@ }, "parameters": [ { - "$ref": "#/parameters/ReservationIdParameter" + "$ref": "#/parameters/ReservationOrderIdParameter" }, { - "$ref": "#/parameters/ReservationOrderIdParameter" + "$ref": "#/parameters/ReservationIdParameter" }, { "$ref": "#/parameters/ApiVersionParameter" @@ -898,7 +898,7 @@ }, "x-ms-long-running-operation": true, "x-ms-long-running-operation-options": { - "final-state-via": "location" + "final-state-via": "azure-async-operation" }, "parameters": [ { @@ -1912,6 +1912,11 @@ "description": "The definition of the reservation.", "type": "object", "x-ms-azure-resource": true, + "allOf": [ + { + "$ref": "../../../../../common-types/resource-management/v4/types.json#/definitions/ProxyResource" + } + ], "properties": { "location": { "type": "string", @@ -1921,16 +1926,6 @@ "type": "integer", "format": "int32" }, - "id": { - "type": "string", - "readOnly": true, - "description": "Identifier of the reservation" - }, - "name": { - "type": "string", - "readOnly": true, - "description": "Name of the reservation" - }, "sku": { "description": "The sku information associated to this reservation ", "$ref": "#/definitions/SkuName" @@ -1939,11 +1934,6 @@ "description": "The properties associated to this reservation ", "$ref": "#/definitions/ReservationsProperties" }, - "type": { - "type": "string", - "readOnly": true, - "description": "Type of resource. \"Microsoft.Capacity/reservationOrders/reservations\"" - }, "kind": { "type": "string", "description": "Resource Provider type to be reserved.", @@ -1954,10 +1944,6 @@ "name": "Kind", "modelAsString": false } - }, - "systemData": { - "$ref": "../../../../../common-types/resource-management/v1/types.json#/definitions/systemData", - "readOnly": true } } }, @@ -2966,7 +2952,8 @@ }, "location": { "type": "string", - "description": "The Azure Region where the reserved resource lives." + "description": "The Azure Region where the reserved resource lives.", + "x-ms-mutability": [ "create", "read" ] }, "properties": { "x-ms-client-flatten": true, @@ -3543,7 +3530,8 @@ "in": "query", "description": "Supported version.", "required": true, - "type": "string" + "type": "string", + "x-ms-parameter-location":"client" }, "ExpandRenewPropertiesParameter": { "name": "$expand", From 79da8925d46830570a71ee8fc9d7778f72fb8cd8 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Thu, 15 Dec 2022 15:25:57 -0800 Subject: [PATCH 25/30] address legacy lint error and warnings --- .../stable/2022-11-01/reservations.json | 56 +++++++++++++++---- 1 file changed, 45 insertions(+), 11 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 68b32646cdf1..7e09f4d050a5 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 @@ -1305,6 +1305,7 @@ }, "CalculateRefundRequest": { "type": "object", + "description": "Request containing information needed for calculating refund.", "properties": { "id": { "type": "string", @@ -1317,6 +1318,7 @@ }, "RefundRequest": { "type": "object", + "description": "Request containing information needed for returning reservation.", "properties": { "properties": { "$ref": "#/definitions/RefundRequestProperties" @@ -1325,6 +1327,7 @@ }, "CalculateRefundRequestProperties": { "type": "object", + "description": "Properties needed for calculate refund including the scope and the reservation to be returned.", "properties": { "scope": { "type": "string", @@ -1337,6 +1340,7 @@ }, "RefundRequestProperties": { "type": "object", + "description": "Properties needed for refund request including the session id from calculte refund, the scope, the reservation to be returned and the return reason.", "properties": { "sessionId": { "type": "string", @@ -1524,6 +1528,7 @@ }, "Catalog": { "type": "object", + "description": "Product details of a type of resource.", "properties": { "resourceType": { "type": "string", @@ -1566,7 +1571,10 @@ "readOnly": true, "items": { "$ref": "#/definitions/SkuProperty" - } + }, + "x-ms-identifiers": [ + "name" + ] }, "msrp": { "type": "object", @@ -1585,7 +1593,8 @@ "readOnly": true, "items": { "$ref": "#/definitions/SkuRestriction" - } + }, + "x-ms-identifiers": [] }, "tier": { "type": "string", @@ -1602,12 +1611,16 @@ "readOnly": true, "items": { "$ref": "#/definitions/SkuCapability" - } + }, + "x-ms-identifiers": [ + "name" + ] } } }, "SkuCapability": { "type": "object", + "description": "Capability of a sku.", "properties": { "name": { "type": "string", @@ -1621,6 +1634,7 @@ }, "SkuProperty": { "type": "object", + "description": "Property of a sku.", "properties": { "name": { "type": "string", @@ -1634,6 +1648,7 @@ }, "SkuRestriction": { "type": "object", + "description": "Restriction of a sku.", "properties": { "type": { "type": "string", @@ -1654,6 +1669,7 @@ }, "ReservationOrderResponse": { "type": "object", + "description": "Details of a reservation order being returned.", "x-ms-azure-resource": true, "properties": { "etag": { @@ -1755,12 +1771,14 @@ "type": "array", "items": { "$ref": "#/definitions/PaymentDetail" - } + }, + "x-ms-identifiers": [] } } }, "ReservationOrderProperties": { "type": "object", + "description": "Properties of a reservation order.", "properties": { "displayName": { "type": "string", @@ -1920,7 +1938,11 @@ "properties": { "location": { "type": "string", - "description": "The Azure Region where the reserved resource lives." + "description": "The Azure Region where the reserved resource lives.", + "x-ms-mutability": [ + "create", + "read" + ] }, "etag": { "type": "integer", @@ -1954,6 +1976,7 @@ }, "AvailableScopeProperties": { "type": "object", + "description": "The response of available scope api containing scopes and their eligibilities.", "properties": { "properties": { "$ref": "#/definitions/SubscriptionScopeProperties" @@ -1962,17 +1985,20 @@ }, "SubscriptionScopeProperties": { "type": "object", + "description": "The scopes checked by the available scope api.", "properties": { "scopes": { "type": "array", "items": { "$ref": "#/definitions/ScopeProperties" - } + }, + "x-ms-identifiers": [] } } }, "ScopeProperties": { "type": "object", + "description": "The scope and whether it is valid.", "properties": { "scope": { "type": "string" @@ -2660,7 +2686,8 @@ "type": "array", "items": { "$ref": "#/definitions/ReservationUtilizationAggregates" - } + }, + "x-ms-identifiers": [] } } } @@ -2953,7 +2980,10 @@ "location": { "type": "string", "description": "The Azure Region where the reserved resource lives.", - "x-ms-mutability": [ "create", "read" ] + "x-ms-mutability": [ + "create", + "read" + ] }, "properties": { "x-ms-client-flatten": true, @@ -3098,7 +3128,10 @@ "type": "array", "items": { "$ref": "#/definitions/OperationResponse" - } + }, + "x-ms-identifiers": [ + "name" + ] }, "nextLink": { "type": "string", @@ -3375,7 +3408,8 @@ "type": "array", "items": { "$ref": "#/definitions/PaymentDetail" - } + }, + "x-ms-identifiers": [] } } }, @@ -3531,7 +3565,7 @@ "description": "Supported version.", "required": true, "type": "string", - "x-ms-parameter-location":"client" + "x-ms-parameter-location": "client" }, "ExpandRenewPropertiesParameter": { "name": "$expand", From 03f5675e59718a66e3c45c72201e4708f5082904 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Fri, 16 Dec 2022 12:44:33 -0800 Subject: [PATCH 26/30] Add descriptions for objects and fix typo --- .../stable/2022-11-01/reservations.json | 63 ++++++++++++++----- 1 file changed, 46 insertions(+), 17 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 7e09f4d050a5..3577a81e6ff1 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 @@ -1340,7 +1340,7 @@ }, "RefundRequestProperties": { "type": "object", - "description": "Properties needed for refund request including the session id from calculte refund, the scope, the reservation to be returned and the return reason.", + "description": "Properties needed for refund request including the session id from calculate refund, the scope, the reservation to be returned and the return reason.", "properties": { "sessionId": { "type": "string", @@ -1532,17 +1532,17 @@ "properties": { "resourceType": { "type": "string", - "description": "The type of resource the SKU applies to.", + "description": "The type of resource the sku applies to.", "readOnly": true }, "name": { "type": "string", - "description": "The name of SKU", + "description": "The name of sku", "readOnly": true }, "billingPlans": { "type": "object", - "description": "The billing plan options available for this SKU.", + "description": "The billing plan options available for this sku.", "additionalProperties": { "type": "array", "items": { @@ -1563,7 +1563,7 @@ "readOnly": true, "items": { "type": "string", - "description": "The set of locations that the SKU is available. If not specified, the SKU is available in all locations." + "description": "The set of locations that the sku is available. If not specified, the sku is available in all locations." } }, "skuProperties": { @@ -1579,7 +1579,7 @@ "msrp": { "type": "object", "readOnly": true, - "description": "Pricing information about the SKU", + "description": "Pricing information about the sku", "properties": { "p1Y": { "type": "object", @@ -1598,12 +1598,12 @@ }, "tier": { "type": "string", - "description": "The tier of this SKU", + "description": "The tier of this sku", "readOnly": true }, "size": { "type": "string", - "description": "The size of this SKU", + "description": "The size of this sku", "readOnly": true }, "capabilities": { @@ -1659,7 +1659,7 @@ "items": { "type": "string" }, - "description": "The value of restrictions. If the restriction type is set to location. This would be different locations where the SKU is restricted." + "description": "The value of restrictions. If the restriction type is set to location. This would be different locations where the sku is restricted." }, "reasonCode": { "type": "string", @@ -1812,7 +1812,7 @@ "originalQuantity": { "type": "integer", "format": "int32", - "description": "Total Quantity of the SKUs purchased in the reservation." + "description": "Total Quantity of the skus purchased in the reservation." }, "term": { "$ref": "#/definitions/ReservationTerm" @@ -1972,7 +1972,7 @@ "ReservationQuantity": { "type": "integer", "format": "int32", - "description": "Quantity of the SKUs that are part of the reservation. Must be greater than zero." + "description": "Quantity of the skus that are part of the reservation. Must be greater than zero." }, "AvailableScopeProperties": { "type": "object", @@ -2070,6 +2070,7 @@ }, "RenewPropertiesResponse": { "type": "object", + "description": "The renew properties for a reservation.", "properties": { "purchaseProperties": { "$ref": "#/definitions/PurchaseRequest" @@ -2104,6 +2105,7 @@ }, "SkuName": { "type": "object", + "description": "The name of sku", "properties": { "name": { "type": "string" @@ -2112,6 +2114,7 @@ }, "CalculateRefundResponse": { "type": "object", + "description": "The response of calculate refund containing refund information of reservation", "properties": { "id": { "type": "string", @@ -2124,6 +2127,7 @@ }, "RefundResponse": { "type": "object", + "description": "The response of refund request containing refund information of reservation", "properties": { "id": { "type": "string", @@ -2136,6 +2140,7 @@ }, "RefundResponseProperties": { "type": "object", + "description": "The refund properties of reservation", "properties": { "sessionId": { "type": "string", @@ -2557,7 +2562,7 @@ "type": "string" }, "quantity": { - "description": "Quantity of the SKUs that are part of the reservation.", + "description": "Quantity of the skus that are part of the reservation.", "$ref": "#/definitions/ReservationQuantity" }, "provisioningState": { @@ -2597,14 +2602,14 @@ }, "skuDescription": { "type": "string", - "description": "Description of the SKU in english." + "description": "Description of the sku in english." }, "extendedStatusInfo": { "description": "The message giving detailed information about the status code.", "$ref": "#/definitions/ExtendedStatusInfo" }, "billingPlan": { - "description": "The billing plan options available for this SKU.", + "description": "The billing plan options available for this sku.", "$ref": "#/definitions/ReservationBillingPlan" }, "displayProvisioningState": { @@ -2695,6 +2700,7 @@ }, "ReservationSplitProperties": { "type": "object", + "description": "Properties of reservation split", "properties": { "splitDestinations": { "type": "array", @@ -2711,6 +2717,7 @@ }, "ReservationMergeProperties": { "type": "object", + "description": "Properties of reservation merge", "properties": { "mergeDestination": { "type": "string", @@ -2727,6 +2734,7 @@ }, "ReservationSwapProperties": { "type": "object", + "description": "Properties of reservation swap", "properties": { "swapSource": { "type": "string", @@ -2740,6 +2748,7 @@ }, "PurchaseRequestProperties": { "type": "object", + "description": "Properties of reservation purchase request", "properties": { "reservedResourceType": { "$ref": "#/definitions/ReservedResourceType" @@ -2754,7 +2763,7 @@ "$ref": "#/definitions/ReservationBillingPlan" }, "quantity": { - "description": "Quantity of the SKUs that are part of the reservation.", + "description": "Quantity of the skus that are part of the reservation.", "$ref": "#/definitions/ReservationQuantity" }, "displayName": { @@ -2896,6 +2905,7 @@ }, "PatchProperties": { "type": "object", + "description": "Properties for reservation patch", "properties": { "appliedScopeType": { "$ref": "#/definitions/AppliedScopeType" @@ -2933,6 +2943,7 @@ }, "SplitProperties": { "type": "object", + "description": "Properties for reservation split", "properties": { "quantities": { "type": "array", @@ -2952,6 +2963,7 @@ }, "MergeProperties": { "type": "object", + "description": "Properties for reservation merge", "properties": { "sources": { "type": "array", @@ -2964,6 +2976,7 @@ }, "MergeRequest": { "type": "object", + "description": "The request for reservation merge", "properties": { "properties": { "x-ms-client-flatten": true, @@ -2973,6 +2986,7 @@ }, "PurchaseRequest": { "type": "object", + "description": "The request for reservation purchase", "properties": { "sku": { "$ref": "#/definitions/SkuName" @@ -3006,6 +3020,7 @@ }, "Patch": { "type": "object", + "description": "The request for reservation patch", "properties": { "properties": { "x-ms-client-flatten": true, @@ -3015,6 +3030,7 @@ }, "SplitRequest": { "type": "object", + "description": "The request for reservation split", "properties": { "properties": { "x-ms-client-flatten": true, @@ -3034,6 +3050,7 @@ }, "Error": { "type": "object", + "description": "Error inofrmation", "properties": { "error": { "$ref": "#/definitions/ExtendedErrorInfo" @@ -3042,6 +3059,7 @@ }, "ExtendedErrorInfo": { "type": "object", + "description": "Extended error information including error code and error message", "properties": { "code": { "$ref": "#/definitions/ErrorResponseCode" @@ -3074,6 +3092,7 @@ }, "AppliedReservations": { "type": "object", + "description": "The response for applied reservations api", "properties": { "id": { "type": "string", @@ -3098,6 +3117,7 @@ }, "AppliedReservationsProperties": { "type": "object", + "description": "Properties for applied reservations returned", "properties": { "reservationOrderIds": { "$ref": "#/definitions/AppliedReservationList" @@ -3106,6 +3126,7 @@ }, "AppliedReservationList": { "type": "object", + "description": "Paginated list of applied reservations", "properties": { "value": { "type": "array", @@ -3123,6 +3144,7 @@ }, "OperationList": { "type": "object", + "description": "Paginated list of operations", "properties": { "value": { "type": "array", @@ -3141,6 +3163,7 @@ }, "OperationResponse": { "type": "object", + "description": "The response containing operation information", "properties": { "name": { "description": "Name of the operation", @@ -3166,6 +3189,7 @@ }, "OperationDisplay": { "type": "object", + "description": "Information about an operation", "properties": { "provider": { "type": "string" @@ -3188,6 +3212,7 @@ }, "ReservationList": { "type": "object", + "description": "List of `Reservation`s", "properties": { "value": { "type": "array", @@ -3203,6 +3228,7 @@ }, "ReservationOrderList": { "type": "object", + "description": "List of `ReservationOrder`s", "properties": { "value": { "type": "array", @@ -3305,6 +3331,7 @@ }, "Price": { "type": "object", + "description": "Pricing information containing the amount and the currency code", "properties": { "currencyCode": { "type": "string", @@ -3332,6 +3359,7 @@ }, "CalculatePriceResponse": { "type": "object", + "description": "The response of calculate price for reservation.", "properties": { "properties": { "$ref": "#/definitions/CalculatePriceResponseProperties" @@ -3340,6 +3368,7 @@ }, "CalculatePriceResponseProperties": { "type": "object", + "description": "Properties for calculate price response", "properties": { "billingCurrencyTotal": { "type": "object", @@ -3384,11 +3413,11 @@ "type": "string" }, "skuTitle": { - "description": "Title of SKU that is being purchased.", + "description": "Title of sku that is being purchased.", "type": "string" }, "skuDescription": { - "description": "Description of SKU that is being purchased.", + "description": "Description of sku that is being purchased.", "type": "string" }, "pricingCurrencyTotal": { From d26a64ccfeb457455ab32d3eaf7020d2149a83af Mon Sep 17 00:00:00 2001 From: chchen3 Date: Mon, 19 Dec 2022 11:47:39 -0800 Subject: [PATCH 27/30] fix spell error and missing description --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 3 ++- 1 file changed, 2 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 3577a81e6ff1..ee0f3355cd4b 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 @@ -3050,7 +3050,7 @@ }, "Error": { "type": "object", - "description": "Error inofrmation", + "description": "Error information", "properties": { "error": { "$ref": "#/definitions/ExtendedErrorInfo" @@ -3444,6 +3444,7 @@ }, "ChangeDirectoryRequest": { "type": "object", + "description": "Request body for change directory of a reservation.", "properties": { "destinationTenantId": { "description": "Tenant id GUID that reservation order is to be transferred to", From f1ef98d76c8d46c2fde8a922b329764f65f3c8a1 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Tue, 3 Jan 2023 16:46:40 -0800 Subject: [PATCH 28/30] Fix comment --- .../stable/2022-11-01/reservations.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 ee0f3355cd4b..440ae407f903 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 @@ -1938,7 +1938,7 @@ "properties": { "location": { "type": "string", - "description": "The Azure Region where the reserved resource lives.", + "description": "The Azure region where the reserved resource lives.", "x-ms-mutability": [ "create", "read" @@ -2450,7 +2450,7 @@ }, "SavingsPlanToPurchaseCalculateExchange": { "type": "object", - "description": "Savings Plan purchase details", + "description": "Savings plan purchase details", "properties": { "properties": { "$ref": "#/definitions/SavingsPlanPurchaseRequest" @@ -2485,15 +2485,15 @@ }, "SavingsPlanToPurchaseExchange": { "type": "object", - "description": "Savings Plan purchase details", + "description": "Savings plan purchase details", "properties": { "savingsPlanOrderId": { "type": "string", - "description": "Fully qualified id of the Savings Plan order being purchased" + "description": "Fully qualified id of the savings plan order being purchased" }, "savingsPlanId": { "type": "string", - "description": "Fully qualified id of the Savings Plan being purchased. This value is only guaranteed to be non-null if the purchase is successful." + "description": "Fully qualified id of the savings plan being purchased. This value is only guaranteed to be non-null if the purchase is successful." }, "properties": { "$ref": "#/definitions/SavingsPlanPurchaseRequest" @@ -2508,7 +2508,7 @@ }, "BenefitTerm": { "type": "string", - "description": "Represent SavingsPlan term in ISO 8601 format.", + "description": "Represent savings plan term in ISO 8601 format.", "enum": [ "P1Y", "P3Y" @@ -2993,7 +2993,7 @@ }, "location": { "type": "string", - "description": "The Azure Region where the reserved resource lives.", + "description": "The Azure region where the reserved resource lives.", "x-ms-mutability": [ "create", "read" @@ -3627,7 +3627,7 @@ "in": "query", "required": false, "type": "string", - "description": "Filters the skus based on the location specified in this parameter. This can be an azure region or global" + "description": "Filters the skus based on the location specified in this parameter. This can be an Azure region or global" }, "ReservationOrderIdParameter": { "name": "reservationOrderId", From 5e931ccc425aa3b624e53bbf985e0951dcdb8cd7 Mon Sep 17 00:00:00 2001 From: chchen3 Date: Mon, 9 Jan 2023 15:50:16 -0800 Subject: [PATCH 29/30] Add back long running operations true to available scopes --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 1 + 1 file changed, 1 insertion(+) 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 440ae407f903..497b03b6f349 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 @@ -37,6 +37,7 @@ "$ref": "./examples/GetAvailableScope.json" } }, + "x-ms-long-running-operation": true, "parameters": [ { "$ref": "#/parameters/ReservationOrderIdParameter" From 3a35f36078118e00d3ab9351806d94846450c69d Mon Sep 17 00:00:00 2001 From: chchen3 Date: Wed, 11 Jan 2023 16:20:39 -0800 Subject: [PATCH 30/30] Add more description for appliedScopeProperties --- .../Microsoft.Capacity/stable/2022-11-01/reservations.json | 2 +- 1 file changed, 1 insertion(+), 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 497b03b6f349..778583a45637 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 @@ -3268,7 +3268,7 @@ }, "AppliedScopeProperties": { "type": "object", - "description": "Properties specific to applied scope type. Not required if not applicable.", + "description": "Properties specific to applied scope type. Not required if not applicable. Required and need to provide tenantId and managementGroupId if AppliedScopeType is ManagementGroup", "properties": { "tenantId": { "$ref": "#/definitions/TenantId"