pulumi-newrelic 5.16.0a1698964311__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 +58 -1
  2. pulumi_newrelic/_inputs.py +10772 -2775
  3. pulumi_newrelic/_utilities.py +92 -11
  4. pulumi_newrelic/account_management.py +56 -42
  5. pulumi_newrelic/alert_channel.py +177 -151
  6. pulumi_newrelic/alert_condition.py +313 -301
  7. pulumi_newrelic/alert_muting_rule.py +195 -138
  8. pulumi_newrelic/alert_policy.py +157 -109
  9. pulumi_newrelic/alert_policy_channel.py +95 -81
  10. pulumi_newrelic/api_access_key.py +191 -209
  11. pulumi_newrelic/browser_application.py +161 -153
  12. pulumi_newrelic/cloud/__init__.py +3 -1
  13. pulumi_newrelic/cloud/_inputs.py +4267 -2710
  14. pulumi_newrelic/cloud/aws_govcloud_integrations.py +238 -200
  15. pulumi_newrelic/cloud/aws_govcloud_link_account.py +159 -212
  16. pulumi_newrelic/cloud/aws_integrations.py +518 -1490
  17. pulumi_newrelic/cloud/aws_link_account.py +88 -76
  18. pulumi_newrelic/cloud/azure_integrations.py +681 -587
  19. pulumi_newrelic/cloud/azure_link_account.py +129 -117
  20. pulumi_newrelic/cloud/gcp_integrations.py +436 -408
  21. pulumi_newrelic/cloud/gcp_link_account.py +71 -59
  22. pulumi_newrelic/cloud/oci_link_account.py +926 -0
  23. pulumi_newrelic/cloud/outputs.py +1678 -2317
  24. pulumi_newrelic/config/__init__.py +2 -1
  25. pulumi_newrelic/config/__init__.pyi +45 -0
  26. pulumi_newrelic/config/vars.py +22 -17
  27. pulumi_newrelic/data_partition_rule.py +129 -117
  28. pulumi_newrelic/entity_tags.py +153 -31
  29. pulumi_newrelic/events_to_metrics_rule.py +114 -102
  30. pulumi_newrelic/get_account.py +41 -29
  31. pulumi_newrelic/get_alert_channel.py +73 -28
  32. pulumi_newrelic/get_alert_policy.py +83 -34
  33. pulumi_newrelic/get_application.py +51 -39
  34. pulumi_newrelic/get_authentication_domain.py +111 -0
  35. pulumi_newrelic/get_cloud_account.py +43 -31
  36. pulumi_newrelic/get_entity.py +126 -121
  37. pulumi_newrelic/get_group.py +190 -0
  38. pulumi_newrelic/get_key_transaction.py +117 -38
  39. pulumi_newrelic/get_notification_destination.py +86 -36
  40. pulumi_newrelic/get_obfuscation_expression.py +47 -35
  41. pulumi_newrelic/get_service_level_alert_helper.py +237 -137
  42. pulumi_newrelic/get_test_grok_pattern.py +47 -32
  43. pulumi_newrelic/get_user.py +165 -0
  44. pulumi_newrelic/group.py +286 -0
  45. pulumi_newrelic/infra_alert_condition.py +400 -382
  46. pulumi_newrelic/insights/__init__.py +2 -1
  47. pulumi_newrelic/insights/_inputs.py +94 -23
  48. pulumi_newrelic/insights/event.py +56 -48
  49. pulumi_newrelic/insights/outputs.py +51 -18
  50. pulumi_newrelic/key_transaction.py +465 -0
  51. pulumi_newrelic/log_parsing_rule.py +169 -153
  52. pulumi_newrelic/monitor_downtime.py +914 -0
  53. pulumi_newrelic/notification_channel.py +560 -418
  54. pulumi_newrelic/notification_destination.py +379 -124
  55. pulumi_newrelic/nrql_alert_condition.py +945 -513
  56. pulumi_newrelic/nrql_drop_rule.py +121 -129
  57. pulumi_newrelic/obfuscation_expression.py +88 -76
  58. pulumi_newrelic/obfuscation_rule.py +123 -109
  59. pulumi_newrelic/one_dashboard.py +118 -108
  60. pulumi_newrelic/one_dashboard_json.py +77 -67
  61. pulumi_newrelic/one_dashboard_raw.py +214 -202
  62. pulumi_newrelic/outputs.py +5491 -2141
  63. pulumi_newrelic/pipeline_cloud_rule.py +335 -0
  64. pulumi_newrelic/plugins/__init__.py +2 -1
  65. pulumi_newrelic/plugins/_inputs.py +520 -90
  66. pulumi_newrelic/plugins/application_settings.py +463 -167
  67. pulumi_newrelic/plugins/outputs.py +337 -75
  68. pulumi_newrelic/plugins/workload.py +387 -151
  69. pulumi_newrelic/provider.py +156 -142
  70. pulumi_newrelic/pulumi-plugin.json +2 -1
  71. pulumi_newrelic/service_level.py +277 -255
  72. pulumi_newrelic/synthetics/__init__.py +2 -1
  73. pulumi_newrelic/synthetics/_inputs.py +275 -106
  74. pulumi_newrelic/synthetics/alert_condition.py +174 -160
  75. pulumi_newrelic/synthetics/broken_links_monitor.py +367 -207
  76. pulumi_newrelic/synthetics/cert_check_monitor.py +380 -218
  77. pulumi_newrelic/synthetics/get_private_location.py +51 -39
  78. pulumi_newrelic/synthetics/get_secure_credential.py +39 -27
  79. pulumi_newrelic/synthetics/monitor.py +668 -462
  80. pulumi_newrelic/synthetics/multi_location_alert_condition.py +219 -201
  81. pulumi_newrelic/synthetics/outputs.py +102 -85
  82. pulumi_newrelic/synthetics/private_location.py +120 -110
  83. pulumi_newrelic/synthetics/script_monitor.py +623 -375
  84. pulumi_newrelic/synthetics/secure_credential.py +99 -93
  85. pulumi_newrelic/synthetics/step_monitor.py +545 -201
  86. pulumi_newrelic/user.py +366 -0
  87. pulumi_newrelic/workflow.py +348 -312
  88. {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +8 -7
  89. pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
  90. {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
  91. pulumi_newrelic-5.16.0a1698964311.dist-info/RECORD +0 -82
  92. {pulumi_newrelic-5.16.0a1698964311.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.
@@ -404,20 +406,22 @@ class Workflow(pulumi.CustomResource):
404
406
  import pulumi_newrelic as newrelic
405
407
 
406
408
  foo = newrelic.Workflow("foo",
409
+ name="workflow-example",
407
410
  muting_rules_handling="NOTIFY_ALL_ISSUES",
408
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
409
- name="filter-name",
410
- type="FILTER",
411
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
412
- attribute="accumulations.tag.team",
413
- operator="EXACTLY_MATCHES",
414
- values=["growth"],
415
- )],
416
- ),
417
- destinations=[newrelic.WorkflowDestinationArgs(
418
- channel_id=newrelic_notification_channel["some_channel"]["id"],
419
- )])
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
+ }])
420
423
  ```
424
+
421
425
  ## Policy-Based Workflow Example
422
426
 
423
427
  This scenario describes one of most common ways of using workflows by defining a set of policies the workflow handles
@@ -427,43 +431,46 @@ class Workflow(pulumi.CustomResource):
427
431
  import pulumi_newrelic as newrelic
428
432
 
429
433
  # Create a policy to track
430
- my_policy = newrelic.AlertPolicy("my-policy")
434
+ my_policy = newrelic.AlertPolicy("my-policy", name="my_policy")
431
435
  # Create a reusable notification destination
432
436
  webhook_destination = newrelic.NotificationDestination("webhook-destination",
437
+ name="destination-webhook",
433
438
  type="WEBHOOK",
434
- properties=[newrelic.NotificationDestinationPropertyArgs(
435
- key="url",
436
- value="https://example.com",
437
- )],
438
- auth_basic=newrelic.NotificationDestinationAuthBasicArgs(
439
- user="username",
440
- password="password",
441
- ))
439
+ properties=[{
440
+ "key": "url",
441
+ "value": "https://example.com",
442
+ }],
443
+ auth_basic={
444
+ "user": "username",
445
+ "password": "password",
446
+ })
442
447
  # Create a notification channel to use in the workflow
443
448
  webhook_channel = newrelic.NotificationChannel("webhook-channel",
449
+ name="channel-webhook",
444
450
  type="WEBHOOK",
445
451
  destination_id=webhook_destination.id,
446
452
  product="IINT",
447
- properties=[newrelic.NotificationChannelPropertyArgs(
448
- key="payload",
449
- value="{}",
450
- label="Payload Template",
451
- )])
453
+ properties=[{
454
+ "key": "payload",
455
+ "value": "{}",
456
+ "label": "Payload Template",
457
+ }])
452
458
  # A workflow that matches issues that include incidents triggered by the policy
453
459
  workflow_example = newrelic.Workflow("workflow-example",
460
+ name="workflow-example",
454
461
  muting_rules_handling="NOTIFY_ALL_ISSUES",
455
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
456
- name="Filter-name",
457
- type="FILTER",
458
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
459
- attribute="labels.policyIds",
460
- operator="EXACTLY_MATCHES",
461
- values=[my_policy.id],
462
- )],
463
- ),
464
- destinations=[newrelic.WorkflowDestinationArgs(
465
- channel_id=webhook_channel.id,
466
- )])
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
+ }])
467
474
  ```
