Skip to content

Commit c7f4f5f

Browse files
Merge pull request #286232 from ggailey777/patch-4
[Functions] azd quickstart replace bash with PS for PS version
2 parents ab2c009 + 3e13eef commit c7f4f5f

File tree

1 file changed

+40
-5
lines changed

1 file changed

+40
-5
lines changed

articles/azure-functions/create-first-function-azure-developer-cli.md

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create functions in Azure using the Azure Developer CLI
33
description: "Learn how to use the Azure Developer CLI (azd) to create resources and deploy the local project to a Flex Consumption plan on Azure."
4-
ms.date: 08/27/2024
4+
ms.date: 09/04/2024
55
ms.topic: quickstart
66
zone_pivot_groups: programming-languages-set-functions
77
#Customer intent: As a developer, I need to know how to use the Azure Developer CLI to create and deploy my function code securely to a new function app in the Flex Consumption plan in Azure by using azd templates and the azd up command.
@@ -26,7 +26,9 @@ By default, the Flex Consumption plan follows a _pay-for-what-you-use_ billing m
2626
+ [Azure Functions Core Tools](functions-run-local.md#install-the-azure-functions-core-tools).
2727

2828
::: zone pivot="programming-language-csharp"
29-
+ [.NET 8.0 SDK](https://dotnet.microsoft.com/download).
29+
+ [.NET 8.0 SDK](https://dotnet.microsoft.com/download)
30+
31+
+ [Azurite storage emulator](../storage/common/storage-use-azurite.md?tabs=npm#install-azurite)
3032
::: zone-end
3133
::: zone pivot="programming-language-java"
3234
+ [Java 17 Developer Kit](/azure/developer/java/fundamentals/java-support-on-azure)
@@ -280,7 +282,7 @@ py -m venv .venv
280282

281283
1. When you're done, press Ctrl+C in the terminal window to stop the `func.exe` host process.
282284
::: zone pivot="programming-language-python"
283-
5. Run `deactivate` to shut down the virtual environment.
285+
5. Run `deactivate` to shut down the virtual environment.
284286
::: zone-end
285287

286288
## Review the code (optional)
@@ -336,6 +338,24 @@ This `run.ps1` file implements the function code:
336338

337339
---
338340

341+
::: zone pivot="programming-language-csharp"
342+
You can review the complete template project [here](https://github.com/Azure-Samples/functions-quickstart-dotnet-azd).
343+
::: zone-end
344+
::: zone pivot="programming-language-java"
345+
You can review the complete template project [here](https://github.com/Azure-Samples/azure-functions-java-flex-consumption-azd).
346+
::: zone-end
347+
::: zone pivot="programming-language-javascript"
348+
You can review the complete template project [here](https://github.com/Azure-Samples/functions-quickstart-javascript-azd).
349+
::: zone-end
350+
::: zone pivot="programming-language-typescript"
351+
You can review the complete template project [here](https://github.com/Azure-Samples/functions-quickstart-typescript-azd).
352+
::: zone-end
353+
::: zone pivot="programming-language-powershell"
354+
You can review the complete template project [here](https://github.com/Azure-Samples/functions-quickstart-powershell-azd).
355+
::: zone-end
356+
::: zone pivot="programming-language-python"
357+
You can review the complete template project [here](https://github.com/Azure-Samples/functions-quickstart-python-http-azd).
358+
::: zone-end
339359
After you verify your functions locally, it's time to publish them to Azure.
340360
::: zone pivot="programming-language-java"
341361
## Create Azure resources
@@ -451,7 +471,7 @@ You can now invoke your function endpoints in Azure by making HTTP requests to t
451471
You can use the Core Tools to obtain the URL endpoints of your functions running in Azure.
452472

453473
1. In your local terminal or command prompt, run these commands to get the URL endpoint values:
454-
474+
::: zone pivot="programming-language-csharp,programming-language-javascript,programming-language-typescript,programming-language-java,programming-language-python"
455475
### [bash](#tab/bash)
456476

457477
```bash
@@ -464,12 +484,27 @@ You can use the Core Tools to obtain the URL endpoints of your functions running
464484
for /f "tokens=*" %i in ('azd env get-value AZURE_FUNCTION_NAME') do set APP_NAME=%i
465485
func azure functionapp list-functions %APP_NAME% --show-keys
466486
```
487+
---
488+
489+
::: zone-end
490+
::: zone pivot="programming-language-powershell"
491+
### [PowerShell](#tab/powershell)
492+
```powershell
493+
$APP_NAME = azd env get-value AZURE_FUNCTION_NAME
494+
func azure functionapp list-functions $APP_NAME --show-keys
495+
```
467496

497+
### [Cmd](#tab/cmd2)
498+
```cmd
499+
for /f "tokens=*" %i in ('azd env get-value AZURE_FUNCTION_NAME') do set APP_NAME=%i
500+
func azure functionapp list-functions %APP_NAME% --show-keys
501+
```
468502
---
469503

504+
::: zone-end
470505
The `azd env get-value` command gets your function app name from the local environment. Using the `--show-keys` option with `func azure functionapp list-functions` means that the returned **Invoke URL:** value for each endpoint includes a function-level access key.
471506

472-
1. As before, use your HTTP test tool to validate these URLs in your function app running in Azure.
507+
2. As before, use your HTTP test tool to validate these URLs in your function app running in Azure.
473508
::: zone pivot="programming-language-csharp,programming-language-javascript,programming-language-typescript,programming-language-powershell,programming-language-python"
474509
## Redeploy your code
475510

0 commit comments

Comments
 (0)