Skip to content

Commit 69d591d

Browse files
authored
Merge pull request #116820 from DCtheGeek/dmc-arg-fixanchors
Fixing anchors from template change
2 parents 959acbb + 28bd116 commit 69d591d

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

articles/governance/resource-graph/first-query-portal.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ functions to achieve your intended results.
7373
After running the last query above, if you select the **Charts** tab, you get a message that "the
7474
result set isn't compatible with a pie chart visualization." Queries that list results can't be made
7575
into a chart, but queries that provide counts of resources can. Using the
76-
[Sample query - Count virtual machines by OS type](./samples/starter.md#count-virtual-machines-by-os-type),
76+
[Sample query - Count virtual machines by OS type](./samples/starter.md#count-os),
7777
let's create a visualization from the Resource Graph query.
7878

7979
1. In the **Query 1** portion of the window, enter the following query and select **Run query**.

articles/governance/resource-graph/samples/advanced.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Graph. Before running any of the following queries, check that your environment
3838
PowerShell](../first-query-powershell.md#add-the-resource-graph-module) for steps to install and
3939
validate your shell environment of choice.
4040

41-
## <a name="apiversion" />Show resource types and API versions
41+
## <a name="apiversion"></a>Show resource types and API versions
4242

4343
Resource Graph primarily uses the most recent non-preview version of a Resource Provider's API to
4444
`GET` resource properties during an update. In some cases, the API version used has been overridden
@@ -74,7 +74,7 @@ Search-AzGraph -Query "Resources | distinct type, apiVersion | where isnotnull(a
7474

7575
---
7676

77-
## <a name="vmss-capacity" />Get virtual machine scale set capacity and size
77+
## <a name="vmss-capacity"></a>Get virtual machine scale set capacity and size
7878

7979
This query looks for virtual machine scale set resources and gets various details including the
8080
virtual machine size and the capacity of the scale set. The query uses the `toint()` function to
@@ -111,7 +111,7 @@ Search-AzGraph -Query "Resources | where type=~ 'microsoft.compute/virtualmachin
111111

112112
---
113113

114-
## <a name="remove-column" />Remove columns from results
114+
## <a name="remove-column"></a>Remove columns from results
115115

116116
The following query uses `summarize` to count resources by subscription, `join` to combine it with
117117
subscription details from _ResourceContainers_ table, then `project-away` to remove some of the
@@ -146,7 +146,7 @@ Search-AzGraph -Query "Resources | summarize resourceCount=count() by subscripti
146146

147147
---
148148

149-
## <a name="list-all-tags" />List all tag names
149+
## <a name="list-all-tags"></a>List all tag names
150150

151151
This query starts with the tag and builds a JSON object listing all unique tag names and their
152152
corresponding types.
@@ -179,7 +179,7 @@ Search-AzGraph -Query "Resources | project tags | summarize buildschema(tags)"
179179

180180
---
181181

182-
## <a name="vm-regex" />Virtual machines matched by regex
182+
## <a name="vm-regex"></a>Virtual machines matched by regex
183183

184184
This query looks for virtual machines that match a [regular expression](/dotnet/standard/base-types/regular-expression-language-quick-reference)
185185
(known as _regex_). The **matches regex \@** allows us to define the regex to match, which is `^Contoso(.*)[0-9]+$`.
@@ -225,7 +225,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.compute/virtualmachi
225225

226226
---
227227

228-
## <a name="mvexpand-cosmosdb" />List Cosmos DB with specific write locations
228+
## <a name="mvexpand-cosmosdb"></a>List Cosmos DB with specific write locations
229229

230230
The following query limits to Cosmos DB resources, uses `mv-expand` to expand the property bag for
231231
**properties.writeLocations**, then project specific fields and limit the results further to
@@ -263,7 +263,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.documentdb/databasea
263263

264264
---
265265

266-
## <a name="join" />Key vault with subscription name
266+
## <a name="join"></a>Key vault with subscription name
267267

268268
The following query shows a complex use of `join`. The query limits the joined table to
269269
subscriptions resources and with `project` to include only the original field _subscriptionId_ and
@@ -302,7 +302,7 @@ Search-AzGraph -Query "Resources | join (ResourceContainers | where type=='micro
302302

303303
---
304304

305-
## <a name="join-sql" />List SQL Databases and their elastic pools
305+
## <a name="join-sql"></a>List SQL Databases and their elastic pools
306306

307307
The following query uses **leftouter** `join` to bring together SQL Database resources and their
308308
related elastic pools, if they have any.
@@ -341,7 +341,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.sql/servers/database
341341

342342
---
343343

344-
## <a name="join-vmpip" />List virtual machines with their network interface and public IP
344+
## <a name="join-vmpip"></a>List virtual machines with their network interface and public IP
345345

346346
This query uses two **leftouter** `join` commands to bring together virtual machines, their related
347347
network interfaces, and any public IP address related to those network interfaces.
@@ -393,7 +393,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.compute/virtualmachi
393393

394394
---
395395

396-
## <a name="join-findstoragetag" />Find storage accounts with a specific tag on the resource group
396+
## <a name="join-findstoragetag"></a>Find storage accounts with a specific tag on the resource group
397397

398398
The following query uses an **inner** `join` to connect storage accounts with resource groups that
399399
have a specified case sensitive tag name and tag value.
@@ -472,7 +472,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.storage/storageaccou
472472

473473
---
474474

475-
## <a name="unionresults" />Combine results from two queries into a single result
475+
## <a name="unionresults"></a>Combine results from two queries into a single result
476476

477477
The following query uses `union` to get results from the _ResourceContainers_ table and add them to
478478
results from the _Resources_ table.
@@ -505,7 +505,7 @@ Search-AzGraph -Query "ResourceContainers | where type=='microsoft.resources/sub
505505

506506
---
507507

508-
## <a name="displaynames" />Include the tenant and subscription names with DisplayNames
508+
## <a name="displaynames"></a>Include the tenant and subscription names with DisplayNames
509509

510510
This query uses the new **Include** parameter with option _DisplayNames_ to add
511511
**subscriptionDisplayName** and **tenantDisplayName** to the results. This parameter is only

articles/governance/resource-graph/samples/starter.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Graph. Before running any of the following queries, check that your environment
4141
PowerShell](../first-query-powershell.md#add-the-resource-graph-module) for steps to install and
4242
validate your shell environment of choice.
4343

44-
## <a name="count-resources" />Count Azure resources
44+
## <a name="count-resources"></a>Count Azure resources
4545

4646
This query returns number of Azure resources that exist in the subscriptions that you have access
4747
to. It's also a good query to validate your shell of choice has the appropriate Azure Resource
@@ -74,7 +74,7 @@ Search-AzGraph -Query "Resources | summarize count()"
7474

7575
---
7676

77-
## <a name="count-keyvaults" />Count key vault resources
77+
## <a name="count-keyvaults"></a>Count key vault resources
7878

7979
This query uses `count` instead of `summarize` to count the number of records returned. Only key
8080
vaults are included in the count.
@@ -107,7 +107,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.keyvault/vaults' | c
107107

108108
---
109109

110-
## <a name="list-resources" />List resources sorted by name
110+
## <a name="list-resources"></a>List resources sorted by name
111111

112112
This query returns any type of resource, but only the **name**, **type**, and **location**
113113
properties. It uses `order by` to sort the properties by the **name** property in ascending (`asc`)
@@ -141,7 +141,7 @@ Search-AzGraph -Query "Resources | project name, type, location | order by name
141141

142142
---
143143

144-
## <a name="show-vms" />Show all virtual machines ordered by name in descending order
144+
## <a name="show-vms"></a>Show all virtual machines ordered by name in descending order
145145

146146
To list only virtual machines (which are type `Microsoft.Compute/virtualMachines`), we can match
147147
the property **type** in the results. Similar to the previous query, `desc` changes the `order by`
@@ -176,7 +176,7 @@ Search-AzGraph -Query "Resources | project name, location, type| where type =~ '
176176

177177
---
178178

179-
## <a name="show-sorted" />Show first five virtual machines by name and their OS type
179+
## <a name="show-sorted"></a>Show first five virtual machines by name and their OS type
180180

181181
This query will use `top` to only retrieve five matching records that are ordered by name. The type
182182
of the Azure resource is `Microsoft.Compute/virtualMachines`. `project` tells Azure Resource Graph
@@ -211,7 +211,7 @@ Search-AzGraph -Query "Resources | where type =~ 'Microsoft.Compute/virtualMachi
211211

212212
---
213213

214-
## <a name="count-os" />Count virtual machines by OS type
214+
## <a name="count-os"></a>Count virtual machines by OS type
215215

216216
Building on the previous query, we're still limiting by Azure resources of type
217217
`Microsoft.Compute/virtualMachines`, but are no longer limiting the number of records returned.
@@ -287,7 +287,7 @@ Search-AzGraph -Query "Resources | where type =~ 'Microsoft.Compute/virtualMachi
287287
> property is the incorrect case, a null or incorrect value is returned and the grouping or
288288
> summarization would be incorrect.
289289
290-
## <a name="show-storage" />Show resources that contain storage
290+
## <a name="show-storage"></a>Show resources that contain storage
291291

292292
Instead of explicitly defining the type to match, this example query will find any Azure resource
293293
that `contains` the word **storage**.
@@ -319,7 +319,7 @@ Search-AzGraph -Query "Resources | where type contains 'storage' | distinct type
319319

320320
---
321321

322-
## <a name="list-publicip" />List all public IP addresses
322+
## <a name="list-publicip"></a>List all public IP addresses
323323

324324
Similar to the previous query, find everything that is a type with the word **publicIPAddresses**.
325325
This query expands on that pattern to only include results where **properties.ipAddress**
@@ -355,7 +355,7 @@ Search-AzGraph -Query "Resources | where type contains 'publicIPAddresses' and i
355355

356356
---
357357

358-
## <a name="count-resources-by-ip" />Count resources that have IP addresses configured by subscription
358+
## <a name="count-resources-by-ip"></a>Count resources that have IP addresses configured by subscription
359359

360360
Using the previous example query and adding `summarize` and `count()`, we can get a list by subscription of resources with configured IP addresses.
361361

@@ -387,7 +387,7 @@ Search-AzGraph -Query "Resources | where type contains 'publicIPAddresses' and i
387387

388388
---
389389

390-
## <a name="list-tag" />List resources with a specific tag value
390+
## <a name="list-tag"></a>List resources with a specific tag value
391391

392392
We can limit the results by properties other than the Azure resource type, such as a tag. In this
393393
example, we're filtering for Azure resources with a tag name of **Environment** that have a value
@@ -452,7 +452,7 @@ Search-AzGraph -Query "Resources | where tags.environment=~'internal' | project
452452

453453
---
454454

455-
## <a name="list-specific-tag" />List all storage accounts with specific tag value
455+
## <a name="list-specific-tag"></a>List all storage accounts with specific tag value
456456

457457
Combine the filter functionality of the previous example and filter Azure resource type by **type**
458458
property. This query also limits our search for specific types of Azure resources with a specific
@@ -489,7 +489,7 @@ Search-AzGraph -Query "Resources | where type =~ 'Microsoft.Storage/storageAccou
489489
> [!NOTE]
490490
> This example uses `==` for matching instead of the `=~` conditional. `==` is a case sensitive match.
491491
492-
## <a name="show-aliases" />Show aliases for a virtual machine resource
492+
## <a name="show-aliases"></a>Show aliases for a virtual machine resource
493493

494494
[Azure Policy aliases](../../policy/concepts/definition-structure.md#aliases) are used by Azure
495495
Policy to manage resource compliance. Azure Resource Graph can return the _aliases_ of a resource
@@ -526,7 +526,7 @@ Search-AzGraph -Query "Resources | where type =~ 'Microsoft.Compute/virtualMachi
526526

527527
---
528528

529-
## <a name="distinct-alias-values" />Show distinct values for a specific alias
529+
## <a name="distinct-alias-values"></a>Show distinct values for a specific alias
530530

531531
Seeing the value of aliases on a single resource is helpful, but it doesn't show the true value of
532532
using Azure Resource Graph to query across subscriptions. This example looks at all values of a
@@ -561,7 +561,7 @@ Search-AzGraph -Query "Resources | where type=~'Microsoft.Compute/virtualMachine
561561

562562
---
563563

564-
## <a name="unassociated-nsgs" />Show unassociated network security groups
564+
## <a name="unassociated-nsgs"></a>Show unassociated network security groups
565565

566566
This query returns Network Security Groups (NSGs) that aren't associated to a network interface or
567567
subnet.
@@ -595,7 +595,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.network/networksecur
595595

596596
---
597597

598-
## <a name="advisor-savings" />Get cost savings summary from Azure Advisor
598+
## <a name="advisor-savings"></a>Get cost savings summary from Azure Advisor
599599

600600
This query summarizes the cost savings of each
601601
[Azure Advisor](../../../advisor/advisor-overview.md) recommendation.

articles/governance/resource-graph/tutorials/create-share-query.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ follow these steps:
5050
Select **Run query** to see the query results in the bottom pane.
5151

5252
For more information about this query, see
53-
[Samples – Count virtual machines by OS type](../samples/starter.md#count-virtual-machines-by-os-type).
53+
[Samples – Count virtual machines by OS type](../samples/starter.md#count-os).
5454

5555

5656
1. Select **Save** or **Save as**, enter **Count VMs by OS** as the name, leave the type as
@@ -95,7 +95,7 @@ To create a new Shared query, follow these steps:
9595
Select **Run query** to see the query results in the bottom pane.
9696

9797
For more information about this query, see
98-
[Samples – Count virtual machines by OS type](../samples/starter.md#count-virtual-machines-by-os-type).
98+
[Samples – Count virtual machines by OS type](../samples/starter.md#count-os).
9999

100100
1. Select **Save** or **Save as**.
101101

0 commit comments

Comments
 (0)