pulumi-newrelic 5.28.0a1723107045__py3-none-any.whl → 5.29.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. pulumi_newrelic/alert_channel.py +69 -69
  2. pulumi_newrelic/alert_condition.py +49 -49
  3. pulumi_newrelic/alert_muting_rule.py +54 -54
  4. pulumi_newrelic/alert_policy.py +16 -16
  5. pulumi_newrelic/alert_policy_channel.py +16 -16
  6. pulumi_newrelic/cloud/aws_govcloud_integrations.py +100 -100
  7. pulumi_newrelic/cloud/aws_integrations.py +798 -798
  8. pulumi_newrelic/cloud/azure_integrations.py +424 -424
  9. pulumi_newrelic/cloud/gcp_integrations.py +288 -288
  10. pulumi_newrelic/entity_tags.py +21 -21
  11. pulumi_newrelic/get_application.py +14 -14
  12. pulumi_newrelic/get_entity.py +4 -4
  13. pulumi_newrelic/get_key_transaction.py +14 -14
  14. pulumi_newrelic/get_notification_destination.py +4 -4
  15. pulumi_newrelic/get_obfuscation_expression.py +10 -10
  16. pulumi_newrelic/get_service_level_alert_helper.py +76 -76
  17. pulumi_newrelic/infra_alert_condition.py +90 -90
  18. pulumi_newrelic/insights/event.py +43 -43
  19. pulumi_newrelic/monitor_downtime.py +52 -52
  20. pulumi_newrelic/notification_channel.py +187 -187
  21. pulumi_newrelic/notification_destination.py +25 -25
  22. pulumi_newrelic/nrql_alert_condition.py +262 -164
  23. pulumi_newrelic/obfuscation_rule.py +15 -15
  24. pulumi_newrelic/one_dashboard.py +10 -10
  25. pulumi_newrelic/one_dashboard_raw.py +75 -75
  26. pulumi_newrelic/plugins/workload.py +101 -101
  27. pulumi_newrelic/pulumi-plugin.json +1 -1
  28. pulumi_newrelic/service_level.py +164 -164
  29. pulumi_newrelic/synthetics/alert_condition.py +32 -32
  30. pulumi_newrelic/synthetics/broken_links_monitor.py +21 -21
  31. pulumi_newrelic/synthetics/cert_check_monitor.py +21 -21
  32. pulumi_newrelic/synthetics/get_private_location.py +6 -6
  33. pulumi_newrelic/synthetics/monitor.py +74 -74
  34. pulumi_newrelic/synthetics/multi_location_alert_condition.py +66 -66
  35. pulumi_newrelic/synthetics/script_monitor.py +58 -58
  36. pulumi_newrelic/synthetics/step_monitor.py +59 -59
  37. pulumi_newrelic/workflow.py +155 -155
  38. {pulumi_newrelic-5.28.0a1723107045.dist-info → pulumi_newrelic-5.29.0.dist-info}/METADATA +1 -1
  39. {pulumi_newrelic-5.28.0a1723107045.dist-info → pulumi_newrelic-5.29.0.dist-info}/RECORD +41 -41
  40. {pulumi_newrelic-5.28.0a1723107045.dist-info → pulumi_newrelic-5.29.0.dist-info}/WHEEL +0 -0
  41. {pulumi_newrelic-5.28.0a1723107045.dist-info → pulumi_newrelic-5.29.0.dist-info}/top_level.txt +0 -0
@@ -97,7 +97,7 @@ class EntityTags(pulumi.CustomResource):
97
97
  resource_name: str,
98
98
  opts: Optional[pulumi.ResourceOptions] = None,
99
99
  guid: Optional[pulumi.Input[str]] = None,
100
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]]] = None,
100
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]]] = None,
101
101
  __props__=None):
