Share via


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
recommendationId
path True

string

The RecommendationId ID.

resourceUri
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

Properties

Responses

Name Type Description
200 OK

ResourceRecommendationBase

OK. Successfully updated recommendation status.

Other Status Codes

ArmErrorResponse

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.

ArmErrorResponse
ARMErrorResponseBody

ARM error response body.

category

The category of the recommendation.

control

The sub-category of the recommendation.

createdByType

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.

ResourceMetadata

Recommendation resource metadata

ResourceRecommendationBase

Advisor Recommendation.

ResourceWorkload

The Workload that this Resource belongs to.

Review

The Review that this Recommendation belongs to.

risk

The potential risk of not implementing the recommendation.

scoreEntity

The details of Advisor Score

ShortDescription

A summary of the recommendation.

state

The state of the Recommendation

systemData

Metadata pertaining to creation and last modification of the resource.

timeSeriesEntity

The historic data at different aggregation levels.

TrackedRecommendationProperties

The tracked properties of a Recommendation

TrackedRecommendationPropertiesPayload

aggregated

The aggregation level of the score.

Value Description
week
day
month

ArmErrorResponse

Name Type Description
error

ARMErrorResponseBody

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

scoreEntity

The details of latest available score.

timeSeries

timeSeriesEntity[]

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

category

The category of the recommendation.

properties.control

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

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

ResourceMetadata

Metadata of resource that was assessed

properties.resourceWorkload

ResourceWorkload

The Workload that this Resource belongs to.

properties.review

Review

The Review that this Recommendation belongs to.

properties.risk

risk

The potential risk of not implementing the recommendation.

properties.shortDescription

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

TrackedRecommendationProperties

The properties of a tracked recommendation.

systemData

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

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

createdByType

The type of identity that last modified the resource.

timeSeriesEntity

The historic data at different aggregation levels.

Name Type Description
aggregationLevel

aggregated

The aggregation level of the score.

scoreHistory

scoreEntity[]

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

priority

The Priority of the Recommendation.

reason

reason

The reason the state of the Recommendation was changed.

state

state

The state of the Recommendation

TrackedRecommendationPropertiesPayload

Name Type Description
properties

Properties