Efficient Management of Append and Page Blobs Using Azure Storage Actions
Overview
In Azure Storage, Blob Lifecycle Management (BLM) allows you to automate the management of your data based on rules defined by the user. Lifecycle management policies are supported for block blobs and append blobs in general-purpose v2, premium block blob, and Blob Storage accounts. However, since lifecycle management (BLM) policies are not supported for page blobs, we can effectively manage the lifecycle of page blobs and append blobs through storage tasks and actions. There are solutions like Logic Apps and Azure Functions are available to automate lifecycle management and below are reference links:
Lifecycle Management, Page Blob, Azure Storage, Blob Storage (microsoft.com)
Delete all the Azure Storage Blob content before N days using Logic App - Microsoft Community Hub
The focus of this blog is on demonstrating how to achieve the same goal using built-in storage actions and tasks
NOTE: Azure Storage Actions is currently in PREVIEW and is available these regions. Please refer: About Azure Storage Actions Preview - Azure Storage Actions Preview | Microsoft Learn
By leveraging these storage actions, we can automate the retention, deletion, and archival of page blobs and append blobs based on custom-defined rules, ensuring efficient lifecycle management without relying on external services. This method provides a more direct, storage-centric approach to managing page blob lifecycles.
For example, we have both page blobs and append blobs within a container, and we would like to delete them using Azure storage actions and tasks.
In this article, you'll learn how to create a storage task.
Create a task
In the Azure portal, search for Storage Tasks. Then, under Services, select Storage tasks - Azure Storage Actions.
On the Azure Storage Actions | Storage Tasks page, select Create.
Basics tab
On the Basics tab, provide the essential information for your storage task.
Conditions tab
On the Conditions tab, define the conditions that must be met by each object (container or blob), and the operations to perform on the object.
You must define at least one condition and one operation. To add a clause to a condition, select Add new clause. To add operations, select Add new operation. In this scenario, we are selecting the blob types as Page Blobs and Append Blobs to perform the delete operation.
Assignments tab
An assignment identifies a storage account and a subset of objects in that account that the task will target. An assignment also defines when the task runs and where execution reports are stored.
To add an assignment, select Add assignment. This step is optional. You don't have to add an assignment to create the task.
Tags tab
On the Tags tab, you can specify Resource Manager tags to help organize your Azure resources.
Review + create tab
When you navigate to the Review + create tab, Azure runs validation on the storage task settings that you have chosen. If validation passes, you can proceed to create the storage task.
If validation fails, then the portal indicates which settings need to be modified.
Once you have created the storage task then please go to the respective storage account to enable the storage task assignment.
Enable the task assignment
Storage task assignments are disabled by default. Enable assignments from the Assignments page.
Periodically select Refresh to view an updated status.
Until the task runs and then completes, the string in progress appears beneath the Last run status column. When the task completes, the string Completed appears in that column.
After successfully completing the task, we observed that both the page blobs and append blobs were deleted from the container.
View results of the task run
After the task completes running, you can view the results of the run.
Select the View report link to download a report.
Useful links:
Create a storage task - Azure Storage Actions Preview | Microsoft Learn
https://learn.microsoft.com/en-us/azure/storage-actions/overview
Define storage task conditions & operations - Azure Storage Actions Preview | Microsoft Learn
Published on:
Learn moreRelated posts
Primer: Output Data Generated with an Azure Automation Runbook to a SharePoint List
The second part of the Azure Automation runbook primer brings us to output, specifically how to create items generated by a runbook in a Share...
Databricks vs Azure Synapse Analytics: A Comprehensive Comparison for Modern Data Solutions
Table of Contents Introduction Data is at the core of modern business decision-making. As companies increasingly rely on data-driven insights,...
Primer: How to Use Azure Automation to Run Microsoft Graph PowerShell SDK Scripts
A reader asked why it seems so difficult to use Azure Automation runbooks to process Microsoft 365 data. In fact, it's not so hard, and here's...
Extending Regular Expressions (Regex) Support on Azure SQL Managed Instance (MI)
We are happy to announce the Private Preview of Regular Expressions (Regex) support on Azure SQL Managed Instance (MI). This new feature bring...
Shield your Copilot with Azure AI
Azure Confidential Clean Rooms demonstration
Final Days for the MSOnline and AzureAD PowerShell Modules
After many twists and turns since August 2021, the MSOnline module retirement will happen in April 2025. The AzureAD module will then retire i...
Join the Conversation: Call for Proposals for Azure Cosmos DB Conf 2025!
Are you passionate about Azure Cosmos DB? Do you have insights, experiences, or innovations that the developer community would love to hear? N...