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

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

Potentially problematic release.


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

Files changed (92) hide show
  1. pulumi_newrelic/__init__.py +28 -1
  2. pulumi_newrelic/_inputs.py +10385 -2976
  3. pulumi_newrelic/_utilities.py +50 -10
  4. pulumi_newrelic/account_management.py +48 -42
  5. pulumi_newrelic/alert_channel.py +165 -175
  6. pulumi_newrelic/alert_condition.py +307 -319
  7. pulumi_newrelic/alert_muting_rule.py +193 -140
  8. pulumi_newrelic/alert_policy.py +121 -117
  9. pulumi_newrelic/alert_policy_channel.py +89 -79
  10. pulumi_newrelic/api_access_key.py +195 -193
  11. pulumi_newrelic/browser_application.py +120 -114
  12. pulumi_newrelic/cloud/__init__.py +3 -1
  13. pulumi_newrelic/cloud/_inputs.py +4267 -2714
  14. pulumi_newrelic/cloud/aws_govcloud_integrations.py +206 -196
  15. pulumi_newrelic/cloud/aws_govcloud_link_account.py +143 -228
  16. pulumi_newrelic/cloud/aws_integrations.py +510 -1490
  17. pulumi_newrelic/cloud/aws_link_account.py +80 -76
  18. pulumi_newrelic/cloud/azure_integrations.py +673 -587
  19. pulumi_newrelic/cloud/azure_link_account.py +121 -117
  20. pulumi_newrelic/cloud/gcp_integrations.py +428 -408
  21. pulumi_newrelic/cloud/gcp_link_account.py +65 -61
  22. pulumi_newrelic/cloud/oci_link_account.py +926 -0
  23. pulumi_newrelic/cloud/outputs.py +1678 -2321
  24. pulumi_newrelic/config/__init__.py +2 -1
  25. pulumi_newrelic/config/__init__.pyi +8 -3
  26. pulumi_newrelic/config/vars.py +22 -17
  27. pulumi_newrelic/data_partition_rule.py +119 -117
  28. pulumi_newrelic/entity_tags.py +111 -53
  29. pulumi_newrelic/events_to_metrics_rule.py +106 -102
  30. pulumi_newrelic/get_account.py +41 -33
  31. pulumi_newrelic/get_alert_channel.py +73 -28
  32. pulumi_newrelic/get_alert_policy.py +82 -33
  33. pulumi_newrelic/get_application.py +51 -43
  34. pulumi_newrelic/get_authentication_domain.py +27 -23
  35. pulumi_newrelic/get_cloud_account.py +43 -35
  36. pulumi_newrelic/get_entity.py +126 -183
  37. pulumi_newrelic/get_group.py +76 -31
  38. pulumi_newrelic/get_key_transaction.py +117 -42
  39. pulumi_newrelic/get_notification_destination.py +75 -38
  40. pulumi_newrelic/get_obfuscation_expression.py +47 -39
  41. pulumi_newrelic/get_service_level_alert_helper.py +189 -171
  42. pulumi_newrelic/get_test_grok_pattern.py +47 -36
  43. pulumi_newrelic/get_user.py +39 -31
  44. pulumi_newrelic/group.py +59 -199
  45. pulumi_newrelic/infra_alert_condition.py +399 -405
  46. pulumi_newrelic/insights/__init__.py +2 -1
  47. pulumi_newrelic/insights/_inputs.py +71 -28
  48. pulumi_newrelic/insights/event.py +54 -52
  49. pulumi_newrelic/insights/outputs.py +28 -23
  50. pulumi_newrelic/key_transaction.py +465 -0
  51. pulumi_newrelic/log_parsing_rule.py +159 -157
  52. pulumi_newrelic/monitor_downtime.py +311 -331
  53. pulumi_newrelic/notification_channel.py +534 -464
  54. pulumi_newrelic/notification_destination.py +238 -141
  55. pulumi_newrelic/nrql_alert_condition.py +820 -614
  56. pulumi_newrelic/nrql_drop_rule.py +113 -151
  57. pulumi_newrelic/obfuscation_expression.py +80 -76
  58. pulumi_newrelic/obfuscation_rule.py +115 -109
  59. pulumi_newrelic/one_dashboard.py +110 -104
  60. pulumi_newrelic/one_dashboard_json.py +69 -63
  61. pulumi_newrelic/one_dashboard_raw.py +212 -206
  62. pulumi_newrelic/outputs.py +4936 -2234
  63. pulumi_newrelic/pipeline_cloud_rule.py +335 -0
  64. pulumi_newrelic/plugins/__init__.py +2 -1
  65. pulumi_newrelic/plugins/_inputs.py +519 -89
  66. pulumi_newrelic/plugins/application_settings.py +463 -187
  67. pulumi_newrelic/plugins/outputs.py +336 -74
  68. pulumi_newrelic/plugins/workload.py +313 -189
  69. pulumi_newrelic/provider.py +156 -142
  70. pulumi_newrelic/pulumi-plugin.json +2 -1
  71. pulumi_newrelic/service_level.py +263 -263
  72. pulumi_newrelic/synthetics/__init__.py +2 -1
  73. pulumi_newrelic/synthetics/_inputs.py +265 -108
  74. pulumi_newrelic/synthetics/alert_condition.py +170 -180
  75. pulumi_newrelic/synthetics/broken_links_monitor.py +297 -249
  76. pulumi_newrelic/synthetics/cert_check_monitor.py +306 -258
  77. pulumi_newrelic/synthetics/get_private_location.py +51 -47
  78. pulumi_newrelic/synthetics/get_secure_credential.py +39 -31
  79. pulumi_newrelic/synthetics/monitor.py +658 -460
  80. pulumi_newrelic/synthetics/multi_location_alert_condition.py +211 -205
  81. pulumi_newrelic/synthetics/outputs.py +92 -87
  82. pulumi_newrelic/synthetics/private_location.py +118 -112
  83. pulumi_newrelic/synthetics/script_monitor.py +613 -373
  84. pulumi_newrelic/synthetics/secure_credential.py +97 -95
  85. pulumi_newrelic/synthetics/step_monitor.py +445 -275
  86. pulumi_newrelic/user.py +84 -80
  87. pulumi_newrelic/workflow.py +336 -322
  88. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +7 -6
  89. pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
  90. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
  91. pulumi_newrelic-5.22.0.dist-info/RECORD +0 -89
  92. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
  from ._inputs import *
