pulumi-newrelic 5.23.0a1713333809__py3-none-any.whl → 5.23.0a1713975814__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. pulumi_newrelic/_inputs.py +110 -270
  2. pulumi_newrelic/account_management.py +20 -20
  3. pulumi_newrelic/alert_channel.py +76 -92
  4. pulumi_newrelic/alert_condition.py +104 -149
  5. pulumi_newrelic/alert_muting_rule.py +33 -35
  6. pulumi_newrelic/alert_policy.py +68 -43
  7. pulumi_newrelic/alert_policy_channel.py +12 -8
  8. pulumi_newrelic/cloud/_inputs.py +322 -1072
  9. pulumi_newrelic/cloud/aws_govcloud_link_account.py +4 -6
  10. pulumi_newrelic/cloud/aws_integrations.py +13 -15
  11. pulumi_newrelic/cloud/aws_link_account.py +4 -6
  12. pulumi_newrelic/cloud/azure_integrations.py +10 -12
  13. pulumi_newrelic/cloud/azure_link_account.py +4 -6
  14. pulumi_newrelic/cloud/gcp_integrations.py +6 -6
  15. pulumi_newrelic/cloud/gcp_link_account.py +4 -6
  16. pulumi_newrelic/cloud/outputs.py +322 -1072
  17. pulumi_newrelic/data_partition_rule.py +0 -4
  18. pulumi_newrelic/entity_tags.py +13 -17
  19. pulumi_newrelic/events_to_metrics_rule.py +2 -4
  20. pulumi_newrelic/get_account.py +0 -4
  21. pulumi_newrelic/get_application.py +8 -10
  22. pulumi_newrelic/get_authentication_domain.py +4 -8
  23. pulumi_newrelic/get_cloud_account.py +0 -4
  24. pulumi_newrelic/get_entity.py +28 -32
  25. pulumi_newrelic/get_group.py +42 -8
  26. pulumi_newrelic/get_key_transaction.py +8 -10
  27. pulumi_newrelic/get_obfuscation_expression.py +2 -4
  28. pulumi_newrelic/get_service_level_alert_helper.py +22 -46
  29. pulumi_newrelic/get_test_grok_pattern.py +4 -6
  30. pulumi_newrelic/get_user.py +0 -4
  31. pulumi_newrelic/group.py +40 -42
  32. pulumi_newrelic/infra_alert_condition.py +154 -131
  33. pulumi_newrelic/insights/event.py +8 -25
  34. pulumi_newrelic/log_parsing_rule.py +6 -10
  35. pulumi_newrelic/monitor_downtime.py +174 -193
  36. pulumi_newrelic/notification_channel.py +124 -150
  37. pulumi_newrelic/nrql_alert_condition.py +38 -48
  38. pulumi_newrelic/nrql_drop_rule.py +34 -38
  39. pulumi_newrelic/obfuscation_expression.py +2 -4
  40. pulumi_newrelic/obfuscation_rule.py +4 -4
  41. pulumi_newrelic/one_dashboard.py +42 -48
  42. pulumi_newrelic/one_dashboard_raw.py +86 -86
  43. pulumi_newrelic/outputs.py +110 -270
  44. pulumi_newrelic/plugins/_inputs.py +16 -16
  45. pulumi_newrelic/plugins/application_settings.py +6 -8
  46. pulumi_newrelic/plugins/outputs.py +16 -16
  47. pulumi_newrelic/plugins/workload.py +158 -40
  48. pulumi_newrelic/service_level.py +38 -123
  49. pulumi_newrelic/synthetics/alert_condition.py +34 -64
  50. pulumi_newrelic/synthetics/broken_links_monitor.py +18 -20
  51. pulumi_newrelic/synthetics/cert_check_monitor.py +16 -18
  52. pulumi_newrelic/synthetics/get_private_location.py +0 -8
  53. pulumi_newrelic/synthetics/get_secure_credential.py +0 -12
  54. pulumi_newrelic/synthetics/monitor.py +48 -52
  55. pulumi_newrelic/synthetics/multi_location_alert_condition.py +69 -83
  56. pulumi_newrelic/synthetics/private_location.py +6 -6
  57. pulumi_newrelic/synthetics/script_monitor.py +38 -42
  58. pulumi_newrelic/synthetics/secure_credential.py +25 -22
  59. pulumi_newrelic/synthetics/step_monitor.py +18 -20
  60. pulumi_newrelic/user.py +8 -10
  61. pulumi_newrelic/workflow.py +20 -24
  62. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/METADATA +1 -1
  63. pulumi_newrelic-5.23.0a1713975814.dist-info/RECORD +89 -0
  64. pulumi_newrelic-5.23.0a1713333809.dist-info/RECORD +0 -89
  65. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/WHEEL +0 -0
  66. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/top_level.txt +0 -0
