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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. pulumi_newrelic/_inputs.py +110 -270
  2. pulumi_newrelic/account_management.py +20 -20
  3. pulumi_newrelic/alert_channel.py +76 -92
  4. pulumi_newrelic/alert_condition.py +104 -149
  5. pulumi_newrelic/alert_muting_rule.py +33 -35
  6. pulumi_newrelic/alert_policy.py +68 -43
  7. pulumi_newrelic/alert_policy_channel.py +12 -8
  8. pulumi_newrelic/cloud/_inputs.py +322 -1072
  9. pulumi_newrelic/cloud/aws_govcloud_link_account.py +4 -6
  10. pulumi_newrelic/cloud/aws_integrations.py +13 -15
  11. pulumi_newrelic/cloud/aws_link_account.py +4 -6
  12. pulumi_newrelic/cloud/azure_integrations.py +10 -12
  13. pulumi_newrelic/cloud/azure_link_account.py +4 -6
  14. pulumi_newrelic/cloud/gcp_integrations.py +6 -6
  15. pulumi_newrelic/cloud/gcp_link_account.py +4 -6
  16. pulumi_newrelic/cloud/outputs.py +322 -1072
  17. pulumi_newrelic/data_partition_rule.py +0 -4
  18. pulumi_newrelic/entity_tags.py +13 -17
  19. pulumi_newrelic/events_to_metrics_rule.py +2 -4
  20. pulumi_newrelic/get_account.py +0 -4
  21. pulumi_newrelic/get_application.py +8 -10
  22. pulumi_newrelic/get_authentication_domain.py +4 -8
  23. pulumi_newrelic/get_cloud_account.py +0 -4
  24. pulumi_newrelic/get_entity.py +28 -32
  25. pulumi_newrelic/get_group.py +42 -8
  26. pulumi_newrelic/get_key_transaction.py +8 -10
  27. pulumi_newrelic/get_obfuscation_expression.py +2 -4
  28. pulumi_newrelic/get_service_level_alert_helper.py +22 -46
  29. pulumi_newrelic/get_test_grok_pattern.py +4 -6
  30. pulumi_newrelic/get_user.py +0 -4
  31. pulumi_newrelic/group.py +40 -42
  32. pulumi_newrelic/infra_alert_condition.py +154 -131
  33. pulumi_newrelic/insights/event.py +8 -25
  34. pulumi_newrelic/log_parsing_rule.py +6 -10
  35. pulumi_newrelic/monitor_downtime.py +174 -193
  36. pulumi_newrelic/notification_channel.py +124 -150
  37. pulumi_newrelic/nrql_alert_condition.py +38 -48
  38. pulumi_newrelic/nrql_drop_rule.py +34 -38
  39. pulumi_newrelic/obfuscation_expression.py +2 -4
  40. pulumi_newrelic/obfuscation_rule.py +4 -4
  41. pulumi_newrelic/one_dashboard.py +42 -48
  42. pulumi_newrelic/one_dashboard_raw.py +86 -86
  43. pulumi_newrelic/outputs.py +110 -270
  44. pulumi_newrelic/plugins/_inputs.py +16 -16
  45. pulumi_newrelic/plugins/application_settings.py +6 -8
  46. pulumi_newrelic/plugins/outputs.py +16 -16
  47. pulumi_newrelic/plugins/workload.py +158 -40
  48. pulumi_newrelic/service_level.py +38 -123
  49. pulumi_newrelic/synthetics/alert_condition.py +34 -64
  50. pulumi_newrelic/synthetics/broken_links_monitor.py +18 -20
  51. pulumi_newrelic/synthetics/cert_check_monitor.py +16 -18
  52. pulumi_newrelic/synthetics/get_private_location.py +0 -8
  53. pulumi_newrelic/synthetics/get_secure_credential.py +0 -12
  54. pulumi_newrelic/synthetics/monitor.py +48 -52
  55. pulumi_newrelic/synthetics/multi_location_alert_condition.py +69 -83
  56. pulumi_newrelic/synthetics/private_location.py +6 -6
  57. pulumi_newrelic/synthetics/script_monitor.py +38 -42
  58. pulumi_newrelic/synthetics/secure_credential.py +25 -22
  59. pulumi_newrelic/synthetics/step_monitor.py +18 -20
  60. pulumi_newrelic/user.py +8 -10
  61. pulumi_newrelic/workflow.py +20 -24
  62. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/METADATA +1 -1
  63. pulumi_newrelic-5.23.0a1713975814.dist-info/RECORD +89 -0
  64. pulumi_newrelic-5.23.0a1713333809.dist-info/RECORD +0 -89
  65. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/WHEEL +0 -0
  66. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/top_level.txt +0 -0