468
475
 
469
476
  ### An example of a workflow with enrichments
@@ -473,27 +480,28 @@ class Workflow(pulumi.CustomResource):
473
480
  import pulumi_newrelic as newrelic
474
481
 
475
482
  workflow_example = newrelic.Workflow("workflow-example",
483
+ name="workflow-enrichment-example",
476
484
  muting_rules_handling="NOTIFY_ALL_ISSUES",
477
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
478
- name="Filter-name",
479
- type="FILTER",
480
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
481
- attribute="accumulations.tag.team",
482
- operator="EXACTLY_MATCHES",
483
- values=["my_team"],
484
- )],
485
- ),
486
- enrichments=newrelic.WorkflowEnrichmentsArgs(
487
- nrqls=[newrelic.WorkflowEnrichmentsNrqlArgs(
488
- name="Log Count",
489
- configurations=[newrelic.WorkflowEnrichmentsNrqlConfigurationArgs(
490
- query="SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
491
- )],
492
- )],
493
- ),
494
- destinations=[newrelic.WorkflowDestinationArgs(
495
- channel_id=newrelic_notification_channel["webhook-channel"]["id"],
496
- )])
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
+ }])
497
505
  ```
498
506
 
499
507
  ### An example of a workflow with notification triggers
@@ -503,26 +511,36 @@ class Workflow(pulumi.CustomResource):
503
511
  import pulumi_newrelic as newrelic
504
512
 
505
513
  workflow_example = newrelic.Workflow("workflow-example",
514
+ name="workflow-enrichment-example",
506
515
  muting_rules_handling="NOTIFY_ALL_ISSUES",
507
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
508
- name="Filter-name",
509
- type="FILTER",
510
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
511
- attribute="accumulations.tag.team",
512
- operator="EXACTLY_MATCHES",
513
- values=["my_team"],
514
- )],
515
- ),
516
- destinations=[newrelic.WorkflowDestinationArgs(
517
- channel_id=newrelic_notification_channel["webhook-channel"]["id"],
518
- notification_triggers=["ACTIVATED"],
519
- )])
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
+ }])
520
529
  ```
