'Get a list of all of an Azure Function App's functions & status
With Azure Powershell, how do you get a list of all of a Function App's functions and their respective status (status at the function level, not FunctionApp level)?
I can get a list of FunctionApps with
Get-AzFunctionApp -ResourceGroupName my-resource-group-name
which will give me the FunctionApps and it's FunctionApp.Status but cannot then iterate through these FunctionApps to find a list of each of their functions and the status of those functions.
Solution 1:[1]
I could get one half of the answer (will update the answer, if I get the status of function)
$ResourceGroupName = "RGNAME"
$AppName = "FUNCTIONAPPNAME"
(Get-AzResource -ApiVersion "2022-03-01" -Name $AppName -ResourceGroupName $ResourceGroupName -ResourceType "Microsoft.Web/sites/functions").ResourceName
Update : Getting status also of function
$ResourceGroupName = "RGNAME"
$AppName = "FUNCTIONAPPNAME"
Get-AzResource -ApiVersion "2022-03-01" -Name $AppName -ResourceGroupName $ResourceGroupName -ResourceType "Microsoft.Web/sites/functions/" -ExpandProperties | ConvertTo-Json
Now you get an array of functions. Have a close look at the output. See the green boxes to help you out with the name and status as shown in the reference screenshot
Hope it helps !
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |