forked from Azure/azure-rest-api-specs
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding list reservations API to Microsoft.Capacity (Azure#14849)
* Adding reservations route to reservations resource manager * Fixing issues * fix casing * Lint fixes * Fixing up some lint issues * More lint fixes * Some more validation fixes * Adding in all of the other APIs to the new version * Fixing spell check scan * Fixing more Lint issues * A couple more custom words * Fixing systemData Lint error * Trying to fix Lint error * Taking out duplicate tag in readme.md * Changing operation name to fix go compile error * Fixing one more go issue * Fixing opertaion ID * Fixing S360 swagger issues * Adding custom word * Adding paths from preview versions into new stable version * Changing error response to use common definition * Revert "Changing error response to use common definition" This reverts commit 5a6c783. * Including the quota.json file in readme.md * Small changes to make to reduce the number of breaking changes. * Undoing changes to two enums * Fixing formatting issue
- Loading branch information
Showing
23 changed files
with
4,581 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
...ons/resource-manager/Microsoft.Capacity/stable/2021-07-01/examples/CalculateExchange.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2021-07-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=2021-07-01", | ||
"Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2021-07-01", | ||
"Retry-After": 5 | ||
} | ||
} | ||
} | ||
} |
70 changes: 70 additions & 0 deletions
70
...urce-manager/Microsoft.Capacity/stable/2021-07-01/examples/CalculateReservationOrder.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2021-07-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 | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
...anager/Microsoft.Capacity/stable/2021-07-01/examples/ChangeDirectoryReservationOrder.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"parameters": { | ||
"api-version": "2021-07-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" | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.