Azure Resource Graph: Zero to Hero

%3CLINGO-SUB%20id%3D%22lingo-sub-2403877%22%20slang%3D%22en-US%22%3EAzure%20Resource%20Graph%3A%20Zero%20to%20Hero%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2403877%22%20slang%3D%22en-US%22%3E%3CP%3E%3CEM%3EWritten%20by%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20title%3D%22Billy%20York's%20profile%22%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F152036%22%20target%3D%22_blank%22%3EBilly%20York%3C%2FA%3E%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3Efor%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20title%3D%22ITOps%20Talk%20Blog%20%7C%20Home%22%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fitops-talk-blog%2Fbg-p%2FITOpsTalkBlog%22%20target%3D%22_blank%22%3EITOps%20Talk%20Blog%3C%2FA%3E%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAzure%20Resource%20Graph%20is%20an%20extremely%20powerful%20extension%20to%20Azure%20Resource%20Management%20that%20provides%20efficient%20resource%20exploration%20at%20scale.%20It%20supports%20both%20Azure%20Lighthouse%20as%20well%20as%20cross%20subscription%20querying.%20It%20also%20provides%20the%20ability%20to%20do%20complex%20filtering%20and%20grouping.%20It%20can%20do%20this%20because%20it%20uses%20a%20subset%20of%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20title%3D%22Understanding%20the%20Azure%20Resource%20Graph%20query%20language%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fgovernance%2Fresource-graph%2Fconcepts%2Fquery-language%3FWT.mc_id%3Dmodinfra-27678-socuff%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EKusto%20Query%20Language%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId--442977965%22%20id%3D%22toc-hId--442977965%22%3E%3CSPAN%20class%3D%22mpp-c-heading-3%22%3EAccess%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%3E%26nbsp%3B%3CBR%20%2F%3ETo%20use%20Azure%20Resource%20Graph%20successfully%2C%20you'll%20need%20read%20access%20to%20any%20subscription%20and%20resource(s)%20that%20you%20wish%20to%20query.%20If%20you%20do%20not%20have%20read%20access%20to%20a%20resource%20or%20subscription%20they%20will%20not%20appear%20in%20your%20resulting%20data%20sets.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EQueries%20can%20be%20run%20against%20the%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20title%3D%22Azure%20Resource%20Graph%20Resources%20-%20resources%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Frest%2Fapi%2Fazureresourcegraph%2Fresourcegraph(2019-04-01)%2Fresources%2Fresources%3FWT.mc_id%3Dmodinfra-27678-socuff%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EAzure%20Resource%20Graph%20API%3C%2FA%3E%2C%20with%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3CA%20title%3D%22Quickstart%3A%20Run%20your%20first%20Resource%20Graph%20query%20using%20Azure%20PowerShell%22%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fgovernance%2Fresource-graph%2Ffirst-query-powershell%3FWT.mc_id%3Dmodinfra-27678-socuff%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noreferrer%22%3EPowerShell%3C%2FA%3E%2C%20or%20in%20the%20Azure%20portal.%20This%20post%20will%20use%20the%20Azure%20portal%20for%20its%20examples.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH2%20id%3D%22toc-hId-2044534868%22%20id%3D%22toc-hId-2044534868%22%3E%3CSPAN%20class%3D%22mpp-c-heading-3%22%3EResource%20Types%3C%2FSPAN%3E%3C%2FH2%3E%0A%3CP%20class%3D%22%22%3E%26nbsp%3B%3CBR%20%2F%3EThere%20are%20a%20number%20of%20tables%20you%20can%20query%20in%20Azure%20Resource%20Graph.%20The%20most%20common%20table%20is%20the%20%22resources%22%20table.%20This%20is%20where%20all%20resources%20in%20your%20Azure%20subscriptions%20will%20live.%20With%20few%20exceptions%20everything%20in%20Azure%20is%20a%20resource.%20Notably%20Azure%20Sentinel%20and%20Azure%20Security%20Center%20are%20not%20resources%2C%20they%20are%20solutions%20that%20sit%20on%20top%20of%20a%20Log%20Analytics%20workspace.%3C%2FP%3E%0A%3CP%20class%3D%22%22%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%20class%3D%22%22%3E%3CA%20title%3D%22Azure%20Resource%20Graph%3A%20Zero%20to%20Hero%22%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fitops-talk-blog%2Fazure-resource-graph-zero-to-hero%2Fba-p%2F2303572%22%20target%3D%22_self%22%3E%3CSTRONG%3ERead%20the%20full%20article%3C%2FSTRONG%3E%3C%2FA%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E
Microsoft

Written by Billy York for the ITOps Talk Blog

 

Azure Resource Graph is an extremely powerful extension to Azure Resource Management that provides efficient resource exploration at scale. It supports both Azure Lighthouse as well as cross subscription querying. It also provides the ability to do complex filtering and grouping. It can do this because it uses a subset of the Kusto Query Language.

 

Access

 
To use Azure Resource Graph successfully, you'll need read access to any subscription and resource(s) that you wish to query. If you do not have read access to a resource or subscription they will not appear in your resulting data sets.

 

Queries can be run against the Azure Resource Graph API, with PowerShell, or in the Azure portal. This post will use the Azure portal for its examples.

 

Resource Types

 
There are a number of tables you can query in Azure Resource Graph. The most common table is the "resources" table. This is where all resources in your Azure subscriptions will live. With few exceptions everything in Azure is a resource. Notably Azure Sentinel and Azure Security Center are not resources, they are solutions that sit on top of a Log Analytics workspace.

 

Read the full article

0 Replies