Skip to content

Commit 934b063

Browse files
Merge pull request #277918 from davidsmatlak/ds-move-arg-azurestorage
Moves Azure Storage include file for ARG sample
2 parents 74bff3d + cd34b05 commit 934b063

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

includes/resource-graph/samples/bycat/azure-storage.md renamed to articles/storage/common/includes/azure-storage.md

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,25 @@
11
---
2-
author: davidsmatlak
3-
ms.service: resource-graph
2+
ms.service: azure-storage
43
ms.topic: include
54
ms.date: 07/07/2022
6-
ms.author: davidsmatlak
7-
ms.custom: generated
5+
author: akashdubey-ms
6+
ms.author: akashdubey
87
---
98

109
### Find storage accounts with a specific case-insensitive tag on the resource group
1110

12-
Similar to the 'Find storage accounts with a specific case-sensitive tag on the resource group' query, but when it's necessary to look for a case insensitive tag name and tag value, use `mv-expand` with the **bagexpansion** parameter. This query uses more quota than the original query, so use `mv-expand` only if necessary.
11+
Similar to the 'Find storage accounts with a specific case-sensitive tag on the resource group' query, but when it's necessary to look for a case insensitive tag name and tag value, use `mv-expand` with the `bagexpansion` parameter. This query uses more quota than the original query, so use `mv-expand` only if necessary.
1312

1413
```kusto
1514
Resources
1615
| where type =~ 'microsoft.storage/storageaccounts'
1716
| join kind=inner (
18-
ResourceContainers
19-
| where type =~ 'microsoft.resources/subscriptions/resourcegroups'
20-
| mv-expand bagexpansion=array tags
21-
| where isnotempty(tags)
22-
| where tags[0] =~ 'key1' and tags[1] =~ 'value1'
23-
| project subscriptionId, resourceGroup)
17+
ResourceContainers
18+
| where type =~ 'microsoft.resources/subscriptions/resourcegroups'
19+
| mv-expand bagexpansion=array tags
20+
| where isnotempty(tags)
21+
| where tags[0] =~ 'key1' and tags[1] =~ 'value1'
22+
| project subscriptionId, resourceGroup)
2423
on subscriptionId, resourceGroup
2524
| project-away subscriptionId1, resourceGroup1
2625
```
@@ -49,16 +48,16 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.storage/storageaccou
4948

5049
### Find storage accounts with a specific case-sensitive tag on the resource group
5150

52-
The following query uses an **inner** `join` to connect storage accounts with resource groups that have a specified case-sensitive tag name and tag value.
51+
The following query uses an `inner` `join` to connect storage accounts with resource groups that have a specified case-sensitive tag name and tag value.
5352

5453
```kusto
5554
Resources
5655
| where type =~ 'microsoft.storage/storageaccounts'
5756
| join kind=inner (
58-
ResourceContainers
59-
| where type =~ 'microsoft.resources/subscriptions/resourcegroups'
60-
| where tags['Key1'] =~ 'Value1'
61-
| project subscriptionId, resourceGroup)
57+
ResourceContainers
58+
| where type =~ 'microsoft.resources/subscriptions/resourcegroups'
59+
| where tags['Key1'] =~ 'Value1'
60+
| project subscriptionId, resourceGroup)
6261
on subscriptionId, resourceGroup
6362
| project-away subscriptionId1, resourceGroup1
6463
```
@@ -87,7 +86,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.storage/storageaccou
8786

8887
### List all storage accounts with specific tag value
8988

90-
Combine the filter functionality of the previous example and filter Azure resource type by **type** property. This query also limits our search for specific types of Azure resources with a specific tag name and value.
89+
Combine the filter functionality of the previous example and filter Azure resource type by `type` property. This query also limits our search for specific types of Azure resources with a specific tag name and value.
9190

9291
```kusto
9392
Resources
@@ -119,7 +118,7 @@ Search-AzGraph -Query "Resources | where type =~ 'Microsoft.Storage/storageAccou
119118

120119
### Show resources that contain storage
121120

122-
Instead of explicitly defining the type to match, this example query will find any Azure resource that `contains` the word **storage**.
121+
Instead of explicitly defining the type to match, this example query finds any Azure resource that `contains` the word **storage**.
123122

124123
```kusto
125124
Resources

articles/storage/common/resource-graph-samples.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ ms.custom: subject-resourcegraph-sample
1414

1515
# Azure Resource Graph sample queries for Azure Storage
1616

17-
This page is a collection of [Azure Resource Graph](../../governance/resource-graph/overview.md) sample queries for Azure Storage. For a complete list of Azure Resource Graph samples, see [Resource Graph samples by Category](../../governance/resource-graph/samples/samples-by-category.md) and [Resource Graph samples by Table](../../governance/resource-graph/samples/samples-by-table.md).
17+
This page is a collection of [Azure Resource Graph](../../governance/resource-graph/overview.md) sample queries for Azure Storage.
1818

1919
## Sample queries
2020

21-
[!INCLUDE [azure-resource-graph-samples-cat-storage](../../../includes/resource-graph/samples/bycat/azure-storage.md)]
21+
[!INCLUDE [azure-resource-graph-samples-cat-storage](./includes/azure-storage.md)]
2222

2323
## Next steps
2424

2525
- Learn more about the [query language](../../governance/resource-graph/concepts/query-language.md).
2626
- Learn more about how to [explore resources](../../governance/resource-graph/concepts/explore-resources.md).
27-
- See samples of [Starter language queries](../../governance/resource-graph/samples/starter.md).
28-
- See samples of [Advanced language queries](../../governance/resource-graph/samples/advanced.md).

0 commit comments

Comments
 (0)