-
Notifications
You must be signed in to change notification settings - Fork 0
/
workbook.json
161 lines (161 loc) · 5.4 KB
/
workbook.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
{
"version": "Notebook/1.0",
"items": [
{
"type": 1,
"content": {
"json": "# 🔑 Subscription Extractor for MIRP\r\nThis workbook aims to simplify the process of extracting subscriptions for updating the MIRP.\r\nWith the below parameters, you are able to filter on subscription based on the tags.\r\n\r\n## Prerequisites\r\nThis workbook will present various cost-related details in the form of governance, networking, storage, VMs, Webapps, SQL, and cost information to educate the business about cost related to various resources.\r\n\r\nThis workbook requires the following least-privileged (minimum) roles:\r\n\r\n * **Reader** : allows you to import the workbook without saving it. This access is also required on all subscription to be able to list them.\r\n * **Workbook Contributor** : allows you to import and save the workbook\r\n\r\n\r\n"
},
"name": "Title"
},
{
"type": 1,
"content": {
"json": "Tag names with spaces, hyphens, and underscores are not supported.",
"style": "info"
},
"name": "warning tag explorer"
},
{
"type": 9,
"content": {
"version": "KqlParameterItem/1.0",
"crossComponentResources": [
"value::tenant"
],
"parameters": [
{
"id": "588d0c5a-04ca-43de-91e2-e701b7011c99",
"version": "KqlParameterItem/1.0",
"name": "TagName",
"label": "Tag Name",
"type": 2,
"query": "resourcecontainers\r\n| where type == \"microsoft.resources/subscriptions\"\r\n| where tags != '' and tags != '[]'\r\n| mvexpand tags\r\n| extend tagName = tostring(bag_keys(tags)[0])\r\n| distinct tagName\r\n| sort by tagName asc",
"crossComponentResources": [
"value::tenant"
],
"typeSettings": {
"additionalResourceOptions": [],
"showDefault": false
},
"timeContext": {
"durationMs": 86400000
},
"queryType": 1,
"resourceType": "microsoft.resources/tenants",
"value": null
}
],
"style": "formVertical",
"queryType": 1,
"resourceType": "microsoft.resources/tenants"
},
"customWidth": "50",
"name": "TagName"
},
{
"type": 9,
"content": {
"version": "KqlParameterItem/1.0",
"crossComponentResources": [
"value::tenant"
],
"parameters": [
{
"id": "6115fd01-a042-49d3-84e4-33d7bbc1a70c",
"version": "KqlParameterItem/1.0",
"name": "TagValue",
"label": "Tag Value",
"type": 2,
"query": "resourcecontainers\r\n| where tags != '' and tags != '[]'\r\n| extend TagValue = tostring(tags.{TagName})\r\n| project TagValue\r\n| distinct TagValue",
"crossComponentResources": [
"value::tenant"
],
"typeSettings": {
"additionalResourceOptions": [],
"showDefault": false
},
"timeContext": {
"durationMs": 86400000
},
"queryType": 1,
"resourceType": "microsoft.resources/tenants",
"value": null
}
],
"style": "formVertical",
"doNotRunWhenHidden": true,
"queryType": 1,
"resourceType": "microsoft.resources/tenants"
},
"conditionalVisibility": {
"parameterName": "TagName",
"comparison": "isNotEqualTo"
},
"customWidth": "50",
"name": "TagValue"
},
{
"type": 3,
"content": {
"version": "KqlItem/1.0",
"query": "resourcecontainers\r\n| where type == \"microsoft.resources/subscriptions\"\r\n| where tags['{TagName}'] == '{TagValue}'\r\n| project subscriptionId, name, tags",
"size": 3,
"title": "Subscription List",
"showRefreshButton": true,
"showExportToExcel": true,
"exportToExcelOptions": "all",
"queryType": 1,
"resourceType": "microsoft.resources/tenants",
"crossComponentResources": [
"value::tenant"
],
"gridSettings": {
"formatters": [
{
"columnMatch": "subscriptionId",
"formatter": 15,
"formatOptions": {
"linkTarget": null,
"showIcon": true,
"customColumnWidthSetting": "40%"
}
},
{
"columnMatch": "name",
"formatter": 5
},
{
"columnMatch": "tags",
"formatter": 0,
"formatOptions": {
"customColumnWidthSetting": "60%"
}
}
],
"filter": true,
"labelSettings": [
{
"columnId": "subscriptionId",
"label": "Subscription"
},
{
"columnId": "name",
"label": "Subscription Name"
},
{
"columnId": "tags",
"label": "Tags"
}
]
}
},
"customWidth": "100",
"name": "SubList"
}
],
"fallbackResourceIds": [
"azure monitor"
],
"$schema": "https://github.com/Microsoft/Application-Insights-Workbooks/blob/master/schema/workbook.json"
}