pulumi-newrelic 5.22.0__py3-none-any.whl → 5.58.0a1763707205__py3-none-any.whl

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

Potentially problematic release.


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

Files changed (92) hide show
  1. pulumi_newrelic/__init__.py +28 -1
  2. pulumi_newrelic/_inputs.py +10385 -2976
  3. pulumi_newrelic/_utilities.py +50 -10
  4. pulumi_newrelic/account_management.py +48 -42
  5. pulumi_newrelic/alert_channel.py +165 -175
  6. pulumi_newrelic/alert_condition.py +307 -319
  7. pulumi_newrelic/alert_muting_rule.py +193 -140
  8. pulumi_newrelic/alert_policy.py +121 -117
  9. pulumi_newrelic/alert_policy_channel.py +89 -79
  10. pulumi_newrelic/api_access_key.py +195 -193
  11. pulumi_newrelic/browser_application.py +120 -114
  12. pulumi_newrelic/cloud/__init__.py +3 -1
  13. pulumi_newrelic/cloud/_inputs.py +4267 -2714
  14. pulumi_newrelic/cloud/aws_govcloud_integrations.py +206 -196
  15. pulumi_newrelic/cloud/aws_govcloud_link_account.py +143 -228
  16. pulumi_newrelic/cloud/aws_integrations.py +510 -1490
  17. pulumi_newrelic/cloud/aws_link_account.py +80 -76
  18. pulumi_newrelic/cloud/azure_integrations.py +673 -587
  19. pulumi_newrelic/cloud/azure_link_account.py +121 -117
  20. pulumi_newrelic/cloud/gcp_integrations.py +428 -408
  21. pulumi_newrelic/cloud/gcp_link_account.py +65 -61
  22. pulumi_newrelic/cloud/oci_link_account.py +926 -0
  23. pulumi_newrelic/cloud/outputs.py +1678 -2321
  24. pulumi_newrelic/config/__init__.py +2 -1
  25. pulumi_newrelic/config/__init__.pyi +8 -3
  26. pulumi_newrelic/config/vars.py +22 -17
  27. pulumi_newrelic/data_partition_rule.py +119 -117
  28. pulumi_newrelic/entity_tags.py +111 -53
  29. pulumi_newrelic/events_to_metrics_rule.py +106 -102
  30. pulumi_newrelic/get_account.py +41 -33
  31. pulumi_newrelic/get_alert_channel.py +73 -28
  32. pulumi_newrelic/get_alert_policy.py +82 -33
  33. pulumi_newrelic/get_application.py +51 -43
  34. pulumi_newrelic/get_authentication_domain.py +27 -23
  35. pulumi_newrelic/get_cloud_account.py +43 -35
  36. pulumi_newrelic/get_entity.py +126 -183
  37. pulumi_newrelic/get_group.py +76 -31
  38. pulumi_newrelic/get_key_transaction.py +117 -42
  39. pulumi_newrelic/get_notification_destination.py +75 -38
  40. pulumi_newrelic/get_obfuscation_expression.py +47 -39
  41. pulumi_newrelic/get_service_level_alert_helper.py +189 -171
  42. pulumi_newrelic/get_test_grok_pattern.py +47 -36
  43. pulumi_newrelic/get_user.py +39 -31
  44. pulumi_newrelic/group.py +59 -199
  45. pulumi_newrelic/infra_alert_condition.py +399 -405
  46. pulumi_newrelic/insights/__init__.py +2 -1
  47. pulumi_newrelic/insights/_inputs.py +71 -28
  48. pulumi_newrelic/insights/event.py +54 -52
  49. pulumi_newrelic/insights/outputs.py +28 -23
  50. pulumi_newrelic/key_transaction.py +465 -0
  51. pulumi_newrelic/log_parsing_rule.py +159 -157
  52. pulumi_newrelic/monitor_downtime.py +311 -331
  53. pulumi_newrelic/notification_channel.py +534 -464
  54. pulumi_newrelic/notification_destination.py +238 -141
  55. pulumi_newrelic/nrql_alert_condition.py +820 -614
  56. pulumi_newrelic/nrql_drop_rule.py +113 -151
  57. pulumi_newrelic/obfuscation_expression.py +80 -76
  58. pulumi_newrelic/obfuscation_rule.py +115 -109
  59. pulumi_newrelic/one_dashboard.py +110 -104
  60. pulumi_newrelic/one_dashboard_json.py +69 -63
  61. pulumi_newrelic/one_dashboard_raw.py +212 -206
  62. pulumi_newrelic/outputs.py +4936 -2234
  63. pulumi_newrelic/pipeline_cloud_rule.py +335 -0
  64. pulumi_newrelic/plugins/__init__.py +2 -1
  65. pulumi_newrelic/plugins/_inputs.py +519 -89
  66. pulumi_newrelic/plugins/application_settings.py +463 -187
  67. pulumi_newrelic/plugins/outputs.py +336 -74
  68. pulumi_newrelic/plugins/workload.py +313 -189
  69. pulumi_newrelic/provider.py +156 -142
  70. pulumi_newrelic/pulumi-plugin.json +2 -1
  71. pulumi_newrelic/service_level.py +263 -263
  72. pulumi_newrelic/synthetics/__init__.py +2 -1
  73. pulumi_newrelic/synthetics/_inputs.py +265 -108
  74. pulumi_newrelic/synthetics/alert_condition.py +170 -180
  75. pulumi_newrelic/synthetics/broken_links_monitor.py +297 -249
  76. pulumi_newrelic/synthetics/cert_check_monitor.py +306 -258
  77. pulumi_newrelic/synthetics/get_private_location.py +51 -47
  78. pulumi_newrelic/synthetics/get_secure_credential.py +39 -31
  79. pulumi_newrelic/synthetics/monitor.py +658 -460
  80. pulumi_newrelic/synthetics/multi_location_alert_condition.py +211 -205
  81. pulumi_newrelic/synthetics/outputs.py +92 -87
  82. pulumi_newrelic/synthetics/private_location.py +118 -112
  83. pulumi_newrelic/synthetics/script_monitor.py +613 -373
  84. pulumi_newrelic/synthetics/secure_credential.py +97 -95
  85. pulumi_newrelic/synthetics/step_monitor.py +445 -275
  86. pulumi_newrelic/user.py +84 -80
  87. pulumi_newrelic/workflow.py +336 -322
  88. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +7 -6
  89. pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
  90. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
  91. pulumi_newrelic-5.22.0.dist-info/RECORD +0 -89
  92. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
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,57 +22,65 @@ __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,
22
- aggregation_delay: Optional[pulumi.Input[str]] = None,
23
- aggregation_method: Optional[pulumi.Input[str]] = None,
24
- aggregation_timer: Optional[pulumi.Input[str]] = None,
25
- aggregation_window: Optional[pulumi.Input[int]] = None,
26
- baseline_direction: Optional[pulumi.Input[str]] = None,
27
- close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
25
+ policy_id: pulumi.Input[_builtins.str],
26
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
27
+ aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
28
+ aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
29
+ aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
30
+ aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
31
+ baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
32
+ close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
28
33
  critical: Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']] = None,
29
- description: Optional[pulumi.Input[str]] = None,
30
- enabled: Optional[pulumi.Input[bool]] = None,
31
- evaluation_delay: Optional[pulumi.Input[int]] = None,
32
- expiration_duration: Optional[pulumi.Input[int]] = None,
33
- fill_option: Optional[pulumi.Input[str]] = None,
34
- fill_value: Optional[pulumi.Input[float]] = None,
35
- name: Optional[pulumi.Input[str]] = None,
36
- open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
37
- runbook_url: Optional[pulumi.Input[str]] = None,
38
- slide_by: Optional[pulumi.Input[int]] = None,
34
+ description: Optional[pulumi.Input[_builtins.str]] = None,
35
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
36
+ evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
37
+ expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
38
+ fill_option: Optional[pulumi.Input[_builtins.str]] = None,
39
+ fill_value: Optional[pulumi.Input[_builtins.float]] = None,
40
+ ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
41
+ name: Optional[pulumi.Input[_builtins.str]] = None,
42
+ open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
43
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
44
+ signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
45
+ slide_by: Optional[pulumi.Input[_builtins.int]] = None,
46
+ target_entity: Optional[pulumi.Input[_builtins.str]] = None,
39
47
  terms: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]] = None,
40
- type: Optional[pulumi.Input[str]] = None,
41
- violation_time_limit: Optional[pulumi.Input[str]] = None,
42
- violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
48
+ title_template: Optional[pulumi.Input[_builtins.str]] = None,
49
+ type: Optional[pulumi.Input[_builtins.str]] = None,
50
+ violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
51
+ violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
43
52
  warning: Optional[pulumi.Input['NrqlAlertConditionWarningArgs']] = None):
44
53
  """
45
54
  The set of arguments for constructing a NrqlAlertCondition resource.
46
55
  :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`.
49
- :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
- :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
- :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`.
52
- :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.
53
- :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).
54
- :param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
56
+ :param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
57
+ :param pulumi.Input[_builtins.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`.
58
+ :param pulumi.Input[_builtins.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`.
59
+ :param pulumi.Input[_builtins.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`.
60
+ :param pulumi.Input[_builtins.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`.
61
+ :param pulumi.Input[_builtins.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.
62
+ :param pulumi.Input[_builtins.str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
63
+ :param pulumi.Input[_builtins.bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
55
64
  :param pulumi.Input['NrqlAlertConditionCriticalArgs'] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
56
- :param pulumi.Input[str] description: The description of the NRQL alert condition.
57
- :param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
58
- :param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
59
- :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
- :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
- :param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
62
- :param pulumi.Input[str] name: The title of the condition.
63
- :param pulumi.Input[bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
64
- :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
65
- :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`.
65
+ :param pulumi.Input[_builtins.str] description: The description of the NRQL alert condition.
66
+ :param pulumi.Input[_builtins.bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
67
+ :param pulumi.Input[_builtins.int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
68
+ :param pulumi.Input[_builtins.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).
69
+ :param pulumi.Input[_builtins.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.
70
+ :param pulumi.Input[_builtins.float] fill_value: This value will be used for filling gaps in the signal.
71
+ :param pulumi.Input[_builtins.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.
72
+ :param pulumi.Input[_builtins.str] name: The title of the condition.
73
+ :param pulumi.Input[_builtins.bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
74
+ :param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
75
+ :param pulumi.Input[_builtins.str] signal_seasonality: Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
76
+ :param pulumi.Input[_builtins.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`.
77
+ :param pulumi.Input[_builtins.str] target_entity: BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
66
78
  :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.
67
- :param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
68
- :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>
79
+ :param pulumi.Input[_builtins.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.
80
+ :param pulumi.Input[_builtins.str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
81
+ :param pulumi.Input[_builtins.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
82
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
70
- :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>
83
+ :param pulumi.Input[_builtins.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>
71
84
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
72
85
  :param pulumi.Input['NrqlAlertConditionWarningArgs'] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
73
86
  """
@@ -101,19 +114,27 @@ class NrqlAlertConditionArgs:
101
114
  pulumi.set(__self__, "fill_option", fill_option)
102
115
  if fill_value is not None:
103
116
  pulumi.set(__self__, "fill_value", fill_value)
117
+ if ignore_on_expected_termination is not None:
118
+ pulumi.set(__self__, "ignore_on_expected_termination", ignore_on_expected_termination)
104
119
  if name is not None:
105
120
  pulumi.set(__self__, "name", name)
106
121
  if open_violation_on_expiration is not None:
107
122
  pulumi.set(__self__, "open_violation_on_expiration", open_violation_on_expiration)
108
123
  if runbook_url is not None:
109
124
  pulumi.set(__self__, "runbook_url", runbook_url)
125
+ if signal_seasonality is not None:
126
+ pulumi.set(__self__, "signal_seasonality", signal_seasonality)
110
127
  if slide_by is not None:
111
128
  pulumi.set(__self__, "slide_by", slide_by)
129
+ if target_entity is not None:
130
+ pulumi.set(__self__, "target_entity", target_entity)
112
131
  if terms is not None:
113
132
  warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
114
133
  pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
115
134
  if terms is not None:
116
135
  pulumi.set(__self__, "terms", terms)
136
+ if title_template is not None:
137
+ pulumi.set(__self__, "title_template", title_template)
117
138
  if type is not None:
118
139
  pulumi.set(__self__, "type", type)
119
140
  if violation_time_limit is not None:
@@ -126,7 +147,7 @@ class NrqlAlertConditionArgs:
126
147
  if warning is not None:
127
148
  pulumi.set(__self__, "warning", warning)
128
149
 
129
- @property
150
+ @_builtins.property
130
151
  @pulumi.getter
131
152
  def nrql(self) -> pulumi.Input['NrqlAlertConditionNrqlArgs']:
132
153
  """
@@ -138,103 +159,103 @@ class NrqlAlertConditionArgs:
138
159
  def nrql(self, value: pulumi.Input['NrqlAlertConditionNrqlArgs']):
139
160
  pulumi.set(self, "nrql", value)
140
161
 
141
- @property
162
+ @_builtins.property
142
163
  @pulumi.getter(name="policyId")
143
- def policy_id(self) -> pulumi.Input[int]:
164
+ def policy_id(self) -> pulumi.Input[_builtins.str]:
144
165
  """
145
166
  The ID of the policy where this condition should be used.
146
167
  """
147
168
  return pulumi.get(self, "policy_id")
148
169
 
149
170
  @policy_id.setter
150
- def policy_id(self, value: pulumi.Input[int]):
171
+ def policy_id(self, value: pulumi.Input[_builtins.str]):
151
172
  pulumi.set(self, "policy_id", value)
152
173
 
153
- @property
174
+ @_builtins.property
154
175
  @pulumi.getter(name="accountId")
155
- def account_id(self) -> Optional[pulumi.Input[int]]:
176
+ def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
156
177
  """
157
178
  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
179
  """
159
180
  return pulumi.get(self, "account_id")
160
181
 
161
182
  @account_id.setter
162
- def account_id(self, value: Optional[pulumi.Input[int]]):
183
+ def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
163
184
  pulumi.set(self, "account_id", value)
164
185
 
165
- @property
186
+ @_builtins.property
166
187
  @pulumi.getter(name="aggregationDelay")
167
- def aggregation_delay(self) -> Optional[pulumi.Input[str]]:
188
+ def aggregation_delay(self) -> Optional[pulumi.Input[_builtins.str]]:
168
189
  """
169
190
  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`.
170
191
  """
171
192
  return pulumi.get(self, "aggregation_delay")
172
193
 
173
194
  @aggregation_delay.setter
174
- def aggregation_delay(self, value: Optional[pulumi.Input[str]]):
195
+ def aggregation_delay(self, value: Optional[pulumi.Input[_builtins.str]]):
175
196
  pulumi.set(self, "aggregation_delay", value)
176
197
 
177
- @property
198
+ @_builtins.property
178
199
  @pulumi.getter(name="aggregationMethod")
179
- def aggregation_method(self) -> Optional[pulumi.Input[str]]:
200
+ def aggregation_method(self) -> Optional[pulumi.Input[_builtins.str]]:
180
201
  """
181
202
  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`.
182
203
  """
183
204
  return pulumi.get(self, "aggregation_method")
184
205
 
185
206
  @aggregation_method.setter
186
- def aggregation_method(self, value: Optional[pulumi.Input[str]]):
207
+ def aggregation_method(self, value: Optional[pulumi.Input[_builtins.str]]):
187
208
  pulumi.set(self, "aggregation_method", value)
188
209
 
189
- @property
210
+ @_builtins.property
190
211
  @pulumi.getter(name="aggregationTimer")
191
- def aggregation_timer(self) -> Optional[pulumi.Input[str]]:
212
+ def aggregation_timer(self) -> Optional[pulumi.Input[_builtins.str]]:
192
213
  """
193
214
  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`.
194
215
  """
195
216
  return pulumi.get(self, "aggregation_timer")
196
217
 
197
218
  @aggregation_timer.setter
198
- def aggregation_timer(self, value: Optional[pulumi.Input[str]]):
219
+ def aggregation_timer(self, value: Optional[pulumi.Input[_builtins.str]]):
199
220
  pulumi.set(self, "aggregation_timer", value)
200
221
 
201
- @property
222
+ @_builtins.property
202
223
  @pulumi.getter(name="aggregationWindow")
203
- def aggregation_window(self) -> Optional[pulumi.Input[int]]:
224
+ def aggregation_window(self) -> Optional[pulumi.Input[_builtins.int]]:
204
225
  """
205
226
  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.
206
227
  """
207
228
  return pulumi.get(self, "aggregation_window")
208
229
 
209
230
  @aggregation_window.setter
210
- def aggregation_window(self, value: Optional[pulumi.Input[int]]):
231
+ def aggregation_window(self, value: Optional[pulumi.Input[_builtins.int]]):
211
232
  pulumi.set(self, "aggregation_window", value)
212
233
 
213
- @property
234
+ @_builtins.property
214
235
  @pulumi.getter(name="baselineDirection")
215
- def baseline_direction(self) -> Optional[pulumi.Input[str]]:
236
+ def baseline_direction(self) -> Optional[pulumi.Input[_builtins.str]]:
216
237
  """
217
238
  The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
218
239
  """
219
240
  return pulumi.get(self, "baseline_direction")
220
241
 
221
242
  @baseline_direction.setter
222
- def baseline_direction(self, value: Optional[pulumi.Input[str]]):
243
+ def baseline_direction(self, value: Optional[pulumi.Input[_builtins.str]]):
223
244
  pulumi.set(self, "baseline_direction", value)
224
245
 
225
- @property
246
+ @_builtins.property
226
247
  @pulumi.getter(name="closeViolationsOnExpiration")
227
- def close_violations_on_expiration(self) -> Optional[pulumi.Input[bool]]:
248
+ def close_violations_on_expiration(self) -> Optional[pulumi.Input[_builtins.bool]]:
228
249
  """
229
250
  Whether to close all open incidents when the signal expires.
230
251
  """
231
252
  return pulumi.get(self, "close_violations_on_expiration")
232
253
 
233
254
  @close_violations_on_expiration.setter
234
- def close_violations_on_expiration(self, value: Optional[pulumi.Input[bool]]):
255
+ def close_violations_on_expiration(self, value: Optional[pulumi.Input[_builtins.bool]]):
235
256
  pulumi.set(self, "close_violations_on_expiration", value)
236
257
 
237
- @property
258
+ @_builtins.property
238
259
  @pulumi.getter
239
260
  def critical(self) -> Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']]:
240
261
  """
@@ -246,172 +267,216 @@ class NrqlAlertConditionArgs:
246
267
  def critical(self, value: Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']]):
247
268
  pulumi.set(self, "critical", value)
248
269
 
249
- @property
270
+ @_builtins.property
250
271
  @pulumi.getter
251
- def description(self) -> Optional[pulumi.Input[str]]:
272
+ def description(self) -> Optional[pulumi.Input[_builtins.str]]:
252
273
  """
253
274
  The description of the NRQL alert condition.
254
275
  """
255
276
  return pulumi.get(self, "description")
256
277
 
257
278
  @description.setter
258
- def description(self, value: Optional[pulumi.Input[str]]):
279
+ def description(self, value: Optional[pulumi.Input[_builtins.str]]):
259
280
  pulumi.set(self, "description", value)
260
281
 
261
- @property
282
+ @_builtins.property
262
283
  @pulumi.getter
263
- def enabled(self) -> Optional[pulumi.Input[bool]]:
284
+ def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
264
285
  """
265
286
  Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
266
287
  """
267
288
  return pulumi.get(self, "enabled")
268
289
 
269
290
  @enabled.setter
270
- def enabled(self, value: Optional[pulumi.Input[bool]]):
291
+ def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
271
292
  pulumi.set(self, "enabled", value)
272
293
 
273
- @property
294
+ @_builtins.property
274
295
  @pulumi.getter(name="evaluationDelay")
275
- def evaluation_delay(self) -> Optional[pulumi.Input[int]]:
296
+ def evaluation_delay(self) -> Optional[pulumi.Input[_builtins.int]]:
276
297
  """
277
298
  How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
278
299
  """
279
300
  return pulumi.get(self, "evaluation_delay")
280
301
 
281
302
  @evaluation_delay.setter
282
- def evaluation_delay(self, value: Optional[pulumi.Input[int]]):
303
+ def evaluation_delay(self, value: Optional[pulumi.Input[_builtins.int]]):
283
304
  pulumi.set(self, "evaluation_delay", value)
284
305
 
285
- @property
306
+ @_builtins.property
286
307
  @pulumi.getter(name="expirationDuration")
287
- def expiration_duration(self) -> Optional[pulumi.Input[int]]:
308
+ def expiration_duration(self) -> Optional[pulumi.Input[_builtins.int]]:
288
309
  """
289
310
  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).
290
311
  """
291
312
  return pulumi.get(self, "expiration_duration")
292
313
 
293
314
  @expiration_duration.setter
294
- def expiration_duration(self, value: Optional[pulumi.Input[int]]):
315
+ def expiration_duration(self, value: Optional[pulumi.Input[_builtins.int]]):
295
316
  pulumi.set(self, "expiration_duration", value)
296
317
 
297
- @property
318
+ @_builtins.property
298
319
  @pulumi.getter(name="fillOption")
299
- def fill_option(self) -> Optional[pulumi.Input[str]]:
320
+ def fill_option(self) -> Optional[pulumi.Input[_builtins.str]]:
300
321
  """
301
322
  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.
302
323
  """
303
324
  return pulumi.get(self, "fill_option")
304
325
 
305
326
  @fill_option.setter
306
- def fill_option(self, value: Optional[pulumi.Input[str]]):
327
+ def fill_option(self, value: Optional[pulumi.Input[_builtins.str]]):
307
328
  pulumi.set(self, "fill_option", value)
308
329
 
309
- @property
330
+ @_builtins.property
310
331
  @pulumi.getter(name="fillValue")
311
- def fill_value(self) -> Optional[pulumi.Input[float]]:
332
+ def fill_value(self) -> Optional[pulumi.Input[_builtins.float]]:
312
333
  """
313
334
  This value will be used for filling gaps in the signal.
314
335
  """
315
336
  return pulumi.get(self, "fill_value")
316
337
 
317
338
  @fill_value.setter
318
- def fill_value(self, value: Optional[pulumi.Input[float]]):
339
+ def fill_value(self, value: Optional[pulumi.Input[_builtins.float]]):
319
340
  pulumi.set(self, "fill_value", value)
320
341
 
321
- @property
342
+ @_builtins.property
343
+ @pulumi.getter(name="ignoreOnExpectedTermination")
344
+ def ignore_on_expected_termination(self) -> Optional[pulumi.Input[_builtins.bool]]:
345
+ """
346
+ Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
347
+ """
348
+ return pulumi.get(self, "ignore_on_expected_termination")
349
+
350
+ @ignore_on_expected_termination.setter
351
+ def ignore_on_expected_termination(self, value: Optional[pulumi.Input[_builtins.bool]]):
352
+ pulumi.set(self, "ignore_on_expected_termination", value)
353
+
354
+ @_builtins.property
322
355
  @pulumi.getter
323
- def name(self) -> Optional[pulumi.Input[str]]:
356
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
324
357
  """
325
358
  The title of the condition.
326
359
  """
327
360
  return pulumi.get(self, "name")
328
361
 
329
362
  @name.setter
330
- def name(self, value: Optional[pulumi.Input[str]]):
363
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
331
364
  pulumi.set(self, "name", value)
332
365
 
333
- @property
366
+ @_builtins.property
334
367
  @pulumi.getter(name="openViolationOnExpiration")
335
- def open_violation_on_expiration(self) -> Optional[pulumi.Input[bool]]:
368
+ def open_violation_on_expiration(self) -> Optional[pulumi.Input[_builtins.bool]]:
336
369
  """
337
370
  Whether to create a new incident to capture that the signal expired.
338
371
  """
339
372
  return pulumi.get(self, "open_violation_on_expiration")
340
373
 
341
374
  @open_violation_on_expiration.setter
342
- def open_violation_on_expiration(self, value: Optional[pulumi.Input[bool]]):
375
+ def open_violation_on_expiration(self, value: Optional[pulumi.Input[_builtins.bool]]):
343
376
  pulumi.set(self, "open_violation_on_expiration", value)
344
377
 
345
- @property
378
+ @_builtins.property
346
379
  @pulumi.getter(name="runbookUrl")
347
- def runbook_url(self) -> Optional[pulumi.Input[str]]:
380
+ def runbook_url(self) -> Optional[pulumi.Input[_builtins.str]]:
348
381
  """
349
382
  Runbook URL to display in notifications.
350
383
  """
351
384
  return pulumi.get(self, "runbook_url")
352
385
 
353
386
  @runbook_url.setter
354
- def runbook_url(self, value: Optional[pulumi.Input[str]]):
387
+ def runbook_url(self, value: Optional[pulumi.Input[_builtins.str]]):
355
388
  pulumi.set(self, "runbook_url", value)
356
389
 
357
- @property
390
+ @_builtins.property
391
+ @pulumi.getter(name="signalSeasonality")
392
+ def signal_seasonality(self) -> Optional[pulumi.Input[_builtins.str]]:
393
+ """
394
+ Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
395
+ """
396
+ return pulumi.get(self, "signal_seasonality")
397
+
398
+ @signal_seasonality.setter
399
+ def signal_seasonality(self, value: Optional[pulumi.Input[_builtins.str]]):
400
+ pulumi.set(self, "signal_seasonality", value)
401
+
402
+ @_builtins.property
358
403
  @pulumi.getter(name="slideBy")
359
- def slide_by(self) -> Optional[pulumi.Input[int]]:
404
+ def slide_by(self) -> Optional[pulumi.Input[_builtins.int]]:
360
405
  """
361
406
  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`.
362
407
  """
363
408
  return pulumi.get(self, "slide_by")
364
409
 
365
410
  @slide_by.setter
366
- def slide_by(self, value: Optional[pulumi.Input[int]]):
411
+ def slide_by(self, value: Optional[pulumi.Input[_builtins.int]]):
367
412
  pulumi.set(self, "slide_by", value)
368
413
 
369
- @property
414
+ @_builtins.property
415
+ @pulumi.getter(name="targetEntity")
416
+ def target_entity(self) -> Optional[pulumi.Input[_builtins.str]]:
417
+ """
418
+ BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
419
+ """
420
+ return pulumi.get(self, "target_entity")
421
+
422
+ @target_entity.setter
423
+ def target_entity(self, value: Optional[pulumi.Input[_builtins.str]]):
424
+ pulumi.set(self, "target_entity", value)
425
+
426
+ @_builtins.property
370
427
  @pulumi.getter
428
+ @_utilities.deprecated("""use `critical` and `warning` attributes instead""")
371
429
  def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
372
430
  """
373
431
  **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
374
432
  """
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
433
  return pulumi.get(self, "terms")
379
434
 
380
435
  @terms.setter
381
436
  def terms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]):
382
437
  pulumi.set(self, "terms", value)
383
438
 
384
- @property
439
+ @_builtins.property
440
+ @pulumi.getter(name="titleTemplate")
441
+ def title_template(self) -> Optional[pulumi.Input[_builtins.str]]:
442
+ """
443
+ 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.
444
+ """
445
+ return pulumi.get(self, "title_template")
446
+
447
+ @title_template.setter
448
+ def title_template(self, value: Optional[pulumi.Input[_builtins.str]]):
449
+ pulumi.set(self, "title_template", value)
450
+
451
+ @_builtins.property
385
452
  @pulumi.getter
386
- def type(self) -> Optional[pulumi.Input[str]]:
453
+ def type(self) -> Optional[pulumi.Input[_builtins.str]]:
387
454
  """
388
455
  The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
389
456
  """
390
457
  return pulumi.get(self, "type")
391
458
 
392
459
  @type.setter
393
- def type(self, value: Optional[pulumi.Input[str]]):
460
+ def type(self, value: Optional[pulumi.Input[_builtins.str]]):
394
461
  pulumi.set(self, "type", value)
395
462
 
396
- @property
463
+ @_builtins.property
397
464
  @pulumi.getter(name="violationTimeLimit")
398
- def violation_time_limit(self) -> Optional[pulumi.Input[str]]:
465
+ @_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
466
+ def violation_time_limit(self) -> Optional[pulumi.Input[_builtins.str]]:
399
467
  """
400
468
  **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
469
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
402
470
  """
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
471
  return pulumi.get(self, "violation_time_limit")
407
472
 
408
473
  @violation_time_limit.setter
409
- def violation_time_limit(self, value: Optional[pulumi.Input[str]]):
474
+ def violation_time_limit(self, value: Optional[pulumi.Input[_builtins.str]]):
410
475
  pulumi.set(self, "violation_time_limit", value)
411
476
 
412
- @property
477
+ @_builtins.property
413
478
  @pulumi.getter(name="violationTimeLimitSeconds")
414
- def violation_time_limit_seconds(self) -> Optional[pulumi.Input[int]]:
479
+ def violation_time_limit_seconds(self) -> Optional[pulumi.Input[_builtins.int]]:
415
480
  """
416
481
  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>
417
482
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
@@ -419,10 +484,10 @@ class NrqlAlertConditionArgs:
419
484
  return pulumi.get(self, "violation_time_limit_seconds")
420
485
 
421
486
  @violation_time_limit_seconds.setter
422
- def violation_time_limit_seconds(self, value: Optional[pulumi.Input[int]]):
487
+ def violation_time_limit_seconds(self, value: Optional[pulumi.Input[_builtins.int]]):
423
488
  pulumi.set(self, "violation_time_limit_seconds", value)
424
489
 
425
- @property
490
+ @_builtins.property
426
491
  @pulumi.getter
427
492
  def warning(self) -> Optional[pulumi.Input['NrqlAlertConditionWarningArgs']]:
428
493
  """
@@ -438,60 +503,68 @@ class NrqlAlertConditionArgs:
438
503
  @pulumi.input_type
439
504
  class _NrqlAlertConditionState:
440
505
  def __init__(__self__, *,
441
- account_id: Optional[pulumi.Input[int]] = None,
442
- aggregation_delay: Optional[pulumi.Input[str]] = None,
443
- aggregation_method: Optional[pulumi.Input[str]] = None,
444
- aggregation_timer: Optional[pulumi.Input[str]] = None,
445
- aggregation_window: Optional[pulumi.Input[int]] = None,
446
- baseline_direction: Optional[pulumi.Input[str]] = None,
447
- close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
506
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
507
+ aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
508
+ aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
509
+ aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
510
+ aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
511
+ baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
512
+ close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
448
513
  critical: Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']] = None,
449
- description: Optional[pulumi.Input[str]] = None,
450
- enabled: Optional[pulumi.Input[bool]] = None,
451
- entity_guid: Optional[pulumi.Input[str]] = None,
452
- evaluation_delay: Optional[pulumi.Input[int]] = None,
453
- expiration_duration: Optional[pulumi.Input[int]] = None,
454
- fill_option: Optional[pulumi.Input[str]] = None,
455
- fill_value: Optional[pulumi.Input[float]] = None,
456
- name: Optional[pulumi.Input[str]] = None,
514
+ description: Optional[pulumi.Input[_builtins.str]] = None,
515
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
516
+ entity_guid: Optional[pulumi.Input[_builtins.str]] = None,
517
+ evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
518
+ expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
519
+ fill_option: Optional[pulumi.Input[_builtins.str]] = None,
520
+ fill_value: Optional[pulumi.Input[_builtins.float]] = None,
521
+ ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
522
+ name: Optional[pulumi.Input[_builtins.str]] = None,
457
523
  nrql: Optional[pulumi.Input['NrqlAlertConditionNrqlArgs']] = None,
458
- open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
459
- policy_id: Optional[pulumi.Input[int]] = None,
460
- runbook_url: Optional[pulumi.Input[str]] = None,
461
- slide_by: Optional[pulumi.Input[int]] = None,
524
+ open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
525
+ policy_id: Optional[pulumi.Input[_builtins.str]] = None,
526
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
527
+ signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
528
+ slide_by: Optional[pulumi.Input[_builtins.int]] = None,
529
+ target_entity: Optional[pulumi.Input[_builtins.str]] = None,
462
530
  terms: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]] = None,
463
- type: Optional[pulumi.Input[str]] = None,
464
- violation_time_limit: Optional[pulumi.Input[str]] = None,
465
- violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
531
+ title_template: Optional[pulumi.Input[_builtins.str]] = None,
532
+ type: Optional[pulumi.Input[_builtins.str]] = None,
533
+ violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
534
+ violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
466
535
  warning: Optional[pulumi.Input['NrqlAlertConditionWarningArgs']] = None):
467
536
  """
