pulumi-newrelic 5.23.0__py3-none-any.whl → 5.23.0a1711707796__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 +32 -28
  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.0a1711707796.dist-info}/METADATA +1 -1
  65. pulumi_newrelic-5.23.0a1711707796.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.0a1711707796.dist-info}/WHEEL +0 -0
  68. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711707796.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.
27
+ :param pulumi.Input['AlertMutingRuleConditionArgs'] condition: The condition that defines which incidents to target. See Nested condition blocks below for details.
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: The time window when the MutingRule should actively mute incidents.
32
+ :param pulumi.Input['AlertMutingRuleScheduleArgs'] schedule: Specify a schedule for enabling the MutingRule. See Schedule below for details
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.
49
+ The condition that defines which incidents to target. See Nested condition blocks below for details.
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
- The time window when the MutingRule should actively mute incidents.
109
+ Specify a schedule for enabling the MutingRule. See Schedule below for details
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.
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.
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: The time window when the MutingRule should actively mute incidents.
134
+ :param pulumi.Input['AlertMutingRuleScheduleArgs'] schedule: Specify a schedule for enabling the MutingRule. See Schedule below for details
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.
165
+ The condition that defines which incidents to target. See Nested condition blocks below for details.
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
- The time window when the MutingRule should actively mute incidents.
213
+ Specify a schedule for enabling the MutingRule. See Schedule below for details
214
214
  """
215
215
  return pulumi.get(self, "schedule")
216
216
 
@@ -234,14 +234,12 @@ class AlertMutingRule(pulumi.CustomResource):
234
234
  """
235
235
  ## Example Usage
236
236
 
237
+ <!--Start PulumiCodeChooser -->
237
238
  ```python
238
239
  import pulumi
239
240
  import pulumi_newrelic as newrelic
240
241
 
241
242
  foo = newrelic.AlertMutingRule("foo",
242
- name="Example Muting Rule",
243
- enabled=True,
244
- description="muting rule test.",
245
243
  condition=newrelic.AlertMutingRuleConditionArgs(
246
244
  conditions=[
247
245
  newrelic.AlertMutingRuleConditionConditionArgs(
@@ -257,19 +255,22 @@ class AlertMutingRule(pulumi.CustomResource):
257
255
  ],
258
256
  operator="AND",
259
257
  ),
258
+ description="muting rule test.",
259
+ enabled=True,
260
260
  schedule=newrelic.AlertMutingRuleScheduleArgs(
261
- start_time="2021-01-28T15:30:00",
262
261
  end_time="2021-01-28T16:30:00",
263
- time_zone="America/Los_Angeles",
264
262
  repeat="WEEKLY",
263
+ repeat_count=42,
264
+ start_time="2021-01-28T15:30:00",
265
+ time_zone="America/Los_Angeles",
265
266
  weekly_repeat_days=[
266
267
  "MONDAY",
267
268
  "WEDNESDAY",
268
269
  "FRIDAY",
269
270
  ],
270
- repeat_count=42,
271
271
  ))
272
272
  ```
273
+ <!--End PulumiCodeChooser -->
273
274
 
274
275
  ## Import
275
276
 
@@ -281,12 +282,12 @@ class AlertMutingRule(pulumi.CustomResource):
281
282
 
282
283
  :param str resource_name: The name of the resource.
283
284
  :param pulumi.ResourceOptions opts: Options for the resource.
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.
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.
286
287
  :param pulumi.Input[str] description: The description of the MutingRule.
287
288
  :param pulumi.Input[bool] enabled: Whether the MutingRule is enabled.
288
289
  :param pulumi.Input[str] name: The name of the MutingRule.
289
- :param pulumi.Input[pulumi.InputType['AlertMutingRuleScheduleArgs']] schedule: The time window when the MutingRule should actively mute incidents.
290
+ :param pulumi.Input[pulumi.InputType['AlertMutingRuleScheduleArgs']] schedule: Specify a schedule for enabling the MutingRule. See Schedule below for details
290
291
  """
291
292
  ...
292
293
  @overload
@@ -297,14 +298,12 @@ class AlertMutingRule(pulumi.CustomResource):
297
298
  """
298
299
  ## Example Usage
299
300
 
301
+ <!--Start PulumiCodeChooser -->
300
302
  ```python
301
303
  import pulumi
302
304
  import pulumi_newrelic as newrelic
303
305
 
304
306
  foo = newrelic.AlertMutingRule("foo",
305
- name="Example Muting Rule",
306
- enabled=True,
307
- description="muting rule test.",
308
307
  condition=newrelic.AlertMutingRuleConditionArgs(
309
308
  conditions=[
310
309
  newrelic.AlertMutingRuleConditionConditionArgs(
@@ -320,19 +319,22 @@ class AlertMutingRule(pulumi.CustomResource):
320
319
  ],
321
320
  operator="AND",
322
321
  ),
322
+ description="muting rule test.",
323
+ enabled=True,
323
324
  schedule=newrelic.AlertMutingRuleScheduleArgs(
324
- start_time="2021-01-28T15:30:00",
325
325
  end_time="2021-01-28T16:30:00",
326
- time_zone="America/Los_Angeles",
327
326
  repeat="WEEKLY",
327
+ repeat_count=42,
328
+ start_time="2021-01-28T15:30:00",
329
+ time_zone="America/Los_Angeles",
328
330
  weekly_repeat_days=[
329
331
  "MONDAY",
330
332
  "WEDNESDAY",
331
333
  "FRIDAY",
332
334
  ],
333
- repeat_count=42,
334
335
  ))
335
336
  ```
337
+ <!--End PulumiCodeChooser -->
336
338
 
337
339
  ## Import
338
340
 
@@ -405,12 +407,12 @@ class AlertMutingRule(pulumi.CustomResource):
405
407
  :param str resource_name: The unique name of the resulting resource.
406
408
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
407
409
  :param pulumi.ResourceOptions opts: Options for the resource.
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.
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.
410
412
  :param pulumi.Input[str] description: The description of the MutingRule.
411
413
  :param pulumi.Input[bool] enabled: Whether the MutingRule is enabled.
412
414
  :param pulumi.Input[str] name: The name of the MutingRule.
413
- :param pulumi.Input[pulumi.InputType['AlertMutingRuleScheduleArgs']] schedule: The time window when the MutingRule should actively mute incidents.
415
+ :param pulumi.Input[pulumi.InputType['AlertMutingRuleScheduleArgs']] schedule: Specify a schedule for enabling the MutingRule. See Schedule below for details
414
416
  """
415
417
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
416
418
 
@@ -428,7 +430,7 @@ class AlertMutingRule(pulumi.CustomResource):
428
430
  @pulumi.getter(name="accountId")
429
431
  def account_id(self) -> pulumi.Output[int]:
430
432
  """
431
- The account id of the MutingRule..
433
+ The account id of the MutingRule.
432
434
  """
433
435
  return pulumi.get(self, "account_id")
434
436
 
@@ -436,7 +438,7 @@ class AlertMutingRule(pulumi.CustomResource):
436
438
  @pulumi.getter
437
439
  def condition(self) -> pulumi.Output['outputs.AlertMutingRuleCondition']:
438
440
  """
439
- The condition that defines which incidents to target.
441
+ The condition that defines which incidents to target. See Nested condition blocks below for details.
440
442
  """
441
443
  return pulumi.get(self, "condition")
442
444
 
@@ -468,7 +470,7 @@ class AlertMutingRule(pulumi.CustomResource):
468
470
  @pulumi.getter
469
471
  def schedule(self) -> pulumi.Output[Optional['outputs.AlertMutingRuleSchedule']]:
470
472
  """
471
- The time window when the MutingRule should actively mute incidents.
473
+ Specify a schedule for enabling the MutingRule. See Schedule below for details
472
474
  """
473
475
  return pulumi.get(self, "schedule")
474
476
 
@@ -20,12 +20,9 @@ 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.
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.
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`.
29
26
  :param pulumi.Input[str] name: The name of the policy.
30
27
  """
31
28
  if account_id is not None:
@@ -44,7 +41,7 @@ class AlertPolicyArgs:
44
41
  @pulumi.getter(name="accountId")
45
42
  def account_id(self) -> Optional[pulumi.Input[int]]:
46
43
  """
47
- The New Relic account ID to operate on.
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`.
48
45
  """
49
46
  return pulumi.get(self, "account_id")
50
47
 
@@ -56,9 +53,7 @@ class AlertPolicyArgs:
56
53
  @pulumi.getter(name="channelIds")
57
54
  def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
58
55
  """
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.
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.
62
57
  """
63
58
  warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
