Skip to content

Latest commit

 

History

History
83 lines (49 loc) · 3.65 KB

functions-create-first-azure-function.md

File metadata and controls

83 lines (49 loc) · 3.65 KB
title description services documentationcenter author manager editor tags ms.assetid ms.service ms.devlang ms.topic ms.tgt_pltfrm ms.workload ms.date ms.author ms.custom
Create your first function from the Azure Portal | Microsoft Docs
Learn how to create your first Azure Function for serverless execution using the Azure portal.
functions
na
ggailey777
cfowler
96cf87b9-8db6-41a8-863a-abb828e3d06d
functions
multiple
quickstart
multiple
na
10/17/2017
glenga
mvc, devcenter

Create your first function in the Azure portal

Azure Functions lets you execute your code in a serverless environment without having to first create a VM or publish a web application. In this topic, learn how to use Functions to create a "hello world" function in the Azure portal.

Create function app in the Azure portal

[!INCLUDE quickstarts-free-trial-note]

Log in to Azure

Log in to the Azure portal.

Create a function app

You must have a function app to host the execution of your functions. A function app lets you group functions as a logic unit for easier management, deployment, and sharing of resources.

[!INCLUDE Create function app Azure portal]

[!INCLUDE functions-portal-favorite-function-apps]

Next, you create a function in the new function app.

Create an HTTP triggered function

  1. Expand your new function app, then click the + button next to Functions.

  2. In the Get started quickly page, select WebHook + API, Choose a language for your function, and click Create this function.

    Functions quickstart in the Azure portal.

A function is created in your chosen language using the template for an HTTP triggered function. You can run the new function by sending an HTTP request.

Test the function

  1. In your new function, click </> Get function URL, select default (Function key), and then click Copy.

    Copy the function URL from the Azure portal

  2. Paste the function URL into your browser's address bar. Append the query string &name=<yourname> to this URL and press the Enter key on your keyboard to execute the request. The following is an example of the response returned by the function in the Edge browser:

    Function response in the browser.

    The request URL includes a key that is required, by default, to access your function over HTTP.

  3. When your function runs, trace information is written to the logs. To see the trace output from the previous execution, return to your function in the portal and click the up arrow at the bottom of the screen to expand Logs.

    Functions log viewer in the Azure portal.

Clean up resources

[!INCLUDE Clean up resources]

Next steps

You have created a function app with a simple HTTP triggered function.

[!INCLUDE Next steps note]

For more information, see Azure Functions HTTP and webhook bindings.