pulumi-azure-native 3.0.0a1743504154__py3-none-any.whl → 3.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-azure-native might be problematic. Click here for more details.

Files changed (37) hide show
  1. pulumi_azure_native/__init__.py +9 -0
  2. pulumi_azure_native/monitor/__init__.py +19 -0
  3. pulumi_azure_native/monitor/_enums.py +305 -0
  4. pulumi_azure_native/monitor/_inputs.py +6221 -1259
  5. pulumi_azure_native/monitor/action_group.py +9 -9
  6. pulumi_azure_native/monitor/activity_log_alert.py +388 -0
  7. pulumi_azure_native/monitor/autoscale_setting.py +397 -0
  8. pulumi_azure_native/monitor/data_collection_endpoint.py +468 -0
  9. pulumi_azure_native/monitor/data_collection_rule.py +519 -0
  10. pulumi_azure_native/monitor/data_collection_rule_association.py +300 -0
  11. pulumi_azure_native/monitor/diagnostic_setting.py +444 -0
  12. pulumi_azure_native/monitor/get_action_group.py +2 -2
  13. pulumi_azure_native/monitor/get_activity_log_alert.py +231 -0
  14. pulumi_azure_native/monitor/get_autoscale_setting.py +189 -0
  15. pulumi_azure_native/monitor/get_data_collection_endpoint.py +357 -0
  16. pulumi_azure_native/monitor/get_data_collection_rule.py +344 -0
  17. pulumi_azure_native/monitor/get_data_collection_rule_association.py +231 -0
  18. pulumi_azure_native/monitor/get_diagnostic_setting.py +273 -0
  19. pulumi_azure_native/monitor/get_management_group_diagnostic_setting.py +245 -0
  20. pulumi_azure_native/monitor/get_metric_alert.py +343 -0
  21. pulumi_azure_native/monitor/get_private_endpoint_connection.py +4 -0
  22. pulumi_azure_native/monitor/get_private_link_scope.py +4 -0
  23. pulumi_azure_native/monitor/get_private_link_scoped_resource.py +4 -0
  24. pulumi_azure_native/monitor/get_subscription_diagnostic_setting.py +239 -0
  25. pulumi_azure_native/monitor/list_diagnostic_settings_category.py +85 -0
  26. pulumi_azure_native/monitor/management_group_diagnostic_setting.py +386 -0
  27. pulumi_azure_native/monitor/metric_alert.py +578 -0
  28. pulumi_azure_native/monitor/outputs.py +5646 -716
  29. pulumi_azure_native/monitor/private_endpoint_connection.py +4 -0
  30. pulumi_azure_native/monitor/private_link_scope.py +4 -0
  31. pulumi_azure_native/monitor/private_link_scoped_resource.py +4 -0
  32. pulumi_azure_native/monitor/subscription_diagnostic_setting.py +365 -0
  33. pulumi_azure_native/pulumi-plugin.json +1 -1
  34. {pulumi_azure_native-3.0.0a1743504154.dist-info → pulumi_azure_native-3.1.0.dist-info}/METADATA +1 -1
  35. {pulumi_azure_native-3.0.0a1743504154.dist-info → pulumi_azure_native-3.1.0.dist-info}/RECORD +37 -18
  36. {pulumi_azure_native-3.0.0a1743504154.dist-info → pulumi_azure_native-3.1.0.dist-info}/WHEEL +0 -0
  37. {pulumi_azure_native-3.0.0a1743504154.dist-info → pulumi_azure_native-3.1.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,578 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
10
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
15
+ from .. import _utilities
16
+ from . import outputs
17
+ from ._enums import *
18
+ from ._inputs import *
19
+
20
+ __all__ = ['MetricAlertArgs', 'MetricAlert']
21
+
22
+ @pulumi.input_type
23
+ class MetricAlertArgs:
24
+ def __init__(__self__, *,
25
+ criteria: pulumi.Input[Union['MetricAlertMultipleResourceMultipleMetricCriteriaArgs', 'MetricAlertSingleResourceMultipleMetricCriteriaArgs', 'WebtestLocationAvailabilityCriteriaArgs']],
26
+ enabled: pulumi.Input[bool],
27
+ evaluation_frequency: pulumi.Input[str],
28
+ resource_group_name: pulumi.Input[str],
29
+ scopes: pulumi.Input[Sequence[pulumi.Input[str]]],
30
+ severity: pulumi.Input[int],
31
+ window_size: pulumi.Input[str],
32
+ actions: Optional[pulumi.Input[Sequence[pulumi.Input['MetricAlertActionArgs']]]] = None,
33
+ auto_mitigate: Optional[pulumi.Input[bool]] = None,
34
+ description: Optional[pulumi.Input[str]] = None,
35
+ location: Optional[pulumi.Input[str]] = None,
36
+ rule_name: Optional[pulumi.Input[str]] = None,
37
+ tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
38
+ target_resource_region: Optional[pulumi.Input[str]] = None,
39
+ target_resource_type: Optional[pulumi.Input[str]] = None):
40
+ """
41
+ The set of arguments for constructing a MetricAlert resource.
42
+ :param pulumi.Input[Union['MetricAlertMultipleResourceMultipleMetricCriteriaArgs', 'MetricAlertSingleResourceMultipleMetricCriteriaArgs', 'WebtestLocationAvailabilityCriteriaArgs']] criteria: defines the specific alert criteria information.
43
+ :param pulumi.Input[bool] enabled: the flag that indicates whether the metric alert is enabled.
44
+ :param pulumi.Input[str] evaluation_frequency: how often the metric alert is evaluated represented in ISO 8601 duration format.
45
+ :param pulumi.Input[str] resource_group_name: The name of the resource group. The name is case insensitive.
46
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.
47
+ :param pulumi.Input[int] severity: Alert severity {0, 1, 2, 3, 4}
48
+ :param pulumi.Input[str] window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
49
+ :param pulumi.Input[Sequence[pulumi.Input['MetricAlertActionArgs']]] actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
50
+ :param pulumi.Input[bool] auto_mitigate: the flag that indicates whether the alert should be auto resolved or not. The default is true.
51
+ :param pulumi.Input[str] description: the description of the metric alert that will be included in the alert email.
52
+ :param pulumi.Input[str] location: Resource location
53
+ :param pulumi.Input[str] rule_name: The name of the rule.
54
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags
55
+ :param pulumi.Input[str] target_resource_region: the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
56
+ :param pulumi.Input[str] target_resource_type: the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
57
+ """
58
+ pulumi.set(__self__, "criteria", criteria)
59
+ pulumi.set(__self__, "enabled", enabled)
60
+ pulumi.set(__self__, "evaluation_frequency", evaluation_frequency)
61
+ pulumi.set(__self__, "resource_group_name", resource_group_name)
62
+ pulumi.set(__self__, "scopes", scopes)
63
+ pulumi.set(__self__, "severity", severity)
64
+ pulumi.set(__self__, "window_size", window_size)
65
+ if actions is not None:
66
+ pulumi.set(__self__, "actions", actions)
67
+ if auto_mitigate is not None:
68
+ pulumi.set(__self__, "auto_mitigate", auto_mitigate)
69
+ if description is not None:
70
+ pulumi.set(__self__, "description", description)
71
+ if location is not None:
72
+ pulumi.set(__self__, "location", location)
73
+ if rule_name is not None:
74
+ pulumi.set(__self__, "rule_name", rule_name)
75
+ if tags is not None:
76
+ pulumi.set(__self__, "tags", tags)
77
+ if target_resource_region is not None:
78
+ pulumi.set(__self__, "target_resource_region", target_resource_region)
79
+ if target_resource_type is not None:
80
+ pulumi.set(__self__, "target_resource_type", target_resource_type)
81
+
82
+ @property
83
+ @pulumi.getter
84
+ def criteria(self) -> pulumi.Input[Union['MetricAlertMultipleResourceMultipleMetricCriteriaArgs', 'MetricAlertSingleResourceMultipleMetricCriteriaArgs', 'WebtestLocationAvailabilityCriteriaArgs']]:
85
+ """
86
+ defines the specific alert criteria information.
87
+ """
88
+ return pulumi.get(self, "criteria")
89
+
90
+ @criteria.setter
91
+ def criteria(self, value: pulumi.Input[Union['MetricAlertMultipleResourceMultipleMetricCriteriaArgs', 'MetricAlertSingleResourceMultipleMetricCriteriaArgs', 'WebtestLocationAvailabilityCriteriaArgs']]):
92
+ pulumi.set(self, "criteria", value)
93
+
94
+ @property
95
+ @pulumi.getter
96
+ def enabled(self) -> pulumi.Input[bool]:
97
+ """
98
+ the flag that indicates whether the metric alert is enabled.
99
+ """
100
+ return pulumi.get(self, "enabled")
101
+
102
+ @enabled.setter
103
+ def enabled(self, value: pulumi.Input[bool]):
104
+ pulumi.set(self, "enabled", value)
105
+
106
+ @property
107
+ @pulumi.getter(name="evaluationFrequency")
108
+ def evaluation_frequency(self) -> pulumi.Input[str]:
109
+ """
110
+ how often the metric alert is evaluated represented in ISO 8601 duration format.
111
+ """
112
+ return pulumi.get(self, "evaluation_frequency")
113
+
114
+ @evaluation_frequency.setter
115
+ def evaluation_frequency(self, value: pulumi.Input[str]):
116
+ pulumi.set(self, "evaluation_frequency", value)
117
+
118
+ @property
119
+ @pulumi.getter(name="resourceGroupName")
120
+ def resource_group_name(self) -> pulumi.Input[str]:
121
+ """
122
+ The name of the resource group. The name is case insensitive.
123
+ """
124
+ return pulumi.get(self, "resource_group_name")
125
+
126
+ @resource_group_name.setter
127
+ def resource_group_name(self, value: pulumi.Input[str]):
128
+ pulumi.set(self, "resource_group_name", value)
129
+
130
+ @property
131
+ @pulumi.getter
132
+ def scopes(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
133
+ """
134
+ the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.
135
+ """
136
+ return pulumi.get(self, "scopes")
137
+
138
+ @scopes.setter
139
+ def scopes(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
140
+ pulumi.set(self, "scopes", value)
141
+
142
+ @property
143
+ @pulumi.getter
144
+ def severity(self) -> pulumi.Input[int]:
145
+ """
146
+ Alert severity {0, 1, 2, 3, 4}
147
+ """
148
+ return pulumi.get(self, "severity")
149
+
150
+ @severity.setter
151
+ def severity(self, value: pulumi.Input[int]):
152
+ pulumi.set(self, "severity", value)
153
+
154
+ @property
155
+ @pulumi.getter(name="windowSize")
156
+ def window_size(self) -> pulumi.Input[str]:
157
+ """
158
+ the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
159
+ """
160
+ return pulumi.get(self, "window_size")
161
+
162
+ @window_size.setter
163
+ def window_size(self, value: pulumi.Input[str]):
164
+ pulumi.set(self, "window_size", value)
165
+
166
+ @property
167
+ @pulumi.getter
168
+ def actions(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['MetricAlertActionArgs']]]]:
169
+ """
170
+ the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
171
+ """
172
+ return pulumi.get(self, "actions")
173
+
174
+ @actions.setter
175
+ def actions(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['MetricAlertActionArgs']]]]):
176
+ pulumi.set(self, "actions", value)
177
+
178
+ @property
179
+ @pulumi.getter(name="autoMitigate")
180
+ def auto_mitigate(self) -> Optional[pulumi.Input[bool]]:
181
+ """
182
+ the flag that indicates whether the alert should be auto resolved or not. The default is true.
183
+ """
184
+ return pulumi.get(self, "auto_mitigate")
185
+
186
+ @auto_mitigate.setter
187
+ def auto_mitigate(self, value: Optional[pulumi.Input[bool]]):
188
+ pulumi.set(self, "auto_mitigate", value)
189
+
190
+ @property
191
+ @pulumi.getter
192
+ def description(self) -> Optional[pulumi.Input[str]]:
193
+ """
194
+ the description of the metric alert that will be included in the alert email.
195
+ """
196
+ return pulumi.get(self, "description")
197
+
198
+ @description.setter
199
+ def description(self, value: Optional[pulumi.Input[str]]):
200
+ pulumi.set(self, "description", value)
201
+
202
+ @property
203
+ @pulumi.getter
204
+ def location(self) -> Optional[pulumi.Input[str]]:
205
+ """
206
+ Resource location
207
+ """
208
+ return pulumi.get(self, "location")
209
+
210
+ @location.setter
211
+ def location(self, value: Optional[pulumi.Input[str]]):
212
+ pulumi.set(self, "location", value)
213
+
214
+ @property
215
+ @pulumi.getter(name="ruleName")
216
+ def rule_name(self) -> Optional[pulumi.Input[str]]:
217
+ """
218
+ The name of the rule.
219
+ """
220
+ return pulumi.get(self, "rule_name")
221
+
222
+ @rule_name.setter
223
+ def rule_name(self, value: Optional[pulumi.Input[str]]):
224
+ pulumi.set(self, "rule_name", value)
225
+
226
+ @property
227
+ @pulumi.getter
228
+ def tags(self) -> Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]:
229
+ """
230
+ Resource tags
231
+ """
232
+ return pulumi.get(self, "tags")
233
+
234
+ @tags.setter
235
+ def tags(self, value: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]]):
236
+ pulumi.set(self, "tags", value)
237
+
238
+ @property
239
+ @pulumi.getter(name="targetResourceRegion")
240
+ def target_resource_region(self) -> Optional[pulumi.Input[str]]:
241
+ """
242
+ the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
243
+ """
244
+ return pulumi.get(self, "target_resource_region")
245
+
246
+ @target_resource_region.setter
247
+ def target_resource_region(self, value: Optional[pulumi.Input[str]]):
248
+ pulumi.set(self, "target_resource_region", value)
249
+
250
+ @property
251
+ @pulumi.getter(name="targetResourceType")
252
+ def target_resource_type(self) -> Optional[pulumi.Input[str]]:
253
+ """
254
+ the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
255
+ """
256
+ return pulumi.get(self, "target_resource_type")
257
+
258
+ @target_resource_type.setter
259
+ def target_resource_type(self, value: Optional[pulumi.Input[str]]):
260
+ pulumi.set(self, "target_resource_type", value)
261
+
262
+
263
+ class MetricAlert(pulumi.CustomResource):
264
+ @overload
265
+ def __init__(__self__,
266
+ resource_name: str,
267
+ opts: Optional[pulumi.ResourceOptions] = None,
268
+ actions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MetricAlertActionArgs', 'MetricAlertActionArgsDict']]]]] = None,
269
+ auto_mitigate: Optional[pulumi.Input[bool]] = None,
270
+ criteria: Optional[pulumi.Input[Union[Union['MetricAlertMultipleResourceMultipleMetricCriteriaArgs', 'MetricAlertMultipleResourceMultipleMetricCriteriaArgsDict'], Union['MetricAlertSingleResourceMultipleMetricCriteriaArgs', 'MetricAlertSingleResourceMultipleMetricCriteriaArgsDict'], Union['WebtestLocationAvailabilityCriteriaArgs', 'WebtestLocationAvailabilityCriteriaArgsDict']]]] = None,
271
+ description: Optional[pulumi.Input[str]] = None,
272
+ enabled: Optional[pulumi.Input[bool]] = None,
273
+ evaluation_frequency: Optional[pulumi.Input[str]] = None,
274
+ location: Optional[pulumi.Input[str]] = None,
275
+ resource_group_name: Optional[pulumi.Input[str]] = None,
276
+ rule_name: Optional[pulumi.Input[str]] = None,
277
+ scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
278
+ severity: Optional[pulumi.Input[int]] = None,
279
+ tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
280
+ target_resource_region: Optional[pulumi.Input[str]] = None,
281
+ target_resource_type: Optional[pulumi.Input[str]] = None,
282
+ window_size: Optional[pulumi.Input[str]] = None,
283
+ __props__=None):
284
+ """
285
+ The metric alert resource.
286
+
287
+ Uses Azure REST API version 2018-03-01.
288
+
289
+ :param str resource_name: The name of the resource.
290
+ :param pulumi.ResourceOptions opts: Options for the resource.
291
+ :param pulumi.Input[Sequence[pulumi.Input[Union['MetricAlertActionArgs', 'MetricAlertActionArgsDict']]]] actions: the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
292
+ :param pulumi.Input[bool] auto_mitigate: the flag that indicates whether the alert should be auto resolved or not. The default is true.
293
+ :param pulumi.Input[Union[Union['MetricAlertMultipleResourceMultipleMetricCriteriaArgs', 'MetricAlertMultipleResourceMultipleMetricCriteriaArgsDict'], Union['MetricAlertSingleResourceMultipleMetricCriteriaArgs', 'MetricAlertSingleResourceMultipleMetricCriteriaArgsDict'], Union['WebtestLocationAvailabilityCriteriaArgs', 'WebtestLocationAvailabilityCriteriaArgsDict']]] criteria: defines the specific alert criteria information.
294
+ :param pulumi.Input[str] description: the description of the metric alert that will be included in the alert email.
295
+ :param pulumi.Input[bool] enabled: the flag that indicates whether the metric alert is enabled.
296
+ :param pulumi.Input[str] evaluation_frequency: how often the metric alert is evaluated represented in ISO 8601 duration format.
297
+ :param pulumi.Input[str] location: Resource location
298
+ :param pulumi.Input[str] resource_group_name: The name of the resource group. The name is case insensitive.
299
+ :param pulumi.Input[str] rule_name: The name of the rule.
300
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] scopes: the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.
301
+ :param pulumi.Input[int] severity: Alert severity {0, 1, 2, 3, 4}
302
+ :param pulumi.Input[Mapping[str, pulumi.Input[str]]] tags: Resource tags
303
+ :param pulumi.Input[str] target_resource_region: the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
304
+ :param pulumi.Input[str] target_resource_type: the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
305
+ :param pulumi.Input[str] window_size: the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
306
+ """
307
+ ...
308
+ @overload
309
+ def __init__(__self__,
310
+ resource_name: str,
311
+ args: MetricAlertArgs,
312
+ opts: Optional[pulumi.ResourceOptions] = None):
313
+ """
314
+ The metric alert resource.
315
+
316
+ Uses Azure REST API version 2018-03-01.
317
+
318
+ :param str resource_name: The name of the resource.
319
+ :param MetricAlertArgs args: The arguments to use to populate this resource's properties.
320
+ :param pulumi.ResourceOptions opts: Options for the resource.
321
+ """
322
+ ...
323
+ def __init__(__self__, resource_name: str, *args, **kwargs):
324
+ resource_args, opts = _utilities.get_resource_args_opts(MetricAlertArgs, pulumi.ResourceOptions, *args, **kwargs)
325
+ if resource_args is not None:
326
+ __self__._internal_init(resource_name, opts, **resource_args.__dict__)
327
+ else:
328
+ __self__._internal_init(resource_name, *args, **kwargs)
329
+
330
+ def _internal_init(__self__,
331
+ resource_name: str,
332
+ opts: Optional[pulumi.ResourceOptions] = None,
333
+ actions: Optional[pulumi.Input[Sequence[pulumi.Input[Union['MetricAlertActionArgs', 'MetricAlertActionArgsDict']]]]] = None,
334
+ auto_mitigate: Optional[pulumi.Input[bool]] = None,
335
+ criteria: Optional[pulumi.Input[Union[Union['MetricAlertMultipleResourceMultipleMetricCriteriaArgs', 'MetricAlertMultipleResourceMultipleMetricCriteriaArgsDict'], Union['MetricAlertSingleResourceMultipleMetricCriteriaArgs', 'MetricAlertSingleResourceMultipleMetricCriteriaArgsDict'], Union['WebtestLocationAvailabilityCriteriaArgs', 'WebtestLocationAvailabilityCriteriaArgsDict']]]] = None,
336
+ description: Optional[pulumi.Input[str]] = None,
337
+ enabled: Optional[pulumi.Input[bool]] = None,
338
+ evaluation_frequency: Optional[pulumi.Input[str]] = None,
339
+ location: Optional[pulumi.Input[str]] = None,
340
+ resource_group_name: Optional[pulumi.Input[str]] = None,
341
+ rule_name: Optional[pulumi.Input[str]] = None,
342
+ scopes: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
343
+ severity: Optional[pulumi.Input[int]] = None,
344
+ tags: Optional[pulumi.Input[Mapping[str, pulumi.Input[str]]]] = None,
345
+ target_resource_region: Optional[pulumi.Input[str]] = None,
346
+ target_resource_type: Optional[pulumi.Input[str]] = None,
347
+ window_size: Optional[pulumi.Input[str]] = None,
348
+ __props__=None):
349
+ opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
350
+ if not isinstance(opts, pulumi.ResourceOptions):
351
+ raise TypeError('Expected resource options to be a ResourceOptions instance')
352
+ if opts.id is None:
353
+ if __props__ is not None:
354
+ raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
355
+ __props__ = MetricAlertArgs.__new__(MetricAlertArgs)
356
+
357
+ __props__.__dict__["actions"] = actions
358
+ __props__.__dict__["auto_mitigate"] = auto_mitigate
359
+ if criteria is None and not opts.urn:
360
+ raise TypeError("Missing required property 'criteria'")
361
+ __props__.__dict__["criteria"] = criteria
362
+ __props__.__dict__["description"] = description
363
+ if enabled is None and not opts.urn:
364
+ raise TypeError("Missing required property 'enabled'")
365
+ __props__.__dict__["enabled"] = enabled
366
+ if evaluation_frequency is None and not opts.urn:
367
+ raise TypeError("Missing required property 'evaluation_frequency'")
368
+ __props__.__dict__["evaluation_frequency"] = evaluation_frequency
369
+ __props__.__dict__["location"] = location
370
+ if resource_group_name is None and not opts.urn:
371
+ raise TypeError("Missing required property 'resource_group_name'")
372
+ __props__.__dict__["resource_group_name"] = resource_group_name
373
+ __props__.__dict__["rule_name"] = rule_name
374
+ if scopes is None and not opts.urn:
375
+ raise TypeError("Missing required property 'scopes'")
376
+ __props__.__dict__["scopes"] = scopes
377
+ if severity is None and not opts.urn:
378
+ raise TypeError("Missing required property 'severity'")
379
+ __props__.__dict__["severity"] = severity
380
+ __props__.__dict__["tags"] = tags
381
+ __props__.__dict__["target_resource_region"] = target_resource_region
382
+ __props__.__dict__["target_resource_type"] = target_resource_type
383
+ if window_size is None and not opts.urn:
384
+ raise TypeError("Missing required property 'window_size'")
385
+ __props__.__dict__["window_size"] = window_size
386
+ __props__.__dict__["azure_api_version"] = None
387
+ __props__.__dict__["is_migrated"] = None
388
+ __props__.__dict__["last_updated_time"] = None
389
+ __props__.__dict__["name"] = None
390
+ __props__.__dict__["type"] = None
391
+ alias_opts = pulumi.ResourceOptions(aliases=[pulumi.Alias(type_="azure-native:insights/v20180301:MetricAlert"), pulumi.Alias(type_="azure-native:insights:MetricAlert"), pulumi.Alias(type_="azure-native:monitor/v20180301:MetricAlert")])
392
+ opts = pulumi.ResourceOptions.merge(opts, alias_opts)
393
+ super(MetricAlert, __self__).__init__(
394
+ 'azure-native:monitor:MetricAlert',
395
+ resource_name,
396
+ __props__,
397
+ opts)
398
+
399
+ @staticmethod
400
+ def get(resource_name: str,
401
+ id: pulumi.Input[str],
402
+ opts: Optional[pulumi.ResourceOptions] = None) -> 'MetricAlert':
403
+ """
404
+ Get an existing MetricAlert resource's state with the given name, id, and optional extra
405
+ properties used to qualify the lookup.
406
+
407
+ :param str resource_name: The unique name of the resulting resource.
408
+ :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
409
+ :param pulumi.ResourceOptions opts: Options for the resource.
410
+ """
411
+ opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
412
+
413
+ __props__ = MetricAlertArgs.__new__(MetricAlertArgs)
414
+
415
+ __props__.__dict__["actions"] = None
416
+ __props__.__dict__["auto_mitigate"] = None
417
+ __props__.__dict__["azure_api_version"] = None
418
+ __props__.__dict__["criteria"] = None
419
+ __props__.__dict__["description"] = None
420
+ __props__.__dict__["enabled"] = None
421
+ __props__.__dict__["evaluation_frequency"] = None
422
+ __props__.__dict__["is_migrated"] = None
423
+ __props__.__dict__["last_updated_time"] = None
424
+ __props__.__dict__["location"] = None
425
+ __props__.__dict__["name"] = None
426
+ __props__.__dict__["scopes"] = None
427
+ __props__.__dict__["severity"] = None
428
+ __props__.__dict__["tags"] = None
429
+ __props__.__dict__["target_resource_region"] = None
430
+ __props__.__dict__["target_resource_type"] = None
431
+ __props__.__dict__["type"] = None
432
+ __props__.__dict__["window_size"] = None
433
+ return MetricAlert(resource_name, opts=opts, __props__=__props__)
434
+
435
+ @property
436
+ @pulumi.getter
437
+ def actions(self) -> pulumi.Output[Optional[Sequence['outputs.MetricAlertActionResponse']]]:
438
+ """
439
+ the array of actions that are performed when the alert rule becomes active, and when an alert condition is resolved.
440
+ """
441
+ return pulumi.get(self, "actions")
442
+
443
+ @property
444
+ @pulumi.getter(name="autoMitigate")
445
+ def auto_mitigate(self) -> pulumi.Output[Optional[bool]]:
446
+ """
447
+ the flag that indicates whether the alert should be auto resolved or not. The default is true.
448
+ """
449
+ return pulumi.get(self, "auto_mitigate")
450
+
451
+ @property
452
+ @pulumi.getter(name="azureApiVersion")
453
+ def azure_api_version(self) -> pulumi.Output[str]:
454
+ """
455
+ The Azure API version of the resource.
456
+ """
457
+ return pulumi.get(self, "azure_api_version")
458
+
459
+ @property
460
+ @pulumi.getter
461
+ def criteria(self) -> pulumi.Output[Any]:
462
+ """
463
+ defines the specific alert criteria information.
464
+ """
465
+ return pulumi.get(self, "criteria")
466
+
467
+ @property
468
+ @pulumi.getter
469
+ def description(self) -> pulumi.Output[Optional[str]]:
470
+ """
471
+ the description of the metric alert that will be included in the alert email.
472
+ """
473
+ return pulumi.get(self, "description")
474
+
475
+ @property
476
+ @pulumi.getter
477
+ def enabled(self) -> pulumi.Output[bool]:
478
+ """
479
+ the flag that indicates whether the metric alert is enabled.
480
+ """
481
+ return pulumi.get(self, "enabled")
482
+
483
+ @property
484
+ @pulumi.getter(name="evaluationFrequency")
485
+ def evaluation_frequency(self) -> pulumi.Output[str]:
486
+ """
487
+ how often the metric alert is evaluated represented in ISO 8601 duration format.
488
+ """
489
+ return pulumi.get(self, "evaluation_frequency")
490
+
491
+ @property
492
+ @pulumi.getter(name="isMigrated")
493
+ def is_migrated(self) -> pulumi.Output[bool]:
494
+ """
495
+ the value indicating whether this alert rule is migrated.
496
+ """
497
+ return pulumi.get(self, "is_migrated")
498
+
499
+ @property
500
+ @pulumi.getter(name="lastUpdatedTime")
501
+ def last_updated_time(self) -> pulumi.Output[str]:
502
+ """
503
+ Last time the rule was updated in ISO8601 format.
504
+ """
505
+ return pulumi.get(self, "last_updated_time")
506
+
507
+ @property
508
+ @pulumi.getter
509
+ def location(self) -> pulumi.Output[str]:
510
+ """
511
+ Resource location
512
+ """
513
+ return pulumi.get(self, "location")
514
+
515
+ @property
516
+ @pulumi.getter
517
+ def name(self) -> pulumi.Output[str]:
518
+ """
519
+ Azure resource name
520
+ """
521
+ return pulumi.get(self, "name")
522
+
523
+ @property
524
+ @pulumi.getter
525
+ def scopes(self) -> pulumi.Output[Sequence[str]]:
526
+ """
527
+ the list of resource id's that this metric alert is scoped to. You cannot change the scope of a metric rule based on logs.
528
+ """
529
+ return pulumi.get(self, "scopes")
530
+
531
+ @property
532
+ @pulumi.getter
533
+ def severity(self) -> pulumi.Output[int]:
534
+ """
535
+ Alert severity {0, 1, 2, 3, 4}
536
+ """
537
+ return pulumi.get(self, "severity")
538
+
539
+ @property
540
+ @pulumi.getter
541
+ def tags(self) -> pulumi.Output[Optional[Mapping[str, str]]]:
542
+ """
543
+ Resource tags
544
+ """
545
+ return pulumi.get(self, "tags")
546
+
547
+ @property
548
+ @pulumi.getter(name="targetResourceRegion")
549
+ def target_resource_region(self) -> pulumi.Output[Optional[str]]:
550
+ """
551
+ the region of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
552
+ """
553
+ return pulumi.get(self, "target_resource_region")
554
+
555
+ @property
556
+ @pulumi.getter(name="targetResourceType")
557
+ def target_resource_type(self) -> pulumi.Output[Optional[str]]:
558
+ """
559
+ the resource type of the target resource(s) on which the alert is created/updated. Mandatory if the scope contains a subscription, resource group, or more than one resource.
560
+ """
561
+ return pulumi.get(self, "target_resource_type")
562
+
563
+ @property
564
+ @pulumi.getter
565
+ def type(self) -> pulumi.Output[str]:
566
+ """
567
+ Azure resource type
568
+ """
569
+ return pulumi.get(self, "type")
570
+
571
+ @property
572
+ @pulumi.getter(name="windowSize")
573
+ def window_size(self) -> pulumi.Output[str]:
574
+ """
575
+ the period of time (in ISO 8601 duration format) that is used to monitor alert activity based on the threshold.
576
+ """
577
+ return pulumi.get(self, "window_size")
578
+