@@ -18,25 +23,25 @@ class WorkflowArgs:
18
23
  def __init__(__self__, *,
19
24
  destinations: pulumi.Input[Sequence[pulumi.Input['WorkflowDestinationArgs']]],
20
25
  issues_filter: pulumi.Input['WorkflowIssuesFilterArgs'],
21
- muting_rules_handling: pulumi.Input[str],
22
- account_id: Optional[pulumi.Input[int]] = None,
23
- destinations_enabled: Optional[pulumi.Input[bool]] = None,
24
- enabled: Optional[pulumi.Input[bool]] = None,
26
+ muting_rules_handling: pulumi.Input[_builtins.str],
27
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
28
+ destinations_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
29
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
25
30
  enrichments: Optional[pulumi.Input['WorkflowEnrichmentsArgs']] = None,
26
- enrichments_enabled: Optional[pulumi.Input[bool]] = None,
27
- name: Optional[pulumi.Input[str]] = None):
31
+ enrichments_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
32
+ name: Optional[pulumi.Input[_builtins.str]] = None):
28
33
  """
29
34
  The set of arguments for constructing a Workflow resource.
30
35
  :param pulumi.Input[Sequence[pulumi.Input['WorkflowDestinationArgs']]] destinations: Notification configuration. See Nested destination blocks below for details.
31
36
  :param pulumi.Input['WorkflowIssuesFilterArgs'] issues_filter: A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
32
- :param pulumi.Input[str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
33
- :param pulumi.Input[int] account_id: Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
34
- :param pulumi.Input[bool] destinations_enabled: **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
37
+ :param pulumi.Input[_builtins.str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
38
+ :param pulumi.Input[_builtins.str] account_id: Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
39
+ :param pulumi.Input[_builtins.bool] destinations_enabled: **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
35
40
  these two are different flags, but they are functionally identical. Defaults to true.
36
- :param pulumi.Input[bool] enabled: Whether workflow is enabled. Defaults to true.
41
+ :param pulumi.Input[_builtins.bool] enabled: Whether workflow is enabled. Defaults to true.
37
42
  :param pulumi.Input['WorkflowEnrichmentsArgs'] enrichments: Workflow's enrichments. See Nested enrichments blocks below for details.
38
- :param pulumi.Input[bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
39
- :param pulumi.Input[str] name: The name of the workflow.
43
+ :param pulumi.Input[_builtins.bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
44
+ :param pulumi.Input[_builtins.str] name: The name of the workflow.
40
45
  """
41
46
  pulumi.set(__self__, "destinations", destinations)
42
47
  pulumi.set(__self__, "issues_filter", issues_filter)
@@ -57,7 +62,7 @@ class WorkflowArgs:
57
62
  if name is not None:
58
63
  pulumi.set(__self__, "name", name)
59
64
 
60
- @property
65
+ @_builtins.property
61
66
  @pulumi.getter
62
67
  def destinations(self) -> pulumi.Input[Sequence[pulumi.Input['WorkflowDestinationArgs']]]:
63
68
  """
@@ -69,7 +74,7 @@ class WorkflowArgs:
69
74
  def destinations(self, value: pulumi.Input[Sequence[pulumi.Input['WorkflowDestinationArgs']]]):
70
75
  pulumi.set(self, "destinations", value)
71
76
 
72
- @property
77
+ @_builtins.property
73
78
  @pulumi.getter(name="issuesFilter")
74
79
  def issues_filter(self) -> pulumi.Input['WorkflowIssuesFilterArgs']:
75
80
  """
@@ -81,59 +86,57 @@ class WorkflowArgs:
81
86
  def issues_filter(self, value: pulumi.Input['WorkflowIssuesFilterArgs']):
82
87
  pulumi.set(self, "issues_filter", value)
83
88
 
84
- @property
89
+ @_builtins.property
85
90
  @pulumi.getter(name="mutingRulesHandling")
86
- def muting_rules_handling(self) -> pulumi.Input[str]:
91
+ def muting_rules_handling(self) -> pulumi.Input[_builtins.str]:
87
92
  """
88
93
  How to handle muted issues. See Muting Rules below for details.
89
94
  """
90
95
  return pulumi.get(self, "muting_rules_handling")
91
96
 
92
97
  @muting_rules_handling.setter
93
- def muting_rules_handling(self, value: pulumi.Input[str]):
98
+ def muting_rules_handling(self, value: pulumi.Input[_builtins.str]):
94
99
  pulumi.set(self, "muting_rules_handling", value)
95
100
 
96
- @property
101
+ @_builtins.property
97
102
  @pulumi.getter(name="accountId")
98
- def account_id(self) -> Optional[pulumi.Input[int]]:
103
+ def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
99
104
  """
100
105
  Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
101
106
  """
102
107
  return pulumi.get(self, "account_id")
103
108
 
104
109
  @account_id.setter
105
- def account_id(self, value: Optional[pulumi.Input[int]]):
110
+ def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
106
111
  pulumi.set(self, "account_id", value)
107
112
 
108
- @property
113
+ @_builtins.property
109
114
  @pulumi.getter(name="destinationsEnabled")
110
- def destinations_enabled(self) -> Optional[pulumi.Input[bool]]:
115
+ @_utilities.deprecated("""Please use 'enabled' instead""")
116
+ def destinations_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
111
117
  """
112
118
  **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
113
119
  these two are different flags, but they are functionally identical. Defaults to true.
114
120
  """
115
- warnings.warn("""Please use 'enabled' instead""", DeprecationWarning)
116
- pulumi.log.warn("""destinations_enabled is deprecated: Please use 'enabled' instead""")
117
-
118
121
  return pulumi.get(self, "destinations_enabled")
119
122
 
120
123
  @destinations_enabled.setter
121
- def destinations_enabled(self, value: Optional[pulumi.Input[bool]]):
124
+ def destinations_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
122
125
  pulumi.set(self, "destinations_enabled", value)
123
126
 
124
- @property
127
+ @_builtins.property
125
128
  @pulumi.getter
126
- def enabled(self) -> Optional[pulumi.Input[bool]]:
129
+ def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
127
130
  """
128
131
  Whether workflow is enabled. Defaults to true.
129
132
  """
130
133
  return pulumi.get(self, "enabled")
131
134
 
132
135
  @enabled.setter
133
- def enabled(self, value: Optional[pulumi.Input[bool]]):
136
+ def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
134
137
  pulumi.set(self, "enabled", value)
135
138
 
136
- @property
139
+ @_builtins.property
137
140
  @pulumi.getter
138
141
  def enrichments(self) -> Optional[pulumi.Input['WorkflowEnrichmentsArgs']]:
139
142
  """
@@ -145,61 +148,61 @@ class WorkflowArgs:
145
148
  def enrichments(self, value: Optional[pulumi.Input['WorkflowEnrichmentsArgs']]):
146
149
  pulumi.set(self, "enrichments", value)
147
150
 
148
- @property
151
+ @_builtins.property
149
152
  @pulumi.getter(name="enrichmentsEnabled")
150
- def enrichments_enabled(self) -> Optional[pulumi.Input[bool]]:
153
+ def enrichments_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
151
154
  """
152
155
  Whether enrichments are enabled. Defaults to true.
153
156
  """
154
157
  return pulumi.get(self, "enrichments_enabled")
155
158
 
156
159
  @enrichments_enabled.setter
157
- def enrichments_enabled(self, value: Optional[pulumi.Input[bool]]):
160
+ def enrichments_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
158
161
  pulumi.set(self, "enrichments_enabled", value)
159
162
 
160
- @property
163
+ @_builtins.property
161
164
  @pulumi.getter
162
- def name(self) -> Optional[pulumi.Input[str]]:
165
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
163
166
  """
164
167
  The name of the workflow.