@@ -18,8 +18,8 @@ class AccountManagementArgs:
18
18
  name: Optional[pulumi.Input[str]] = None):
19
19
  """
20
20
  The set of arguments for constructing a AccountManagement resource.
21
- :param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
22
- :param pulumi.Input[str] name: The name of the Account.
21
+ :param pulumi.Input[str] region: A description of what this parsing rule represents.
22
+ :param pulumi.Input[str] name: Name of the account to be created
23
23
  """
24
24
  pulumi.set(__self__, "region", region)
25
25
  if name is not None:
@@ -29,7 +29,7 @@ class AccountManagementArgs:
29
29
  @pulumi.getter
30
30
  def region(self) -> pulumi.Input[str]:
31
31
  """
32
- The region code of the account. One of: `us01`, `eu01`.
32
+ A description of what this parsing rule represents.
33
33
  """
34
34
  return pulumi.get(self, "region")
35
35
 
@@ -41,7 +41,7 @@ class AccountManagementArgs:
41
41
  @pulumi.getter
42
42
  def name(self) -> Optional[pulumi.Input[str]]:
43
43
  """
44
- The name of the Account.
44
+ Name of the account to be created
45
45
  """
46
46
  return pulumi.get(self, "name")
47
47
 
@@ -57,8 +57,8 @@ class _AccountManagementState:
57
57
  region: Optional[pulumi.Input[str]] = None):
58
58
  """
59
59
  Input properties used for looking up and filtering AccountManagement resources.
60
- :param pulumi.Input[str] name: The name of the Account.
61
- :param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
60
+ :param pulumi.Input[str] name: Name of the account to be created
61
+ :param pulumi.Input[str] region: A description of what this parsing rule represents.
62
62
  """
63
63
  if name is not None:
64
64
  pulumi.set(__self__, "name", name)
@@ -69,7 +69,7 @@ class _AccountManagementState:
69
69
  @pulumi.getter
70
70
  def name(self) -> Optional[pulumi.Input[str]]:
71
71
  """
72
- The name of the Account.
72
+ Name of the account to be created
73
73
  """
74
74
  return pulumi.get(self, "name")
75
75
 
@@ -81,7 +81,7 @@ class _AccountManagementState:
81
81
  @pulumi.getter
82
82
  def region(self) -> Optional[pulumi.Input[str]]:
83
83
  """
84
- The region code of the account. One of: `us01`, `eu01`.
84
+ A description of what this parsing rule represents.
85
85
  """
86
86
  return pulumi.get(self, "region")
87
87
 
@@ -106,14 +106,14 @@ class AccountManagement(pulumi.CustomResource):
106
106
  ## Example Usage
107
107
 
108
108
  ##### Create Account
109
- <!--Start PulumiCodeChooser -->
110
109
  ```python
111
110
  import pulumi
112
111
  import pulumi_newrelic as newrelic
113
112
 
114
- foo = newrelic.AccountManagement("foo", region="us01")
113
+ foo = newrelic.AccountManagement("foo",
114
+ name="Test Account Name",
115
+ region="us01")
115
116
  ```
116
- <!--End PulumiCodeChooser -->
117
117
 
118
118
  ## Import
119
119
 
