@@ -21,22 +21,22 @@ HealthResourceChanges
21
21
# [ Azure CLI] ( #tab/azure-cli )
22
22
23
23
``` azurecli-interactive
24
- az graph query -q ""
24
+ az graph query -q "HealthResourceChanges | where properties.targetResourceType =~ 'microsoft.resourcehealth/resourceannotations' | where properties['changes']['properties.category']['newValue'] =~ 'Planned' | project Id = tostring(split(tolower(properties.targetResourceId), '/providers/microsoft.resourcehealth/resourceannotations')[0]), Reason = properties['changes']['properties.reason']['newValue'] "
25
25
```
26
26
27
27
# [ Azure PowerShell] ( #tab/azure-powershell )
28
28
29
29
``` azurepowershell-interactive
30
- Search-AzGraph -Query ""
30
+ Search-AzGraph -Query "HealthResourceChanges | where properties.targetResourceType =~ 'microsoft.resourcehealth/resourceannotations' | where properties['changes']['properties.category']['newValue'] =~ 'Planned' | project Id = tostring(split(tolower(properties.targetResourceId), '/providers/microsoft.resourcehealth/resourceannotations')[0]), Reason = properties['changes']['properties.reason']['newValue'] "
31
31
```
32
32
33
33
# [ Portal] ( #tab/azure-portal )
34
34
35
35
:::image type="icon" source="../../../../articles/governance/resource-graph/media/resource-graph-small.png"::: Try this query in Azure Resource Graph Explorer:
36
36
37
- - Azure portal: <a href =" https://portal.azure.com/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/ " target =" _blank " >portal.Azure.com</a >
38
- - Azure Government portal: <a href =" https://portal.azure.us/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/ " target =" _blank " >portal.Azure.us</a >
39
- - Azure China 21Vianet portal: <a href =" https://portal.azure.cn/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/ " target =" _blank " >portal.Azure.cn</a >
37
+ - Azure portal: <a href =" https://portal.azure.com/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/HealthResourceChanges%20%7C%20where%20properties.targetResourceType%20%3D~%20%27microsoft.resourcehealth%2Fresourceannotations%27%20%7C%20where%20properties%5B%27changes%27%5D%5B%27properties.category%27%5D%5B%27newValue%27%5D%20%3D~%20%27Planned%27%20%7C%20project%20Id%20%3D%20tostring%28split%28tolower%28properties.targetResourceId%29%2C%20%27%2Fproviders%2Fmicrosoft.resourcehealth%2Fresourceannotations%27%29%5B0%5D%29%2C%20Reason%20%3D%20properties%5B%27changes%27%5D%5B%27properties.reason%27%5D%5B%27newValue%27%5D " target =" _blank " >portal.Azure.com</a >
38
+ - Azure Government portal: <a href =" https://portal.azure.us/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/HealthResourceChanges%20%7C%20where%20properties.targetResourceType%20%3D~%20%27microsoft.resourcehealth%2Fresourceannotations%27%20%7C%20where%20properties%5B%27changes%27%5D%5B%27properties.category%27%5D%5B%27newValue%27%5D%20%3D~%20%27Planned%27%20%7C%20project%20Id%20%3D%20tostring%28split%28tolower%28properties.targetResourceId%29%2C%20%27%2Fproviders%2Fmicrosoft.resourcehealth%2Fresourceannotations%27%29%5B0%5D%29%2C%20Reason%20%3D%20properties%5B%27changes%27%5D%5B%27properties.reason%27%5D%5B%27newValue%27%5D " target =" _blank " >portal.Azure.us</a >
39
+ - Azure China 21Vianet portal: <a href =" https://portal.azure.cn/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/HealthResourceChanges%20%7C%20where%20properties.targetResourceType%20%3D~%20%27microsoft.resourcehealth%2Fresourceannotations%27%20%7C%20where%20properties%5B%27changes%27%5D%5B%27properties.category%27%5D%5B%27newValue%27%5D%20%3D~%20%27Planned%27%20%7C%20project%20Id%20%3D%20tostring%28split%28tolower%28properties.targetResourceId%29%2C%20%27%2Fproviders%2Fmicrosoft.resourcehealth%2Fresourceannotations%27%29%5B0%5D%29%2C%20Reason%20%3D%20properties%5B%27changes%27%5D%5B%27properties.reason%27%5D%5B%27newValue%27%5D " target =" _blank " >portal.Azure.cn</a >
40
40
41
41
---
42
42
@@ -59,22 +59,22 @@ Context = properties['changes']['properties.context']['newValue'], Category = pr
59
59
# [ Azure CLI] ( #tab/azure-cli )
60
60
61
61
``` azurecli-interactive
62
- az graph query -q ""
62
+ az graph query -q "healthresourcechanges | where type == "microsoft.resources/changes" | where properties.targetResourceType =~ "microsoft.resourcehealth/resourceannotations" | extend Id = tolower(split(properties.targetResourceId, '/providers/Microsoft.ResourceHealth/resourceAnnotations/current')[0]), Timestamp = todatetime(properties.changeAttributes.timestamp), AnnotationName = properties['changes']['properties.annotationName']['newValue'], Reason = properties['changes']['properties.reason']['newValue'], Context = properties['changes']['properties.context']['newValue'], Category = properties['changes']['properties.category']['newValue'] | where isnotempty(AnnotationName) | project Timestamp, Id, PreviousAnnotation = properties['changes']['properties.annotationName']['previousValue'], AnnotationName, Reason, Context, Category | order by Timestamp desc "
63
63
```
64
64
65
65
# [ Azure PowerShell] ( #tab/azure-powershell )
66
66
67
67
``` azurepowershell-interactive
68
- Search-AzGraph -Query ""
68
+ Search-AzGraph -Query "healthresourcechanges | where type == "microsoft.resources/changes" | where properties.targetResourceType =~ "microsoft.resourcehealth/resourceannotations" | extend Id = tolower(split(properties.targetResourceId, '/providers/Microsoft.ResourceHealth/resourceAnnotations/current')[0]), Timestamp = todatetime(properties.changeAttributes.timestamp), AnnotationName = properties['changes']['properties.annotationName']['newValue'], Reason = properties['changes']['properties.reason']['newValue'], Context = properties['changes']['properties.context']['newValue'], Category = properties['changes']['properties.category']['newValue'] | where isnotempty(AnnotationName) | project Timestamp, Id, PreviousAnnotation = properties['changes']['properties.annotationName']['previousValue'], AnnotationName, Reason, Context, Category | order by Timestamp desc "
69
69
```
70
70
71
71
# [ Portal] ( #tab/azure-portal )
72
72
73
73
:::image type="icon" source="../../../../articles/governance/resource-graph/media/resource-graph-small.png"::: Try this query in Azure Resource Graph Explorer:
74
74
75
- - Azure portal: <a href =" https://portal.azure.com/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/ " target =" _blank " >portal.Azure.com</a >
76
- - Azure Government portal: <a href =" https://portal.azure.us/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/ " target =" _blank " >portal.Azure.us</a >
77
- - Azure China 21Vianet portal: <a href =" https://portal.azure.cn/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/ " target =" _blank " >portal.Azure.cn</a >
75
+ - Azure portal: <a href="https://portal.azure.com/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/healthresourcechanges%20%7C%20where%20type%20%3D%3D%20%22microsoft.resources%2Fchanges%22%20%7C%20where%20properties.targetResourceType%20%3D~%20%22microsoft.resourcehealth%2Fresourceannotations%22%20%7C%20extend%20Id%20%3D%20tolower%28split%28properties.targetResourceId%2C%20%27%2Fproviders%2FMicrosoft.ResourceHealth%2FresourceAnnotations%2Fcurrent%27%29%5B0%5D%29%2C%20Timestamp%20%3D%20todatetime%28properties.changeAttributes.timestamp%29%2C%20AnnotationName%20%3D%20properties%5B%27changes%27%5D%5B%27properties.annotationName%27%5D%5B%27newValue%27%5D%2C%20Reason%20%3D%20properties%5B%27changes%27%5D%5B%27properties.reason%27%5D%5B%27newValue%27%5D%2C%20Context%20%3D%20properties%5B%27changes%27%5D%5B%27properties.context%27%5D%5B%27newValue%27%5D%2C%20Category%20%3D%20properties%5B%27changes%27%5D%5B%27properties.category%27%5D%5B%27newValue%27%5D%20%7C%20where%20isnotempty%28AnnotationName%29%20%7C%20project%20Timestamp%2C%20Id%2C%20PreviousAnnotation%20%3D%20properties%5B%27changes%27%5D%5B%27properties.annotationName%27%5D%5B%27previousValue%27%5D%2C%20AnnotationName%2C%20Reason%2C%20Context%2C%20Category%20%7C%20order%20by%20Timestamp%20desc" target="_blank">portal.Azure.com</a>
76
+ - Azure Government portal: <a href="https://portal.azure.us/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/healthresourcechanges%20%7C%20where%20type%20%3D%3D%20%22microsoft.resources%2Fchanges%22%20%7C%20where%20properties.targetResourceType%20%3D~%20%22microsoft.resourcehealth%2Fresourceannotations%22%20%7C%20extend%20Id%20%3D%20tolower%28split%28properties.targetResourceId%2C%20%27%2Fproviders%2FMicrosoft.ResourceHealth%2FresourceAnnotations%2Fcurrent%27%29%5B0%5D%29%2C%20Timestamp%20%3D%20todatetime%28properties.changeAttributes.timestamp%29%2C%20AnnotationName%20%3D%20properties%5B%27changes%27%5D%5B%27properties.annotationName%27%5D%5B%27newValue%27%5D%2C%20Reason%20%3D%20properties%5B%27changes%27%5D%5B%27properties.reason%27%5D%5B%27newValue%27%5D%2C%20Context%20%3D%20properties%5B%27changes%27%5D%5B%27properties.context%27%5D%5B%27newValue%27%5D%2C%20Category%20%3D%20properties%5B%27changes%27%5D%5B%27properties.category%27%5D%5B%27newValue%27%5D%20%7C%20where%20isnotempty%28AnnotationName%29%20%7C%20project%20Timestamp%2C%20Id%2C%20PreviousAnnotation%20%3D%20properties%5B%27changes%27%5D%5B%27properties.annotationName%27%5D%5B%27previousValue%27%5D%2C%20AnnotationName%2C%20Reason%2C%20Context%2C%20Category%20%7C%20order%20by%20Timestamp%20desc" target="_blank">portal.Azure.us</a>
77
+ - Azure China 21Vianet portal: <a href="https://portal.azure.cn/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/healthresourcechanges%20%7C%20where%20type%20%3D%3D%20%22microsoft.resources%2Fchanges%22%20%7C%20where%20properties.targetResourceType%20%3D~%20%22microsoft.resourcehealth%2Fresourceannotations%22%20%7C%20extend%20Id%20%3D%20tolower%28split%28properties.targetResourceId%2C%20%27%2Fproviders%2FMicrosoft.ResourceHealth%2FresourceAnnotations%2Fcurrent%27%29%5B0%5D%29%2C%20Timestamp%20%3D%20todatetime%28properties.changeAttributes.timestamp%29%2C%20AnnotationName%20%3D%20properties%5B%27changes%27%5D%5B%27properties.annotationName%27%5D%5B%27newValue%27%5D%2C%20Reason%20%3D%20properties%5B%27changes%27%5D%5B%27properties.reason%27%5D%5B%27newValue%27%5D%2C%20Context%20%3D%20properties%5B%27changes%27%5D%5B%27properties.context%27%5D%5B%27newValue%27%5D%2C%20Category%20%3D%20properties%5B%27changes%27%5D%5B%27properties.category%27%5D%5B%27newValue%27%5D%20%7C%20where%20isnotempty%28AnnotationName%29%20%7C%20project%20Timestamp%2C%20Id%2C%20PreviousAnnotation%20%3D%20properties%5B%27changes%27%5D%5B%27properties.annotationName%27%5D%5B%27previousValue%27%5D%2C%20AnnotationName%2C%20Reason%2C%20Context%2C%20Category%20%7C%20order%20by%20Timestamp%20desc" target="_blank">portal.Azure.cn</a>
78
78
79
79
---
80
80
@@ -97,22 +97,22 @@ LatestAvailabilityState = properties['changes']['properties.availabilityState'][
97
97
# [ Azure CLI] ( #tab/azure-cli )
98
98
99
99
``` azurecli-interactive
100
- az graph query -q ""
100
+ az graph query -q "healthresourcechanges | where type == "microsoft.resources/changes" | where properties.targetResourceType =~ "microsoft.resourcehealth/availabilityStatuses" | extend Id = tolower(split(properties.targetResourceId, '/providers/Microsoft.ResourceHealth/availabilityStatuses/current')[0]), Timestamp = todatetime(properties.changeAttributes.timestamp), PreviousAvailabilityState = properties['changes']['properties.availabilityState']['previousValue'], LatestAvailabilityState = properties['changes']['properties.availabilityState']['newValue'] | where isnotempty(LatestAvailabilityState) | project Timestamp, Id, PreviousAvailabilityState, LatestAvailabilityState | order by Timestamp desc "
101
101
```
102
102
103
103
# [ Azure PowerShell] ( #tab/azure-powershell )
104
104
105
105
``` azurepowershell-interactive
106
- Search-AzGraph -Query ""
106
+ Search-AzGraph -Query "healthresourcechanges | where type == "microsoft.resources/changes" | where properties.targetResourceType =~ "microsoft.resourcehealth/availabilityStatuses" | extend Id = tolower(split(properties.targetResourceId, '/providers/Microsoft.ResourceHealth/availabilityStatuses/current')[0]), Timestamp = todatetime(properties.changeAttributes.timestamp), PreviousAvailabilityState = properties['changes']['properties.availabilityState']['previousValue'], LatestAvailabilityState = properties['changes']['properties.availabilityState']['newValue'] | where isnotempty(LatestAvailabilityState) | project Timestamp, Id, PreviousAvailabilityState, LatestAvailabilityState | order by Timestamp desc "
107
107
```
108
108
109
109
# [ Portal] ( #tab/azure-portal )
110
110
111
111
:::image type="icon" source="../../../../articles/governance/resource-graph/media/resource-graph-small.png"::: Try this query in Azure Resource Graph Explorer:
112
112
113
- - Azure portal: <a href =" https://portal.azure.com/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/ " target =" _blank " >portal.Azure.com</a >
114
- - Azure Government portal: <a href =" https://portal.azure.us/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/ " target =" _blank " >portal.Azure.us</a >
115
- - Azure China 21Vianet portal: <a href =" https://portal.azure.cn/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/ " target =" _blank " >portal.Azure.cn</a >
113
+ - Azure portal: <a href="https://portal.azure.com/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/healthresourcechanges%20%7C%20where%20type%20%3D%3D%20%22microsoft.resources%2Fchanges%22%20%7C%20where%20properties.targetResourceType%20%3D~%20%22microsoft.resourcehealth%2FavailabilityStatuses%22%20%7C%20extend%20Id%20%3D%20tolower%28split%28properties.targetResourceId%2C%20%27%2Fproviders%2FMicrosoft.ResourceHealth%2FavailabilityStatuses%2Fcurrent%27%29%5B0%5D%29%2C%20Timestamp%20%3D%20todatetime%28properties.changeAttributes.timestamp%29%2C%20PreviousAvailabilityState%20%3D%20properties%5B%27changes%27%5D%5B%27properties.availabilityState%27%5D%5B%27previousValue%27%5D%2C%20LatestAvailabilityState%20%3D%20properties%5B%27changes%27%5D%5B%27properties.availabilityState%27%5D%5B%27newValue%27%5D%20%7C%20where%20isnotempty%28LatestAvailabilityState%29%20%7C%20project%20Timestamp%2C%20Id%2C%20PreviousAvailabilityState%2C%20LatestAvailabilityState%20%7C%20order%20by%20Timestamp%20desc" target="_blank">portal.Azure.com</a>
114
+ - Azure Government portal: <a href="https://portal.azure.us/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/healthresourcechanges%20%7C%20where%20type%20%3D%3D%20%22microsoft.resources%2Fchanges%22%20%7C%20where%20properties.targetResourceType%20%3D~%20%22microsoft.resourcehealth%2FavailabilityStatuses%22%20%7C%20extend%20Id%20%3D%20tolower%28split%28properties.targetResourceId%2C%20%27%2Fproviders%2FMicrosoft.ResourceHealth%2FavailabilityStatuses%2Fcurrent%27%29%5B0%5D%29%2C%20Timestamp%20%3D%20todatetime%28properties.changeAttributes.timestamp%29%2C%20PreviousAvailabilityState%20%3D%20properties%5B%27changes%27%5D%5B%27properties.availabilityState%27%5D%5B%27previousValue%27%5D%2C%20LatestAvailabilityState%20%3D%20properties%5B%27changes%27%5D%5B%27properties.availabilityState%27%5D%5B%27newValue%27%5D%20%7C%20where%20isnotempty%28LatestAvailabilityState%29%20%7C%20project%20Timestamp%2C%20Id%2C%20PreviousAvailabilityState%2C%20LatestAvailabilityState%20%7C%20order%20by%20Timestamp%20desc" target="_blank">portal.Azure.us</a>
115
+ - Azure China 21Vianet portal: <a href="https://portal.azure.cn/?feature.customportal=false#blade/HubsExtension/ArgQueryBlade/query/healthresourcechanges%20%7C%20where%20type%20%3D%3D%20%22microsoft.resources%2Fchanges%22%20%7C%20where%20properties.targetResourceType%20%3D~%20%22microsoft.resourcehealth%2FavailabilityStatuses%22%20%7C%20extend%20Id%20%3D%20tolower%28split%28properties.targetResourceId%2C%20%27%2Fproviders%2FMicrosoft.ResourceHealth%2FavailabilityStatuses%2Fcurrent%27%29%5B0%5D%29%2C%20Timestamp%20%3D%20todatetime%28properties.changeAttributes.timestamp%29%2C%20PreviousAvailabilityState%20%3D%20properties%5B%27changes%27%5D%5B%27properties.availabilityState%27%5D%5B%27previousValue%27%5D%2C%20LatestAvailabilityState%20%3D%20properties%5B%27changes%27%5D%5B%27properties.availabilityState%27%5D%5B%27newValue%27%5D%20%7C%20where%20isnotempty%28LatestAvailabilityState%29%20%7C%20project%20Timestamp%2C%20Id%2C%20PreviousAvailabilityState%2C%20LatestAvailabilityState%20%7C%20order%20by%20Timestamp%20desc" target="_blank">portal.Azure.cn</a>
116
116
117
117
---
118
118
0 commit comments