Road To AZ-204 - Developing An App Service Logic App


This article's intention is to explain the main skills measured in this sub-topic of the AZ-204 Certification. Logic Apps, the connectors, and templates are the main components that will have their fundamentals explained here alongside a practical example.
This certification is very extensive and this article approaches only the main topics, make sure you know  those components in depth before taking the exam. Another great tip is doing exam simulators before the official exam in order to validate your knowledge.

What is the Certification AZ-204 - Developing Solutions for Microsoft Azure?

The AZ-204 - Developing Solutions for Microsoft Azure certification measures designing, building, testing, and maintaining skills of an application and/or service in the Microsoft Azure Cloud environment. It approaches, among others, those components,
  • Azure Virtual Machines;
  • Docker;
  • Azure Containers;
  • Service Web App;
  • Azure Functions;
  • Cosmos DB;
  • Azure Storage;
  • Azure AD;
  • Azure Key Vault;
  • Azure Managed Identities;
  • Azure Redis Cache;
  • Azure Logic App;
  • Azure Event Grid;
  • Azure Event Hub;
  • Azure Notification Hub;
  • Azure Service Bus;
  • Azure Queue Storage.
Target Audience
Any IT professional willing to improve his knowledge in Microsoft Azure is encouraged to take this certification, it is a great way to measure your skills within trending technologies. But, some groups of professionals are more keen to take maximum advantage of it,
  • Azure Developers, with at least 1 year of experience with Microsoft Azure;
  • Experienced Software Developers, looking for an Architect position in a hybrid environment;
  • Software Developers, working to move applications to the cloud environment.
Skills Measured
According to today's date, the skills that are measured in the exam are split as follows,

Benefits of Getting Certified

The main benefit here is having a worldwide recognized certification that proves that you have knowledge of this topic. Among intrinsic and extrinsic benefits, we have,
  • Higher growth potential, as certifications are a big plus;
  • Discounts and deals in Microsoft products and partners, like PluralSight and UpWork;
  • MCP Newsletters, with trending technologies;
  • Higher exposure on LinkedIn, as recruiters usually search for specific certifications;
  • Higher salary, you will be more valuable to your company;
  • Unique happiness when getting the result and you were approved, knowing that all your efforts were worth it;

Main skills Measured by this Topic

What is an Azure Logic App?
Azure Logic Apps is an Azure service to host workflows without needing to code. With Azure Logic Apps you can automate your workflows with a wide range of built-in, and custom, connectors, and actions, run your Logic Apps in the cloud and without needing to write any line of code.

Azure Logic Apps are very similar to Azure Functions, it starts with a trigger and executes its actions in a workflow manner, but Azure Logic Apps is much more powerful and more visual without needing to code as far as you can create complex workflows without any single line of code nor declaring a single variable.

Azure Logic Apps X Azure Functions
Azure Logic App Connectors
Azure Logic App Connectors help you to integrate with any kind of data, apps, and devices, being on-premises or in the cloud. As its name says, it is used to connect with data and if you don’t find a connector that matches your requirements then you can create your customized one, also without needing to write any line of code.
Azure Logic App Templates
From your Azure Logic Apps, you can create an Azure Resource Manager Template to automate creating and deploying others likewise Logic Apps. In order to achieve that you must make usage of parameters to parameterize your Logic Apps in order to be used as a base for the next Azure Logic Apps creations and deployments.
Practical Examples
Here we are going to create a tool that is going to be watching for specific tweets on Twiter and when a specific criterion is met then it is going to send an email with information from the tweet. The idea here is to watch for a specific hashtag with a task for me, and every time that anybody posts a tweet with this hashtag then a new email will be sent to me with this task information.

Creating a Logic App with Azure Portal

From your Azure Portal, go to Logic App and create a Logic App.
Add a new trigger when a tweet is posted
Configure the search text and the time interval. Click on New Step and Add an Office 365 Outlook action
Configure the email to be sent when a new tweet matching our search criteria is posted,
Save it and Run. When our trigger is fired, those are the results,

Logic App Custom Template with Powershell

From your existing Logic App, you can create a custom template to be deployed with Azure Resource Manager Templates. After parameterizing your Logic App you can export all the logic in order to create other Logic Apps with different parameters.
  • Module LogicAppTemplate installed. 
  • Module AzureRM installed.
  • ARM Client installed.
Setting variables
  1. $resourceGroup ="SampleLogicApp"  
  2. $SubscriptionId="99b0864f-e2ae-434b-880c-5cce6ecf60a1"  
  3. $logicAppName ="sampleLogicApp"  
Exporting the template
  1.   $parameters = @{  
  2.     LogicApp = $logicAppName  
  3.     ResourceGroup = $resourceGroup  
  4.     SubscriptionId = $SubscriptionId  
  5.     Verbose = $true  
  6. }  
  8. armclient token $SubscriptionId | Get-LogicAppTemplate @parameters |Out-File C:\template.json   
Exporting the template variables 
  1. Get-ParameterTemplate -TemplateFile "C:\template.json" | Out-File 'templateParameters.json'  
Deploying the custom Logic App template
  1. New-AzResourceGroupDeployment -Name LogicAppExampleDeployment -ResourceGroupName $resourceGroup   -TemplateFile "C:\template.json"   -TemplateParameterFile 'templateParameters.json'  

Logic App Custom Connector

From your Azure Portal, go to Logic Apps Custom Connector and create a new one
From your Azure Logic App Custom Connector resource, click on edit and set up the new Custom Connector. Here we will be using Microsoft Cognitive Services API.
Configure authentication 
Fill in general information and click on import from sample to configure your request 
Configure the URL and HTTP Verb. 
After finishing configuring your custom connector, if the validation succeeds then you can click in update connector. 
Testing our Custom Connector. Go to our previous Logic App and search for the Custom Connector 
External References