@@ -127,8 +127,8 @@ class AccountManagement(pulumi.CustomResource):
127
127
 
128
128
  :param str resource_name: The name of the resource.
129
129
  :param pulumi.ResourceOptions opts: Options for the resource.
130
- :param pulumi.Input[str] name: The name of the Account.
131
- :param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
130
+ :param pulumi.Input[str] name: Name of the account to be created
131
+ :param pulumi.Input[str] region: A description of what this parsing rule represents.
132
132
  """
133
133
  ...
134
134
  @overload
@@ -144,14 +144,14 @@ class AccountManagement(pulumi.CustomResource):
144
144
  ## Example Usage
145
145
 
146
146
  ##### Create Account
147
- <!--Start PulumiCodeChooser -->
148
147
  ```python
149
148
  import pulumi
150
149
  import pulumi_newrelic as newrelic
151
150
 
152
- foo = newrelic.AccountManagement("foo", region="us01")
151
+ foo = newrelic.AccountManagement("foo",
152
+ name="Test Account Name",
153
+ region="us01")
153
154
  ```
154
- <!--End PulumiCodeChooser -->
155
155
 
156
156
  ## Import
157
157
 
@@ -212,8 +212,8 @@ class AccountManagement(pulumi.CustomResource):
212
212
  :param str resource_name: The unique name of the resulting resource.
213
213
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
214
214
  :param pulumi.ResourceOptions opts: Options for the resource.
215
- :param pulumi.Input[str] name: The name of the Account.
216
- :param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
215
+ :param pulumi.Input[str] name: Name of the account to be created
216
+ :param pulumi.Input[str] region: A description of what this parsing rule represents.
217
217
  """
218
218
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
219
219
 
@@ -227,7 +227,7 @@ class AccountManagement(pulumi.CustomResource):
227
227
  @pulumi.getter
228
228
  def name(self) -> pulumi.Output[str]:
229
229
  """
230
- The name of the Account.
230
+ Name of the account to be created
231
231
  """
232
232
  return pulumi.get(self, "name")
233
233
 
@@ -235,7 +235,7 @@ class AccountManagement(pulumi.CustomResource):
235
235
  @pulumi.getter
236
236
  def region(self) -> pulumi.Output[str]:
237
237
  """
238
- The region code of the account. One of: `us01`, `eu01`.
238
+ A description of what this parsing rule represents.
239
239
  """
240
240
  return pulumi.get(self, "region")
241
241
 
@@ -22,10 +22,10 @@ class AlertChannelArgs:
22
22
  name: Optional[pulumi.Input[str]] = None):
23
23
  """
24
24
  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.
27
- :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.
25
+ :param pulumi.Input[str] type: (Required) The type of channel. One of: (email, opsgenie, pagerduty, slack, user, victorops, webhook).
26
+ :param pulumi.Input[int] account_id: The New Relic account ID where you want to create alert channels.
27
+ :param pulumi.Input['AlertChannelConfigArgs'] config: The configuration block for the alert channel.
28
+ :param pulumi.Input[str] name: (Required) The name of the channel.
29
29
  """
30
30
  pulumi.set(__self__, "type", type)
31
31
  if account_id is not None:
@@ -39,7 +39,7 @@ class AlertChannelArgs:
39
39
  @pulumi.getter
40
40
  def type(self) -> pulumi.Input[str]:
41
41
  """
42
- The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
42
+ (Required) The type of channel. One of: (email, opsgenie, pagerduty, slack, user, victorops, webhook).
43
43
  """
44
44
  return pulumi.get(self, "type")
45
45
 
@@ -51,7 +51,7 @@ class AlertChannelArgs:
51
51
  @pulumi.getter(name="accountId")
52
52
  def account_id(self) -> Optional[pulumi.Input[int]]:
53
53
  """
54
- Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
54
+ The New Relic account ID where you want to create alert channels.
55
55
  """
56
56
  return pulumi.get(self, "account_id")
57
57
 
@@ -63,7 +63,7 @@ class AlertChannelArgs:
63
63
  @pulumi.getter
