pulumi-newrelic 5.23.0__py3-none-any.whl → 5.23.0a1711605988__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.
- pulumi_newrelic/_inputs.py +270 -183
- pulumi_newrelic/account_management.py +20 -20
- pulumi_newrelic/alert_channel.py +92 -76
- pulumi_newrelic/alert_condition.py +163 -104
- pulumi_newrelic/alert_muting_rule.py +35 -33
- pulumi_newrelic/alert_policy.py +43 -68
- pulumi_newrelic/alert_policy_channel.py +8 -12
- pulumi_newrelic/cloud/_inputs.py +1072 -322
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +6 -4
- pulumi_newrelic/cloud/aws_integrations.py +15 -13
- pulumi_newrelic/cloud/aws_link_account.py +6 -4
- pulumi_newrelic/cloud/azure_integrations.py +12 -10
- pulumi_newrelic/cloud/azure_link_account.py +6 -4
- pulumi_newrelic/cloud/gcp_integrations.py +6 -6
- pulumi_newrelic/cloud/gcp_link_account.py +6 -4
- pulumi_newrelic/cloud/outputs.py +1072 -322
- pulumi_newrelic/data_partition_rule.py +4 -0
- pulumi_newrelic/entity_tags.py +17 -13
- pulumi_newrelic/events_to_metrics_rule.py +4 -2
- pulumi_newrelic/get_account.py +4 -0
- pulumi_newrelic/get_application.py +10 -8
- pulumi_newrelic/get_authentication_domain.py +8 -4
- pulumi_newrelic/get_cloud_account.py +4 -0
- pulumi_newrelic/get_entity.py +33 -48
- pulumi_newrelic/get_group.py +8 -42
- pulumi_newrelic/get_key_transaction.py +10 -8
- pulumi_newrelic/get_notification_destination.py +1 -20
- pulumi_newrelic/get_obfuscation_expression.py +4 -2
- pulumi_newrelic/get_service_level_alert_helper.py +46 -22
- pulumi_newrelic/get_test_grok_pattern.py +6 -4
- pulumi_newrelic/get_user.py +4 -0
- pulumi_newrelic/group.py +42 -40
- pulumi_newrelic/infra_alert_condition.py +145 -154
- pulumi_newrelic/insights/event.py +25 -8
- pulumi_newrelic/log_parsing_rule.py +10 -6
- pulumi_newrelic/monitor_downtime.py +193 -174
- pulumi_newrelic/notification_channel.py +150 -124
- pulumi_newrelic/notification_destination.py +1 -95
- pulumi_newrelic/nrql_alert_condition.py +48 -38
- pulumi_newrelic/nrql_drop_rule.py +38 -34
- pulumi_newrelic/obfuscation_expression.py +4 -2
- pulumi_newrelic/obfuscation_rule.py +4 -4
- pulumi_newrelic/one_dashboard.py +48 -42
- pulumi_newrelic/one_dashboard_raw.py +86 -86
- pulumi_newrelic/outputs.py +270 -180
- pulumi_newrelic/plugins/_inputs.py +16 -16
- pulumi_newrelic/plugins/application_settings.py +36 -20
- pulumi_newrelic/plugins/outputs.py +16 -16
- pulumi_newrelic/plugins/workload.py +40 -158
- pulumi_newrelic/service_level.py +123 -38
- pulumi_newrelic/synthetics/alert_condition.py +78 -34
- pulumi_newrelic/synthetics/broken_links_monitor.py +20 -18
- pulumi_newrelic/synthetics/cert_check_monitor.py +18 -16
- pulumi_newrelic/synthetics/get_private_location.py +8 -0
- pulumi_newrelic/synthetics/get_secure_credential.py +12 -0
- pulumi_newrelic/synthetics/monitor.py +52 -48
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +83 -69
- pulumi_newrelic/synthetics/private_location.py +6 -6
- pulumi_newrelic/synthetics/script_monitor.py +42 -38
- pulumi_newrelic/synthetics/secure_credential.py +22 -25
- pulumi_newrelic/synthetics/step_monitor.py +20 -18
- pulumi_newrelic/user.py +10 -8
- pulumi_newrelic/workflow.py +24 -20
- {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/METADATA +1 -1
- pulumi_newrelic-5.23.0a1711605988.dist-info/RECORD +89 -0
- pulumi_newrelic-5.23.0.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/WHEEL +0 -0
- {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/top_level.txt +0 -0
@@ -32,21 +32,28 @@ class AlertConditionArgs:
|
|
32
32
|
"""
|
33
33
|
The set of arguments for constructing a AlertCondition resource.
|
34
34
|
:param pulumi.Input[Sequence[pulumi.Input[int]]] entities: The instance IDs associated with this condition.
|
35
|
-
:param pulumi.Input[str] metric: The metric field accepts parameters based on the type set.
|
35
|
+
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
36
36
|
:param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
|
37
|
-
:param pulumi.Input[
|
38
|
-
|
39
|
-
:param pulumi.Input[str] condition_scope:
|
40
|
-
|
41
|
-
:param pulumi.Input[
|
42
|
-
:param pulumi.Input[str]
|
43
|
-
gc_cpu_time condition type.
|
44
|
-
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 128 characters, inclusive.
|
37
|
+
:param pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]] terms: A list of terms for this condition. See Terms below for details.
|
38
|
+
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
39
|
+
:param pulumi.Input[str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
40
|
+
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
41
|
+
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
42
|
+
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
45
43
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
46
44
|
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
47
|
-
:param pulumi.Input[str] user_defined_value_function: One of:
|
48
|
-
|
49
|
-
|
45
|
+
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
46
|
+
|
47
|
+
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
48
|
+
|
49
|
+
<!--Start PulumiCodeChooser -->
|
50
|
+
```python
|
51
|
+
import pulumi
|
52
|
+
```
|
53
|
+
<!--End PulumiCodeChooser -->
|
54
|
+
:param pulumi.Input[int] violation_close_timer: Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
55
|
+
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
56
|
+
* when `type` = `apm_jvm_metric`
|
50
57
|
"""
|
51
58
|
pulumi.set(__self__, "entities", entities)
|
52
59
|
pulumi.set(__self__, "metric", metric)
|
@@ -86,7 +93,7 @@ class AlertConditionArgs:
|
|
86
93
|
@pulumi.getter
|
87
94
|
def metric(self) -> pulumi.Input[str]:
|
88
95
|
"""
|
89
|
-
The metric field accepts parameters based on the type set.
|
96
|
+
The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
90
97
|
"""
|
91
98
|
return pulumi.get(self, "metric")
|
92
99
|
|
@@ -109,6 +116,9 @@ class AlertConditionArgs:
|
|
109
116
|
@property
|
110
117
|
@pulumi.getter
|
111
118
|
def terms(self) -> pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]:
|
119
|
+
"""
|
120
|
+
A list of terms for this condition. See Terms below for details.
|
121
|
+
"""
|
112
122
|
return pulumi.get(self, "terms")
|
113
123
|
|
114
124
|
@terms.setter
|
@@ -119,8 +129,7 @@ class AlertConditionArgs:
|
|
119
129
|
@pulumi.getter
|
120
130
|
def type(self) -> pulumi.Input[str]:
|
121
131
|
"""
|
122
|
-
The type of condition. One of:
|
123
|
-
servers_metric).
|
132
|
+
The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
124
133
|
"""
|
125
134
|
return pulumi.get(self, "type")
|
126
135
|
|
@@ -132,8 +141,7 @@ class AlertConditionArgs:
|
|
132
141
|
@pulumi.getter(name="conditionScope")
|
133
142
|
def condition_scope(self) -> Optional[pulumi.Input[str]]:
|
134
143
|
"""
|
135
|
-
|
136
|
-
instance setting allows your condition to trigger for specific app instances.
|
144
|
+
`application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
137
145
|
"""
|
138
146
|
return pulumi.get(self, "condition_scope")
|
139
147
|
|
@@ -145,7 +153,7 @@ class AlertConditionArgs:
|
|
145
153
|
@pulumi.getter
|
146
154
|
def enabled(self) -> Optional[pulumi.Input[bool]]:
|
147
155
|
"""
|
148
|
-
Whether the condition is enabled.
|
156
|
+
Whether the condition is enabled or not. Defaults to true.
|
149
157
|
"""
|
150
158
|
return pulumi.get(self, "enabled")
|
151
159
|
|
@@ -157,8 +165,7 @@ class AlertConditionArgs:
|
|
157
165
|
@pulumi.getter(name="gcMetric")
|
158
166
|
def gc_metric(self) -> Optional[pulumi.Input[str]]:
|
159
167
|
"""
|
160
|
-
A valid Garbage Collection metric e.g. GC/G1 Young Generation
|
161
|
-
gc_cpu_time condition type.
|
168
|
+
A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
162
169
|
"""
|
163
170
|
return pulumi.get(self, "gc_metric")
|
164
171
|
|
@@ -170,7 +177,7 @@ class AlertConditionArgs:
|
|
170
177
|
@pulumi.getter
|
171
178
|
def name(self) -> Optional[pulumi.Input[str]]:
|
172
179
|
"""
|
173
|
-
The title of the condition. Must be between 1 and
|
180
|
+
The title of the condition. Must be between 1 and 64 characters, inclusive.
|
174
181
|
"""
|
175
182
|
return pulumi.get(self, "name")
|
176
183
|
|
@@ -206,7 +213,15 @@ class AlertConditionArgs:
|
|
206
213
|
@pulumi.getter(name="userDefinedValueFunction")
|
207
214
|
def user_defined_value_function(self) -> Optional[pulumi.Input[str]]:
|
208
215
|
"""
|
209
|
-
One of:
|
216
|
+
One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
217
|
+
|
218
|
+
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
219
|
+
|
220
|
+
<!--Start PulumiCodeChooser -->
|
221
|
+
```python
|
222
|
+
import pulumi
|
223
|
+
```
|
224
|
+
<!--End PulumiCodeChooser -->
|
210
225
|
"""
|
211
226
|
return pulumi.get(self, "user_defined_value_function")
|
212
227
|
|
@@ -218,8 +233,9 @@ class AlertConditionArgs:
|
|
218
233
|
@pulumi.getter(name="violationCloseTimer")
|
219
234
|
def violation_close_timer(self) -> Optional[pulumi.Input[int]]:
|
220
235
|
"""
|
221
|
-
Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours
|
222
|
-
|
236
|
+
Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
237
|
+
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
238
|
+
* when `type` = `apm_jvm_metric`
|
223
239
|
"""
|
224
240
|
return pulumi.get(self, "violation_close_timer")
|
225
241
|
|
@@ -247,23 +263,30 @@ class _AlertConditionState:
|
|
247
263
|
violation_close_timer: Optional[pulumi.Input[int]] = None):
|
248
264
|
"""
|
249
265
|
Input properties used for looking up and filtering AlertCondition resources.
|
250
|
-
:param pulumi.Input[str] condition_scope:
|
251
|
-
|
252
|
-
:param pulumi.Input[bool] enabled: Whether the condition is enabled.
|
266
|
+
:param pulumi.Input[str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
267
|
+
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
253
268
|
:param pulumi.Input[Sequence[pulumi.Input[int]]] entities: The instance IDs associated with this condition.
|
254
269
|
:param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
|
255
|
-
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. GC/G1 Young Generation
|
256
|
-
|
257
|
-
:param pulumi.Input[str]
|
258
|
-
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 128 characters, inclusive.
|
270
|
+
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
271
|
+
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
272
|
+
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
259
273
|
:param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
|
260
274
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
261
|
-
:param pulumi.Input[
|
262
|
-
|
275
|
+
:param pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]] terms: A list of terms for this condition. See Terms below for details.
|
276
|
+
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
263
277
|
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
264
|
-
:param pulumi.Input[str] user_defined_value_function: One of:
|
265
|
-
|
266
|
-
|
278
|
+
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
279
|
+
|
280
|
+
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
281
|
+
|
282
|
+
<!--Start PulumiCodeChooser -->
|
283
|
+
```python
|
284
|
+
import pulumi
|
285
|
+
```
|
286
|
+
<!--End PulumiCodeChooser -->
|
287
|
+
:param pulumi.Input[int] violation_close_timer: Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
288
|
+
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
289
|
+
* when `type` = `apm_jvm_metric`
|
267
290
|
"""
|
268
291
|
if condition_scope is not None:
|
269
292
|
pulumi.set(__self__, "condition_scope", condition_scope)
|
@@ -298,8 +321,7 @@ class _AlertConditionState:
|
|
298
321
|
@pulumi.getter(name="conditionScope")
|
299
322
|
def condition_scope(self) -> Optional[pulumi.Input[str]]:
|
300
323
|
"""
|
301
|
-
|
302
|
-
instance setting allows your condition to trigger for specific app instances.
|
324
|
+
`application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
303
325
|
"""
|
304
326
|
return pulumi.get(self, "condition_scope")
|
305
327
|
|
@@ -311,7 +333,7 @@ class _AlertConditionState:
|
|
311
333
|
@pulumi.getter
|
312
334
|
def enabled(self) -> Optional[pulumi.Input[bool]]:
|
313
335
|
"""
|
314
|
-
Whether the condition is enabled.
|
336
|
+
Whether the condition is enabled or not. Defaults to true.
|
315
337
|
"""
|
316
338
|
return pulumi.get(self, "enabled")
|
317
339
|
|
@@ -347,8 +369,7 @@ class _AlertConditionState:
|
|
347
369
|
@pulumi.getter(name="gcMetric")
|
348
370
|
def gc_metric(self) -> Optional[pulumi.Input[str]]:
|
349
371
|
"""
|
350
|
-
A valid Garbage Collection metric e.g. GC/G1 Young Generation
|
351
|
-
gc_cpu_time condition type.
|
372
|
+
A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
352
373
|
"""
|
353
374
|
return pulumi.get(self, "gc_metric")
|
354
375
|
|
@@ -360,7 +381,7 @@ class _AlertConditionState:
|
|
360
381
|
@pulumi.getter
|
361
382
|
def metric(self) -> Optional[pulumi.Input[str]]:
|
362
383
|
"""
|
363
|
-
The metric field accepts parameters based on the type set.
|
384
|
+
The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
364
385
|
"""
|
365
386
|
return pulumi.get(self, "metric")
|
366
387
|
|
@@ -372,7 +393,7 @@ class _AlertConditionState:
|
|
372
393
|
@pulumi.getter
|
373
394
|
def name(self) -> Optional[pulumi.Input[str]]:
|
374
395
|
"""
|
375
|
-
The title of the condition. Must be between 1 and
|
396
|
+
The title of the condition. Must be between 1 and 64 characters, inclusive.
|
376
397
|
"""
|
377
398
|
return pulumi.get(self, "name")
|
378
399
|
|
@@ -407,6 +428,9 @@ class _AlertConditionState:
|
|
407
428
|
@property
|
408
429
|
@pulumi.getter
|
409
430
|
def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]]:
|
431
|
+
"""
|
432
|
+
A list of terms for this condition. See Terms below for details.
|
433
|
+
"""
|
410
434
|
return pulumi.get(self, "terms")
|
411
435
|
|
412
436
|
@terms.setter
|
@@ -417,8 +441,7 @@ class _AlertConditionState:
|
|
417
441
|
@pulumi.getter
|
418
442
|
def type(self) -> Optional[pulumi.Input[str]]:
|
419
443
|
"""
|
420
|
-
The type of condition. One of:
|
421
|
-
servers_metric).
|
444
|
+
The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
422
445
|
"""
|
423
446
|
return pulumi.get(self, "type")
|
424
447
|
|
@@ -442,7 +465,15 @@ class _AlertConditionState:
|
|
442
465
|
@pulumi.getter(name="userDefinedValueFunction")
|
443
466
|
def user_defined_value_function(self) -> Optional[pulumi.Input[str]]:
|
444
467
|
"""
|
445
|
-
One of:
|
468
|
+
One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
469
|
+
|
470
|
+
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
471
|
+
|
472
|
+
<!--Start PulumiCodeChooser -->
|
473
|
+
```python
|
474
|
+
import pulumi
|
475
|
+
```
|
476
|
+
<!--End PulumiCodeChooser -->
|
446
477
|
"""
|
447
478
|
return pulumi.get(self, "user_defined_value_function")
|
448
479
|
|
@@ -454,8 +485,9 @@ class _AlertConditionState:
|
|
454
485
|
@pulumi.getter(name="violationCloseTimer")
|
455
486
|
def violation_close_timer(self) -> Optional[pulumi.Input[int]]:
|
456
487
|
"""
|
457
|
-
Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours
|
458
|
-
|
488
|
+
Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
489
|
+
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
490
|
+
* when `type` = `apm_jvm_metric`
|
459
491
|
"""
|
460
492
|
return pulumi.get(self, "violation_close_timer")
|
461
493
|
|
@@ -490,6 +522,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
490
522
|
|
491
523
|
## Example Usage
|
492
524
|
|
525
|
+
<!--Start PulumiCodeChooser -->
|
493
526
|
```python
|
494
527
|
import pulumi
|
495
528
|
import pulumi_newrelic as newrelic
|
@@ -497,10 +530,9 @@ class AlertCondition(pulumi.CustomResource):
|
|
497
530
|
app = newrelic.get_entity(name="my-app",
|
498
531
|
type="APPLICATION",
|
499
532
|
domain="APM")
|
500
|
-
|
501
|
-
foo_alert_condition = newrelic.AlertCondition("
|
502
|
-
policy_id=
|
503
|
-
name="foo",
|
533
|
+
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
|
534
|
+
foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
|
535
|
+
policy_id=foo_alert_policy.id,
|
504
536
|
type="apm_app_metric",
|
505
537
|
entities=[app.application_id],
|
506
538
|
metric="apdex",
|
@@ -514,6 +546,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
514
546
|
time_function="all",
|
515
547
|
)])
|
516
548
|
```
|
549
|
+
<!--End PulumiCodeChooser -->
|
517
550
|
|
518
551
|
## Terms
|
519
552
|
|
@@ -529,17 +562,17 @@ class AlertCondition(pulumi.CustomResource):
|
|
529
562
|
|
530
563
|
Manage alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check EntityTags
|
531
564
|
|
565
|
+
<!--Start PulumiCodeChooser -->
|
532
566
|
```python
|
533
567
|
import pulumi
|
534
568
|
import pulumi_newrelic as newrelic
|
535
569
|
|
536
|
-
|
537
|
-
foo_alert_policy = newrelic.AlertPolicy("
|
538
|
-
foo_alert_condition = newrelic.AlertCondition("
|
570
|
+
foo_entity = newrelic.get_entity(name="foo entitiy")
|
571
|
+
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
|
572
|
+
foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
|
539
573
|
policy_id=foo_alert_policy.id,
|
540
|
-
name="foo condition",
|
541
574
|
type="apm_app_metric",
|
542
|
-
entities=[
|
575
|
+
entities=[foo_entity.application_id],
|
543
576
|
metric="apdex",
|
544
577
|
runbook_url="https://www.example.com",
|
545
578
|
condition_scope="application",
|
@@ -550,7 +583,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
550
583
|
threshold=0.75,
|
551
584
|
time_function="all",
|
552
585
|
)])
|
553
|
-
my_condition_entity_tags = newrelic.EntityTags("
|
586
|
+
my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
|
554
587
|
guid=foo_alert_condition.entity_guid,
|
555
588
|
tags=[
|
556
589
|
newrelic.EntityTagsTagArgs(
|
@@ -566,6 +599,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
566
599
|
),
|
567
600
|
])
|
568
601
|
```
|
602
|
+
<!--End PulumiCodeChooser -->
|
569
603
|
|
570
604
|
## Import
|
571
605
|
|
@@ -577,22 +611,29 @@ class AlertCondition(pulumi.CustomResource):
|
|
577
611
|
|
578
612
|
:param str resource_name: The name of the resource.
|
579
613
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
580
|
-
:param pulumi.Input[str] condition_scope:
|
581
|
-
|
582
|
-
:param pulumi.Input[bool] enabled: Whether the condition is enabled.
|
614
|
+
:param pulumi.Input[str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
615
|
+
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
583
616
|
:param pulumi.Input[Sequence[pulumi.Input[int]]] entities: The instance IDs associated with this condition.
|
584
|
-
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. GC/G1 Young Generation
|
585
|
-
|
586
|
-
:param pulumi.Input[str]
|
587
|
-
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 128 characters, inclusive.
|
617
|
+
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
618
|
+
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
619
|
+
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
588
620
|
:param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
|
589
621
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
590
|
-
:param pulumi.Input[
|
591
|
-
|
622
|
+
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AlertConditionTermArgs']]]] terms: A list of terms for this condition. See Terms below for details.
|
623
|
+
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
592
624
|
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
593
|
-
:param pulumi.Input[str] user_defined_value_function: One of:
|
594
|
-
|
595
|
-
|
625
|
+
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
626
|
+
|
627
|
+
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
628
|
+
|
629
|
+
<!--Start PulumiCodeChooser -->
|
630
|
+
```python
|
631
|
+
import pulumi
|
632
|
+
```
|
633
|
+
<!--End PulumiCodeChooser -->
|
634
|
+
:param pulumi.Input[int] violation_close_timer: Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
635
|
+
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
636
|
+
* when `type` = `apm_jvm_metric`
|
596
637
|
"""
|
597
638
|
...
|
598
639
|
@overload
|
@@ -607,6 +648,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
607
648
|
|
608
649
|
## Example Usage
|
609
650
|
|
651
|
+
<!--Start PulumiCodeChooser -->
|
610
652
|
```python
|
611
653
|
import pulumi
|
612
654
|
import pulumi_newrelic as newrelic
|
@@ -614,10 +656,9 @@ class AlertCondition(pulumi.CustomResource):
|
|
614
656
|
app = newrelic.get_entity(name="my-app",
|
615
657
|
type="APPLICATION",
|
616
658
|
domain="APM")
|
617
|
-
|
618
|
-
foo_alert_condition = newrelic.AlertCondition("
|
619
|
-
policy_id=
|
620
|
-
name="foo",
|
659
|
+
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
|
660
|
+
foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
|
661
|
+
policy_id=foo_alert_policy.id,
|
621
662
|
type="apm_app_metric",
|
622
663
|
entities=[app.application_id],
|
623
664
|
metric="apdex",
|
@@ -631,6 +672,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
631
672
|
time_function="all",
|
632
673
|
)])
|
633
674
|
```
|
675
|
+
<!--End PulumiCodeChooser -->
|
634
676
|
|
635
677
|
## Terms
|
636
678
|
|
@@ -646,17 +688,17 @@ class AlertCondition(pulumi.CustomResource):
|
|
646
688
|
|
647
689
|
Manage alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check EntityTags
|
648
690
|
|
691
|
+
<!--Start PulumiCodeChooser -->
|
649
692
|
```python
|
650
693
|
import pulumi
|
651
694
|
import pulumi_newrelic as newrelic
|
652
695
|
|
653
|
-
|
654
|
-
foo_alert_policy = newrelic.AlertPolicy("
|
655
|
-
foo_alert_condition = newrelic.AlertCondition("
|
696
|
+
foo_entity = newrelic.get_entity(name="foo entitiy")
|
697
|
+
foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
|
698
|
+
foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
|
656
699
|
policy_id=foo_alert_policy.id,
|
657
|
-
name="foo condition",
|
658
700
|
type="apm_app_metric",
|
659
|
-
entities=[
|
701
|
+
entities=[foo_entity.application_id],
|
660
702
|
metric="apdex",
|
661
703
|
runbook_url="https://www.example.com",
|
662
704
|
condition_scope="application",
|
@@ -667,7 +709,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
667
709
|
threshold=0.75,
|
668
710
|
time_function="all",
|
669
711
|
)])
|
670
|
-
my_condition_entity_tags = newrelic.EntityTags("
|
712
|
+
my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
|
671
713
|
guid=foo_alert_condition.entity_guid,
|
672
714
|
tags=[
|
673
715
|
newrelic.EntityTagsTagArgs(
|
@@ -683,6 +725,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
683
725
|
),
|
684
726
|
])
|
685
727
|
```
|
728
|
+
<!--End PulumiCodeChooser -->
|
686
729
|
|
687
730
|
## Import
|
688
731
|
|
@@ -784,23 +827,30 @@ class AlertCondition(pulumi.CustomResource):
|
|
784
827
|
:param str resource_name: The unique name of the resulting resource.
|
785
828
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
786
829
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
787
|
-
:param pulumi.Input[str] condition_scope:
|
788
|
-
|
789
|
-
:param pulumi.Input[bool] enabled: Whether the condition is enabled.
|
830
|
+
:param pulumi.Input[str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
831
|
+
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
790
832
|
:param pulumi.Input[Sequence[pulumi.Input[int]]] entities: The instance IDs associated with this condition.
|
791
833
|
:param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
|
792
|
-
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. GC/G1 Young Generation
|
793
|
-
|
794
|
-
:param pulumi.Input[str]
|
795
|
-
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 128 characters, inclusive.
|
834
|
+
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
835
|
+
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
836
|
+
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
796
837
|
:param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
|
797
838
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
798
|
-
:param pulumi.Input[
|
799
|
-
|
839
|
+
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AlertConditionTermArgs']]]] terms: A list of terms for this condition. See Terms below for details.
|
840
|
+
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
800
841
|
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
801
|
-
:param pulumi.Input[str] user_defined_value_function: One of:
|
802
|
-
|
803
|
-
|
842
|
+
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
843
|
+
|
844
|
+
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
845
|
+
|
846
|
+
<!--Start PulumiCodeChooser -->
|
847
|
+
```python
|
848
|
+
import pulumi
|
849
|
+
```
|
850
|
+
<!--End PulumiCodeChooser -->
|
851
|
+
:param pulumi.Input[int] violation_close_timer: Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
852
|
+
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
853
|
+
* when `type` = `apm_jvm_metric`
|
804
854
|
"""
|
805
855
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
806
856
|
|
@@ -826,8 +876,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
826
876
|
@pulumi.getter(name="conditionScope")
|
827
877
|
def condition_scope(self) -> pulumi.Output[Optional[str]]:
|
828
878
|
"""
|
829
|
-
|
830
|
-
instance setting allows your condition to trigger for specific app instances.
|
879
|
+
`application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
831
880
|
"""
|
832
881
|
return pulumi.get(self, "condition_scope")
|
833
882
|
|
@@ -835,7 +884,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
835
884
|
@pulumi.getter
|
836
885
|
def enabled(self) -> pulumi.Output[Optional[bool]]:
|
837
886
|
"""
|
838
|
-
Whether the condition is enabled.
|
887
|
+
Whether the condition is enabled or not. Defaults to true.
|
839
888
|
"""
|
840
889
|
return pulumi.get(self, "enabled")
|
841
890
|
|
@@ -859,8 +908,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
859
908
|
@pulumi.getter(name="gcMetric")
|
860
909
|
def gc_metric(self) -> pulumi.Output[Optional[str]]:
|
861
910
|
"""
|
862
|
-
A valid Garbage Collection metric e.g. GC/G1 Young Generation
|
863
|
-
gc_cpu_time condition type.
|
911
|
+
A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
864
912
|
"""
|
865
913
|
return pulumi.get(self, "gc_metric")
|
866
914
|
|
@@ -868,7 +916,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
868
916
|
@pulumi.getter
|
869
917
|
def metric(self) -> pulumi.Output[str]:
|
870
918
|
"""
|
871
|
-
The metric field accepts parameters based on the type set.
|
919
|
+
The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
872
920
|
"""
|
873
921
|
return pulumi.get(self, "metric")
|
874
922
|
|
@@ -876,7 +924,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
876
924
|
@pulumi.getter
|
877
925
|
def name(self) -> pulumi.Output[str]:
|
878
926
|
"""
|
879
|
-
The title of the condition. Must be between 1 and
|
927
|
+
The title of the condition. Must be between 1 and 64 characters, inclusive.
|
880
928
|
"""
|
881
929
|
return pulumi.get(self, "name")
|
882
930
|
|
@@ -899,14 +947,16 @@ class AlertCondition(pulumi.CustomResource):
|
|
899
947
|
@property
|
900
948
|
@pulumi.getter
|
901
949
|
def terms(self) -> pulumi.Output[Sequence['outputs.AlertConditionTerm']]:
|
950
|
+
"""
|
951
|
+
A list of terms for this condition. See Terms below for details.
|
952
|
+
"""
|
902
953
|
return pulumi.get(self, "terms")
|
903
954
|
|
904
955
|
@property
|
905
956
|
@pulumi.getter
|
906
957
|
def type(self) -> pulumi.Output[str]:
|
907
958
|
"""
|
908
|
-
The type of condition. One of:
|
909
|
-
servers_metric).
|
959
|
+
The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
910
960
|
"""
|
911
961
|
return pulumi.get(self, "type")
|
912
962
|
|
@@ -922,7 +972,15 @@ class AlertCondition(pulumi.CustomResource):
|
|
922
972
|
@pulumi.getter(name="userDefinedValueFunction")
|
923
973
|
def user_defined_value_function(self) -> pulumi.Output[Optional[str]]:
|
924
974
|
"""
|
925
|
-
One of:
|
975
|
+
One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
976
|
+
|
977
|
+
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
978
|
+
|
979
|
+
<!--Start PulumiCodeChooser -->
|
980
|
+
```python
|
981
|
+
import pulumi
|
982
|
+
```
|
983
|
+
<!--End PulumiCodeChooser -->
|
926
984
|
"""
|
927
985
|
return pulumi.get(self, "user_defined_value_function")
|
928
986
|
|
@@ -930,8 +988,9 @@ class AlertCondition(pulumi.CustomResource):
|
|
930
988
|
@pulumi.getter(name="violationCloseTimer")
|
931
989
|
def violation_close_timer(self) -> pulumi.Output[Optional[int]]:
|
932
990
|
"""
|
933
|
-
Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours
|
934
|
-
|
991
|
+
Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
992
|
+
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
993
|
+
* when `type` = `apm_jvm_metric`
|
935
994
|
"""
|
936
995
|
return pulumi.get(self, "violation_close_timer")
|
937
996
|
|