An Azure service that is used to automate, configure, and install updates across hybrid environments.
Hello Sreenivasulu !
Thank you for posting on Microsoft Learn Q&A.
I think the correct tag Azure Files and you want to auto purge old files whenever the used capacity of a share exceeds 10 TiB?
What Azure supports (and doesn’t)
- lifecycle management (rule-based delete by age) exists for Blob storage, not for Azure Files. For Files you need your own job/runbook. https://learn.microsoft.com/en-us/azure/storage/blobs/lifecycle-management-overview
- you can measure usage per File share and alert on it via Azure Monitor metrics like FileCapacity, FileShareCapacityQuota... https://learn.microsoft.com/en-us/azure/storage/files/storage-files-monitoring-reference
You need to set an Azure Monitor metric alert on the share FileCapacity that triggers a runbook or a function and in that job you recheck usage, compute how many bytes to free, then breadth-first list the share.
You can filter files older than x days and sort oldest first then write their paths to a text file and delete them in parallel with AzCopy until usage drops below 10 TB.