64
64
  def config(self) -> Optional[pulumi.Input['AlertChannelConfigArgs']]:
65
65
  """
66
- 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.
66
+ The configuration block for the alert channel.
67
67
  """
68
68
  return pulumi.get(self, "config")
69
69
 
@@ -75,7 +75,7 @@ class AlertChannelArgs:
75
75
  @pulumi.getter
76
76
  def name(self) -> Optional[pulumi.Input[str]]:
77
77
  """
78
- The name of the channel.
78
+ (Required) The name of the channel.
79
79
  """
80
80
  return pulumi.get(self, "name")
81
81
 
@@ -93,10 +93,10 @@ class _AlertChannelState:
93
93
  type: Optional[pulumi.Input[str]] = None):
94
94
  """
95
95
  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.
97
- :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`.
96
+ :param pulumi.Input[int] account_id: The New Relic account ID where you want to create alert channels.
97
+ :param pulumi.Input['AlertChannelConfigArgs'] config: The configuration block for the alert channel.
98
+ :param pulumi.Input[str] name: (Required) The name of the channel.
99
+ :param pulumi.Input[str] type: (Required) The type of channel. One of: (email, opsgenie, pagerduty, slack, user, victorops, webhook).
100
100
  """
101
101
  if account_id is not None:
102
102
  pulumi.set(__self__, "account_id", account_id)
@@ -111,7 +111,7 @@ class _AlertChannelState:
111
111
  @pulumi.getter(name="accountId")
112
112
  def account_id(self) -> Optional[pulumi.Input[int]]:
113
113
  """
114
- Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
114
+ The New Relic account ID where you want to create alert channels.
115
115
  """
116
116
  return pulumi.get(self, "account_id")
117
117
 
@@ -123,7 +123,7 @@ class _AlertChannelState:
123
123
  @pulumi.getter
124
124
  def config(self) -> Optional[pulumi.Input['AlertChannelConfigArgs']]:
125
125
  """
126
- 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.
126
+ The configuration block for the alert channel.
127
127
  """
128
128
  return pulumi.get(self, "config")
129
129
 
@@ -135,7 +135,7 @@ class _AlertChannelState:
135
135
  @pulumi.getter
136
136
  def name(self) -> Optional[pulumi.Input[str]]:
137
137
  """
138
- The name of the channel.
138
+ (Required) The name of the channel.
139
139
  """
140
140
  return pulumi.get(self, "name")
141
141
 
@@ -147,7 +147,7 @@ class _AlertChannelState:
147
147
  @pulumi.getter
148
148
  def type(self) -> Optional[pulumi.Input[str]]:
149
149
  """
150
- The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
150
+ (Required) The type of channel. One of: (email, opsgenie, pagerduty, slack, user, victorops, webhook).
151
151
  """
152
152
  return pulumi.get(self, "type")
153
153
 
@@ -174,92 +174,87 @@ class AlertChannel(pulumi.CustomResource):
174
174
  ## Example Usage
175
175
 
176
176
  ### Email
177
- <!--Start PulumiCodeChooser -->
178
177
  ```python
179
178
  import pulumi
180
179
  import pulumi_newrelic as newrelic
181
180
 
182
181
  foo = newrelic.AlertChannel("foo",
182
+ name="foo",
183
+ type="email",
183
184
  config=newrelic.AlertChannelConfigArgs(
184
- include_json_attachment="true",
185
185
  recipients="foo@example.com",
186
- ),
187
- type="email")
186
+ include_json_attachment="true",
187
+ ))
188
188
  ```
189
- <!--End PulumiCodeChooser -->
190
189
 
191
190
  ## Additional Examples
192
191
 
193
192
  ##### Slack
