Set Auto Tier Azure Blobs Using Azure Logic App

Azure Logic Apps

Logic App is a cloud-based service that allows us to react to an event in one service (such as SharePoint online) and do something with the data from that event in another service (such as Twitter). It makes it practical and simple for business processes. The users build workflows that automatically perform some business tasks and processes across applications and services. We can connect our business-critical apps and services with Azure Logic Apps, automating our workflows without writing a single line of code.

Before reading this article, please go through some important article links mentioned below.

Prerequisites

  • Microsoft Azure Account

Follow the below steps to build a Workflow using a template.

Step 1

  • Log into https://portal.azure.com/.
  • In the dashboard, choose to create a resource and click on Integration. Now, select "Logic App".
    Logic App

Step 2

  • Enter the name you want to assign to the logic. Select the subscription and resource group where you organize the related resources and the location where your logic app is stored. Then, click on "Create".
    Create
  • Here is the dashboard. Click "Logic App Designer".
    Logic App Designer

Step 3. Choosing the template

  • Now, choose the template "Auto tier Azure blobs based on the last modified time".
    Azure blobs
  • Click on “Use this template”
    Template

Step 4. Mapping the storage account.

  • Sign into Azure Blob Storage
     Storage account
  • Mapping your storage account with storage name and Access Key. Then click on Create
    Access Key
  • Click on Create
    Continue

Step 5. Configure the Recurrence.

  • Choose the interval (Here, you can change it according to your needs), Frequency, Time Zone and Start time.
    Recurrence
  • Then, choose every Sunday as a new parameter.
    New parameter

Step 6. Set tier age

Next, choose a set tier age for the blob. Here, we need to give the value as 10(we need to change the tier for 10 days old blobs).

Set tier age

Step 7. Mapping the blobs

Choose the folder of the blob

 Folder of the blob

Step 8. Mapping the conditions

  • Connecting the conditions
    Connecting the conditions
  • If the condition is true, then choose the tier blob as “Hot”
    Hot
  • The final workflow will be like this.
     Final workflow

Now, let us save and run the workflow.

Output

First, check the tier for the blob

Authentication method

Run the Logic App

Run the Logic App

Its successfully run.

Set tier variable

Now, it successfully turns the blob tier from cool to hot tier.

Hot tier

Summary

I hope you understood how to set the Auto tier Azure blobs based on the last modified time using the Azure Logic App. Stay tuned for more Logic App articles.