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