165
168
  """
166
169
  return pulumi.get(self, "name")
167
170
 
168
171
  @name.setter
169
- def name(self, value: Optional[pulumi.Input[str]]):
172
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
170
173
  pulumi.set(self, "name", value)
171
174
 
172
175
 
173
176
  @pulumi.input_type
174
177
  class _WorkflowState:
175
178
  def __init__(__self__, *,
176
- account_id: Optional[pulumi.Input[int]] = None,
179
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
177
180
  destinations: Optional[pulumi.Input[Sequence[pulumi.Input['WorkflowDestinationArgs']]]] = None,
178
- destinations_enabled: Optional[pulumi.Input[bool]] = None,
179
- enabled: Optional[pulumi.Input[bool]] = None,
181
+ destinations_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
182
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
180
183
  enrichments: Optional[pulumi.Input['WorkflowEnrichmentsArgs']] = None,
181
- enrichments_enabled: Optional[pulumi.Input[bool]] = None,
182
- guid: Optional[pulumi.Input[str]] = None,
184
+ enrichments_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
185
+ guid: Optional[pulumi.Input[_builtins.str]] = None,
183
186
  issues_filter: Optional[pulumi.Input['WorkflowIssuesFilterArgs']] = None,
184
- last_run: Optional[pulumi.Input[str]] = None,
185
- muting_rules_handling: Optional[pulumi.Input[str]] = None,
186
- name: Optional[pulumi.Input[str]] = None,
187
- workflow_id: Optional[pulumi.Input[str]] = None):
187
+ last_run: Optional[pulumi.Input[_builtins.str]] = None,
188
+ muting_rules_handling: Optional[pulumi.Input[_builtins.str]] = None,
189
+ name: Optional[pulumi.Input[_builtins.str]] = None,
190
+ workflow_id: Optional[pulumi.Input[_builtins.str]] = None):
188
191
  """
189
192
  Input properties used for looking up and filtering Workflow resources.
190
- :param pulumi.Input[int] account_id: Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
193
+ :param pulumi.Input[_builtins.str] account_id: Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
191
194
  :param pulumi.Input[Sequence[pulumi.Input['WorkflowDestinationArgs']]] destinations: Notification configuration. See Nested destination blocks below for details.
192
- :param pulumi.Input[bool] destinations_enabled: **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
195
+ :param pulumi.Input[_builtins.bool] destinations_enabled: **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
193
196
  these two are different flags, but they are functionally identical. Defaults to true.
194
- :param pulumi.Input[bool] enabled: Whether workflow is enabled. Defaults to true.
197
+ :param pulumi.Input[_builtins.bool] enabled: Whether workflow is enabled. Defaults to true.
195
198
  :param pulumi.Input['WorkflowEnrichmentsArgs'] enrichments: Workflow's enrichments. See Nested enrichments blocks below for details.
