pulumi-newrelic 5.23.0a1713333809__py3-none-any.whl → 5.23.0a1713975814__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.
Files changed (66) hide show
  1. pulumi_newrelic/_inputs.py +110 -270
  2. pulumi_newrelic/account_management.py +20 -20
  3. pulumi_newrelic/alert_channel.py +76 -92
  4. pulumi_newrelic/alert_condition.py +104 -149
  5. pulumi_newrelic/alert_muting_rule.py +33 -35
  6. pulumi_newrelic/alert_policy.py +68 -43
  7. pulumi_newrelic/alert_policy_channel.py +12 -8
  8. pulumi_newrelic/cloud/_inputs.py +322 -1072
  9. pulumi_newrelic/cloud/aws_govcloud_link_account.py +4 -6
  10. pulumi_newrelic/cloud/aws_integrations.py +13 -15
  11. pulumi_newrelic/cloud/aws_link_account.py +4 -6
  12. pulumi_newrelic/cloud/azure_integrations.py +10 -12
  13. pulumi_newrelic/cloud/azure_link_account.py +4 -6
  14. pulumi_newrelic/cloud/gcp_integrations.py +6 -6
  15. pulumi_newrelic/cloud/gcp_link_account.py +4 -6
  16. pulumi_newrelic/cloud/outputs.py +322 -1072
  17. pulumi_newrelic/data_partition_rule.py +0 -4
  18. pulumi_newrelic/entity_tags.py +13 -17
  19. pulumi_newrelic/events_to_metrics_rule.py +2 -4
  20. pulumi_newrelic/get_account.py +0 -4
  21. pulumi_newrelic/get_application.py +8 -10
  22. pulumi_newrelic/get_authentication_domain.py +4 -8
  23. pulumi_newrelic/get_cloud_account.py +0 -4
  24. pulumi_newrelic/get_entity.py +28 -32
  25. pulumi_newrelic/get_group.py +42 -8
  26. pulumi_newrelic/get_key_transaction.py +8 -10
  27. pulumi_newrelic/get_obfuscation_expression.py +2 -4
  28. pulumi_newrelic/get_service_level_alert_helper.py +22 -46
  29. pulumi_newrelic/get_test_grok_pattern.py +4 -6
  30. pulumi_newrelic/get_user.py +0 -4
  31. pulumi_newrelic/group.py +40 -42
  32. pulumi_newrelic/infra_alert_condition.py +154 -131
  33. pulumi_newrelic/insights/event.py +8 -25
  34. pulumi_newrelic/log_parsing_rule.py +6 -10
  35. pulumi_newrelic/monitor_downtime.py +174 -193
  36. pulumi_newrelic/notification_channel.py +124 -150
  37. pulumi_newrelic/nrql_alert_condition.py +38 -48
  38. pulumi_newrelic/nrql_drop_rule.py +34 -38
  39. pulumi_newrelic/obfuscation_expression.py +2 -4
  40. pulumi_newrelic/obfuscation_rule.py +4 -4
  41. pulumi_newrelic/one_dashboard.py +42 -48
  42. pulumi_newrelic/one_dashboard_raw.py +86 -86
  43. pulumi_newrelic/outputs.py +110 -270
  44. pulumi_newrelic/plugins/_inputs.py +16 -16
  45. pulumi_newrelic/plugins/application_settings.py +6 -8
  46. pulumi_newrelic/plugins/outputs.py +16 -16
  47. pulumi_newrelic/plugins/workload.py +158 -40
  48. pulumi_newrelic/service_level.py +38 -123
  49. pulumi_newrelic/synthetics/alert_condition.py +34 -64
  50. pulumi_newrelic/synthetics/broken_links_monitor.py +18 -20
  51. pulumi_newrelic/synthetics/cert_check_monitor.py +16 -18
  52. pulumi_newrelic/synthetics/get_private_location.py +0 -8
  53. pulumi_newrelic/synthetics/get_secure_credential.py +0 -12
  54. pulumi_newrelic/synthetics/monitor.py +48 -52
  55. pulumi_newrelic/synthetics/multi_location_alert_condition.py +69 -83
  56. pulumi_newrelic/synthetics/private_location.py +6 -6
  57. pulumi_newrelic/synthetics/script_monitor.py +38 -42
  58. pulumi_newrelic/synthetics/secure_credential.py +25 -22
  59. pulumi_newrelic/synthetics/step_monitor.py +18 -20
  60. pulumi_newrelic/user.py +8 -10
  61. pulumi_newrelic/workflow.py +20 -24
  62. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/METADATA +1 -1
  63. pulumi_newrelic-5.23.0a1713975814.dist-info/RECORD +89 -0
  64. pulumi_newrelic-5.23.0a1713333809.dist-info/RECORD +0 -89
  65. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/WHEEL +0 -0
  66. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/top_level.txt +0 -0
