Skip to content
Merged
Show file tree
Hide file tree
Changes from 45 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
909083c
adding 2026-02-preview version
pranatiy0701 Feb 10, 2026
9134ebb
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 Feb 10, 2026
54d3924
resolving model validation issues
pranatiy0701 Feb 10, 2026
e68c2d1
Merge branch 'advisor-2026-02-preview' of https://github.com/pranatiy…
pranatiy0701 Feb 10, 2026
a565489
prettier and typespec validation errors
pranatiy0701 Feb 10, 2026
d9f3190
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 Feb 10, 2026
93f0280
readme error resolved
pranatiy0701 Feb 10, 2026
3bedc95
Merge branch 'advisor-2026-02-preview' of https://github.com/pranatiy…
pranatiy0701 Feb 10, 2026
5144b86
tsp validation issues
pranatiy0701 Feb 10, 2026
c513285
reverting changes in package-lock
pranatiy0701 Feb 10, 2026
1295959
updating patch api
pranatiy0701 Feb 10, 2026
726aad0
Merge branch 'advisor-2026-02-preview' of https://github.com/pranatiy…
pranatiy0701 Feb 10, 2026
34ae444
update
pranatiy0701 Feb 10, 2026
9c6b7ac
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 Feb 10, 2026
7681be2
correcting example
pranatiy0701 Feb 10, 2026
ca3643a
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 Feb 11, 2026
5d34649
updating example
pranatiy0701 Feb 11, 2026
1139d5e
Merge branch 'advisor-2026-02-preview' of https://github.com/pranatiy…
pranatiy0701 Feb 11, 2026
93ad35f
tsp validation errors
pranatiy0701 Feb 11, 2026
bdee03c
fix for linting error
pranatiy0701 Feb 11, 2026
14ac30b
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 Feb 11, 2026
ca0faae
updating examples
pranatiy0701 Feb 11, 2026
6521b37
Merge branch 'advisor-2026-02-preview' of https://github.com/pranatiy…
pranatiy0701 Feb 11, 2026
44ba84a
updating examples
pranatiy0701 Feb 12, 2026
eff5027
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 Feb 12, 2026
36cd838
updating descriptions
pranatiy0701 Mar 3, 2026
f63b8a1
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 Mar 3, 2026
428c1e4
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 Mar 4, 2026
cd06d6e
tsp validation fix
pranatiy0701 Mar 4, 2026
e1ce69c
updating state to status and recommendation status
pranatiy0701 May 9, 2026
e459573
updating examples
pranatiy0701 May 9, 2026
831784f
updating patch response model
pranatiy0701 May 9, 2026
e5465db
updating arm operation
pranatiy0701 May 9, 2026
cf34ec8
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 May 9, 2026
358c823
Testing original spec that was passing earlier after merge from main …
pranatiy0701 May 9, 2026
d5c41df
Merge branch 'advisor-2026-02-preview' of https://github.com/pranatiy…
pranatiy0701 May 9, 2026
4f2b52e
Simplify RecommendationsPatchPayload response model
pranatiy0701 May 9, 2026
2fc15d8
updating the patch api
pranatiy0701 May 11, 2026
965b116
changing patch to arm custom patch for extensions
pranatiy0701 May 11, 2026
e49ec4f
updating state to recommendation status
pranatiy0701 May 11, 2026
0165326
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 May 11, 2026
48a26d8
updating examples
pranatiy0701 May 11, 2026
bf030d1
updating properties for patch
pranatiy0701 May 11, 2026
f13fe84
removing sharedRoute
pranatiy0701 May 11, 2026
dc3c427
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 May 12, 2026
a1af4d4
adding createdTime
pranatiy0701 May 13, 2026
d0a5fcd
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 May 13, 2026
847e762
updating operation id for patch api and example
pranatiy0701 May 13, 2026
92e931c
Merge branch 'advisor-2026-02-preview' of https://github.com/pranatiy…
pranatiy0701 May 13, 2026
39ca327
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 May 13, 2026
b630f2e
Merge branch 'advisor-2026-02-preview' of https://github.com/pranatiy…
pranatiy0701 May 13, 2026
a321aed
Updating recommendationStatus
pranatiy0701 May 13, 2026
d3b0cb8
updating back-compatible
pranatiy0701 May 13, 2026
38ff868
Merge branch 'main' into advisor-2026-02-preview
pranatiy0701 May 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import "./models.tsp";

