Achraf Ben Alaya
No Result
View All Result
  • Home
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • About
    • Resume
SUBSCRIBE
  • Home
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • About
    • Resume
No Result
View All Result
Achraf Ben Alaya
No Result
View All Result
ADVERTISEMENT
Home Blog

You forget to shutdown your virtual machine on your way home ? send an email and save your time

achraf by achraf
February 6, 2021
in Blog, Cloud
4 min read
0
You forget to shutdown your virtual machine on your way home ? send an email and save your time
0
SHARES
370
VIEWS
Share on FacebookShare on Twitter

Introduction

You forgot to shutdown a virtual machine on your way home or to a date ?

don’t freak out ! there are many ways to save this moment when your heart is about to stop .

One of the ways is to install the Microsoft Azure application and follow with it .


Link for the application on  play store :  link

Link for the application on app store : Link 

Now we are going to see another solution ,which is sending an email .
In this demo we are going to use Logic app service  .

Azure Logic Apps :

Azure Logic Apps is a cloud service that helps you schedule, automate, and orchestrate tasks, business processes, and workflows when you need to integrate apps, data, systems, and services across enterprises or organizations. Logic Apps simplifies how you design and build scalable solutions for app integration, data integration, system integration, enterprise application integration (EAI), and business-to-business (B2B) communication, whether in the cloud, on premises, or both.

For example, here are just a few workloads you can automate with logic apps:

  • Process and route orders across on-premises systems and cloud services.
  • Send email notifications with Office 365 when events happen in various systems, apps, and services.
  • Move uploaded files from an SFTP or FTP server to Azure Storage.
  • Monitor tweets for a specific subject, analyze the sentiment, and create alerts or tasks for items that need review.

How do logic apps work?

Every logic app workflow starts with a trigger, which fires when a specific event happens, or when new available data meets specific criteria. Many triggers provided by the connectors in Logic Apps include basic scheduling capabilities so that you can set up how regularly your workloads run. For more complex scheduling or advanced recurrences, you can use a Recurrence trigger as the first step in any workflow. Learn more about schedule-based workflows.

Each time that the trigger fires, the Logic Apps engine creates a logic app instance that runs the actions in the workflow. These actions can also include data conversions and workflow controls, such as conditional statements, switch statements, loops, and branching. For example, this logic app starts with a Dynamics 365 trigger with the built-in criteria “When a record is updated”. If the trigger detects an event that matches this criteria, the trigger fires and runs the workflow’s actions. Here, these actions include XML transformation, data updates, decision branching, and email notifications.

With businesses moving toward digitization, logic apps help you connect legacy, modern, and cutting-edge systems more easily and quickly by providing prebuilt APIs as Microsoft-managed connectors. That way, you can focus on your apps’ business logic and functionality. You don’t have to worry about building, hosting, scaling, managing, maintaining, and monitoring your apps. Logic Apps handles these concerns for you. Plus, you pay only for what you use based on a consumption pricing model.

Let’s Do It (DEMO)

First of all , let’s create a simple logic app by following the follow instructions below :

Now , what’s the action that will do our job here ? (the job is to start or to stop a virtual machine that you may forget to stop while you were going home to see your family because you miss them after a long dat at work ).

Ps : To learn The Proper way To Shutdown Azure VM and the difference between stopped and Deallocated you can read from this LINK

Now this action we talked about is called a “Trigger ” to cause (something) to start or happen that is a trigger , in our case a trigger is : receiving an email .

First of all we are going to choose the trigger action which is “when a new email arrives(v3)” and we are going

to make a couple of parameters :

– the folder ,in our case the inbox
– From : here you can choose your own email or another email ,like a collogue or anyone who can do this to the machine
and keep other parameters as they are.

Switch

here we are choosing the subject , which is the subject of the email that is going to be received.

We have 2 cases , one to turn ON the machine and one to Stopped (deallocated) (you can add more like for restart , stop….)

 