194
- <!--Start PulumiCodeChooser -->
195
193
  ```python
196
194
  import pulumi
197
195
  import pulumi_newrelic as newrelic
198
196
 
199
197
  foo = newrelic.AlertChannel("foo",
198
+ name="slack-example",
199
+ type="slack",
200
200
  config=newrelic.AlertChannelConfigArgs(
201
- channel="example-alerts-channel",
202
201
  url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
203
- ),
204
- type="slack")
202
+ channel="example-alerts-channel",
203
+ ))
205
204
  ```
206
- <!--End PulumiCodeChooser -->
207
205
 
208
206
  > **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
207
 
210
208
  ### OpsGenie
211
- <!--Start PulumiCodeChooser -->
212
209
  ```python
213
210
  import pulumi
214
211
  import pulumi_newrelic as newrelic
215
212
 
216
213
  foo = newrelic.AlertChannel("foo",
214
+ name="opsgenie-example",
215
+ type="opsgenie",
217
216
  config=newrelic.AlertChannelConfigArgs(
218
217
  api_key="abc123",
219
- recipients="user1@domain.com, user2@domain.com",
220
- tags="tag1, tag2",
221
218
  teams="team1, team2",
222
- ),
223
- type="opsgenie")
219
+ tags="tag1, tag2",
220
+ recipients="user1@domain.com, user2@domain.com",
221
+ ))
224
222
  ```
225
- <!--End PulumiCodeChooser -->
226
223
 
227
224
  ### PagerDuty
228
- <!--Start PulumiCodeChooser -->
229
225
  ```python
230
226
  import pulumi
231
227
  import pulumi_newrelic as newrelic
232
228
 
233
229
  foo = newrelic.AlertChannel("foo",
230
+ name="pagerduty-example",
231
+ type="pagerduty",
234
232
  config=newrelic.AlertChannelConfigArgs(
235
233
  service_key="abc123",
236
- ),
237
- type="pagerduty")
234
+ ))
238
235
  ```
239
- <!--End PulumiCodeChooser -->
240
236
 
241
237
  ### VictorOps
242
- <!--Start PulumiCodeChooser -->
243
238
  ```python
244
239
  import pulumi
245
240
  import pulumi_newrelic as newrelic
246
241
 
247
242
  foo = newrelic.AlertChannel("foo",
243
+ name="victorops-example",
244
+ type="victorops",
248
245
  config=newrelic.AlertChannelConfigArgs(
249
246
  key="abc123",
250
247
  route_key="/example",
251
- ),
252
- type="victorops")
248
+ ))
253
249
  ```
254
- <!--End PulumiCodeChooser -->
255
250
 
256
251
  ### Webhook
257
- <!--Start PulumiCodeChooser -->
258
252
  ```python
259
253
  import pulumi
260
254
  import pulumi_newrelic as newrelic
261
255
 
262
256
  foo = newrelic.AlertChannel("foo",
257
+ name="webhook-example",
263
258
  type="webhook",
264
259
  config=newrelic.AlertChannelConfigArgs(
265
260
  base_url="http://www.test.com",
@@ -274,30 +269,27 @@ class AlertChannel(pulumi.CustomResource):
274
269
  },
275
270
  ))
276
271
  ```
277
- <!--End PulumiCodeChooser -->
278
272
 
279
273
  ### Webhook with complex payload
280
- <!--Start PulumiCodeChooser -->
281
274
  ```python
282
275
  import pulumi
283
276
  import pulumi_newrelic as newrelic
284
277
 
285
278
  foo = newrelic.AlertChannel("foo",
279
+ name="webhook-example",
280
+ type="webhook",
286
281
  config=newrelic.AlertChannelConfigArgs(
287
282
  base_url="http://www.test.com",
283
+ payload_type="application/json",
288
284
  payload_string=\"\"\"{
289
285
  "my_custom_values": {
290
286
  "condition_name": "$CONDITION_NAME",
291
287
  "policy_name": "$POLICY_NAME"
292
288
  }
293
289
  }
294
-
295
290
  \"\"\",
296
- payload_type="application/json",
297
- ),
298
- type="webhook")
291
+ ))
299
292
  ```
300
- <!--End PulumiCodeChooser -->
301
293
 
