Skip to content

Commit b443bb8

Browse files
authored
Merge pull request #192149 from timwarner-msft/patch-8
Remove "Try-It" button from CLI code examples
2 parents 177f6b2 + 0776ed5 commit b443bb8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

articles/governance/resource-graph/concepts/explore-resources.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Resources
2727
| limit 1
2828
```
2929

30-
```azurecli-interactive
30+
```azurecli
3131
az graph query -q "Resources | where type =~ 'Microsoft.Compute/virtualMachines' | limit 1"
3232
```
3333

@@ -122,7 +122,7 @@ Resources
122122
| summarize count() by location
123123
```
124124

125-
```azurecli-interactive
125+
```azurecli
126126
az graph query -q "Resources | where type =~ 'Microsoft.Compute/virtualMachines' | summarize count() by location"
127127
```
128128

@@ -164,7 +164,7 @@ Resources
164164
| project name, resourceGroup
165165
```
166166

167-
```azurecli-interactive
167+
```azurecli
168168
az graph query -q "Resources | where type =~ 'Microsoft.Compute/virtualMachines' and properties.hardwareProfile.vmSize == 'Standard_B2s' | project name, resourceGroup"
169169
```
170170

@@ -185,7 +185,7 @@ Resources
185185
| project disk.id
186186
```
187187

188-
```azurecli-interactive
188+
```azurecli
189189
az graph query -q "Resources | where type =~ 'Microsoft.Compute/virtualmachines' and properties.hardwareProfile.vmSize == 'Standard_B2s' | extend disk = properties.storageProfile.osDisk.managedDisk | where disk.storageAccountType == 'Premium_LRS' | project disk.id"
190190
```
191191

@@ -225,7 +225,7 @@ record would be returned and the **type** property on it provides that detail.
225225
> [!NOTE]
226226
> For this example to work, you must replace the ID field with a result from your own environment.
227227
228-
```azurecli-interactive
228+
```azurecli
229229
az graph query -q "Resources | where type =~ 'Microsoft.Compute/disks' and id == '/subscriptions/<subscriptionId>/resourceGroups/MyResourceGroup/providers/Microsoft.Compute/disks/ContosoVM1_OsDisk_1_9676b7e1b3c44e2cb672338ebe6f5166'"
230230
```
231231

@@ -274,7 +274,7 @@ virtual machines. Then the queries use the list of NICs to find each IP address
274274
public IP address and store those values. Finally, the queries provide a list of the public IP
275275
addresses.
276276

277-
```azurecli-interactive
277+
```azurecli
278278
# Use Resource Graph to get all NICs and store in the 'nics.txt' file
279279
az graph query -q "Resources | where type =~ 'Microsoft.Compute/virtualMachines' | project nic = tostring(properties['networkProfile']['networkInterfaces'][0]['id']) | where isnotempty(nic) | distinct nic | limit 20" --output table | tail -n +3 > nics.txt
280280
@@ -293,7 +293,7 @@ $nics.nic
293293
Use the file (Azure CLI) or variable (Azure PowerShell) in the next query to get the related network
294294
interface resources details where there's a public IP address attached to the NIC.
295295

296-
```azurecli-interactive
296+
```azurecli
297297
# Use Resource Graph with the 'nics.txt' file to get all related public IP addresses and store in 'publicIp.txt' file
298298
az graph query -q="Resources | where type =~ 'Microsoft.Network/networkInterfaces' | where id in ('$(awk -vORS="','" '{print $0}' nics.txt | sed 's/,$//')') | project publicIp = tostring(properties['ipConfigurations'][0]['properties']['publicIPAddress']['id']) | where isnotempty(publicIp) | distinct publicIp" --output table | tail -n +3 > ips.txt
299299
@@ -312,7 +312,7 @@ $ips.publicIp
312312
Last, use the list of public IP address resources stored in the file (Azure CLI) or variable (Azure
313313
PowerShell) to get the actual public IP address from the related object and display.
314314

315-
```azurecli-interactive
315+
```azurecli
316316
# Use Resource Graph with the 'ips.txt' file to get the IP address of the public IP address resources
317317
az graph query -q="Resources | where type =~ 'Microsoft.Network/publicIPAddresses' | where id in ('$(awk -vORS="','" '{print $0}' ips.txt | sed 's/,$//')') | project ip = tostring(properties['ipAddress']) | where isnotempty(ip) | distinct ip" --output table
318318
```

0 commit comments

Comments
 (0)