using Azure.ResourceManager;
using TypeSpec.Http;
using TypeSpec.Versioning;

namespace Microsoft.Advisor;
/**
Expand Down Expand Up @@ -38,6 +39,8 @@ interface ResourceRecommendationBases {
* Update the tracked properties of a Recommendation.
*/
#suppress "@azure-tools/typespec-azure-core/response-schema-problem" "FIXME: Update justification, follow aka.ms/tsp/conversion-fix for details"
@added(Versions.v2025_05_01_preview)
@removed(Versions.v2026_02_01_preview)
@patch(#{ implicitOptionality: false })
patch is ArmCustomPatchSync<
ResourceRecommendationBase,
Expand All @@ -46,6 +49,15 @@ interface ResourceRecommendationBases {
Error = ArmDefaultErrorResponse
>;

/** Update the state of a Recommendation */
@added(Versions.v2026_02_01_preview)
@patch(#{ implicitOptionality: false })
update is Extension.CustomPatchSync<
Extension.Subscription,
ResourceRecommendationBase,
RecommendationPatchPayload
>;

/**
* Obtains cached recommendations for a subscription. The recommendations are generated or computed by invoking generateRecommendations.
*/
Expand All @@ -55,7 +67,11 @@ interface ResourceRecommendationBases {
BaseParameters = Azure.ResourceManager.Foundations.SubscriptionBaseParameters,
Parameters = {
/**
* The filter to apply to the recommendations.<br>Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)'] with operators ['eq', 'and', 'or'].<br>Example:<br>- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup'
* The filter to apply to the recommendations.<br>Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', '[Category](#category)', 'SubCategory', 'RetirementDate', '[Status](#recommendationStatus)'] with operators ['eq', 'and', 'or', 'lt', 'gt', 'le', 'ge']<br>.
* <br>**Note:** `Control` is a legacy filter property and will be deprecated in the future. Please use `SubCategory` for filtering recommendation subcategory.<br>
* <br>**Note:** `Status` filter is available from API Version 2026-02-01-preview and onwards.<br>
* <br>Valid options for SubCategory:<br>['BusinessContinuity', 'DisasterRecovery', 'HighAvailability', 'MonitoringAndAlerting', 'Other', 'Personalized', 'PrioritizedRecommendations', 'Scalability', 'ServiceUpgradeAndRetirement', 'Validation']<br>
* <br>Example:<br>- $filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup'<br>-$filter=SubCategory eq 'ServiceUpgradeAndRetirement' and RetirementDate le '2024-01-01' and RetirementDate ge '2028-01-01'
*/
@query("$filter")
$filter?: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"parameters": {
"subscriptionId": "58c3f667-7a62-4bfd-a658-846493e9a493",
"resourceGroup": "resourceGroup",
"configurationName": "default",
"configContract": {
"properties": {
"lowCpuThreshold": "5",
"duration": "7",
"exclude": true,
"digests": [
{
"name": "digestConfigName",
"actionGroupResourceId": "/subscriptions/58c3f667-7a62-4bfd-a658-846493e9a493/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName",
"frequency": 30,
"categories": [
"HighAvailability",
"Security",
"Performance",
"Cost",
"OperationalExcellence"
],
"language": "en",
"state": "Active"
}
]
}
},
"api-version": "2026-02-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/58c3f667-7a62-4bfd-a658-846493e9a493/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/default",
"type": "Microsoft.Advisor/configurations",
"name": "default",
"properties": {
"lowCpuThreshold": "5",
"duration": "7",
"exclude": true,
"digests": [
{
"name": "digestConfigName",
"actionGroupResourceId": "/subscriptions/58c3f667-7a62-4bfd-a658-846493e9a493/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName",
"frequency": 30,
"categories": [
"HighAvailability",
"Security",
"Performance",
"Cost",
"OperationalExcellence"
],
"language": "en",
"state": "Active"
}
]
}
}
}
},
"operationId": "Configurations_CreateInResourceGroup",
"title": "PutConfigurations"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"parameters": {
"subscriptionId": "58c3f667-7a62-4bfd-a658-846493e9a493",
"resourceGroup": "resourceGroup",
"configurationName": "default",
"configContract": {
"properties": {
"lowCpuThreshold": "5",
"duration": "7",
"exclude": true,
"digests": [
{
"name": "digestConfigName",
"actionGroupResourceId": "/subscriptions/58c3f667-7a62-4bfd-a658-846493e9a493/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName",
"frequency": 30,
"categories": [
"HighAvailability",
"Security",
"Performance",
"Cost",
"OperationalExcellence"
],
"language": "en",
"state": "Active"
}
]
}
},
"api-version": "2026-02-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/58c3f667-7a62-4bfd-a658-846493e9a493/resourceGroups/resourceGroup/providers/Microsoft.Advisor/configurations/default",
"type": "Microsoft.Advisor/configurations",
"name": "default",
"properties": {
"lowCpuThreshold": "5",
"duration": "7",
"exclude": true,
"digests": [
{
"name": "digestConfigName",
"actionGroupResourceId": "/subscriptions/58c3f667-7a62-4bfd-a658-846493e9a493/resourceGroups/resourceGroup/providers/microsoft.insights/actionGroups/actionGroupName",
"frequency": 30,
"categories": [
"HighAvailability",
"Security",
"Performance",
"Cost",
"OperationalExcellence"
],
"language": "en",
"state": "Active"
}
]
}
}
}
},
"operationId": "Configurations_CreateInSubscription",
"title": "PutConfigurations"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"parameters": {
"resourceUri": "resourceUri",
"recommendationId": "2e7c72b2d7987ec224a1ebae03398b0fbdaa9a5a6a762e6fcf1c806599744b36",
"name": "2e7c72b2d7987ec224a1ebae03398b0fbdaa9a5a6a762e6fcf1c806599744b45",
"suppressionContract": {
"properties": {
"ttl": "07:00:00:00"
}
},
"api-version": "2026-02-01-preview"
},
"responses": {
"200": {
"body": {
"id": "/subscriptions/a5481ee1-95df-47d0-85d4-dd3f0dfa19bc/resourceGroups/resourceGroup/providers/Microsoft.Compute/availabilitysets/armavset/providers/Microsoft.Advisor/recommendations/2e7c72b2d7987ec224a1ebae03398b0fbdaa9a5a6a762e6fcf1c806599744b36/suppressions/HardcodedSuppressionName",
"name": "HardcodedSuppressionName",
"type": "Microsoft.Advisor/suppressions",
"properties": {
"suppressionId": "2e7c72b2d7987ec224a1ebae03398b0fbdaa9a5a6a762e6fcf1c806599744b45",
"ttl": "07:00:00:00"
}
}
},
"404": {
"body": {
"error": {
"code": "NotFound",
"message": "Recommendation to be suppressed is not found. Subscription Id:{0} Recommendation Id:{1}"
}
}
}
},
"operationId": "Suppressions_Create",
"title": "CreateSuppression"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"api-version": "2026-02-01-preview",
"assessmentName": "assessment1",
"subscriptionId": "00000000-1111-2222-3333-444444444444"
},
"responses": {
"200": {},
"204": {
"description": "The Assessment is not found or has been deleted already."
}
},
"operationId": "Assessments_Delete",
"title": "DeleteAssessment"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"name": "HardcodedSuppressionName",
"api-version": "2026-02-01-preview",
"recommendationId": "recommendationId",
"resourceUri": "resourceUri"
},
"responses": {
"204": {}
},
"operationId": "Suppressions_Delete",
"title": "DeleteSuppression"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"operationId": "123e4567-e89b-12d3-a456-426614174000",
"api-version": "2026-02-01-preview",
"subscriptionId": "12345678-1234-1234-1234-123456789012"
},
"responses": {
"202": {},
"204": {}
},
"operationId": "Recommendations_GetGenerateStatus",
"title": "GetGenerateStatus"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"api-version": "2026-02-01-preview",
"subscriptionId": "12345678-1234-1234-1234-123456789012"
},
"responses": {
"202": {
"headers": {
"Location": "https://management.azure.com/subscriptions/subscriptionId/providers/Microsoft.Microsoft.Advisor/generateRecommendations/recGUID?api-version=2026-02-01-preview",
"Retry-After": "60"
}
}
},
"operationId": "Recommendations_Generate",
"title": "GenerateRecommendations"
}
Loading