pulumi-newrelic 5.23.0__py3-none-any.whl → 5.23.0a1711605988__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 (68) hide show
  1. pulumi_newrelic/_inputs.py +270 -183
  2. pulumi_newrelic/account_management.py +20 -20
  3. pulumi_newrelic/alert_channel.py +92 -76
  4. pulumi_newrelic/alert_condition.py +163 -104
  5. pulumi_newrelic/alert_muting_rule.py +35 -33
  6. pulumi_newrelic/alert_policy.py +43 -68
  7. pulumi_newrelic/alert_policy_channel.py +8 -12
  8. pulumi_newrelic/cloud/_inputs.py +1072 -322
  9. pulumi_newrelic/cloud/aws_govcloud_link_account.py +6 -4
  10. pulumi_newrelic/cloud/aws_integrations.py +15 -13
  11. pulumi_newrelic/cloud/aws_link_account.py +6 -4
  12. pulumi_newrelic/cloud/azure_integrations.py +12 -10
  13. pulumi_newrelic/cloud/azure_link_account.py +6 -4
  14. pulumi_newrelic/cloud/gcp_integrations.py +6 -6
  15. pulumi_newrelic/cloud/gcp_link_account.py +6 -4
  16. pulumi_newrelic/cloud/outputs.py +1072 -322
  17. pulumi_newrelic/data_partition_rule.py +4 -0
  18. pulumi_newrelic/entity_tags.py +17 -13
  19. pulumi_newrelic/events_to_metrics_rule.py +4 -2
  20. pulumi_newrelic/get_account.py +4 -0
  21. pulumi_newrelic/get_application.py +10 -8
  22. pulumi_newrelic/get_authentication_domain.py +8 -4
  23. pulumi_newrelic/get_cloud_account.py +4 -0
  24. pulumi_newrelic/get_entity.py +33 -48
  25. pulumi_newrelic/get_group.py +8 -42
  26. pulumi_newrelic/get_key_transaction.py +10 -8
  27. pulumi_newrelic/get_notification_destination.py +1 -20
  28. pulumi_newrelic/get_obfuscation_expression.py +4 -2
  29. pulumi_newrelic/get_service_level_alert_helper.py +46 -22
  30. pulumi_newrelic/get_test_grok_pattern.py +6 -4
  31. pulumi_newrelic/get_user.py +4 -0
  32. pulumi_newrelic/group.py +42 -40
  33. pulumi_newrelic/infra_alert_condition.py +145 -154
  34. pulumi_newrelic/insights/event.py +25 -8
  35. pulumi_newrelic/log_parsing_rule.py +10 -6
  36. pulumi_newrelic/monitor_downtime.py +193 -174
  37. pulumi_newrelic/notification_channel.py +150 -124
  38. pulumi_newrelic/notification_destination.py +1 -95
  39. pulumi_newrelic/nrql_alert_condition.py +48 -38
  40. pulumi_newrelic/nrql_drop_rule.py +38 -34
  41. pulumi_newrelic/obfuscation_expression.py +4 -2
  42. pulumi_newrelic/obfuscation_rule.py +4 -4
  43. pulumi_newrelic/one_dashboard.py +48 -42
  44. pulumi_newrelic/one_dashboard_raw.py +86 -86
  45. pulumi_newrelic/outputs.py +270 -180
  46. pulumi_newrelic/plugins/_inputs.py +16 -16
  47. pulumi_newrelic/plugins/application_settings.py +36 -20
  48. pulumi_newrelic/plugins/outputs.py +16 -16
  49. pulumi_newrelic/plugins/workload.py +40 -158
  50. pulumi_newrelic/service_level.py +123 -38
  51. pulumi_newrelic/synthetics/alert_condition.py +78 -34
  52. pulumi_newrelic/synthetics/broken_links_monitor.py +20 -18
  53. pulumi_newrelic/synthetics/cert_check_monitor.py +18 -16
  54. pulumi_newrelic/synthetics/get_private_location.py +8 -0
  55. pulumi_newrelic/synthetics/get_secure_credential.py +12 -0
  56. pulumi_newrelic/synthetics/monitor.py +52 -48
  57. pulumi_newrelic/synthetics/multi_location_alert_condition.py +83 -69
  58. pulumi_newrelic/synthetics/private_location.py +6 -6
  59. pulumi_newrelic/synthetics/script_monitor.py +42 -38
  60. pulumi_newrelic/synthetics/secure_credential.py +22 -25
  61. pulumi_newrelic/synthetics/step_monitor.py +20 -18
  62. pulumi_newrelic/user.py +10 -8
  63. pulumi_newrelic/workflow.py +24 -20
  64. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/METADATA +1 -1
  65. pulumi_newrelic-5.23.0a1711605988.dist-info/RECORD +89 -0
  66. pulumi_newrelic-5.23.0.dist-info/RECORD +0 -89
  67. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/WHEEL +0 -0
  68. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/top_level.txt +0 -0