302
294
  ## Import
303
295
 
@@ -311,10 +303,10 @@ class AlertChannel(pulumi.CustomResource):
311
303
 
312
304
  :param str resource_name: The name of the resource.
313
305
  :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`.
306
+ :param pulumi.Input[int] account_id: The New Relic account ID where you want to create alert channels.
307
+ :param pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']] config: The configuration block for the alert channel.
308
+ :param pulumi.Input[str] name: (Required) The name of the channel.
309
+ :param pulumi.Input[str] type: (Required) The type of channel. One of: (email, opsgenie, pagerduty, slack, user, victorops, webhook).
318
310
  """
319
311
  ...
320
312
  @overload
@@ -330,92 +322,87 @@ class AlertChannel(pulumi.CustomResource):
330
322
  ## Example Usage
331
323
 
332
324
  ### Email
333
- <!--Start PulumiCodeChooser -->
334
325
  ```python
335
326
  import pulumi
336
327
  import pulumi_newrelic as newrelic
337
328
 
338
329
  foo = newrelic.AlertChannel("foo",
330
+ name="foo",
331
+ type="email",
339
332
  config=newrelic.AlertChannelConfigArgs(
340
- include_json_attachment="true",
341
333
  recipients="foo@example.com",
342
- ),
343
- type="email")
334
+ include_json_attachment="true",
335
+ ))
344
336
  ```
345
- <!--End PulumiCodeChooser -->
346
337
 
347
338
  ## Additional Examples
348
339
 
349
340
  ##### Slack
350
- <!--Start PulumiCodeChooser -->
351
341
  ```python
352
342
  import pulumi
353
343
  import pulumi_newrelic as newrelic
354
344
 
355
345
  foo = newrelic.AlertChannel("foo",
346
+ name="slack-example",
347
+ type="slack",
356
348
  config=newrelic.AlertChannelConfigArgs(
357
- channel="example-alerts-channel",
358
349
  url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
359
- ),
360
- type="slack")
350
+ channel="example-alerts-channel",
351
+ ))
361
352
  ```
362
- <!--End PulumiCodeChooser -->
363
353
 
364
354
  > **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
355
 
366
356
  ### OpsGenie
367
- <!--Start PulumiCodeChooser -->
368
357
  ```python
369
358
  import pulumi
370
359
  import pulumi_newrelic as newrelic
371
360
 
372
361
  foo = newrelic.AlertChannel("foo",
362
+ name="opsgenie-example",
363
+ type="opsgenie",
373
364
  config=newrelic.AlertChannelConfigArgs(
374
365
  api_key="abc123",
375
- recipients="user1@domain.com, user2@domain.com",
376
- tags="tag1, tag2",
377
366
  teams="team1, team2",
378
- ),
379
- type="opsgenie")
367
+ tags="tag1, tag2",
368
+ recipients="user1@domain.com, user2@domain.com",
369
+ ))
380
370
  ```
381
- <!--End PulumiCodeChooser -->
382
371
 
383
372
  ### PagerDuty
384
- <!--Start PulumiCodeChooser -->
385
373
  ```python
386
374
  import pulumi
387
375
  import pulumi_newrelic as newrelic
388
376
 
389
377
  foo = newrelic.AlertChannel("foo",
378
+ name="pagerduty-example",
379
+ type="pagerduty",
390
380
  config=newrelic.AlertChannelConfigArgs(
391
381
  service_key="abc123",
392
- ),
393
- type="pagerduty")
382
+ ))
394
383
  ```
395
- <!--End PulumiCodeChooser -->
396
384
 
397
385
  ### VictorOps
398
- <!--Start PulumiCodeChooser -->
399
386
  ```python
400
387
  import pulumi
401
388
  import pulumi_newrelic as newrelic
402
389
 
