Posts

Showing posts with the label Azure Function

About Flex Consumtion Plan and enable Managed Identity in Azure Function

Image
Micrsoft bring a new plan for Azure Function - Flex Consumtion Plan for hosting. It is Linux based Azure Functions hosting plan. Below a quick sneek preview of the plan. And here is more details . Pretty simple way to create Azure Function. Created by a minute, and below my Azure Function is up and running. Let's try to enable managed identity in Azure Function. 1. Click on your Azure Function and bring the Function dashborad 2. Click on Identity under Settings 3. On the System assigned tab, switch the status to On and click save Next, you need to assign the roles to he Managed identity. To do so, first you browse to the respective Azure resources like Azure Storage/SQL DB/key Vault and assign the necesarry role-based-access-control (RBAC). Let's create a key Vault first and assign the  Afterwards, select the subscription and search your RBAC role and assigned the sale. Click on Save. Now, go back to Functon dashboard and then Settings >> Identity and then Azure Role ...

Azure Function to call API and display information

Image
In this post, will review on how to create an Azure Function to call an API to get the data and back the json data to requester. This is developed using Visual Studio in Windows environment. Open Visual Studio and then click to create a new project. Search Azure Function Template and then click next. Put a meaningfull name and location of your project. Click next. Next, select Http trigger from Function dropdown box. In this project, this would be a Http call. Finally turned on Authorization level to Anonymous . Click to create the project. Once the project created, you will found the local.settings.json file. Replace the following code with the following one. We place environment/configuration variable in local.settings.json file under Values . {     "IsEncrypted": false,   "Values": {     "AzureWebJobsStorage": "UseDevelopmentStorage=true",     "FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",     "APIURL": "h...