64
59
  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.""")
@@ -73,8 +68,7 @@ class AlertPolicyArgs:
73
68
  @pulumi.getter(name="incidentPreference")
74
69
  def incident_preference(self) -> Optional[pulumi.Input[str]]:
75
70
  """
76
- The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
77
- is PER_POLICY.
71
+ The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
78
72
  """
79
73
  return pulumi.get(self, "incident_preference")
80
74
 
@@ -104,12 +98,9 @@ class _AlertPolicyState:
104
98
  name: Optional[pulumi.Input[str]] = None):
105
99
  """
106
100
  Input properties used for looking up and filtering AlertPolicy resources.
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.
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`.
113
104
  :param pulumi.Input[str] name: The name of the policy.
114
105
  """
115
106
  if account_id is not None:
@@ -128,7 +119,7 @@ class _AlertPolicyState:
128
119
  @pulumi.getter(name="accountId")
129
120
  def account_id(self) -> Optional[pulumi.Input[int]]:
130
121
  """
131
- The New Relic account ID to operate on.
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`.
132
123
  """
133
124
  return pulumi.get(self, "account_id")
134
125
 
@@ -140,9 +131,7 @@ class _AlertPolicyState:
140
131
  @pulumi.getter(name="channelIds")
141
132
  def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
142
133
  """
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.
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.
146
135
  """
147
136
  warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
148
137
  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.""")
@@ -157,8 +146,7 @@ class _AlertPolicyState:
157
146
  @pulumi.getter(name="incidentPreference")
158
147
  def incident_preference(self) -> Optional[pulumi.Input[str]]:
159
148
  """
160
- The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
161
- is PER_POLICY.
149
+ The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
162
150
  """
163
151
  return pulumi.get(self, "incident_preference")
164
152
 
@@ -196,14 +184,14 @@ class AlertPolicy(pulumi.CustomResource):
196
184
 
197
185
  ### Basic Usage
198
186
 
187
+ <!--Start PulumiCodeChooser -->
199
188
  ```python
200
189
  import pulumi
201
190
  import pulumi_newrelic as newrelic
202
191
 
203
- foo = newrelic.AlertPolicy("foo",
204
- name="example",
205
- incident_preference="PER_POLICY")
192
+ foo = newrelic.AlertPolicy("foo", incident_preference="PER_POLICY")
206
193
  ```
194
+ <!--End PulumiCodeChooser -->
207
195
 
208
196
  ### Provision multiple notification channels and add those channels to a policy
209
197
 
@@ -220,54 +208,52 @@ class AlertPolicy(pulumi.CustomResource):
220
208
  ## Additional Examples
221
209
 
222
210
  ##### Provision multiple notification channels and add those channels to a policy
211
+ <!--Start PulumiCodeChooser -->
223
212
  ```python
224
213
  import pulumi
225
214
  import pulumi_newrelic as newrelic
226
215
 
227
216
  # Provision a Slack notification channel.
228
- slack_channel = newrelic.AlertChannel("slack_channel",
229
- name="slack-example",
217
+ slack_channel = newrelic.AlertChannel("slackChannel",
230
218
  type="slack",
231
219
  config=newrelic.AlertChannelConfigArgs(
232
220
  url="https://hooks.slack.com/services/xxxxxxx/yyyyyyyy",
233
221
  channel="example-alerts-channel",
234
222
  ))
235
223
  # Provision an email notification channel.
236
- email_channel = newrelic.AlertChannel("email_channel",
237
- name="email-example",
224
+ email_channel = newrelic.AlertChannel("emailChannel",
238
225
  type="email",
239
226
  config=newrelic.AlertChannelConfigArgs(
240
227
  recipients="example@testing.com",
241
228
  include_json_attachment="1",
242
229
  ))
243
230
  # Provision the alert policy.
244
- policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
245
- name="example-with-channels",
231
+ policy_with_channels = newrelic.AlertPolicy("policyWithChannels",
246
232
  incident_preference="PER_CONDITION",
247
233
  channel_ids=[
248
234
  slack_channel.id,
249
235
  email_channel.id,
250
236
  ])
251
237
  ```
238
+ <!--End PulumiCodeChooser -->
252
239
 
253
240
  ### Reference existing notification channels and add those channel to a policy
241
+ <!--Start PulumiCodeChooser -->
254
242
  ```python
255
243
  import pulumi
256
244
  import pulumi_newrelic as newrelic
257
245
 
258
- # Reference an existing Slack notification channel.
259
246
  slack_channel = newrelic.get_alert_channel(name="slack-channel-notification")
260
- # Reference an existing email notification channel.
261
247
  email_channel = newrelic.get_alert_channel(name="test@example.com")
262
248
  # Provision the alert policy.
263
- policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
264
- name="example-with-channels",
249
+ policy_with_channels = newrelic.AlertPolicy("policyWithChannels",
265
250
  incident_preference="PER_CONDITION",
266
251
  channel_ids=[
267
252
  slack_channel.id,
268
253
  email_channel.id,
269
254
  ])
270
255
  ```
256
+ <!--End PulumiCodeChooser -->
271
257
 
272
258
  ## Import
273
259
 
@@ -282,12 +268,9 @@ class AlertPolicy(pulumi.CustomResource):
282
268
 
283
269
  :param str resource_name: The name of the resource.
284
270
  :param pulumi.ResourceOptions opts: Options for the resource.
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.
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`.
291
274
  :param pulumi.Input[str] name: The name of the policy.
292
275
  """
293
276
  ...
@@ -303,14 +286,14 @@ class AlertPolicy(pulumi.CustomResource):
303
286
 
304
287
  ### Basic Usage
305
288
 
289
+ <!--Start PulumiCodeChooser -->
306
290
  ```python
307
291
  import pulumi
308
292
  import pulumi_newrelic as newrelic
309
293
 
310
- foo = newrelic.AlertPolicy("foo",
311
- name="example",
312
- incident_preference="PER_POLICY")
294
+ foo = newrelic.AlertPolicy("foo", incident_preference="PER_POLICY")
313
295
  ```
296
+ <!--End PulumiCodeChooser -->
314
297
 
315
298
  ### Provision multiple notification channels and add those channels to a policy
316
299
 
@@ -327,54 +310,52 @@ class AlertPolicy(pulumi.CustomResource):
327
310
  ## Additional Examples
328
311
 
329
312
  ##### Provision multiple notification channels and add those channels to a policy
313
+ <!--Start PulumiCodeChooser -->
330
314
  ```python
331
315
  import pulumi
332
316
  import pulumi_newrelic as newrelic
333
317
 
334
318
  # Provision a Slack notification channel.
335
- slack_channel = newrelic.AlertChannel("slack_channel",
336
- name="slack-example",
319
+ slack_channel = newrelic.AlertChannel("slackChannel",
337
320
  type="slack",
338
321
  config=newrelic.AlertChannelConfigArgs(
339
322
  url="https://hooks.slack.com/services/xxxxxxx/yyyyyyyy",
340
323
  channel="example-alerts-channel",
341
324
  ))
342
325
  # Provision an email notification channel.
343
- email_channel = newrelic.AlertChannel("email_channel",
344
- name="email-example",
326
+ email_channel = newrelic.AlertChannel("emailChannel",
345
327
  type="email",
346
328
  config=newrelic.AlertChannelConfigArgs(
347
329
  recipients="example@testing.com",
348
330
  include_json_attachment="1",
349
331
  ))
350
332
  # Provision the alert policy.
351
- policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
352
- name="example-with-channels",
333
+ policy_with_channels = newrelic.AlertPolicy("policyWithChannels",
353
334
  incident_preference="PER_CONDITION",
354
335
  channel_ids=[
355
336
  slack_channel.id,
356
337
  email_channel.id,
357
338
  ])
358
339
  ```
340
+ <!--End PulumiCodeChooser -->
359
341
 
360
342
  ### Reference existing notification channels and add those channel to a policy
343
+ <!--Start PulumiCodeChooser -->
361
344
  ```python
362
345
  import pulumi
363
346
  import pulumi_newrelic as newrelic
364
347
 
365
- # Reference an existing Slack notification channel.
366
348
  slack_channel = newrelic.get_alert_channel(name="slack-channel-notification")
367
- # Reference an existing email notification channel.
368
349
  email_channel = newrelic.get_alert_channel(name="test@example.com")
369
350
  # Provision the alert policy.
370
- policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
371
- name="example-with-channels",
351
+ policy_with_channels = newrelic.AlertPolicy("policyWithChannels",
372
352
  incident_preference="PER_CONDITION",
373
353
  channel_ids=[
374
354
  slack_channel.id,
375
355
  email_channel.id,
376
356
  ])
377
357
  ```
358
+ <!--End PulumiCodeChooser -->
378
359
 
379
360
  ## Import
380
361
 
@@ -440,12 +421,9 @@ class AlertPolicy(pulumi.CustomResource):
440
421
  :param str resource_name: The unique name of the resulting resource.
441
422
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
442
423
  :param pulumi.ResourceOptions opts: Options for the resource.
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.
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`.
449
427
  :param pulumi.Input[str] name: The name of the policy.
450
428
  """
451
429
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -462,7 +440,7 @@ class AlertPolicy(pulumi.CustomResource):
462
440
  @pulumi.getter(name="accountId")
463
441
  def account_id(self) -> pulumi.Output[int]:
464
442
  """
465
- The New Relic account ID to operate on.
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`.
466
444
  """
467
445
  return pulumi.get(self, "account_id")
468
446
 
@@ -470,9 +448,7 @@ class AlertPolicy(pulumi.CustomResource):
470
448
  @pulumi.getter(name="channelIds")
471
449
  def channel_ids(self) -> pulumi.Output[Optional[Sequence[int]]]:
472
450
  """
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.
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.
476
452
  """
477
453
  warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
478
454
  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.""")
@@ -483,8 +459,7 @@ class AlertPolicy(pulumi.CustomResource):
483
459
  @pulumi.getter(name="incidentPreference")
484
460
  def incident_preference(self) -> pulumi.Output[Optional[str]]:
485
461
  """
486
- The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default
487
- is PER_POLICY.
462
+ The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
488
463
  """
489
464
  return pulumi.get(self, "incident_preference")
490
465
 
@@ -139,24 +139,21 @@ 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 -->
142
143
  ```python
143
144
  import pulumi
144
145
  import pulumi_newrelic as newrelic
145
146
 
146
- # Fetches the data for this policy from your New Relic account
147
- # and is referenced in the newrelic_alert_policy_channel block below.
148
147
  example_policy = newrelic.get_alert_policy(name="my-alert-policy")
149
148
  # Creates an email alert channel.
150
- email_channel = newrelic.AlertChannel("email_channel",
151
- name="bar",
149
+ email_channel = newrelic.AlertChannel("emailChannel",
152
150
  type="email",
153
151
  config=newrelic.AlertChannelConfigArgs(
154
152
  recipients="foo@example.com",
155
153
  include_json_attachment="1",
156
154
  ))
157
155
  # Creates a Slack alert channel.
158
- slack_channel = newrelic.AlertChannel("slack_channel",
159
- name="slack-channel-example",
156
+ slack_channel = newrelic.AlertChannel("slackChannel",
160
157
  type="slack",
161
158
  config=newrelic.AlertChannelConfigArgs(
162
159
  channel="#example-channel",
@@ -171,6 +168,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
171
168
  slack_channel.id,
172
169
  ])
173
170
  ```
171
+ <!--End PulumiCodeChooser -->
174
172
 
175
173
  ## Import
176
174
 
@@ -202,24 +200,21 @@ class AlertPolicyChannel(pulumi.CustomResource):
202
200
 
203
201
  The example below will apply multiple alert channels to an existing New Relic alert policy.
204
202
 
203
+ <!--Start PulumiCodeChooser -->
205
204
  ```python
206
205
  import pulumi
207
206
  import pulumi_newrelic as newrelic
208
207
 
209
- # Fetches the data for this policy from your New Relic account
210
- # and is referenced in the newrelic_alert_policy_channel block below.
211
208
  example_policy = newrelic.get_alert_policy(name="my-alert-policy")
212
209
  # Creates an email alert channel.
213
- email_channel = newrelic.AlertChannel("email_channel",
214
- name="bar",
210
+ email_channel = newrelic.AlertChannel("emailChannel",
215
211
  type="email",
216
212
  config=newrelic.AlertChannelConfigArgs(
217
213
  recipients="foo@example.com",
218
214
  include_json_attachment="1",
219
215
  ))
220
216
  # Creates a Slack alert channel.
221
- slack_channel = newrelic.AlertChannel("slack_channel",
222
- name="slack-channel-example",
217
+ slack_channel = newrelic.AlertChannel("slackChannel",
223
218
  type="slack",
224
219
  config=newrelic.AlertChannelConfigArgs(
225
220
  channel="#example-channel",
@@ -234,6 +229,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
234
229
  slack_channel.id,
235
230
  ])
236
231
  ```
232
+ <!--End PulumiCodeChooser -->
237
233
 
238
234
  ## Import
239
235