521
530
 
522
531
  ## Additional Information
523
532
 
524
533
  More details about the workflows can be found [here](https://docs.newrelic.com/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows/).
525
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
+
526
544
  ## v3.3 changes
527
545
 
528
546
  In version v3.3 we renamed the following arguments:
@@ -534,26 +552,28 @@ class Workflow(pulumi.CustomResource):
534
552
 
535
553
  ## Import
536
554
 
537
- Workflows can be imported using the `id`, e.g. bash
555
+ Workflows can be imported using the `id`, e.g.
556
+
557
+ bash
538
558
 
539
559
  ```sh
540
- $ pulumi import newrelic:index/workflow:Workflow foo <id>
560
+ $ pulumi import newrelic:index/workflow:Workflow foo <id>
541
561
  ```
542
562
 
543
- You can find the workflow ID from the workflow table by clicking on ... at the end of the row and choosing `Copy workflow id to clipboard`.
563
+ You can find the workflow ID from the workflow table by clicking on ... at the end of the row and choosing `Copy workflow id to clipboard`.
544
564
 
545
565
  :param str resource_name: The name of the resource.
546
566
  :param pulumi.ResourceOptions opts: Options for the resource.
547
- :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.
548
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkflowDestinationArgs']]]] destinations: Notification configuration. See Nested destination blocks below for details.
549
- :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:
550
570
  these two are different flags, but they are functionally identical. Defaults to true.
551
- :param pulumi.Input[bool] enabled: Whether workflow is enabled. Defaults to true.
552
- :param pulumi.Input[pulumi.InputType['WorkflowEnrichmentsArgs']] enrichments: Workflow's enrichments. See Nested enrichments blocks below for details.
553
- :param pulumi.Input[bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
554
- :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.
555
- :param pulumi.Input[str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
556
- :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.
557
577
  """
558
578
  ...
559
579
  @overload
@@ -572,20 +592,22 @@ class Workflow(pulumi.CustomResource):
572
592
  import pulumi_newrelic as newrelic
573
593
 
574
594
  foo = newrelic.Workflow("foo",
595
+ name="workflow-example",
575
596
  muting_rules_handling="NOTIFY_ALL_ISSUES",
576
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
577
- name="filter-name",
578
- type="FILTER",
579
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
580
- attribute="accumulations.tag.team",
581
- operator="EXACTLY_MATCHES",
582
- values=["growth"],
583
- )],
584
- ),
585
- destinations=[newrelic.WorkflowDestinationArgs(
586
- channel_id=newrelic_notification_channel["some_channel"]["id"],
587
- )])
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
+ }])
588
609
  ```
610
+
589
611
  ## Policy-Based Workflow Example
590
612
 
591
613
  This scenario describes one of most common ways of using workflows by defining a set of policies the workflow handles
@@ -595,43 +617,46 @@ class Workflow(pulumi.CustomResource):
595
617
  import pulumi_newrelic as newrelic
596
618
 
597
619
  # Create a policy to track
598
- my_policy = newrelic.AlertPolicy("my-policy")
620
+ my_policy = newrelic.AlertPolicy("my-policy", name="my_policy")
599
621
  # Create a reusable notification destination
600
622
  webhook_destination = newrelic.NotificationDestination("webhook-destination",
623
+ name="destination-webhook",
601
624
  type="WEBHOOK",
602
- properties=[newrelic.NotificationDestinationPropertyArgs(
603
- key="url",
604
- value="https://example.com",
605
- )],
606
- auth_basic=newrelic.NotificationDestinationAuthBasicArgs(
607
- user="username",
608
- password="password",
609
- ))
625
+ properties=[{
626
+ "key": "url",
627
+ "value": "https://example.com",
628
+ }],
629
+ auth_basic={
630
+ "user": "username",
631
+ "password": "password",
632
+ })
610
633
  # Create a notification channel to use in the workflow
611
634
  webhook_channel = newrelic.NotificationChannel("webhook-channel",
635
+ name="channel-webhook",
612
636
  type="WEBHOOK",
613
637
  destination_id=webhook_destination.id,
614
638
  product="IINT",
615
- properties=[newrelic.NotificationChannelPropertyArgs(
616
- key="payload",
617
- value="{}",
618
- label="Payload Template",
619
- )])
639
+ properties=[{
640
+ "key": "payload",
641
+ "value": "{}",
642
+ "label": "Payload Template",
643
+ }])
620
644
  # A workflow that matches issues that include incidents triggered by the policy
621
645
  workflow_example = newrelic.Workflow("workflow-example",
646
+ name="workflow-example",
622
647
  muting_rules_handling="NOTIFY_ALL_ISSUES",
623
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
624
- name="Filter-name",
625
- type="FILTER",
626
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
627
- attribute="labels.policyIds",
628
- operator="EXACTLY_MATCHES",
629
- values=[my_policy.id],
630
- )],
631
- ),
632
- destinations=[newrelic.WorkflowDestinationArgs(
633
- channel_id=webhook_channel.id,
634
- )])
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
+ }])
635
660
  ```
636
661
 
637
662
  ### An example of a workflow with enrichments
@@ -641,27 +666,28 @@ class Workflow(pulumi.CustomResource):
641
666
  import pulumi_newrelic as newrelic
642
667
 
643
668
  workflow_example = newrelic.Workflow("workflow-example",
669
+ name="workflow-enrichment-example",
644
670
  muting_rules_handling="NOTIFY_ALL_ISSUES",
645
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
646
- name="Filter-name",
647
- type="FILTER",
648
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
649
- attribute="accumulations.tag.team",
650
- operator="EXACTLY_MATCHES",
651
- values=["my_team"],
652
- )],
653
- ),
654
- enrichments=newrelic.WorkflowEnrichmentsArgs(
655
- nrqls=[newrelic.WorkflowEnrichmentsNrqlArgs(
656
- name="Log Count",
657
- configurations=[newrelic.WorkflowEnrichmentsNrqlConfigurationArgs(
658
- query="SELECT count(*) FROM Log WHERE message like '%error%' since 10 minutes ago",
659
- )],
660
- )],
661
- ),
662
- destinations=[newrelic.WorkflowDestinationArgs(
663
- channel_id=newrelic_notification_channel["webhook-channel"]["id"],
664
- )])
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
+ }])
665
691
  ```
666
692
 
667
693
  ### An example of a workflow with notification triggers
@@ -671,26 +697,36 @@ class Workflow(pulumi.CustomResource):
671
697
  import pulumi_newrelic as newrelic
672
698
 
673
699
  workflow_example = newrelic.Workflow("workflow-example",
700
+ name="workflow-enrichment-example",
674
701
  muting_rules_handling="NOTIFY_ALL_ISSUES",
675
- issues_filter=newrelic.WorkflowIssuesFilterArgs(
676
- name="Filter-name",
677
- type="FILTER",
678
- predicates=[newrelic.WorkflowIssuesFilterPredicateArgs(
679
- attribute="accumulations.tag.team",
680
- operator="EXACTLY_MATCHES",
681
- values=["my_team"],
682
- )],
683
- ),
684
- destinations=[newrelic.WorkflowDestinationArgs(
685
- channel_id=newrelic_notification_channel["webhook-channel"]["id"],
686
- notification_triggers=["ACTIVATED"],
687
- )])
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
+ }])
688
715
  ```
689
716
 
690
717
  ## Additional Information
691
718
 
692
719
  More details about the workflows can be found [here](https://docs.newrelic.com/docs/alerts-applied-intelligence/applied-intelligence/incident-workflows/incident-workflows/).
693
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
+
694
730
  ## v3.3 changes
695
731
 
696
732
  In version v3.3 we renamed the following arguments:
@@ -702,13 +738,15 @@ class Workflow(pulumi.CustomResource):
702
738
 
703
739
  ## Import
704
740
 
705
- Workflows can be imported using the `id`, e.g. bash
741
+ Workflows can be imported using the `id`, e.g.
742
+
743
+ bash
706
744
 
707
745
  ```sh
708
- $ pulumi import newrelic:index/workflow:Workflow foo <id>
746
+ $ pulumi import newrelic:index/workflow:Workflow foo <id>
709
747
  ```
710
748
 
711
- You can find the workflow ID from the workflow table by clicking on ... at the end of the row and choosing `Copy workflow id to clipboard`.
749
+ You can find the workflow ID from the workflow table by clicking on ... at the end of the row and choosing `Copy workflow id to clipboard`.
712
750
 
713
751
  :param str resource_name: The name of the resource.
714
752
  :param WorkflowArgs args: The arguments to use to populate this resource's properties.
@@ -725,15 +763,15 @@ class Workflow(pulumi.CustomResource):
725
763
  def _internal_init(__self__,
726
764
  resource_name: str,
727
765
  opts: Optional[pulumi.ResourceOptions] = None,
728
- account_id: Optional[pulumi.Input[int]] = None,
729
- destinations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkflowDestinationArgs']]]]] = None,
730
- destinations_enabled: Optional[pulumi.Input[bool]] = None,
731
- enabled: Optional[pulumi.Input[bool]] = None,
732
- enrichments: Optional[pulumi.Input[pulumi.InputType['WorkflowEnrichmentsArgs']]] = None,
733
- enrichments_enabled: Optional[pulumi.Input[bool]] = None,
734
- issues_filter: Optional[pulumi.Input[pulumi.InputType['WorkflowIssuesFilterArgs']]] = None,
735
- muting_rules_handling: Optional[pulumi.Input[str]] = None,
736
- 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,
737
775
  __props__=None):
738
776
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
739
777
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -771,18 +809,18 @@ class Workflow(pulumi.CustomResource):
771
809
  def get(resource_name: str,
772
810
  id: pulumi.Input[str],
773
811
  opts: Optional[pulumi.ResourceOptions] = None,
774
- account_id: Optional[pulumi.Input[int]] = None,
775
- destinations: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkflowDestinationArgs']]]]] = None,
776
- destinations_enabled: Optional[pulumi.Input[bool]] = None,
777
- enabled: Optional[pulumi.Input[bool]] = None,
778
- enrichments: Optional[pulumi.Input[pulumi.InputType['WorkflowEnrichmentsArgs']]] = None,
779
- enrichments_enabled: Optional[pulumi.Input[bool]] = None,
780
- guid: Optional[pulumi.Input[str]] = None,
781
- issues_filter: Optional[pulumi.Input[pulumi.InputType['WorkflowIssuesFilterArgs']]] = None,
782
- last_run: Optional[pulumi.Input[str]] = None,
783
- muting_rules_handling: Optional[pulumi.Input[str]] = None,
784
- name: Optional[pulumi.Input[str]] = None,
785
- 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':
786
824
  """
787
825
  Get an existing Workflow resource's state with the given name, id, and optional extra
788
826
  properties used to qualify the lookup.
@@ -790,19 +828,19 @@ class Workflow(pulumi.CustomResource):
790
828
  :param str resource_name: The unique name of the resulting resource.
791
829
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
792
830
  :param pulumi.ResourceOptions opts: Options for the resource.
793
- :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.
794
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkflowDestinationArgs']]]] destinations: Notification configuration. See Nested destination blocks below for details.
795
- :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:
796
834
  these two are different flags, but they are functionally identical. Defaults to true.
797
- :param pulumi.Input[bool] enabled: Whether workflow is enabled. Defaults to true.
798
- :param pulumi.Input[pulumi.InputType['WorkflowEnrichmentsArgs']] enrichments: Workflow's enrichments. See Nested enrichments blocks below for details.
799
- :param pulumi.Input[bool] enrichments_enabled: Whether enrichments are enabled. Defaults to true.
800
- :param pulumi.Input[str] guid: Workflow entity GUID
801
- :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.
802
- :param pulumi.Input[str] last_run: The last time notification was sent for this workflow.
803
- :param pulumi.Input[str] muting_rules_handling: How to handle muted issues. See Muting Rules below for details.
804
- :param pulumi.Input[str] name: The name of the workflow.
805
- :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.
806
844
  """
807
845
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
808
846
 
@@ -822,15 +860,15 @@ class Workflow(pulumi.CustomResource):
822
860
  __props__.__dict__["workflow_id"] = workflow_id
823
861
  return Workflow(resource_name, opts=opts, __props__=__props__)
824
862
 
825
- @property
863
+ @_builtins.property
826
864
  @pulumi.getter(name="accountId")
827
- def account_id(self) -> pulumi.Output[int]:
865
+ def account_id(self) -> pulumi.Output[_builtins.str]:
828
866
  """
829
867
  Determines the New Relic account in which the workflow is created. Defaults to the account defined in the provider section.
830
868
  """
831
869
  return pulumi.get(self, "account_id")
832
870
 
833
- @property
871
+ @_builtins.property
834
872
  @pulumi.getter
835
873
  def destinations(self) -> pulumi.Output[Sequence['outputs.WorkflowDestination']]:
836
874
  """
@@ -838,27 +876,25 @@ class Workflow(pulumi.CustomResource):
838
876
  """
839
877
  return pulumi.get(self, "destinations")
840
878
 
841
- @property
879
+ @_builtins.property
842
880
  @pulumi.getter(name="destinationsEnabled")
843
- 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]]:
844
883
  """
845
884
  **DEPRECATED** Whether destinations are enabled. Please use `enabled` instead:
846
885
  these two are different flags, but they are functionally identical. Defaults to true.
847
886
  """
848
- warnings.warn("""Please use 'enabled' instead""", DeprecationWarning)
849
- pulumi.log.warn("""destinations_enabled is deprecated: Please use 'enabled' instead""")
850
-
851
887
  return pulumi.get(self, "destinations_enabled")
852
888
 
853
- @property
889
+ @_builtins.property
854
890
  @pulumi.getter
855
- def enabled(self) -> pulumi.Output[Optional[bool]]:
891
+ def enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
856
892
  """
857
893
  Whether workflow is enabled. Defaults to true.
858
894
  """
859
895
  return pulumi.get(self, "enabled")
860
896
 
861
- @property
897
+ @_builtins.property
862
898
  @pulumi.getter
863
899
  def enrichments(self) -> pulumi.Output[Optional['outputs.WorkflowEnrichments']]:
864
900
  """
@@ -866,23 +902,23 @@ class Workflow(pulumi.CustomResource):
866
902
  """
867
903
  return pulumi.get(self, "enrichments")
868
904
 
869
- @property
905
+ @_builtins.property
870
906
  @pulumi.getter(name="enrichmentsEnabled")
871
- def enrichments_enabled(self) -> pulumi.Output[Optional[bool]]:
907
+ def enrichments_enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
872
908
  """
873
909
  Whether enrichments are enabled. Defaults to true.
874
910
  """
875
911
  return pulumi.get(self, "enrichments_enabled")
876
912
 
877
- @property
913
+ @_builtins.property
878
914
  @pulumi.getter
879
- def guid(self) -> pulumi.Output[str]:
915
+ def guid(self) -> pulumi.Output[_builtins.str]:
880
916
  """
881
917
  Workflow entity GUID
882
918
  """
883
919
  return pulumi.get(self, "guid")
884
920
 
885
- @property
921
+ @_builtins.property
886
922
  @pulumi.getter(name="issuesFilter")
887
923
  def issues_filter(self) -> pulumi.Output['outputs.WorkflowIssuesFilter']:
888
924
  """
@@ -890,33 +926,33 @@ class Workflow(pulumi.CustomResource):
890
926
  """
891
927
  return pulumi.get(self, "issues_filter")
892
928
 
893
- @property
929
+ @_builtins.property
894
930
  @pulumi.getter(name="lastRun")
895
- def last_run(self) -> pulumi.Output[str]:
931
+ def last_run(self) -> pulumi.Output[_builtins.str]:
896
932
  """
897
933
  The last time notification was sent for this workflow.
898
934
  """
899
935
  return pulumi.get(self, "last_run")
900
936
 
901
- @property
937
+ @_builtins.property
902
938
  @pulumi.getter(name="mutingRulesHandling")
903
- def muting_rules_handling(self) -> pulumi.Output[str]:
939
+ def muting_rules_handling(self) -> pulumi.Output[_builtins.str]:
904
940
  """
905
941
  How to handle muted issues. See Muting Rules below for details.
906
942
  """
907
943
  return pulumi.get(self, "muting_rules_handling")
908
944
 
909
- @property
945
+ @_builtins.property
910
946
  @pulumi.getter
911
- def name(self) -> pulumi.Output[str]:
947
+ def name(self) -> pulumi.Output[_builtins.str]:
912
948
  """
913
949
  The name of the workflow.
914
950
  """
915
951
  return pulumi.get(self, "name")
916
952
 
917
- @property
953
+ @_builtins.property
918
954
  @pulumi.getter(name="workflowId")
919
- def workflow_id(self) -> pulumi.Output[str]:
955
+ def workflow_id(self) -> pulumi.Output[_builtins.str]:
920
956
  """
921
957
  The id of the workflow.
922
958
  """