Skip to content

Commit 3f36931

Browse files
gaoyp830chchen3
andauthored
Dev reservations microsoft.capacity 2022 11 01 (#21565)
* Adds base for updating Microsoft.Capacity from version stable/2022-03-01 to version 2022-11-01 * Updates readme * Updates API version in new specs and examples * 2022-02-16-privatepreview CalculateExchange and Exchange, 2022-06-02-privatepreview Reservation properties change * Add appliedScopeProperties to purchase and patch request. Add reviewDateTime to purchase patch request and get response for reservationOrder * Add reviewDateTime to Reservation Response * Update operationId to clean up doc heirarchy * Modified examples to address property changes. Added back quota.json. Add readonly to property definitions * Add 202 headers for Split, Merge, Patch. Add back AppliedScopes in reservation response to match request. * Add nextlink and totaItems, filter, skip, take to GetCatalogs * Fix lint error * Add back publisherId, offerId, planId for GetCatalog API * Revert "Update operationId to clean up doc heirarchy" This reverts commit 31826f8. * Add back expiryDate and purchaseDate Add back expiryDate and purchaseDate for backward compatibility * Revert string to enum change * Remove readOnly for existing definition to fix breaking change * change expand to $expand * Address comments from ARMReview * Revert "Address comments from ARMReview" This reverts commit cdeda23. * Address comments for arm review * Added x-ms-pageable for catalog api * Fix spellcheck unknown words * address comments and legacy lint errors and warnings * add location for return. address some lint warnings. use proxyResource * address legacy lint error and warnings * Add descriptions for objects and fix typo * fix spell error and missing description * Fix comment * Add back long running operations true to available scopes * Add more description for appliedScopeProperties Co-authored-by: chchen3 <[email protected]>
1 parent 0fa6101 commit 3f36931

25 files changed

+5741
-2
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-11-01",
4+
"reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da",
5+
"reservationId": "356e7ae4-84d0-4da6-ab4b-d6b94f3557da"
6+
},
7+
"responses": {
8+
"200": {}
9+
}
10+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-11-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+
"savingsPlansToPurchase": [
29+
{
30+
"sku": {
31+
"name": "Compute_Savings_Plan"
32+
},
33+
"properties": {
34+
"displayName": "ComputeSavingsPlan",
35+
"billingScopeId": "/subscriptions/10000000-0000-0000-0000-000000000000",
36+
"term": "P1Y",
37+
"appliedScopeType": "Single",
38+
"appliedScopeProperties": {
39+
"resourceGroupId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/testrg"
40+
},
41+
"commitment": {
42+
"currencyCode": "USD",
43+
"amount": 15.23,
44+
"grain": "Hourly"
45+
}
46+
}
47+
}
48+
],
49+
"reservationsToExchange": [
50+
{
51+
"reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6",
52+
"quantity": 1
53+
}
54+
]
55+
}
56+
}
57+
},
58+
"responses": {
59+
"200": {
60+
"body": {
61+
"id": "/providers/microsoft.capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188",
62+
"name": "4e2ffff7-b331-4fcb-ab11-b5fa49368188",
63+
"status": "Succeeded",
64+
"properties": {
65+
"sessionId": "66e2ac8f-439e-4345-8235-6fef07608081",
66+
"netPayable": {
67+
"currencyCode": "USD",
68+
"amount": 149254.8
69+
},
70+
"refundsTotal": {
71+
"currencyCode": "USD",
72+
"amount": 3960.0
73+
},
74+
"purchasesTotal": {
75+
"currencyCode": "USD",
76+
"amount": 153214.8
77+
},
78+
"policyResult": {
79+
"policyErrors": null
80+
},
81+
"reservationsToPurchase": [
82+
{
83+
"properties": {
84+
"sku": {
85+
"name": "Standard_B1ls"
86+
},
87+
"location": "westus",
88+
"properties": {
89+
"reservedResourceType": "VirtualMachines",
90+
"billingScopeId": "/subscriptions/ed3a1871-612d-abcd-a849-c2542a68be83",
91+
"term": "P1Y",
92+
"billingPlan": "Upfront",
93+
"quantity": 1,
94+
"displayName": "testDisplayName",
95+
"appliedScopeType": "Shared",
96+
"renew": false,
97+
"reservedResourceProperties": {
98+
"instanceFlexibility": "On"
99+
}
100+
}
101+
},
102+
"billingCurrencyTotal": {
103+
"currencyCode": "USD",
104+
"amount": 19800.0
105+
}
106+
}
107+
],
108+
"savingsPlansToPurchase": [
109+
{
110+
"properties": {
111+
"sku": {
112+
"name": "Compute_Savings_Plan"
113+
},
114+
"properties": {
115+
"displayName": "ComputeSavingsPlan",
116+
"billingScopeId": "/subscriptions/10000000-0000-0000-0000-000000000000",
117+
"term": "P1Y",
118+
"appliedScopeType": "Single",
119+
"appliedScopeProperties": {
120+
"resourceGroupId": "/subscriptions/10000000-0000-0000-0000-000000000000/resourceGroups/testrg"
121+
},
122+
"commitment": {
123+
"currencyCode": "USD",
124+
"amount": 15.23,
125+
"grain": "Hourly"
126+
}
127+
}
128+
},
129+
"billingCurrencyTotal": {
130+
"currencyCode": "USD",
131+
"amount": 133414.8
132+
}
133+
}
134+
],
135+
"reservationsToExchange": [
136+
{
137+
"reservationId": "/providers/microsoft.capacity/reservationOrders/1f14354c-dc12-4c8d-8090-6f295a3a34aa/reservations/c8c926bd-fc5d-4e29-9d43-b68340ac23a6",
138+
"quantity": 1,
139+
"billingRefundAmount": {
140+
"currencyCode": "USD",
141+
"amount": 3960.0
142+
},
143+
"billingInformation": {
144+
"billingCurrencyTotalPaidAmount": {
145+
"currencyCode": "USD",
146+
"amount": 153214.8
147+
},
148+
"billingCurrencyProratedAmount": {
149+
"currencyCode": "USD",
150+
"amount": 149254.8
151+
},
152+
"billingCurrencyRemainingCommitmentAmount": {
153+
"currencyCode": "USD",
154+
"amount": 0.0
155+
}
156+
}
157+
}
158+
]
159+
}
160+
}
161+
},
162+
"202": {
163+
"headers": {
164+
"Azure-AsyncOperation": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-11-01",
165+
"Location": "https://management.azure.com/Microsoft.Capacity/operationResults/4e2ffff7-b331-4fcb-ab11-b5fa49368188?api-version=2022-11-01",
166+
"Retry-After": 5
167+
}
168+
}
169+
}
170+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-11-01",
4+
"reservationOrderId": "276e7ae4-84d0-4da6-ab4b-d6b94f3557da",
5+
"body": {
6+
"id": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004",
7+
"properties": {
8+
"scope": "Reservation",
9+
"reservationToReturn": {
10+
"reservationId": "/providers/microsoft.capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000",
11+
"quantity": 1
12+
}
13+
}
14+
}
15+
},
16+
"responses": {
17+
"200": {
18+
"body": {
19+
"id": "/providers/Microsoft.Capacity/reservationOrders/50000000-aaaa-bbbb-cccc-100000000004/reservations/40000000-aaaa-bbbb-cccc-100000000000",
20+
"properties": {
21+
"sessionId": "10000000-aaaa-bbbb-cccc-200000000000",
22+
"quantity": 1,
23+
"billingRefundAmount": {
24+
"currencyCode": "GBP",
25+
"amount": 20.72
26+
},
27+
"pricingRefundAmount": {
28+
"currencyCode": "USD",
29+
"amount": 24.92
30+
},
31+
"policyResult": {
32+
"properties": {
33+
"consumedRefundsTotal": {
34+
"currencyCode": "USD",
35+
"amount": 83.69
36+
},
37+
"maxRefundLimit": {
38+
"currencyCode": "USD",
39+
"amount": 50000.0
40+
},
41+
"policyErrors": [
42+
{
43+
"code": "SelfServiceRefundNotSupported",
44+
"message": "Self Service refunds are currently not supported for this resource, please contact support."
45+
}
46+
]
47+
}
48+
},
49+
"billingInformation": {
50+
"billingPlan": "Upfront",
51+
"completedTransactions": 1,
52+
"totalTransactions": 1,
53+
"billingCurrencyTotalPaidAmount": {
54+
"currencyCode": "GBP",
55+
"amount": 24.0
56+
},
57+
"billingCurrencyProratedAmount": {
58+
"currencyCode": "GBP",
59+
"amount": 3.28
60+
},
61+
"billingCurrencyRemainingCommitmentAmount": {
62+
"currencyCode": "GBP",
63+
"amount": 0.0
64+
}
65+
}
66+
}
67+
}
68+
}
69+
}
70+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
{
2+
"parameters": {
3+
"api-version": "2022-11-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": "2022-11-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)