@@ -24,12 +24,12 @@ class AlertMutingRuleArgs:
24
24
  schedule: Optional[pulumi.Input['AlertMutingRuleScheduleArgs']] = None):
25
25
  """
26
26
  The set of arguments for constructing a AlertMutingRule resource.
27
- :param pulumi.Input['AlertMutingRuleConditionArgs'] condition: The condition that defines which incidents to target. See Nested condition blocks below for details.
27
+ :param pulumi.Input['AlertMutingRuleConditionArgs'] condition: The condition that defines which incidents to target.
28
28
  :param pulumi.Input[bool] enabled: Whether the MutingRule is enabled.
29
- :param pulumi.Input[int] account_id: The account id of the MutingRule.
29
+ :param pulumi.Input[int] account_id: The account id of the MutingRule..
30
30
  :param pulumi.Input[str] description: The description of the MutingRule.
31
31
  :param pulumi.Input[str] name: The name of the MutingRule.
32
- :param pulumi.Input['AlertMutingRuleScheduleArgs'] schedule: Specify a schedule for enabling the MutingRule. See Schedule below for details
32
+ :param pulumi.Input['AlertMutingRuleScheduleArgs'] schedule: The time window when the MutingRule should actively mute incidents.
33
33
  """
34
34
  pulumi.set(__self__, "condition", condition)
35
35
  pulumi.set(__self__, "enabled", enabled)
@@ -46,7 +46,7 @@ class AlertMutingRuleArgs:
46
46
  @pulumi.getter
47
47
  def condition(self) -> pulumi.Input['AlertMutingRuleConditionArgs']:
48
48
  """
49
- The condition that defines which incidents to target. See Nested condition blocks below for details.
49
+ The condition that defines which incidents to target.
50
50
  """
51
51
  return pulumi.get(self, "condition")
52
52
 
@@ -70,7 +70,7 @@ class AlertMutingRuleArgs:
70
70
  @pulumi.getter(name="accountId")
71
71
  def account_id(self) -> Optional[pulumi.Input[int]]:
72
72
  """
73
- The account id of the MutingRule.
73
+ The account id of the MutingRule..
74
74
  """
75
75
  return pulumi.get(self, "account_id")
76
76
 
@@ -106,7 +106,7 @@ class AlertMutingRuleArgs:
106
106
  @pulumi.getter
107
107
  def schedule(self) -> Optional[pulumi.Input['AlertMutingRuleScheduleArgs']]:
108
108
  """
109
- Specify a schedule for enabling the MutingRule. See Schedule below for details
109
+ The time window when the MutingRule should actively mute incidents.
110
110
  """
111
111
  return pulumi.get(self, "schedule")
112
112
 
@@ -126,12 +126,12 @@ class _AlertMutingRuleState:
126
126
  schedule: Optional[pulumi.Input['AlertMutingRuleScheduleArgs']] = None):
127
127
  """
128
128
  Input properties used for looking up and filtering AlertMutingRule resources.
129
- :param pulumi.Input[int] account_id: The account id of the MutingRule.
130
- :param pulumi.Input['AlertMutingRuleConditionArgs'] condition: The condition that defines which incidents to target. See Nested condition blocks below for details.
129
+ :param pulumi.Input[int] account_id: The account id of the MutingRule..
130
+ :param pulumi.Input['AlertMutingRuleConditionArgs'] condition: The condition that defines which incidents to target.
131
131
  :param pulumi.Input[str] description: The description of the MutingRule.
132
132
  :param pulumi.Input[bool] enabled: Whether the MutingRule is enabled.
133
133
  :param pulumi.Input[str] name: The name of the MutingRule.
134
- :param pulumi.Input['AlertMutingRuleScheduleArgs'] schedule: Specify a schedule for enabling the MutingRule. See Schedule below for details
134
+ :param pulumi.Input['AlertMutingRuleScheduleArgs'] schedule: The time window when the MutingRule should actively mute incidents.
135
135
  """
