In this hands-on lab, we use the Azure Portal to create an HTTP-triggered Azure function and then run the function by retrieving the function’s URL within a browser.
Learning Objectives
Successfully complete this lab by achieving the following learning objectives:
- Log In to the Azure Portal
Log in to the Azure Portal using the username and password supplied by the lab.
- Open a browser.
- Navigate to the provided Azure Portal URL.
- Use the supplied username and password to authenticate.
- Create the Function App Service
- Select Create a Resource.
- Search for "function app".
- Click on the Function App tile.
- Press the Create Button.
Select or enter the following on the next tabs and pages:
Basics
- Subscription: Leave as-is.
- Resource Group: Select the only available group.
- Function App name: Create a unique name. The Portal shows a green check when the name is valid.
- Publish: Leave as Code.
- Runtime stack: Select .Net.
- Region: Leave as-is.
Hosting
Leave everything as-is, except the following:
Plan type: Select App service plan.Pricing Plan: Change to Standard S1.
Monitoring
Leave everything as-is.
Then click on the *Review + create** button.
On the next page, click the Create button.
The Function App service will then deploy. This will take several minutes. When it is complete, the Portal shows a page with Your deployment is complete
Click the Go to resource button.
- Create the HTTP-Triggered Function
- Click the Functions menu item in the navigation tree on the left-side of the page.
- Click the New function link near the top-center of the page.
- From the list of trigger types, click HTTP trigger.
- In the New Function panel that appears on the right of the page, enter "MyHttpFunction" as the name, and leave Function as the Authorization level.
- Click the Create button.
- Wait for the function to appear.
- Test the Function
- Click the Test link on the right of the browser page to open the test panel.
- In the panel that opens, click the Run button near the bottom.
- Verify the the reception of a Status 200 OK message and a Hello, Azure message in the Output panel.
- Open the logs panel by clicking on the Logs link below the function’s source, and verify that the function has run.