403
390
  foo = newrelic.AlertChannel("foo",
391
+ name="victorops-example",
392
+ type="victorops",
404
393
  config=newrelic.AlertChannelConfigArgs(
405
394
  key="abc123",
406
395
  route_key="/example",
407
- ),
408
- type="victorops")
396
+ ))
409
397
  ```
410
- <!--End PulumiCodeChooser -->
411
398
 
412
399
  ### Webhook
413
- <!--Start PulumiCodeChooser -->
414
400
  ```python
415
401
  import pulumi
416
402
  import pulumi_newrelic as newrelic
417
403
 
418
404
  foo = newrelic.AlertChannel("foo",
405
+ name="webhook-example",
419
406
  type="webhook",
420
407
  config=newrelic.AlertChannelConfigArgs(
421
408
  base_url="http://www.test.com",
@@ -430,30 +417,27 @@ class AlertChannel(pulumi.CustomResource):
430
417
  },
431
418
  ))
432
419
  ```
433
- <!--End PulumiCodeChooser -->
434
420
 
435
421
  ### Webhook with complex payload
436
- <!--Start PulumiCodeChooser -->
437
422
  ```python
438
423
  import pulumi
439
424
  import pulumi_newrelic as newrelic
440
425
 
441
426
  foo = newrelic.AlertChannel("foo",
427
+ name="webhook-example",
428
+ type="webhook",
442
429
  config=newrelic.AlertChannelConfigArgs(
443
430
  base_url="http://www.test.com",
431
+ payload_type="application/json",
444
432
  payload_string=\"\"\"{
445
433
  "my_custom_values": {
446
434
  "condition_name": "$CONDITION_NAME",
447
435
  "policy_name": "$POLICY_NAME"
448
436
  }
449
437
  }
450
-
451
438
  \"\"\",
452
- payload_type="application/json",
453
- ),
454
- type="webhook")
439
+ ))
455
440
  ```
456
- <!--End PulumiCodeChooser -->
457
441
 
458
442
  ## Import
459
443
 
@@ -520,10 +504,10 @@ class AlertChannel(pulumi.CustomResource):
520
504
  :param str resource_name: The unique name of the resulting resource.
521
505
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
522
506
  :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`.
507
+ :param pulumi.Input[int] account_id: The New Relic account ID where you want to create alert channels.
508
+ :param pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']] config: The configuration block for the alert channel.
509
+ :param pulumi.Input[str] name: (Required) The name of the channel.
510
+ :param pulumi.Input[str] type: (Required) The type of channel. One of: (email, opsgenie, pagerduty, slack, user, victorops, webhook).
527
511
  """
528
512
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
529
513
 
@@ -539,7 +523,7 @@ class AlertChannel(pulumi.CustomResource):
539
523
  @pulumi.getter(name="accountId")
540
524
  def account_id(self) -> pulumi.Output[int]:
541
525
  """
542
- Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
526
+ The New Relic account ID where you want to create alert channels.
543
527
  """
544
528
  return pulumi.get(self, "account_id")
545
529
 
@@ -547,7 +531,7 @@ class AlertChannel(pulumi.CustomResource):
547
531
  @pulumi.getter
548
532
  def config(self) -> pulumi.Output[Optional['outputs.AlertChannelConfig']]:
549
533
  """
550
- 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.
534
+ The configuration block for the alert channel.
551
535
  """
552
536
  return pulumi.get(self, "config")
553
537
 
@@ -555,7 +539,7 @@ class AlertChannel(pulumi.CustomResource):
555
539
  @pulumi.getter
556
540
  def name(self) -> pulumi.Output[str]:
557
541
  """
558
- The name of the channel.
542
+ (Required) The name of the channel.
559
543
  """
560
544
  return pulumi.get(self, "name")
561
545
 
@@ -563,7 +547,7 @@ class AlertChannel(pulumi.CustomResource):
563
547
  @pulumi.getter
564
548
  def type(self) -> pulumi.Output[str]:
565
549
  """
566
- The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
550
+ (Required) The type of channel. One of: (email, opsgenie, pagerduty, slack, user, victorops, webhook).
567
551
  """
568
552
  return pulumi.get(self, "type")
569
553