diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/CalculateReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/CalculateReservationOrder.json new file mode 100644 index 000000000000..6ed932ba3145 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/CalculateReservationOrder.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2019-04-01", + "body": { + "sku": { + "name": "standard_D1" + }, + "location": "westus", + "properties": { + "reservedResourceType": "VirtualMachines", + "billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83", + "term": "P1Y", + "quantity": "1", + "displayName": "TestReservationOrder", + "appliedScopes": null, + "appliedScopeType": "Shared", + "reservedResourceProperties": { + "instanceFlexibility": "On" + } + } + } + }, + "responses": { + "200": { + "body": { + "properties": { + "billingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466.0 + }, + "reservationOrderId": "6d9cec54-7de8-abcd-9de7-80f5d634f2d2", + "skuTitle": "Reserved VM Instance, Standard_D1, US West, 1 Year", + "skuDescription": "standard_D1", + "pricingCurrencyTotal": { + "currencyCode": "USD", + "amount": 466.0 + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetAppliedReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetAppliedReservations.json new file mode 100644 index 000000000000..a7edca1497eb --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetAppliedReservations.json @@ -0,0 +1,32 @@ +{ + "parameters": { + "api-version": "2019-04-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"] + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetCatalog.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetCatalog.json new file mode 100644 index 000000000000..fdc84983c796 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetCatalog.json @@ -0,0 +1,139 @@ +{ + "parameters": { + "api-version": "2019-04-01", + "subscriptionId": "23bc208b-083f-4901-ae85-4f98c0c3b4b6", + "reservedResourceType": "VirtualMachines", + "location": "eastus" + }, + "responses": { + "200": { + "body": [ + { + "resourceType": "VirtualMachines", + "name": "Standard_DS5_v2", + "terms": [ + "P1Y", + "P3Y" + ], + "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" + ], + "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" + ], + "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/preview/2019-04-01/examples/GetOperations.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetOperations.json new file mode 100644 index 000000000000..b62e64dcf4d1 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetOperations.json @@ -0,0 +1,103 @@ +{ + "parameters": { + "api-version": "2019-04-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." + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationDetails.json new file mode 100644 index 000000000000..376eab76fb8e --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationDetails.json @@ -0,0 +1,42 @@ +{ + "parameters": { + "api-version": "2019-04-01", + "reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da", + "reservationId": "6ef59113-3482-40da-8d79-787f823e34bc" + }, + "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" + ], + "appliedScopeType": "Single", + "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", + "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" + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationOrderDetails.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationOrderDetails.json new file mode 100644 index 000000000000..509d471aa69f --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationOrderDetails.json @@ -0,0 +1,30 @@ +{ + "parameters": { + "api-version": "2019-04-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", + "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 + } + } + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationOrders.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationOrders.json new file mode 100644 index 000000000000..39281ec85105 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationOrders.json @@ -0,0 +1,74 @@ +{ + "parameters": { + "api-version": "2019-04-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", + "expiryDate": "2018-08-29", + "term": "P1Y", + "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", + "requestDateTime": "2017-08-30T12:55:40.2799114Z", + "createdDateTime": "2017-08-30T12:58:20.526Z", + "expiryDate": "2018-08-30", + "term": "P1Y", + "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", + "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 + } + } + ], + "nextLink": "https://management.azure.com/providers/Microsoft.Capacity/reservationOrders?api-version=2017-11-01&%24skiptoken=eyJyZyI6IjIwNTkyMzdlLWY3MmYtNDczYi1hNTZiLWExOGJkM2UwMDhlZCIsImlnIjpudWxsLCJzdCI6bnVsbH0%3d" + } + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationRevisions.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationRevisions.json new file mode 100644 index 000000000000..40732e7f5bc2 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservationRevisions.json @@ -0,0 +1,140 @@ +{ + "parameters": { + "api-version": "2019-04-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", + "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", + "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", + "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_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" + ] + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservations.json new file mode 100644 index 000000000000..9a8a64de9e03 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/GetReservations.json @@ -0,0 +1,150 @@ +{ + "parameters": { + "api-version": "2019-04-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" + ], + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "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" + ], + "appliedScopeType": "Single", + "quantity": 1, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "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" + ], + "appliedScopeType": "Single", + "quantity": 2, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "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" + ], + "appliedScopeType": "Single", + "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", + "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" + ] + } + } + } + ] + } + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/MergeReservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/MergeReservations.json new file mode 100644 index 000000000000..eef063de0ab1 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/MergeReservations.json @@ -0,0 +1,124 @@ +{ + "parameters": { + "api-version": "2019-04-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" + ], + "appliedScopeType": "Single", + "quantity": 1, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "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" + ], + "appliedScopeType": "Single", + "quantity": 2, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "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" + ], + "appliedScopeType": "Single", + "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", + "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" : { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/PurchaseReservationOrder.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/PurchaseReservationOrder.json new file mode 100644 index 000000000000..d2d26d537e1b --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/PurchaseReservationOrder.json @@ -0,0 +1,70 @@ +{ + "parameters": { + "api-version": "2019-04-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", + "quantity": "1", + "displayName": "TestReservationOrder", + "appliedScopes": null, + "appliedScopeType": "Shared", + "reservedResourceProperties": { + "instanceFlexibility": "On" + } + } + } + }, + "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", + "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", + "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 + } + } + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/SplitReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/SplitReservation.json new file mode 100644 index 000000000000..737b5ddf6d57 --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/SplitReservation.json @@ -0,0 +1,115 @@ +{ + "parameters": { + "api-version": "2019-04-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" + ], + "appliedScopeType": "Single", + "quantity": 1, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "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" + ], + "appliedScopeType": "Single", + "quantity": 2, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "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" + ], + "appliedScopeType": "Single", + "quantity": 3, + "provisioningState": "Cancelled", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "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" : { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/UpdateReservation.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/UpdateReservation.json new file mode 100644 index 000000000000..7f39a151283f --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/examples/UpdateReservation.json @@ -0,0 +1,48 @@ +{ + "parameters": { + "api-version": "2019-04-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", + "quantity": 3, + "provisioningState": "Succeeded", + "expiryDate": "2018-09-22", + "displayName": "cabri_test", + "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": { + "body": "" + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/reservations.json b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/reservations.json new file mode 100644 index 000000000000..099d59a50dae --- /dev/null +++ b/specification/reservations/resource-manager/Microsoft.Capacity/preview/2019-04-01/reservations.json @@ -0,0 +1,1267 @@ +{ + "swagger" : "2.0", + "info" : { + "title" : "Azure Reservation API", + "description" : "This API describe Azure Reservation", + "version" : "2019-04-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" : { + "/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" + } ], + "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.", + "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`\n", + "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 specificed URI\n", + "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" + } + }, + "parameters" : [ { + "$ref" : "#/parameters/ReservationOrderIdParameter" + }, { + "$ref" : "#/parameters/ApiVersionParameter" + } ], + "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.\n", + "operationId" : "Reservation_Split", + "x-ms-examples" : { + "Split" : { + "$ref" : "./examples/SplitReservation.json" + } + }, + "x-ms-long-running-operation" : true, + "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, + "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/GetReservations.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" + } ], + "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}/revisions" : { + "get" : { + "summary" : "Get `Reservation` revisions.", + "description" : "List of all the revisions for the `Reservation`.\n", + "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" + } + } + } + } + } + }, + "definitions" : { + "ReservationStatusCode" : { + "type" : "string", + "enum" : [ "None", "Pending", "Active", "PurchaseError", "PaymentInstrumentError", "Split", "Merged", "Expired", "Succeeded" ], + "x-ms-enum" : { + "name" : "ReservationStatusCode", + "modelAsString" : true + } + }, + "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" ], + "x-ms-enum" : { + "name" : "ErrorResponseCode", + "modelAsString" : true + } + }, + "SkuName" : { + "type" : "object", + "properties" : { + "name" : { + "type" : "string" + } + } + }, + "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 + }, + "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" + } + }, + "restrictions" : { + "type" : "array", + "readOnly" : true, + "items" : { + "$ref" : "#/definitions/SkuRestriction" + } + } + } + }, + "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" + }, + "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\"" + } + } + }, + "ReservationTerm" : { + "type" : "string", + "description" : "Represent the term of Reservation.", + "enum" : [ "P1Y", "P3Y" ], + "x-ms-enum" : { + "name" : "ReservationTerm", + "modelAsString" : true + } + }, + "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." + }, + "originalQuantity" : { + "$ref" : "#/definitions/ReservationQuantity" + }, + "term" : { + "$ref" : "#/definitions/ReservationTerm" + }, + "provisioningState" : { + "type" : "string", + "description" : "Current state of the reservation." + }, + "reservations" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ReservationResponse" + } + } + } + }, + "ReservationResponse" : { + "type" : "object", + "x-ms-azure-resource" : true, + "properties" : { + "location" : { + "type" : "string", + "readOnly" : true, + "description" : "The Azure Region where the reserved resource lives." + }, + "etag" : { + "type" : "integer" + }, + "id" : { + "type" : "string", + "readOnly" : true, + "description" : "Identifier of the reservation" + }, + "name" : { + "type" : "string", + "readOnly" : true, + "description" : "Name of the reservation" + }, + "sku" : { + "$ref" : "#/definitions/SkuName" + }, + "properties" : { + "$ref" : "#/definitions/ReservationProperties" + }, + "type" : { + "type" : "string", + "readOnly" : true, + "description" : "Type of resource. \"Microsoft.Capacity/reservationOrders/reservations\"" + } + } + }, + "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" + }, + "amount" : { + "type" : "number" + } + } + }, + "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" + }, + "amount" : { + "type" : "number" + } + } + } + } + }, + "ReservationProperties" : { + "type" : "object", + "properties" : { + "reservedResourceType" : { + "$ref" : "#/definitions/ReservedResourceType" + }, + "instanceFlexibility" : { + "$ref" : "#/definitions/InstanceFlexibility" + }, + "displayName" : { + "type" : "string", + "description" : "Friendly name for user to easily identify the reservation" + }, + "appliedScopes" : { + "$ref" : "#/definitions/AppliedScopes" + }, + "appliedScopeType" : { + "$ref" : "#/definitions/AppliedScopeType" + }, + "quantity" : { + "$ref" : "#/definitions/ReservationQuantity" + }, + "provisioningState" : { + "type" : "string", + "description" : "Current state of the reservation." + }, + "effectiveDateTime" : { + "type" : "string", + "format" : "date-time", + "description" : "DateTime of the Reservation starting when this version is effective from." + }, + "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" : { + "$ref" : "#/definitions/ExtendedStatusInfo" + }, + "splitProperties" : { + "$ref" : "#/definitions/ReservationSplitProperties" + }, + "mergeProperties" : { + "$ref" : "#/definitions/ReservationMergeProperties" + } + } + }, + "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}" + } + } + }, + "PurchaseRequestProperties" : { + "type" : "object", + "properties" : { + "reservedResourceType" : { + "$ref" : "#/definitions/ReservedResourceType" + }, + "billingScopeId" : { + "$ref" : "#/definitions/BillingScopeId" + }, + "term" : { + "$ref" : "#/definitions/ReservationTerm" + }, + "quantity" : { + "$ref" : "#/definitions/ReservationQuantity" + }, + "displayName" : { + "type" : "string", + "description" : "Friendly name of the Reservation" + }, + "appliedScopeType" : { + "$ref" : "#/definitions/AppliedScopeType" + }, + "appliedScopes" : { + "$ref" : "#/definitions/AppliedScopes" + }, + "reservedResourceProperties" : { + "type" : "object", + "description" : "Properties specific to each reserved resource type. Not required if not applicable.", + "properties" : { + "instanceFlexibility" : { + "$ref" : "#/definitions/InstanceFlexibility" + } + } + } + } + }, + "PatchProperties" : { + "type" : "object", + "properties" : { + "appliedScopeType" : { + "$ref" : "#/definitions/AppliedScopeType" + }, + "appliedScopes" : { + "$ref" : "#/definitions/AppliedScopes" + }, + "instanceFlexibility" : { + "$ref" : "#/definitions/InstanceFlexibility" + }, + "name" : { + "type" : "string", + "description" : "Name of the Reservation" + } + } + }, + "SplitProperties" : { + "type" : "object", + "properties" : { + "quantities" : { + "type" : "array", + "description" : "List of the quantities in the new reservations to create.", + "items" : { + "type" : "integer", + "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" + } + } + }, + "Error" : { + "type" : "object", + "properties" : { + "error" : { + "$ref" : "#/definitions/ExtendedErrorInfo" + } + } + }, + "ExtendedErrorInfo" : { + "type" : "object", + "properties" : { + "code" : { + "$ref" : "#/definitions/ErrorResponseCode" + }, + "message" : { + "type" : "string" + } + } + }, + "ExtendedStatusInfo" : { + "type" : "object", + "properties" : { + "statusCode" : { + "$ref" : "#/definitions/ReservationStatusCode" + }, + "message" : { + "type" : "string", + "description" : "The message giving detailed information about the status code." + } + } + }, + "ReservationOrderList" : { + "type" : "object", + "properties" : { + "value" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ReservationOrderResponse" + } + }, + "nextLink" : { + "type" : "string", + "description" : "Url to get the next page of reservationOrders." + } + } + }, + "ReservationList" : { + "type" : "object", + "properties" : { + "value" : { + "type" : "array", + "items" : { + "$ref" : "#/definitions/ReservationResponse" + } + }, + "nextLink" : { + "type" : "string", + "description" : "Url to get the next page of reservations." + } + } + }, + "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" : { + "type" : "string" + }, + "display" : { + "$ref" : "#/definitions/OperationDisplay" + }, + "origin" : { + "type" : "string" + } + } + }, + "OperationDisplay" : { + "type" : "object", + "properties" : { + "provider" : { + "type" : "string" + }, + "resource" : { + "type" : "string" + }, + "operation" : { + "type" : "string" + }, + "description" : { + "type" : "string" + } + } + }, + "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 + } + }, + "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" + }, + "ReservationQuantity" : { + "type" : "integer", + "format" : "int32", + "description" : "Quantity of the SKUs that are part of the Reservation. Must be greater than zero." + }, + "ReservedResourceType" : { + "type" : "string", + "description" : "The type of the resource that is being reserved.", + "enum" : [ "VirtualMachines", "SqlDatabases", "SuseLinux", "CosmosDb" ], + "x-ms-enum" : { + "name" : "ReservedResourceType", + "modelAsString" : true + } + } + }, + "parameters" : { + "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" + } + }, + "ApiVersionParameter" : { + "name" : "api-version", + "in" : "query", + "description" : "Supported version for this document is 2019-04-01", + "required" : true, + "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" : true, + "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" + } + } +} \ No newline at end of file diff --git a/specification/reservations/resource-manager/readme.md b/specification/reservations/resource-manager/readme.md index 32c4da641721..bf397a399f71 100644 --- a/specification/reservations/resource-manager/readme.md +++ b/specification/reservations/resource-manager/readme.md @@ -4,10 +4,10 @@ This is the AutoRest configuration file for Reservations RP. - - --- + ## Getting Started + To build the SDK for Reservations, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: > `autorest` @@ -15,20 +15,29 @@ To build the SDK for Reservations, simply [Install AutoRest](https://aka.ms/auto To see additional help and options, run: > `autorest --help` + --- ## Configuration - - ### Basic Information + These are the global settings for the Reservations API. ``` yaml openapi-type: arm -tag: package-2018-06 +tag: package-preview-2019-04 ``` + +### Tag: package-preview-2019-04 + +These settings apply only when `--tag=package-preview-2019-04` is specified on the command line. + +```yaml $(tag) == 'package-preview-2019-04' +input-file: + - Microsoft.Capacity/preview/2019-04-01/reservations.json +``` ### Tag: package-2018-06 These settings apply only when `--tag=package-2018-06` is specified on the command line. @@ -48,8 +57,8 @@ input-file: ``` --- -# Code Generation +# Code Generation ## Swagger to SDK @@ -95,11 +104,13 @@ python: package-version: 0.3.2 clear-output-folder: true ``` + ``` yaml $(python) && $(python-mode) == 'update' python: no-namespace-folders: true output-folder: $(python-sdks-folder)/azure-mgmt-reservations/azure/mgmt/reservations ``` + ``` yaml $(python) && $(python-mode) == 'create' python: basic-setup-py: true