1 package alertsmanagement
2
3
4
5
6
7
8
9
10 type ActionRuleStatus string
11
12 const (
13
14 Disabled ActionRuleStatus = "Disabled"
15
16 Enabled ActionRuleStatus = "Enabled"
17 )
18
19
20 func PossibleActionRuleStatusValues() []ActionRuleStatus {
21 return []ActionRuleStatus{Disabled, Enabled}
22 }
23
24
25 type AlertModificationEvent string
26
27 const (
28
29 ActionRuleSuppressed AlertModificationEvent = "ActionRuleSuppressed"
30
31 ActionRuleTriggered AlertModificationEvent = "ActionRuleTriggered"
32
33 ActionsFailed AlertModificationEvent = "ActionsFailed"
34
35 ActionsSuppressed AlertModificationEvent = "ActionsSuppressed"
36
37 ActionsTriggered AlertModificationEvent = "ActionsTriggered"
38
39 AlertCreated AlertModificationEvent = "AlertCreated"
40
41 MonitorConditionChange AlertModificationEvent = "MonitorConditionChange"
42
43 SeverityChange AlertModificationEvent = "SeverityChange"
44
45 StateChange AlertModificationEvent = "StateChange"
46 )
47
48
49 func PossibleAlertModificationEventValues() []AlertModificationEvent {
50 return []AlertModificationEvent{ActionRuleSuppressed, ActionRuleTriggered, ActionsFailed, ActionsSuppressed, ActionsTriggered, AlertCreated, MonitorConditionChange, SeverityChange, StateChange}
51 }
52
53
54 type AlertRuleState string
55
56 const (
57
58 AlertRuleStateDisabled AlertRuleState = "Disabled"
59
60 AlertRuleStateEnabled AlertRuleState = "Enabled"
61 )
62
63
64 func PossibleAlertRuleStateValues() []AlertRuleState {
65 return []AlertRuleState{AlertRuleStateDisabled, AlertRuleStateEnabled}
66 }
67
68
69 type AlertsSortByFields string
70
71 const (
72
73 AlertsSortByFieldsAlertState AlertsSortByFields = "alertState"
74
75 AlertsSortByFieldsLastModifiedDateTime AlertsSortByFields = "lastModifiedDateTime"
76
77 AlertsSortByFieldsMonitorCondition AlertsSortByFields = "monitorCondition"
78
79 AlertsSortByFieldsName AlertsSortByFields = "name"
80
81 AlertsSortByFieldsSeverity AlertsSortByFields = "severity"
82
83 AlertsSortByFieldsStartDateTime AlertsSortByFields = "startDateTime"
84
85 AlertsSortByFieldsTargetResource AlertsSortByFields = "targetResource"
86
87 AlertsSortByFieldsTargetResourceGroup AlertsSortByFields = "targetResourceGroup"
88
89 AlertsSortByFieldsTargetResourceName AlertsSortByFields = "targetResourceName"
90
91 AlertsSortByFieldsTargetResourceType AlertsSortByFields = "targetResourceType"
92 )
93
94
95 func PossibleAlertsSortByFieldsValues() []AlertsSortByFields {
96 return []AlertsSortByFields{AlertsSortByFieldsAlertState, AlertsSortByFieldsLastModifiedDateTime, AlertsSortByFieldsMonitorCondition, AlertsSortByFieldsName, AlertsSortByFieldsSeverity, AlertsSortByFieldsStartDateTime, AlertsSortByFieldsTargetResource, AlertsSortByFieldsTargetResourceGroup, AlertsSortByFieldsTargetResourceName, AlertsSortByFieldsTargetResourceType}
97 }
98
99
100 type AlertsSummaryGroupByFields string
101
102 const (
103
104 AlertsSummaryGroupByFieldsAlertRule AlertsSummaryGroupByFields = "alertRule"
105
106 AlertsSummaryGroupByFieldsAlertState AlertsSummaryGroupByFields = "alertState"
107
108 AlertsSummaryGroupByFieldsMonitorCondition AlertsSummaryGroupByFields = "monitorCondition"
109
110 AlertsSummaryGroupByFieldsMonitorService AlertsSummaryGroupByFields = "monitorService"
111
112 AlertsSummaryGroupByFieldsSeverity AlertsSummaryGroupByFields = "severity"
113
114 AlertsSummaryGroupByFieldsSignalType AlertsSummaryGroupByFields = "signalType"
115 )
116
117
118 func PossibleAlertsSummaryGroupByFieldsValues() []AlertsSummaryGroupByFields {
119 return []AlertsSummaryGroupByFields{AlertsSummaryGroupByFieldsAlertRule, AlertsSummaryGroupByFieldsAlertState, AlertsSummaryGroupByFieldsMonitorCondition, AlertsSummaryGroupByFieldsMonitorService, AlertsSummaryGroupByFieldsSeverity, AlertsSummaryGroupByFieldsSignalType}
120 }
121
122
123 type AlertState string
124
125 const (
126
127 AlertStateAcknowledged AlertState = "Acknowledged"
128
129 AlertStateClosed AlertState = "Closed"
130
131 AlertStateNew AlertState = "New"
132 )
133
134
135 func PossibleAlertStateValues() []AlertState {
136 return []AlertState{AlertStateAcknowledged, AlertStateClosed, AlertStateNew}
137 }
138
139
140 type MetadataIdentifier string
141
142 const (
143
144 MetadataIdentifierAlertsMetaDataProperties MetadataIdentifier = "alertsMetaDataProperties"
145
146 MetadataIdentifierMonitorServiceList MetadataIdentifier = "MonitorServiceList"
147 )
148
149
150 func PossibleMetadataIdentifierValues() []MetadataIdentifier {
151 return []MetadataIdentifier{MetadataIdentifierAlertsMetaDataProperties, MetadataIdentifierMonitorServiceList}
152 }
153
154
155 type MonitorCondition string
156
157 const (
158
159 Fired MonitorCondition = "Fired"
160
161 Resolved MonitorCondition = "Resolved"
162 )
163
164
165 func PossibleMonitorConditionValues() []MonitorCondition {
166 return []MonitorCondition{Fired, Resolved}
167 }
168
169
170 type MonitorService string
171
172 const (
173
174 ActivityLogAdministrative MonitorService = "ActivityLog Administrative"
175
176 ActivityLogAutoscale MonitorService = "ActivityLog Autoscale"
177
178 ActivityLogPolicy MonitorService = "ActivityLog Policy"
179
180 ActivityLogRecommendation MonitorService = "ActivityLog Recommendation"
181
182 ActivityLogSecurity MonitorService = "ActivityLog Security"
183
184 ApplicationInsights MonitorService = "Application Insights"
185
186 LogAnalytics MonitorService = "Log Analytics"
187
188 Nagios MonitorService = "Nagios"
189
190 Platform MonitorService = "Platform"
191
192 SCOM MonitorService = "SCOM"
193
194 ServiceHealth MonitorService = "ServiceHealth"
195
196 SmartDetector MonitorService = "SmartDetector"
197
198 VMInsights MonitorService = "VM Insights"
199
200 Zabbix MonitorService = "Zabbix"
201 )
202
203
204 func PossibleMonitorServiceValues() []MonitorService {
205 return []MonitorService{ActivityLogAdministrative, ActivityLogAutoscale, ActivityLogPolicy, ActivityLogRecommendation, ActivityLogSecurity, ApplicationInsights, LogAnalytics, Nagios, Platform, SCOM, ServiceHealth, SmartDetector, VMInsights, Zabbix}
206 }
207
208
209 type Operator string
210
211 const (
212
213 Contains Operator = "Contains"
214
215 DoesNotContain Operator = "DoesNotContain"
216
217 Equals Operator = "Equals"
218
219 NotEquals Operator = "NotEquals"
220 )
221
222
223 func PossibleOperatorValues() []Operator {
224 return []Operator{Contains, DoesNotContain, Equals, NotEquals}
225 }
226
227
228 type ScopeType string
229
230 const (
231
232 ScopeTypeResource ScopeType = "Resource"
233
234 ScopeTypeResourceGroup ScopeType = "ResourceGroup"
235
236 ScopeTypeSubscription ScopeType = "Subscription"
237 )
238
239
240 func PossibleScopeTypeValues() []ScopeType {
241 return []ScopeType{ScopeTypeResource, ScopeTypeResourceGroup, ScopeTypeSubscription}
242 }
243
244
245 type Severity string
246
247 const (
248
249 Sev0 Severity = "Sev0"
250
251 Sev1 Severity = "Sev1"
252
253 Sev2 Severity = "Sev2"
254
255 Sev3 Severity = "Sev3"
256
257 Sev4 Severity = "Sev4"
258 )
259
260
261 func PossibleSeverityValues() []Severity {
262 return []Severity{Sev0, Sev1, Sev2, Sev3, Sev4}
263 }
264
265
266 type SignalType string
267
268 const (
269
270 Log SignalType = "Log"
271
272 Metric SignalType = "Metric"
273
274 Unknown SignalType = "Unknown"
275 )
276
277
278 func PossibleSignalTypeValues() []SignalType {
279 return []SignalType{Log, Metric, Unknown}
280 }
281
282
283 type SmartGroupModificationEvent string
284
285 const (
286
287 SmartGroupModificationEventAlertAdded SmartGroupModificationEvent = "AlertAdded"
288
289 SmartGroupModificationEventAlertRemoved SmartGroupModificationEvent = "AlertRemoved"
290
291 SmartGroupModificationEventSmartGroupCreated SmartGroupModificationEvent = "SmartGroupCreated"
292
293 SmartGroupModificationEventStateChange SmartGroupModificationEvent = "StateChange"
294 )
295
296
297 func PossibleSmartGroupModificationEventValues() []SmartGroupModificationEvent {
298 return []SmartGroupModificationEvent{SmartGroupModificationEventAlertAdded, SmartGroupModificationEventAlertRemoved, SmartGroupModificationEventSmartGroupCreated, SmartGroupModificationEventStateChange}
299 }
300
301
302 type SmartGroupsSortByFields string
303
304 const (
305
306 SmartGroupsSortByFieldsAlertsCount SmartGroupsSortByFields = "alertsCount"
307
308 SmartGroupsSortByFieldsLastModifiedDateTime SmartGroupsSortByFields = "lastModifiedDateTime"
309
310 SmartGroupsSortByFieldsSeverity SmartGroupsSortByFields = "severity"
311
312 SmartGroupsSortByFieldsStartDateTime SmartGroupsSortByFields = "startDateTime"
313
314 SmartGroupsSortByFieldsState SmartGroupsSortByFields = "state"
315 )
316
317
318 func PossibleSmartGroupsSortByFieldsValues() []SmartGroupsSortByFields {
319 return []SmartGroupsSortByFields{SmartGroupsSortByFieldsAlertsCount, SmartGroupsSortByFieldsLastModifiedDateTime, SmartGroupsSortByFieldsSeverity, SmartGroupsSortByFieldsStartDateTime, SmartGroupsSortByFieldsState}
320 }
321
322
323 type State string
324
325 const (
326
327 StateAcknowledged State = "Acknowledged"
328
329 StateClosed State = "Closed"
330
331 StateNew State = "New"
332 )
333
334
335 func PossibleStateValues() []State {
336 return []State{StateAcknowledged, StateClosed, StateNew}
337 }
338
339
340 type SuppressionType string
341
342 const (
343
344 Always SuppressionType = "Always"
345
346 Daily SuppressionType = "Daily"
347
348 Monthly SuppressionType = "Monthly"
349
350 Once SuppressionType = "Once"
351
352 Weekly SuppressionType = "Weekly"
353 )
354
355
356 func PossibleSuppressionTypeValues() []SuppressionType {
357 return []SuppressionType{Always, Daily, Monthly, Once, Weekly}
358 }
359
360
361 type TimeRange string
362
363 const (
364
365 Oned TimeRange = "1d"
366
367 Oneh TimeRange = "1h"
368
369 Sevend TimeRange = "7d"
370
371 ThreeZerod TimeRange = "30d"
372 )
373
374
375 func PossibleTimeRangeValues() []TimeRange {
376 return []TimeRange{Oned, Oneh, Sevend, ThreeZerod}
377 }
378
379
380 type Type string
381
382 const (
383
384 TypeActionGroup Type = "ActionGroup"
385
386 TypeActionRuleProperties Type = "ActionRuleProperties"
387
388 TypeDiagnostics Type = "Diagnostics"
389
390 TypeSuppression Type = "Suppression"
391 )
392
393
394 func PossibleTypeValues() []Type {
395 return []Type{TypeActionGroup, TypeActionRuleProperties, TypeDiagnostics, TypeSuppression}
396 }
397
View as plain text