From ea80aa8ac73b727277a58eee1f6ced1b158d0950 Mon Sep 17 00:00:00 2001 From: Bert-Janp Date: Fri, 22 Mar 2024 19:17:15 +0100 Subject: [PATCH] Create AzureResourceCount.md --- .../Functions/AzureResourceCount.md | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Azure Resource Graph/Functions/AzureResourceCount.md diff --git a/Azure Resource Graph/Functions/AzureResourceCount.md b/Azure Resource Graph/Functions/AzureResourceCount.md new file mode 100644 index 0000000..3d86807 --- /dev/null +++ b/Azure Resource Graph/Functions/AzureResourceCount.md @@ -0,0 +1,21 @@ +# Function: ResourcesCount() + +## Query Information + +#### Description +Count the number of Azure Resources for each subscription. + +#### References +- https://learn.microsoft.com/en-us/azure/governance/resource-graph/overview +- https://learn.microsoft.com/en-us/azure/governance/resource-graph/samples/starter?tabs=azure-portal + +## Log Analytics (Sentinel) +``` +let ResourcesCount = () { + arg("").Resources + | summarize TotalResources = count() by subscriptionId +}; +ResourcesCount() +``` + +