@@ -60,15 +60,15 @@ def get_key_transaction(name: Optional[str] = None,
60
60
 
61
61
  ## Example Usage
62
62
 
63
+ <!--Start PulumiCodeChooser -->
63
64
  ```python
64
65
  import pulumi
65
66
  import pulumi_newrelic as newrelic
66
67
 
67
68
  txn = newrelic.get_key_transaction(name="txn")
68
- foo = newrelic.AlertPolicy("foo", name="foo")
69
- foo_alert_condition = newrelic.AlertCondition("foo",
70
- policy_id=foo.id,
71
- name="foo",
69
+ foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
70
+ foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
71
+ policy_id=foo_alert_policy.id,
72
72
  type="apm_kt_metric",
73
73
  entities=[txn.id],
74
74
  metric="error_percentage",
@@ -81,6 +81,7 @@ def get_key_transaction(name: Optional[str] = None,
81
81
  time_function="all",
82
82
  )])
83
83
  ```
84
+ <!--End PulumiCodeChooser -->
84
85
 
85
86
 
86
87
  :param str name: The name of the key transaction in New Relic.
@@ -103,15 +104,15 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
103
104
 
104
105
  ## Example Usage
105
106
 
107
+ <!--Start PulumiCodeChooser -->
106
108
  ```python
107
109
  import pulumi
108
110
  import pulumi_newrelic as newrelic
109
111
 
110
112
  txn = newrelic.get_key_transaction(name="txn")
111
- foo = newrelic.AlertPolicy("foo", name="foo")
112
- foo_alert_condition = newrelic.AlertCondition("foo",
113
- policy_id=foo.id,
114
- name="foo",
113
+ foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
114
+ foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
115
+ policy_id=foo_alert_policy.id,
115
116
  type="apm_kt_metric",
116
117
  entities=[txn.id],
117
118
  metric="error_percentage",
@@ -124,6 +125,7 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
124
125
  time_function="all",
125
126
  )])
126
127
  ```
128
+ <!--End PulumiCodeChooser -->
127
129
 
128
130
 
129
131
  :param str name: The name of the key transaction in New Relic.
@@ -9,7 +9,6 @@ import pulumi.runtime
9
9
  from typing import Any, Mapping, Optional, Sequence, Union, overload
10
10
  from . import _utilities
11
11
  from . import outputs
12
- from ._inputs import *
13
12
 
14
13
  __all__ = [
15
14
  'GetNotificationDestinationResult',
@@ -23,7 +22,7 @@ class GetNotificationDestinationResult:
23
22
  """
24
23
  A collection of values returned by getNotificationDestination.
25
24
  """
26
- def __init__(__self__, account_id=None, active=None, guid=None, id=None, name=None, properties=None, secure_urls=None, status=None, type=None):
25
+ def __init__(__self__, account_id=None, active=None, guid=None, id=None, name=None, properties=None, status=None, type=None):
27
26
  if account_id and not isinstance(account_id, int):
28
27
  raise TypeError("Expected argument 'account_id' to be a int")
29
28
  pulumi.set(__self__, "account_id", account_id)
@@ -42,9 +41,6 @@ class GetNotificationDestinationResult:
42
41
  if properties and not isinstance(properties, list):
43
42
  raise TypeError("Expected argument 'properties' to be a list")
44
43
  pulumi.set(__self__, "properties", properties)
45
- if secure_urls and not isinstance(secure_urls, list):
46
- raise TypeError("Expected argument 'secure_urls' to be a list")
47
- pulumi.set(__self__, "secure_urls", secure_urls)
48
44
  if status and not isinstance(status, str):
49
45
  raise TypeError("Expected argument 'status' to be a str")
50
46
  pulumi.set(__self__, "status", status)
@@ -94,14 +90,6 @@ class GetNotificationDestinationResult:
94
90
  """
95
91
  return pulumi.get(self, "properties")
96
92
 
97
- @property
98
- @pulumi.getter(name="secureUrls")
99
- def secure_urls(self) -> Sequence['outputs.GetNotificationDestinationSecureUrlResult']:
100
- """
101
- The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
102
- """
103
- return pulumi.get(self, "secure_urls")
104
-
105
93
  @property
106
94
  @pulumi.getter
107
95
  def status(self) -> str:
@@ -131,7 +119,6 @@ class AwaitableGetNotificationDestinationResult(GetNotificationDestinationResult
131
119
  id=self.id,
132
120
  name=self.name,
133
121
  properties=self.properties,
134
- secure_urls=self.secure_urls,
135
122
  status=self.status,
136
123
  type=self.type)
137
124
 
@@ -139,7 +126,6 @@ class AwaitableGetNotificationDestinationResult(GetNotificationDestinationResult
139
126
  def get_notification_destination(account_id: Optional[int] = None,
140
127
  id: Optional[str] = None,
141
128
  name: Optional[str] = None,
142
- secure_urls: Optional[Sequence[pulumi.InputType['GetNotificationDestinationSecureUrlArgs']]] = None,
143
129
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNotificationDestinationResult:
144
130
  """
145
131
  Use this data source to access information about an existing resource.
@@ -149,13 +135,11 @@ def get_notification_destination(account_id: Optional[int] = None,
149
135
  :param str name: The name of the notification destination.
150
136
 
151
137
  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.
153
138
  """
154
139
  __args__ = dict()
155
140
  __args__['accountId'] = account_id
156
141
  __args__['id'] = id
157
142
  __args__['name'] = name
158
- __args__['secureUrls'] = secure_urls
159
143
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
160
144
  __ret__ = pulumi.runtime.invoke('newrelic:index/getNotificationDestination:getNotificationDestination', __args__, opts=opts, typ=GetNotificationDestinationResult).value
161
145
 
@@ -166,7 +150,6 @@ def get_notification_destination(account_id: Optional[int] = None,
166
150
  id=pulumi.get(__ret__, 'id'),
167
151
  name=pulumi.get(__ret__, 'name'),
168
152
  properties=pulumi.get(__ret__, 'properties'),
169
- secure_urls=pulumi.get(__ret__, 'secure_urls'),
170
153
  status=pulumi.get(__ret__, 'status'),
171
154
  type=pulumi.get(__ret__, 'type'))
172
155
 
@@ -175,7 +158,6 @@ def get_notification_destination(account_id: Optional[int] = None,
175
158
  def get_notification_destination_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
176
159
  id: Optional[pulumi.Input[Optional[str]]] = None,
177
160
  name: Optional[pulumi.Input[Optional[str]]] = None,
178
- secure_urls: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetNotificationDestinationSecureUrlArgs']]]]] = None,
179
161
  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNotificationDestinationResult]:
180
162
  """
181
163
  Use this data source to access information about an existing resource.
@@ -185,6 +167,5 @@ def get_notification_destination_output(account_id: Optional[pulumi.Input[Option
185
167
  :param str name: The name of the notification destination.
186
168
 
187
169
  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.
189
170
  """
190
171
  ...
@@ -70,6 +70,7 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
70
70
 
71
71
  ## Example Usage
72
72
 
73
+ <!--Start PulumiCodeChooser -->
73
74
  ```python
74
75
  import pulumi
75
76
  import pulumi_newrelic as newrelic
@@ -77,7 +78,6 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
77
78
  expression = newrelic.get_obfuscation_expression(account_id=123456,
78
79
  name="The expression")
79
80
  rule = newrelic.ObfuscationRule("rule",
80
- name="ruleName",
81
81
  description="description of the rule",
82
82
  filter="hostStatus=running",
83
83
  enabled=True,
@@ -87,6 +87,7 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
87
87
  method="MASK",
88
88
  )])
89
89
  ```
90
+ <!--End PulumiCodeChooser -->
90
91
 
91
92
 
92
93
  :param int account_id: The account id associated with the obfuscation expression. If left empty will default to account ID specified in provider level configuration.
@@ -113,6 +114,7 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
113
114
 
114
115
  ## Example Usage
115
116
 
117
+ <!--Start PulumiCodeChooser -->
116
118
  ```python
117
119
  import pulumi
118
120
  import pulumi_newrelic as newrelic
@@ -120,7 +122,6 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
120
122
  expression = newrelic.get_obfuscation_expression(account_id=123456,
121
123
  name="The expression")
122
124
  rule = newrelic.ObfuscationRule("rule",
123
- name="ruleName",
124
125
  description="description of the rule",
125
126
  filter="hostStatus=running",
126
127
  enabled=True,
@@ -130,6 +131,7 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
130
131
  method="MASK",
131
132
  )])
132
133
  ```
134
+ <!--End PulumiCodeChooser -->
133
135
 
134
136
 
135
137
  :param int account_id: The account id associated with the obfuscation expression. If left empty will default to account ID specified in provider level configuration.
@@ -170,6 +170,7 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
170
170
 
171
171
  Firstly set up your service level objective, we recommend using local variables for the `target` and `time_window.rolling.count`, as they are also necessary for the helper.
172
172
 
173
+ <!--Start PulumiCodeChooser -->
173
174
  ```python
174
175
  import pulumi
175
176
  import pulumi_newrelic as newrelic
@@ -178,7 +179,6 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
178
179
  foo_period = 28
179
180
  foo = newrelic.ServiceLevel("foo",
180
181
  guid="MXxBUE18QVBQTElDQVRJT058MQ",
181
- name="Latency",
182
182
  description="Proportion of requests that are served faster than a threshold.",
183
183
  events=newrelic.ServiceLevelEventsArgs(
184
184
  account_id=12345678,
@@ -201,26 +201,27 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
201
201
  ),
202
202
  ))
203
203
  ```
204
+ <!--End PulumiCodeChooser -->
204
205
  Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
205
206
  Note that the Service Level was set up using bad events, that's why `is_bad_events` is set to `true`.
206
207
  If the Service Level was configured with good events that would be unnecessary as the field defaults to `false`.
207
208
 
208
209
  Here is an example of a `slow_burn` alert.
209
210
 
211
+ <!--Start PulumiCodeChooser -->
210
212
  ```python
211
213
  import pulumi
212
214
  import pulumi_newrelic as newrelic
213
215
 
214
216
  foo_slow_burn = newrelic.get_service_level_alert_helper(alert_type="slow_burn",
215
- sli_guid=foo["sliGuid"],
216
- slo_target=foo_target,
217
- slo_period=foo_period,
217
+ sli_guid=newrelic_service_level["foo"]["sli_guid"],
218
+ slo_target=local["foo_target"],
219
+ slo_period=local["foo_period"],
218
220
  is_bad_events=True)
219
- your_condition = newrelic.NrqlAlertCondition("your_condition",
221
+ your_condition = newrelic.NrqlAlertCondition("yourCondition",
220
222
  account_id=12345678,
221
223
  policy_id=67890,
222
224
  type="static",
223
- name="Slow burn alert",
224
225
  enabled=True,
225
226
  violation_time_limit_seconds=259200,
226
227
  nrql=newrelic.NrqlAlertConditionNrqlArgs(
@@ -238,25 +239,26 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
238
239
  aggregation_delay="120",
239
240
  slide_by=900)
240
241
  ```
242
+ <!--End PulumiCodeChooser -->
241
243
 
242
244
  Here is an example of a custom alert:
243
245
 
246
+ <!--Start PulumiCodeChooser -->
244
247
  ```python
245
248
  import pulumi
246
249
  import pulumi_newrelic as newrelic
247
250
 
248
251
  foo_custom = newrelic.get_service_level_alert_helper(alert_type="custom",
249
- sli_guid=foo["sliGuid"],
250
- slo_target=foo_target,
251
- slo_period=foo_period,
252
+ sli_guid=newrelic_service_level["foo"]["sli_guid"],
253
+ slo_target=local["foo_target"],
254
+ slo_period=local["foo_period"],
252
255
  custom_tolerated_budget_consumption=4,
253
256
  custom_evaluation_period=5400,
254
257
  is_bad_events=True)
255
- your_condition = newrelic.NrqlAlertCondition("your_condition",
258
+ your_condition = newrelic.NrqlAlertCondition("yourCondition",
256
259
  account_id=12345678,
257
260
  policy_id=67890,
258
261
  type="static",
259
- name="Custom burn alert",
260
262
  enabled=True,
261
263
  violation_time_limit_seconds=259200,
262
264
  nrql=newrelic.NrqlAlertConditionNrqlArgs(
@@ -274,6 +276,16 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
274
276
  aggregation_delay="120",
275
277
  slide_by=60)
276
278
  ```
279
+ <!--End PulumiCodeChooser -->
280
+
281
+
282
+ :param str alert_type: The type of alert we want to set. Valid values are:
283
+ :param int custom_evaluation_period: Aggregation window taken into consideration in seconds. Mandatory if `alert_type` is `custom`.
284
+ :param float custom_tolerated_budget_consumption: How much budget you tolerate to consume during the custom evaluation period, valid values between `0` and `100`. Mandatory if `alert_type` is `custom`.
285
+ :param bool is_bad_events: If the SLI is defined using bad events. Defaults to `false`
286
+ :param str sli_guid: The guid of the sli we want to set the alert on.
287
+ :param int slo_period: The time window of the Service Level Objective in days. Valid values are `1`, `7` and `28`.
288
+ :param float slo_target: The target of the Service Level Objective, valid values between `0` and `100`.
277
289
  """
278
290
  __args__ = dict()
279
291
  __args__['alertType'] = alert_type
@@ -317,6 +329,7 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
317
329
 
318
330
  Firstly set up your service level objective, we recommend using local variables for the `target` and `time_window.rolling.count`, as they are also necessary for the helper.
319
331
 
332
+ <!--Start PulumiCodeChooser -->
320
333
  ```python
321
334
  import pulumi
322
335
  import pulumi_newrelic as newrelic
@@ -325,7 +338,6 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
325
338
  foo_period = 28
326
339
  foo = newrelic.ServiceLevel("foo",
327
340
  guid="MXxBUE18QVBQTElDQVRJT058MQ",
328
- name="Latency",
329
341
  description="Proportion of requests that are served faster than a threshold.",
330
342
  events=newrelic.ServiceLevelEventsArgs(
331
343
  account_id=12345678,
@@ -348,26 +360,27 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
348
360
  ),
349
361
  ))
350
362
  ```
363
+ <!--End PulumiCodeChooser -->
351
364
  Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
352
365
  Note that the Service Level was set up using bad events, that's why `is_bad_events` is set to `true`.
353
366
  If the Service Level was configured with good events that would be unnecessary as the field defaults to `false`.
354
367
 
355
368
  Here is an example of a `slow_burn` alert.
356
369
 
370
+ <!--Start PulumiCodeChooser -->
357
371
  ```python
358
372
  import pulumi
359
373
  import pulumi_newrelic as newrelic
360
374
 
361
375
  foo_slow_burn = newrelic.get_service_level_alert_helper(alert_type="slow_burn",
362
- sli_guid=foo["sliGuid"],
363
- slo_target=foo_target,
364
- slo_period=foo_period,
376
+ sli_guid=newrelic_service_level["foo"]["sli_guid"],
377
+ slo_target=local["foo_target"],
378
+ slo_period=local["foo_period"],
365
379
  is_bad_events=True)
366
- your_condition = newrelic.NrqlAlertCondition("your_condition",
380
+ your_condition = newrelic.NrqlAlertCondition("yourCondition",
367
381
  account_id=12345678,
368
382
  policy_id=67890,
369
383
  type="static",
370
- name="Slow burn alert",
371
384
  enabled=True,
372
385
  violation_time_limit_seconds=259200,
373
386
  nrql=newrelic.NrqlAlertConditionNrqlArgs(
@@ -385,25 +398,26 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
385
398
  aggregation_delay="120",
386
399
  slide_by=900)
387
400
  ```
401
+ <!--End PulumiCodeChooser -->
388
402
 
389
403
  Here is an example of a custom alert:
390
404
 
405
+ <!--Start PulumiCodeChooser -->
391
406
  ```python
392
407
  import pulumi
393
408
  import pulumi_newrelic as newrelic
394
409
 
395
410
  foo_custom = newrelic.get_service_level_alert_helper(alert_type="custom",
396
- sli_guid=foo["sliGuid"],
397
- slo_target=foo_target,
398
- slo_period=foo_period,
411
+ sli_guid=newrelic_service_level["foo"]["sli_guid"],
412
+ slo_target=local["foo_target"],
413
+ slo_period=local["foo_period"],
399
414
  custom_tolerated_budget_consumption=4,
400
415
  custom_evaluation_period=5400,
401
416
  is_bad_events=True)
402
- your_condition = newrelic.NrqlAlertCondition("your_condition",
417
+ your_condition = newrelic.NrqlAlertCondition("yourCondition",
403
418
  account_id=12345678,
404
419
  policy_id=67890,
405
420
  type="static",
406
- name="Custom burn alert",
407
421
  enabled=True,
408
422
  violation_time_limit_seconds=259200,
409
423
  nrql=newrelic.NrqlAlertConditionNrqlArgs(
@@ -421,5 +435,15 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
421
435
  aggregation_delay="120",
422
436
  slide_by=60)
423
437
  ```
438
+ <!--End PulumiCodeChooser -->
439
+
440
+
441
+ :param str alert_type: The type of alert we want to set. Valid values are:
442
+ :param int custom_evaluation_period: Aggregation window taken into consideration in seconds. Mandatory if `alert_type` is `custom`.
443
+ :param float custom_tolerated_budget_consumption: How much budget you tolerate to consume during the custom evaluation period, valid values between `0` and `100`. Mandatory if `alert_type` is `custom`.
444
+ :param bool is_bad_events: If the SLI is defined using bad events. Defaults to `false`
445
+ :param str sli_guid: The guid of the sli we want to set the alert on.
446
+ :param int slo_period: The time window of the Service Level Objective in days. Valid values are `1`, `7` and `28`.
447
+ :param float slo_target: The target of the Service Level Objective, valid values between `0` and `100`.
424
448
  """
425
449
  ...
@@ -91,17 +91,18 @@ def get_test_grok_pattern(account_id: Optional[int] = None,
91
91
  """
92
92
  ## Example Usage
93
93
 
94
+ <!--Start PulumiCodeChooser -->
94
95
  ```python
95
96
  import pulumi
96
97
  import pulumi_newrelic as newrelic
97
98
 
98
- # Data source
99
- foo = newrelic.get_test_grok_pattern(grok="%{IP:host_ip}",
99
+ foo = newrelic.get_test_grok_pattern(grok="%%{IP:host_ip}",
100
100
  log_lines=[
101
101
  "host_ip: 43.3.120.2",
102
102
  "bytes_received: 2048",
103
103
  ])
104
104
  ```
105
+ <!--End PulumiCodeChooser -->
105
106
 
106
107
 
107
108
  :param int account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
@@ -131,17 +132,18 @@ def get_test_grok_pattern_output(account_id: Optional[pulumi.Input[Optional[int]
131
132
  """
132
133
  ## Example Usage
133
134
 
135
+ <!--Start PulumiCodeChooser -->
134
136
  ```python
135
137
  import pulumi
136
138
  import pulumi_newrelic as newrelic
137
139
 
138
- # Data source
139
- foo = newrelic.get_test_grok_pattern(grok="%{IP:host_ip}",
140
+ foo = newrelic.get_test_grok_pattern(grok="%%{IP:host_ip}",
140
141
  log_lines=[
141
142
  "host_ip: 43.3.120.2",
142
143
  "bytes_received: 2048",
143
144
  ])
144
145
  ```
146
+ <!--End PulumiCodeChooser -->
145
147
 
146
148
 
147
149
  :param int account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
@@ -81,6 +81,7 @@ def get_user(authentication_domain_id: Optional[str] = None,
81
81
  ## Example Usage
82
82
 
83
83
  The below example illustrates fetching a the ID of a user (and other arguments) using the ID of the authentication domain the user belongs to, as well as a name and/or email ID, which can be used as criteria to search for a user who matches these specified parameters.
84
+ <!--Start PulumiCodeChooser -->
84
85
  ```python
85
86
  import pulumi
86
87
  import pulumi_newrelic as newrelic
@@ -91,6 +92,7 @@ def get_user(authentication_domain_id: Optional[str] = None,
91
92
  user_two = newrelic.get_user(authentication_domain_id=foo.id,
92
93
  email_id="test_user@random.com")
93
94
  ```
95
+ <!--End PulumiCodeChooser -->
94
96
 
95
97
 
96
98
  :param str authentication_domain_id: The ID of the authentication domain the user to be searched for belongs to.
@@ -128,6 +130,7 @@ def get_user_output(authentication_domain_id: Optional[pulumi.Input[str]] = None
128
130
  ## Example Usage
129
131
 
130
132
  The below example illustrates fetching a the ID of a user (and other arguments) using the ID of the authentication domain the user belongs to, as well as a name and/or email ID, which can be used as criteria to search for a user who matches these specified parameters.
133
+ <!--Start PulumiCodeChooser -->
131
134
  ```python
132
135
  import pulumi
133
136
  import pulumi_newrelic as newrelic
@@ -138,6 +141,7 @@ def get_user_output(authentication_domain_id: Optional[pulumi.Input[str]] = None
138
141
  user_two = newrelic.get_user(authentication_domain_id=foo.id,
139
142
  email_id="test_user@random.com")
140
143
  ```
144
+ <!--End PulumiCodeChooser -->
141
145
 
142
146
 
143
147
  :param str authentication_domain_id: The ID of the authentication domain the user to be searched for belongs to.
pulumi_newrelic/group.py CHANGED
@@ -152,19 +152,20 @@ class Group(pulumi.CustomResource):
152
152
 
153
153
  ## Example Usage
154
154
 
155
+ <!--Start PulumiCodeChooser -->
155
156
  ```python
156
157
  import pulumi
157
158
  import pulumi_newrelic as newrelic
158
159
 
159
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
160
- foo_group = newrelic.Group("foo",
161
- name="Test Group",
162
- authentication_domain_id=foo.id,
160
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
161
+ foo_group = newrelic.Group("fooGroup",
162
+ authentication_domain_id=foo_authentication_domain.id,
163
163
  user_ids=[
164
164
  "0001112222",
165
165
  "2221110000",
166
166
  ])
167
167
  ```
168
+ <!--End PulumiCodeChooser -->
168
169
 
169
170
  ## Additional Examples
170
171
 
@@ -172,51 +173,51 @@ class Group(pulumi.CustomResource):
172
173
 
173
174
  The following example illustrates the creation of a group using the `Group` resource, to which users created using the `User` resource are added.
174
175
 
176
+ <!--Start PulumiCodeChooser -->
175
177
  ```python
176
178
  import pulumi
177
179
  import pulumi_newrelic as newrelic
178
180
 
179
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
180
- foo_user = newrelic.User("foo",
181
- name="Test User One",
181
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
182
+ foo_user = newrelic.User("fooUser",
182
183
  email_id="test_user_one@test.com",
183
- authentication_domain_id=foo.id,
184
+ authentication_domain_id=foo_authentication_domain.id,
184
185
  user_type="CORE_USER_TIER")
185
186
  bar = newrelic.User("bar",
186
- name="Test User Two",
187
187
  email_id="test_user_two@test.com",
188
- authentication_domain_id=foo.id,
188
+ authentication_domain_id=foo_authentication_domain.id,
189
189
  user_type="BASIC_USER_TIER")
190
- foo_group = newrelic.Group("foo",
191
- name="Test Group",
192
- authentication_domain_id=foo.id,
190
+ foo_group = newrelic.Group("fooGroup",
191
+ authentication_domain_id=foo_authentication_domain.id,
193
192
  user_ids=[
194
193
  foo_user.id,
195
194
  bar.id,
196
195
  ])
197
196
  ```
197
+ <!--End PulumiCodeChooser -->
198
198
 
199
199
  ### Addition of Existing Users to a New Group
200
200
 
201
201
  The following example demonstrates the usage of the `Group` resource to create a group, wherein the `User` data source is employed to associate existing users with the newly formed group.
202
202
 
203
+ <!--Start PulumiCodeChooser -->
203
204
  ```python
204
205
  import pulumi
205
206
  import pulumi_newrelic as newrelic
206
207
 
207
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
208
- foo_get_user = newrelic.get_user(authentication_domain_id=foo.id,
208
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
209
+ foo_user = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
209
210
  email_id="test_user_one@test.com")
210
- bar = newrelic.get_user(authentication_domain_id=foo.id,
211
+ bar = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
211
212
  name="Test User Two")
212
- foo_group = newrelic.Group("foo",
213
- name="Test Group",
214
- authentication_domain_id=foo.id,
213
+ foo_group = newrelic.Group("fooGroup",
214
+ authentication_domain_id=foo_authentication_domain.id,
215
215
  user_ids=[
216
- foo_get_user.id,
216
+ foo_user.id,
217
217
  bar.id,
218
218
  ])
219
219
  ```
220
+ <!--End PulumiCodeChooser -->
220
221
 
221
222
  > **NOTE** Please note that the addition of users to groups is only possible when both the group and the users to be added to it belong to the _same authentication domain_. If the group being created and the users being added to it belong to different authentication domains, an error indicating `user not found` or an equivalent error will be thrown.
222
223
 
@@ -249,19 +250,20 @@ class Group(pulumi.CustomResource):
249
250
 
250
251
  ## Example Usage
251
252
 
253
+ <!--Start PulumiCodeChooser -->
252
254
  ```python
253
255
  import pulumi
254
256
  import pulumi_newrelic as newrelic
255
257
 
256
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
257
- foo_group = newrelic.Group("foo",
258
- name="Test Group",
259
- authentication_domain_id=foo.id,
258
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
259
+ foo_group = newrelic.Group("fooGroup",
260
+ authentication_domain_id=foo_authentication_domain.id,
260
261
  user_ids=[
261
262
  "0001112222",
262
263
  "2221110000",
263
264
  ])
264
265
  ```
266
+ <!--End PulumiCodeChooser -->
265
267
 
266
268
  ## Additional Examples
267
269
 
@@ -269,51 +271,51 @@ class Group(pulumi.CustomResource):
269
271
 
270
272
  The following example illustrates the creation of a group using the `Group` resource, to which users created using the `User` resource are added.
271
273
 
274
+ <!--Start PulumiCodeChooser -->
272
275
  ```python
273
276
  import pulumi
274
277
  import pulumi_newrelic as newrelic
275
278
 
276
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
277
- foo_user = newrelic.User("foo",
278
- name="Test User One",
279
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
280
+ foo_user = newrelic.User("fooUser",
279
281
  email_id="test_user_one@test.com",
280
- authentication_domain_id=foo.id,
282
+ authentication_domain_id=foo_authentication_domain.id,
281
283
  user_type="CORE_USER_TIER")
282
284
  bar = newrelic.User("bar",
283
- name="Test User Two",
284
285
  email_id="test_user_two@test.com",
285
- authentication_domain_id=foo.id,
286
+ authentication_domain_id=foo_authentication_domain.id,
286
287
  user_type="BASIC_USER_TIER")
287
- foo_group = newrelic.Group("foo",
288
- name="Test Group",
289
- authentication_domain_id=foo.id,
288
+ foo_group = newrelic.Group("fooGroup",
289
+ authentication_domain_id=foo_authentication_domain.id,
290
290
  user_ids=[
291
291
  foo_user.id,
292
292
  bar.id,
293
293
  ])
294
294
  ```
295
+ <!--End PulumiCodeChooser -->
295
296
 
296
297
  ### Addition of Existing Users to a New Group
297
298
 
298
299
  The following example demonstrates the usage of the `Group` resource to create a group, wherein the `User` data source is employed to associate existing users with the newly formed group.
299
300
 
301
+ <!--Start PulumiCodeChooser -->
300
302
  ```python
301
303
  import pulumi
302
304
  import pulumi_newrelic as newrelic
303
305
 
304
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
305
- foo_get_user = newrelic.get_user(authentication_domain_id=foo.id,
306
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
307
+ foo_user = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
306
308
  email_id="test_user_one@test.com")
307
- bar = newrelic.get_user(authentication_domain_id=foo.id,
309
+ bar = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
308
310
  name="Test User Two")
309
- foo_group = newrelic.Group("foo",
310
- name="Test Group",
311
- authentication_domain_id=foo.id,
311
+ foo_group = newrelic.Group("fooGroup",
312
+ authentication_domain_id=foo_authentication_domain.id,
312
313
  user_ids=[
313
- foo_get_user.id,
314
+ foo_user.id,
314
315
  bar.id,
315
316
  ])
316
317
  ```
318
+ <!--End PulumiCodeChooser -->
317
319
 
318
320
  > **NOTE** Please note that the addition of users to groups is only possible when both the group and the users to be added to it belong to the _same authentication domain_. If the group being created and the users being added to it belong to different authentication domains, an error indicating `user not found` or an equivalent error will be thrown.
319
321