@@ -32,26 +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 `type` set. One of these metrics based on `type`:
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[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.
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: `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
- ```
50
- Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
51
- ```
52
- :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:
53
- * when `type` = `apm_app_metric` and `condition_scope` = `instance`
54
- * 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.
55
50
  """
56
51
  pulumi.set(__self__, "entities", entities)
57
52
  pulumi.set(__self__, "metric", metric)
@@ -91,7 +86,7 @@ class AlertConditionArgs:
91
86
  @pulumi.getter
92
87
  def metric(self) -> pulumi.Input[str]:
93
88
  """
94
- The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
89
+ The metric field accepts parameters based on the type set.
95
90
  """
96
91
  return pulumi.get(self, "metric")
97
92
 
@@ -114,9 +109,6 @@ class AlertConditionArgs:
114
109
  @property
115
110
  @pulumi.getter
116
111
  def terms(self) -> pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]:
117
- """
118
- A list of terms for this condition. See Terms below for details.
119
- """
120
112
  return pulumi.get(self, "terms")
121
113
 
122
114
  @terms.setter
@@ -127,7 +119,8 @@ class AlertConditionArgs:
127
119
  @pulumi.getter
128
120
  def type(self) -> pulumi.Input[str]:
129
121
  """
130
- The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
122
+ The type of condition. One of: (apm_app_metric, apm_jvm_metric, apm_kt_metric, browser_metric, mobile_metric,
123
+ servers_metric).
131
124
  """
132
125
  return pulumi.get(self, "type")
133
126
 
@@ -139,7 +132,8 @@ class AlertConditionArgs:
139
132
  @pulumi.getter(name="conditionScope")
140
133
  def condition_scope(self) -> Optional[pulumi.Input[str]]:
141
134
  """
142
- `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).
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.
143
137
  """
144
138
  return pulumi.get(self, "condition_scope")
145
139
 
@@ -151,7 +145,7 @@ class AlertConditionArgs:
151
145
  @pulumi.getter
152
146
  def enabled(self) -> Optional[pulumi.Input[bool]]:
153
147
  """
154
- Whether the condition is enabled or not. Defaults to true.
148
+ Whether the condition is enabled.
155
149
  """
156
150
  return pulumi.get(self, "enabled")
157
151
 
@@ -163,7 +157,8 @@ class AlertConditionArgs:
163
157
  @pulumi.getter(name="gcMetric")
164
158
  def gc_metric(self) -> Optional[pulumi.Input[str]]:
165
159
  """
166
- A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
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.
167
162
  """
168
163
  return pulumi.get(self, "gc_metric")
169
164
 
@@ -175,7 +170,7 @@ class AlertConditionArgs:
175
170
  @pulumi.getter
176
171
  def name(self) -> Optional[pulumi.Input[str]]:
177
172
  """
178
- The title of the condition. Must be between 1 and 64 characters, inclusive.
173
+ The title of the condition. Must be between 1 and 128 characters, inclusive.
179
174
  """
180
175
  return pulumi.get(self, "name")
181
176
 
@@ -211,13 +206,7 @@ class AlertConditionArgs:
211
206
  @pulumi.getter(name="userDefinedValueFunction")
212
207
  def user_defined_value_function(self) -> Optional[pulumi.Input[str]]:
213
208
  """
214
- One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
215
-
216
- > **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
217
-
218
- ```
219
- Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
220
- ```
209
+ One of: (average, min, max, total, sample_size, percent, rate).
221
210
  """
222
211
  return pulumi.get(self, "user_defined_value_function")
223
212
 
@@ -229,9 +218,8 @@ class AlertConditionArgs:
229
218
  @pulumi.getter(name="violationCloseTimer")
230
219
  def violation_close_timer(self) -> Optional[pulumi.Input[int]]:
231
220
  """
232
- 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:
233
- * when `type` = `apm_app_metric` and `condition_scope` = `instance`
234
- * 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.
235
223
  """
236
224
  return pulumi.get(self, "violation_close_timer")
237
225
 
@@ -259,28 +247,23 @@ class _AlertConditionState:
259
247
  violation_close_timer: Optional[pulumi.Input[int]] = None):
260
248
  """
261
249
  Input properties used for looking up and filtering AlertCondition resources.
262
- :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).
263
- :param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
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.
264
253
  :param pulumi.Input[Sequence[pulumi.Input[int]]] entities: The instance IDs associated with this condition.
265
254
  :param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
266
- :param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
267
- :param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
268
- :param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
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.
269
259
  :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
270
260
  :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
271
- :param pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]] terms: A list of terms for this condition. See Terms below for details.
272
- :param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
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).
273
263
  :param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
274
- :param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
275
-
276
- > **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
277
-
278
- ```
279
- Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
280
- ```
281
- :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:
282
- * when `type` = `apm_app_metric` and `condition_scope` = `instance`
283
- * 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.
284
267
  """
285
268
  if condition_scope is not None:
286
269
  pulumi.set(__self__, "condition_scope", condition_scope)
@@ -315,7 +298,8 @@ class _AlertConditionState:
315
298
  @pulumi.getter(name="conditionScope")
316
299
  def condition_scope(self) -> Optional[pulumi.Input[str]]:
317
300
  """
318
- `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).
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.
319
303
  """
320
304
  return pulumi.get(self, "condition_scope")
321
305
 
@@ -327,7 +311,7 @@ class _AlertConditionState:
327
311
  @pulumi.getter
328
312
  def enabled(self) -> Optional[pulumi.Input[bool]]:
329
313
  """
330
- Whether the condition is enabled or not. Defaults to true.
314
+ Whether the condition is enabled.
331
315
  """
332
316
  return pulumi.get(self, "enabled")
333
317
 
@@ -363,7 +347,8 @@ class _AlertConditionState:
363
347
  @pulumi.getter(name="gcMetric")
364
348
  def gc_metric(self) -> Optional[pulumi.Input[str]]:
365
349
  """
366
- A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
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.
367
352
  """
368
353
  return pulumi.get(self, "gc_metric")
369
354
 
@@ -375,7 +360,7 @@ class _AlertConditionState:
375
360
  @pulumi.getter
376
361
  def metric(self) -> Optional[pulumi.Input[str]]:
377
362
  """
378
- The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
363
+ The metric field accepts parameters based on the type set.
379
364
  """
380
365
  return pulumi.get(self, "metric")
381
366
 
@@ -387,7 +372,7 @@ class _AlertConditionState:
387
372
  @pulumi.getter
388
373
  def name(self) -> Optional[pulumi.Input[str]]:
389
374
  """
390
- The title of the condition. Must be between 1 and 64 characters, inclusive.
375
+ The title of the condition. Must be between 1 and 128 characters, inclusive.
391
376
  """
392
377
  return pulumi.get(self, "name")
393
378
 
@@ -422,9 +407,6 @@ class _AlertConditionState:
422
407
  @property
423
408
  @pulumi.getter
424
409
  def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]]:
425
- """
426
- A list of terms for this condition. See Terms below for details.
427
- """
428
410
  return pulumi.get(self, "terms")
429
411
 
430
412
  @terms.setter
@@ -435,7 +417,8 @@ class _AlertConditionState:
435
417
  @pulumi.getter
436
418
  def type(self) -> Optional[pulumi.Input[str]]:
437
419
  """
438
- The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
420
+ The type of condition. One of: (apm_app_metric, apm_jvm_metric, apm_kt_metric, browser_metric, mobile_metric,
421
+ servers_metric).
439
422
  """
440
423
  return pulumi.get(self, "type")
441
424
 
@@ -459,13 +442,7 @@ class _AlertConditionState:
459
442
  @pulumi.getter(name="userDefinedValueFunction")
460
443
  def user_defined_value_function(self) -> Optional[pulumi.Input[str]]:
461
444
  """
462
- One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
463
-
464
- > **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
465
-
466
- ```
467
- Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
468
- ```
445
+ One of: (average, min, max, total, sample_size, percent, rate).
469
446
  """
470
447
  return pulumi.get(self, "user_defined_value_function")
471
448
 
@@ -477,9 +454,8 @@ class _AlertConditionState:
477
454
  @pulumi.getter(name="violationCloseTimer")
478
455
  def violation_close_timer(self) -> Optional[pulumi.Input[int]]:
479
456
  """
480
- 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:
481
- * when `type` = `apm_app_metric` and `condition_scope` = `instance`
482
- * 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.
483
459
  """
484
460
  return pulumi.get(self, "violation_close_timer")
485
461
 
@@ -514,7 +490,6 @@ class AlertCondition(pulumi.CustomResource):
514
490
 
515
491
  ## Example Usage
516
492
 
517
- <!--Start PulumiCodeChooser -->
518
493
  ```python
519
494
  import pulumi
520
495
  import pulumi_newrelic as newrelic
@@ -522,9 +497,10 @@ class AlertCondition(pulumi.CustomResource):
522
497
  app = newrelic.get_entity(name="my-app",
523
498
  type="APPLICATION",
524
499
  domain="APM")
525
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
526
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
527
- policy_id=foo_alert_policy.id,
500
+ foo = newrelic.AlertPolicy("foo", name="foo")
501
+ foo_alert_condition = newrelic.AlertCondition("foo",
502
+ policy_id=foo.id,
503
+ name="foo",
528
504
  type="apm_app_metric",
529
505
  entities=[app.application_id],
530
506
  metric="apdex",
@@ -538,7 +514,6 @@ class AlertCondition(pulumi.CustomResource):
538
514
  time_function="all",
539
515
  )])
540
516
  ```
541
- <!--End PulumiCodeChooser -->
542
517
 
543
518
  ## Terms
544
519
 
@@ -554,17 +529,17 @@ class AlertCondition(pulumi.CustomResource):
554
529
 
555
530
  Manage alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check EntityTags
556
531
 
557
- <!--Start PulumiCodeChooser -->
558
532
  ```python
559
533
  import pulumi
560
534
  import pulumi_newrelic as newrelic
561
535
 
562
- foo_entity = newrelic.get_entity(name="foo entitiy")
563
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
564
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
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",
565
539
  policy_id=foo_alert_policy.id,
540
+ name="foo condition",
566
541
  type="apm_app_metric",
567
- entities=[foo_entity.application_id],
542
+ entities=[foo.application_id],
568
543
  metric="apdex",
569
544
  runbook_url="https://www.example.com",
570
545
  condition_scope="application",
@@ -575,7 +550,7 @@ class AlertCondition(pulumi.CustomResource):
575
550
  threshold=0.75,
576
551
  time_function="all",
577
552
  )])
578
- my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
553
+ my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
579
554
  guid=foo_alert_condition.entity_guid,
580
555
  tags=[
581
556
  newrelic.EntityTagsTagArgs(
@@ -591,7 +566,6 @@ class AlertCondition(pulumi.CustomResource):
591
566
  ),
592
567
  ])
593
568
  ```
594
- <!--End PulumiCodeChooser -->
595
569
 
596
570
  ## Import
597
571
 
@@ -603,27 +577,22 @@ class AlertCondition(pulumi.CustomResource):
603
577
 
604
578
  :param str resource_name: The name of the resource.
605
579
  :param pulumi.ResourceOptions opts: Options for the resource.
606
- :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).
607
- :param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
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.
608
583
  :param pulumi.Input[Sequence[pulumi.Input[int]]] entities: The instance IDs associated with this condition.
609
- :param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
610
- :param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
611
- :param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
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.
612
588
  :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
613
589
  :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
614
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AlertConditionTermArgs']]]] terms: A list of terms for this condition. See Terms below for details.
615
- :param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
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).
616
592
  :param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
617
- :param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
618
-
619
- > **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
620
-
621
- ```
622
- Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
623
- ```
624
- :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:
625
- * when `type` = `apm_app_metric` and `condition_scope` = `instance`
626
- * 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.
627
596
  """
628
597
  ...
629
598
  @overload
@@ -638,7 +607,6 @@ class AlertCondition(pulumi.CustomResource):
638
607
 
639
608
  ## Example Usage
640
609
 
641
- <!--Start PulumiCodeChooser -->
642
610
  ```python
643
611
  import pulumi
644
612
  import pulumi_newrelic as newrelic
@@ -646,9 +614,10 @@ class AlertCondition(pulumi.CustomResource):
646
614
  app = newrelic.get_entity(name="my-app",
647
615
  type="APPLICATION",
648
616
  domain="APM")
649
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
650
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
651
- policy_id=foo_alert_policy.id,
617
+ foo = newrelic.AlertPolicy("foo", name="foo")
618
+ foo_alert_condition = newrelic.AlertCondition("foo",
619
+ policy_id=foo.id,
620
+ name="foo",
652
621
  type="apm_app_metric",
653
622
  entities=[app.application_id],
654
623
  metric="apdex",
@@ -662,7 +631,6 @@ class AlertCondition(pulumi.CustomResource):
662
631
  time_function="all",
663
632
  )])
664
633
  ```
665
- <!--End PulumiCodeChooser -->
666
634
 
667
635
  ## Terms
668
636
 
@@ -678,17 +646,17 @@ class AlertCondition(pulumi.CustomResource):
678
646
 
679
647
  Manage alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check EntityTags
680
648
 
681
- <!--Start PulumiCodeChooser -->
682
649
  ```python
683
650
  import pulumi
684
651
  import pulumi_newrelic as newrelic
685
652
 
686
- foo_entity = newrelic.get_entity(name="foo entitiy")
687
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
688
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
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",
689
656
  policy_id=foo_alert_policy.id,
657
+ name="foo condition",
690
658
  type="apm_app_metric",
691
- entities=[foo_entity.application_id],
659
+ entities=[foo.application_id],
692
660
  metric="apdex",
693
661
  runbook_url="https://www.example.com",
694
662
  condition_scope="application",
@@ -699,7 +667,7 @@ class AlertCondition(pulumi.CustomResource):
699
667
  threshold=0.75,
700
668
  time_function="all",
701
669
  )])
702
- my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
670
+ my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
703
671
  guid=foo_alert_condition.entity_guid,
704
672
  tags=[
705
673
  newrelic.EntityTagsTagArgs(
@@ -715,7 +683,6 @@ class AlertCondition(pulumi.CustomResource):
715
683
  ),
716
684
  ])
717
685
  ```
718
- <!--End PulumiCodeChooser -->
719
686
 
720
687
  ## Import
721
688
 
@@ -817,28 +784,23 @@ class AlertCondition(pulumi.CustomResource):
817
784
  :param str resource_name: The unique name of the resulting resource.
818
785
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
819
786
  :param pulumi.ResourceOptions opts: Options for the resource.
820
- :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).
821
- :param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
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.
822
790
  :param pulumi.Input[Sequence[pulumi.Input[int]]] entities: The instance IDs associated with this condition.
823
791
  :param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
824
- :param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
825
- :param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
826
- :param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
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.
827
796
  :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
828
797
  :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
829
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['AlertConditionTermArgs']]]] terms: A list of terms for this condition. See Terms below for details.
830
- :param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
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).
831
800
  :param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
832
- :param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
833
-
834
- > **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
835
-
836
- ```
837
- Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
838
- ```
839
- :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:
840
- * when `type` = `apm_app_metric` and `condition_scope` = `instance`
841
- * 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.
842
804
  """
843
805
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
844
806
 
@@ -864,7 +826,8 @@ class AlertCondition(pulumi.CustomResource):
864
826
  @pulumi.getter(name="conditionScope")
865
827
  def condition_scope(self) -> pulumi.Output[Optional[str]]:
866
828
  """
867
- `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).
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.
868
831
  """
869
832
  return pulumi.get(self, "condition_scope")
870
833
 
@@ -872,7 +835,7 @@ class AlertCondition(pulumi.CustomResource):
872
835
  @pulumi.getter
873
836
  def enabled(self) -> pulumi.Output[Optional[bool]]:
874
837
  """
875
- Whether the condition is enabled or not. Defaults to true.
838
+ Whether the condition is enabled.
876
839
  """
877
840
  return pulumi.get(self, "enabled")
878
841
 
@@ -896,7 +859,8 @@ class AlertCondition(pulumi.CustomResource):
896
859
  @pulumi.getter(name="gcMetric")
897
860
  def gc_metric(self) -> pulumi.Output[Optional[str]]:
898
861
  """
899
- A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
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.
900
864
  """
901
865
  return pulumi.get(self, "gc_metric")
902
866
 
@@ -904,7 +868,7 @@ class AlertCondition(pulumi.CustomResource):
904
868
  @pulumi.getter
905
869
  def metric(self) -> pulumi.Output[str]:
906
870
  """
907
- The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
871
+ The metric field accepts parameters based on the type set.
908
872
  """
909
873
  return pulumi.get(self, "metric")
910
874
 
@@ -912,7 +876,7 @@ class AlertCondition(pulumi.CustomResource):
912
876
  @pulumi.getter
913
877
  def name(self) -> pulumi.Output[str]:
914
878
  """
915
- The title of the condition. Must be between 1 and 64 characters, inclusive.
879
+ The title of the condition. Must be between 1 and 128 characters, inclusive.
916
880
  """
917
881
  return pulumi.get(self, "name")
918
882
 
@@ -935,16 +899,14 @@ class AlertCondition(pulumi.CustomResource):
935
899
  @property
936
900
  @pulumi.getter
937
901
  def terms(self) -> pulumi.Output[Sequence['outputs.AlertConditionTerm']]:
938
- """
939
- A list of terms for this condition. See Terms below for details.
940
- """
941
902
  return pulumi.get(self, "terms")
942
903
 
943
904
  @property
944
905
  @pulumi.getter
945
906
  def type(self) -> pulumi.Output[str]:
946
907
  """
947
- The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
908
+ The type of condition. One of: (apm_app_metric, apm_jvm_metric, apm_kt_metric, browser_metric, mobile_metric,
909
+ servers_metric).
948
910
  """
949
911
  return pulumi.get(self, "type")
950
912
 
@@ -960,13 +922,7 @@ class AlertCondition(pulumi.CustomResource):
960
922
  @pulumi.getter(name="userDefinedValueFunction")
961
923
  def user_defined_value_function(self) -> pulumi.Output[Optional[str]]:
962
924
  """
963
- One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
964
-
965
- > **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
966
-
967
- ```
968
- Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
969
- ```
925
+ One of: (average, min, max, total, sample_size, percent, rate).
970
926
  """
971
927
  return pulumi.get(self, "user_defined_value_function")
972
928
 
@@ -974,9 +930,8 @@ class AlertCondition(pulumi.CustomResource):
974
930
  @pulumi.getter(name="violationCloseTimer")
975
931
  def violation_close_timer(self) -> pulumi.Output[Optional[int]]:
976
932
  """
977
- 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:
978
- * when `type` = `apm_app_metric` and `condition_scope` = `instance`
979
- * 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.
980
935
  """
981
936
  return pulumi.get(self, "violation_close_timer")
982
937