Azure

Create Http Trigger Azure Function In Azure Portal

Introduction

This article will help you learn how to create Http Trigger Function in Azure Portal.

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

  1. Exploring About Azure Function

Azure Function

Azure Functions is the serverless computing service and is hosted on the Microsoft Azure public cloud. It is designed to accelerate and simplify application development. The cloud provider takes care of all the headaches of running the server, dynamically managing the resources of the machine, etc. It also provides auto scalability.

Serverless applications, also known as Function-as-a-Service or FaaS, is an offering from most of the enterprise cloud providers in which they allow the users to only write code and the infrastructure behind the scenes is managed by them.

Azure Functions is the event-based serverless application framework which can automatically scale up and down based on the executions that are being triggered. This Microsoft Azure service allows you to run small pieces of code in Node.js, C#, Python, PHP and Java without any infrastructure configurations.

Here, we will see about Azure Function.

Purpose

Azure Functions lets you execute your code in a serverless environment without having to first create a VM or publish a web application.

Key Features

  • Intuitive, browser-based user interface – You can write code in the easy-to-use web interface.
  • write code in different programming languages
  • pay per function execution
  • parallel execution when multiple triggers occur
  • Supports Continuous Deployment and Integration

Create the Http Trigger Azure Function in Azure Portal

Prerequisites

Follow the below steps to create an Azure Storage Account.

Step 1

Log in here. Please go through the article mentioned below for creating Azure Function.

Step 2

After successfully create the Azure Function services, you are land over to the overview page as shown below. Then click on Function under Function tab

Http Trigger Function in Azure Portal

Step 3

Now, Click on Create option to create function trigger.

Http Trigger Function in Azure Portal

Step 4

In this blade, you can able to see many triggers. choose HTTP trigger here.

Http Trigger Function in Azure Portal

Step 5

Now, we can see two options are there. First, we need to create name for the new function. Second, we need to choose Authorization level. Here, we have 3 authorization level

  1. Function – It can be set on the Azure Function to require an API Key
  2. Anonymous – It does not require any authentication
  3. Admin – If it is set, if you require only a single API Key for all the functions in the deployment, or some clients have admin access to all the Functions

Now, we are choosing anonymous now. Then click on Create

Http Trigger Function in Azure Portal

Step 6

Once it is created, you can able to see the overview blade for HTTP Trigger Function

Http Trigger Function in Azure Portal

Here, you can have some options:

  1. Code + Test  is used for adding your customized code
  2. Integration is used for adding your input and output bindings
  3. Monitor is used to monitor your function insights
  4. Function Keys have your keys to access your functions

Http Trigger Function in Azure Portal

Step 6

First, we click on code + Test option. Then we can find some default template for Http Trigger

Http Trigger Function in Azure Portal

In the top view, we can find function URL for running our function.

Http Trigger Function in Azure Portal

Output 1

Copy the URL and paste it into the browser to test the function. Then you can have the output

Http Trigger Function in Azure Portal

Now, we can just pass query in URL. Like (?name=Azure). Then we can have output like this

Http Trigger Function in Azure Portal

Output 2:

We can also run our function inside our portal itself. Just click by Test/Run

Http Trigger Function in Azure Portal

Now, we can successfully run our Http Trigger here. The output will looks like this.

Http Trigger Function in Azure Portal

Summary

I hope you understood how we can create Http trigger in Azure portal. Stay tuned for more articles on Azure Function.

Tags
Show More

Related Articles

Leave a Reply

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

Close