Skip to content

Commit d23e7fc

Browse files
authored
Merge pull request #105955 from dksimpson/DKS-US1680669-1
Refresh Azure top 150 group - batch 1
2 parents cbaed9b + 051ecf2 commit d23e7fc

24 files changed

+100
-103
lines changed
Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,64 +1,63 @@
11
---
2-
title: Create your first serverless function from the Azure portal
2+
title: Create your first function in the Azure portal
33
description: Learn how to create your first Azure Function for serverless execution using the Azure portal.
44
ms.assetid: 96cf87b9-8db6-41a8-863a-abb828e3d06d
55
ms.topic: quickstart
6-
ms.date: 03/28/2018
6+
ms.date: 03/06/2020
77
ms.custom: mvc, devcenter, cc996988-fb4f-47
88
---
99

1010
# Create your first function in the Azure portal
1111

12-
Azure Functions lets you execute your code in a [serverless](https://azure.microsoft.com/solutions/serverless/) environment without having to first create a VM or publish a web application. In this article, learn how to use Functions to create a "hello world" function in the Azure portal.
13-
14-
![Create function app in the Azure portal](./media/functions-create-first-azure-function/function-app-in-portal-editor.png)
12+
Azure Functions lets you run your code in a serverless environment without having to first create a virtual machine (VM) or publish a web application. In this article, you learn how to use Azure Functions to create a "hello world" HTTP triggered function in the Azure portal.
1513

1614
[!INCLUDE [quickstarts-free-trial-note](../../includes/quickstarts-free-trial-note.md)]
1715

18-
> [!NOTE]
19-
> C# developers should consider [creating your first function in Visual Studio 2019](functions-create-your-first-function-visual-studio.md) instead of in the portal.
16+
If you're a C# developer, consider [creating your first function in Visual Studio 2019](functions-create-your-first-function-visual-studio.md) instead of in the portal.
2017

21-
## Log in to Azure
18+
## Sign in to Azure
2219

23-
Sign in to the Azure portal at <https://portal.azure.com> with your Azure account.
20+
Sign in to the [Azure portal](https://portal.azure.com) with your Azure account.
2421

2522
## Create a function app
2623

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

2926
[!INCLUDE [Create function app Azure portal](../../includes/functions-create-function-app-portal.md)]
3027

31-
Next, you create a function in the new function app.
28+
Next, create a function in the new function app.
3229

3330
## <a name="create-function"></a>Create an HTTP triggered function
3431

35-
1. Expand your new function app, then select the **+** button next to **Functions**, choose **In-portal**, and select **Continue**.
32+
1. Expand your new function app, select the **+** button next to **Functions**, choose **In-portal**, and then select **Continue**.
3633

3734
![Functions quickstart for choosing a platform.](./media/functions-create-first-azure-function/function-app-quickstart-choose-portal.png)
3835

39-
1. Choose **WebHook + API** and then select **Create**.
36+
1. Choose **WebHook + API**, and then select **Create**.
4037

4138
![Functions quickstart in the Azure portal.](./media/functions-create-first-azure-function/function-app-quickstart-node-webhook.png)
4239

43-
A function is created using a language-specific template for an HTTP triggered function.
40+
A function is created using a language-specific template for an HTTP triggered function.
4441

4542
Now, you can run the new function by sending an HTTP request.
4643

4744
## Test the function
4845

49-
1. In your new function, click **</> Get function URL** at the top right, select **default (Function key)**, and then click **Copy**.
46+
1. In your new function, select **</> Get function URL** at the top right.
47+
48+
1. In the **Get function URL** dialog box, select **default (Function key)** from the drop-down list, and then select **Copy**.
5049

5150
![Copy the function URL from the Azure portal](./media/functions-create-first-azure-function/function-app-develop-tab-testing.png)
5251

53-
2. Paste the function URL into your browser's address bar. Add the query string value `&name=<yourname>` to the end of this URL and press the `Enter` key on your keyboard to execute the request. You should see the response returned by the function displayed in the browser.
52+
1. Paste the function URL into your browser's address bar. Add the query string value `&name=<your_name>` to the end of this URL and press Enter to run the request.
5453

5554
The following example shows the response in the browser:
5655

5756
![Function response in the browser.](./media/functions-create-first-azure-function/function-app-browser-testing.png)
5857

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

61-
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 arrow at the bottom of the screen to expand the **Logs**.
60+
1. 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 select the arrow at the bottom of the screen to expand the **Logs**.
6261

6362
![Functions log viewer in the Azure portal.](./media/functions-create-first-azure-function/function-view-logs.png)
6463

@@ -68,8 +67,5 @@ Now, you can run the new function by sending an HTTP request.
6867

6968
## Next steps
7069

71-
You've created a function app with a simple HTTP triggered function.
72-
7370
[!INCLUDE [Next steps note](../../includes/functions-quickstart-next-steps.md)]
7471

75-
For more information, see [Azure Functions HTTP bindings](functions-bindings-http-webhook.md).
Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
---
2-
title: Create your first function in Azure using Visual Studio
3-
description: Create and publish an HTTP triggered Azure Function using Visual Studio.
2+
title: "Quickstart: Create your first function in Azure using Visual Studio"
3+
description: In this quickstart, you learn how to create and publish an HTTP-triggered Azure Function by using Visual Studio.
44
ms.assetid: 82db1177-2295-4e39-bd42-763f6082e796
55
ms.topic: quickstart
6-
ms.date: 07/19/2019
6+
ms.date: 03/06/2020
77
ms.custom: mvc, devcenter, vs-azure, 23113853-34f2-4f
88
---
9-
# Create your first function using Visual Studio
9+
# Quickstart: Create your first function in Azure using Visual Studio
1010

11-
Azure Functions lets you execute your code in a [serverless](https://azure.microsoft.com/solutions/serverless/) environment without having to first create a VM or publish a web application.
11+
Azure Functions lets you run your code in a serverless environment without having to first create a VM or publish a web application.
1212

13-
In this article, you learn how to use Visual Studio 2019 to locally create and test a "hello world" function and then publish it to Azure. This quickstart is designed for Visual Studio 2019. When creating a Functions project using Visual Studio 2017, you must first install the [latest Azure Functions tools](functions-develop-vs.md#check-your-tools-version).
13+
In this quickstart, you learn how to use Visual Studio 2019 to locally create and test a "hello world" HTTP-triggered C# function app, which you then publish to Azure.
1414

1515
![Function localhost response in the browser](./media/functions-create-your-first-function-visual-studio/functions-create-your-first-function-visual-studio-browser-local-final.png)
1616

17+
This quickstart is designed for Visual Studio 2019.
18+
1719
## Prerequisites
1820

19-
To complete this tutorial, you must first install [Visual Studio 2019](https://azure.microsoft.com/downloads/). Make sure that the **Azure development** workload is also installed.
21+
To complete this tutorial, first install [Visual Studio 2019](https://azure.microsoft.com/downloads/). Ensure you select the **Azure development** workload during installation. If you want to create an Azure Functions project by using Visual Studio 2017 instead, you must first install the [latest Azure Functions tools](functions-develop-vs.md#check-your-tools-version).
2022

2123
![Install Visual Studio with the Azure development workload](media/functions-create-your-first-function-visual-studio/functions-vs-workloads.png)
2224

@@ -26,41 +28,47 @@ To complete this tutorial, you must first install [Visual Studio 2019](https://a
2628

2729
[!INCLUDE [Create a project using the Azure Functions template](../../includes/functions-vstools-create.md)]
2830

29-
Visual Studio creates a project and class that contains boilerplate code for the HTTP trigger function type. The `FunctionName` attribute on the method sets the name of the function, which by default is `Function1`. The `HttpTrigger` attribute specifies that the function is triggered by an HTTP request. The boilerplate code sends an HTTP response that includes a value from the request body or query string.
31+
Visual Studio creates a project and class that contains boilerplate code for the HTTP trigger function type. The `FunctionName` method attribute sets the name of the function, which by default is `Function1`. The `HttpTrigger` attribute specifies that the function is triggered by an HTTP request. The boilerplate code sends an HTTP response that includes a value from the request body or query string.
3032

31-
You can expand the capabilities of your function using input and output bindings by applying the appropriate attributes to the method. For more information, see the [Triggers and bindings](functions-dotnet-class-library.md#triggers-and-bindings) section of the [Azure Functions C# developer reference](functions-dotnet-class-library.md).
33+
Expand the capabilities of your function with input and output bindings by applying the appropriate attributes to the method. For more information, see the [Triggers and bindings](functions-dotnet-class-library.md#triggers-and-bindings) section of the [Azure Functions C# developer reference](functions-dotnet-class-library.md).
3234

3335
Now that you've created your function project and an HTTP-triggered function, you can test it on your local computer.
3436

3537
## Run the function locally
3638

37-
Visual Studio integrates with Azure Functions Core Tools so that you can test your functions locally using the full Functions runtime.
39+
Visual Studio integrates with Azure Functions Core Tools so that you can test your functions locally using the full Azure Functions runtime.
3840

3941
[!INCLUDE [functions-run-function-test-local-vs](../../includes/functions-run-function-test-local-vs.md)]
4042

41-
After you have verified that the function runs correctly on your local computer, it's time to publish the project to Azure.
43+
After you've verified that the function runs correctly on your local computer, it's time to publish the project to Azure.
4244

4345
## Publish the project to Azure
4446

45-
You must have a function app in your Azure subscription before you can publish your project. Visual Studio publishing creates a function app for you the first time you publish your project.
47+
Before you can publish your project, you must have a function app in your Azure subscription. Visual Studio publishing creates a function app for you the first time you publish your project.
4648

4749
[!INCLUDE [Publish the project to Azure](../../includes/functions-vstools-publish.md)]
4850

4951
## Test your function in Azure
5052

51-
1. Copy the base URL of the function app from the Publish profile page. Replace the `localhost:port` portion of the URL you used when testing the function locally with the new base URL. As before, make sure to append the query string `?name=<YOUR_NAME>` to this URL and execute the request.
53+
1. Copy the base URL of the function app from the **Publish** profile page. Replace the `localhost:port` portion of the URL you used to test the function locally with the new base URL. Append the query string `?name=<YOUR_NAME>` to this URL and run the request.
5254

53-
The URL that calls your HTTP triggered function should be in the following format:
55+
The URL that calls your HTTP triggered function is in the following format:
5456

55-
http://<APP_NAME>.azurewebsites.net/api/<FUNCTION_NAME>?name=<YOUR_NAME>
57+
`http://<APP_NAME>.azurewebsites.net/api/<FUNCTION_NAME>?name=<YOUR_NAME>`
5658

57-
2. Paste this new URL for the HTTP request into your browser's address bar. The following shows the response in the browser to the remote GET request returned by the function:
59+
2. Paste this new URL for the HTTP request into your browser's address bar. The following image shows the response in the browser to the remote GET request returned by the function:
5860

5961
![Function response in the browser](./media/functions-create-your-first-function-visual-studio/functions-create-your-first-function-visual-studio-browser-azure.png)
6062

63+
## Clean up resources
64+
65+
[!INCLUDE [Clean-up resources](../../includes/functions-quickstart-cleanup.md)]
66+
6167
## Next steps
6268

63-
You have used Visual Studio to create and publish a C# function app in Azure with a simple HTTP triggered function. To learn more about developing functions as .NET class libraries, see [Azure Functions C# developer reference](functions-dotnet-class-library.md).
69+
In this quickstart, you used Visual Studio to create and publish a C# function app in Azure with a simple HTTP triggered function.
6470

71+
Advance to the next article to learn how to add an Azure Storage queue binding to your function:
6572
> [!div class="nextstepaction"]
6673
> [Add an Azure Storage queue binding to your function](functions-add-output-binding-storage-queue-vs.md)
74+
4.59 KB
Loading
4.6 KB
Loading
-41.2 KB
Loading
-86.9 KB
Loading
2.45 KB
Loading
-4.08 KB
Loading
-30.4 KB
Loading

includes/functions-create-function-app-portal.md

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,58 +5,53 @@ services: functions
55
author: ggailey777
66
ms.service: azure-functions
77
ms.topic: include
8-
ms.date: 10/17/2019
8+
ms.date: 03/04/2020
99
ms.author: glenga
1010
ms.custom: include file
1111
---
1212

13-
1. From the Azure portal menu, select **Create a resource**.
14-
15-
![Add resource by using the Azure portal menu](./media/functions-create-function-app-portal/create-function-app-resource.png)
13+
1. From the Azure portal menu or the **Home** page, select **Create a resource**.
1614

1715
1. In the **New** page, select **Compute** > **Function App**.
1816

19-
1. Use the function app settings as specified in the table below the image.
20-
21-
![Basics](./media/functions-create-function-app-portal/function-app-create-basics.png)
17+
1. On the **Basics** page, use the function app settings as specified in the following table.
2218

2319
| Setting | Suggested value | Description |
2420
| ------------ | ---------------- | ----------- |
2521
| **Subscription** | Your subscription | The subscription under which this new function app is created. |
2622
| **[Resource Group](../articles/azure-resource-manager/management/overview.md)** | *myResourceGroup* | Name for the new resource group in which to create your function app. |
2723
| **Function App name** | Globally unique name | Name that identifies your new function app. Valid characters are `a-z` (case insensitive), `0-9`, and `-`. |
2824
|**Publish**| Code | Option to publish code files or a Docker container. |
29-
| **Runtime stack** | Preferred language | Choose a runtime that supports your favorite function programming language. Choose **.NET** for C# and F# functions. |
25+
| **Runtime stack** | Preferred language | Choose a runtime that supports your favorite function programming language. Choose **.NET Core** for C# and F# functions. |
26+
|**Version**| Version number | Choose the version of your installed runtime. |
3027
|**Region**| Preferred region | Choose a [region](https://azure.microsoft.com/regions/) near you or near other services your functions access. |
3128

32-
Select the **Next : Hosting >** button.
33-
34-
1. Enter the following settings for hosting.
29+
![Basics](./media/functions-create-function-app-portal/function-app-create-basics.png)
3530

36-
![Hosting](./media/functions-create-function-app-portal/function-app-create-hosting.png)
31+
1. Select **Next : Hosting**. On the **Hosting** page, enter the following settings.
3732

3833
| Setting | Suggested value | Description |
3934
| ------------ | ---------------- | ----------- |
40-
| **[Storage account](../articles/storage/common/storage-account-create.md)** | Globally unique name | Create a storage account used by your function app. Storage account names must be between 3 and 24 characters in length and may contain numbers and lowercase letters only. You can also use an existing account, which must meet the [storage account requirements](../articles/azure-functions/functions-scale.md#storage-account-requirements). |
35+
| **[Storage account](../articles/storage/common/storage-account-create.md)** | Globally unique name | Create a storage account used by your function app. Storage account names must be between 3 and 24 characters in length and can contain numbers and lowercase letters only. You can also use an existing account, which must meet the [storage account requirements](../articles/azure-functions/functions-scale.md#storage-account-requirements). |
4136
|**Operating system**| Preferred operating system | An operating system is pre-selected for you based on your runtime stack selection, but you can change the setting if necessary. |
42-
| **[Plan](../articles/azure-functions/functions-scale.md)** | Consumption plan | Hosting plan that defines how resources are allocated to your function app. In the default **Consumption Plan**, resources are added dynamically as required by your functions. In this [serverless](https://azure.microsoft.com/overview/serverless-computing/) hosting, you only pay for the time your functions run. When you run in an App Service plan, you must manage the [scaling of your function app](../articles/azure-functions/functions-scale.md). |
43-
44-
Select the **Next : Monitoring >** button.
37+
| **[Plan](../articles/azure-functions/functions-scale.md)** | **Consumption (Serverless)** | Hosting plan that defines how resources are allocated to your function app. In the default **Consumption** plan, resources are added dynamically as required by your functions. In this [serverless](https://azure.microsoft.com/overview/serverless-computing/) hosting, you pay only for the time your functions run. When you run in an App Service plan, you must manage the [scaling of your function app](../articles/azure-functions/functions-scale.md). |
4538

46-
1. Enter the following settings for monitoring.
39+
![Hosting](./media/functions-create-function-app-portal/function-app-create-hosting.png)
4740

48-
![Monitoring](./media/functions-create-function-app-portal/function-app-create-monitoring.png)
41+
1. Select **Next : Monitoring**. On the **Monitoring** page, enter the following settings.
4942

5043
| Setting | Suggested value | Description |
5144
| ------------ | ---------------- | ----------- |
5245
| **[Application Insights](../articles/azure-functions/functions-monitoring.md)** | Default | Creates an Application Insights resource of the same *App name* in the nearest supported region. By expanding this setting, you can change the **New resource name** or choose a different **Location** in an [Azure geography](https://azure.microsoft.com/global-infrastructure/geographies/) where you want to store your data. |
5346

54-
Select **Review + Create** to review the app configuration selections.
47+
![Monitoring](./media/functions-create-function-app-portal/function-app-create-monitoring.png)
48+
49+
1. Select **Review + create** to review the app configuration selections.
5550

56-
1. Select **Create** to provision and deploy the function app.
51+
1. On the **Review + create** page, review your settings, and then select **Create** to provision and deploy the function app.
5752

5853
1. Select the Notification icon in the upper-right corner of the portal and watch for the **Deployment succeeded** message.
5954

60-
![Deployment notification](./media/functions-create-function-app-portal/function-app-create-notification2.png)
61-
6255
1. Select **Go to resource** to view your new function app. You can also select **Pin to dashboard**. Pinning makes it easier to return to this function app resource from your dashboard.
56+
57+
![Deployment notification](./media/functions-create-function-app-portal/function-app-create-notification2.png)

0 commit comments

Comments
 (0)