-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathUIdefinition.json
353 lines (353 loc) · 19.6 KB
/
UIdefinition.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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
{
"$schema": "https://schema.management.azure.com/schemas/2021-09-09/uiFormDefinition.schema.json",
"view": {
"kind": "Form",
"properties": {
"title": "Create AVD Alerts",
"steps": [
{
"name": "basics",
"label": "Basics",
"elements": [
{
"name": "resourceScope",
"type": "Microsoft.Common.ResourceScope",
"instanceDetailsLabel": "AVD Alerts Deployment Details",
"subscription": {
"constraints": {
"validations": []
}
}
},
{
"name": "HostPoolsApi",
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "GET",
"path": "[concat(steps('basics').resourceScope.subscription.id, '/providers/Microsoft.DesktopVirtualization/hostpools?api-version=2021-07-12')]"
}
},
{
"name": "ResGroupsApi",
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "GET",
"path": "[concat(steps('basics').resourceScope.subscription.id, '/resourceGroups?api-version=2021-04-01')]"
}
},
{
"name": "StorAcctsApi",
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "GET",
"path": "[concat(steps('basics').resourceScope.subscription.id, '/providers/Microsoft.Storage/storageAccounts?api-version=2022-09-01')]"
}
}
]
},
{
"name": "AlertsConfig",
"label": "Alerts Configuration",
"elements": [
{
"name": "_ArtifactsLocation",
"type": "Microsoft.Common.TextBox",
"label": "_Artifacts Location",
"subLabel": "",
"toolTip": "Location of needed scripts to deploy solution.",
"constraints": {
"required": true,
"regex": "",
"validationMessage": "",
"validations": []
},
"infoMessages": [],
"visible": false
},
{
"name": "ResourceGroupStatus",
"type": "Microsoft.Common.OptionsGroup",
"label": "Use New or Existing Resource Group",
"toolTip": "This will be the Resource Group in which AVD Alerts resources will be deployed in.",
"constraints": {
"allowedValues": [
{
"label": "New",
"value": "New"
},
{
"label": "Existing",
"value": "Existing"
}
],
"required": true
},
"visible": true
},
{
"name": "resourceGroupNameNew",
"type": "Microsoft.Common.TextBox",
"label": "Resource Group Name for AVD Alerts",
"subLabel": "",
"defaultValue": "rg-AVDAlerts",
"toolTip": "AVD Alerts Resource Group where alerts based resources will be deployed.",
"constraints": {
"required": "[equals(steps('AlertsConfig').ResourceGroupStatus, 'New')]",
"regex": "",
"validationMessage": "",
"validations": []
},
"infoMessages": [],
"visible": "[equals(steps('AlertsConfig').ResourceGroupStatus, 'New')]"
},
{
"name": "resourceGroupNameExisting",
"type": "Microsoft.Common.DropDown",
"label": "Existing Resource Group",
"multiselect": false,
"defaultValue": "",
"toolTip": "AVD Alerts Resource Group where alerts based resources will be deployed.",
"filterPlaceholder": "Filter Resource Groups...",
"defaultDescription": "A value for selection",
"constraints": {
"allowedValues": "[map(steps('basics').ResGroupsApi.value, (item) => parse(concat('{\"label\":\"', item.name, '\",\"value\":\"', item.id, '\"}')))]",
"required": true
},
"infoMessages": [],
"visible": "[equals(steps('AlertsConfig').ResourceGroupStatus, 'Existing')]"
},
{
"name": "AlertNamePrefix",
"type": "Microsoft.Common.TextBox",
"label": "Alert Name Prefix",
"subLabel": "",
"defaultValue": "AVD",
"toolTip": "Alert Name Prefix (Dash will be added after prefix for you.)",
"constraints": {
"required": true,
"regex": "",
"validationMessage": "",
"validations": []
},
"infoMessages": [],
"visible": true
},
{
"name": "DistributionGroup",
"type": "Microsoft.Common.TextBox",
"label": "User Email or Distribution Group",
"subLabel": "",
"defaultValue": "",
"toolTip": "The Email Distribution Group that will receive email alerts for AVD.",
"constraints": {
"required": true,
"regex": "^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\\.[a-zA-Z0-9-.]+$",
"validationMessage": "Email is not valid. Please re-enter."
},
"infoMessages": [],
"visible": true
},
{
"name": "Environment",
"type": "Microsoft.Common.DropDown",
"label": "Environment Type",
"subLabel": "",
"defaultValue": "t",
"toolTip": "The environment is which these resources will be deployed, i.e. Test, Production, Development. This will yield a first letter desigation in some of the resource naming.",
"constraints": {
"required": true,
"allowedValues": [
{
"label": "Development",
"value": "d"
},
{
"label": "Production",
"value": "p"
},
{
"label": "Test",
"value": "t"
}
],
"validations": []
},
"infoMessages": [],
"visible": true
},
{
"name": "HostPools",
"type": "Microsoft.Common.DropDown",
"label": "Host Pools",
"multiselect": true,
"selectAll": true,
"defaultValue": [],
"toolTip": "Select Host Pools to configure Alerts for.",
"filterPlaceholder": "Filter Host Pools...",
"defaultDescription": "A value for selection",
"constraints": {
"allowedValues": "[map(steps('basics').HostPoolsApi.value, (item) => parse(concat('{\"label\":\"', item.name, '\",\"value\":\"', item.id, '\"}')))]",
"required": true
},
"visible": true
},
{
"name": "LogAnalyticsWorkspaceResource",
"type": "Microsoft.Solutions.ResourceSelector",
"label": "Insights Log Analytics Workspace",
"toolTip": "Log Analytics Workspace in which AVD Insigts and diagnostics data resides in.",
"resourceType": "Microsoft.OperationalInsights/workspaces",
"constraints": {
"required": true
},
"infoMessages": [],
"visible": true
},
{
"name": "SessionHostsResourceGroupIds",
"type": "Microsoft.Common.DropDown",
"label": "Session Host VM Resouce Groups",
"multiselect": true,
"selectAll": true,
"defaultValue": [],
"toolTip": "The Resource Group(s) where the AVD VMs are located.",
"filterPlaceholder": "Filter Resource Groups...",
"defaultDescription": "A value for selection",
"constraints": {
"allowedValues": "[map(steps('basics').ResGroupsApi.value, (item) => parse(concat('{\"label\":\"', item.name, '\",\"value\":\"', item.id, '\"}')))]",
"required": true
},
"infoMessages": [],
"visible": true
},
{
"name": "optionAzFiles",
"type": "Microsoft.Common.CheckBox",
"label": "Configure Alerts for Azure Files",
"constraints": {
"required": false,
"validationMessage": "Selecting this option will prompt for Storage Account information."
}
},
{
"name": "optionANFVolumes",
"type": "Microsoft.Common.CheckBox",
"label": "Configure Alerts for Azure NetApp Volumes",
"constraints": {
"required": false,
"validationMessage": "Selecting this option will prompt for NetApp information."
}
},
{
"name": "AzFilesStorageSection",
"type": "Microsoft.Common.Section",
"label": "Azure Files Storage",
"elements": [
{
"name": "StorageAccountResourceIds",
"type": "Microsoft.Common.DropDown",
"label": "AVD Related Storage Accounts",
"multiselect": true,
"selectAll": true,
"defaultValue": [],
"toolTip": "The Storage Accounts that are used for FSLogix or MSIX App attach.",
"filterPlaceholder": "Filter Storage Accounts...",
"defaultDescription": "A value for selection",
"constraints": {
"allowedValues": "[map(steps('basics').StorAcctsApi.value, (item) => parse(concat('{\"label\":\"', item.name, '\",\"value\":\"', item.id, '\"}')))]",
"required": true
},
"infoMessages": [],
"visible": true
}
],
"visible": "[steps('AlertsConfig').optionAzFiles]"
},
{
"name": "ANFStorageSection",
"type": "Microsoft.Common.Section",
"label": "Azure NetApp Storage",
"elements": [
{
"name": "ANFPool",
"type": "Microsoft.Solutions.ResourceSelector",
"label": "Azure NetApp Files Capacity Pool",
"toolTip": "Provide the ANF Capacity Pool housing the ANF Volumes for AVD.",
"resourceType": "Microsoft.NetApp/netAppAccounts/capacityPools",
"constraints": {
"required": true
},
"infoMessages": [],
"visible": true
},
{
"name": "ANFVolumesApi",
"type": "Microsoft.Solutions.ArmApiControl",
"request": {
"method": "GET",
"path": "[concat(steps('AlertsConfig').ANFStorageSection.ANFPool.id, '/volumes?api-version=2022-09-01')]"
}
},
{
"name": "ANFVolumeResourceIds",
"type": "Microsoft.Common.DropDown",
"label": "ANF Volumes used for AVD",
"multiselect": true,
"selectAll": true,
"defaultValue": [],
"toolTip": "The NetApp Volumes that are used for FSLogix or MSIX App attach.",
"filterPlaceholder": "Filter ANF Volumes...",
"defaultDescription": "A value for selection",
"constraints": {
"allowedValues": "[map(steps('AlertsConfig').ANFStorageSection.ANFVolumesApi.value, (item) => parse(concat('{\"label\":\"', item.name, '\",\"value\":\"', item.id, '\"}')))]",
"required": true
},
"infoMessages": [],
"visible": true
}
],
"visible": "[steps('AlertsConfig').optionANFVolumes]"
},
{
"name": "Tags",
"type": "Microsoft.Common.TagsByResource",
"resources": [
"Microsoft.Resources/resourceGroups",
"Microsoft.Automation/automationAccounts",
"Microsoft.Insights/diagnosticsettings",
"Microsoft.ManagedIdentity/userAssignedIdentities",
"Microsoft.Authorization/roleAssignments",
"Microsoft.Insights/actionGroups",
"Microsoft.Resources/deploymentScripts",
"Microsoft.Insights/metricAlerts",
"Microsoft.Insights/scheduledQueryRules",
"Microsoft.Automation/automationAccounts/runbooks",
"Microsoft.Logic/workflows"
],
"visible": true
}
]
}
]
},
"outputs": {
"parameters": {
"AlertNamePrefix": "[steps('AlertsConfig').AlertNamePrefix]",
"DistributionGroup": "[steps('AlertsConfig').DistributionGroup]",
"Environment": "[steps('AlertsConfig').Environment]",
"HostPools": "[steps('AlertsConfig').HostPools]",
"Location": "[steps('basics').resourceScope.location.name]",
"LogAnalyticsWorkspaceResourceId": "[steps('AlertsConfig').LogAnalyticsWorkspaceResource.id]",
"ResourceGroupName": "[if(equals(steps('AlertsConfig').ResourceGroupStatus, 'New'), steps('AlertsConfig').resourceGroupNameNew, last(split(steps('AlertsConfig').resourceGroupNameExisting, '/')))]",
"ResourceGroupStatus": "[steps('AlertsConfig').ResourceGroupStatus]",
"SessionHostsResourceGroupIds": "[steps('AlertsConfig').SessionHostsResourceGroupIds]",
"StorageAccountResourceIds": "[steps('AlertsConfig').AzFilesStorageSection.StorageAccountResourceIds]",
"ANFVolumeResourceIds": "[steps('AlertsConfig').ANFStorageSection.ANFVolumeResourceIds]",
"Tags": "[steps('AlertsConfig').Tags]"
},
"kind": "Subscription",
"location": "[steps('basics').resourceScope.location.name]",
"subscriptionId": "[steps('basics').resourceScope.subscription.id]"
}
}
}