196
- :param pulumi.Input[bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
197
- :param pulumi.Input[str] guid: Workflow entity GUID
199
+ :param pulumi.Input[_builtins.bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
200
+ :param pulumi.Input[_builtins.str] guid: Workflow entity GUID
198
201
  :param pulumi.Input['WorkflowIssuesFilterArgs'] issues_filter: A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
199
- :param pulumi.Input[str] last_run: The last time notification was sent for this workflow.
200
- :param pulumi.Input[str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
201
- :param pulumi.Input[str] name: The name of the workflow.
202
- :param pulumi.Input[str] workflow_id: The id of the workflow.
202
+ :param pulumi.Input[_builtins.str] last_run: The last time notification was sent for this workflow.
203
+ :param pulumi.Input[_builtins.str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
204
+ :param pulumi.Input[_builtins.str] name: The name of the workflow.
205
+ :param pulumi.Input[_builtins.str] workflow_id: The id of the workflow.
203
206
  """
204
207
  if account_id is not None:
205
208
  pulumi.set(__self__, "account_id", account_id)
@@ -229,19 +232,19 @@ class _WorkflowState:
229
232
  if workflow_id is not None:
230
233
  pulumi.set(__self__, "workflow_id", workflow_id)
231
234
 
232
- @property
235
+ @_builtins.property
233
236
  @pulumi.getter(name="accountId")
234
- def account_id(self) -> Optional[pulumi.Input[int]]:
237
+ def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
235
238
  """
236
239
  Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
237
240
  """
238
241
  return pulumi.get(self, "account_id")
239
242
 
240
243
  @account_id.setter
241
- def account_id(self, value: Optional[pulumi.Input[int]]):
244
+ def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
242
245
  pulumi.set(self, "account_id", value)
243
246
 
244
- @property
247
+ @_builtins.property
245
248
  @pulumi.getter
246
249
  def destinations(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['WorkflowDestinationArgs']]]]:
247
250
  """
@@ -253,35 +256,33 @@ class _WorkflowState:
253
256
  def destinations(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['WorkflowDestinationArgs']]]]):
254
257
  pulumi.set(self, "destinations", value)
255
258
 
256
- @property
259
+ @_builtins.property
257
260
  @pulumi.getter(name="destinationsEnabled")
258
- def destinations_enabled(self) -> Optional[pulumi.Input[bool]]:
261
+ @_utilities.deprecated("""Please use 'enabled' instead""")
262
+ def destinations_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
259
263
  """
260
264
  **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
261
265
  these two are different flags, but they are functionally identical. Defaults to true.
262
266
  """
263
- warnings.warn("""Please use 'enabled' instead""", DeprecationWarning)
264
- pulumi.log.warn("""destinations_enabled is deprecated: Please use 'enabled' instead""")
265
-
266
267
  return pulumi.get(self, "destinations_enabled")
267
268
 
268
269
  @destinations_enabled.setter
269
- def destinations_enabled(self, value: Optional[pulumi.Input[bool]]):
270
+ def destinations_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
270
271
  pulumi.set(self, "destinations_enabled", value)
271
272
 
272
- @property
273
+ @_builtins.property
273
274
  @pulumi.getter
274
- def enabled(self) -> Optional[pulumi.Input[bool]]:
275
+ def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
275
276
  """
276
277
  Whether workflow is enabled. Defaults to true.
277
278
  """
278
279
  return pulumi.get(self, "enabled")
279
280
 
280
281
  @enabled.setter
281
- def enabled(self, value: Optional[pulumi.Input[bool]]):
282
+ def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
282
283
  pulumi.set(self, "enabled", value)
283
284
 
284
- @property
285
+ @_builtins.property
285
286
  @pulumi.getter
286
287
  def enrichments(self) -> Optional[pulumi.Input['WorkflowEnrichmentsArgs']]:
287
288
  """
@@ -293,31 +294,31 @@ class _WorkflowState:
293
294
  def enrichments(self, value: Optional[pulumi.Input['WorkflowEnrichmentsArgs']]):
294
295
  pulumi.set(self, "enrichments", value)
295
296
 
296
- @property
297
+ @_builtins.property
297
298
  @pulumi.getter(name="enrichmentsEnabled")
298
- def enrichments_enabled(self) -> Optional[pulumi.Input[bool]]:
299
+ def enrichments_enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
299
300
  """
300
301
  Whether enrichments are enabled. Defaults to true.
301
302
  """
302
303
  return pulumi.get(self, "enrichments_enabled")
303
304
 
304
305
  @enrichments_enabled.setter
305
- def enrichments_enabled(self, value: Optional[pulumi.Input[bool]]):
306
+ def enrichments_enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
306
307
  pulumi.set(self, "enrichments_enabled", value)
307
308
 
308
- @property
309
+ @_builtins.property
309
310
  @pulumi.getter
310
- def guid(self) -> Optional[pulumi.Input[str]]:
311
+ def guid(self) -> Optional[pulumi.Input[_builtins.str]]:
311
312
  """
312
313
  Workflow entity GUID
313
314
  """
314
315
  return pulumi.get(self, "guid")
315
316
 
316
317
  @guid.setter
317
- def guid(self, value: Optional[pulumi.Input[str]]):
318
+ def guid(self, value: Optional[pulumi.Input[_builtins.str]]):
318
319
  pulumi.set(self, "guid", value)
319
320
 
320
- @property
321
+ @_builtins.property
321
322
  @pulumi.getter(name="issuesFilter")
322
323
  def issues_filter(self) -> Optional[pulumi.Input['WorkflowIssuesFilterArgs']]:
323
324
  """
@@ -329,69 +330,70 @@ class _WorkflowState:
329
330
  def issues_filter(self, value: Optional[pulumi.Input['WorkflowIssuesFilterArgs']]):
330
331
  pulumi.set(self, "issues_filter", value)
331
332
 
332
- @property
333
+ @_builtins.property
333
334
  @pulumi.getter(name="lastRun")
334
- def last_run(self) -> Optional[pulumi.Input[str]]:
335
+ def last_run(self) -> Optional[pulumi.Input[_builtins.str]]:
335
336
  """
336
337
  The last time notification was sent for this workflow.
337
338
  """
338
339
  return pulumi.get(self, "last_run")
339
340
 
340
341
  @last_run.setter
341
- def last_run(self, value: Optional[pulumi.Input[str]]):
342
+ def last_run(self, value: Optional[pulumi.Input[_builtins.str]]):
342
343
  pulumi.set(self, "last_run", value)
343
344
 
344
- @property
345
+ @_builtins.property
345
346
  @pulumi.getter(name="mutingRulesHandling")
346
- def muting_rules_handling(self) -> Optional[pulumi.Input[str]]:
347
+ def muting_rules_handling(self) -> Optional[pulumi.Input[_builtins.str]]:
347
348
  """
348
349
  How to handle muted issues. See Muting Rules below for details.
349
350
  """
350
351
  return pulumi.get(self, "muting_rules_handling")
351
352
 
352
353
  @muting_rules_handling.setter
353
- def muting_rules_handling(self, value: Optional[pulumi.Input[str]]):
354
+ def muting_rules_handling(self, value: Optional[pulumi.Input[_builtins.str]]):
354
355
  pulumi.set(self, "muting_rules_handling", value)
355
356
 
356
- @property
357
+ @_builtins.property
357
358
  @pulumi.getter
358
- def name(self) -> Optional[pulumi.Input[str]]:
359
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
359
360
  """
360
361
  The name of the workflow.
361
362
  """
362
363
  return pulumi.get(self, "name")
363
364
 
364
365
  @name.setter
365
- def name(self, value: Optional[pulumi.Input[str]]):
366
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
366
367
  pulumi.set(self, "name", value)
367
368
 
368
- @property
369
+ @_builtins.property
369
370
  @pulumi.getter(name="workflowId")
370
- def workflow_id(self) -> Optional[pulumi.Input[str]]:
371
+ def workflow_id(self) -> Optional[pulumi.Input[_builtins.str]]:
371
372
  """
372
373
  The id of the workflow.
373
374
  """
374
375
  return pulumi.get(self, "workflow_id")
375
376
 
376
377
  @workflow_id.setter
377
- def workflow_id(self, value: Optional[pulumi.Input[str]]):
378
+ def workflow_id(self, value: Optional[pulumi.Input[_builtins.str]]):
378
379
  pulumi.set(self, "workflow_id", value)
379
380
 
380
381
 
382
+ @pulumi.type_token("newrelic:index/workflow:Workflow")
381
383
  class Workflow(pulumi.CustomResource):
382
384
  @overload
383
385
  def __init__(__self__,
384
386
  resource_name: str,
385
387
  opts: Optional[pulumi.ResourceOptions] = None,
386
- account_id: Optional[pulumi.Input[int]] = None,
387
- destinations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkflowDestinationArgs']]]]] = None,
388
- destinations_enabled: Optional[pulumi.Input[bool]] = None,
389
- enabled: Optional[pulumi.Input[bool]] = None,
390
- enrichments: Optional[pulumi.Input[pulumi.InputType['WorkflowEnrichmentsArgs']]] = None,
391
- enrichments_enabled: Optional[pulumi.Input[bool]] = None,
392
- issues_filter: Optional[pulumi.Input[pulumi.InputType['WorkflowIssuesFilterArgs']]] = None,
393
- muting_rules_handling: Optional[pulumi.Input[str]] = None,
394
- name: Optional[pulumi.Input[str]] = None,
388
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
389
+ destinations: Optional[pulumi.Input[Sequence[pulumi.Input[Union['WorkflowDestinationArgs', 'WorkflowDestinationArgsDict']]]]] = None,
390
+ destinations_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
391
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
392
+ enrichments: Optional[pulumi.Input[Union['WorkflowEnrichmentsArgs', 'WorkflowEnrichmentsArgsDict']]] = None,
393
+ enrichments_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
394
+ issues_filter: Optional[pulumi.Input[Union['WorkflowIssuesFilterArgs', 'WorkflowIssuesFilterArgsDict']]] = None,
395
+ muting_rules_handling: Optional[pulumi.Input[_builtins.str]] = None,
396
+ name: Optional[pulumi.Input[_builtins.str]] = None,
395
397
  __props__=None):
396
398
  """
397
399
  Use this resource to create and manage New Relic workflows.
@@ -399,139 +401,146 @@ class Workflow(pulumi.CustomResource):
399
401
  ## Example Usage
400
402
 
401
403
  ##### Workflow
402
- <!--Start PulumiCodeChooser -->
403
404
  ```python
404
405
  import pulumi
405
406
  import pulumi_newrelic as newrelic
406
407
 
407
408
  foo = newrelic.Workflow("foo",
409
+ name="workflow-example",
408
410
  muting_rules_handling="NOTIFY_ALL_ISSUES",
409
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
410
- name="filter-name",
411
- type="FILTER",
412
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
413
- attribute="accumulations.tag.team",
414
- operator="EXACTLY_MATCHES",
415
- values=["growth"],
416
- )],
417
- ),
418
- destinations=[newrelic.WorkflowDestinationArgs(
419
- channel_id=newrelic_notification_channel["some_channel"]["id"],
420
- )])
411
+ issues_filter={
412
+ "name": "filter-name",
413
+ "type": "FILTER",
414
+ "predicates": [{
415
+ "attribute": "accumulations.tag.team",
416
+ "operator": "EXACTLY_MATCHES",
417
+ "values": ["growth"],
418
+ }],
419
+ },
420
+ destinations=[{
421
+ "channel_id": some_channel["id"],
422
+ }])
421
423
  ```
422
- <!--End PulumiCodeChooser -->
423
424
 
424
425
  ## Policy-Based Workflow Example
425
426
 
426
427
  This scenario describes one of most common ways of using workflows by defining a set of policies the workflow handles
427
428
 
428
- <!--Start PulumiCodeChooser -->
429
429
  ```python
430
430
  import pulumi
431
431
  import pulumi_newrelic as newrelic
432
432
 
433
433
  # Create a policy to track
434
- my_policy = newrelic.AlertPolicy("my-policy")
434
+ my_policy = newrelic.AlertPolicy("my-policy", name="my_policy")
435
435
  # Create a reusable notification destination
436
436
  webhook_destination = newrelic.NotificationDestination("webhook-destination",
437
+ name="destination-webhook",
437
438
  type="WEBHOOK",
438
- properties=[newrelic.NotificationDestinationPropertyArgs(
439
- key="url",
440
- value="https://example.com",
441
- )],
442
- auth_basic=newrelic.NotificationDestinationAuthBasicArgs(
443
- user="username",
444
- password="password",
445
- ))
439
+ properties=[{
440
+ "key": "url",
441
+ "value": "https://example.com",
442
+ }],
443
+ auth_basic={
444
+ "user": "username",
445
+ "password": "password",
446
+ })
446
447
  # Create a notification channel to use in the workflow
447
448
  webhook_channel = newrelic.NotificationChannel("webhook-channel",
449
+ name="channel-webhook",
448
450
  type="WEBHOOK",
449
451
  destination_id=webhook_destination.id,
450
452
  product="IINT",
451
- properties=[newrelic.NotificationChannelPropertyArgs(
452
- key="payload",
453
- value="{}",
454
- label="Payload Template",
455
- )])
453
+ properties=[{
454
+ "key": "payload",
455
+ "value": "{}",
456
+ "label": "Payload Template",
457
+ }])
456
458
  # A workflow that matches issues that include incidents triggered by the policy
457
459
  workflow_example = newrelic.Workflow("workflow-example",
460
+ name="workflow-example",
458
461
  muting_rules_handling="NOTIFY_ALL_ISSUES",
459
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
460
- name="Filter-name",
461
- type="FILTER",
462
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
463
- attribute="labels.policyIds",
464
- operator="EXACTLY_MATCHES",
465
- values=[my_policy.id],
466
- )],
467
- ),
468
- destinations=[newrelic.WorkflowDestinationArgs(
469
- channel_id=webhook_channel.id,
470
- )])
462
+ issues_filter={
463
+ "name": "Filter-name",
464
+ "type": "FILTER",
465
+ "predicates": [{
466
+ "attribute": "labels.policyIds",
467
+ "operator": "EXACTLY_MATCHES",
468
+ "values": [my_policy.id],
469
+ }],
470
+ },
471
+ destinations=[{
472
+ "channel_id": webhook_channel.id,
473
+ }])
471
474
  ```
472
- <!--End PulumiCodeChooser -->
473
475
 
474
476
  ### An example of a workflow with enrichments
475
477
 
476
- <!--Start PulumiCodeChooser -->
477
478
  ```python
478
479
  import pulumi
479
480
  import pulumi_newrelic as newrelic
480
481
 
481
482
  workflow_example = newrelic.Workflow("workflow-example",
483
+ name="workflow-enrichment-example",
482
484
  muting_rules_handling="NOTIFY_ALL_ISSUES",
483
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
484
- name="Filter-name",
485
- type="FILTER",
486
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
487
- attribute="accumulations.tag.team",
488
- operator="EXACTLY_MATCHES",
489
- values=["my_team"],
490
- )],
491
- ),
492
- enrichments=newrelic.WorkflowEnrichmentsArgs(
493
- nrqls=[newrelic.WorkflowEnrichmentsNrqlArgs(
494
- name="Log Count",
495
- configurations=[newrelic.WorkflowEnrichmentsNrqlConfigurationArgs(
496
- query="SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
497
- )],
498
- )],
499
- ),
500
- destinations=[newrelic.WorkflowDestinationArgs(
501
- channel_id=newrelic_notification_channel["webhook-channel"]["id"],
502
- )])
485
+ issues_filter={
486
+ "name": "Filter-name",
487
+ "type": "FILTER",
488
+ "predicates": [{
489
+ "attribute": "accumulations.tag.team",
490
+ "operator": "EXACTLY_MATCHES",
491
+ "values": ["my_team"],
492
+ }],
493
+ },
494
+ enrichments={
495
+ "nrqls": [{
496
+ "name": "Log Count",
497
+ "configurations": [{
498
+ "query": "SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
499
+ }],
500
+ }],
501
+ },
502
+ destinations=[{
503
+ "channel_id": webhook_channel["id"],
504
+ }])
503
505
  ```
504
- <!--End PulumiCodeChooser -->
505
506
 
506
507
  ### An example of a workflow with notification triggers
507
508
 
508
- <!--Start PulumiCodeChooser -->
509
509
  ```python
510
510
  import pulumi
511
511
  import pulumi_newrelic as newrelic
512
512
 
513
513
  workflow_example = newrelic.Workflow("workflow-example",
514
+ name="workflow-enrichment-example",
514
515
  muting_rules_handling="NOTIFY_ALL_ISSUES",
515
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
516
- name="Filter-name",
517
- type="FILTER",
518
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
519
- attribute="accumulations.tag.team",
520
- operator="EXACTLY_MATCHES",
521
- values=["my_team"],
522
- )],
523
- ),
524
- destinations=[newrelic.WorkflowDestinationArgs(
525
- channel_id=newrelic_notification_channel["webhook-channel"]["id"],
526
- notification_triggers=["ACTIVATED"],
527
- )])
516
+ issues_filter={
517
+ "name": "Filter-name",
518
+ "type": "FILTER",
519
+ "predicates": [{
520
+ "attribute": "accumulations.tag.team",
521
+ "operator": "EXACTLY_MATCHES",
522
+ "values": ["my_team"],
523
+ }],
524
+ },
525
+ destinations=[{
526
+ "channel_id": webhook_channel["id"],
527
+ "notification_triggers": ["ACTIVATED"],
528
+ }])
528
529
  ```
529
- <!--End PulumiCodeChooser -->
530
530
 
531
531
  ## Additional Information
532
532
 
533
533
  More details about the workflows can be found [here](https://docs.newrelic.com/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows/).
534
534
 
535
+ ### Moving from Legacy Alert Policy Channels to Workflows
536
+ As described in the documentation of this resource, mapping alert channels (created using `NotificationDestination` and `NotificationChannel`) to policies can be performed using the `Workflow` resource, which is an alternative to the legacy resource `AlertPolicyChannel` (which consumes alert channels created using the legacy resource `AlertChannel`).
537
+
538
+ Both of the legacy resources mentioned above, `AlertChannel` and `AlertPolicyChannel` are **deprecated** and will be **removed in a future major release**, as stated in the documentation of both of these resources.
539
+
540
+ If you're currently using `AlertChannel` and `AlertPolicyChannel` to manage alert channels linked to policies, we **strongly recommend** migrating to these workflows and notifications-based resources at the earliest.
541
+
542
+ Please refer to the examples in this page, or this example for illustrations on setting up channels and workflows with these resources.
543
+
535
544
  ## v3.3 changes
536
545
 
537
546
  In version v3.3 we renamed the following arguments:
@@ -555,16 +564,16 @@ class Workflow(pulumi.CustomResource):
555
564
 
556
565
  :param str resource_name: The name of the resource.
557
566
  :param pulumi.ResourceOptions opts: Options for the resource.
558
- :param pulumi.Input[int] account_id: Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
559
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkflowDestinationArgs']]]] destinations: Notification configuration. See Nested destination blocks below for details.
560
- :param pulumi.Input[bool] destinations_enabled: **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
567
+ :param pulumi.Input[_builtins.str] account_id: Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
568
+ :param pulumi.Input[Sequence[pulumi.Input[Union['WorkflowDestinationArgs', 'WorkflowDestinationArgsDict']]]] destinations: Notification configuration. See Nested destination blocks below for details.
569
+ :param pulumi.Input[_builtins.bool] destinations_enabled: **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
561
570
  these two are different flags, but they are functionally identical. Defaults to true.
562
- :param pulumi.Input[bool] enabled: Whether workflow is enabled. Defaults to true.
563
- :param pulumi.Input[pulumi.InputType['WorkflowEnrichmentsArgs']] enrichments: Workflow's enrichments. See Nested enrichments blocks below for details.
564
- :param pulumi.Input[bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
565
- :param pulumi.Input[pulumi.InputType['WorkflowIssuesFilterArgs']] issues_filter: A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
566
- :param pulumi.Input[str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
567
- :param pulumi.Input[str] name: The name of the workflow.
571
+ :param pulumi.Input[_builtins.bool] enabled: Whether workflow is enabled. Defaults to true.
572
+ :param pulumi.Input[Union['WorkflowEnrichmentsArgs', 'WorkflowEnrichmentsArgsDict']] enrichments: Workflow's enrichments. See Nested enrichments blocks below for details.
573
+ :param pulumi.Input[_builtins.bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
574
+ :param pulumi.Input[Union['WorkflowIssuesFilterArgs', 'WorkflowIssuesFilterArgsDict']] issues_filter: A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
575
+ :param pulumi.Input[_builtins.str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
576
+ :param pulumi.Input[_builtins.str] name: The name of the workflow.
568
577
  """
569
578
  ...
570
579
  @overload
@@ -578,139 +587,146 @@ class Workflow(pulumi.CustomResource):
578
587
  ## Example Usage
579
588
 
580
589
  ##### Workflow
581
- <!--Start PulumiCodeChooser -->
582
590
  ```python
583
591
  import pulumi
584
592
  import pulumi_newrelic as newrelic
585
593
 
586
594
  foo = newrelic.Workflow("foo",
595
+ name="workflow-example",
587
596
  muting_rules_handling="NOTIFY_ALL_ISSUES",
588
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
589
- name="filter-name",
590
- type="FILTER",
591
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
592
- attribute="accumulations.tag.team",
593
- operator="EXACTLY_MATCHES",
594
- values=["growth"],
595
- )],
596
- ),
597
- destinations=[newrelic.WorkflowDestinationArgs(
598
- channel_id=newrelic_notification_channel["some_channel"]["id"],
599
- )])
597
+ issues_filter={
598
+ "name": "filter-name",
599
+ "type": "FILTER",
600
+ "predicates": [{
601
+ "attribute": "accumulations.tag.team",
602
+ "operator": "EXACTLY_MATCHES",
603
+ "values": ["growth"],
604
+ }],
605
+ },
606
+ destinations=[{
607
+ "channel_id": some_channel["id"],
608
+ }])
600
609
  ```
601
- <!--End PulumiCodeChooser -->
602
610
 
603
611
  ## Policy-Based Workflow Example
604
612
 
605
613
  This scenario describes one of most common ways of using workflows by defining a set of policies the workflow handles
606
614
 
607
- <!--Start PulumiCodeChooser -->
608
615
  ```python
609
616
  import pulumi
610
617
  import pulumi_newrelic as newrelic
611
618
 
612
619
  # Create a policy to track
613
- my_policy = newrelic.AlertPolicy("my-policy")
620
+ my_policy = newrelic.AlertPolicy("my-policy", name="my_policy")
614
621
  # Create a reusable notification destination
615
622
  webhook_destination = newrelic.NotificationDestination("webhook-destination",
623
+ name="destination-webhook",
616
624
  type="WEBHOOK",
617
- properties=[newrelic.NotificationDestinationPropertyArgs(
618
- key="url",
619
- value="https://example.com",
620
- )],
621
- auth_basic=newrelic.NotificationDestinationAuthBasicArgs(
622
- user="username",
623
- password="password",
624
- ))
625
+ properties=[{
626
+ "key": "url",
627
+ "value": "https://example.com",
628
+ }],
629
+ auth_basic={
630
+ "user": "username",
631
+ "password": "password",
632
+ })
625
633
  # Create a notification channel to use in the workflow
626
634
  webhook_channel = newrelic.NotificationChannel("webhook-channel",
635
+ name="channel-webhook",
627
636
  type="WEBHOOK",
628
637
  destination_id=webhook_destination.id,
629
638
  product="IINT",
630
- properties=[newrelic.NotificationChannelPropertyArgs(
631
- key="payload",
632
- value="{}",
633
- label="Payload Template",
634
- )])
639
+ properties=[{
640
+ "key": "payload",
641
+ "value": "{}",
642
+ "label": "Payload Template",
643
+ }])
635
644
  # A workflow that matches issues that include incidents triggered by the policy
636
645
  workflow_example = newrelic.Workflow("workflow-example",
646
+ name="workflow-example",
637
647
  muting_rules_handling="NOTIFY_ALL_ISSUES",
638
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
639
- name="Filter-name",
640
- type="FILTER",
641
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
642
- attribute="labels.policyIds",
643
- operator="EXACTLY_MATCHES",
644
- values=[my_policy.id],
645
- )],
646
- ),
647
- destinations=[newrelic.WorkflowDestinationArgs(
648
- channel_id=webhook_channel.id,
649
- )])
648
+ issues_filter={
649
+ "name": "Filter-name",
650
+ "type": "FILTER",
651
+ "predicates": [{
652
+ "attribute": "labels.policyIds",
653
+ "operator": "EXACTLY_MATCHES",
654
+ "values": [my_policy.id],
655
+ }],
656
+ },
657
+ destinations=[{
658
+ "channel_id": webhook_channel.id,
659
+ }])
650
660
  ```
651
- <!--End PulumiCodeChooser -->
652
661
 
653
662
  ### An example of a workflow with enrichments
654
663
 
655
- <!--Start PulumiCodeChooser -->
656
664
  ```python
657
665
  import pulumi
658
666
  import pulumi_newrelic as newrelic
659
667
 
660
668
  workflow_example = newrelic.Workflow("workflow-example",
669
+ name="workflow-enrichment-example",
661
670
  muting_rules_handling="NOTIFY_ALL_ISSUES",
662
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
663
- name="Filter-name",
664
- type="FILTER",
665
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
666
- attribute="accumulations.tag.team",
667
- operator="EXACTLY_MATCHES",
668
- values=["my_team"],
669
- )],
670
- ),
671
- enrichments=newrelic.WorkflowEnrichmentsArgs(
672
- nrqls=[newrelic.WorkflowEnrichmentsNrqlArgs(
673
- name="Log Count",
674
- configurations=[newrelic.WorkflowEnrichmentsNrqlConfigurationArgs(
675
- query="SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
676
- )],
677
- )],
678
- ),
679
- destinations=[newrelic.WorkflowDestinationArgs(
680
- channel_id=newrelic_notification_channel["webhook-channel"]["id"],
681
- )])
671
+ issues_filter={
672
+ "name": "Filter-name",
673
+ "type": "FILTER",
674
+ "predicates": [{
675
+ "attribute": "accumulations.tag.team",
676
+ "operator": "EXACTLY_MATCHES",
677
+ "values": ["my_team"],
678
+ }],
679
+ },
680
+ enrichments={
681
+ "nrqls": [{
682
+ "name": "Log Count",
683
+ "configurations": [{
684
+ "query": "SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
685
+ }],
686
+ }],
687
+ },
688
+ destinations=[{
689
+ "channel_id": webhook_channel["id"],
690
+ }])
682
691
  ```
683
- <!--End PulumiCodeChooser -->
684
692
 
685
693
  ### An example of a workflow with notification triggers
686
694
 
687
- <!--Start PulumiCodeChooser -->
688
695
  ```python
689
696
  import pulumi
690
697
  import pulumi_newrelic as newrelic
691
698
 
692
699
  workflow_example = newrelic.Workflow("workflow-example",
700
+ name="workflow-enrichment-example",
693
701
  muting_rules_handling="NOTIFY_ALL_ISSUES",
694
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
695
- name="Filter-name",
696
- type="FILTER",
697
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
698
- attribute="accumulations.tag.team",
699
- operator="EXACTLY_MATCHES",
700
- values=["my_team"],
701
- )],
702
- ),
703
- destinations=[newrelic.WorkflowDestinationArgs(
704
- channel_id=newrelic_notification_channel["webhook-channel"]["id"],
705
- notification_triggers=["ACTIVATED"],
706
- )])
702
+ issues_filter={
703
+ "name": "Filter-name",
704
+ "type": "FILTER",
705
+ "predicates": [{
706
+ "attribute": "accumulations.tag.team",
707
+ "operator": "EXACTLY_MATCHES",
708
+ "values": ["my_team"],
709
+ }],
710
+ },
711
+ destinations=[{
712
+ "channel_id": webhook_channel["id"],
713
+ "notification_triggers": ["ACTIVATED"],
714
+ }])
707
715
  ```
708
- <!--End PulumiCodeChooser -->
709
716
 
710
717
  ## Additional Information
711
718
 
712
719
  More details about the workflows can be found [here](https://docs.newrelic.com/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows/).
713
720
 
721
+ ### Moving from Legacy Alert Policy Channels to Workflows
722
+ As described in the documentation of this resource, mapping alert channels (created using `NotificationDestination` and `NotificationChannel`) to policies can be performed using the `Workflow` resource, which is an alternative to the legacy resource `AlertPolicyChannel` (which consumes alert channels created using the legacy resource `AlertChannel`).
723
+
724
+ Both of the legacy resources mentioned above, `AlertChannel` and `AlertPolicyChannel` are **deprecated** and will be **removed in a future major release**, as stated in the documentation of both of these resources.
725
+
726
+ If you're currently using `AlertChannel` and `AlertPolicyChannel` to manage alert channels linked to policies, we **strongly recommend** migrating to these workflows and notifications-based resources at the earliest.
727
+
728
+ Please refer to the examples in this page, or this example for illustrations on setting up channels and workflows with these resources.
729
+
714
730
  ## v3.3 changes
715
731
 
716
732
  In version v3.3 we renamed the following arguments:
@@ -747,15 +763,15 @@ class Workflow(pulumi.CustomResource):
747
763
  def _internal_init(__self__,
748
764
  resource_name: str,
749
765
  opts: Optional[pulumi.ResourceOptions] = None,
750
- account_id: Optional[pulumi.Input[int]] = None,
751
- destinations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkflowDestinationArgs']]]]] = None,
752
- destinations_enabled: Optional[pulumi.Input[bool]] = None,
753
- enabled: Optional[pulumi.Input[bool]] = None,
754
- enrichments: Optional[pulumi.Input[pulumi.InputType['WorkflowEnrichmentsArgs']]] = None,
755
- enrichments_enabled: Optional[pulumi.Input[bool]] = None,
756
- issues_filter: Optional[pulumi.Input[pulumi.InputType['WorkflowIssuesFilterArgs']]] = None,
757
- muting_rules_handling: Optional[pulumi.Input[str]] = None,
758
- name: Optional[pulumi.Input[str]] = None,
766
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
767
+ destinations: Optional[pulumi.Input[Sequence[pulumi.Input[Union['WorkflowDestinationArgs', 'WorkflowDestinationArgsDict']]]]] = None,
768
+ destinations_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
769
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
770
+ enrichments: Optional[pulumi.Input[Union['WorkflowEnrichmentsArgs', 'WorkflowEnrichmentsArgsDict']]] = None,
771
+ enrichments_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
772
+ issues_filter: Optional[pulumi.Input[Union['WorkflowIssuesFilterArgs', 'WorkflowIssuesFilterArgsDict']]] = None,
773
+ muting_rules_handling: Optional[pulumi.Input[_builtins.str]] = None,
774
+ name: Optional[pulumi.Input[_builtins.str]] = None,
759
775
  __props__=None):
760
776
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
761
777
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -793,18 +809,18 @@ class Workflow(pulumi.CustomResource):
793
809
  def get(resource_name: str,
794
810
  id: pulumi.Input[str],
795
811
  opts: Optional[pulumi.ResourceOptions] = None,
796
- account_id: Optional[pulumi.Input[int]] = None,
797
- destinations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkflowDestinationArgs']]]]] = None,
798
- destinations_enabled: Optional[pulumi.Input[bool]] = None,
799
- enabled: Optional[pulumi.Input[bool]] = None,
800
- enrichments: Optional[pulumi.Input[pulumi.InputType['WorkflowEnrichmentsArgs']]] = None,
801
- enrichments_enabled: Optional[pulumi.Input[bool]] = None,
802
- guid: Optional[pulumi.Input[str]] = None,
803
- issues_filter: Optional[pulumi.Input[pulumi.InputType['WorkflowIssuesFilterArgs']]] = None,
804
- last_run: Optional[pulumi.Input[str]] = None,
805
- muting_rules_handling: Optional[pulumi.Input[str]] = None,
806
- name: Optional[pulumi.Input[str]] = None,
807
- workflow_id: Optional[pulumi.Input[str]] = None) -> 'Workflow':
812
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
813
+ destinations: Optional[pulumi.Input[Sequence[pulumi.Input[Union['WorkflowDestinationArgs', 'WorkflowDestinationArgsDict']]]]] = None,
814
+ destinations_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
815
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
816
+ enrichments: Optional[pulumi.Input[Union['WorkflowEnrichmentsArgs', 'WorkflowEnrichmentsArgsDict']]] = None,
817
+ enrichments_enabled: Optional[pulumi.Input[_builtins.bool]] = None,
818
+ guid: Optional[pulumi.Input[_builtins.str]] = None,
819
+ issues_filter: Optional[pulumi.Input[Union['WorkflowIssuesFilterArgs', 'WorkflowIssuesFilterArgsDict']]] = None,
820
+ last_run: Optional[pulumi.Input[_builtins.str]] = None,
821
+ muting_rules_handling: Optional[pulumi.Input[_builtins.str]] = None,
822
+ name: Optional[pulumi.Input[_builtins.str]] = None,
823
+ workflow_id: Optional[pulumi.Input[_builtins.str]] = None) -> 'Workflow':
808
824
  """
809
825
  Get an existing Workflow resource's state with the given name, id, and optional extra
810
826
  properties used to qualify the lookup.
@@ -812,19 +828,19 @@ class Workflow(pulumi.CustomResource):
812
828
  :param str resource_name: The unique name of the resulting resource.
813
829
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
814
830
  :param pulumi.ResourceOptions opts: Options for the resource.
815
- :param pulumi.Input[int] account_id: Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
816
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkflowDestinationArgs']]]] destinations: Notification configuration. See Nested destination blocks below for details.
817
- :param pulumi.Input[bool] destinations_enabled: **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
831
+ :param pulumi.Input[_builtins.str] account_id: Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
832
+ :param pulumi.Input[Sequence[pulumi.Input[Union['WorkflowDestinationArgs', 'WorkflowDestinationArgsDict']]]] destinations: Notification configuration. See Nested destination blocks below for details.
833
+ :param pulumi.Input[_builtins.bool] destinations_enabled: **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
818
834
  these two are different flags, but they are functionally identical. Defaults to true.
819
- :param pulumi.Input[bool] enabled: Whether workflow is enabled. Defaults to true.
820
- :param pulumi.Input[pulumi.InputType['WorkflowEnrichmentsArgs']] enrichments: Workflow's enrichments. See Nested enrichments blocks below for details.
821
- :param pulumi.Input[bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
822
- :param pulumi.Input[str] guid: Workflow entity GUID
823
- :param pulumi.Input[pulumi.InputType['WorkflowIssuesFilterArgs']] issues_filter: A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
824
- :param pulumi.Input[str] last_run: The last time notification was sent for this workflow.
825
- :param pulumi.Input[str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
826
- :param pulumi.Input[str] name: The name of the workflow.
827
- :param pulumi.Input[str] workflow_id: The id of the workflow.
835
+ :param pulumi.Input[_builtins.bool] enabled: Whether workflow is enabled. Defaults to true.
836
+ :param pulumi.Input[Union['WorkflowEnrichmentsArgs', 'WorkflowEnrichmentsArgsDict']] enrichments: Workflow's enrichments. See Nested enrichments blocks below for details.
837
+ :param pulumi.Input[_builtins.bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
838
+ :param pulumi.Input[_builtins.str] guid: Workflow entity GUID
839
+ :param pulumi.Input[Union['WorkflowIssuesFilterArgs', 'WorkflowIssuesFilterArgsDict']] issues_filter: A filter used to identify issues handled by this workflow. See Nested issues_filter blocks below for details.
840
+ :param pulumi.Input[_builtins.str] last_run: The last time notification was sent for this workflow.
841
+ :param pulumi.Input[_builtins.str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
842
+ :param pulumi.Input[_builtins.str] name: The name of the workflow.
843
+ :param pulumi.Input[_builtins.str] workflow_id: The id of the workflow.
828
844
  """
829
845
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
830
846
 
@@ -844,15 +860,15 @@ class Workflow(pulumi.CustomResource):
844
860
  __props__.__dict__["workflow_id"] = workflow_id
845
861
  return Workflow(resource_name, opts=opts, __props__=__props__)
846
862
 
847
- @property
863
+ @_builtins.property
848
864
  @pulumi.getter(name="accountId")
849
- def account_id(self) -> pulumi.Output[int]:
865
+ def account_id(self) -> pulumi.Output[_builtins.str]:
850
866
  """
851
867
  Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
852
868
  """
853
869
  return pulumi.get(self, "account_id")
854
870
 
855
- @property
871
+ @_builtins.property
856
872
  @pulumi.getter
857
873
  def destinations(self) -> pulumi.Output[Sequence['outputs.WorkflowDestination']]:
858
874
  """
@@ -860,27 +876,25 @@ class Workflow(pulumi.CustomResource):
860
876
  """
861
877
  return pulumi.get(self, "destinations")
862
878
 
863
- @property
879
+ @_builtins.property
864
880
  @pulumi.getter(name="destinationsEnabled")
865
- def destinations_enabled(self) -> pulumi.Output[Optional[bool]]:
881
+ @_utilities.deprecated("""Please use 'enabled' instead""")
882
+ def destinations_enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
866
883
  """
867
884
  **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
868
885
  these two are different flags, but they are functionally identical. Defaults to true.
869
886
  """
870
- warnings.warn("""Please use 'enabled' instead""", DeprecationWarning)
871
- pulumi.log.warn("""destinations_enabled is deprecated: Please use 'enabled' instead""")
872
-
873
887
  return pulumi.get(self, "destinations_enabled")
874
888
 
875
- @property
889
+ @_builtins.property
876
890
  @pulumi.getter
877
- def enabled(self) -> pulumi.Output[Optional[bool]]:
891
+ def enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
878
892
  """
879
893
  Whether workflow is enabled. Defaults to true.
880
894
  """
881
895
  return pulumi.get(self, "enabled")
882
896
 
883
- @property
897
+ @_builtins.property
884
898
  @pulumi.getter
885
899
  def enrichments(self) -> pulumi.Output[Optional['outputs.WorkflowEnrichments']]:
886
900
  """
@@ -888,23 +902,23 @@ class Workflow(pulumi.CustomResource):
888
902
  """
889
903
  return pulumi.get(self, "enrichments")
890
904
 
891
- @property
905
+ @_builtins.property
892
906
  @pulumi.getter(name="enrichmentsEnabled")
893
- def enrichments_enabled(self) -> pulumi.Output[Optional[bool]]:
907
+ def enrichments_enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
894
908
  """
895
909
  Whether enrichments are enabled. Defaults to true.
896
910
  """
897
911
  return pulumi.get(self, "enrichments_enabled")
898
912
 
899
- @property
913
+ @_builtins.property
900
914
  @pulumi.getter
901
- def guid(self) -> pulumi.Output[str]:
915
+ def guid(self) -> pulumi.Output[_builtins.str]:
902
916
  """
903
917
  Workflow entity GUID
904
918
  """
905
919
  return pulumi.get(self, "guid")
906
920
 
907
- @property
921
+ @_builtins.property
908
922
  @pulumi.getter(name="issuesFilter")
909
923
  def issues_filter(self) -> pulumi.Output['outputs.WorkflowIssuesFilter']:
910
924
  """
@@ -912,33 +926,33 @@ class Workflow(pulumi.CustomResource):
912
926
  """
913
927
  return pulumi.get(self, "issues_filter")
914
928
 
915
- @property
929
+ @_builtins.property
916
930
  @pulumi.getter(name="lastRun")
917
- def last_run(self) -> pulumi.Output[str]:
931
+ def last_run(self) -> pulumi.Output[_builtins.str]:
918
932
  """
919
933
  The last time notification was sent for this workflow.
920
934
  """
921
935
  return pulumi.get(self, "last_run")
922
936
 
923
- @property
937
+ @_builtins.property
924
938
  @pulumi.getter(name="mutingRulesHandling")
925
- def muting_rules_handling(self) -> pulumi.Output[str]:
939
+ def muting_rules_handling(self) -> pulumi.Output[_builtins.str]:
926
940
  """
927
941
  How to handle muted issues. See Muting Rules below for details.
928
942
  """
929
943
  return pulumi.get(self, "muting_rules_handling")
930
944
 
931
- @property
945
+ @_builtins.property
932
946
  @pulumi.getter
933
- def name(self) -> pulumi.Output[str]:
947
+ def name(self) -> pulumi.Output[_builtins.str]:
934
948
  """
935
949
  The name of the workflow.
936
950
  """
937
951
  return pulumi.get(self, "name")
938
952
 
939
- @property
953
+ @_builtins.property
940
954
  @pulumi.getter(name="workflowId")
941
- def workflow_id(self) -> pulumi.Output[str]:
955
+ def workflow_id(self) -> pulumi.Output[_builtins.str]:
942
956
  """
943
957
  The id of the workflow.
944
958
  """