Skip to content

Instantly share code, notes, and snippets.

@andrewmatveychuk
Created August 1, 2023 11:38
Show Gist options
  • Save andrewmatveychuk/d7722c8bdfc4a2ad5d82ad04e178adda to your computer and use it in GitHub Desktop.
Save andrewmatveychuk/d7722c8bdfc4a2ad5d82ad04e178adda to your computer and use it in GitHub Desktop.
Get changes that happened before specific time in a resource group
resourcechanges
| where resourceGroup =~ '{ResourceGroup:resourcegroup}'
| extend changeTime = todatetime(properties.changeAttributes.timestamp),
targetResourceId = tostring(properties.targetResourceId),
changeType = tostring(properties.changeType),
correlationId = properties.changeAttributes.correlationId,
changedProperties = properties.changes,
changeCount = properties.changeAttributes.changesCount
| where changeTime < todatetime('{fireTime}')
| order by changeTime desc
| project changeTime, targetResourceId, changeType, correlationId, changeCount, changedProperties
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment