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 *
@@ -16,16 +21,16 @@ __all__ = ['AlertChannelArgs', 'AlertChannel']
16
21
  @pulumi.input_type
17
22
  class AlertChannelArgs:
18
23
  def __init__(__self__, *,
19
- type: pulumi.Input[str],
20
- account_id: Optional[pulumi.Input[int]] = None,
24
+ type: pulumi.Input[_builtins.str],
25
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
21
26
  config: Optional[pulumi.Input['AlertChannelConfigArgs']] = None,
22
- name: Optional[pulumi.Input[str]] = None):
27
+ name: Optional[pulumi.Input[_builtins.str]] = None):
23
28
  """
24
29
  The set of arguments for constructing a AlertChannel resource.
25
- :param pulumi.Input[str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
26
- :param pulumi.Input[int] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
30
+ :param pulumi.Input[_builtins.str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
31
+ :param pulumi.Input[_builtins.str] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
27
32
  :param pulumi.Input['AlertChannelConfigArgs'] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
28
- :param pulumi.Input[str] name: The name of the channel.
33
+ :param pulumi.Input[_builtins.str] name: The name of the channel.
29
34
  """
30
35
  pulumi.set(__self__, "type", type)
31
36
  if account_id is not None:
@@ -35,31 +40,31 @@ class AlertChannelArgs:
35
40
  if name is not None:
36
41
  pulumi.set(__self__, "name", name)
37
42
 
38
- @property
43
+ @_builtins.property
39
44
  @pulumi.getter
40
- def type(self) -> pulumi.Input[str]:
45
+ def type(self) -> pulumi.Input[_builtins.str]:
41
46
  """
42
47
  The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
43
48
  """
44
49
  return pulumi.get(self, "type")
45
50
 
46
51
  @type.setter
47
- def type(self, value: pulumi.Input[str]):
52
+ def type(self, value: pulumi.Input[_builtins.str]):
48
53
  pulumi.set(self, "type", value)
49
54
 
50
- @property
55
+ @_builtins.property
51
56
  @pulumi.getter(name="accountId")
52
- def account_id(self) -> Optional[pulumi.Input[int]]:
57
+ def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
53
58
  """
54
59
  Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
55
60
  """
56
61
  return pulumi.get(self, "account_id")
57
62
 
58
63
  @account_id.setter
59
- def account_id(self, value: Optional[pulumi.Input[int]]):
64
+ def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
60
65
  pulumi.set(self, "account_id", value)
61
66
 
62
- @property
67
+ @_builtins.property
63
68
  @pulumi.getter
64
69
  def config(self) -> Optional[pulumi.Input['AlertChannelConfigArgs']]:
65
70
  """
@@ -71,32 +76,32 @@ class AlertChannelArgs:
71
76
  def config(self, value: Optional[pulumi.Input['AlertChannelConfigArgs']]):
72
77
  pulumi.set(self, "config", value)
73
78
 
74
- @property
79
+ @_builtins.property
75
80
  @pulumi.getter
76
- def name(self) -> Optional[pulumi.Input[str]]:
81
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
77
82
  """
78
83
  The name of the channel.
79
84
  """
80
85
  return pulumi.get(self, "name")
81
86
 
82
87
  @name.setter
83
- def name(self, value: Optional[pulumi.Input[str]]):
88
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
84
89
  pulumi.set(self, "name", value)
85
90
 
86
91
 
87
92
  @pulumi.input_type
88
93
  class _AlertChannelState:
89
94
  def __init__(__self__, *,
90
- account_id: Optional[pulumi.Input[int]] = None,
95
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
91
96
  config: Optional[pulumi.Input['AlertChannelConfigArgs']] = None,
92
- name: Optional[pulumi.Input[str]] = None,
93
- type: Optional[pulumi.Input[str]] = None):
97
+ name: Optional[pulumi.Input[_builtins.str]] = None,
98
+ type: Optional[pulumi.Input[_builtins.str]] = None):
94
99
  """
95
100
  Input properties used for looking up and filtering AlertChannel resources.
96
- :param pulumi.Input[int] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
101
+ :param pulumi.Input[_builtins.str] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
97
102
  :param pulumi.Input['AlertChannelConfigArgs'] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
