Recommendations - Patch
Update the tracked properties of a Recommendation.
PATCH https://management.azure.com/{resourceUri}/providers/Microsoft.Advisor/recommendations/{recommendationId}?api-version=2025-05-01-preview
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
recommendation
|
path | True |
string |
The RecommendationId ID. |
resource
|
path | True |
string |
The fully qualified Azure Resource Manager identifier of the resource to which the tracked recommendation applies. |
api-version
|
query | True |
string |
The version of the API to be used with the client request. |
Request Body
Name | Type | Description |
---|---|---|
properties |
Responses
Name | Type | Description |
---|---|---|
200 OK |
OK. Successfully updated recommendation status. |
|
Other Status Codes |
Error response describing why the operation failed. |
Security
azure_auth
Azure Active Directory OAuth2 Flow.
Type:
oauth2
Flow:
implicit
Authorization URL:
https://login.microsoftonline.com/common/oauth2/authorize
Scopes
Name | Description |
---|---|
user_impersonation | impersonate your user account |
Examples
UpdateTrackedRecommendation
Sample request
PATCH https://management.azure.com/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/xyz/providers/Microsoft.Advisor/recommendations/c5532a76-8605-4328-ad27-f37ae87c086c?api-version=2025-05-01-preview
{
"properties": {
"trackedProperties": {
"state": "Postponed",
"postponedTime": "2023-10-01T00:00:00Z"
}
}
}
Sample response
{
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/xyz/providers/Microsoft.Advisor/recommendations/c5532a76-8605-4328-ad27-f37ae87c086c",
"name": "c5532a76-8605-4328-ad27-f37ae87c086c",
"type": "Microsoft.Advisor/recommendations",
"properties": {
"category": "Security",
"impact": "Medium",
"impactedField": "Microsoft.Compute/virtualMachines",
"impactedValue": "armavset",
"lastUpdated": "2017-02-24T22:24:43.3216408Z",
"risk": "Warning",
"shortDescription": {
"problem": "Monitoring agent should be installed on your machines",
"solution": "Monitoring agent should be installed on your machines"
},
"remediation": {
"additionalProperties": {
"httpMethod": "POST",
"uri": "uri",
"details": "link to document"
}
},
"resourceMetadata": {
"resourceId": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/xyz",
"source": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/xyz/providers/Microsoft.Security/assessments/7d5f6ba5-307e-452e-b3c4-7d636f722055",
"action": {
"additionalProperties": {
"actionType": "Document",
"link": "https://link3",
"caption": "Enable Soft Delete to protect blob data",
"description": "Enable Soft Delete to protect blob data"
},
"metadata": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444/resourceGroups/resourceGroupName/providers/Microsoft.Compute/virtualMachines/xyz"
}
},
"singular": "Virtual machine",
"plural": "Virtual machines"
},
"actions": [
{
"additionalProperties": {
"actionType": "Document",
"link": "https://link1",
"caption": "Enable Soft Delete to protect blob data",
"description": "Enable Soft Delete to protect blob data"
},
"metadata": {
"id": "/subscriptions/00000000-1111-2222-3333-444444444444"
}
}
],
"description": "After enabling Soft Delete, deleted data transitions to a soft deleted state instead of being permanently deleted. When data is overwritten, a soft deleted snapshot is generated to save the state of the overwritten data. You can configure the amount of time soft deleted data is recoverable before it permanently expires.",
"label": "Enable Soft Delete",
"learnMoreLink": "https://link2",
"potentialBenefits": "Save and recover your data when blobs or blob snapshots are accidentally overwritten or deleted",
"tracked": true,
"trackedProperties": {
"state": "Postponed",
"postponedTime": "2023-10-01T00:00:00Z",
"priority": "High"
},
"resourceWorkload": {
"id": "0560dbdb-f207-4690-b4ba-1fc0c3a0f082",
"name": "Critical VM Workload"
},
"review": {
"id": "/subscriptions/a5481ee1-95df-47d0-85d4-dd3f0dfa19bc/providers/Microsoft.Advisor/assessments/MCWAR1",
"name": "Monthly WAF Review 09/23"
},
"sourceSystem": "CxObserve",
"notes": "This is a note"
}
}
Definitions
Name | Description |
---|---|
aggregated |
The aggregation level of the score. |
Arm |
|
ARMError |
ARM error response body. |
category |
The category of the recommendation. |
control |
The sub-category of the recommendation. |
created |
The type of identity that created the resource. |
impact |
The business impact of the recommendation. |
priority |
The Priority of the Recommendation. |
Properties |
The Advisor score data. |
reason |
The reason the state of the Recommendation was changed. |
Resource |
Recommendation resource metadata |
Resource |
Advisor Recommendation. |
Resource |
The Workload that this Resource belongs to. |
Review |
The Review that this Recommendation belongs to. |
risk |
The potential risk of not implementing the recommendation. |
score |
The details of Advisor Score |
Short |
A summary of the recommendation. |
state |
The state of the Recommendation |
system |
Metadata pertaining to creation and last modification of the resource. |
time |
The historic data at different aggregation levels. |
Tracked |
The tracked properties of a Recommendation |
Tracked |
aggregated
The aggregation level of the score.
Value | Description |
---|---|
week | |
day | |
month |
ArmErrorResponse
Name | Type | Description |
---|---|---|
error |
ARM error response body. |
ARMErrorResponseBody
ARM error response body.
Name | Type | Description |
---|---|---|
code |
string |
Gets or sets the string that can be used to programmatically identify the error. |
message |
string |
Gets or sets the string that describes the error in detail and provides debugging information. |
category
The category of the recommendation.
Value | Description |
---|---|
HighAvailability | |
Security | |
Performance | |
Cost | |
OperationalExcellence |
control
The sub-category of the recommendation.
Value | Description |
---|---|
HighAvailability | |
BusinessContinuity | |
DisasterRecovery | |
Scalability | |
MonitoringAndAlerting | |
ServiceUpgradeAndRetirement | |
Other | |
PrioritizedRecommendations | |
Personalized |
createdByType
The type of identity that created the resource.
Value | Description |
---|---|
User | |
Application | |
ManagedIdentity | |
Key |
impact
The business impact of the recommendation.
Value | Description |
---|---|
High | |
Medium | |
Low |
priority
The Priority of the Recommendation.
Value | Description |
---|---|
Critical | |
High | |
Medium | |
Low | |
Informational |
Properties
The Advisor score data.
Name | Type | Description |
---|---|---|
lastRefreshedScore |
The details of latest available score. |
|
timeSeries |
The historic Advisor score data. |
reason
The reason the state of the Recommendation was changed.
Value | Description |
---|---|
ExcessiveInvestment | |
TooComplex | |
AlternativeSolution | |
Incompatible | |
Unclear | |
RiskAccepted |
ResourceMetadata
Recommendation resource metadata
Name | Type | Description |
---|---|---|
action |
object |
The action to view resource. |
plural |
string |
The plural user friendly name of resource type. eg: virtual machines |
resourceId |
string |
Azure resource Id of the assessed resource |
singular |
string |
The singular user friendly name of resource type. eg: virtual machine |
source |
string |
Source from which recommendation is generated |
ResourceRecommendationBase
Advisor Recommendation.
Name | Type | Description |
---|---|---|
id |
string (arm-id) |
Fully qualified resource ID for the resource. E.g. "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName}" |
name |
string |
The name of the resource |
properties.actions |
object[] |
The list of recommended actions to implement recommendation. |
properties.category |
The category of the recommendation. |
|
properties.control |
The sub-category of the recommendation. |
|
properties.description |
string |
The detailed description of recommendation. |
properties.exposedMetadataProperties |
object |
The recommendation metadata properties exposed to customer to provide additional information. |
properties.extendedProperties |
object |
Extended properties |
properties.impact |
The business impact of the recommendation. |
|
properties.impactedField |
string |
The resource type identified by Advisor. |
properties.impactedValue |
string |
The resource identified by Advisor. |
properties.label |
string |
The label of recommendation. |
properties.lastUpdated |
string (date-time) |
The most recent time that Advisor checked the validity of the recommendation. |
properties.learnMoreLink |
string |
The link to learn more about recommendation and generation logic. |
properties.metadata |
object |
The recommendation metadata. |
properties.notes |
string |
Additional notes for the Recommendation |
properties.potentialBenefits |
string |
The potential benefit of implementing recommendation. |
properties.recommendationTypeId |
string |
The recommendation-type GUID. |
properties.remediation |
object |
The automated way to apply recommendation. |
properties.resourceMetadata |
Metadata of resource that was assessed |
|
properties.resourceWorkload |
The Workload that this Resource belongs to. |
|
properties.review |
The Review that this Recommendation belongs to. |
|
properties.risk |
The potential risk of not implementing the recommendation. |
|
properties.shortDescription |
A summary of the recommendation. |
|
properties.sourceSystem |
string |
The Source System that this Recommendation originated from. |
properties.suppressionIds |
string[] (uuid) |
The list of snoozed and dismissed rules for the recommendation. |
properties.tracked |
boolean |
If the Recommendation has Tracking enabled. |
properties.trackedProperties |
The properties of a tracked recommendation. |
|
systemData |
Azure Resource Manager metadata containing createdBy and modifiedBy information. |
|
type |
string |
The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" |
ResourceWorkload
The Workload that this Resource belongs to.
Name | Type | Description |
---|---|---|
id |
string |
The Id of the Workload |
name |
string |
The Name of the Workload |
Review
The Review that this Recommendation belongs to.
Name | Type | Description |
---|---|---|
id |
string |
The ARM Resource Id of the Review |
name |
string |
The Name of the Review |
risk
The potential risk of not implementing the recommendation.
Value | Description |
---|---|
Error | |
Warning | |
None |
scoreEntity
The details of Advisor Score
Name | Type | Description |
---|---|---|
categoryCount |
number |
The count of impacted categories. |
consumptionUnits |
number |
The consumption units for the score. |
date |
string |
The date score was calculated. |
impactedResourceCount |
number |
The number of impacted resources. |
potentialScoreIncrease |
number |
The potential percentage increase in overall score at subscription level once all recommendations in this scope are implemented. |
score |
number |
The percentage score. |
ShortDescription
A summary of the recommendation.
Name | Type | Description |
---|---|---|
problem |
string |
The issue or opportunity identified by the recommendation and proposed solution. |
solution |
string |
The issue or opportunity identified by the recommendation and proposed solution. |
state
The state of the Recommendation
Value | Description |
---|---|
Approved | |
Rejected | |
Pending | |
InProgress | |
Postponed | |
Dismissed | |
Completed |
systemData
Metadata pertaining to creation and last modification of the resource.
Name | Type | Description |
---|---|---|
createdAt |
string (date-time) |
The timestamp of resource creation (UTC). |
createdBy |
string |
The identity that created the resource. |
createdByType |
The type of identity that created the resource. |
|
lastModifiedAt |
string (date-time) |
The timestamp of resource last modification (UTC) |
lastModifiedBy |
string |
The identity that last modified the resource. |
lastModifiedByType |
The type of identity that last modified the resource. |
timeSeriesEntity
The historic data at different aggregation levels.
Name | Type | Description |
---|---|---|
aggregationLevel |
The aggregation level of the score. |
|
scoreHistory |
The past score data |
TrackedRecommendationProperties
The tracked properties of a Recommendation
Name | Type | Description |
---|---|---|
postponedTime |
string (date-time) |
The time the Recommendation was postponed until. |
priority |
The Priority of the Recommendation. |
|
reason |
The reason the state of the Recommendation was changed. |
|
state |
The state of the Recommendation |
TrackedRecommendationPropertiesPayload
Name | Type | Description |
---|---|---|
properties |