pulumi-newrelic 5.21.0a1710157101__py3-none-any.whl → 5.39.0a1736834464__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. pulumi_newrelic/__init__.py +9 -0
  2. pulumi_newrelic/_inputs.py +7153 -461
  3. pulumi_newrelic/_utilities.py +41 -5
  4. pulumi_newrelic/account_management.py +11 -6
  5. pulumi_newrelic/alert_channel.py +116 -127
  6. pulumi_newrelic/alert_condition.py +116 -129
  7. pulumi_newrelic/alert_muting_rule.py +128 -76
  8. pulumi_newrelic/alert_policy.py +78 -75
  9. pulumi_newrelic/alert_policy_channel.py +77 -68
  10. pulumi_newrelic/api_access_key.py +45 -28
  11. pulumi_newrelic/browser_application.py +77 -78
  12. pulumi_newrelic/cloud/_inputs.py +2527 -1082
  13. pulumi_newrelic/cloud/aws_govcloud_integrations.py +133 -128
  14. pulumi_newrelic/cloud/aws_govcloud_link_account.py +23 -20
  15. pulumi_newrelic/cloud/aws_integrations.py +298 -1326
  16. pulumi_newrelic/cloud/aws_link_account.py +23 -20
  17. pulumi_newrelic/cloud/azure_integrations.py +521 -483
  18. pulumi_newrelic/cloud/azure_link_account.py +34 -31
  19. pulumi_newrelic/cloud/gcp_integrations.py +341 -322
  20. pulumi_newrelic/cloud/gcp_link_account.py +23 -20
  21. pulumi_newrelic/cloud/outputs.py +327 -1072
  22. pulumi_newrelic/config/__init__.pyi +6 -1
  23. pulumi_newrelic/config/vars.py +7 -2
  24. pulumi_newrelic/data_partition_rule.py +19 -18
  25. pulumi_newrelic/entity_tags.py +32 -31
  26. pulumi_newrelic/events_to_metrics_rule.py +23 -20
  27. pulumi_newrelic/get_account.py +24 -16
  28. pulumi_newrelic/get_alert_channel.py +26 -13
  29. pulumi_newrelic/get_alert_policy.py +35 -12
  30. pulumi_newrelic/get_application.py +39 -31
  31. pulumi_newrelic/get_authentication_domain.py +17 -13
  32. pulumi_newrelic/get_cloud_account.py +26 -18
  33. pulumi_newrelic/get_entity.py +90 -147
  34. pulumi_newrelic/get_group.py +58 -13
  35. pulumi_newrelic/get_key_transaction.py +109 -34
  36. pulumi_newrelic/get_notification_destination.py +64 -14
  37. pulumi_newrelic/get_obfuscation_expression.py +36 -28
  38. pulumi_newrelic/get_service_level_alert_helper.py +135 -117
  39. pulumi_newrelic/get_test_grok_pattern.py +29 -18
  40. pulumi_newrelic/get_user.py +17 -9
  41. pulumi_newrelic/group.py +5 -146
  42. pulumi_newrelic/infra_alert_condition.py +160 -167
  43. pulumi_newrelic/insights/_inputs.py +43 -0
  44. pulumi_newrelic/insights/event.py +48 -47
  45. pulumi_newrelic/insights/outputs.py +5 -0
  46. pulumi_newrelic/key_transaction.py +464 -0
  47. pulumi_newrelic/log_parsing_rule.py +25 -24
  48. pulumi_newrelic/monitor_downtime.py +211 -225
  49. pulumi_newrelic/notification_channel.py +381 -366
  50. pulumi_newrelic/notification_destination.py +192 -54
  51. pulumi_newrelic/nrql_alert_condition.py +345 -262
  52. pulumi_newrelic/nrql_drop_rule.py +31 -30
  53. pulumi_newrelic/obfuscation_expression.py +23 -20
  54. pulumi_newrelic/obfuscation_rule.py +38 -33
  55. pulumi_newrelic/one_dashboard.py +29 -24
  56. pulumi_newrelic/one_dashboard_json.py +19 -14
  57. pulumi_newrelic/one_dashboard_raw.py +110 -105
  58. pulumi_newrelic/outputs.py +2446 -245
  59. pulumi_newrelic/plugins/_inputs.py +145 -10
  60. pulumi_newrelic/plugins/application_settings.py +25 -36
  61. pulumi_newrelic/plugins/outputs.py +15 -10
  62. pulumi_newrelic/plugins/workload.py +215 -92
  63. pulumi_newrelic/provider.py +27 -33
  64. pulumi_newrelic/pulumi-plugin.json +2 -1
  65. pulumi_newrelic/service_level.py +185 -186
  66. pulumi_newrelic/synthetics/_inputs.py +159 -2
  67. pulumi_newrelic/synthetics/alert_condition.py +87 -98
  68. pulumi_newrelic/synthetics/broken_links_monitor.py +216 -99
  69. pulumi_newrelic/synthetics/cert_check_monitor.py +219 -100
  70. pulumi_newrelic/synthetics/get_private_location.py +34 -30
  71. pulumi_newrelic/synthetics/get_secure_credential.py +24 -16
  72. pulumi_newrelic/synthetics/monitor.py +348 -193
  73. pulumi_newrelic/synthetics/multi_location_alert_condition.py +105 -100
  74. pulumi_newrelic/synthetics/outputs.py +7 -2
  75. pulumi_newrelic/synthetics/private_location.py +25 -20
  76. pulumi_newrelic/synthetics/script_monitor.py +317 -182
  77. pulumi_newrelic/synthetics/secure_credential.py +23 -22
  78. pulumi_newrelic/synthetics/step_monitor.py +405 -100
  79. pulumi_newrelic/user.py +13 -10
  80. pulumi_newrelic/workflow.py +209 -196
  81. {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/METADATA +7 -6
  82. pulumi_newrelic-5.39.0a1736834464.dist-info/RECORD +90 -0
  83. {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/WHEEL +1 -1
  84. pulumi_newrelic-5.21.0a1710157101.dist-info/RECORD +0 -89
  85. {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -17,8 +22,8 @@ __all__ = ['NrqlAlertConditionArgs', 'NrqlAlertCondition']
17
22
  class NrqlAlertConditionArgs:
18
23
  def __init__(__self__, *,
19
24
  nrql: pulumi.Input['NrqlAlertConditionNrqlArgs'],
20
- policy_id: pulumi.Input[int],
21
- account_id: Optional[pulumi.Input[int]] = None,
25
+ policy_id: pulumi.Input[str],
26
+ account_id: Optional[pulumi.Input[str]] = None,
22
27
  aggregation_delay: Optional[pulumi.Input[str]] = None,
23
28
  aggregation_method: Optional[pulumi.Input[str]] = None,
24
29
  aggregation_timer: Optional[pulumi.Input[str]] = None,
@@ -32,11 +37,13 @@ class NrqlAlertConditionArgs:
32
37
  expiration_duration: Optional[pulumi.Input[int]] = None,
33
38
  fill_option: Optional[pulumi.Input[str]] = None,
34
39
  fill_value: Optional[pulumi.Input[float]] = None,
40
+ ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
35
41
  name: Optional[pulumi.Input[str]] = None,
36
42
  open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
37
43
  runbook_url: Optional[pulumi.Input[str]] = None,
38
44
  slide_by: Optional[pulumi.Input[int]] = None,
39
45
  terms: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]] = None,
46
+ title_template: Optional[pulumi.Input[str]] = None,
40
47
  type: Optional[pulumi.Input[str]] = None,
41
48
  violation_time_limit: Optional[pulumi.Input[str]] = None,
42
49
  violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
@@ -44,8 +51,8 @@ class NrqlAlertConditionArgs:
44
51
  """
45
52
  The set of arguments for constructing a NrqlAlertCondition resource.
46
53
  :param pulumi.Input['NrqlAlertConditionNrqlArgs'] nrql: A NRQL query. See NRQL below for details.
47
- :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
48
- :param pulumi.Input[int] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
54
+ :param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
55
+ :param pulumi.Input[str] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
49
56
  :param pulumi.Input[str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
50
57
  :param pulumi.Input[str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
51
58
  :param pulumi.Input[str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
@@ -59,11 +66,13 @@ class NrqlAlertConditionArgs:
59
66
  :param pulumi.Input[int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
60
67
  :param pulumi.Input[str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
61
68
  :param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
69
+ :param pulumi.Input[bool] ignore_on_expected_termination: Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
62
70
  :param pulumi.Input[str] name: The title of the condition.
63
71
  :param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
64
72
  :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
65
73
  :param pulumi.Input[int] slide_by: Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
66
74
  :param pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
75
+ :param pulumi.Input[str] title_template: The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
67
76
  :param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
68
77
  :param pulumi.Input[str] violation_time_limit: **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
69
78
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
@@ -101,6 +110,8 @@ class NrqlAlertConditionArgs:
101
110
  pulumi.set(__self__, "fill_option", fill_option)
102
111
  if fill_value is not None:
103
112
  pulumi.set(__self__, "fill_value", fill_value)
113
+ if ignore_on_expected_termination is not None:
114
+ pulumi.set(__self__, "ignore_on_expected_termination", ignore_on_expected_termination)
104
115
  if name is not None:
105
116
  pulumi.set(__self__, "name", name)
106
117
  if open_violation_on_expiration is not None:
@@ -114,6 +125,8 @@ class NrqlAlertConditionArgs:
114
125
  pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
115
126
  if terms is not None:
116
127
  pulumi.set(__self__, "terms", terms)
128
+ if title_template is not None:
129
+ pulumi.set(__self__, "title_template", title_template)
117
130
  if type is not None:
118
131
  pulumi.set(__self__, "type", type)
119
132
  if violation_time_limit is not None:
@@ -140,26 +153,26 @@ class NrqlAlertConditionArgs:
140
153
 
141
154
  @property
142
155
  @pulumi.getter(name="policyId")
143
- def policy_id(self) -> pulumi.Input[int]:
156
+ def policy_id(self) -> pulumi.Input[str]:
144
157
  """
145
158
  The ID of the policy where this condition should be used.
146
159
  """
147
160
  return pulumi.get(self, "policy_id")
148
161
 
149
162
  @policy_id.setter
150
- def policy_id(self, value: pulumi.Input[int]):
163
+ def policy_id(self, value: pulumi.Input[str]):
151
164
  pulumi.set(self, "policy_id", value)
152
165
 
153
166
  @property
154
167
  @pulumi.getter(name="accountId")
155
- def account_id(self) -> Optional[pulumi.Input[int]]:
168
+ def account_id(self) -> Optional[pulumi.Input[str]]:
156
169
  """
157
170
  The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
158
171
  """
159
172
  return pulumi.get(self, "account_id")
160
173
 
161
174
  @account_id.setter
162
- def account_id(self, value: Optional[pulumi.Input[int]]):
175
+ def account_id(self, value: Optional[pulumi.Input[str]]):
163
176
  pulumi.set(self, "account_id", value)
164
177
 
165
178
  @property
@@ -318,6 +331,18 @@ class NrqlAlertConditionArgs:
318
331
  def fill_value(self, value: Optional[pulumi.Input[float]]):
319
332
  pulumi.set(self, "fill_value", value)
320
333
 
334
+ @property
335
+ @pulumi.getter(name="ignoreOnExpectedTermination")
336
+ def ignore_on_expected_termination(self) -> Optional[pulumi.Input[bool]]:
337
+ """
338
+ Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
339
+ """
340
+ return pulumi.get(self, "ignore_on_expected_termination")
341
+
342
+ @ignore_on_expected_termination.setter
343
+ def ignore_on_expected_termination(self, value: Optional[pulumi.Input[bool]]):
344
+ pulumi.set(self, "ignore_on_expected_termination", value)
345
+
321
346
  @property
322
347
  @pulumi.getter
323
348
  def name(self) -> Optional[pulumi.Input[str]]:
@@ -368,19 +393,29 @@ class NrqlAlertConditionArgs:
368
393
 
369
394
  @property
370
395
  @pulumi.getter
396
+ @_utilities.deprecated("""use `critical` and `warning` attributes instead""")
371
397
  def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
372
398
  """
373
399
  **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
374
400
  """
375
- warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
376
- pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
377
-
378
401
  return pulumi.get(self, "terms")
379
402
 
380
403
  @terms.setter
381
404
  def terms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]):
382
405
  pulumi.set(self, "terms", value)
383
406
 
407
+ @property
408
+ @pulumi.getter(name="titleTemplate")
409
+ def title_template(self) -> Optional[pulumi.Input[str]]:
410
+ """
411
+ The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
412
+ """
413
+ return pulumi.get(self, "title_template")
414
+
415
+ @title_template.setter
416
+ def title_template(self, value: Optional[pulumi.Input[str]]):
417
+ pulumi.set(self, "title_template", value)
418
+
384
419
  @property
385
420
  @pulumi.getter
386
421
  def type(self) -> Optional[pulumi.Input[str]]:
@@ -395,14 +430,12 @@ class NrqlAlertConditionArgs:
395
430
 
396
431
  @property
397
432
  @pulumi.getter(name="violationTimeLimit")
433
+ @_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
398
434
  def violation_time_limit(self) -> Optional[pulumi.Input[str]]:
399
435
  """
400
436
  **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
401
437
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
402
438
  """
403
- warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
404
- pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
405
-
406
439
  return pulumi.get(self, "violation_time_limit")
407
440
 
408
441
  @violation_time_limit.setter
@@ -438,7 +471,7 @@ class NrqlAlertConditionArgs:
438
471
  @pulumi.input_type
439
472
  class _NrqlAlertConditionState:
440
473
  def __init__(__self__, *,
441
- account_id: Optional[pulumi.Input[int]] = None,
474
+ account_id: Optional[pulumi.Input[str]] = None,
442
475
  aggregation_delay: Optional[pulumi.Input[str]] = None,
443
476
  aggregation_method: Optional[pulumi.Input[str]] = None,
444
477
  aggregation_timer: Optional[pulumi.Input[str]] = None,
@@ -453,20 +486,22 @@ class _NrqlAlertConditionState:
453
486
  expiration_duration: Optional[pulumi.Input[int]] = None,
454
487
  fill_option: Optional[pulumi.Input[str]] = None,
455
488
  fill_value: Optional[pulumi.Input[float]] = None,
489
+ ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
456
490
  name: Optional[pulumi.Input[str]] = None,
457
491
  nrql: Optional[pulumi.Input['NrqlAlertConditionNrqlArgs']] = None,
458
492
  open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
459
- policy_id: Optional[pulumi.Input[int]] = None,
493
+ policy_id: Optional[pulumi.Input[str]] = None,
460
494
  runbook_url: Optional[pulumi.Input[str]] = None,
461
495
  slide_by: Optional[pulumi.Input[int]] = None,
462
496
  terms: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]] = None,
497
+ title_template: Optional[pulumi.Input[str]] = None,
463
498
  type: Optional[pulumi.Input[str]] = None,
464
499
  violation_time_limit: Optional[pulumi.Input[str]] = None,
465
500
  violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
466
501
  warning: Optional[pulumi.Input['NrqlAlertConditionWarningArgs']] = None):
467
502
  """
468
503
  Input properties used for looking up and filtering NrqlAlertCondition resources.
469
- :param pulumi.Input[int] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
504
+ :param pulumi.Input[str] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
470
505
  :param pulumi.Input[str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
471
506
  :param pulumi.Input[str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
472
507
  :param pulumi.Input[str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
@@ -481,13 +516,15 @@ class _NrqlAlertConditionState:
481
516
  :param pulumi.Input[int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
482
517
  :param pulumi.Input[str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
483
518
  :param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
519
+ :param pulumi.Input[bool] ignore_on_expected_termination: Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
484
520
  :param pulumi.Input[str] name: The title of the condition.
485
521
  :param pulumi.Input['NrqlAlertConditionNrqlArgs'] nrql: A NRQL query. See NRQL below for details.
486
522
  :param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
487
- :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
523
+ :param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
488
524
  :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
489
525
  :param pulumi.Input[int] slide_by: Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
490
526
  :param pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
527
+ :param pulumi.Input[str] title_template: The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
491
528
  :param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
492
529
  :param pulumi.Input[str] violation_time_limit: **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
493
530
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
@@ -525,6 +562,8 @@ class _NrqlAlertConditionState:
525
562
  pulumi.set(__self__, "fill_option", fill_option)
526
563
  if fill_value is not None:
527
564
  pulumi.set(__self__, "fill_value", fill_value)
565
+ if ignore_on_expected_termination is not None:
566
+ pulumi.set(__self__, "ignore_on_expected_termination", ignore_on_expected_termination)
528
567
  if name is not None:
529
568
  pulumi.set(__self__, "name", name)
530
569
  if nrql is not None:
@@ -542,6 +581,8 @@ class _NrqlAlertConditionState:
542
581
  pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
543
582
  if terms is not None:
544
583
  pulumi.set(__self__, "terms", terms)
584
+ if title_template is not None:
585
+ pulumi.set(__self__, "title_template", title_template)
545
586
  if type is not None:
546
587
  pulumi.set(__self__, "type", type)
547
588
  if violation_time_limit is not None:
@@ -556,14 +597,14 @@ class _NrqlAlertConditionState:
556
597
 
557
598
  @property
558
599
  @pulumi.getter(name="accountId")
559
- def account_id(self) -> Optional[pulumi.Input[int]]:
600
+ def account_id(self) -> Optional[pulumi.Input[str]]:
560
601
  """
561
602
  The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
562
603
  """
563
604
  return pulumi.get(self, "account_id")
564
605
 
565
606
  @account_id.setter
566
- def account_id(self, value: Optional[pulumi.Input[int]]):
607
+ def account_id(self, value: Optional[pulumi.Input[str]]):
567
608
  pulumi.set(self, "account_id", value)
568
609
 
569
610
  @property
@@ -734,6 +775,18 @@ class _NrqlAlertConditionState:
734
775
  def fill_value(self, value: Optional[pulumi.Input[float]]):
735
776
  pulumi.set(self, "fill_value", value)
736
777
 
778
+ @property
779
+ @pulumi.getter(name="ignoreOnExpectedTermination")
780
+ def ignore_on_expected_termination(self) -> Optional[pulumi.Input[bool]]:
781
+ """
782
+ Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
783
+ """
784
+ return pulumi.get(self, "ignore_on_expected_termination")
785
+
786
+ @ignore_on_expected_termination.setter
787
+ def ignore_on_expected_termination(self, value: Optional[pulumi.Input[bool]]):
788
+ pulumi.set(self, "ignore_on_expected_termination", value)
789
+
737
790
  @property
738
791
  @pulumi.getter
739
792
  def name(self) -> Optional[pulumi.Input[str]]:
@@ -772,14 +825,14 @@ class _NrqlAlertConditionState:
772
825
 
773
826
  @property
774
827
  @pulumi.getter(name="policyId")
775
- def policy_id(self) -> Optional[pulumi.Input[int]]:
828
+ def policy_id(self) -> Optional[pulumi.Input[str]]:
776
829
  """
777
830
  The ID of the policy where this condition should be used.
778
831
  """
779
832
  return pulumi.get(self, "policy_id")
780
833
 
781
834
  @policy_id.setter
782
- def policy_id(self, value: Optional[pulumi.Input[int]]):
835
+ def policy_id(self, value: Optional[pulumi.Input[str]]):
783
836
  pulumi.set(self, "policy_id", value)
784
837
 
785
838
  @property
@@ -808,19 +861,29 @@ class _NrqlAlertConditionState:
808
861
 
809
862
  @property
810
863
  @pulumi.getter
864
+ @_utilities.deprecated("""use `critical` and `warning` attributes instead""")
811
865
  def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
812
866
  """
813
867
  **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
814
868
  """
815
- warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
816
- pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
817
-
818
869
  return pulumi.get(self, "terms")
819
870
 
820
871
  @terms.setter
821
872
  def terms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]):
822
873
  pulumi.set(self, "terms", value)
823
874
 
875
+ @property
876
+ @pulumi.getter(name="titleTemplate")
877
+ def title_template(self) -> Optional[pulumi.Input[str]]:
878
+ """
879
+ The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
880
+ """
881
+ return pulumi.get(self, "title_template")
882
+
883
+ @title_template.setter
884
+ def title_template(self, value: Optional[pulumi.Input[str]]):
885
+ pulumi.set(self, "title_template", value)
886
+
824
887
  @property
825
888
  @pulumi.getter
826
889
  def type(self) -> Optional[pulumi.Input[str]]:
@@ -835,14 +898,12 @@ class _NrqlAlertConditionState:
835
898
 
836
899
  @property
837
900
  @pulumi.getter(name="violationTimeLimit")
901
+ @_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
838
902
  def violation_time_limit(self) -> Optional[pulumi.Input[str]]:
839
903
  """
840
904
  **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
841
905
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
842
906
  """
843
- warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
844
- pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
845
-
846
907
  return pulumi.get(self, "violation_time_limit")
847
908
 
848
909
  @violation_time_limit.setter
@@ -880,31 +941,33 @@ class NrqlAlertCondition(pulumi.CustomResource):
880
941
  def __init__(__self__,
881
942
  resource_name: str,
882
943
  opts: Optional[pulumi.ResourceOptions] = None,
883
- account_id: Optional[pulumi.Input[int]] = None,
944
+ account_id: Optional[pulumi.Input[str]] = None,
884
945
  aggregation_delay: Optional[pulumi.Input[str]] = None,
885
946
  aggregation_method: Optional[pulumi.Input[str]] = None,
886
947
  aggregation_timer: Optional[pulumi.Input[str]] = None,
887
948
  aggregation_window: Optional[pulumi.Input[int]] = None,
888
949
  baseline_direction: Optional[pulumi.Input[str]] = None,
889
950
  close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
890
- critical: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionCriticalArgs']]] = None,
951
+ critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
891
952
  description: Optional[pulumi.Input[str]] = None,
892
953
  enabled: Optional[pulumi.Input[bool]] = None,
893
954
  evaluation_delay: Optional[pulumi.Input[int]] = None,
894
955
  expiration_duration: Optional[pulumi.Input[int]] = None,
895
956
  fill_option: Optional[pulumi.Input[str]] = None,
896
957
  fill_value: Optional[pulumi.Input[float]] = None,
958
+ ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
897
959
  name: Optional[pulumi.Input[str]] = None,
898
- nrql: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionNrqlArgs']]] = None,
960
+ nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
899
961
  open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
900
- policy_id: Optional[pulumi.Input[int]] = None,
962
+ policy_id: Optional[pulumi.Input[str]] = None,
901
963
  runbook_url: Optional[pulumi.Input[str]] = None,
902
964
  slide_by: Optional[pulumi.Input[int]] = None,
903
- terms: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NrqlAlertConditionTermArgs']]]]] = None,
965
+ terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
966
+ title_template: Optional[pulumi.Input[str]] = None,
904
967
  type: Optional[pulumi.Input[str]] = None,
905
968
  violation_time_limit: Optional[pulumi.Input[str]] = None,
906
969
  violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
907
- warning: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionWarningArgs']]] = None,
970
+ warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None,
908
971
  __props__=None):
909
972
  """
910
973
  Use this resource to create and manage NRQL alert conditions in New Relic.
@@ -913,17 +976,18 @@ class NrqlAlertCondition(pulumi.CustomResource):
913
976
 
914
977
  ### Type: `static` (default)
915
978
 
916
- <!--Start PulumiCodeChooser -->
917
979
  ```python
918
980
  import pulumi
919
981
  import pulumi_newrelic as newrelic
920
982
 
921
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
922
- foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
923
- account_id=12345678,
924
- policy_id=foo_alert_policy.id,
983
+ foo = newrelic.AlertPolicy("foo", name="foo")
984
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
985
+ account_id="12345678",
986
+ policy_id=foo.id,
925
987
  type="static",
988
+ name="foo",
926
989
  description="Alert when transactions are taking too long",
990
+ title_template="Issue in environment: {{ json accumulations.tag.environment }}",
927
991
  runbook_url="https://www.example.com",
928
992
  enabled=True,
929
993
  violation_time_limit_seconds=3600,
@@ -935,30 +999,31 @@ class NrqlAlertCondition(pulumi.CustomResource):
935
999
  expiration_duration=120,
936
1000
  open_violation_on_expiration=True,
937
1001
  close_violations_on_expiration=True,
1002
+ ignore_on_expected_termination=True,
938
1003
  slide_by=30,
939
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
940
- query="SELECT average(duration) FROM Transaction where appName = 'Your App'",
941
- ),
942
- critical=newrelic.NrqlAlertConditionCriticalArgs(
943
- operator="above",
944
- threshold=5.5,
945
- threshold_duration=300,
946
- threshold_occurrences="ALL",
947
- ),
948
- warning=newrelic.NrqlAlertConditionWarningArgs(
949
- operator="above",
950
- threshold=3.5,
951
- threshold_duration=600,
952
- threshold_occurrences="ALL",
953
- ))
1004
+ nrql={
1005
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1006
+ },
1007
+ critical={
1008
+ "operator": "above",
1009
+ "threshold": 5.5,
1010
+ "threshold_duration": 300,
1011
+ "threshold_occurrences": "ALL",
1012
+ },
1013
+ warning={
1014
+ "operator": "above",
1015
+ "threshold": 3.5,
1016
+ "threshold_duration": 600,
1017
+ "threshold_occurrences": "ALL",
1018
+ })
954
1019
  ```
955
- <!--End PulumiCodeChooser -->
956
1020
 
957
1021
  ## NRQL
958
1022
 
959
1023
  The `nrql` block supports the following arguments:
960
1024
 
961
1025
  - `query` - (Required) The NRQL query to execute for the condition.
1026
+ - `data_account_id` - (Optional) **BETA PREVIEW: the `data_account_id` field is in limited release and only enabled for preview on a per-account basis.** The account ID to use for the alert condition's query as specified in the the `query` field. If `data_account_id` is not specified, then the condition's query will be evaluated against the `account_id`. Note that the `account_id` must have read privileges for the `data_account_id` or else the condition will be invalid.
962
1027
  - `evaluation_offset` - (Optional) **DEPRECATED:** Use `aggregation_method` instead. Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated based on their `aggregation_window` size. The start time depends on this value. It's recommended to set this to 3 windows. An offset of less than 3 windows will trigger incidents sooner, but you may see more false positives and negatives due to data latency. With `evaluation_offset` set to 3 windows and an `aggregation_window` of 60 seconds, the NRQL time window applied to your query will be: `SINCE 3 minutes ago UNTIL 2 minutes ago`. `evaluation_offset` cannot be set with `aggregation_method`, `aggregation_delay`, or `aggregation_timer`.<br>
963
1028
  - `since_value` - (Optional) **DEPRECATED:** Use `aggregation_method` instead. The value to be used in the `SINCE <X> minutes ago` clause for the NRQL query. Must be between 1-20 (inclusive). <br>
964
1029
 
@@ -992,16 +1057,16 @@ class NrqlAlertCondition(pulumi.CustomResource):
992
1057
 
993
1058
  [Baseline NRQL alert conditions](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/create-baseline-alert-conditions) are dynamic in nature and adjust to the behavior of your data. The example below demonstrates a baseline NRQL alert condition for alerting when transaction durations are above a specified threshold and dynamically adjusts based on data trends.
994
1059
 
995
- <!--Start PulumiCodeChooser -->
996
1060
  ```python
997
1061
  import pulumi
998
1062
  import pulumi_newrelic as newrelic
999
1063
 
1000
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
1001
- foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
1064
+ foo = newrelic.AlertPolicy("foo", name="foo")
1065
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1002
1066
  account_id="your_account_id",
1003
- policy_id=foo_alert_policy.id,
1067
+ policy_id=foo.id,
1004
1068
  type="static",
1069
+ name="foo",
1005
1070
  description="Alert when transactions are taking too long",
1006
1071
  runbook_url="https://www.example.com",
1007
1072
  enabled=True,
@@ -1015,38 +1080,37 @@ class NrqlAlertCondition(pulumi.CustomResource):
1015
1080
  open_violation_on_expiration=True,
1016
1081
  close_violations_on_expiration=True,
1017
1082
  slide_by=30,
1018
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
1019
- query="SELECT average(duration) FROM Transaction where appName = 'Your App'",
1020
- ),
1021
- critical=newrelic.NrqlAlertConditionCriticalArgs(
1022
- operator="above",
1023
- threshold=5.5,
1024
- threshold_duration=300,
1025
- threshold_occurrences="ALL",
1026
- ),
1027
- warning=newrelic.NrqlAlertConditionWarningArgs(
1028
- operator="above",
1029
- threshold=3.5,
1030
- threshold_duration=600,
1031
- threshold_occurrences="ALL",
1032
- ))
1083
+ nrql={
1084
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1085
+ },
1086
+ critical={
1087
+ "operator": "above",
1088
+ "threshold": 5.5,
1089
+ "threshold_duration": 300,
1090
+ "threshold_occurrences": "ALL",
1091
+ },
1092
+ warning={
1093
+ "operator": "above",
1094
+ "threshold": 3.5,
1095
+ "threshold_duration": 600,
1096
+ "threshold_occurrences": "ALL",
1097
+ })
1033
1098
  ```
1034
- <!--End PulumiCodeChooser -->
1035
1099
 
1036
1100
  ## Tags
1037
1101
 
1038
1102
  Manage NRQL alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check `EntityTags`.
1039
1103
 
1040
- <!--Start PulumiCodeChooser -->
1041
1104
  ```python
1042
1105
  import pulumi
1043
1106
  import pulumi_newrelic as newrelic
1044
1107
 
1045
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
1046
- foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
1047
- account_id=12345678,
1048
- policy_id=foo_alert_policy.id,
1108
+ foo = newrelic.AlertPolicy("foo", name="foo")
1109
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1110
+ account_id="12345678",
1111
+ policy_id=foo.id,
1049
1112
  type="static",
1113
+ name="foo",
1050
1114
  description="Alert when transactions are taking too long",
1051
1115
  runbook_url="https://www.example.com",
1052
1116
  enabled=True,
@@ -1060,38 +1124,37 @@ class NrqlAlertCondition(pulumi.CustomResource):
1060
1124
  open_violation_on_expiration=True,
1061
1125
  close_violations_on_expiration=True,
1062
1126
  slide_by=30,
1063
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
1064
- query="SELECT average(duration) FROM Transaction where appName = 'Your App'",
1065
- ),
1066
- critical=newrelic.NrqlAlertConditionCriticalArgs(
1067
- operator="above",
1068
- threshold=5.5,
1069
- threshold_duration=300,
1070
- threshold_occurrences="ALL",
1071
- ),
1072
- warning=newrelic.NrqlAlertConditionWarningArgs(
1073
- operator="above",
1074
- threshold=3.5,
1075
- threshold_duration=600,
1076
- threshold_occurrences="ALL",
1077
- ))
1078
- my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
1127
+ nrql={
1128
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1129
+ },
1130
+ critical={
1131
+ "operator": "above",
1132
+ "threshold": 5.5,
1133
+ "threshold_duration": 300,
1134
+ "threshold_occurrences": "ALL",
1135
+ },
1136
+ warning={
1137
+ "operator": "above",
1138
+ "threshold": 3.5,
1139
+ "threshold_duration": 600,
1140
+ "threshold_occurrences": "ALL",
1141
+ })
1142
+ my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
1079
1143
  guid=foo_nrql_alert_condition.entity_guid,
1080
1144
  tags=[
1081
- newrelic.EntityTagsTagArgs(
1082
- key="my-key",
1083
- values=[
1145
+ {
1146
+ "key": "my-key",
1147
+ "values": [
1084
1148
  "my-value",
1085
1149
  "my-other-value",
1086
1150
  ],
1087
- ),
1088
- newrelic.EntityTagsTagArgs(
1089
- key="my-key-2",
1090
- values=["my-value-2"],
1091
- ),
1151
+ },
1152
+ {
1153
+ "key": "my-key-2",
1154
+ "values": ["my-value-2"],
1155
+ },
1092
1156
  ])
1093
1157
  ```
1094
- <!--End PulumiCodeChooser -->
1095
1158
 
1096
1159
  <small>alerts.newrelic.com/accounts/**\\<account_id\\>**/policies/**\\<policy_id\\>**/conditions/**\\<condition_id\\>**/edit</small>
1097
1160
 
@@ -1103,55 +1166,53 @@ class NrqlAlertCondition(pulumi.CustomResource):
1103
1166
 
1104
1167
  An example resource from 1.x might look like the following.
1105
1168
 
1106
- <!--Start PulumiCodeChooser -->
1107
1169
  ```python
1108
1170
  import pulumi
1109
1171
  import pulumi_newrelic as newrelic
1110
1172
 
1111
- nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
1112
- policy_id=newrelic_alert_policy["z"]["id"],
1173
+ z = newrelic.NrqlAlertCondition("z",
1174
+ policy_id=z_newrelic_alert_policy["id"],
1175
+ name="zleslie-test",
1113
1176
  type="static",
1114
1177
  runbook_url="https://localhost",
1115
1178
  enabled=True,
1116
1179
  violation_time_limit="TWENTY_FOUR_HOURS",
1117
- critical=newrelic.NrqlAlertConditionCriticalArgs(
1118
- operator="above",
1119
- threshold_duration=120,
1120
- threshold=3,
1121
- threshold_occurrences="AT_LEAST_ONCE",
1122
- ),
1123
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
1124
- query="SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1125
- ))
1180
+ critical={
1181
+ "operator": "above",
1182
+ "threshold_duration": 120,
1183
+ "threshold": 3,
1184
+ "threshold_occurrences": "AT_LEAST_ONCE",
1185
+ },
1186
+ nrql={
1187
+ "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1188
+ })
1126
1189
  ```
1127
- <!--End PulumiCodeChooser -->
1128
1190
 
1129
1191
  After making the appropriate adjustments mentioned in the deprecation warnings,
1130
1192
  the resource now looks like the following.
1131
1193
 
1132
- <!--Start PulumiCodeChooser -->
1133
1194
  ```python
1134
1195
  import pulumi
1135
1196
  import pulumi_newrelic as newrelic
1136
1197
 
1137
- nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
1138
- policy_id=newrelic_alert_policy["z"]["id"],
1198
+ z = newrelic.NrqlAlertCondition("z",
1199
+ policy_id=z_newrelic_alert_policy["id"],
1200
+ name="zleslie-test",
1139
1201
  type="static",
1140
1202
  runbook_url="https://localhost",
1141
1203
  enabled=True,
1142
1204
  violation_time_limit_seconds=86400,
1143
- terms=[newrelic.NrqlAlertConditionTermArgs(
1144
- priority="critical",
1145
- operator="above",
1146
- threshold=3,
1147
- duration=5,
1148
- time_function="any",
1149
- )],
1150
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
1151
- query="SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1152
- ))
1205
+ terms=[{
1206
+ "priority": "critical",
1207
+ "operator": "above",
1208
+ "threshold": 3,
1209
+ "duration": 5,
1210
+ "time_function": "any",
1211
+ }],
1212
+ nrql={
1213
+ "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1214
+ })
1153
1215
  ```
1154
- <!--End PulumiCodeChooser -->
1155
1216
 
1156
1217
  ## Import
1157
1218
 
@@ -1171,33 +1232,35 @@ class NrqlAlertCondition(pulumi.CustomResource):
1171
1232
 
1172
1233
  :param str resource_name: The name of the resource.
1173
1234
  :param pulumi.ResourceOptions opts: Options for the resource.
1174
- :param pulumi.Input[int] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
1235
+ :param pulumi.Input[str] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
1175
1236
  :param pulumi.Input[str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
1176
1237
  :param pulumi.Input[str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
1177
1238
  :param pulumi.Input[str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
1178
1239
  :param pulumi.Input[int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 21600 seconds (6 hours). Default is 60 seconds.
1179
1240
  :param pulumi.Input[str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
1180
1241
  :param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
1181
- :param pulumi.Input[pulumi.InputType['NrqlAlertConditionCriticalArgs']] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
1242
+ :param pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
1182
1243
  :param pulumi.Input[str] description: The description of the NRQL alert condition.
1183
1244
  :param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
1184
1245
  :param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
1185
1246
  :param pulumi.Input[int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
1186
1247
  :param pulumi.Input[str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
1187
1248
  :param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
1249
+ :param pulumi.Input[bool] ignore_on_expected_termination: Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
1188
1250
  :param pulumi.Input[str] name: The title of the condition.
1189
- :param pulumi.Input[pulumi.InputType['NrqlAlertConditionNrqlArgs']] nrql: A NRQL query. See NRQL below for details.
1251
+ :param pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']] nrql: A NRQL query. See NRQL below for details.
1190
1252
  :param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
1191
- :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
1253
+ :param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
1192
1254
  :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
1193
1255
  :param pulumi.Input[int] slide_by: Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
1194
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NrqlAlertConditionTermArgs']]]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
1256
+ :param pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
1257
+ :param pulumi.Input[str] title_template: The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
1195
1258
  :param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
1196
1259
  :param pulumi.Input[str] violation_time_limit: **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
1197
1260
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1198
1261
  :param pulumi.Input[int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
1199
1262
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1200
- :param pulumi.Input[pulumi.InputType['NrqlAlertConditionWarningArgs']] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
1263
+ :param pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
1201
1264
  """
1202
1265
  ...
1203
1266
  @overload
@@ -1212,17 +1275,18 @@ class NrqlAlertCondition(pulumi.CustomResource):
1212
1275
 
1213
1276
  ### Type: `static` (default)
1214
1277
 
1215
- <!--Start PulumiCodeChooser -->
1216
1278
  ```python
1217
1279
  import pulumi
1218
1280
  import pulumi_newrelic as newrelic
1219
1281
 
1220
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
1221
- foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
1222
- account_id=12345678,
1223
- policy_id=foo_alert_policy.id,
1282
+ foo = newrelic.AlertPolicy("foo", name="foo")
1283
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1284
+ account_id="12345678",
1285
+ policy_id=foo.id,
1224
1286
  type="static",
1287
+ name="foo",
1225
1288
  description="Alert when transactions are taking too long",
1289
+ title_template="Issue in environment: {{ json accumulations.tag.environment }}",
1226
1290
  runbook_url="https://www.example.com",
1227
1291
  enabled=True,
1228
1292
  violation_time_limit_seconds=3600,
@@ -1234,30 +1298,31 @@ class NrqlAlertCondition(pulumi.CustomResource):
1234
1298
  expiration_duration=120,
1235
1299
  open_violation_on_expiration=True,
1236
1300
  close_violations_on_expiration=True,
1301
+ ignore_on_expected_termination=True,
1237
1302
  slide_by=30,
1238
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
1239
- query="SELECT average(duration) FROM Transaction where appName = 'Your App'",
1240
- ),
1241
- critical=newrelic.NrqlAlertConditionCriticalArgs(
1242
- operator="above",
1243
- threshold=5.5,
1244
- threshold_duration=300,
1245
- threshold_occurrences="ALL",
1246
- ),
1247
- warning=newrelic.NrqlAlertConditionWarningArgs(
1248
- operator="above",
1249
- threshold=3.5,
1250
- threshold_duration=600,
1251
- threshold_occurrences="ALL",
1252
- ))
1303
+ nrql={
1304
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1305
+ },
1306
+ critical={
1307
+ "operator": "above",
1308
+ "threshold": 5.5,
1309
+ "threshold_duration": 300,
1310
+ "threshold_occurrences": "ALL",
1311
+ },
1312
+ warning={
1313
+ "operator": "above",
1314
+ "threshold": 3.5,
1315
+ "threshold_duration": 600,
1316
+ "threshold_occurrences": "ALL",
1317
+ })
1253
1318
  ```
1254
- <!--End PulumiCodeChooser -->
1255
1319
 
1256
1320
  ## NRQL
1257
1321
 
1258
1322
  The `nrql` block supports the following arguments:
1259
1323
 
1260
1324
  - `query` - (Required) The NRQL query to execute for the condition.
1325
+ - `data_account_id` - (Optional) **BETA PREVIEW: the `data_account_id` field is in limited release and only enabled for preview on a per-account basis.** The account ID to use for the alert condition's query as specified in the the `query` field. If `data_account_id` is not specified, then the condition's query will be evaluated against the `account_id`. Note that the `account_id` must have read privileges for the `data_account_id` or else the condition will be invalid.
1261
1326
  - `evaluation_offset` - (Optional) **DEPRECATED:** Use `aggregation_method` instead. Represented in minutes and must be within 1-20 minutes (inclusive). NRQL queries are evaluated based on their `aggregation_window` size. The start time depends on this value. It's recommended to set this to 3 windows. An offset of less than 3 windows will trigger incidents sooner, but you may see more false positives and negatives due to data latency. With `evaluation_offset` set to 3 windows and an `aggregation_window` of 60 seconds, the NRQL time window applied to your query will be: `SINCE 3 minutes ago UNTIL 2 minutes ago`. `evaluation_offset` cannot be set with `aggregation_method`, `aggregation_delay`, or `aggregation_timer`.<br>
1262
1327
  - `since_value` - (Optional) **DEPRECATED:** Use `aggregation_method` instead. The value to be used in the `SINCE <X> minutes ago` clause for the NRQL query. Must be between 1-20 (inclusive). <br>
1263
1328
 
@@ -1291,16 +1356,16 @@ class NrqlAlertCondition(pulumi.CustomResource):
1291
1356
 
1292
1357
  [Baseline NRQL alert conditions](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/create-baseline-alert-conditions) are dynamic in nature and adjust to the behavior of your data. The example below demonstrates a baseline NRQL alert condition for alerting when transaction durations are above a specified threshold and dynamically adjusts based on data trends.
1293
1358
 
1294
- <!--Start PulumiCodeChooser -->
1295
1359
  ```python
1296
1360
  import pulumi
1297
1361
  import pulumi_newrelic as newrelic
1298
1362
 
1299
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
1300
- foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
1363
+ foo = newrelic.AlertPolicy("foo", name="foo")
1364
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1301
1365
  account_id="your_account_id",
1302
- policy_id=foo_alert_policy.id,
1366
+ policy_id=foo.id,
1303
1367
  type="static",
1368
+ name="foo",
1304
1369
  description="Alert when transactions are taking too long",
1305
1370
  runbook_url="https://www.example.com",
1306
1371
  enabled=True,
@@ -1314,38 +1379,37 @@ class NrqlAlertCondition(pulumi.CustomResource):
1314
1379
  open_violation_on_expiration=True,
1315
1380
  close_violations_on_expiration=True,
1316
1381
  slide_by=30,
1317
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
1318
- query="SELECT average(duration) FROM Transaction where appName = 'Your App'",
1319
- ),
1320
- critical=newrelic.NrqlAlertConditionCriticalArgs(
1321
- operator="above",
1322
- threshold=5.5,
1323
- threshold_duration=300,
1324
- threshold_occurrences="ALL",
1325
- ),
1326
- warning=newrelic.NrqlAlertConditionWarningArgs(
1327
- operator="above",
1328
- threshold=3.5,
1329
- threshold_duration=600,
1330
- threshold_occurrences="ALL",
1331
- ))
1382
+ nrql={
1383
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1384
+ },
1385
+ critical={
1386
+ "operator": "above",
1387
+ "threshold": 5.5,
1388
+ "threshold_duration": 300,
1389
+ "threshold_occurrences": "ALL",
1390
+ },
1391
+ warning={
1392
+ "operator": "above",
1393
+ "threshold": 3.5,
1394
+ "threshold_duration": 600,
1395
+ "threshold_occurrences": "ALL",
1396
+ })
1332
1397
  ```
1333
- <!--End PulumiCodeChooser -->
1334
1398
 
1335
1399
  ## Tags
1336
1400
 
1337
1401
  Manage NRQL alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check `EntityTags`.
1338
1402
 
1339
- <!--Start PulumiCodeChooser -->
1340
1403
  ```python
1341
1404
  import pulumi
1342
1405
  import pulumi_newrelic as newrelic
1343
1406
 
1344
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
1345
- foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
1346
- account_id=12345678,
1347
- policy_id=foo_alert_policy.id,
1407
+ foo = newrelic.AlertPolicy("foo", name="foo")
1408
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1409
+ account_id="12345678",
1410
+ policy_id=foo.id,
1348
1411
  type="static",
1412
+ name="foo",
1349
1413
  description="Alert when transactions are taking too long",
1350
1414
  runbook_url="https://www.example.com",
1351
1415
  enabled=True,
@@ -1359,38 +1423,37 @@ class NrqlAlertCondition(pulumi.CustomResource):
1359
1423
  open_violation_on_expiration=True,
1360
1424
  close_violations_on_expiration=True,
1361
1425
  slide_by=30,
1362
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
1363
- query="SELECT average(duration) FROM Transaction where appName = 'Your App'",
1364
- ),
1365
- critical=newrelic.NrqlAlertConditionCriticalArgs(
1366
- operator="above",
1367
- threshold=5.5,
1368
- threshold_duration=300,
1369
- threshold_occurrences="ALL",
1370
- ),
1371
- warning=newrelic.NrqlAlertConditionWarningArgs(
1372
- operator="above",
1373
- threshold=3.5,
1374
- threshold_duration=600,
1375
- threshold_occurrences="ALL",
1376
- ))
1377
- my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
1426
+ nrql={
1427
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1428
+ },
1429
+ critical={
1430
+ "operator": "above",
1431
+ "threshold": 5.5,
1432
+ "threshold_duration": 300,
1433
+ "threshold_occurrences": "ALL",
1434
+ },
1435
+ warning={
1436
+ "operator": "above",
1437
+ "threshold": 3.5,
1438
+ "threshold_duration": 600,
1439
+ "threshold_occurrences": "ALL",
1440
+ })
1441
+ my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
1378
1442
  guid=foo_nrql_alert_condition.entity_guid,
1379
1443
  tags=[
1380
- newrelic.EntityTagsTagArgs(
1381
- key="my-key",
1382
- values=[
1444
+ {
1445
+ "key": "my-key",
1446
+ "values": [
1383
1447
  "my-value",
1384
1448
  "my-other-value",
1385
1449
  ],
1386
- ),
1387
- newrelic.EntityTagsTagArgs(
1388
- key="my-key-2",
1389
- values=["my-value-2"],
1390
- ),
1450
+ },
1451
+ {
1452
+ "key": "my-key-2",
1453
+ "values": ["my-value-2"],
1454
+ },
1391
1455
  ])
1392
1456
  ```
1393
- <!--End PulumiCodeChooser -->
1394
1457
 
1395
1458
  <small>alerts.newrelic.com/accounts/**\\<account_id\\>**/policies/**\\<policy_id\\>**/conditions/**\\<condition_id\\>**/edit</small>
1396
1459
 
@@ -1402,55 +1465,53 @@ class NrqlAlertCondition(pulumi.CustomResource):
1402
1465
 
1403
1466
  An example resource from 1.x might look like the following.
1404
1467
 
1405
- <!--Start PulumiCodeChooser -->
1406
1468
  ```python
1407
1469
  import pulumi
1408
1470
  import pulumi_newrelic as newrelic
1409
1471
 
1410
- nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
1411
- policy_id=newrelic_alert_policy["z"]["id"],
1472
+ z = newrelic.NrqlAlertCondition("z",
1473
+ policy_id=z_newrelic_alert_policy["id"],
1474
+ name="zleslie-test",
1412
1475
  type="static",
1413
1476
  runbook_url="https://localhost",
1414
1477
  enabled=True,
1415
1478
  violation_time_limit="TWENTY_FOUR_HOURS",
1416
- critical=newrelic.NrqlAlertConditionCriticalArgs(
1417
- operator="above",
1418
- threshold_duration=120,
1419
- threshold=3,
1420
- threshold_occurrences="AT_LEAST_ONCE",
1421
- ),
1422
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
1423
- query="SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1424
- ))
1479
+ critical={
1480
+ "operator": "above",
1481
+ "threshold_duration": 120,
1482
+ "threshold": 3,
1483
+ "threshold_occurrences": "AT_LEAST_ONCE",
1484
+ },
1485
+ nrql={
1486
+ "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1487
+ })
1425
1488
  ```
1426
- <!--End PulumiCodeChooser -->
1427
1489
 
1428
1490
  After making the appropriate adjustments mentioned in the deprecation warnings,
1429
1491
  the resource now looks like the following.
1430
1492
 
1431
- <!--Start PulumiCodeChooser -->
1432
1493
  ```python
1433
1494
  import pulumi
1434
1495
  import pulumi_newrelic as newrelic
1435
1496
 
1436
- nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
1437
- policy_id=newrelic_alert_policy["z"]["id"],
1497
+ z = newrelic.NrqlAlertCondition("z",
1498
+ policy_id=z_newrelic_alert_policy["id"],
1499
+ name="zleslie-test",
1438
1500
  type="static",
1439
1501
  runbook_url="https://localhost",
1440
1502
  enabled=True,
1441
1503
  violation_time_limit_seconds=86400,
1442
- terms=[newrelic.NrqlAlertConditionTermArgs(
1443
- priority="critical",
1444
- operator="above",
1445
- threshold=3,
1446
- duration=5,
1447
- time_function="any",
1448
- )],
1449
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
1450
- query="SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1451
- ))
1504
+ terms=[{
1505
+ "priority": "critical",
1506
+ "operator": "above",
1507
+ "threshold": 3,
1508
+ "duration": 5,
1509
+ "time_function": "any",
1510
+ }],
1511
+ nrql={
1512
+ "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1513
+ })
1452
1514
  ```
1453
- <!--End PulumiCodeChooser -->
1454
1515
 
1455
1516
  ## Import
1456
1517
 
@@ -1483,31 +1544,33 @@ class NrqlAlertCondition(pulumi.CustomResource):
1483
1544
  def _internal_init(__self__,
1484
1545
  resource_name: str,
1485
1546
  opts: Optional[pulumi.ResourceOptions] = None,
1486
- account_id: Optional[pulumi.Input[int]] = None,
1547
+ account_id: Optional[pulumi.Input[str]] = None,
1487
1548
  aggregation_delay: Optional[pulumi.Input[str]] = None,
1488
1549
  aggregation_method: Optional[pulumi.Input[str]] = None,
1489
1550
  aggregation_timer: Optional[pulumi.Input[str]] = None,
1490
1551
  aggregation_window: Optional[pulumi.Input[int]] = None,
1491
1552
  baseline_direction: Optional[pulumi.Input[str]] = None,
1492
1553
  close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
1493
- critical: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionCriticalArgs']]] = None,
1554
+ critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
1494
1555
  description: Optional[pulumi.Input[str]] = None,
1495
1556
  enabled: Optional[pulumi.Input[bool]] = None,
1496
1557
  evaluation_delay: Optional[pulumi.Input[int]] = None,
1497
1558
  expiration_duration: Optional[pulumi.Input[int]] = None,
1498
1559
  fill_option: Optional[pulumi.Input[str]] = None,
1499
1560
  fill_value: Optional[pulumi.Input[float]] = None,
1561
+ ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
1500
1562
  name: Optional[pulumi.Input[str]] = None,
1501
- nrql: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionNrqlArgs']]] = None,
1563
+ nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
1502
1564
  open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
1503
- policy_id: Optional[pulumi.Input[int]] = None,
1565
+ policy_id: Optional[pulumi.Input[str]] = None,
1504
1566
  runbook_url: Optional[pulumi.Input[str]] = None,
1505
1567
  slide_by: Optional[pulumi.Input[int]] = None,
1506
- terms: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NrqlAlertConditionTermArgs']]]]] = None,
1568
+ terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
1569
+ title_template: Optional[pulumi.Input[str]] = None,
1507
1570
  type: Optional[pulumi.Input[str]] = None,
1508
1571
  violation_time_limit: Optional[pulumi.Input[str]] = None,
1509
1572
  violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
1510
- warning: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionWarningArgs']]] = None,
1573
+ warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None,
1511
1574
  __props__=None):
1512
1575
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
1513
1576
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -1531,6 +1594,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
1531
1594
  __props__.__dict__["expiration_duration"] = expiration_duration
1532
1595
  __props__.__dict__["fill_option"] = fill_option
1533
1596
  __props__.__dict__["fill_value"] = fill_value
1597
+ __props__.__dict__["ignore_on_expected_termination"] = ignore_on_expected_termination
1534
1598
  __props__.__dict__["name"] = name
1535
1599
  if nrql is None and not opts.urn:
1536
1600
  raise TypeError("Missing required property 'nrql'")
@@ -1542,6 +1606,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
1542
1606
  __props__.__dict__["runbook_url"] = runbook_url
1543
1607
  __props__.__dict__["slide_by"] = slide_by
1544
1608
  __props__.__dict__["terms"] = terms
1609
+ __props__.__dict__["title_template"] = title_template
1545
1610
  __props__.__dict__["type"] = type
1546
1611
  __props__.__dict__["violation_time_limit"] = violation_time_limit
1547
1612
  __props__.__dict__["violation_time_limit_seconds"] = violation_time_limit_seconds
@@ -1557,14 +1622,14 @@ class NrqlAlertCondition(pulumi.CustomResource):
1557
1622
  def get(resource_name: str,
1558
1623
  id: pulumi.Input[str],
1559
1624
  opts: Optional[pulumi.ResourceOptions] = None,
1560
- account_id: Optional[pulumi.Input[int]] = None,
1625
+ account_id: Optional[pulumi.Input[str]] = None,
1561
1626
  aggregation_delay: Optional[pulumi.Input[str]] = None,
1562
1627
  aggregation_method: Optional[pulumi.Input[str]] = None,
1563
1628
  aggregation_timer: Optional[pulumi.Input[str]] = None,
1564
1629
  aggregation_window: Optional[pulumi.Input[int]] = None,
1565
1630
  baseline_direction: Optional[pulumi.Input[str]] = None,
1566
1631
  close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
1567
- critical: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionCriticalArgs']]] = None,
1632
+ critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
1568
1633
  description: Optional[pulumi.Input[str]] = None,
1569
1634
  enabled: Optional[pulumi.Input[bool]] = None,
1570
1635
  entity_guid: Optional[pulumi.Input[str]] = None,
@@ -1572,17 +1637,19 @@ class NrqlAlertCondition(pulumi.CustomResource):
1572
1637
  expiration_duration: Optional[pulumi.Input[int]] = None,
1573
1638
  fill_option: Optional[pulumi.Input[str]] = None,
1574
1639
  fill_value: Optional[pulumi.Input[float]] = None,
1640
+ ignore_on_expected_termination: Optional[pulumi.Input[bool]] = None,
1575
1641
  name: Optional[pulumi.Input[str]] = None,
1576
- nrql: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionNrqlArgs']]] = None,
1642
+ nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
1577
1643
  open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
1578
- policy_id: Optional[pulumi.Input[int]] = None,
1644
+ policy_id: Optional[pulumi.Input[str]] = None,
1579
1645
  runbook_url: Optional[pulumi.Input[str]] = None,
1580
1646
  slide_by: Optional[pulumi.Input[int]] = None,
1581
- terms: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NrqlAlertConditionTermArgs']]]]] = None,
1647
+ terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
1648
+ title_template: Optional[pulumi.Input[str]] = None,
1582
1649
  type: Optional[pulumi.Input[str]] = None,
1583
1650
  violation_time_limit: Optional[pulumi.Input[str]] = None,
1584
1651
  violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
1585
- warning: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionWarningArgs']]] = None) -> 'NrqlAlertCondition':
1652
+ warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None) -> 'NrqlAlertCondition':
1586
1653
  """
1587
1654
  Get an existing NrqlAlertCondition resource's state with the given name, id, and optional extra
1588
1655
  properties used to qualify the lookup.
@@ -1590,14 +1657,14 @@ class NrqlAlertCondition(pulumi.CustomResource):
1590
1657
  :param str resource_name: The unique name of the resulting resource.
1591
1658
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
1592
1659
  :param pulumi.ResourceOptions opts: Options for the resource.
1593
- :param pulumi.Input[int] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
1660
+ :param pulumi.Input[str] account_id: The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
1594
1661
  :param pulumi.Input[str] aggregation_delay: How long we wait for data that belongs in each aggregation window. Depending on your data, a longer delay may increase accuracy but delay notifications. Use `aggregation_delay` with the `event_flow` and `cadence` methods. The maximum delay is 1200 seconds (20 minutes) when using `event_flow` and 3600 seconds (60 minutes) when using `cadence`. In both cases, the minimum delay is 0 seconds and the default is 120 seconds. `aggregation_delay` cannot be set with `nrql.evaluation_offset`.
1595
1662
  :param pulumi.Input[str] aggregation_method: Determines when we consider an aggregation window to be complete so that we can evaluate the signal for incidents. Possible values are `cadence`, `event_flow` or `event_timer`. Default is `event_flow`. `aggregation_method` cannot be set with `nrql.evaluation_offset`.
1596
1663
  :param pulumi.Input[str] aggregation_timer: How long we wait after each data point arrives to make sure we've processed the whole batch. Use `aggregation_timer` with the `event_timer` method. The timer value can range from 0 seconds to 1200 seconds (20 minutes); the default is 60 seconds. `aggregation_timer` cannot be set with `nrql.evaluation_offset`.
1597
1664
  :param pulumi.Input[int] aggregation_window: The duration of the time window used to evaluate the NRQL query, in seconds. The value must be at least 30 seconds, and no more than 21600 seconds (6 hours). Default is 60 seconds.
1598
1665
  :param pulumi.Input[str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
1599
1666
  :param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
1600
- :param pulumi.Input[pulumi.InputType['NrqlAlertConditionCriticalArgs']] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
1667
+ :param pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
1601
1668
  :param pulumi.Input[str] description: The description of the NRQL alert condition.
1602
1669
  :param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
1603
1670
  :param pulumi.Input[str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
@@ -1605,19 +1672,21 @@ class NrqlAlertCondition(pulumi.CustomResource):
1605
1672
  :param pulumi.Input[int] expiration_duration: The amount of time (in seconds) to wait before considering the signal expired. The value must be at least 30 seconds, and no more than 172800 seconds (48 hours).
1606
1673
  :param pulumi.Input[str] fill_option: Which strategy to use when filling gaps in the signal. Possible values are `none`, `last_value` or `static`. If `static`, the `fill_value` field will be used for filling gaps in the signal.
1607
1674
  :param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
1675
+ :param pulumi.Input[bool] ignore_on_expected_termination: Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
1608
1676
  :param pulumi.Input[str] name: The title of the condition.
1609
- :param pulumi.Input[pulumi.InputType['NrqlAlertConditionNrqlArgs']] nrql: A NRQL query. See NRQL below for details.
1677
+ :param pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']] nrql: A NRQL query. See NRQL below for details.
1610
1678
  :param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
1611
- :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
1679
+ :param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
1612
1680
  :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
1613
1681
  :param pulumi.Input[int] slide_by: Gathers data in overlapping time windows to smooth the chart line, making it easier to spot trends. The `slide_by` value is specified in seconds and must be smaller than and a factor of the `aggregation_window`.
1614
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NrqlAlertConditionTermArgs']]]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
1682
+ :param pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]] terms: **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
1683
+ :param pulumi.Input[str] title_template: The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
1615
1684
  :param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
1616
1685
  :param pulumi.Input[str] violation_time_limit: **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
1617
1686
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1618
1687
  :param pulumi.Input[int] violation_time_limit_seconds: Sets a time limit, in seconds, that will automatically force-close a long-lasting incident after the time limit you select. The value must be between 300 seconds (5 minutes) to 2592000 seconds (30 days) (inclusive). <br>
1619
1688
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1620
- :param pulumi.Input[pulumi.InputType['NrqlAlertConditionWarningArgs']] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
1689
+ :param pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
1621
1690
  """
1622
1691
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
1623
1692
 
@@ -1638,6 +1707,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
1638
1707
  __props__.__dict__["expiration_duration"] = expiration_duration
1639
1708
  __props__.__dict__["fill_option"] = fill_option
1640
1709
  __props__.__dict__["fill_value"] = fill_value
1710
+ __props__.__dict__["ignore_on_expected_termination"] = ignore_on_expected_termination
1641
1711
  __props__.__dict__["name"] = name
1642
1712
  __props__.__dict__["nrql"] = nrql
1643
1713
  __props__.__dict__["open_violation_on_expiration"] = open_violation_on_expiration
@@ -1645,6 +1715,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
1645
1715
  __props__.__dict__["runbook_url"] = runbook_url
1646
1716
  __props__.__dict__["slide_by"] = slide_by
1647
1717
  __props__.__dict__["terms"] = terms
1718
+ __props__.__dict__["title_template"] = title_template
1648
1719
  __props__.__dict__["type"] = type
1649
1720
  __props__.__dict__["violation_time_limit"] = violation_time_limit
1650
1721
  __props__.__dict__["violation_time_limit_seconds"] = violation_time_limit_seconds
@@ -1653,7 +1724,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
1653
1724
 
1654
1725
  @property
1655
1726
  @pulumi.getter(name="accountId")
1656
- def account_id(self) -> pulumi.Output[int]:
1727
+ def account_id(self) -> pulumi.Output[str]:
1657
1728
  """
1658
1729
  The New Relic account ID of the account you wish to create the condition. Defaults to the account ID set in your environment variable `NEW_RELIC_ACCOUNT_ID`.
1659
1730
  """
@@ -1771,6 +1842,14 @@ class NrqlAlertCondition(pulumi.CustomResource):
1771
1842
  """
1772
1843
  return pulumi.get(self, "fill_value")
1773
1844
 
1845
+ @property
1846
+ @pulumi.getter(name="ignoreOnExpectedTermination")
1847
+ def ignore_on_expected_termination(self) -> pulumi.Output[Optional[bool]]:
1848
+ """
1849
+ Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
1850
+ """
1851
+ return pulumi.get(self, "ignore_on_expected_termination")
1852
+
1774
1853
  @property
1775
1854
  @pulumi.getter
1776
1855
  def name(self) -> pulumi.Output[str]:
@@ -1797,7 +1876,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
1797
1876
 
1798
1877
  @property
1799
1878
  @pulumi.getter(name="policyId")
1800
- def policy_id(self) -> pulumi.Output[int]:
1879
+ def policy_id(self) -> pulumi.Output[str]:
1801
1880
  """
1802
1881
  The ID of the policy where this condition should be used.
1803
1882
  """
@@ -1821,15 +1900,21 @@ class NrqlAlertCondition(pulumi.CustomResource):
1821
1900
 
1822
1901
  @property
1823
1902
  @pulumi.getter
1903
+ @_utilities.deprecated("""use `critical` and `warning` attributes instead""")
1824
1904
  def terms(self) -> pulumi.Output[Optional[Sequence['outputs.NrqlAlertConditionTerm']]]:
1825
1905
  """
1826
1906
  **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
1827
1907
  """
1828
- warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
1829
- pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
1830
-
1831
1908
  return pulumi.get(self, "terms")
1832
1909
 
1910
+ @property
1911
+ @pulumi.getter(name="titleTemplate")
1912
+ def title_template(self) -> pulumi.Output[Optional[str]]:
1913
+ """
1914
+ The custom title to be used when incidents are opened by the condition. Setting this field will override the default title. Must be [Handlebars](https://handlebarsjs.com/) format.
1915
+ """
1916
+ return pulumi.get(self, "title_template")
1917
+
1833
1918
  @property
1834
1919
  @pulumi.getter
1835
1920
  def type(self) -> pulumi.Output[Optional[str]]:
@@ -1840,14 +1925,12 @@ class NrqlAlertCondition(pulumi.CustomResource):
1840
1925
 
1841
1926
  @property
1842
1927
  @pulumi.getter(name="violationTimeLimit")
1928
+ @_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
1843
1929
  def violation_time_limit(self) -> pulumi.Output[str]:
1844
1930
  """
1845
1931
  **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
1846
1932
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1847
1933
  """
1848
- warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
1849
- pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
1850
-
1851
1934
  return pulumi.get(self, "violation_time_limit")
1852
1935
 
1853
1936
  @property