98
- :param pulumi.Input[str] name: The name of the channel.
99
- :param pulumi.Input[str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
103
+ :param pulumi.Input[_builtins.str] name: The name of the channel.
104
+ :param pulumi.Input[_builtins.str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
100
105
  """
101
106
  if account_id is not None:
102
107
  pulumi.set(__self__, "account_id", account_id)
@@ -107,19 +112,19 @@ class _AlertChannelState:
107
112
  if type is not None:
108
113
  pulumi.set(__self__, "type", type)
109
114
 
110
- @property
115
+ @_builtins.property
111
116
  @pulumi.getter(name="accountId")
112
- def account_id(self) -> Optional[pulumi.Input[int]]:
117
+ def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
113
118
  """
114
119
  Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
115
120
  """
116
121
  return pulumi.get(self, "account_id")
117
122
 
118
123
  @account_id.setter
119
- def account_id(self, value: Optional[pulumi.Input[int]]):
124
+ def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
120
125
  pulumi.set(self, "account_id", value)
121
126
 
122
- @property
127
+ @_builtins.property
123
128
  @pulumi.getter
124
129
  def config(self) -> Optional[pulumi.Input['AlertChannelConfigArgs']]:
125
130
  """
@@ -131,173 +136,166 @@ class _AlertChannelState:
131
136
  def config(self, value: Optional[pulumi.Input['AlertChannelConfigArgs']]):
132
137
  pulumi.set(self, "config", value)
133
138
 
134
- @property
139
+ @_builtins.property
135
140
  @pulumi.getter
136
- def name(self) -> Optional[pulumi.Input[str]]:
141
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
137
142
  """
138
143
  The name of the channel.
139
144
  """
140
145
  return pulumi.get(self, "name")
141
146
 
142
147
  @name.setter
143
- def name(self, value: Optional[pulumi.Input[str]]):
148
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
144
149
  pulumi.set(self, "name", value)
145
150
 
146
- @property
151
+ @_builtins.property
147
152
  @pulumi.getter
148
- def type(self) -> Optional[pulumi.Input[str]]:
153
+ def type(self) -> Optional[pulumi.Input[_builtins.str]]:
149
154
  """
150
155
  The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
151
156
  """
152
157
  return pulumi.get(self, "type")
153
158
 
154
159
  @type.setter
155
- def type(self, value: Optional[pulumi.Input[str]]):
160
+ def type(self, value: Optional[pulumi.Input[_builtins.str]]):
156
161
  pulumi.set(self, "type", value)
157
162
 
158
163
 
164
+ @pulumi.type_token("newrelic:index/alertChannel:AlertChannel")
159
165
  class AlertChannel(pulumi.CustomResource):
160
166
  @overload
161
167
  def __init__(__self__,
162
168
  resource_name: str,
163
169
  opts: Optional[pulumi.ResourceOptions] = None,
164
- account_id: Optional[pulumi.Input[int]] = None,
165
- config: Optional[pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']]] = None,
166
- name: Optional[pulumi.Input[str]] = None,
167
- type: Optional[pulumi.Input[str]] = None,
170
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
171
+ config: Optional[pulumi.Input[Union['AlertChannelConfigArgs', 'AlertChannelConfigArgsDict']]] = None,
172
+ name: Optional[pulumi.Input[_builtins.str]] = None,
173
+ type: Optional[pulumi.Input[_builtins.str]] = None,
168
174
  __props__=None):
169
175
  """
170
176
  Use this resource to create and manage New Relic alert channels.
171
177
 
172
- > **WARNING:** The `AlertChannel` resource is deprecated and will be removed in the next major release. For managing channel resources in Workflows, use `NotificationChannel`.
178
+ > **WARNING:** The `AlertChannel` resource is **deprecated** and will be **removed in a future major release**. As an alternative, you can set up channels using a combination of the newer resources `NotificationDestination` and `NotificationChannel`. We **strongly recommend** migrating to these new resources at the earliest. Please refer to this example for a detailed illustration on setting up channels with these resources.
173
179
 
174
180
  ## Example Usage
175
181
 
176
182
  ### Email
177
- <!--Start PulumiCodeChooser -->
178
183
  ```python
179
184
  import pulumi
180
185
  import pulumi_newrelic as newrelic
181
186
 
182
187
  foo = newrelic.AlertChannel("foo",
183
- config=newrelic.AlertChannelConfigArgs(
184
- include_json_attachment="true",
185
- recipients="foo@example.com",
186
- ),
187
- type="email")
188
+ name="foo",
189
+ type="email",
190
+ config={
191
+ "recipients": "foo@example.com",
192
+ "include_json_attachment": "true",
193
+ })
188
194
  ```
189
- <!--End PulumiCodeChooser -->
190
195
 
191
196
  ## Additional Examples
192
197
 
193
198
  ##### Slack
194
- <!--Start PulumiCodeChooser -->
195
199
  ```python
196
200
  import pulumi
197
201
  import pulumi_newrelic as newrelic
198
202
 
199
203
  foo = newrelic.AlertChannel("foo",
200
- config=newrelic.AlertChannelConfigArgs(
201
- channel="example-alerts-channel",
202
- url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
203
- ),
204
- type="slack")
204
+ name="slack-example",
205
+ type="slack",
206
+ config={
207
+ "url": "https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
208
+ "channel": "example-alerts-channel",
209
+ })
205
210
  ```
206
- <!--End PulumiCodeChooser -->
207
211
 
208
212
  > **NOTE:** For instructions on setting up Webhooks with Slack, please visit the article linked under the argument `slack` in the aforementioned configuration, or [this article](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/notification-channels-control-where-send-alerts/#slack) in New Relic's docs for additional details on setting up the `New Relic Alerts` Slack application, and subsequently using the generated Webhook URL.
209
213
 
210
214
  ### OpsGenie
211
- <!--Start PulumiCodeChooser -->
212
215
  ```python
213
216
  import pulumi
214
217
  import pulumi_newrelic as newrelic
215
218
 
216
219
  foo = newrelic.AlertChannel("foo",
217
- config=newrelic.AlertChannelConfigArgs(
218
- api_key="abc123",
219
- recipients="user1@domain.com, user2@domain.com",
220
- tags="tag1, tag2",
221
- teams="team1, team2",
222
- ),
223
- type="opsgenie")
220
+ name="opsgenie-example",
221
+ type="opsgenie",
222
+ config={
223
+ "api_key": "abc123",
224
+ "teams": "team1, team2",
225
+ "tags": "tag1, tag2",
226
+ "recipients": "user1@domain.com, user2@domain.com",
227
+ })
224
228
  ```
225
- <!--End PulumiCodeChooser -->
226
229
 
227
230
  ### PagerDuty
228
- <!--Start PulumiCodeChooser -->
229
231
  ```python
230
232
  import pulumi
231
233
  import pulumi_newrelic as newrelic
232
234
 
233
235
  foo = newrelic.AlertChannel("foo",
234
- config=newrelic.AlertChannelConfigArgs(
235
- service_key="abc123",
236
- ),
237
- type="pagerduty")
236
+ name="pagerduty-example",
237
+ type="pagerduty",
238
+ config={
239
+ "service_key": "abc123",
240
+ })
238
241
  ```
239
- <!--End PulumiCodeChooser -->
240
242
 
241
243
  ### VictorOps
242
- <!--Start PulumiCodeChooser -->
243
244
  ```python
244
245
  import pulumi
245
246
  import pulumi_newrelic as newrelic
246
247
 
247
248
  foo = newrelic.AlertChannel("foo",
248
- config=newrelic.AlertChannelConfigArgs(
249
- key="abc123",
250
- route_key="/example",
251
- ),
252
- type="victorops")
249
+ name="victorops-example",
250
+ type="victorops",
251
+ config={
252
+ "key": "abc123",
253
+ "route_key": "/example",
254
+ })
253
255
  ```
254
- <!--End PulumiCodeChooser -->
255
256
 
256
257
  ### Webhook
257
- <!--Start PulumiCodeChooser -->
258
258
  ```python
259
259
  import pulumi
260
260
  import pulumi_newrelic as newrelic
261
261
 
262
262
  foo = newrelic.AlertChannel("foo",
263
+ name="webhook-example",
263
264
  type="webhook",
264
- config=newrelic.AlertChannelConfigArgs(
265
- base_url="http://www.test.com",
266
- payload_type="application/json",
267
- payload={
265
+ config={
266
+ "base_url": "http://www.test.com",
267
+ "payload_type": "application/json",
268
+ "payload": {
268
269
  "condition_name": "$CONDITION_NAME",
269
270
  "policy_name": "$POLICY_NAME",
270
271
  },
271
- headers={
272
+ "headers": {
272
273
  "header1": value1,
273
274
  "header2": value2,
274
275
  },
275
- ))
276
+ })
276
277
  ```
277
- <!--End PulumiCodeChooser -->
278
278
 
279
279
  ### Webhook with complex payload
280
- <!--Start PulumiCodeChooser -->
281
280
  ```python
282
281
  import pulumi
283
282
  import pulumi_newrelic as newrelic
284
283
 
285
284
  foo = newrelic.AlertChannel("foo",
286
- config=newrelic.AlertChannelConfigArgs(
287
- base_url="http://www.test.com",
288
- payload_string=\"\"\"{
289
- "my_custom_values": {
290
- "condition_name": "$CONDITION_NAME",
291
- "policy_name": "$POLICY_NAME"
285
+ name="webhook-example",
286
+ type="webhook",
287
+ config={
288
+ "base_url": "http://www.test.com",
289
+ "payload_type": "application/json",
290
+ "payload_string": \"\"\"{
291
+ \\"my_custom_values\\": {
292
+ \\"condition_name\\": \\"$CONDITION_NAME\\",
293
+ \\"policy_name\\": \\"$POLICY_NAME\\"
292
294
  }
293
295
  }
294
-
295
296
  \"\"\",
296
- payload_type="application/json",
297
- ),
298
- type="webhook")
297
+ })
299
298
  ```
300
- <!--End PulumiCodeChooser -->
301
299
 
302
300
  ## Import
303
301
 
@@ -311,10 +309,10 @@ class AlertChannel(pulumi.CustomResource):
311
309
 
312
310
  :param str resource_name: The name of the resource.
313
311
  :param pulumi.ResourceOptions opts: Options for the resource.
314
- :param pulumi.Input[int] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
315
- :param pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
316
- :param pulumi.Input[str] name: The name of the channel.
317
- :param pulumi.Input[str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
312
+ :param pulumi.Input[_builtins.str] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
313
+ :param pulumi.Input[Union['AlertChannelConfigArgs', 'AlertChannelConfigArgsDict']] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
314
+ :param pulumi.Input[_builtins.str] name: The name of the channel.
315
+ :param pulumi.Input[_builtins.str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
318
316
  """
319
317
  ...
320
318
  @overload
@@ -325,135 +323,127 @@ class AlertChannel(pulumi.CustomResource):
325
323
  """
326
324
  Use this resource to create and manage New Relic alert channels.
327
325
 
328
- > **WARNING:** The `AlertChannel` resource is deprecated and will be removed in the next major release. For managing channel resources in Workflows, use `NotificationChannel`.
326
+ > **WARNING:** The `AlertChannel` resource is **deprecated** and will be **removed in a future major release**. As an alternative, you can set up channels using a combination of the newer resources `NotificationDestination` and `NotificationChannel`. We **strongly recommend** migrating to these new resources at the earliest. Please refer to this example for a detailed illustration on setting up channels with these resources.
329
327
 
330
328
  ## Example Usage
331
329
 
332
330
  ### Email
333
- <!--Start PulumiCodeChooser -->
334
331
  ```python
335
332
  import pulumi
336
333
  import pulumi_newrelic as newrelic
337
334
 
338
335
  foo = newrelic.AlertChannel("foo",
339
- config=newrelic.AlertChannelConfigArgs(
340
- include_json_attachment="true",
341
- recipients="foo@example.com",
342
- ),
343
- type="email")
336
+ name="foo",
337
+ type="email",
338
+ config={
339
+ "recipients": "foo@example.com",
340
+ "include_json_attachment": "true",
341
+ })
344
342
  ```
345
- <!--End PulumiCodeChooser -->
346
343
 
347
344
  ## Additional Examples
348
345
 
349
346
  ##### Slack
350
- <!--Start PulumiCodeChooser -->
351
347
  ```python
352
348
  import pulumi
353
349
  import pulumi_newrelic as newrelic
354
350
 
355
351
  foo = newrelic.AlertChannel("foo",
356
- config=newrelic.AlertChannelConfigArgs(
357
- channel="example-alerts-channel",
358
- url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
359
- ),
360
- type="slack")
352
+ name="slack-example",
353
+ type="slack",
354
+ config={
355
+ "url": "https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
356
+ "channel": "example-alerts-channel",
357
+ })
361
358
  ```
362
- <!--End PulumiCodeChooser -->
363
359
 
364
360
  > **NOTE:** For instructions on setting up Webhooks with Slack, please visit the article linked under the argument `slack` in the aforementioned configuration, or [this article](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/notification-channels-control-where-send-alerts/#slack) in New Relic's docs for additional details on setting up the `New Relic Alerts` Slack application, and subsequently using the generated Webhook URL.
365
361
 
366
362
  ### OpsGenie
367
- <!--Start PulumiCodeChooser -->
368
363
  ```python
369
364
  import pulumi
370
365
  import pulumi_newrelic as newrelic
371
366
 
372
367
  foo = newrelic.AlertChannel("foo",
373
- config=newrelic.AlertChannelConfigArgs(
374
- api_key="abc123",
375
- recipients="user1@domain.com, user2@domain.com",
376
- tags="tag1, tag2",
377
- teams="team1, team2",
378
- ),
379
- type="opsgenie")
368
+ name="opsgenie-example",
369
+ type="opsgenie",
370
+ config={
371
+ "api_key": "abc123",
372
+ "teams": "team1, team2",
373
+ "tags": "tag1, tag2",
374
+ "recipients": "user1@domain.com, user2@domain.com",
375
+ })
380
376
  ```
381
- <!--End PulumiCodeChooser -->
382
377
 
383
378
  ### PagerDuty
384
- <!--Start PulumiCodeChooser -->
385
379
  ```python
386
380
  import pulumi
387
381
  import pulumi_newrelic as newrelic
388
382
 
389
383
  foo = newrelic.AlertChannel("foo",
390
- config=newrelic.AlertChannelConfigArgs(
391
- service_key="abc123",
392
- ),
393
- type="pagerduty")
384
+ name="pagerduty-example",
385
+ type="pagerduty",
386
+ config={
387
+ "service_key": "abc123",
388
+ })
394
389
  ```
395
- <!--End PulumiCodeChooser -->
396
390
 
397
391
  ### VictorOps
398
- <!--Start PulumiCodeChooser -->
399
392
  ```python
400
393
  import pulumi
401
394
  import pulumi_newrelic as newrelic
402
395
 
403
396
  foo = newrelic.AlertChannel("foo",
404
- config=newrelic.AlertChannelConfigArgs(
405
- key="abc123",
406
- route_key="/example",
407
- ),
408
- type="victorops")
397
+ name="victorops-example",
398
+ type="victorops",
399
+ config={
400
+ "key": "abc123",
401
+ "route_key": "/example",
402
+ })
409
403
  ```
410
- <!--End PulumiCodeChooser -->
411
404
 
412
405
  ### Webhook
413
- <!--Start PulumiCodeChooser -->
414
406
  ```python
415
407
  import pulumi
416
408
  import pulumi_newrelic as newrelic
417
409
 
418
410
  foo = newrelic.AlertChannel("foo",
411
+ name="webhook-example",
419
412
  type="webhook",
420
- config=newrelic.AlertChannelConfigArgs(
421
- base_url="http://www.test.com",
422
- payload_type="application/json",
423
- payload={
413
+ config={
414
+ "base_url": "http://www.test.com",
415
+ "payload_type": "application/json",
416
+ "payload": {
424
417
  "condition_name": "$CONDITION_NAME",
425
418
  "policy_name": "$POLICY_NAME",
426
419
  },
427
- headers={
420
+ "headers": {
428
421
  "header1": value1,
429
422
  "header2": value2,
430
423
  },
431
- ))
424
+ })
432
425
  ```
433
- <!--End PulumiCodeChooser -->
434
426
 
435
427
  ### Webhook with complex payload
436
- <!--Start PulumiCodeChooser -->
437
428
  ```python
438
429
  import pulumi
439
430
  import pulumi_newrelic as newrelic
440
431
 
441
432
  foo = newrelic.AlertChannel("foo",
442
- config=newrelic.AlertChannelConfigArgs(
443
- base_url="http://www.test.com",
444
- payload_string=\"\"\"{
445
- "my_custom_values": {
446
- "condition_name": "$CONDITION_NAME",
447
- "policy_name": "$POLICY_NAME"
433
+ name="webhook-example",
434
+ type="webhook",
435
+ config={
436
+ "base_url": "http://www.test.com",
437
+ "payload_type": "application/json",
438
+ "payload_string": \"\"\"{
439
+ \\"my_custom_values\\": {
440
+ \\"condition_name\\": \\"$CONDITION_NAME\\",
441
+ \\"policy_name\\": \\"$POLICY_NAME\\"
448
442
  }
449
443
  }
450
-
451
444
  \"\"\",
452
- payload_type="application/json",
453
- ),
454
- type="webhook")
445
+ })
455
446
  ```
456
- <!--End PulumiCodeChooser -->
457
447
 
458
448
  ## Import
459
449
 
@@ -480,10 +470,10 @@ class AlertChannel(pulumi.CustomResource):
480
470
  def _internal_init(__self__,
481
471
  resource_name: str,
482
472
  opts: Optional[pulumi.ResourceOptions] = None,
483
- account_id: Optional[pulumi.Input[int]] = None,
484
- config: Optional[pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']]] = None,
485
- name: Optional[pulumi.Input[str]] = None,
486
- type: Optional[pulumi.Input[str]] = None,
473
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
474
+ config: Optional[pulumi.Input[Union['AlertChannelConfigArgs', 'AlertChannelConfigArgsDict']]] = None,
475
+ name: Optional[pulumi.Input[_builtins.str]] = None,
476
+ type: Optional[pulumi.Input[_builtins.str]] = None,
487
477
  __props__=None):
488
478
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
489
479
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -509,10 +499,10 @@ class AlertChannel(pulumi.CustomResource):
509
499
  def get(resource_name: str,
510
500
  id: pulumi.Input[str],
511
501
  opts: Optional[pulumi.ResourceOptions] = None,
512
- account_id: Optional[pulumi.Input[int]] = None,
513
- config: Optional[pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']]] = None,
514
- name: Optional[pulumi.Input[str]] = None,
515
- type: Optional[pulumi.Input[str]] = None) -> 'AlertChannel':
502
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
503
+ config: Optional[pulumi.Input[Union['AlertChannelConfigArgs', 'AlertChannelConfigArgsDict']]] = None,
504
+ name: Optional[pulumi.Input[_builtins.str]] = None,
505
+ type: Optional[pulumi.Input[_builtins.str]] = None) -> 'AlertChannel':
516
506
  """
517
507
  Get an existing AlertChannel resource's state with the given name, id, and optional extra
518
508
  properties used to qualify the lookup.
@@ -520,10 +510,10 @@ class AlertChannel(pulumi.CustomResource):
520
510
  :param str resource_name: The unique name of the resulting resource.
521
511
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
522
512
  :param pulumi.ResourceOptions opts: Options for the resource.
523
- :param pulumi.Input[int] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
524
- :param pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
525
- :param pulumi.Input[str] name: The name of the channel.
526
- :param pulumi.Input[str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
513
+ :param pulumi.Input[_builtins.str] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
514
+ :param pulumi.Input[Union['AlertChannelConfigArgs', 'AlertChannelConfigArgsDict']] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
515
+ :param pulumi.Input[_builtins.str] name: The name of the channel.
516
+ :param pulumi.Input[_builtins.str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
527
517
  """
528
518
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
529
519
 
@@ -535,15 +525,15 @@ class AlertChannel(pulumi.CustomResource):
535
525
  __props__.__dict__["type"] = type
536
526
  return AlertChannel(resource_name, opts=opts, __props__=__props__)
537
527
 
538
- @property
528
+ @_builtins.property
539
529
  @pulumi.getter(name="accountId")
540
- def account_id(self) -> pulumi.Output[int]:
530
+ def account_id(self) -> pulumi.Output[_builtins.str]:
541
531
  """
542
532
  Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
543
533
  """
544
534
  return pulumi.get(self, "account_id")
545
535
 
546
- @property
536
+ @_builtins.property
547
537
  @pulumi.getter
548
538
  def config(self) -> pulumi.Output[Optional['outputs.AlertChannelConfig']]:
549
539
  """
@@ -551,17 +541,17 @@ class AlertChannel(pulumi.CustomResource):
551
541
  """
552
542
  return pulumi.get(self, "config")
553
543
 
554
- @property
544
+ @_builtins.property
555
545
  @pulumi.getter
556
- def name(self) -> pulumi.Output[str]:
546
+ def name(self) -> pulumi.Output[_builtins.str]:
557
547
  """
558
548
  The name of the channel.
559
549
  """
560
550
  return pulumi.get(self, "name")
561
551
 
562
- @property
552
+ @_builtins.property
563
553
  @pulumi.getter
564
- def type(self) -> pulumi.Output[str]:
554
+ def type(self) -> pulumi.Output[_builtins.str]:
565
555
  """
566
556
  The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
567
557
  """