468
537
  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`.
470
- :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
- :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
- :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`.
473
- :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.
474
- :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).
475
- :param pulumi.Input[bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
538
+ :param pulumi.Input[_builtins.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`.
539
+ :param pulumi.Input[_builtins.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`.
540
+ :param pulumi.Input[_builtins.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`.
541
+ :param pulumi.Input[_builtins.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`.
542
+ :param pulumi.Input[_builtins.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.
543
+ :param pulumi.Input[_builtins.str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
544
+ :param pulumi.Input[_builtins.bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
476
545
  :param pulumi.Input['NrqlAlertConditionCriticalArgs'] critical: A list containing the `critical` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
477
- :param pulumi.Input[str] description: The description of the NRQL alert condition.
478
- :param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
479
- :param pulumi.Input[str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
480
- :param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
481
- :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
- :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
- :param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
484
- :param pulumi.Input[str] name: The title of the condition.
546
+ :param pulumi.Input[_builtins.str] description: The description of the NRQL alert condition.
547
+ :param pulumi.Input[_builtins.bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
548
+ :param pulumi.Input[_builtins.str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
549
+ :param pulumi.Input[_builtins.int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
550
+ :param pulumi.Input[_builtins.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).
551
+ :param pulumi.Input[_builtins.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.
552
+ :param pulumi.Input[_builtins.float] fill_value: This value will be used for filling gaps in the signal.
553
+ :param pulumi.Input[_builtins.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.
554
+ :param pulumi.Input[_builtins.str] name: The title of the condition.
485
555
  :param pulumi.Input['NrqlAlertConditionNrqlArgs'] nrql: A NRQL query. See NRQL below for details.
486
- :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.
488
- :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
489
- :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`.
556
+ :param pulumi.Input[_builtins.bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
557
+ :param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
558
+ :param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
559
+ :param pulumi.Input[_builtins.str] signal_seasonality: Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
560
+ :param pulumi.Input[_builtins.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`.
561
+ :param pulumi.Input[_builtins.str] target_entity: BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
490
562
  :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.
491
- :param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
492
- :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>
563
+ :param pulumi.Input[_builtins.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.
564
+ :param pulumi.Input[_builtins.str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
565
+ :param pulumi.Input[_builtins.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
566
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
494
- :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>
567
+ :param pulumi.Input[_builtins.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>
495
568
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
496
569
  :param pulumi.Input['NrqlAlertConditionWarningArgs'] warning: A list containing the `warning` threshold values. At least one `critical` or `warning` threshold must be defined. See Terms below for details.
497
570
  """
@@ -525,6 +598,8 @@ class _NrqlAlertConditionState:
525
598
  pulumi.set(__self__, "fill_option", fill_option)
526
599
  if fill_value is not None:
527
600
  pulumi.set(__self__, "fill_value", fill_value)
601
+ if ignore_on_expected_termination is not None:
602
+ pulumi.set(__self__, "ignore_on_expected_termination", ignore_on_expected_termination)
528
603
  if name is not None:
529
604
  pulumi.set(__self__, "name", name)
530
605
  if nrql is not None:
@@ -535,13 +610,19 @@ class _NrqlAlertConditionState:
535
610
  pulumi.set(__self__, "policy_id", policy_id)
536
611
  if runbook_url is not None:
537
612
  pulumi.set(__self__, "runbook_url", runbook_url)
613
+ if signal_seasonality is not None:
614
+ pulumi.set(__self__, "signal_seasonality", signal_seasonality)
538
615
  if slide_by is not None:
539
616
  pulumi.set(__self__, "slide_by", slide_by)
617
+ if target_entity is not None:
618
+ pulumi.set(__self__, "target_entity", target_entity)
540
619
  if terms is not None:
541
620
  warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
542
621
  pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
543
622
  if terms is not None:
544
623
  pulumi.set(__self__, "terms", terms)
624
+ if title_template is not None:
625
+ pulumi.set(__self__, "title_template", title_template)
545
626
  if type is not None:
546
627
  pulumi.set(__self__, "type", type)
547
628
  if violation_time_limit is not None:
@@ -554,91 +635,91 @@ class _NrqlAlertConditionState:
554
635
  if warning is not None:
555
636
  pulumi.set(__self__, "warning", warning)
556
637
 
557
- @property
638
+ @_builtins.property
558
639
  @pulumi.getter(name="accountId")
559
- def account_id(self) -> Optional[pulumi.Input[int]]:
640
+ def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
560
641
  """
561
642
  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
643
  """
563
644
  return pulumi.get(self, "account_id")
564
645
 
565
646
  @account_id.setter
566
- def account_id(self, value: Optional[pulumi.Input[int]]):
647
+ def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
567
648
  pulumi.set(self, "account_id", value)
568
649
 
569
- @property
650
+ @_builtins.property
570
651
  @pulumi.getter(name="aggregationDelay")
571
- def aggregation_delay(self) -> Optional[pulumi.Input[str]]:
652
+ def aggregation_delay(self) -> Optional[pulumi.Input[_builtins.str]]:
572
653
  """
573
654
  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`.
574
655
  """
575
656
  return pulumi.get(self, "aggregation_delay")
576
657
 
577
658
  @aggregation_delay.setter
578
- def aggregation_delay(self, value: Optional[pulumi.Input[str]]):
659
+ def aggregation_delay(self, value: Optional[pulumi.Input[_builtins.str]]):
579
660
  pulumi.set(self, "aggregation_delay", value)
580
661
 
581
- @property
662
+ @_builtins.property
582
663
  @pulumi.getter(name="aggregationMethod")
583
- def aggregation_method(self) -> Optional[pulumi.Input[str]]:
664
+ def aggregation_method(self) -> Optional[pulumi.Input[_builtins.str]]:
584
665
  """
585
666
  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`.
586
667
  """
587
668
  return pulumi.get(self, "aggregation_method")
588
669
 
589
670
  @aggregation_method.setter
590
- def aggregation_method(self, value: Optional[pulumi.Input[str]]):
671
+ def aggregation_method(self, value: Optional[pulumi.Input[_builtins.str]]):
591
672
  pulumi.set(self, "aggregation_method", value)
592
673
 
593
- @property
674
+ @_builtins.property
594
675
  @pulumi.getter(name="aggregationTimer")
595
- def aggregation_timer(self) -> Optional[pulumi.Input[str]]:
676
+ def aggregation_timer(self) -> Optional[pulumi.Input[_builtins.str]]:
596
677
  """
597
678
  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`.
598
679
  """
599
680
  return pulumi.get(self, "aggregation_timer")
600
681
 
601
682
  @aggregation_timer.setter
602
- def aggregation_timer(self, value: Optional[pulumi.Input[str]]):
683
+ def aggregation_timer(self, value: Optional[pulumi.Input[_builtins.str]]):
603
684
  pulumi.set(self, "aggregation_timer", value)
604
685
 
605
- @property
686
+ @_builtins.property
606
687
  @pulumi.getter(name="aggregationWindow")
607
- def aggregation_window(self) -> Optional[pulumi.Input[int]]:
688
+ def aggregation_window(self) -> Optional[pulumi.Input[_builtins.int]]:
608
689
  """
609
690
  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.
610
691
  """
611
692
  return pulumi.get(self, "aggregation_window")
612
693
 
613
694
  @aggregation_window.setter
614
- def aggregation_window(self, value: Optional[pulumi.Input[int]]):
695
+ def aggregation_window(self, value: Optional[pulumi.Input[_builtins.int]]):
615
696
  pulumi.set(self, "aggregation_window", value)
616
697
 
617
- @property
698
+ @_builtins.property
618
699
  @pulumi.getter(name="baselineDirection")
619
- def baseline_direction(self) -> Optional[pulumi.Input[str]]:
700
+ def baseline_direction(self) -> Optional[pulumi.Input[_builtins.str]]:
620
701
  """
621
702
  The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
622
703
  """
623
704
  return pulumi.get(self, "baseline_direction")
624
705
 
625
706
  @baseline_direction.setter
626
- def baseline_direction(self, value: Optional[pulumi.Input[str]]):
707
+ def baseline_direction(self, value: Optional[pulumi.Input[_builtins.str]]):
627
708
  pulumi.set(self, "baseline_direction", value)
628
709
 
629
- @property
710
+ @_builtins.property
630
711
  @pulumi.getter(name="closeViolationsOnExpiration")
631
- def close_violations_on_expiration(self) -> Optional[pulumi.Input[bool]]:
712
+ def close_violations_on_expiration(self) -> Optional[pulumi.Input[_builtins.bool]]:
632
713
  """
633
714
  Whether to close all open incidents when the signal expires.
634
715
  """
635
716
  return pulumi.get(self, "close_violations_on_expiration")
636
717
 
637
718
  @close_violations_on_expiration.setter
638
- def close_violations_on_expiration(self, value: Optional[pulumi.Input[bool]]):
719
+ def close_violations_on_expiration(self, value: Optional[pulumi.Input[_builtins.bool]]):
639
720
  pulumi.set(self, "close_violations_on_expiration", value)
640
721
 
641
- @property
722
+ @_builtins.property
642
723
  @pulumi.getter
643
724
  def critical(self) -> Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']]:
644
725
  """
@@ -650,103 +731,115 @@ class _NrqlAlertConditionState:
650
731
  def critical(self, value: Optional[pulumi.Input['NrqlAlertConditionCriticalArgs']]):
651
732
  pulumi.set(self, "critical", value)
652
733
 
653
- @property
734
+ @_builtins.property
654
735
  @pulumi.getter
655
- def description(self) -> Optional[pulumi.Input[str]]:
736
+ def description(self) -> Optional[pulumi.Input[_builtins.str]]:
656
737
  """
657
738
  The description of the NRQL alert condition.
658
739
  """
659
740
  return pulumi.get(self, "description")
660
741
 
661
742
  @description.setter
662
- def description(self, value: Optional[pulumi.Input[str]]):
743
+ def description(self, value: Optional[pulumi.Input[_builtins.str]]):
663
744
  pulumi.set(self, "description", value)
664
745
 
665
- @property
746
+ @_builtins.property
666
747
  @pulumi.getter
667
- def enabled(self) -> Optional[pulumi.Input[bool]]:
748
+ def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
668
749
  """
669
750
  Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
670
751
  """
671
752
  return pulumi.get(self, "enabled")
672
753
 
673
754
  @enabled.setter
674
- def enabled(self, value: Optional[pulumi.Input[bool]]):
755
+ def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
675
756
  pulumi.set(self, "enabled", value)
676
757
 
677
- @property
758
+ @_builtins.property
678
759
  @pulumi.getter(name="entityGuid")
679
- def entity_guid(self) -> Optional[pulumi.Input[str]]:
760
+ def entity_guid(self) -> Optional[pulumi.Input[_builtins.str]]:
680
761
  """
681
762
  The unique entity identifier of the NRQL Condition in New Relic.
682
763
  """
683
764
  return pulumi.get(self, "entity_guid")
684
765
 
685
766
  @entity_guid.setter
686
- def entity_guid(self, value: Optional[pulumi.Input[str]]):
767
+ def entity_guid(self, value: Optional[pulumi.Input[_builtins.str]]):
687
768
  pulumi.set(self, "entity_guid", value)
688
769
 
689
- @property
770
+ @_builtins.property
690
771
  @pulumi.getter(name="evaluationDelay")
691
- def evaluation_delay(self) -> Optional[pulumi.Input[int]]:
772
+ def evaluation_delay(self) -> Optional[pulumi.Input[_builtins.int]]:
692
773
  """
693
774
  How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
694
775
  """
695
776
  return pulumi.get(self, "evaluation_delay")
696
777
 
697
778
  @evaluation_delay.setter
698
- def evaluation_delay(self, value: Optional[pulumi.Input[int]]):
779
+ def evaluation_delay(self, value: Optional[pulumi.Input[_builtins.int]]):
699
780
  pulumi.set(self, "evaluation_delay", value)
700
781
 
701
- @property
782
+ @_builtins.property
702
783
  @pulumi.getter(name="expirationDuration")
703
- def expiration_duration(self) -> Optional[pulumi.Input[int]]:
784
+ def expiration_duration(self) -> Optional[pulumi.Input[_builtins.int]]:
704
785
  """
705
786
  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).
706
787
  """
707
788
  return pulumi.get(self, "expiration_duration")
708
789
 
709
790
  @expiration_duration.setter
710
- def expiration_duration(self, value: Optional[pulumi.Input[int]]):
791
+ def expiration_duration(self, value: Optional[pulumi.Input[_builtins.int]]):
711
792
  pulumi.set(self, "expiration_duration", value)
712
793
 
713
- @property
794
+ @_builtins.property
714
795
  @pulumi.getter(name="fillOption")
715
- def fill_option(self) -> Optional[pulumi.Input[str]]:
796
+ def fill_option(self) -> Optional[pulumi.Input[_builtins.str]]:
716
797
  """
717
798
  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.
718
799
  """
719
800
  return pulumi.get(self, "fill_option")
720
801
 
721
802
  @fill_option.setter
722
- def fill_option(self, value: Optional[pulumi.Input[str]]):
803
+ def fill_option(self, value: Optional[pulumi.Input[_builtins.str]]):
723
804
  pulumi.set(self, "fill_option", value)
724
805
 
725
- @property
806
+ @_builtins.property
726
807
  @pulumi.getter(name="fillValue")
727
- def fill_value(self) -> Optional[pulumi.Input[float]]:
808
+ def fill_value(self) -> Optional[pulumi.Input[_builtins.float]]:
728
809
  """
729
810
  This value will be used for filling gaps in the signal.
730
811
  """
731
812
  return pulumi.get(self, "fill_value")
732
813
 
733
814
  @fill_value.setter
734
- def fill_value(self, value: Optional[pulumi.Input[float]]):
815
+ def fill_value(self, value: Optional[pulumi.Input[_builtins.float]]):
735
816
  pulumi.set(self, "fill_value", value)
736
817
 
737
- @property
818
+ @_builtins.property
819
+ @pulumi.getter(name="ignoreOnExpectedTermination")
820
+ def ignore_on_expected_termination(self) -> Optional[pulumi.Input[_builtins.bool]]:
821
+ """
822
+ Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
823
+ """
824
+ return pulumi.get(self, "ignore_on_expected_termination")
825
+
826
+ @ignore_on_expected_termination.setter
827
+ def ignore_on_expected_termination(self, value: Optional[pulumi.Input[_builtins.bool]]):
828
+ pulumi.set(self, "ignore_on_expected_termination", value)
829
+
830
+ @_builtins.property
738
831
  @pulumi.getter
739
- def name(self) -> Optional[pulumi.Input[str]]:
832
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
740
833
  """
741
834
  The title of the condition.
742
835
  """
743
836
  return pulumi.get(self, "name")
744
837
 
745
838
  @name.setter
746
- def name(self, value: Optional[pulumi.Input[str]]):
839
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
747
840
  pulumi.set(self, "name", value)
748
841
 
749
- @property
842
+ @_builtins.property
750
843
  @pulumi.getter
751
844
  def nrql(self) -> Optional[pulumi.Input['NrqlAlertConditionNrqlArgs']]:
752
845
  """
@@ -758,100 +851,132 @@ class _NrqlAlertConditionState:
758
851
  def nrql(self, value: Optional[pulumi.Input['NrqlAlertConditionNrqlArgs']]):
759
852
  pulumi.set(self, "nrql", value)
760
853
 
761
- @property
854
+ @_builtins.property
762
855
  @pulumi.getter(name="openViolationOnExpiration")
763
- def open_violation_on_expiration(self) -> Optional[pulumi.Input[bool]]:
856
+ def open_violation_on_expiration(self) -> Optional[pulumi.Input[_builtins.bool]]:
764
857
  """
765
858
  Whether to create a new incident to capture that the signal expired.
766
859
  """
767
860
  return pulumi.get(self, "open_violation_on_expiration")
768
861
 
769
862
  @open_violation_on_expiration.setter
770
- def open_violation_on_expiration(self, value: Optional[pulumi.Input[bool]]):
863
+ def open_violation_on_expiration(self, value: Optional[pulumi.Input[_builtins.bool]]):
771
864
  pulumi.set(self, "open_violation_on_expiration", value)
772
865
 
773
- @property
866
+ @_builtins.property
774
867
  @pulumi.getter(name="policyId")
775
- def policy_id(self) -> Optional[pulumi.Input[int]]:
868
+ def policy_id(self) -> Optional[pulumi.Input[_builtins.str]]:
776
869
  """
777
870
  The ID of the policy where this condition should be used.
778
871
  """
779
872
  return pulumi.get(self, "policy_id")
780
873
 
781
874
  @policy_id.setter
782
- def policy_id(self, value: Optional[pulumi.Input[int]]):
875
+ def policy_id(self, value: Optional[pulumi.Input[_builtins.str]]):
783
876
  pulumi.set(self, "policy_id", value)
784
877
 
785
- @property
878
+ @_builtins.property
786
879
  @pulumi.getter(name="runbookUrl")
787
- def runbook_url(self) -> Optional[pulumi.Input[str]]:
880
+ def runbook_url(self) -> Optional[pulumi.Input[_builtins.str]]:
788
881
  """
789
882
  Runbook URL to display in notifications.
790
883
  """
791
884
  return pulumi.get(self, "runbook_url")
792
885
 
793
886
  @runbook_url.setter
794
- def runbook_url(self, value: Optional[pulumi.Input[str]]):
887
+ def runbook_url(self, value: Optional[pulumi.Input[_builtins.str]]):
795
888
  pulumi.set(self, "runbook_url", value)
796
889
 
797
- @property
890
+ @_builtins.property
891
+ @pulumi.getter(name="signalSeasonality")
892
+ def signal_seasonality(self) -> Optional[pulumi.Input[_builtins.str]]:
893
+ """
894
+ Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
895
+ """
896
+ return pulumi.get(self, "signal_seasonality")
897
+
898
+ @signal_seasonality.setter
899
+ def signal_seasonality(self, value: Optional[pulumi.Input[_builtins.str]]):
900
+ pulumi.set(self, "signal_seasonality", value)
901
+
902
+ @_builtins.property
798
903
  @pulumi.getter(name="slideBy")
799
- def slide_by(self) -> Optional[pulumi.Input[int]]:
904
+ def slide_by(self) -> Optional[pulumi.Input[_builtins.int]]:
800
905
  """
801
906
  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`.
802
907
  """
803
908
  return pulumi.get(self, "slide_by")
804
909
 
805
910
  @slide_by.setter
806
- def slide_by(self, value: Optional[pulumi.Input[int]]):
911
+ def slide_by(self, value: Optional[pulumi.Input[_builtins.int]]):
807
912
  pulumi.set(self, "slide_by", value)
808
913
 
809
- @property
914
+ @_builtins.property
915
+ @pulumi.getter(name="targetEntity")
916
+ def target_entity(self) -> Optional[pulumi.Input[_builtins.str]]:
917
+ """
918
+ BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
919
+ """
920
+ return pulumi.get(self, "target_entity")
921
+
922
+ @target_entity.setter
923
+ def target_entity(self, value: Optional[pulumi.Input[_builtins.str]]):
924
+ pulumi.set(self, "target_entity", value)
925
+
926
+ @_builtins.property
810
927
  @pulumi.getter
928
+ @_utilities.deprecated("""use `critical` and `warning` attributes instead""")
811
929
  def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
812
930
  """
813
931
  **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
814
932
  """
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
933
  return pulumi.get(self, "terms")
819
934
 
820
935
  @terms.setter
821
936
  def terms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]):
822
937
  pulumi.set(self, "terms", value)
823
938
 
824
- @property
939
+ @_builtins.property
940
+ @pulumi.getter(name="titleTemplate")
941
+ def title_template(self) -> Optional[pulumi.Input[_builtins.str]]:
942
+ """
943
+ 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.
944
+ """
945
+ return pulumi.get(self, "title_template")
946
+
947
+ @title_template.setter
948
+ def title_template(self, value: Optional[pulumi.Input[_builtins.str]]):
949
+ pulumi.set(self, "title_template", value)
950
+
951
+ @_builtins.property
825
952
  @pulumi.getter
826
- def type(self) -> Optional[pulumi.Input[str]]:
953
+ def type(self) -> Optional[pulumi.Input[_builtins.str]]:
827
954
  """
828
955
  The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
829
956
  """
830
957
  return pulumi.get(self, "type")
831
958
 
832
959
  @type.setter
833
- def type(self, value: Optional[pulumi.Input[str]]):
960
+ def type(self, value: Optional[pulumi.Input[_builtins.str]]):
834
961
  pulumi.set(self, "type", value)
835
962
 
836
- @property
963
+ @_builtins.property
837
964
  @pulumi.getter(name="violationTimeLimit")
838
- def violation_time_limit(self) -> Optional[pulumi.Input[str]]:
965
+ @_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
966
+ def violation_time_limit(self) -> Optional[pulumi.Input[_builtins.str]]:
839
967
  """
840
968
  **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
969
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
842
970
  """
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
971
  return pulumi.get(self, "violation_time_limit")
847
972
 
848
973
  @violation_time_limit.setter
849
- def violation_time_limit(self, value: Optional[pulumi.Input[str]]):
974
+ def violation_time_limit(self, value: Optional[pulumi.Input[_builtins.str]]):
850
975
  pulumi.set(self, "violation_time_limit", value)
851
976
 
852
- @property
977
+ @_builtins.property
853
978
  @pulumi.getter(name="violationTimeLimitSeconds")
854
- def violation_time_limit_seconds(self) -> Optional[pulumi.Input[int]]:
979
+ def violation_time_limit_seconds(self) -> Optional[pulumi.Input[_builtins.int]]:
855
980
  """
856
981
  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>
857
982
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
@@ -859,10 +984,10 @@ class _NrqlAlertConditionState:
859
984
  return pulumi.get(self, "violation_time_limit_seconds")
860
985
 
861
986
  @violation_time_limit_seconds.setter
862
- def violation_time_limit_seconds(self, value: Optional[pulumi.Input[int]]):
987
+ def violation_time_limit_seconds(self, value: Optional[pulumi.Input[_builtins.int]]):
863
988
  pulumi.set(self, "violation_time_limit_seconds", value)
864
989
 
865
- @property
990
+ @_builtins.property
866
991
  @pulumi.getter
867
992
  def warning(self) -> Optional[pulumi.Input['NrqlAlertConditionWarningArgs']]:
868
993
  """
@@ -875,36 +1000,41 @@ class _NrqlAlertConditionState:
875
1000
  pulumi.set(self, "warning", value)
876
1001
 
877
1002
 
1003
+ @pulumi.type_token("newrelic:index/nrqlAlertCondition:NrqlAlertCondition")
878
1004
  class NrqlAlertCondition(pulumi.CustomResource):
879
1005
  @overload
880
1006
  def __init__(__self__,
881
1007
  resource_name: str,
882
1008
  opts: Optional[pulumi.ResourceOptions] = None,
883
- account_id: Optional[pulumi.Input[int]] = None,
884
- aggregation_delay: Optional[pulumi.Input[str]] = None,
885
- aggregation_method: Optional[pulumi.Input[str]] = None,
886
- aggregation_timer: Optional[pulumi.Input[str]] = None,
887
- aggregation_window: Optional[pulumi.Input[int]] = None,
888
- baseline_direction: Optional[pulumi.Input[str]] = None,
889
- close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
890
- critical: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionCriticalArgs']]] = None,
891
- description: Optional[pulumi.Input[str]] = None,
892
- enabled: Optional[pulumi.Input[bool]] = None,
893
- evaluation_delay: Optional[pulumi.Input[int]] = None,
894
- expiration_duration: Optional[pulumi.Input[int]] = None,
895
- fill_option: Optional[pulumi.Input[str]] = None,
896
- fill_value: Optional[pulumi.Input[float]] = None,
897
- name: Optional[pulumi.Input[str]] = None,
898
- nrql: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionNrqlArgs']]] = None,
899
- open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
900
- policy_id: Optional[pulumi.Input[int]] = None,
901
- runbook_url: Optional[pulumi.Input[str]] = None,
902
- slide_by: Optional[pulumi.Input[int]] = None,
903
- terms: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NrqlAlertConditionTermArgs']]]]] = None,
904
- type: Optional[pulumi.Input[str]] = None,
905
- violation_time_limit: Optional[pulumi.Input[str]] = None,
906
- violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
907
- warning: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionWarningArgs']]] = None,
1009
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
1010
+ aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
1011
+ aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
1012
+ aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
1013
+ aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
1014
+ baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
1015
+ close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
1016
+ critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
1017
+ description: Optional[pulumi.Input[_builtins.str]] = None,
1018
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
1019
+ evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
1020
+ expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
1021
+ fill_option: Optional[pulumi.Input[_builtins.str]] = None,
1022
+ fill_value: Optional[pulumi.Input[_builtins.float]] = None,
1023
+ ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
1024
+ name: Optional[pulumi.Input[_builtins.str]] = None,
1025
+ nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
1026
+ open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
1027
+ policy_id: Optional[pulumi.Input[_builtins.str]] = None,
1028
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
1029
+ signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
1030
+ slide_by: Optional[pulumi.Input[_builtins.int]] = None,
1031
+ target_entity: Optional[pulumi.Input[_builtins.str]] = None,
1032
+ terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
1033
+ title_template: Optional[pulumi.Input[_builtins.str]] = None,
1034
+ type: Optional[pulumi.Input[_builtins.str]] = None,
1035
+ violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
1036
+ violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
1037
+ warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None,
908
1038
  __props__=None):
909
1039
  """
910
1040
  Use this resource to create and manage NRQL alert conditions in New Relic.
@@ -913,17 +1043,19 @@ class NrqlAlertCondition(pulumi.CustomResource):
913
1043
 
914
1044
  ### Type: `static` (default)
915
1045
 
916
- <!--Start PulumiCodeChooser -->
917
1046
  ```python
918
1047
  import pulumi
919
1048
  import pulumi_newrelic as newrelic
920
1049
 
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,
1050
+ foo = newrelic.AlertPolicy("foo", name="foo")
1051
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1052
+ account_id="12345678",
1053
+ policy_id=foo.id,
925
1054
  type="static",
1055
+ name="foo",
926
1056
  description="Alert when transactions are taking too long",
1057
+ title_template="Issue in environment: {{ tags.environment }}",
1058
+ target_entity="MXxBUE18QVBQTElDQVRJT058MQ",
927
1059
  runbook_url="https://www.example.com",
928
1060
  enabled=True,
929
1061
  violation_time_limit_seconds=3600,
@@ -935,30 +1067,31 @@ class NrqlAlertCondition(pulumi.CustomResource):
935
1067
  expiration_duration=120,
936
1068
  open_violation_on_expiration=True,
937
1069
  close_violations_on_expiration=True,
1070
+ ignore_on_expected_termination=True,
938
1071
  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
- ))
1072
+ nrql={
1073
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1074
+ },
1075
+ critical={
1076
+ "operator": "above",
1077
+ "threshold": 5.5,
1078
+ "threshold_duration": 300,
1079
+ "threshold_occurrences": "ALL",
1080
+ },
1081
+ warning={
1082
+ "operator": "above",
1083
+ "threshold": 3.5,
1084
+ "threshold_duration": 600,
1085
+ "threshold_occurrences": "ALL",
1086
+ })
954
1087
  ```
955
- <!--End PulumiCodeChooser -->
956
1088
 
957
1089
  ## NRQL
958
1090
 
959
1091
  The `nrql` block supports the following arguments:
960
1092
 
961
1093
  - `query` - (Required) The NRQL query to execute for the condition.
1094
+ - `data_account_id` - (Optional) 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
1095
  - `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
1096
  - `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
1097
 
@@ -981,27 +1114,40 @@ class NrqlAlertCondition(pulumi.CustomResource):
981
1114
  - `threshold_occurrences` - (Optional) The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: `all` or `at_least_once` (case insensitive).
982
1115
  - `duration` - (Optional) **DEPRECATED:** Use `threshold_duration` instead. The duration of time, in _minutes_, that the threshold must violate for in order to create an incident. Must be within 1-120 (inclusive).
983
1116
  - `time_function` - (Optional) **DEPRECATED:** Use `threshold_occurrences` instead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: `all` or `any`.
1117
+ - `prediction` - (Optional) **BETA PREVIEW: the `prediction` field is in limited release and only enabled for preview on a per-account basis.** Use `prediction` to open alerts when your static threshold is predicted to be reached in the future. The `prediction` field is only available for _static_ NRQL alert conditions. See Prediction below for details.
1118
+ - `disable_health_status_reporting` - (Optional) `true` or `false`. Defaults to `false` when field not included in TF config. Violations will not change system health status for this term.
984
1119
 
985
1120
  > **NOTE:** When a `critical` or `warning` block is added to this resource, using either `duration` or `threshold_duration` (one of the two) is mandatory. Both of these should not be specified.
986
1121
 
987
1122
  > **NOTE:** When a `critical` or `warning` block is added to this resource, using either `time_function` or `threshold_occurrences` (one of the two) is mandatory. Both of these should not be specified.
988
1123
 
1124
+ ### Prediction
1125
+
1126
+ > **BETA PREVIEW:** The `prediction` block is in limited release and only enabled for preview on a per-account basis.
1127
+
1128
+ > **NOTE:** The `prediction` block is only available for _static_ NRQL alert conditions.
1129
+
1130
+ The `prediction` block supports the following arguments:
1131
+
1132
+ - `predict_by` - (Optional) The duration, in seconds, that the prediction should look into the future. Default is 3600 seconds (1 hour).
1133
+ - `prefer_prediction_violation` - (Optional) If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting `prefer_prediction_violation` to `true` overrides this behavior leaving the prediction incident open and preventing a static incident from opening. Default is false.
1134
+
989
1135
  ## Additional Examples
990
1136
 
991
1137
  ##### Type: `baseline`
992
1138
 
993
1139
  [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
1140
 
995
- <!--Start PulumiCodeChooser -->
996
1141
  ```python
997
1142
  import pulumi
998
1143
  import pulumi_newrelic as newrelic
999
1144
 
1000
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
1001
- foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
1145
+ foo = newrelic.AlertPolicy("foo", name="foo")
1146
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1002
1147
  account_id="your_account_id",
1003
- policy_id=foo_alert_policy.id,
1148
+ policy_id=foo.id,
1004
1149
  type="static",
1150
+ name="foo",
1005
1151
  description="Alert when transactions are taking too long",
1006
1152
  runbook_url="https://www.example.com",
1007
1153
  enabled=True,
@@ -1015,38 +1161,37 @@ class NrqlAlertCondition(pulumi.CustomResource):
1015
1161
  open_violation_on_expiration=True,
1016
1162
  close_violations_on_expiration=True,
1017
1163
  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
- ))
1164
+ nrql={
1165
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1166
+ },
1167
+ critical={
1168
+ "operator": "above",
1169
+ "threshold": 5.5,
1170
+ "threshold_duration": 300,
1171
+ "threshold_occurrences": "ALL",
1172
+ },
1173
+ warning={
1174
+ "operator": "above",
1175
+ "threshold": 3.5,
1176
+ "threshold_duration": 600,
1177
+ "threshold_occurrences": "ALL",
1178
+ })
1033
1179
  ```
1034
- <!--End PulumiCodeChooser -->
1035
1180
 
1036
1181
  ## Tags
1037
1182
 
1038
1183
  Manage NRQL alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check `EntityTags`.
1039
1184
 
1040
- <!--Start PulumiCodeChooser -->
1041
1185
  ```python
1042
1186
  import pulumi
1043
1187
  import pulumi_newrelic as newrelic
1044
1188
 
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,
1189
+ foo = newrelic.AlertPolicy("foo", name="foo")
1190
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1191
+ account_id="12345678",
1192
+ policy_id=foo.id,
1049
1193
  type="static",
1194
+ name="foo",
1050
1195
  description="Alert when transactions are taking too long",
1051
1196
  runbook_url="https://www.example.com",
1052
1197
  enabled=True,
@@ -1060,38 +1205,37 @@ class NrqlAlertCondition(pulumi.CustomResource):
1060
1205
  open_violation_on_expiration=True,
1061
1206
  close_violations_on_expiration=True,
1062
1207
  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",
1208
+ nrql={
1209
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1210
+ },
1211
+ critical={
1212
+ "operator": "above",
1213
+ "threshold": 5.5,
1214
+ "threshold_duration": 300,
1215
+ "threshold_occurrences": "ALL",
1216
+ },
1217
+ warning={
1218
+ "operator": "above",
1219
+ "threshold": 3.5,
1220
+ "threshold_duration": 600,
1221
+ "threshold_occurrences": "ALL",
1222
+ })
1223
+ my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
1079
1224
  guid=foo_nrql_alert_condition.entity_guid,
1080
1225
  tags=[
1081
- newrelic.EntityTagsTagArgs(
1082
- key="my-key",
1083
- values=[
1226
+ {
1227
+ "key": "my-key",
1228
+ "values": [
1084
1229
  "my-value",
1085
1230
  "my-other-value",
1086
1231
  ],
1087
- ),
1088
- newrelic.EntityTagsTagArgs(
1089
- key="my-key-2",
1090
- values=["my-value-2"],
1091
- ),
1232
+ },
1233
+ {
1234
+ "key": "my-key-2",
1235
+ "values": ["my-value-2"],
1236
+ },
1092
1237
  ])
1093
1238
  ```
1094
- <!--End PulumiCodeChooser -->
1095
1239
 
1096
1240
  <small>alerts.newrelic.com/accounts/**\\<account_id\\>**/policies/**\\<policy_id\\>**/conditions/**\\<condition_id\\>**/edit</small>
1097
1241
 
@@ -1103,55 +1247,53 @@ class NrqlAlertCondition(pulumi.CustomResource):
1103
1247
 
1104
1248
  An example resource from 1.x might look like the following.
1105
1249
 
1106
- <!--Start PulumiCodeChooser -->
1107
1250
  ```python
1108
1251
  import pulumi
1109
1252
  import pulumi_newrelic as newrelic
1110
1253
 
1111
- nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
1112
- policy_id=newrelic_alert_policy["z"]["id"],
1254
+ z = newrelic.NrqlAlertCondition("z",
1255
+ policy_id=z_newrelic_alert_policy["id"],
1256
+ name="zleslie-test",
1113
1257
  type="static",
1114
1258
  runbook_url="https://localhost",
1115
1259
  enabled=True,
1116
1260
  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
- ))
1261
+ critical={
1262
+ "operator": "above",
1263
+ "threshold_duration": 120,
1264
+ "threshold": 3,
1265
+ "threshold_occurrences": "AT_LEAST_ONCE",
1266
+ },
1267
+ nrql={
1268
+ "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1269
+ })
1126
1270
  ```
1127
- <!--End PulumiCodeChooser -->
1128
1271
 
1129
1272
  After making the appropriate adjustments mentioned in the deprecation warnings,
1130
1273
  the resource now looks like the following.
1131
1274
 
1132
- <!--Start PulumiCodeChooser -->
1133
1275
  ```python
1134
1276
  import pulumi
1135
1277
  import pulumi_newrelic as newrelic
1136
1278
 
1137
- nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
1138
- policy_id=newrelic_alert_policy["z"]["id"],
1279
+ z = newrelic.NrqlAlertCondition("z",
1280
+ policy_id=z_newrelic_alert_policy["id"],
1281
+ name="zleslie-test",
1139
1282
  type="static",
1140
1283
  runbook_url="https://localhost",
1141
1284
  enabled=True,
1142
1285
  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
- ))
1286
+ terms=[{
1287
+ "priority": "critical",
1288
+ "operator": "above",
1289
+ "threshold": 3,
1290
+ "duration": 5,
1291
+ "time_function": "any",
1292
+ }],
1293
+ nrql={
1294
+ "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1295
+ })
1153
1296
  ```
1154
- <!--End PulumiCodeChooser -->
1155
1297
 
1156
1298
  ## Import
1157
1299
 
@@ -1171,33 +1313,37 @@ class NrqlAlertCondition(pulumi.CustomResource):
1171
1313
 
1172
1314
  :param str resource_name: The name of the resource.
1173
1315
  :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`.
1175
- :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
- :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
- :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
- :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
- :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
- :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.
1182
- :param pulumi.Input[str] description: The description of the NRQL alert condition.
1183
- :param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
1184
- :param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
1185
- :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
- :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
- :param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
1188
- :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.
1190
- :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.
1192
- :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
1193
- :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.
1195
- :param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
1196
- :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>
1316
+ :param pulumi.Input[_builtins.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`.
1317
+ :param pulumi.Input[_builtins.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`.
1318
+ :param pulumi.Input[_builtins.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`.
1319
+ :param pulumi.Input[_builtins.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`.
1320
+ :param pulumi.Input[_builtins.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.
1321
+ :param pulumi.Input[_builtins.str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
1322
+ :param pulumi.Input[_builtins.bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
1323
+ :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.
1324
+ :param pulumi.Input[_builtins.str] description: The description of the NRQL alert condition.
1325
+ :param pulumi.Input[_builtins.bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
1326
+ :param pulumi.Input[_builtins.int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
1327
+ :param pulumi.Input[_builtins.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).
1328
+ :param pulumi.Input[_builtins.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.
1329
+ :param pulumi.Input[_builtins.float] fill_value: This value will be used for filling gaps in the signal.
1330
+ :param pulumi.Input[_builtins.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.
1331
+ :param pulumi.Input[_builtins.str] name: The title of the condition.
1332
+ :param pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']] nrql: A NRQL query. See NRQL below for details.
1333
+ :param pulumi.Input[_builtins.bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
1334
+ :param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
1335
+ :param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
1336
+ :param pulumi.Input[_builtins.str] signal_seasonality: Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
1337
+ :param pulumi.Input[_builtins.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`.
1338
+ :param pulumi.Input[_builtins.str] target_entity: BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
1339
+ :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.
1340
+ :param pulumi.Input[_builtins.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.
1341
+ :param pulumi.Input[_builtins.str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
1342
+ :param pulumi.Input[_builtins.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
1343
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1198
- :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>
1344
+ :param pulumi.Input[_builtins.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
1345
  <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.
1346
+ :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
1347
  """
1202
1348
  ...
1203
1349
  @overload
@@ -1212,17 +1358,19 @@ class NrqlAlertCondition(pulumi.CustomResource):
1212
1358
 
1213
1359
  ### Type: `static` (default)
1214
1360
 
1215
- <!--Start PulumiCodeChooser -->
1216
1361
  ```python
1217
1362
  import pulumi
1218
1363
  import pulumi_newrelic as newrelic
1219
1364
 
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,
1365
+ foo = newrelic.AlertPolicy("foo", name="foo")
1366
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1367
+ account_id="12345678",
1368
+ policy_id=foo.id,
1224
1369
  type="static",
1370
+ name="foo",
1225
1371
  description="Alert when transactions are taking too long",
1372
+ title_template="Issue in environment: {{ tags.environment }}",
1373
+ target_entity="MXxBUE18QVBQTElDQVRJT058MQ",
1226
1374
  runbook_url="https://www.example.com",
1227
1375
  enabled=True,
1228
1376
  violation_time_limit_seconds=3600,
@@ -1234,30 +1382,31 @@ class NrqlAlertCondition(pulumi.CustomResource):
1234
1382
  expiration_duration=120,
1235
1383
  open_violation_on_expiration=True,
1236
1384
  close_violations_on_expiration=True,
1385
+ ignore_on_expected_termination=True,
1237
1386
  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
- ))
1387
+ nrql={
1388
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1389
+ },
1390
+ critical={
1391
+ "operator": "above",
1392
+ "threshold": 5.5,
1393
+ "threshold_duration": 300,
1394
+ "threshold_occurrences": "ALL",
1395
+ },
1396
+ warning={
1397
+ "operator": "above",
1398
+ "threshold": 3.5,
1399
+ "threshold_duration": 600,
1400
+ "threshold_occurrences": "ALL",
1401
+ })
1253
1402
  ```
1254
- <!--End PulumiCodeChooser -->
1255
1403
 
1256
1404
  ## NRQL
1257
1405
 
1258
1406
  The `nrql` block supports the following arguments:
1259
1407
 
1260
1408
  - `query` - (Required) The NRQL query to execute for the condition.
1409
+ - `data_account_id` - (Optional) 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
1410
  - `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
1411
  - `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
1412
 
@@ -1280,27 +1429,40 @@ class NrqlAlertCondition(pulumi.CustomResource):
1280
1429
  - `threshold_occurrences` - (Optional) The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: `all` or `at_least_once` (case insensitive).
1281
1430
  - `duration` - (Optional) **DEPRECATED:** Use `threshold_duration` instead. The duration of time, in _minutes_, that the threshold must violate for in order to create an incident. Must be within 1-120 (inclusive).
1282
1431
  - `time_function` - (Optional) **DEPRECATED:** Use `threshold_occurrences` instead. The criteria for how many data points must be in violation for the specified threshold duration. Valid values are: `all` or `any`.
1432
+ - `prediction` - (Optional) **BETA PREVIEW: the `prediction` field is in limited release and only enabled for preview on a per-account basis.** Use `prediction` to open alerts when your static threshold is predicted to be reached in the future. The `prediction` field is only available for _static_ NRQL alert conditions. See Prediction below for details.
1433
+ - `disable_health_status_reporting` - (Optional) `true` or `false`. Defaults to `false` when field not included in TF config. Violations will not change system health status for this term.
1283
1434
 
1284
1435
  > **NOTE:** When a `critical` or `warning` block is added to this resource, using either `duration` or `threshold_duration` (one of the two) is mandatory. Both of these should not be specified.
1285
1436
 
1286
1437
  > **NOTE:** When a `critical` or `warning` block is added to this resource, using either `time_function` or `threshold_occurrences` (one of the two) is mandatory. Both of these should not be specified.
1287
1438
 
1439
+ ### Prediction
1440
+
1441
+ > **BETA PREVIEW:** The `prediction` block is in limited release and only enabled for preview on a per-account basis.
1442
+
1443
+ > **NOTE:** The `prediction` block is only available for _static_ NRQL alert conditions.
1444
+
1445
+ The `prediction` block supports the following arguments:
1446
+
1447
+ - `predict_by` - (Optional) The duration, in seconds, that the prediction should look into the future. Default is 3600 seconds (1 hour).
1448
+ - `prefer_prediction_violation` - (Optional) If a prediction incident is open when a term's static threshold is breached by the actual signal, default behavior is to close the prediction incident and open a static incident. Setting `prefer_prediction_violation` to `true` overrides this behavior leaving the prediction incident open and preventing a static incident from opening. Default is false.
1449
+
1288
1450
  ## Additional Examples
1289
1451
 
1290
1452
  ##### Type: `baseline`
1291
1453
 
1292
1454
  [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
1455
 
1294
- <!--Start PulumiCodeChooser -->
1295
1456
  ```python
1296
1457
  import pulumi
1297
1458
  import pulumi_newrelic as newrelic
1298
1459
 
1299
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
1300
- foo_nrql_alert_condition = newrelic.NrqlAlertCondition("fooNrqlAlertCondition",
1460
+ foo = newrelic.AlertPolicy("foo", name="foo")
1461
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1301
1462
  account_id="your_account_id",
1302
- policy_id=foo_alert_policy.id,
1463
+ policy_id=foo.id,
1303
1464
  type="static",
1465
+ name="foo",
1304
1466
  description="Alert when transactions are taking too long",
1305
1467
  runbook_url="https://www.example.com",
1306
1468
  enabled=True,
@@ -1314,38 +1476,37 @@ class NrqlAlertCondition(pulumi.CustomResource):
1314
1476
  open_violation_on_expiration=True,
1315
1477
  close_violations_on_expiration=True,
1316
1478
  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
- ))
1479
+ nrql={
1480
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1481
+ },
1482
+ critical={
1483
+ "operator": "above",
1484
+ "threshold": 5.5,
1485
+ "threshold_duration": 300,
1486
+ "threshold_occurrences": "ALL",
1487
+ },
1488
+ warning={
1489
+ "operator": "above",
1490
+ "threshold": 3.5,
1491
+ "threshold_duration": 600,
1492
+ "threshold_occurrences": "ALL",
1493
+ })
1332
1494
  ```
1333
- <!--End PulumiCodeChooser -->
1334
1495
 
1335
1496
  ## Tags
1336
1497
 
1337
1498
  Manage NRQL alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check `EntityTags`.
1338
1499
 
1339
- <!--Start PulumiCodeChooser -->
1340
1500
  ```python
1341
1501
  import pulumi
1342
1502
  import pulumi_newrelic as newrelic
1343
1503
 
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,
1504
+ foo = newrelic.AlertPolicy("foo", name="foo")
1505
+ foo_nrql_alert_condition = newrelic.NrqlAlertCondition("foo",
1506
+ account_id="12345678",
1507
+ policy_id=foo.id,
1348
1508
  type="static",
1509
+ name="foo",
1349
1510
  description="Alert when transactions are taking too long",
1350
1511
  runbook_url="https://www.example.com",
1351
1512
  enabled=True,
@@ -1359,38 +1520,37 @@ class NrqlAlertCondition(pulumi.CustomResource):
1359
1520
  open_violation_on_expiration=True,
1360
1521
  close_violations_on_expiration=True,
1361
1522
  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",
1523
+ nrql={
1524
+ "query": "SELECT average(duration) FROM Transaction where appName = 'Your App'",
1525
+ },
1526
+ critical={
1527
+ "operator": "above",
1528
+ "threshold": 5.5,
1529
+ "threshold_duration": 300,
1530
+ "threshold_occurrences": "ALL",
1531
+ },
1532
+ warning={
1533
+ "operator": "above",
1534
+ "threshold": 3.5,
1535
+ "threshold_duration": 600,
1536
+ "threshold_occurrences": "ALL",
1537
+ })
1538
+ my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
1378
1539
  guid=foo_nrql_alert_condition.entity_guid,
1379
1540
  tags=[
1380
- newrelic.EntityTagsTagArgs(
1381
- key="my-key",
1382
- values=[
1541
+ {
1542
+ "key": "my-key",
1543
+ "values": [
1383
1544
  "my-value",
1384
1545
  "my-other-value",
1385
1546
  ],
1386
- ),
1387
- newrelic.EntityTagsTagArgs(
1388
- key="my-key-2",
1389
- values=["my-value-2"],
1390
- ),
1547
+ },
1548
+ {
1549
+ "key": "my-key-2",
1550
+ "values": ["my-value-2"],
1551
+ },
1391
1552
  ])
1392
1553
  ```
1393
- <!--End PulumiCodeChooser -->
1394
1554
 
1395
1555
  <small>alerts.newrelic.com/accounts/**\\<account_id\\>**/policies/**\\<policy_id\\>**/conditions/**\\<condition_id\\>**/edit</small>
1396
1556
 
@@ -1402,55 +1562,53 @@ class NrqlAlertCondition(pulumi.CustomResource):
1402
1562
 
1403
1563
  An example resource from 1.x might look like the following.
1404
1564
 
1405
- <!--Start PulumiCodeChooser -->
1406
1565
  ```python
1407
1566
  import pulumi
1408
1567
  import pulumi_newrelic as newrelic
1409
1568
 
1410
- nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
1411
- policy_id=newrelic_alert_policy["z"]["id"],
1569
+ z = newrelic.NrqlAlertCondition("z",
1570
+ policy_id=z_newrelic_alert_policy["id"],
1571
+ name="zleslie-test",
1412
1572
  type="static",
1413
1573
  runbook_url="https://localhost",
1414
1574
  enabled=True,
1415
1575
  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
- ))
1576
+ critical={
1577
+ "operator": "above",
1578
+ "threshold_duration": 120,
1579
+ "threshold": 3,
1580
+ "threshold_occurrences": "AT_LEAST_ONCE",
1581
+ },
1582
+ nrql={
1583
+ "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1584
+ })
1425
1585
  ```
1426
- <!--End PulumiCodeChooser -->
1427
1586
 
1428
1587
  After making the appropriate adjustments mentioned in the deprecation warnings,
1429
1588
  the resource now looks like the following.
1430
1589
 
1431
- <!--Start PulumiCodeChooser -->
1432
1590
  ```python
1433
1591
  import pulumi
1434
1592
  import pulumi_newrelic as newrelic
1435
1593
 
1436
- nrql_alert_condition = newrelic.NrqlAlertCondition("nrqlAlertCondition",
1437
- policy_id=newrelic_alert_policy["z"]["id"],
1594
+ z = newrelic.NrqlAlertCondition("z",
1595
+ policy_id=z_newrelic_alert_policy["id"],
1596
+ name="zleslie-test",
1438
1597
  type="static",
1439
1598
  runbook_url="https://localhost",
1440
1599
  enabled=True,
1441
1600
  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
- ))
1601
+ terms=[{
1602
+ "priority": "critical",
1603
+ "operator": "above",
1604
+ "threshold": 3,
1605
+ "duration": 5,
1606
+ "time_function": "any",
1607
+ }],
1608
+ nrql={
1609
+ "query": "SELECT count(*) FROM TransactionError WHERE appName like '%Dummy App%' FACET appName",
1610
+ })
1452
1611
  ```
1453
- <!--End PulumiCodeChooser -->
1454
1612
 
1455
1613
  ## Import
1456
1614
 
@@ -1483,31 +1641,35 @@ class NrqlAlertCondition(pulumi.CustomResource):
1483
1641
  def _internal_init(__self__,
1484
1642
  resource_name: str,
1485
1643
  opts: Optional[pulumi.ResourceOptions] = None,
1486
- account_id: Optional[pulumi.Input[int]] = None,
1487
- aggregation_delay: Optional[pulumi.Input[str]] = None,
1488
- aggregation_method: Optional[pulumi.Input[str]] = None,
1489
- aggregation_timer: Optional[pulumi.Input[str]] = None,
1490
- aggregation_window: Optional[pulumi.Input[int]] = None,
1491
- baseline_direction: Optional[pulumi.Input[str]] = None,
1492
- close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
1493
- critical: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionCriticalArgs']]] = None,
1494
- description: Optional[pulumi.Input[str]] = None,
1495
- enabled: Optional[pulumi.Input[bool]] = None,
1496
- evaluation_delay: Optional[pulumi.Input[int]] = None,
1497
- expiration_duration: Optional[pulumi.Input[int]] = None,
1498
- fill_option: Optional[pulumi.Input[str]] = None,
1499
- fill_value: Optional[pulumi.Input[float]] = None,
1500
- name: Optional[pulumi.Input[str]] = None,
1501
- nrql: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionNrqlArgs']]] = None,
1502
- open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
1503
- policy_id: Optional[pulumi.Input[int]] = None,
1504
- runbook_url: Optional[pulumi.Input[str]] = None,
1505
- slide_by: Optional[pulumi.Input[int]] = None,
1506
- terms: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NrqlAlertConditionTermArgs']]]]] = None,
1507
- type: Optional[pulumi.Input[str]] = None,
1508
- violation_time_limit: Optional[pulumi.Input[str]] = None,
1509
- violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
1510
- warning: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionWarningArgs']]] = None,
1644
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
1645
+ aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
1646
+ aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
1647
+ aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
1648
+ aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
1649
+ baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
1650
+ close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
1651
+ critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
1652
+ description: Optional[pulumi.Input[_builtins.str]] = None,
1653
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
1654
+ evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
1655
+ expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
1656
+ fill_option: Optional[pulumi.Input[_builtins.str]] = None,
1657
+ fill_value: Optional[pulumi.Input[_builtins.float]] = None,
1658
+ ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
1659
+ name: Optional[pulumi.Input[_builtins.str]] = None,
1660
+ nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
1661
+ open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
1662
+ policy_id: Optional[pulumi.Input[_builtins.str]] = None,
1663
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
1664
+ signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
1665
+ slide_by: Optional[pulumi.Input[_builtins.int]] = None,
1666
+ target_entity: Optional[pulumi.Input[_builtins.str]] = None,
1667
+ terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
1668
+ title_template: Optional[pulumi.Input[_builtins.str]] = None,
1669
+ type: Optional[pulumi.Input[_builtins.str]] = None,
1670
+ violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
1671
+ violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
1672
+ warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None,
1511
1673
  __props__=None):
1512
1674
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
1513
1675
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -1531,6 +1693,7 @@ class NrqlAlertCondition(pulumi.CustomResource):
1531
1693
  __props__.__dict__["expiration_duration"] = expiration_duration
1532
1694
  __props__.__dict__["fill_option"] = fill_option
1533
1695
  __props__.__dict__["fill_value"] = fill_value
1696
+ __props__.__dict__["ignore_on_expected_termination"] = ignore_on_expected_termination
1534
1697
  __props__.__dict__["name"] = name
1535
1698
  if nrql is None and not opts.urn:
1536
1699
  raise TypeError("Missing required property 'nrql'")
@@ -1540,8 +1703,11 @@ class NrqlAlertCondition(pulumi.CustomResource):
1540
1703
  raise TypeError("Missing required property 'policy_id'")
1541
1704
  __props__.__dict__["policy_id"] = policy_id
1542
1705
  __props__.__dict__["runbook_url"] = runbook_url
1706
+ __props__.__dict__["signal_seasonality"] = signal_seasonality
1543
1707
  __props__.__dict__["slide_by"] = slide_by
1708
+ __props__.__dict__["target_entity"] = target_entity
1544
1709
  __props__.__dict__["terms"] = terms
1710
+ __props__.__dict__["title_template"] = title_template
1545
1711
  __props__.__dict__["type"] = type
1546
1712
  __props__.__dict__["violation_time_limit"] = violation_time_limit
1547
1713
  __props__.__dict__["violation_time_limit_seconds"] = violation_time_limit_seconds
@@ -1557,32 +1723,36 @@ class NrqlAlertCondition(pulumi.CustomResource):
1557
1723
  def get(resource_name: str,
1558
1724
  id: pulumi.Input[str],
1559
1725
  opts: Optional[pulumi.ResourceOptions] = None,
1560
- account_id: Optional[pulumi.Input[int]] = None,
1561
- aggregation_delay: Optional[pulumi.Input[str]] = None,
1562
- aggregation_method: Optional[pulumi.Input[str]] = None,
1563
- aggregation_timer: Optional[pulumi.Input[str]] = None,
1564
- aggregation_window: Optional[pulumi.Input[int]] = None,
1565
- baseline_direction: Optional[pulumi.Input[str]] = None,
1566
- close_violations_on_expiration: Optional[pulumi.Input[bool]] = None,
1567
- critical: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionCriticalArgs']]] = None,
1568
- description: Optional[pulumi.Input[str]] = None,
1569
- enabled: Optional[pulumi.Input[bool]] = None,
1570
- entity_guid: Optional[pulumi.Input[str]] = None,
1571
- evaluation_delay: Optional[pulumi.Input[int]] = None,
1572
- expiration_duration: Optional[pulumi.Input[int]] = None,
1573
- fill_option: Optional[pulumi.Input[str]] = None,
1574
- fill_value: Optional[pulumi.Input[float]] = None,
1575
- name: Optional[pulumi.Input[str]] = None,
1576
- nrql: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionNrqlArgs']]] = None,
1577
- open_violation_on_expiration: Optional[pulumi.Input[bool]] = None,
1578
- policy_id: Optional[pulumi.Input[int]] = None,
1579
- runbook_url: Optional[pulumi.Input[str]] = None,
1580
- slide_by: Optional[pulumi.Input[int]] = None,
1581
- terms: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['NrqlAlertConditionTermArgs']]]]] = None,
1582
- type: Optional[pulumi.Input[str]] = None,
1583
- violation_time_limit: Optional[pulumi.Input[str]] = None,
1584
- violation_time_limit_seconds: Optional[pulumi.Input[int]] = None,
1585
- warning: Optional[pulumi.Input[pulumi.InputType['NrqlAlertConditionWarningArgs']]] = None) -> 'NrqlAlertCondition':
1726
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
1727
+ aggregation_delay: Optional[pulumi.Input[_builtins.str]] = None,
1728
+ aggregation_method: Optional[pulumi.Input[_builtins.str]] = None,
1729
+ aggregation_timer: Optional[pulumi.Input[_builtins.str]] = None,
1730
+ aggregation_window: Optional[pulumi.Input[_builtins.int]] = None,
1731
+ baseline_direction: Optional[pulumi.Input[_builtins.str]] = None,
1732
+ close_violations_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
1733
+ critical: Optional[pulumi.Input[Union['NrqlAlertConditionCriticalArgs', 'NrqlAlertConditionCriticalArgsDict']]] = None,
1734
+ description: Optional[pulumi.Input[_builtins.str]] = None,
1735
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
1736
+ entity_guid: Optional[pulumi.Input[_builtins.str]] = None,
1737
+ evaluation_delay: Optional[pulumi.Input[_builtins.int]] = None,
1738
+ expiration_duration: Optional[pulumi.Input[_builtins.int]] = None,
1739
+ fill_option: Optional[pulumi.Input[_builtins.str]] = None,
1740
+ fill_value: Optional[pulumi.Input[_builtins.float]] = None,
1741
+ ignore_on_expected_termination: Optional[pulumi.Input[_builtins.bool]] = None,
1742
+ name: Optional[pulumi.Input[_builtins.str]] = None,
1743
+ nrql: Optional[pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']]] = None,
1744
+ open_violation_on_expiration: Optional[pulumi.Input[_builtins.bool]] = None,
1745
+ policy_id: Optional[pulumi.Input[_builtins.str]] = None,
1746
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
1747
+ signal_seasonality: Optional[pulumi.Input[_builtins.str]] = None,
1748
+ slide_by: Optional[pulumi.Input[_builtins.int]] = None,
1749
+ target_entity: Optional[pulumi.Input[_builtins.str]] = None,
1750
+ terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NrqlAlertConditionTermArgs', 'NrqlAlertConditionTermArgsDict']]]]] = None,
1751
+ title_template: Optional[pulumi.Input[_builtins.str]] = None,
1752
+ type: Optional[pulumi.Input[_builtins.str]] = None,
1753
+ violation_time_limit: Optional[pulumi.Input[_builtins.str]] = None,
1754
+ violation_time_limit_seconds: Optional[pulumi.Input[_builtins.int]] = None,
1755
+ warning: Optional[pulumi.Input[Union['NrqlAlertConditionWarningArgs', 'NrqlAlertConditionWarningArgsDict']]] = None) -> 'NrqlAlertCondition':
1586
1756
  """
1587
1757
  Get an existing NrqlAlertCondition resource's state with the given name, id, and optional extra
1588
1758
  properties used to qualify the lookup.
@@ -1590,34 +1760,38 @@ class NrqlAlertCondition(pulumi.CustomResource):
1590
1760
  :param str resource_name: The unique name of the resulting resource.
1591
1761
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
1592
1762
  :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`.
1594
- :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
- :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
- :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
- :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
- :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
- :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.
1601
- :param pulumi.Input[str] description: The description of the NRQL alert condition.
1602
- :param pulumi.Input[bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
1603
- :param pulumi.Input[str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
1604
- :param pulumi.Input[int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
1605
- :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
- :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
- :param pulumi.Input[float] fill_value: This value will be used for filling gaps in the signal.
1608
- :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.
1610
- :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.
1612
- :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
1613
- :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.
1615
- :param pulumi.Input[str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
1616
- :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>
1763
+ :param pulumi.Input[_builtins.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`.
1764
+ :param pulumi.Input[_builtins.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`.
1765
+ :param pulumi.Input[_builtins.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`.
1766
+ :param pulumi.Input[_builtins.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`.
1767
+ :param pulumi.Input[_builtins.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.
1768
+ :param pulumi.Input[_builtins.str] baseline_direction: The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
1769
+ :param pulumi.Input[_builtins.bool] close_violations_on_expiration: Whether to close all open incidents when the signal expires.
1770
+ :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.
1771
+ :param pulumi.Input[_builtins.str] description: The description of the NRQL alert condition.
1772
+ :param pulumi.Input[_builtins.bool] enabled: Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
1773
+ :param pulumi.Input[_builtins.str] entity_guid: The unique entity identifier of the NRQL Condition in New Relic.
1774
+ :param pulumi.Input[_builtins.int] evaluation_delay: How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
1775
+ :param pulumi.Input[_builtins.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).
1776
+ :param pulumi.Input[_builtins.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.
1777
+ :param pulumi.Input[_builtins.float] fill_value: This value will be used for filling gaps in the signal.
1778
+ :param pulumi.Input[_builtins.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.
1779
+ :param pulumi.Input[_builtins.str] name: The title of the condition.
1780
+ :param pulumi.Input[Union['NrqlAlertConditionNrqlArgs', 'NrqlAlertConditionNrqlArgsDict']] nrql: A NRQL query. See NRQL below for details.
1781
+ :param pulumi.Input[_builtins.bool] open_violation_on_expiration: Whether to create a new incident to capture that the signal expired.
1782
+ :param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
1783
+ :param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
1784
+ :param pulumi.Input[_builtins.str] signal_seasonality: Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
1785
+ :param pulumi.Input[_builtins.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`.
1786
+ :param pulumi.Input[_builtins.str] target_entity: BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
1787
+ :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.
1788
+ :param pulumi.Input[_builtins.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.
1789
+ :param pulumi.Input[_builtins.str] type: The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
1790
+ :param pulumi.Input[_builtins.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
1791
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1618
- :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>
1792
+ :param pulumi.Input[_builtins.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
1793
  <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.
1794
+ :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
1795
  """
1622
1796
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
1623
1797
 
@@ -1638,76 +1812,80 @@ class NrqlAlertCondition(pulumi.CustomResource):
1638
1812
  __props__.__dict__["expiration_duration"] = expiration_duration
1639
1813
  __props__.__dict__["fill_option"] = fill_option
1640
1814
  __props__.__dict__["fill_value"] = fill_value
1815
+ __props__.__dict__["ignore_on_expected_termination"] = ignore_on_expected_termination
1641
1816
  __props__.__dict__["name"] = name
1642
1817
  __props__.__dict__["nrql"] = nrql
1643
1818
  __props__.__dict__["open_violation_on_expiration"] = open_violation_on_expiration
1644
1819
  __props__.__dict__["policy_id"] = policy_id
1645
1820
  __props__.__dict__["runbook_url"] = runbook_url
1821
+ __props__.__dict__["signal_seasonality"] = signal_seasonality
1646
1822
  __props__.__dict__["slide_by"] = slide_by
1823
+ __props__.__dict__["target_entity"] = target_entity
1647
1824
  __props__.__dict__["terms"] = terms
1825
+ __props__.__dict__["title_template"] = title_template
1648
1826
  __props__.__dict__["type"] = type
1649
1827
  __props__.__dict__["violation_time_limit"] = violation_time_limit
1650
1828
  __props__.__dict__["violation_time_limit_seconds"] = violation_time_limit_seconds
1651
1829
  __props__.__dict__["warning"] = warning
1652
1830
  return NrqlAlertCondition(resource_name, opts=opts, __props__=__props__)
1653
1831
 
1654
- @property
1832
+ @_builtins.property
1655
1833
  @pulumi.getter(name="accountId")
1656
- def account_id(self) -> pulumi.Output[int]:
1834
+ def account_id(self) -> pulumi.Output[_builtins.str]:
1657
1835
  """
1658
1836
  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
1837
  """
1660
1838
  return pulumi.get(self, "account_id")
1661
1839
 
1662
- @property
1840
+ @_builtins.property
1663
1841
  @pulumi.getter(name="aggregationDelay")
1664
- def aggregation_delay(self) -> pulumi.Output[Optional[str]]:
1842
+ def aggregation_delay(self) -> pulumi.Output[Optional[_builtins.str]]:
1665
1843
  """
1666
1844
  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`.
1667
1845
  """
1668
1846
  return pulumi.get(self, "aggregation_delay")
1669
1847
 
1670
- @property
1848
+ @_builtins.property
1671
1849
  @pulumi.getter(name="aggregationMethod")
1672
- def aggregation_method(self) -> pulumi.Output[Optional[str]]:
1850
+ def aggregation_method(self) -> pulumi.Output[Optional[_builtins.str]]:
1673
1851
  """
1674
1852
  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`.
1675
1853
  """
1676
1854
  return pulumi.get(self, "aggregation_method")
1677
1855
 
1678
- @property
1856
+ @_builtins.property
1679
1857
  @pulumi.getter(name="aggregationTimer")
1680
- def aggregation_timer(self) -> pulumi.Output[Optional[str]]:
1858
+ def aggregation_timer(self) -> pulumi.Output[Optional[_builtins.str]]:
1681
1859
  """
1682
1860
  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`.
1683
1861
  """
1684
1862
  return pulumi.get(self, "aggregation_timer")
1685
1863
 
1686
- @property
1864
+ @_builtins.property
1687
1865
  @pulumi.getter(name="aggregationWindow")
1688
- def aggregation_window(self) -> pulumi.Output[int]:
1866
+ def aggregation_window(self) -> pulumi.Output[_builtins.int]:
1689
1867
  """
1690
1868
  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.
1691
1869
  """
1692
1870
  return pulumi.get(self, "aggregation_window")
1693
1871
 
1694
- @property
1872
+ @_builtins.property
1695
1873
  @pulumi.getter(name="baselineDirection")
1696
- def baseline_direction(self) -> pulumi.Output[Optional[str]]:
1874
+ def baseline_direction(self) -> pulumi.Output[Optional[_builtins.str]]:
1697
1875
  """
1698
1876
  The baseline direction of a _baseline_ NRQL alert condition. Valid values are: `lower_only`, `upper_and_lower`, `upper_only` (case insensitive).
1699
1877
  """
1700
1878
  return pulumi.get(self, "baseline_direction")
1701
1879
 
1702
- @property
1880
+ @_builtins.property
1703
1881
  @pulumi.getter(name="closeViolationsOnExpiration")
1704
- def close_violations_on_expiration(self) -> pulumi.Output[Optional[bool]]:
1882
+ def close_violations_on_expiration(self) -> pulumi.Output[Optional[_builtins.bool]]:
1705
1883
  """
1706
1884
  Whether to close all open incidents when the signal expires.
1707
1885
  """
1708
1886
  return pulumi.get(self, "close_violations_on_expiration")
1709
1887
 
1710
- @property
1888
+ @_builtins.property
1711
1889
  @pulumi.getter
1712
1890
  def critical(self) -> pulumi.Output[Optional['outputs.NrqlAlertConditionCritical']]:
1713
1891
  """
@@ -1715,71 +1893,79 @@ class NrqlAlertCondition(pulumi.CustomResource):
1715
1893
  """
1716
1894
  return pulumi.get(self, "critical")
1717
1895
 
1718
- @property
1896
+ @_builtins.property
1719
1897
  @pulumi.getter
1720
- def description(self) -> pulumi.Output[Optional[str]]:
1898
+ def description(self) -> pulumi.Output[Optional[_builtins.str]]:
1721
1899
  """
1722
1900
  The description of the NRQL alert condition.
1723
1901
  """
1724
1902
  return pulumi.get(self, "description")
1725
1903
 
1726
- @property
1904
+ @_builtins.property
1727
1905
  @pulumi.getter
1728
- def enabled(self) -> pulumi.Output[Optional[bool]]:
1906
+ def enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
1729
1907
  """
1730
1908
  Whether to enable the alert condition. Valid values are `true` and `false`. Defaults to `true`.
1731
1909
  """
1732
1910
  return pulumi.get(self, "enabled")
1733
1911
 
1734
- @property
1912
+ @_builtins.property
1735
1913
  @pulumi.getter(name="entityGuid")
1736
- def entity_guid(self) -> pulumi.Output[str]:
1914
+ def entity_guid(self) -> pulumi.Output[_builtins.str]:
1737
1915
  """
1738
1916
  The unique entity identifier of the NRQL Condition in New Relic.
1739
1917
  """
1740
1918
  return pulumi.get(self, "entity_guid")
1741
1919
 
1742
- @property
1920
+ @_builtins.property
1743
1921
  @pulumi.getter(name="evaluationDelay")
1744
- def evaluation_delay(self) -> pulumi.Output[Optional[int]]:
1922
+ def evaluation_delay(self) -> pulumi.Output[Optional[_builtins.int]]:
1745
1923
  """
1746
1924
  How long we wait until the signal starts evaluating. The maximum delay is 7200 seconds (120 minutes).
1747
1925
  """
1748
1926
  return pulumi.get(self, "evaluation_delay")
1749
1927
 
1750
- @property
1928
+ @_builtins.property
1751
1929
  @pulumi.getter(name="expirationDuration")
1752
- def expiration_duration(self) -> pulumi.Output[Optional[int]]:
1930
+ def expiration_duration(self) -> pulumi.Output[Optional[_builtins.int]]:
1753
1931
  """
1754
1932
  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).
1755
1933
  """
1756
1934
  return pulumi.get(self, "expiration_duration")
1757
1935
 
1758
- @property
1936
+ @_builtins.property
1759
1937
  @pulumi.getter(name="fillOption")
1760
- def fill_option(self) -> pulumi.Output[Optional[str]]:
1938
+ def fill_option(self) -> pulumi.Output[Optional[_builtins.str]]:
1761
1939
  """
1762
1940
  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.
1763
1941
  """
1764
1942
  return pulumi.get(self, "fill_option")
1765
1943
 
1766
- @property
1944
+ @_builtins.property
1767
1945
  @pulumi.getter(name="fillValue")
1768
- def fill_value(self) -> pulumi.Output[Optional[float]]:
1946
+ def fill_value(self) -> pulumi.Output[Optional[_builtins.float]]:
1769
1947
  """
1770
1948
  This value will be used for filling gaps in the signal.
1771
1949
  """
1772
1950
  return pulumi.get(self, "fill_value")
1773
1951
 
1774
- @property
1952
+ @_builtins.property
1953
+ @pulumi.getter(name="ignoreOnExpectedTermination")
1954
+ def ignore_on_expected_termination(self) -> pulumi.Output[Optional[_builtins.bool]]:
1955
+ """
1956
+ Whether an alert condition should ignore expected termination of a signal when considering whether to create a loss of signal incident. Defaults to false.
1957
+ """
1958
+ return pulumi.get(self, "ignore_on_expected_termination")
1959
+
1960
+ @_builtins.property
1775
1961
  @pulumi.getter
1776
- def name(self) -> pulumi.Output[str]:
1962
+ def name(self) -> pulumi.Output[_builtins.str]:
1777
1963
  """
1778
1964
  The title of the condition.
1779
1965
  """
1780
1966
  return pulumi.get(self, "name")
1781
1967
 
1782
- @property
1968
+ @_builtins.property
1783
1969
  @pulumi.getter
1784
1970
  def nrql(self) -> pulumi.Output['outputs.NrqlAlertConditionNrql']:
1785
1971
  """
@@ -1787,79 +1973,99 @@ class NrqlAlertCondition(pulumi.CustomResource):
1787
1973
  """
1788
1974
  return pulumi.get(self, "nrql")
1789
1975
 
1790
- @property
1976
+ @_builtins.property
1791
1977
  @pulumi.getter(name="openViolationOnExpiration")
1792
- def open_violation_on_expiration(self) -> pulumi.Output[Optional[bool]]:
1978
+ def open_violation_on_expiration(self) -> pulumi.Output[Optional[_builtins.bool]]:
1793
1979
  """
1794
1980
  Whether to create a new incident to capture that the signal expired.
1795
1981
  """
1796
1982
  return pulumi.get(self, "open_violation_on_expiration")
1797
1983
 
1798
- @property
1984
+ @_builtins.property
1799
1985
  @pulumi.getter(name="policyId")
1800
- def policy_id(self) -> pulumi.Output[int]:
1986
+ def policy_id(self) -> pulumi.Output[_builtins.str]:
1801
1987
  """
1802
1988
  The ID of the policy where this condition should be used.
1803
1989
  """
1804
1990
  return pulumi.get(self, "policy_id")
1805
1991
 
1806
- @property
1992
+ @_builtins.property
1807
1993
  @pulumi.getter(name="runbookUrl")
1808
- def runbook_url(self) -> pulumi.Output[Optional[str]]:
1994
+ def runbook_url(self) -> pulumi.Output[Optional[_builtins.str]]:
1809
1995
  """
1810
1996
  Runbook URL to display in notifications.
1811
1997
  """
1812
1998
  return pulumi.get(self, "runbook_url")
1813
1999
 
1814
- @property
2000
+ @_builtins.property
2001
+ @pulumi.getter(name="signalSeasonality")
2002
+ def signal_seasonality(self) -> pulumi.Output[Optional[_builtins.str]]:
2003
+ """
2004
+ Seasonality under which a condition's signal(s) are evaluated. Only available for baseline conditions. Valid values are: `NEW_RELIC_CALCULATION`, `HOURLY`, `DAILY`, `WEEKLY`, or `NONE`. To have New Relic calculate seasonality automatically, set to `NEW_RELIC_CALCULATION`. To turn off seasonality completely, set to `NONE`.
2005
+ """
2006
+ return pulumi.get(self, "signal_seasonality")
2007
+
2008
+ @_builtins.property
1815
2009
  @pulumi.getter(name="slideBy")
1816
- def slide_by(self) -> pulumi.Output[Optional[int]]:
2010
+ def slide_by(self) -> pulumi.Output[Optional[_builtins.int]]:
1817
2011
  """
1818
2012
  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`.
1819
2013
  """
1820
2014
  return pulumi.get(self, "slide_by")
1821
2015
 
1822
- @property
2016
+ @_builtins.property
2017
+ @pulumi.getter(name="targetEntity")
2018
+ def target_entity(self) -> pulumi.Output[Optional[_builtins.str]]:
2019
+ """
2020
+ BETA PREVIEW: The GUID of the entity explicitly targeted by the condition. Issues triggered by this condition will affect the health status of this entity instead of having the affected entity detected automatically. The entity's account ID must be either `account_id` or `nrql.data_account_id`.
2021
+ """
2022
+ return pulumi.get(self, "target_entity")
2023
+
2024
+ @_builtins.property
1823
2025
  @pulumi.getter
2026
+ @_utilities.deprecated("""use `critical` and `warning` attributes instead""")
1824
2027
  def terms(self) -> pulumi.Output[Optional[Sequence['outputs.NrqlAlertConditionTerm']]]:
1825
2028
  """
1826
2029
  **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
1827
2030
  """
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
2031
  return pulumi.get(self, "terms")
1832
2032
 
1833
- @property
2033
+ @_builtins.property
2034
+ @pulumi.getter(name="titleTemplate")
2035
+ def title_template(self) -> pulumi.Output[Optional[_builtins.str]]:
2036
+ """
2037
+ 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.
2038
+ """
2039
+ return pulumi.get(self, "title_template")
2040
+
2041
+ @_builtins.property
1834
2042
  @pulumi.getter
1835
- def type(self) -> pulumi.Output[Optional[str]]:
2043
+ def type(self) -> pulumi.Output[Optional[_builtins.str]]:
1836
2044
  """
1837
2045
  The type of the condition. Valid values are `static` or `baseline`. Defaults to `static`.
1838
2046
  """
1839
2047
  return pulumi.get(self, "type")
1840
2048
 
1841
- @property
2049
+ @_builtins.property
1842
2050
  @pulumi.getter(name="violationTimeLimit")
1843
- def violation_time_limit(self) -> pulumi.Output[str]:
2051
+ @_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
2052
+ def violation_time_limit(self) -> pulumi.Output[_builtins.str]:
1844
2053
  """
1845
2054
  **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
2055
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1847
2056
  """
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
2057
  return pulumi.get(self, "violation_time_limit")
1852
2058
 
1853
- @property
2059
+ @_builtins.property
1854
2060
  @pulumi.getter(name="violationTimeLimitSeconds")
1855
- def violation_time_limit_seconds(self) -> pulumi.Output[Optional[int]]:
2061
+ def violation_time_limit_seconds(self) -> pulumi.Output[Optional[_builtins.int]]:
1856
2062
  """
1857
2063
  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>
1858
2064
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1859
2065
  """
1860
2066
  return pulumi.get(self, "violation_time_limit_seconds")
1861
2067
 
1862
- @property
2068
+ @_builtins.property
1863
2069
  @pulumi.getter
1864
2070
  def warning(self) -> pulumi.Output[Optional['outputs.NrqlAlertConditionWarning']]:
1865
2071
  """