ManjunathS details the use of the Exclude Prefix feature in Azure Storage Actions, highlighting how Azure users can automate blob management tasks while protecting critical data through exclusion rules.

How to Use Exclude Prefix for Smarter Blob Management in Azure Storage Actions

Azure Storage Actions is a versatile platform enabling automated management of data in Azure Blob and Data Lake Storage. Among its key features, Exclude Prefix allows you to fine-tune automation jobs for better precision and data safety.

What Is the Exclude Prefix Feature?

The Exclude Prefix option lets you omit specific blobs or folders from being targeted in Azure Storage Actions. This is helpful for scenarios such as:

  • Moving blobs to a cooler tier while protecting important config or log files
  • Deleting outdated blobs but keeping those matching certain paths
  • Rehydrating archived blobs while excluding critical data
  • Automating workflows on blob change events, only for selected containers or paths

Example: If you need to archive blobs older than 30 days but want to exclude any log or config files from the process, you can add logs/ or config/ as prefixes in the exclusion list. This ensures automation does not touch those files or folders.

Step-by-Step: Using Exclude Prefix in Azure Storage Actions

1. Create a Storage Task

  • Go to the Azure portal and search for Storage tasks.
  • Under Services, select Storage tasks – Azure Storage Actions.
  • Click Create to begin configuring a new task.
  • Fill out all required fields and proceed to the Conditions step.

2. Specify Task Conditions

To configure an action (e.g., deletion):

  • Define your desired conditions on the Conditions page (such as deleting blobs with the access tier set to Hot).
  • Add additional filter criteria as needed.

3. Add the Assignment

  • Under Select scope, choose your subscription and storage account, and name the assignment.
  • In Role assignment, select Storage Blob Data Owner to grant the task the necessary permissions.
  • In Filter objects, set the Exclude Blob Prefix field to omit blobs or folders you do NOT want modified by this task (e.g., excludefiles/).

4. Task Trigger and Monitoring

  • Define trigger details, such as execution schedule and report storage location.
  • After deployment, view task status and reports through Assignments > View task runs.
  • You can download comma-separated reports for review.

5. Enabling Task Assignments

  • The Enable task assignment checkbox is checked by default, so assignments run automatically.
  • If this box is unchecked, manually enable an assignment later from the Assignments page.

6. Alternative Exclusion via Conditions

  • Beyond Exclude Prefix, you can use the Not operator (!) in task conditions to filter out blobs dynamically (e.g., exclude where blob name equals “Test”).
  • See Multiple Clauses in a Condition for advanced logic.

Why Use Exclude Prefix?

  • Prevent accidental modification or deletion of critical files
  • Increase automation safety and operational reliability
  • Enable granular, targeted management within large-scale blob or Data Lake environments
  • Reduce errors and support compliance by protecting key data folders

Availability

Azure Storage Actions are generally available in selected public regions. For the latest supported regions, see the official documentation.

Conclusion

The Exclude Prefix property in Azure Storage Actions empowers you to automate data management tasks with precision. By defining exclusions, you can safeguard sensitive or mission-critical data while maintaining operational efficiency at scale.

Authored by ManjunathS

This post appeared first on “Microsoft Tech Community”. Read the entire article here