136
136
  if account_id is not None:
137
137
  pulumi.set(__self__, "account_id", account_id)
@@ -150,7 +150,7 @@ class _AlertMutingRuleState:
150
150
  @pulumi.getter(name="accountId")
151
151
  def account_id(self) -> Optional[pulumi.Input[int]]:
152
152
  """
153
- The account id of the MutingRule.
153
+ The account id of the MutingRule..
154
154
  """
155
155
  return pulumi.get(self, "account_id")
156
156
 
@@ -162,7 +162,7 @@ class _AlertMutingRuleState:
162
162
  @pulumi.getter
163
163
  def condition(self) -> Optional[pulumi.Input['AlertMutingRuleConditionArgs']]:
164
164
  """
165
- The condition that defines which incidents to target. See Nested condition blocks below for details.
165
+ The condition that defines which incidents to target.
166
166
  """
167
167
  return pulumi.get(self, "condition")
168
168
 
@@ -210,7 +210,7 @@ class _AlertMutingRuleState:
210
210
  @pulumi.getter
211
211
  def schedule(self) -> Optional[pulumi.Input['AlertMutingRuleScheduleArgs']]:
212
212
  """
213
- Specify a schedule for enabling the MutingRule. See Schedule below for details
213
+ The time window when the MutingRule should actively mute incidents.
214
214
  """
215
215
  return pulumi.get(self, "schedule")
216
216
 
@@ -234,12 +234,14 @@ class AlertMutingRule(pulumi.CustomResource):
234
234
  """
235
235
  ## Example Usage
236
236
 
237
- <!--Start PulumiCodeChooser -->
238
237
  ```python
239
238
  import pulumi
240
239
  import pulumi_newrelic as newrelic
241
240
 
242
241
  foo = newrelic.AlertMutingRule("foo",
242
+ name="Example Muting Rule",
243
+ enabled=True,
244
+ description="muting rule test.",
243
245
  condition=newrelic.AlertMutingRuleConditionArgs(
244
246
  conditions=[
245
247
  newrelic.AlertMutingRuleConditionConditionArgs(
@@ -255,22 +257,19 @@ class AlertMutingRule(pulumi.CustomResource):
255
257
  ],
256
258
  operator="AND",
257
259
  ),
258
- description="muting rule test.",
259
- enabled=True,
260
260
  schedule=newrelic.AlertMutingRuleScheduleArgs(
261
- end_time="2021-01-28T16:30:00",
262
- repeat="WEEKLY",
263
- repeat_count=42,
264
261
  start_time="2021-01-28T15:30:00",
262
+ end_time="2021-01-28T16:30:00",
265
263
  time_zone="America/Los_Angeles",
264
+ repeat="WEEKLY",
266
265
  weekly_repeat_days=[
267
266
  "MONDAY",
268
267
  "WEDNESDAY",
269
268
  "FRIDAY",
270
269
  ],
270
+ repeat_count=42,
271
271
  ))
272
272
  ```
273
- <!--End PulumiCodeChooser -->
274
273
 
275
274
  ## Import
276
275
 
@@ -282,12 +281,12 @@ class AlertMutingRule(pulumi.CustomResource):
282
281
 
283
282
  :param str resource_name: The name of the resource.
284
283
  :param pulumi.ResourceOptions opts: Options for the resource.
285
- :param pulumi.Input[int] account_id: The account id of the MutingRule.
286
- :param pulumi.Input[pulumi.InputType['AlertMutingRuleConditionArgs']] condition: The condition that defines which incidents to target. See Nested condition blocks below for details.
284
+ :param pulumi.Input[int] account_id: The account id of the MutingRule..
285
+ :param pulumi.Input[pulumi.InputType['AlertMutingRuleConditionArgs']] condition: The condition that defines which incidents to target.
287
286
  :param pulumi.Input[str] description: The description of the MutingRule.
288
287
  :param pulumi.Input[bool] enabled: Whether the MutingRule is enabled.
289
288
  :param pulumi.Input[str] name: The name of the MutingRule.
290
- :param pulumi.Input[pulumi.InputType['AlertMutingRuleScheduleArgs']] schedule: Specify a schedule for enabling the MutingRule. See Schedule below for details
289
+ :param pulumi.Input[pulumi.InputType['AlertMutingRuleScheduleArgs']] schedule: The time window when the MutingRule should actively mute incidents.
291
290
  """