In the first case I put “turnoff01” as a subject , later you need to choose your subscription
the resource group that contain the virtual machine and the virtual machine too .

In the second case I put “turnon01” as a subject and it start the machine

As you can see in the Overview , we can see sending the email have triggered the logic app , and in my case the
call to stop and to start the machine was done successfully

ShareTweet
Previous Post

Azure Automation : How to create PowerShell Runbook

Next Post

Hello Microsoft Graph !

Related Posts

Configuring GitHub Advanced Security for Azure DevOps: A Must-Have in Today’s DevOps Landscape
Azure

Configuring GitHub Advanced Security for Azure DevOps: A Must-Have in Today’s DevOps Landscape

September 28, 2023
28
The Significance of Azure DevSecOps: Best Practices for Securing Your Pipelines
Azure

The Significance of Azure DevSecOps: Best Practices for Securing Your Pipelines

August 17, 2023
131
Navigating the Alphabet Soup: Unraveling Microsoft Acronyms
Azure

Navigating the Alphabet Soup: Unraveling Microsoft Acronyms

July 16, 2023
54
Streamlining Website Editing on My Local Machine with Docker Compose and WordPress
Blog

Streamlining Website Editing on My Local Machine with Docker Compose and WordPress

July 1, 2023
40
Block the default URL assigned to the azure web app using azure application gateway
Azure

Block the default URL assigned to the azure web app using azure application gateway

May 31, 2023
142
Block the default URL assigned to the azure web app
Blog

Block the default URL assigned to the azure web app

May 14, 2023
484
Next Post
Hello Microsoft Graph !

Hello Microsoft Graph !

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Terraform

Certifications

Microsoft certified trainer (MCT)

Recommended

From Docker Hub, switch to Azure Container Registry & AKS

January 16, 2023
337
Xamarin.forms,Blazor and Web API

Xamarin.forms,Blazor and Web API

December 3, 2020
1k
Where is my Money ! The Proper way To Shutdown Azure VM

Where is my Money ! The Proper way To Shutdown Azure VM

November 2, 2020
604
Finally a stable version of Xamarin.Forms 4.1.0 and announcing Xamarin.Essentials 1.2

Finally a stable version of Xamarin.Forms 4.1.0 and announcing Xamarin.Essentials 1.2

April 21, 2020
477
15 E-books that focus on learning Microsoft Azure Cloud

15 E-books that focus on learning Microsoft Azure Cloud

April 23, 2023
126

How To host a Next.js app on Azure

October 5, 2020
1.2k
Facebook Twitter LinkedIn Youtube
Configuring GitHub Advanced Security for Azure DevOps: A Must-Have in Today’s DevOps Landscape

Configuring GitHub Advanced Security for Azure DevOps: A Must-Have in Today’s DevOps Landscape

September 28, 2023
The Significance of Azure DevSecOps: Best Practices for Securing Your Pipelines

The Significance of Azure DevSecOps: Best Practices for Securing Your Pipelines

August 17, 2023
Navigating the Alphabet Soup: Unraveling Microsoft Acronyms

Navigating the Alphabet Soup: Unraveling Microsoft Acronyms

July 16, 2023

Categories

  • Apps (1)
  • Azure (49)
  • blazor (2)
  • Blog (74)
  • c# (7)
  • Cloud (47)
  • Dapr (4)
  • docker (4)
  • Games (1)
  • General Tips & Fix (1)
  • Kubernetes Service (AKS) (1)
  • Motivation (3)
  • motivation (2)
  • News (9)
  • Resume (1)
  • sql (4)
  • Terrafrom (1)
  • Tricks, Tips and Fixes (3)
  • xamarin (5)
No Result
View All Result
  • Home
  • News
  • Blog
    • blazor
    • c#
    • Cloud
      • Azure
    • docker
    • sql
    • xamarin
    • Dapr
    • Tricks, Tips and Fixes
  • Cloud
  • Motivation
  • General Tips & Fix
  • About
    • Resume