102
102
  """
103
103
  Use this resource to create, update, and delete tags for a New Relic One entity.
@@ -114,17 +114,17 @@ class EntityTags(pulumi.CustomResource):
114
114
  foo_entity_tags = newrelic.EntityTags("foo",
115
115
  guid=foo.guid,
116
116
  tags=[
117
- newrelic.EntityTagsTagArgs(
118
- key="my-key",
119
- values=[
117
+ {
118
+ "key": "my-key",
119
+ "values": [
120
120
  "my-value",
121
121
  "my-other-value",
122
122
  ],
123
- ),
124
- newrelic.EntityTagsTagArgs(
125
- key="my-key-2",
126
- values=["my-value-2"],
127
- ),
123
+ },
124
+ {
125
+ "key": "my-key-2",
126
+ "values": ["my-value-2"],
127
+ },
128
128
  ])
129
129
  ```
130
130
 
@@ -143,7 +143,7 @@ class EntityTags(pulumi.CustomResource):
143
143
  :param str resource_name: The name of the resource.
144
144
  :param pulumi.ResourceOptions opts: Options for the resource.
145
145
  :param pulumi.Input[str] guid: The guid of the entity to tag.
146
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
146
+ :param pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
147
147
  """
148
148
  ...
149
149
  @overload
@@ -166,17 +166,17 @@ class EntityTags(pulumi.CustomResource):
166
166
  foo_entity_tags = newrelic.EntityTags("foo",
167
167
  guid=foo.guid,
168
168
  tags=[
169
- newrelic.EntityTagsTagArgs(
170
- key="my-key",
171
- values=[
169
+ {
170
+ "key": "my-key",
171
+ "values": [
172
172
  "my-value",
173
173
  "my-other-value",
174
174
  ],
175
- ),
176
- newrelic.EntityTagsTagArgs(
177
- key="my-key-2",
178
- values=["my-value-2"],
179
- ),
175
+ },
176
+ {
177
+ "key": "my-key-2",
178
+ "values": ["my-value-2"],
179
+ },
180
180
  ])
181
181
  ```
182
182
 
@@ -208,7 +208,7 @@ class EntityTags(pulumi.CustomResource):
208
208
  resource_name: str,
209
209
  opts: Optional[pulumi.ResourceOptions] = None,
210
210
  guid: Optional[pulumi.Input[str]] = None,
211
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]]] = None,
211
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]]] = None,
212
212
  __props__=None):
213
213
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
214
214
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -235,7 +235,7 @@ class EntityTags(pulumi.CustomResource):
235
235
  id: pulumi.Input[str],
236
236
  opts: Optional[pulumi.ResourceOptions] = None,
237
237
  guid: Optional[pulumi.Input[str]] = None,
238
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]]] = None) -> 'EntityTags':
238
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]]] = None) -> 'EntityTags':
239
239
  """
240
240
  Get an existing EntityTags resource's state with the given name, id, and optional extra
241
241
  properties used to qualify the lookup.
@@ -244,7 +244,7 @@ class EntityTags(pulumi.CustomResource):
244
244
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
245
245
  :param pulumi.ResourceOptions opts: Options for the resource.
246
246
  :param pulumi.Input[str] guid: The guid of the entity to tag.
247
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
247
+ :param pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
248
248
  """
249
249
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
250
250
 
@@ -99,13 +99,13 @@ def get_application(name: Optional[str] = None,
99
99
  entities=[app.id],
100
100
  metric="apdex",
101
101
  runbook_url="https://www.example.com",
102
- terms=[newrelic.AlertConditionTermArgs(
103
- duration=5,
104
- operator="below",
105
- priority="critical",
106
- threshold=0.75,
107
- time_function="all",
108
- )])
102
+ terms=[{
103
+ "duration": 5,
104
+ "operator": "below",
105
+ "priority": "critical",
106
+ "threshold": 0.75,
107
+ "time_function": "all",
108
+ }])
109
109
  ```
110
110
 
111
111
 
@@ -146,13 +146,13 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
146
146
  entities=[app.id],
147
147
  metric="apdex",
148
148
  runbook_url="https://www.example.com",
149
- terms=[newrelic.AlertConditionTermArgs(
150
- duration=5,
151
- operator="below",
152
- priority="critical",
153
- threshold=0.75,
154
- time_function="all",
155
- )])
149
+ terms=[{
150
+ "duration": 5,
151
+ "operator": "below",
152
+ "priority": "critical",
153
+ "threshold": 0.75,
154
+ "time_function": "all",
155
+ }])
156
156
  ```
157
157
 
158
158
 
@@ -164,7 +164,7 @@ def get_entity(account_id: Optional[str] = None,
164
164
  ignore_case: Optional[bool] = None,
165
165
  ignore_not_found: Optional[bool] = None,
166
166
  name: Optional[str] = None,
167
- tags: Optional[Sequence[pulumi.InputType['GetEntityTagArgs']]] = None,
167
+ tags: Optional[Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']]] = None,
168
168
  type: Optional[str] = None,
169
169
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEntityResult:
170
170
  """
@@ -179,7 +179,7 @@ def get_entity(account_id: Optional[str] = None,
179
179
 
180
180
  > **WARNING:** Setting the `ignore_not_found` argument to `true` will display an 'entity not found' warning instead of throwing an error. This can lead to downstream errors if the values of attributes exported by this data source are used elsewhere, as all of these values would be null. Please use this argument at your own risk.
181
181
  :param str name: The name of the entity in New Relic One. The first entity matching this name for the given search parameters will be returned.
182
- :param Sequence[pulumi.InputType['GetEntityTagArgs']] tags: A tag applied to the entity. See Nested tag blocks below for details.
182
+ :param Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']] tags: A tag applied to the entity. See Nested tag blocks below for details.
183
183
  :param str type: The entity's type. Valid values are APPLICATION, DASHBOARD, HOST, MONITOR, WORKLOAD, AWSLAMBDAFUNCTION, SERVICE_LEVEL, and KEY_TRANSACTION. Note: Other entity types may also be queryable as the list of entity types may fluctuate over time.
184
184
  """
185
185
  __args__ = dict()
@@ -216,7 +216,7 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
216
216
  ignore_case: Optional[pulumi.Input[Optional[bool]]] = None,
217
217
  ignore_not_found: Optional[pulumi.Input[Optional[bool]]] = None,
218
218
  name: Optional[pulumi.Input[str]] = None,
219
- tags: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEntityTagArgs']]]]] = None,
219
+ tags: Optional[pulumi.Input[Optional[Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']]]]] = None,
220
220
  type: Optional[pulumi.Input[Optional[str]]] = None,
221
221
  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetEntityResult]:
222
222
  """
@@ -231,7 +231,7 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
231
231
 
232
232
  > **WARNING:** Setting the `ignore_not_found` argument to `true` will display an 'entity not found' warning instead of throwing an error. This can lead to downstream errors if the values of attributes exported by this data source are used elsewhere, as all of these values would be null. Please use this argument at your own risk.
233
233
  :param str name: The name of the entity in New Relic One. The first entity matching this name for the given search parameters will be returned.
234
- :param Sequence[pulumi.InputType['GetEntityTagArgs']] tags: A tag applied to the entity. See Nested tag blocks below for details.
234
+ :param Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']] tags: A tag applied to the entity. See Nested tag blocks below for details.
235
235
  :param str type: The entity's type. Valid values are APPLICATION, DASHBOARD, HOST, MONITOR, WORKLOAD, AWSLAMBDAFUNCTION, SERVICE_LEVEL, and KEY_TRANSACTION. Note: Other entity types may also be queryable as the list of entity types may fluctuate over time.
236
236
  """
237
237
  ...
@@ -73,13 +73,13 @@ def get_key_transaction(name: Optional[str] = None,
73
73
  entities=[txn.id],
74
74
  metric="error_percentage",
75
75
  runbook_url="https://www.example.com",
76
- terms=[newrelic.AlertConditionTermArgs(
77
- duration=5,
78
- operator="below",
79
- priority="critical",
80
- threshold=0.75,
81
- time_function="all",
82
- )])
76
+ terms=[{
77
+ "duration": 5,
78
+ "operator": "below",
79
+ "priority": "critical",
80
+ "threshold": 0.75,
81
+ "time_function": "all",
82
+ }])
83
83
  ```
