Skip to content

Commit

Permalink
Adding list reservations API to Microsoft.Capacity (#14849)
Browse files Browse the repository at this point in the history
* 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
toddm authored Sep 3, 2021
1 parent 57e4490 commit 93661ae
Show file tree
Hide file tree
Showing 23 changed files with 4,581 additions and 1 deletion.
19 changes: 19 additions & 0 deletions custom-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ atascada
attestationcollateral
audiodata
Auditd
australiacentral
australiaeast
australiasoutheast
authenticatable
Expand Down Expand Up @@ -287,7 +288,9 @@ bot's
botservice
boundingbox
boundingzoom
brazileast
brazilsouth
brazilsoutheast
BRCPF
browsable
bruceper
Expand Down Expand Up @@ -735,6 +738,8 @@ FPGA
fqdn
FQDNs
Français
francecentral
francesouth
freebsd
freeflow
frontdoor
Expand Down Expand Up @@ -768,6 +773,8 @@ geojson
georegions
georeplication
geospatial
germanynorth
germanywestcentral
GETACLSTATUS
getactivationkey
getactivesessions
Expand Down Expand Up @@ -1215,6 +1222,7 @@ msixpackages
MSIXpackages
MSLISTSTATUS
MSMCAZR
msrp
MSTI
mucho
multiapi
Expand Down Expand Up @@ -1310,6 +1318,8 @@ Nonsupported
nopublicipaddresses
northcentralus
northeurope
norwayeast
norwaywest
nostore
notebookapis
notificationchannels
Expand Down Expand Up @@ -1841,6 +1851,8 @@ sorani
sortorder
soundex
sourcecontrols
southafricanorth
southafricawest
southcentralus
southeastasia
southindia
Expand Down Expand Up @@ -1956,7 +1968,10 @@ svpn
swappable
swappiness
Swappiness
swedensouth
switchprotection
switzerlandnorth
switzerlandwest
Sybase
Syncer
syncfunctiontriggers
Expand Down Expand Up @@ -2061,11 +2076,15 @@ typeahead
typedefs
Typeless
typeperf
uaecentral
uaenorth
uaesouth
udid
udids
UEBA
UEFI
Uint
uknorth
uksouth
ukwest
Ulaanbaatar
Expand Down
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
}
}
}
}
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
}
}
]
}
}
}
}
}
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"
}
]
}
}
}
}
Loading

0 comments on commit 93661ae

Please sign in to comment.