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/how-to-create-function-azure-cli.md
+17-17Lines changed: 17 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,9 +13,7 @@ In this article, you use local command-line tools to create a function that resp
13
13
14
14
Completing this quickstart incurs a small cost of a few USD cents or less in your Azure account.
15
15
16
-
## Configure your local environment
17
-
18
-
Before you begin, you must have the following:
16
+
## Prerequisites
19
17
20
18
+ An Azure account with an active subscription. [Create an account for free](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio).
21
19
@@ -219,7 +217,7 @@ At this point, the Functions host is able to connect to the storage account secu
219
217
::: zone pivot="programming-language-java"
220
218
## Update the pom.xml file
221
219
222
-
After you've successfully created your function app in Azure, you must update the pom.xml file. In this way, Maven can deploy to your new app instead of trying to create new Azure resources.
220
+
After you successfully created your function app in Azure, you must update the pom.xml file so that Maven can deploy to your new app. Otherwise, it creates new set of Azure resources.
223
221
224
222
1. In Azure Cloud Shell, use this [`az functionapp show`](/cli/azure/functionapp#az-functionapp-show) command to get the deployment container URL and ID of the new user-assigned managed identity:
225
223
@@ -231,7 +229,7 @@ After you've successfully created your function app in Azure, you must update th
231
229
232
230
In this example, replace `<APP_NAME>` with the names of your function app.
233
231
234
-
1. In the project root directory, open the pom.xml file in a text editor, locate the `properties` element and make updates to these specific values:
232
+
1. In the project root directory, open the pom.xml file in a text editor, locate the `properties` element, and make updates to these specific property values:
235
233
236
234
| Property name | Value |
237
235
| ---- | ---- |
@@ -246,7 +244,7 @@ After you've successfully created your function app in Azure, you must update th
@@ -266,14 +264,14 @@ After you've successfully created your function app in Azure, you must update th
266
264
</configuration>
267
265
```
268
266
269
-
1. In the new `configuration` element, make these specific replacements of the elipses (`...`) values:
267
+
1. In the new `configuration` element, make these specific replacements of the ellipses (`...`) values:
270
268
271
269
| Configuration | Value |
272
270
| ---- | ---- |
273
271
|`region` | The region code of your existing function app, such as `eastus`. |
274
272
|`deploymentStorageAccount`| The name of your storage account. |
275
-
|`deploymentStorageContainer`| The name of the deployment share, which comes after the `\` in the `containerUrl` value you just obtained. |
276
-
|`userAssignedIdentityResourceId`| The fully-qualified ID of your managed identity, which you just obtained. |
273
+
|`deploymentStorageContainer`| The name of the deployment share, which comes after the `\` in the `containerUrl` value you obtained. |
274
+
|`userAssignedIdentityResourceId`| The fullyqualified ID of your managed identity, which you obtained. |
277
275
278
276
1. Save your changes to the _pom.xml_ file.
279
277
@@ -287,11 +285,7 @@ You can now use Maven to deploy your code project to your existing app.
287
285
mvn clean package azure-functions:deploy
288
286
```
289
287
290
-
## Invoke the function on Azure
291
-
292
-
Because your function uses an HTTP trigger and supports GET requests, you invoke it by making an HTTP request to its URL. It's easiest to do this in a browser.
293
-
294
-
1. Use this [`az functionapp function show`](/cli/azure/functionapp/function#az-functionapp-function-show) to get the URL for the `HttpExample` function endpoint:
288
+
1. After your deployment succeeds, use this [`az functionapp function show`](/cli/azure/functionapp/function#az-functionapp-function-show) to get the URL of the remote `HttpExample` function endpoint:
295
289
296
290
```azurecli
297
291
az functionapp function show --name <APP_NAME> --resource-group "AzureFunctionsQuickstart-rg" \
@@ -300,13 +294,19 @@ Because your function uses an HTTP trigger and supports GET requests, you invoke
300
294
301
295
In this example, replace `<APP_NAME>` with the names of your function app.
302
296
303
-
1. Copy and paste the returned endpoint URL in your browser address bar and run the function.
297
+
1. Copy the returned endpoint URL, which you next use to invoke the function endpoint.
304
298
::: zone-end
305
-
::: zone pivot="programming-language-csharp,programming-language-javascript,programming-language-typescript,programming-language-powershell,programming-language-python"
299
+
306
300
## Invoke the function on Azure
307
301
308
-
Because your function uses an HTTP trigger and supports GET requests, you invoke it by making an HTTP request to its URL. It's easiest to do this in a browser. Copy the complete **Invoke URL** shown in the output of the publish command into a browser address bar. When you navigate to this URL, the browser should display similar output as when you ran the function locally.
302
+
Because your function uses an HTTP trigger and supports GET requests, you invoke it by making an HTTP request to its URL. It's easiest to do execute a GET request in a browser.
303
+
::: zone pivot="programming-language-csharp,programming-language-javascript,programming-language-typescript,programming-language-powershell,programming-language-python"
304
+
Copy the complete **Invoke URL** shown in the output of the publish command into a browser address bar.
305
+
::: zone-end
306
+
::: zone pivot="programming-language-java"
307
+
Paste the URL you copied into a browser address bar.
309
308
::: zone-end
309
+
When you navigate to this URL, the browser should display similar output as when you ran the function locally.
0 commit comments