84
84
 
85
85
 
@@ -116,13 +116,13 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
116
116
  entities=[txn.id],
117
117
  metric="error_percentage",
118
118
  runbook_url="https://www.example.com",
119
- terms=[newrelic.AlertConditionTermArgs(
120
- duration=5,
121
- operator="below",
122
- priority="critical",
123
- threshold=0.75,
124
- time_function="all",
125
- )])
119
+ terms=[{
120
+ "duration": 5,
121
+ "operator": "below",
122
+ "priority": "critical",
123
+ "threshold": 0.75,
124
+ "time_function": "all",
125
+ }])
126
126
  ```
127
127
 
128
128
 
@@ -139,7 +139,7 @@ class AwaitableGetNotificationDestinationResult(GetNotificationDestinationResult
139
139
  def get_notification_destination(account_id: Optional[str] = None,
140
140
  id: Optional[str] = None,
141
141
  name: Optional[str] = None,
142
- secure_urls: Optional[Sequence[pulumi.InputType['GetNotificationDestinationSecureUrlArgs']]] = None,
142
+ secure_urls: Optional[Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']]] = None,
143
143
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNotificationDestinationResult:
144
144
  """
145
145
  Use this data source to access information about an existing resource.
@@ -149,7 +149,7 @@ def get_notification_destination(account_id: Optional[str] = None,
149
149
  :param str name: The name of the notification destination.
150
150
 
151
151
  Optional:
152
- :param Sequence[pulumi.InputType['GetNotificationDestinationSecureUrlArgs']] secure_urls: The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
152
+ :param Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']] secure_urls: The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
153
153
  """
154
154
  __args__ = dict()
155
155
  __args__['accountId'] = account_id
@@ -175,7 +175,7 @@ def get_notification_destination(account_id: Optional[str] = None,
175
175
  def get_notification_destination_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
176
176
  id: Optional[pulumi.Input[Optional[str]]] = None,
177
177
  name: Optional[pulumi.Input[Optional[str]]] = None,
178
- secure_urls: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetNotificationDestinationSecureUrlArgs']]]]] = None,
178
+ secure_urls: Optional[pulumi.Input[Optional[Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']]]]] = None,
179
179
  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNotificationDestinationResult]:
180
180
  """
181
181
  Use this data source to access information about an existing resource.
@@ -185,6 +185,6 @@ def get_notification_destination_output(account_id: Optional[pulumi.Input[Option
185
185
  :param str name: The name of the notification destination.
186
186
 
187
187
  Optional:
188
- :param Sequence[pulumi.InputType['GetNotificationDestinationSecureUrlArgs']] secure_urls: The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
188
+ :param Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']] secure_urls: The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
189
189
  """
190
190
  ...
@@ -81,11 +81,11 @@ def get_obfuscation_expression(account_id: Optional[str] = None,
81
81
  description="description of the rule",
82
82
  filter="hostStatus=running",
83
83
  enabled=True,
84
- actions=[newrelic.ObfuscationRuleActionArgs(
85
- attributes=["message"],
86
- expression_id=expression.id,
87
- method="MASK",
88
- )])
84
+ actions=[{
85
+ "attributes": ["message"],
86
+ "expression_id": expression.id,
87
+ "method": "MASK",
88
+ }])
89
89
  ```
