Skip to content

Commit e15a9e5

Browse files
author
Madhumitha Raveendar (from Dev Box)
committed
Add projectedUsage field and PrePurchasePlan example for ReservationRecommendationDetails
1 parent dbde66c commit e15a9e5

5 files changed

Lines changed: 112 additions & 3 deletions

File tree

specification/consumption/resource-manager/Microsoft.Consumption/Consumption/models.tsp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1449,6 +1449,13 @@ model ReservationRecommendationDetailsProperties {
14491449
@added(Versions.v2026_06_01)
14501450
@visibility(Lifecycle.Read)
14511451
tenantId?: string;
1452+
1453+
/**
1454+
* Projected usage details used for generating the recommendation.
1455+
*/
1456+
@added(Versions.v2026_06_01)
1457+
@visibility(Lifecycle.Read)
1458+
projectedUsage?: ReservationRecommendationDetailsProjectedUsage;
14521459
}
14531460

14541461
/**
@@ -1614,6 +1621,19 @@ model ReservationRecommendationDetailsUsageProperties {
16141621
usageGrain?: string;
16151622
}
16161623

1624+
/**
1625+
* Details about projected usage data that has been used for computing the recommendation.
1626+
*/
1627+
@added(Versions.v2026_06_01)
1628+
model ReservationRecommendationDetailsProjectedUsage {
1629+
/**
1630+
* Total projected retail usage in commitment units (CUs).
1631+
*/
1632+
#suppress "@azure-tools/typespec-azure-core/casing-style" "CUs is an accepted abbreviation for Commitment Units"
1633+
@visibility(Lifecycle.Read)
1634+
totalRetailUsageInCUs?: float32;
1635+
}
1636+
16171637
/**
16181638
* Error response indicates that the service is not able to process the incoming request. The reason is provided in the error message.
16191639
*

specification/consumption/resource-manager/Microsoft.Consumption/Consumption/stable/2026-06-01/examples/ReservationRecommendationDetailsByManagementGroup.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"properties": {
1818
"currency": "USD",
1919
"managementGroupId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000",
20-
"tenantId": "00000000-0000-0000-0000-000000000000",
2120
"resource": {
2221
"appliedScopes": [
2322
"00000000-0000-0000-0000-000000000000"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
{
2+
"parameters": {
3+
"api-version": "2026-06-01",
4+
"lookBackPeriod": "Last30Days",
5+
"product": "Standard_DS13_v2",
6+
"region": "westus",
7+
"resourceScope": "subscriptions/00000000-0000-0000-0000-000000000000",
8+
"scope": "Single",
9+
"term": "P3Y"
10+
},
11+
"responses": {
12+
"200": {
13+
"body": {
14+
"name": "reservationRecommendationDetails",
15+
"type": "Microsoft.Consumption/ReservationRecommendationDetails",
16+
"id": "subscriptions/00000000-0000-0000-0000-000000000000/providers/microsoft.consumption/reservationrecommendationdetails",
17+
"properties": {
18+
"currency": "USD",
19+
"resource": {
20+
"appliedScopes": [
21+
"00000000-0000-0000-0000-000000000000"
22+
],
23+
"onDemandRate": 0.519,
24+
"product": "Standard_DS13_v2",
25+
"region": "westus",
26+
"reservationRate": 0.302549467275493,
27+
"resourceType": "virtualmachines"
28+
},
29+
"resourceGroup": null,
30+
"savings": {
31+
"calculatedSavings": [
32+
{
33+
"onDemandCost": 368.4813602070006,
34+
"overageCost": 0,
35+
"quantity": 2,
36+
"reservationCost": 429.01514459665,
37+
"savings": -60.5337843896494,
38+
"totalReservationCost": 429.01514459665
39+
},
40+
{
41+
"onDemandCost": 368.481360207,
42+
"overageCost": 1.557,
43+
"quantity": 1,
44+
"reservationCost": 214.507572298325,
45+
"savings": 152.416787908675,
46+
"totalReservationCost": 216.064572298325
47+
}
48+
],
49+
"lookBackPeriod": 30,
50+
"recommendedQuantity": 1,
51+
"reservationOrderTerm": "P3Y",
52+
"savingsType": "instance",
53+
"unitOfMeasure": "hour"
54+
},
55+
"scope": "Single",
56+
"usage": {
57+
"firstConsumptionDate": "2026-02-03T00:00:00",
58+
"lastConsumptionDate": "2026-03-03T13:00:00",
59+
"lookBackUnitType": "virtualMachine quantity",
60+
"usageData": [
61+
340
62+
],
63+
"usageGrain": "lookbackPeriod"
64+
},
65+
"projectedUsage": {
66+
"totalRetailUsageInCUs": 350
67+
}
68+
}
69+
}
70+
},
71+
"204": {}
72+
},
73+
"operationId": "ReservationRecommendationDetails_Get",
74+
"title": "ReservationRecommendationDetailsPrePurchasePlanBySubscription"
75+
}

specification/consumption/resource-manager/Microsoft.Consumption/Consumption/stable/2026-06-01/examples/ReservationRecommendationsByManagementGroup.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"lastUsageDate": "2026-03-10T00:00:00Z",
2121
"lookBackPeriod": "Last7Days",
2222
"managementGroupId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000",
23-
"tenantId": "00000000-0000-0000-0000-000000000000",
2423
"meterId": "00000000-0000-0000-0000-000000000000",
2524
"netSavings": 4.634521202630137,
2625
"recommendedQuantity": 1,
@@ -46,7 +45,6 @@
4645
"lastUsageDate": "2026-03-15T00:00:00Z",
4746
"lookBackPeriod": 7,
4847
"managementGroupId": "/providers/Microsoft.Management/managementGroups/00000000-0000-0000-0000-000000000000",
49-
"tenantId": "00000000-0000-0000-0000-000000000000",
5048
"meterId": "00000000-0000-0000-0000-000000000000",
5149
"netSavings": {
5250
"currency": "USD",

specification/consumption/resource-manager/Microsoft.Consumption/Consumption/stable/2026-06-01/openapi.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6075,6 +6075,18 @@
60756075
}
60766076
]
60776077
},
6078+
"ReservationRecommendationDetailsProjectedUsage": {
6079+
"type": "object",
6080+
"description": "Details about projected usage data that has been used for computing the recommendation.",
6081+
"properties": {
6082+
"totalRetailUsageInCUs": {
6083+
"type": "number",
6084+
"format": "float",
6085+
"description": "Total projected retail usage in commitment units (CUs).",
6086+
"readOnly": true
6087+
}
6088+
}
6089+
},
60786090
"ReservationRecommendationDetailsProperties": {
60796091
"type": "object",
60806092
"description": "The properties of the reservation recommendation.",
@@ -6118,6 +6130,11 @@
61186130
"type": "string",
61196131
"description": "The tenant ID associated with the management group. Populated only when managementGroupId is populated.",
61206132
"readOnly": true
6133+
},
6134+
"projectedUsage": {
6135+
"$ref": "#/definitions/ReservationRecommendationDetailsProjectedUsage",
6136+
"description": "Projected usage details used for generating the recommendation.",
6137+
"readOnly": true
61216138
}
61226139
}
61236140
},

0 commit comments

Comments
 (0)