292
291
  ...
293
292
  @overload
@@ -298,12 +297,14 @@ class AlertMutingRule(pulumi.CustomResource):
298
297
  """
299
298
  ## Example Usage
300
299
 
301
- <!--Start PulumiCodeChooser -->
302
300
  ```python
303
301
  import pulumi
304
302
  import pulumi_newrelic as newrelic
305
303
 
306
304
  foo = newrelic.AlertMutingRule("foo",
305
+ name="Example Muting Rule",
306
+ enabled=True,
307
+ description="muting rule test.",
307
308
  condition=newrelic.AlertMutingRuleConditionArgs(
308
309
  conditions=[
309
310
  newrelic.AlertMutingRuleConditionConditionArgs(
@@ -319,22 +320,19 @@ class AlertMutingRule(pulumi.CustomResource):
319
320
  ],
320
321
  operator="AND",
321
322
  ),
322
- description="muting rule test.",
323
- enabled=True,
324
323
  schedule=newrelic.AlertMutingRuleScheduleArgs(
325
- end_time="2021-01-28T16:30:00",
326
- repeat="WEEKLY",
327
- repeat_count=42,
328
324
  start_time="2021-01-28T15:30:00",
325
+ end_time="2021-01-28T16:30:00",
329
326
  time_zone="America/Los_Angeles",
327
+ repeat="WEEKLY",
330
328
  weekly_repeat_days=[
331
329
  "MONDAY",
332
330
  "WEDNESDAY",
333
331
  "FRIDAY",
334
332
  ],
333
+ repeat_count=42,
335
334
  ))
336
335
  ```
337
- <!--End PulumiCodeChooser -->
338
336
 
339
337
  ## Import
340
338
 
@@ -407,12 +405,12 @@ class AlertMutingRule(pulumi.CustomResource):
407
405
  :param str resource_name: The unique name of the resulting resource.
408
406
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
409
407
  :param pulumi.ResourceOptions opts: Options for the resource.
410
- :param pulumi.Input[int] account_id: The account id of the MutingRule.
411
- :param pulumi.Input[pulumi.InputType['AlertMutingRuleConditionArgs']] condition: The condition that defines which incidents to target. See Nested condition blocks below for details.
408
+ :param pulumi.Input[int] account_id: The account id of the MutingRule..
409
+ :param pulumi.Input[pulumi.InputType['AlertMutingRuleConditionArgs']] condition: The condition that defines which incidents to target.
412
410
  :param pulumi.Input[str] description: The description of the MutingRule.
413
411
  :param pulumi.Input[bool] enabled: Whether the MutingRule is enabled.
414
412
  :param pulumi.Input[str] name: The name of the MutingRule.
415
- :param pulumi.Input[pulumi.InputType['AlertMutingRuleScheduleArgs']] schedule: Specify a schedule for enabling the MutingRule. See Schedule below for details
413
+ :param pulumi.Input[pulumi.InputType['AlertMutingRuleScheduleArgs']] schedule: The time window when the MutingRule should actively mute incidents.
416
414
  """
417
415
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
418
416
 
@@ -430,7 +428,7 @@ class AlertMutingRule(pulumi.CustomResource):
430
428
  @pulumi.getter(name="accountId")
431
429
  def account_id(self) -> pulumi.Output[int]:
432
430
  """
433
- The account id of the MutingRule.
431
+ The account id of the MutingRule..
434
432
  """
435
433
  return pulumi.get(self, "account_id")
436
434
 
@@ -438,7 +436,7 @@ class AlertMutingRule(pulumi.CustomResource):
438
436
  @pulumi.getter
439
437
  def condition(self) -> pulumi.Output['outputs.AlertMutingRuleCondition']:
440
438
  """
441
- The condition that defines which incidents to target. See Nested condition blocks below for details.
439
+ The condition that defines which incidents to target.
442
440
  """
443
441
  return pulumi.get(self, "condition")
444
442
 
@@ -470,7 +468,7 @@ class AlertMutingRule(pulumi.CustomResource):
470
468
  @pulumi.getter
471
469
  def schedule(self) -> pulumi.Output[Optional['outputs.AlertMutingRuleSchedule']]:
472
470
  """
473
- Specify a schedule for enabling the MutingRule. See Schedule below for details
471
+ The time window when the MutingRule should actively mute incidents.
474
472
  """
475
473
  return pulumi.get(self, "schedule")
476
474
 
@@ -20,9 +20,12 @@ class AlertPolicyArgs:
20
20
  name: Optional[pulumi.Input[str]] = None):
21
21
  """
22
22
  The set of arguments for constructing a AlertPolicy resource.
23
- :param pulumi.Input[int] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
24
- :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
25
- :param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
23
+ :param pulumi.Input[int] account_id: The New Relic account ID to operate on.
24
+ :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result
25
+ in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be
26
+ imported via terraform import.
27
+ :param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
28
+ is PER_POLICY.
26
29
  :param pulumi.Input[str] name: The name of the policy.
27
30
  """
28
31
  if account_id is not None:
@@ -41,7 +44,7 @@ class AlertPolicyArgs:
41
44
  @pulumi.getter(name="accountId")
42
45
  def account_id(self) -> Optional[pulumi.Input[int]]:
43
46
  """
44
- The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
47
+ The New Relic account ID to operate on.
45
48
  """
46
49
  return pulumi.get(self, "account_id")
47
50
 
@@ -53,7 +56,9 @@ class AlertPolicyArgs:
53
56
  @pulumi.getter(name="channelIds")
54
57
  def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
55
58
  """
56
- An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
59
+ An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result
60
+ in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be
61
+ imported via terraform import.
57
62
  """
58
63
  warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