90
90
 
91
91
 
@@ -124,11 +124,11 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
124
124
  description="description of the rule",
125
125
  filter="hostStatus=running",
126
126
  enabled=True,
127
- actions=[newrelic.ObfuscationRuleActionArgs(
128
- attributes=["message"],
129
- expression_id=expression.id,
130
- method="MASK",
131
- )])
127
+ actions=[{
128
+ "attributes": ["message"],
129
+ "expression_id": expression.id,
130
+ "method": "MASK",
131
+ }])
132
132
  ```
133
133
 
134
134
 
@@ -180,26 +180,26 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
180
180
  guid="MXxBUE18QVBQTElDQVRJT058MQ",
181
181
  name="Latency",
182
182
  description="Proportion of requests that are served faster than a threshold.",
183
- events=newrelic.ServiceLevelEventsArgs(
184
- account_id="12345678",
185
- valid_events=newrelic.ServiceLevelEventsValidEventsArgs(
186
- from_="Transaction",
187
- where="appName = 'Example application' AND (transactionType='Web')",
188
- ),
189
- bad_events=newrelic.ServiceLevelEventsBadEventsArgs(
190
- from_="Transaction",
191
- where="appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
192
- ),
193
- ),
194
- objective=newrelic.ServiceLevelObjectiveArgs(
195
- target=foo_target,
196
- time_window=newrelic.ServiceLevelObjectiveTimeWindowArgs(
197
- rolling=newrelic.ServiceLevelObjectiveTimeWindowRollingArgs(
198
- count=foo_period,
199
- unit="DAY",
200
- ),
201
- ),
202
- ))
183
+ events={
184
+ "account_id": "12345678",
185
+ "valid_events": {
186
+ "from_": "Transaction",
187
+ "where": "appName = 'Example application' AND (transactionType='Web')",
188
+ },
189
+ "bad_events": {
190
+ "from_": "Transaction",
191
+ "where": "appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
192
+ },
193
+ },
194
+ objective={
195
+ "target": foo_target,
196
+ "time_window": {
197
+ "rolling": {
198
+ "count": foo_period,
199
+ "unit": "DAY",
200
+ },
201
+ },
202
+ })
203
203
  ```
