I'm new with Azure Resource Graph, and I'm trying to get all the functions from a function app.
Firstly, I created a query to get the function apps :
resources
| where type == 'microsoft.web/sites'
| where properties['kind'] == 'functionapp'
Then I searched in the function app properties if functions were listed, but there are no information about it. So, I inspected the JSON definition of one function contained in a function app, and the type of the resource is "Microsoft.Web/sites/functions". But when I run a query using the type I get no results.
How should I do to get the functions contained in a function app using Azure Resource Graph ?
Thank you :)
As of now there is no specific Azure Resource Graph table to fetch all Functions present in the Function App. The supported tables for resource type have mentioned in the Ms-Doc.
If you want to fetch all Function Name present in the Function App use Azure PowerShell to get.
$ResourceGroupName = "<Resource Group Name>"
$FunAppName = "<Your Function App Name>"
(Get-AzResource -ApiVersion "2022-03-01" -Name $FunAppName -ResourceGroupName $ResourceGroupName -ResourceType "Microsoft.Web/sites/functions").ResourceName