You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/azure-functions/create-first-function-cli-csharp-ieux.md
+26-26Lines changed: 26 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ There is also a [Visual Studio Code-based version](create-first-function-vs-code
35
35
36
36
+[Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later.
37
37
38
-
+[Azure PowerShell](/powershell/azure/install-az-ps) version 5.0 or later.
38
+
+The Azure [Az PowerShell module](/powershell/azure/install-az-ps) version 5.9.0 or later.
39
39
40
40
---
41
41
@@ -57,7 +57,7 @@ Verify your prerequisites, which depend on whether you are using the Azure CLI o
57
57
58
58
+**Run**`func --version` to check that the Azure Functions Core Tools are version 3.x.
59
59
60
-
+**Run**`(Get-Module -ListAvailable Az).Version` and verify version 5.0 or later.
60
+
+**Run**`(Get-Module -ListAvailable Az).Version` and verify version 5.0 or later.
61
61
62
62
+**Run**`Connect-AzAccount` to sign in to Azure and verify an active subscription.
63
63
@@ -69,7 +69,7 @@ Verify your prerequisites, which depend on whether you are using the Azure CLI o
69
69
70
70
In this section, you create a local <abbrtitle="A logical container for one or more individual functions that can be deployed and managed together.">Azure Functions project</abbr> in C#. Each function in the project responds to a specific <abbrtitle="An event that invokes the function’s code, such as an HTTP request, a queue message, or a specific time.">trigger</abbr>.
71
71
72
-
1. Run the `func init` command to create a functions project in a folder named *LocalFunctionProj* with the specified runtime:
72
+
1. Run the `func init` command to create a functions project in a folder named *LocalFunctionProj* with the specified runtime:
73
73
74
74
```csharp
75
75
funcinitLocalFunctionProj--dotnet
@@ -83,24 +83,24 @@ In this section, you create a local <abbr title="A logical container for one or
*HttpExample.cs* contains a `Run` method that receives request data in the `req` variable is an [HttpRequest](/dotnet/api/microsoft.aspnetcore.http.httprequest) that's decorated with the **HttpTriggerAttribute**, which defines the trigger behavior.
@@ -147,7 +147,7 @@ In this section, you create a local <abbr title="A logical container for one or
147
147
<br/>
148
148
149
149
---
150
-
150
+
151
151
## 5. Create supporting Azure resources for your function
152
152
153
153
Before you can deploy your function code to Azure, you need to create a <abbr title="A logical container for related Azure resources that you can manage as a unit.">resource group</abbr>, a <abbr title="An account that contains all your Azure storage data objects. The storage account provides a unique namespace for your storage data.">storage account</abbr>, and a <abbr title="The cloud resource that hosts serverless functions in Azure, which provides the underlying compute environment in which functions run.">function app</abbr> by using the following commands:
@@ -160,15 +160,15 @@ Before you can deploy your function code to Azure, you need to create a <abbr ti
160
160
```
161
161
162
162
163
-
# [Azure PowerShell](#tab/azure-powershell)
163
+
# [Azure PowerShell](#tab/azure-powershell)
164
164
```azurepowershell
165
165
Connect-AzAccount
166
166
```
167
167
168
168
169
169
---
170
170
171
-
1. Create a resource group named `AzureFunctionsQuickstart-rg` in the `westeurope` region.
171
+
1. Create a resource group named `AzureFunctionsQuickstart-rg` in the `westeurope` region.
172
172
173
173
# [Azure CLI](#tab/azure-cli)
174
174
@@ -188,7 +188,7 @@ Before you can deploy your function code to Azure, you need to create a <abbr ti
188
188
---
189
189
190
190
You can't host Linux and Windows apps in the same resource group. If you have an existing resource group named `AzureFunctionsQuickstart-rg` with a Windows function app or web app, you must use a different resource group.
191
-
191
+
192
192
1. Create a general-purpose Azure Storage account in your resource group and region:
193
193
194
194
# [Azure CLI](#tab/azure-cli)
@@ -215,24 +215,24 @@ Before you can deploy your function code to Azure, you need to create a <abbr ti
215
215
**Replace** '<APP_NAME>' with a globally unique name.
Replace `<STORAGE_NAME>` with the name of the account you used in the previous step.
234
234
235
-
Replace `<APP_NAME>` with a <abbr title="A name that must be unique across all Azure customers globally. For example, you can use a combination of your personal or organization name, application name, and a numeric identifier, as in contoso-bizapp-func-20.">unique name</abbr>. The `<APP_NAME>` is also the default DNS domain for the function app.
235
+
Replace `<APP_NAME>` with a <abbr title="A name that must be unique across all Azure customers globally. For example, you can use a combination of your personal or organization name, application name, and a numeric identifier, as in contoso-bizapp-func-20.">unique name</abbr>. The `<APP_NAME>` is also the default DNS domain for the function app.
236
236
237
237
<br/>
238
238
<details>
@@ -281,7 +281,7 @@ Functions in msdocs-azurefunctions-qs:
281
281
282
282
## 7. Invoke the function on Azure
283
283
284
-
Copy the complete **Invoke URL** shown in the output of the `publish` command into a browser address bar. **Append** the query parameter **&name=Functions**.
284
+
Copy the complete **Invoke URL** shown in the output of the `publish` command into a browser address bar. **Append** the query parameter **&name=Functions**.
285
285
286
286

@@ -41,7 +41,7 @@ Before you begin, you must have the following:
41
41
42
42
+[Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later.
43
43
44
-
+[Azure PowerShell](/powershell/azure/install-az-ps) version 5.0 or later.
44
+
+The Azure [Az PowerShell module](/powershell/azure/install-az-ps) version 5.9.0 or later.
45
45
46
46
# [Isolated process](#tab/isolated-process)
47
47
@@ -55,7 +55,7 @@ Before you begin, you must have the following:
55
55
56
56
+[Azure CLI](/cli/azure/install-azure-cli) version 2.4 or later.
57
57
58
-
+[Azure PowerShell](/powershell/azure/install-az-ps) version 5.0 or later.
58
+
+The Azure [Az PowerShell module](/powershell/azure/install-az-ps) version 5.9.0 or later.
59
59
---
60
60
::: zone-end
61
61
@@ -81,7 +81,7 @@ Verify your prerequisites, which depend on whether you are using Azure CLI or Az
81
81
82
82
+ Run `dotnet --list-sdks` to check that the required versions are installed.
83
83
84
-
+ Run `(Get-Module -ListAvailable Az).Version` and verify version 5.0 or later.
84
+
+ Run `(Get-Module -ListAvailable Az).Version` and verify version 5.0 or later.
85
85
86
86
+ Run `Connect-AzAccount` to sign in to Azure and verify an active subscription.
87
87
@@ -91,9 +91,9 @@ Verify your prerequisites, which depend on whether you are using Azure CLI or Az
91
91
92
92
In Azure Functions, a function project is a container for one or more individual functions that each responds to a specific trigger. All functions in a project share the same local and hosting configurations. In this section, you create a function project that contains a single function.
93
93
94
-
1. Run the `func init` command, as follows, to create a functions project in a folder named *LocalFunctionProj* with the specified runtime:
94
+
1. Run the `func init` command, as follows, to create a functions project in a folder named *LocalFunctionProj* with the specified runtime:
95
95
96
-
# [In-process](#tab/in-process)
96
+
# [In-process](#tab/in-process)
97
97
98
98
```csharp
99
99
funcinitLocalFunctionProj--dotnet
@@ -118,7 +118,7 @@ In Azure Functions, a function project is a container for one or more individual
>IfHttpExampledoesn't appear as shown above, you likely started the host from outside the root folder of the project. In that case, use **Ctrl**+**C** to stop the host, navigate to the project'srootfolder, andrunthepreviouscommandagain.
TothefunctionURL, appendthequerystring `?name=<YOUR_NAME>`, makingthefullURLlike `http://localhost:7071/api/HttpExample?name=Functions`. The browser should display a response message that echoes back your query string value. The terminal in which you started your project also shows log output as you make requests.
184
184
185
185
# [Isolated process](#tab/isolated-process)
@@ -199,50 +199,50 @@ To learn more, see [Azure Functions HTTP triggers and bindings](./functions-bind
The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdletcreatesthefunctionappinAzure.
226
+
The [New-AzFunctionApp](/powershell/module/az.functions/new-azfunctionapp) cmdletcreatesthefunctionappinAzure.
227
227
228
228
---
229
229
230
230
:::zonepivot="programming-runtime-functions-v4"
231
231
> [!NOTE]
232
232
>Thiscommandcreatesafunctionappusingthe3.xversionoftheAzureFunctionsruntime. The `funcazurefunctionapppublish` commandthatyou'll run later updates the app to version 4.x.
233
233
:::zone-end
234
-
235
-
Inthepreviousexample, replace `<STORAGE_NAME>` withthenameoftheaccountyouusedinthepreviousstep, andreplace `<APP_NAME>` withagloballyuniquenameappropriatetoyou. The `<APP_NAME>` isalsothedefaultDNSdomainforthefunctionapp.
236
-
234
+
235
+
Inthepreviousexample, replace `<STORAGE_NAME>` withthenameoftheaccountyouusedinthepreviousstep, andreplace `<APP_NAME>` withagloballyuniquenameappropriatetoyou. The `<APP_NAME>` isalsothedefaultDNSdomainforthefunctionapp.
236
+
237
237
Thiscommandcreatesafunctionapprunninginyourspecifiedlanguageruntimeunderthe [AzureFunctionsConsumptionPlan](consumption-plan.md), whichisfreefortheamountofusageyouincurhere. ThecommandalsoprovisionsanassociatedAzureApplicationInsightsinstanceinthesameresourcegroup, withwhichyoucanmonitoryourfunctionappandviewlogs. Formoreinformation, see [MonitorAzureFunctions](functions-monitoring.md). Theinstanceincursnocostsuntilyouactivateit.
0 commit comments