Skip to content

Commit 93661ae

Browse files
authored
Adding list reservations API to Microsoft.Capacity (#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
1 parent 57e4490 commit 93661ae

23 files changed

+4581
-1
lines changed

custom-words.txt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ atascada
148148
attestationcollateral
149149
audiodata
150150
Auditd
151+
australiacentral
151152
australiaeast
152153
australiasoutheast
153154
authenticatable
@@ -287,7 +288,9 @@ bot's
287288
botservice
288289
boundingbox
289290
boundingzoom
291+
brazileast
290292
brazilsouth
293+
brazilsoutheast
291294
BRCPF
292295
browsable
293296
bruceper
@@ -735,6 +738,8 @@ FPGA
735738
fqdn
736739
FQDNs
737740
Français
741+
francecentral
742+
francesouth
738743
freebsd
739744
freeflow
740745
frontdoor
@@ -768,6 +773,8 @@ geojson
768773
georegions
769774
georeplication
770775
geospatial
776+
germanynorth
777+
germanywestcentral
771778
GETACLSTATUS
772779
getactivationkey
773780
getactivesessions
@@ -1215,6 +1222,7 @@ msixpackages
12151222
MSIXpackages
12161223
MSLISTSTATUS
12171224
MSMCAZR
1225+
msrp
12181226
MSTI
12191227
mucho
12201228
multiapi
@@ -1310,6 +1318,8 @@ Nonsupported
13101318
nopublicipaddresses
13111319
northcentralus
13121320
northeurope
1321+
norwayeast
1322+
norwaywest
13131323
nostore
13141324
notebookapis
13151325
notificationchannels
@@ -1841,6 +1851,8 @@ sorani
18411851
sortorder
18421852
soundex
18431853
sourcecontrols
1854+
southafricanorth
1855+
southafricawest
18441856
southcentralus
18451857
southeastasia
18461858
southindia
@@ -1956,7 +1968,10 @@ svpn
19561968
swappable
19571969
swappiness
19581970
Swappiness
1971+
swedensouth
19591972
switchprotection
1973+
switzerlandnorth
1974+
switzerlandwest
19601975
Sybase
19611976
Syncer
19621977
syncfunctiontriggers
@@ -2061,11 +2076,15 @@ typeahead
20612076
typedefs
20622077
Typeless
20632078
typeperf
2079+
uaecentral
2080+
uaenorth
2081+
uaesouth
20642082
udid
20652083
udids
20662084
UEBA
20672085
UEFI
20682086
Uint
2087+
uknorth
20692088
uksouth
20702089
ukwest
20712090
Ulaanbaatar
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-07-01",
4+
"body": {
5+
"properties": {
6+
"reservationsToPurchase": [
7+
{
8+
"sku": {
9+
"name": "Standard_B1ls"
10+
},
11+
"location": "westus",
12+
"properties": {
13+
"reservedResourceType": "VirtualMachines",
14+
"billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
15+
"term": "P1Y",
16+
"billingPlan": "Upfront",
17+
"quantity": 1,
18+
"displayName": "testDisplayName",
19+
"appliedScopeType": "Shared",
20+
"appliedScopes": null,
21+
"renew": false,
22+
"reservedResourceProperties": {
23+
"instanceFlexibility": "On"
24+
}
25+
}
26+
}
27+
],
28+
"reservationsToExchange": [
29+
{
30+
"reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6",
31+
"quantity": 1
32+
}
33+
]
34+
}
35+
}
36+
},
37+
"responses": {
38+
"200": {
39+
"body": {
40+
"id": "/providers/microsoft.capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188",
41+
"name": "4e2ffff7-b331-4fcb-ab11-b5fa49368188",
42+
"status": "Succeeded",
43+
"properties": {
44+
"sessionId": "66e2ac8f-439e-4345-8235-6fef07608081",
45+
"netPayable": {
46+
"currencyCode": "USD",
47+
"amount": 15840.0
48+
},
49+
"refundsTotal": {
50+
"currencyCode": "USD",
51+
"amount": 3960.0
52+
},
53+
"purchasesTotal": {
54+
"currencyCode": "USD",
55+
"amount": 19800.0
56+
},
57+
"policyResult": {
58+
"policyErrors": null
59+
},
60+
"reservationsToPurchase": [
61+
{
62+
"properties": {
63+
"sku": {
64+
"name": "Standard_B1ls"
65+
},
66+
"location": "westus",
67+
"properties": {
68+
"reservedResourceType": "VirtualMachines",
69+
"billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
70+
"term": "P1Y",
71+
"billingPlan": "Upfront",
72+
"quantity": 1,
73+
"displayName": "testDisplayName",
74+
"appliedScopeType": "Shared",
75+
"appliedScopes": null,
76+
"renew": false,
77+
"reservedResourceProperties": {
78+
"instanceFlexibility": "On"
79+
}
80+
}
81+
},
82+
"billingCurrencyTotal": {
83+
"currencyCode": "USD",
84+
"amount": 19800.0
85+
}
86+
}
87+
],
88+
"reservationsToExchange": [
89+
{
90+
"reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6",
91+
"quantity": 1,
92+
"billingRefundAmount": {
93+
"currencyCode": "USD",
94+
"amount": 3960.0
95+
},
96+
"billingInformation": {
97+
"billingCurrencyTotalPaidAmount": {
98+
"currencyCode": "USD",
99+
"amount": 19800.0
100+
},
101+
"billingCurrencyProratedAmount": {
102+
"currencyCode": "USD",
103+
"amount": 15840.0
104+
},
105+
"billingCurrencyRemainingCommitmentAmount": {
106+
"currencyCode": "USD",
107+
"amount": 0.0
108+
}
109+
}
110+
}
111+
]
112+
}
113+
}
114+
},
115+
"202": {
116+
"headers": {
117+
"Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2021-07-01",
118+
"Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2021-07-01",
119+
"Retry-After": 5
120+
}
121+
}
122+
}
123+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-07-01",
4+
"body": {
5+
"sku": {
6+
"name": "standard_D1"
7+
},
8+
"location": "westus",
9+
"properties": {
10+
"reservedResourceType": "VirtualMachines",
11+
"billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
12+
"term": "P1Y",
13+
"billingPlan": "Monthly",
14+
"quantity": 1,
15+
"displayName": "TestReservationOrder",
16+
"appliedScopes": null,
17+
"appliedScopeType": "Shared",
18+
"reservedResourceProperties": {
19+
"instanceFlexibility": "On"
20+
}
21+
}
22+
}
23+
},
24+
"responses": {
25+
"200": {
26+
"body": {
27+
"properties": {
28+
"billingCurrencyTotal": {
29+
"currencyCode": "USD",
30+
"amount": 46.0
31+
},
32+
"reservationOrderId": "6d9cec54-7de8-abcd-9de7-80f5d634f2d2",
33+
"skuTitle": "Reserved VM Instance, Standard_D1, US West, 1 Year",
34+
"skuDescription": "standard_D1",
35+
"pricingCurrencyTotal": {
36+
"currencyCode": "USD",
37+
"amount": 46.0
38+
},
39+
"paymentSchedule": [
40+
{
41+
"dueDate": "2019-05-14",
42+
"pricingCurrencyTotal": {
43+
"currencyCode": "USD",
44+
"amount": 46
45+
},
46+
"billingCurrencyTotal": {
47+
"currencyCode": "EUR",
48+
"amount": 40
49+
}
50+
},
51+
{
52+
"dueDate": "2019-06-14",
53+
"pricingCurrencyTotal": {
54+
"currencyCode": "USD",
55+
"amount": 46
56+
}
57+
},
58+
{
59+
"dueDate": "2019-07-14",
60+
"pricingCurrencyTotal": {
61+
"currencyCode": "USD",
62+
"amount": 46
63+
}
64+
}
65+
]
66+
}
67+
}
68+
}
69+
}
70+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
{
2+
"parameters": {
3+
"api-version": "2021-07-01",
4+
"reservationOrderId": "a075419f-44cc-497f-b68a-14ee811d48b9",
5+
"body": {
6+
"destinationTenantId": "906655ea-30be-4587-9d12-b50e077b0f32"
7+
}
8+
},
9+
"responses": {
10+
"200": {
11+
"body": {
12+
"reservationOrder": {
13+
"id": "a075419f-44cc-497f-b68a-14ee811d48b9",
14+
"name": "VM_RI_10-02-2020_15-21",
15+
"isSucceeded": true,
16+
"error": "error string"
17+
},
18+
"reservations": [
19+
{
20+
"id": "1f14354c-dc12-4c8d-8090-6f295a3a34aa",
21+
"name": "VM_RI_10-02-2020_15-21",
22+
"isSucceeded": true,
23+
"error": "error string"
24+
}
25+
]
26+
}
27+
}
28+
}
29+
}

0 commit comments

Comments
 (0)