204
204
  Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
205
205
  Note that the Service Level was set up using bad events, that's why `is_bad_events` is set to `true`.
@@ -223,15 +223,15 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
223
223
  name="Slow burn alert",
224
224
  enabled=True,
225
225
  violation_time_limit_seconds=259200,
226
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
227
- query=foo_slow_burn.nrql,
228
- ),
229
- critical=newrelic.NrqlAlertConditionCriticalArgs(
230
- operator="above_or_equals",
231
- threshold=foo_slow_burn.threshold,
232
- threshold_duration=900,
233
- threshold_occurrences="at_least_once",
234
- ),
226
+ nrql={
227
+ "query": foo_slow_burn.nrql,
228
+ },
229
+ critical={
230
+ "operator": "above_or_equals",
231
+ "threshold": foo_slow_burn.threshold,
232
+ "threshold_duration": 900,
233
+ "threshold_occurrences": "at_least_once",
234
+ },
235
235
  fill_option="none",
236
236
  aggregation_window=foo_slow_burn.evaluation_period,
237
237
  aggregation_method="event_flow",
@@ -259,15 +259,15 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
259
259
  name="Custom burn alert",
260
260
  enabled=True,
261
261
  violation_time_limit_seconds=259200,
262
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
263
- query=foo_custom.nrql,
264
- ),
265
- critical=newrelic.NrqlAlertConditionCriticalArgs(
266
- operator="above_or_equals",
267
- threshold=foo_custom.threshold,
268
- threshold_duration=900,
269
- threshold_occurrences="at_least_once",
270
- ),
262
+ nrql={
263
+ "query": foo_custom.nrql,
264
+ },
265
+ critical={
266
+ "operator": "above_or_equals",
267
+ "threshold": foo_custom.threshold,
268
+ "threshold_duration": 900,
269
+ "threshold_occurrences": "at_least_once",
270
+ },
271
271
  fill_option="none",
