|
1 | 1 | ---
|
2 |
| -author: davidsmatlak |
3 |
| -ms.service: resource-graph |
| 2 | +ms.service: azure-storage |
4 | 3 | ms.topic: include
|
5 | 4 | ms.date: 07/07/2022
|
6 |
| -ms.author: davidsmatlak |
7 |
| -ms.custom: generated |
| 5 | +author: akashdubey-ms |
| 6 | +ms.author: akashdubey |
8 | 7 | ---
|
9 | 8 |
|
10 | 9 | ### Find storage accounts with a specific case-insensitive tag on the resource group
|
11 | 10 |
|
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. |
13 | 12 |
|
14 | 13 | ```kusto
|
15 | 14 | Resources
|
16 | 15 | | where type =~ 'microsoft.storage/storageaccounts'
|
17 | 16 | | 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) |
24 | 23 | on subscriptionId, resourceGroup
|
25 | 24 | | project-away subscriptionId1, resourceGroup1
|
26 | 25 | ```
|
@@ -49,16 +48,16 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.storage/storageaccou
|
49 | 48 |
|
50 | 49 | ### Find storage accounts with a specific case-sensitive tag on the resource group
|
51 | 50 |
|
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. |
53 | 52 |
|
54 | 53 | ```kusto
|
55 | 54 | Resources
|
56 | 55 | | where type =~ 'microsoft.storage/storageaccounts'
|
57 | 56 | | 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) |
62 | 61 | on subscriptionId, resourceGroup
|
63 | 62 | | project-away subscriptionId1, resourceGroup1
|
64 | 63 | ```
|
@@ -87,7 +86,7 @@ Search-AzGraph -Query "Resources | where type =~ 'microsoft.storage/storageaccou
|
87 | 86 |
|
88 | 87 | ### List all storage accounts with specific tag value
|
89 | 88 |
|
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. |
91 | 90 |
|
92 | 91 | ```kusto
|
93 | 92 | Resources
|
@@ -119,7 +118,7 @@ Search-AzGraph -Query "Resources | where type =~ 'Microsoft.Storage/storageAccou
|
119 | 118 |
|
120 | 119 | ### Show resources that contain storage
|
121 | 120 |
|
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**. |
123 | 122 |
|
124 | 123 | ```kusto
|
125 | 124 | Resources
|
|
0 commit comments