59
64
  pulumi.log.warn("""channel_ids is deprecated: The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
@@ -68,7 +73,8 @@ class AlertPolicyArgs:
68
73
  @pulumi.getter(name="incidentPreference")
69
74
  def incident_preference(self) -> Optional[pulumi.Input[str]]:
70
75
  """
71
- The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
76
+ The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
77
+ is PER_POLICY.
72
78
  """
73
79
  return pulumi.get(self, "incident_preference")
74
80
 
@@ -98,9 +104,12 @@ class _AlertPolicyState:
98
104
  name: Optional[pulumi.Input[str]] = None):
99
105
  """
100
106
  Input properties used for looking up and filtering AlertPolicy resources.
101
- :param pulumi.Input[int] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
102
- :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
103
- :param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
107
+ :param pulumi.Input[int] account_id: The New Relic account ID to operate on.
108
+ :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result
109
+ in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be
110
+ imported via terraform import.
111
+ :param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
112
+ is PER_POLICY.
104
113
  :param pulumi.Input[str] name: The name of the policy.
105
114
  """
106
115
  if account_id is not None:
@@ -119,7 +128,7 @@ class _AlertPolicyState:
119
128
  @pulumi.getter(name="accountId")
120
129
  def account_id(self) -> Optional[pulumi.Input[int]]:
121
130
  """
122
- The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
131
+ The New Relic account ID to operate on.
123
132
  """
124
133
  return pulumi.get(self, "account_id")
125
134
 
@@ -131,7 +140,9 @@ class _AlertPolicyState:
131
140
  @pulumi.getter(name="channelIds")
132
141
  def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
133
142
  """
134
- An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
143
+ An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result
144
+ in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be
145
+ imported via terraform import.
135
146
  """
136
147
  warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
137
148
  pulumi.log.warn("""channel_ids is deprecated: The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
@@ -146,7 +157,8 @@ class _AlertPolicyState:
146
157
  @pulumi.getter(name="incidentPreference")
147
158
  def incident_preference(self) -> Optional[pulumi.Input[str]]:
148
159
  """
149
- The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
160
+ The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
161
+ is PER_POLICY.
150
162
  """
151
163
  return pulumi.get(self, "incident_preference")
152
164
 
@@ -184,14 +196,14 @@ class AlertPolicy(pulumi.CustomResource):
184
196
 
185
197
  ### Basic Usage
186
198
 
187
- <!--Start PulumiCodeChooser -->
188
199
  ```python
189
200
  import pulumi
190
201
  import pulumi_newrelic as newrelic
191
202
 
192
- foo = newrelic.AlertPolicy("foo", incident_preference="PER_POLICY")
203
+ foo = newrelic.AlertPolicy("foo",
204
+ name="example",
205
+ incident_preference="PER_POLICY")
193
206
  ```
194
- <!--End PulumiCodeChooser -->
195
207
 
196
208
  ### Provision multiple notification channels and add those channels to a policy
197
209
 
@@ -208,52 +220,54 @@ class AlertPolicy(pulumi.CustomResource):
208
220
  ## Additional Examples
209
221
 
210
222
  ##### Provision multiple notification channels and add those channels to a policy
211
- <!--Start PulumiCodeChooser -->
212
223
  ```python
213
224
  import pulumi
214
225
  import pulumi_newrelic as newrelic
215
226
 
216
227
  # Provision a Slack notification channel.
217
- slack_channel = newrelic.AlertChannel("slackChannel",
228
+ slack_channel = newrelic.AlertChannel("slack_channel",
229
+ name="slack-example",
218
230
  type="slack",
219
231
  config=newrelic.AlertChannelConfigArgs(
220
232
  url="https://hooks.slack.com/services/xxxxxxx/yyyyyyyy",
221
233
  channel="example-alerts-channel",
222
234
  ))
223
235
  # Provision an email notification channel.
224
- email_channel = newrelic.AlertChannel("emailChannel",
236
+ email_channel = newrelic.AlertChannel("email_channel",
237
+ name="email-example",
225
238
  type="email",
226
239
  config=newrelic.AlertChannelConfigArgs(
227
240
  recipients="example@testing.com",
228
241
  include_json_attachment="1",
229
242
  ))
230
243
  # Provision the alert policy.
231
- policy_with_channels = newrelic.AlertPolicy("policyWithChannels",
244
+ policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
245
+ name="example-with-channels",
232
246
  incident_preference="PER_CONDITION",
233
247
  channel_ids=[
234
248
  slack_channel.id,
235
249
  email_channel.id,
236
250
  ])
237
251
  ```
238
- <!--End PulumiCodeChooser -->
239
252
 
240
253
  ### Reference existing notification channels and add those channel to a policy
241
- <!--Start PulumiCodeChooser -->
242
254
  ```python
243
255
  import pulumi
244
256
  import pulumi_newrelic as newrelic
245
257
 
258
+ # Reference an existing Slack notification channel.
246
259
  slack_channel = newrelic.get_alert_channel(name="slack-channel-notification")
260
+ # Reference an existing email notification channel.
247
261
  email_channel = newrelic.get_alert_channel(name="test@example.com")
248
262
  # Provision the alert policy.
249
- policy_with_channels = newrelic.AlertPolicy("policyWithChannels",
263
+ policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
264
+ name="example-with-channels",
250
265
  incident_preference="PER_CONDITION",
251
266
  channel_ids=[
252
267
  slack_channel.id,
253
268
  email_channel.id,
254
269
  ])
255
270
  ```
256
- <!--End PulumiCodeChooser -->
257
271
 
258
272
  ## Import
259
273
 
@@ -268,9 +282,12 @@ class AlertPolicy(pulumi.CustomResource):
268
282
 
269
283
  :param str resource_name: The name of the resource.
270
284
  :param pulumi.ResourceOptions opts: Options for the resource.
271
- :param pulumi.Input[int] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
272
- :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
273
- :param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
285
+ :param pulumi.Input[int] account_id: The New Relic account ID to operate on.
286
+ :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result
287
+ in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be
288
+ imported via terraform import.
289
+ :param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
290
+ is PER_POLICY.
274
291
  :param pulumi.Input[str] name: The name of the policy.
275
292
  """
276
293
  ...
@@ -286,14 +303,14 @@ class AlertPolicy(pulumi.CustomResource):
286
303
 
287
304
  ### Basic Usage
288
305
 
289
- <!--Start PulumiCodeChooser -->
290
306
  ```python
291
307
  import pulumi
292
308
  import pulumi_newrelic as newrelic
293
309
 
294
- foo = newrelic.AlertPolicy("foo", incident_preference="PER_POLICY")
310
+ foo = newrelic.AlertPolicy("foo",
311
+ name="example",
312
+ incident_preference="PER_POLICY")
295
313
  ```
296
- <!--End PulumiCodeChooser -->
297
314
 
298
315
  ### Provision multiple notification channels and add those channels to a policy
299
316
 
@@ -310,52 +327,54 @@ class AlertPolicy(pulumi.CustomResource):
310
327
  ## Additional Examples
311
328
 
312
329
  ##### Provision multiple notification channels and add those channels to a policy
313
- <!--Start PulumiCodeChooser -->
314
330
  ```python
315
331
  import pulumi
316
332
  import pulumi_newrelic as newrelic
317
333
 
318
334
  # Provision a Slack notification channel.
319
- slack_channel = newrelic.AlertChannel("slackChannel",
335
+ slack_channel = newrelic.AlertChannel("slack_channel",
336
+ name="slack-example",
320
337
  type="slack",
321
338
  config=newrelic.AlertChannelConfigArgs(
322
339
  url="https://hooks.slack.com/services/xxxxxxx/yyyyyyyy",
323
340
  channel="example-alerts-channel",
324
341
  ))
325
342
  # Provision an email notification channel.
326
- email_channel = newrelic.AlertChannel("emailChannel",
343
+ email_channel = newrelic.AlertChannel("email_channel",
344
+ name="email-example",
327
345
  type="email",
328
346
  config=newrelic.AlertChannelConfigArgs(
329
347
  recipients="example@testing.com",
330
348
  include_json_attachment="1",
331
349
  ))
332
350
  # Provision the alert policy.
333
- policy_with_channels = newrelic.AlertPolicy("policyWithChannels",
351
+ policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
352
+ name="example-with-channels",
334
353
  incident_preference="PER_CONDITION",
335
354
  channel_ids=[
336
355
  slack_channel.id,
337
356
  email_channel.id,
338
357
  ])
339
358
  ```
340
- <!--End PulumiCodeChooser -->
341
359
 
342
360
  ### Reference existing notification channels and add those channel to a policy
343
- <!--Start PulumiCodeChooser -->
344
361
  ```python
345
362
  import pulumi
346
363
  import pulumi_newrelic as newrelic
347
364
 
365
+ # Reference an existing Slack notification channel.
348
366
  slack_channel = newrelic.get_alert_channel(name="slack-channel-notification")
367
+ # Reference an existing email notification channel.
349
368
  email_channel = newrelic.get_alert_channel(name="test@example.com")
350
369
  # Provision the alert policy.
351
- policy_with_channels = newrelic.AlertPolicy("policyWithChannels",
370
+ policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
371
+ name="example-with-channels",
352
372
  incident_preference="PER_CONDITION",
353
373
  channel_ids=[
354
374
  slack_channel.id,
355
375
  email_channel.id,
356
376
  ])
357
377
  ```
358
- <!--End PulumiCodeChooser -->
359
378
 
360
379
  ## Import
361
380
 
@@ -421,9 +440,12 @@ class AlertPolicy(pulumi.CustomResource):
421
440
  :param str resource_name: The unique name of the resulting resource.
422
441
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
423
442
  :param pulumi.ResourceOptions opts: Options for the resource.
424
- :param pulumi.Input[int] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
425
- :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
426
- :param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
443
+ :param pulumi.Input[int] account_id: The New Relic account ID to operate on.
444
+ :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result
445
+ in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be
446
+ imported via terraform import.
447
+ :param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
448
+ is PER_POLICY.
427
449
  :param pulumi.Input[str] name: The name of the policy.
428
450
  """
429
451
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -440,7 +462,7 @@ class AlertPolicy(pulumi.CustomResource):
440
462
  @pulumi.getter(name="accountId")
441
463
  def account_id(self) -> pulumi.Output[int]:
442
464
  """
443
- The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
465
+ The New Relic account ID to operate on.
444
466
  """
445
467
  return pulumi.get(self, "account_id")
446
468
 
@@ -448,7 +470,9 @@ class AlertPolicy(pulumi.CustomResource):
448
470
  @pulumi.getter(name="channelIds")
449
471
  def channel_ids(self) -> pulumi.Output[Optional[Sequence[int]]]:
450
472
  """
451
- An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
473
+ An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result
474
+ in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs cannot be
475
+ imported via terraform import.
452
476
  """
453
477
  warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
454
478
  pulumi.log.warn("""channel_ids is deprecated: The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
@@ -459,7 +483,8 @@ class AlertPolicy(pulumi.CustomResource):
459
483
  @pulumi.getter(name="incidentPreference")
460
484
  def incident_preference(self) -> pulumi.Output[Optional[str]]:
461
485
  """
462
- The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
486
+ The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
487
+ is PER_POLICY.
463
488
  """
464
489
  return pulumi.get(self, "incident_preference")
465
490
 
@@ -139,21 +139,24 @@ class AlertPolicyChannel(pulumi.CustomResource):
139
139
 
140
140
  The example below will apply multiple alert channels to an existing New Relic alert policy.
141
141
 
142
- <!--Start PulumiCodeChooser -->
143
142
  ```python
144
143
  import pulumi
145
144
  import pulumi_newrelic as newrelic
146
145
 
146
+ # Fetches the data for this policy from your New Relic account
147
+ # and is referenced in the newrelic_alert_policy_channel block below.
147
148
  example_policy = newrelic.get_alert_policy(name="my-alert-policy")
148
149
  # Creates an email alert channel.
149
- email_channel = newrelic.AlertChannel("emailChannel",
150
+ email_channel = newrelic.AlertChannel("email_channel",
151
+ name="bar",
150
152
  type="email",
151
153
  config=newrelic.AlertChannelConfigArgs(
152
154
  recipients="foo@example.com",
153
155
  include_json_attachment="1",
154
156
  ))
155
157
  # Creates a Slack alert channel.
156
- slack_channel = newrelic.AlertChannel("slackChannel",
158
+ slack_channel = newrelic.AlertChannel("slack_channel",
159
+ name="slack-channel-example",
157
160
  type="slack",
158
161
  config=newrelic.AlertChannelConfigArgs(
159
162
  channel="#example-channel",
@@ -168,7 +171,6 @@ class AlertPolicyChannel(pulumi.CustomResource):
168
171
  slack_channel.id,
169
172
  ])
170
173
  ```
171
- <!--End PulumiCodeChooser -->
172
174
 
173
175
  ## Import
174
176
 
@@ -200,21 +202,24 @@ class AlertPolicyChannel(pulumi.CustomResource):
200
202
 
201
203
  The example below will apply multiple alert channels to an existing New Relic alert policy.
202
204
 
203
- <!--Start PulumiCodeChooser -->
204
205
  ```python
205
206
  import pulumi
206
207
  import pulumi_newrelic as newrelic
207
208
 
209
+ # Fetches the data for this policy from your New Relic account
210
+ # and is referenced in the newrelic_alert_policy_channel block below.
208
211
  example_policy = newrelic.get_alert_policy(name="my-alert-policy")
209
212
  # Creates an email alert channel.
210
- email_channel = newrelic.AlertChannel("emailChannel",
213
+ email_channel = newrelic.AlertChannel("email_channel",
214
+ name="bar",
211
215
  type="email",
212
216
  config=newrelic.AlertChannelConfigArgs(
213
217
  recipients="foo@example.com",
214
218
  include_json_attachment="1",
215
219
  ))
216
220
  # Creates a Slack alert channel.
217
- slack_channel = newrelic.AlertChannel("slackChannel",
221
+ slack_channel = newrelic.AlertChannel("slack_channel",
222
+ name="slack-channel-example",
218
223
  type="slack",
219
224
  config=newrelic.AlertChannelConfigArgs(
220
225
  channel="#example-channel",
@@ -229,7 +234,6 @@ class AlertPolicyChannel(pulumi.CustomResource):
229
234
  slack_channel.id,
230
235
  ])
231
236
  ```
232
- <!--End PulumiCodeChooser -->
233
237
 
234
238
  ## Import
235
239