272
272
  aggregation_window=foo_custom.evaluation_period,
273
273
  aggregation_method="event_flow",
@@ -336,26 +336,26 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
336
336
  guid="MXxBUE18QVBQTElDQVRJT058MQ",
337
337
  name="Latency",
338
338
  description="Proportion of requests that are served faster than a threshold.",
339
- events=newrelic.ServiceLevelEventsArgs(
340
- account_id="12345678",
341
- valid_events=newrelic.ServiceLevelEventsValidEventsArgs(
342
- from_="Transaction",
343
- where="appName = 'Example application' AND (transactionType='Web')",
344
- ),
345
- bad_events=newrelic.ServiceLevelEventsBadEventsArgs(
346
- from_="Transaction",
347
- where="appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
348
- ),
349
- ),
350
- objective=newrelic.ServiceLevelObjectiveArgs(
351
- target=foo_target,
352
- time_window=newrelic.ServiceLevelObjectiveTimeWindowArgs(
353
- rolling=newrelic.ServiceLevelObjectiveTimeWindowRollingArgs(
354
- count=foo_period,
355
- unit="DAY",
356
- ),
357
- ),
358
- ))
339
+ events={
340
+ "account_id": "12345678",
341
+ "valid_events": {
342
+ "from_": "Transaction",
343
+ "where": "appName = 'Example application' AND (transactionType='Web')",
344
+ },
345
+ "bad_events": {
346
+ "from_": "Transaction",
347
+ "where": "appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
348
+ },
349
+ },
350
+ objective={
351
+ "target": foo_target,
352
+ "time_window": {
353
+ "rolling": {
354
+ "count": foo_period,
355
+ "unit": "DAY",
356
+ },
357
+ },
358
+ })
359
359
  ```
360
360
  Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
361
361
  Note that the Service Level was set up using bad events, that's why `is_bad_events` is set to `true`.
@@ -379,15 +379,15 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
379
379
  name="Slow burn alert",
380
380
  enabled=True,
381
381
  violation_time_limit_seconds=259200,
382
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
383
- query=foo_slow_burn.nrql,
384
- ),
385
- critical=newrelic.NrqlAlertConditionCriticalArgs(
386
- operator="above_or_equals",
387
- threshold=foo_slow_burn.threshold,
388
- threshold_duration=900,
389
- threshold_occurrences="at_least_once",
390
- ),
382
+ nrql={
383
+ "query": foo_slow_burn.nrql,
384
+ },
385
+ critical={
386
+ "operator": "above_or_equals",
387
+ "threshold": foo_slow_burn.threshold,
388
+ "threshold_duration": 900,
389
+ "threshold_occurrences": "at_least_once",
390
+ },
391
391
  fill_option="none",
392
392
  aggregation_window=foo_slow_burn.evaluation_period,
393
393
  aggregation_method="event_flow",
@@ -415,15 +415,15 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
415
415
  name="Custom burn alert",
416
416
  enabled=True,
417
417
  violation_time_limit_seconds=259200,
418
- nrql=newrelic.NrqlAlertConditionNrqlArgs(
419
- query=foo_custom.nrql,
420
- ),
421
- critical=newrelic.NrqlAlertConditionCriticalArgs(
422
- operator="above_or_equals",
423
- threshold=foo_custom.threshold,
424
- threshold_duration=900,
425
- threshold_occurrences="at_least_once",
426
- ),
418
+ nrql={
419
+ "query": foo_custom.nrql,
420
+ },
421
+ critical={
422
+ "operator": "above_or_equals",
423
+ "threshold": foo_custom.threshold,
424
+ "threshold_duration": 900,
425
+ "threshold_occurrences": "at_least_once",
426
+ },
427
427
  fill_option="none",
428
428
  aggregation_window=foo_custom.evaluation_period,
429
429
  aggregation_method="event_flow",