@@ -19,7 +19,7 @@ and create a Resource Graph shared query.
19
19
If you don't have an Azure subscription, create a [ free] ( https://azure.microsoft.com/free/ ) account
20
20
before you begin.
21
21
22
- [ !INCLUDE [ cloud-shell-try-it.md] ( ../../../includes/cloud-shell-try-it.md )]
22
+ <!-- [!INCLUDE [cloud-shell-try-it.md](../../../includes/cloud-shell-try-it.md)] -->
23
23
24
24
## Add the Resource Graph extension
25
25
@@ -35,15 +35,15 @@ Docker image](https://hub.docker.com/_/microsoft-azure-cli), or locally installe
35
35
[ az extension add] ( /cli/azure/extension#az_extension_add ) to import the Resource Graph extension
36
36
with the following command:
37
37
38
- ``` azurecli-interactive
38
+ ``` azurecli
39
39
# Add the Resource Graph extension to the Azure CLI environment
40
40
az extension add --name resource-graph
41
41
```
42
42
43
43
1 . Validate that the extension has been installed and is the expected version (at least ** 1.1.0** )
44
44
with [ az extension list] ( /cli/azure/extension#az_extension_list ) :
45
45
46
- ``` azurecli-interactive
46
+ ``` azurecli
47
47
# Check the extension list (note that you may have other extensions installed)
48
48
az extension list
49
49
@@ -62,7 +62,7 @@ _location_.
62
62
Azure Resource Graph shared query. This resource group is named ` resource-graph-queries ` and the
63
63
location is ` westus2 ` .
64
64
65
- ``` azurecli-interactive
65
+ ``` azurecli
66
66
# Login first with az login if not using Cloud Shell
67
67
68
68
# Create the resource group
@@ -73,7 +73,7 @@ _location_.
73
73
[ az graph shared-query create] ( /cli/azure/graph/shared-query#az_graph_shared_query_create )
74
74
command:
75
75
76
- ``` azurecli-interactive
76
+ ``` azurecli
77
77
# Create the Azure Resource Graph shared query
78
78
az graph shared-query create --name 'Summarize resources by location' \
79
79
--description 'This shared query summarizes resources by location for a pinnable map graphic.' \
@@ -85,7 +85,7 @@ _location_.
85
85
[ az graph shared-query list] ( /cli/azure/graph/shared-query#az_graph_shared_query_list )
86
86
command returns an array of values.
87
87
88
- ``` azurecli-interactive
88
+ ``` azurecli
89
89
# List all the Azure Resource Graph shared queries in a resource group
90
90
az graph shared-query list --resource-group 'resource-graph-queries'
91
91
```
@@ -94,7 +94,7 @@ _location_.
94
94
[ az graph shared-query show] ( /cli/azure/graph/shared-query#az_graph_shared_query_show )
95
95
command.
96
96
97
- ``` azurecli-interactive
97
+ ``` azurecli
98
98
# Show a specific Azure Resource Graph shared query
99
99
az graph shared-query show --resource-group 'resource-graph-queries' \
100
100
--name 'Summarize resources by location'
@@ -106,7 +106,7 @@ _location_.
106
106
` shared-query-uri ` text in the example with the value from the ` id ` field, but leave the
107
107
surrounding ` {{ ` and ` }} ` characters.
108
108
109
- ``` azurecli-interactive
109
+ ``` azurecli
110
110
# Run a Azure Resource Graph shared query
111
111
az graph query --graph-query "{{shared-query-uri}}"
112
112
```
@@ -128,7 +128,7 @@ CLI environment, you can do so by using the following commands:
128
128
- [ az group delete] ( /cli/azure/group#az_group_delete )
129
129
- [ az extension remove] ( /cli/azure/extension#az_extension_remove )
130
130
131
- ``` azurecli-interactive
131
+ ``` azurecli
132
132
# Delete the Azure Resource Graph shared query
133
133
az graph shared-query delete --resource-group 'resource-graph-queries' \
134
134
--name 'Summarize resources by location'
0 commit comments