pulumi-newrelic 5.20.0a1709365820__py3-none-any.whl → 5.21.0a1710157101__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 (67) hide show
  1. pulumi_newrelic/__init__.py +10 -0
  2. pulumi_newrelic/account_management.py +6 -2
  3. pulumi_newrelic/alert_channel.py +34 -2
  4. pulumi_newrelic/alert_condition.py +26 -2
  5. pulumi_newrelic/alert_muting_rule.py +6 -2
  6. pulumi_newrelic/alert_policy.py +48 -4
  7. pulumi_newrelic/alert_policy_channel.py +8 -4
  8. pulumi_newrelic/api_access_key.py +6 -26
  9. pulumi_newrelic/browser_application.py +6 -2
  10. pulumi_newrelic/cloud/aws_govcloud_integrations.py +2 -2
  11. pulumi_newrelic/cloud/aws_govcloud_link_account.py +6 -2
  12. pulumi_newrelic/cloud/aws_integrations.py +6 -2
  13. pulumi_newrelic/cloud/aws_link_account.py +6 -2
  14. pulumi_newrelic/cloud/azure_integrations.py +6 -2
  15. pulumi_newrelic/cloud/azure_link_account.py +6 -2
  16. pulumi_newrelic/cloud/gcp_integrations.py +6 -2
  17. pulumi_newrelic/cloud/gcp_link_account.py +6 -2
  18. pulumi_newrelic/data_partition_rule.py +8 -2
  19. pulumi_newrelic/entity_tags.py +8 -4
  20. pulumi_newrelic/events_to_metrics_rule.py +8 -4
  21. pulumi_newrelic/get_account.py +4 -0
  22. pulumi_newrelic/get_alert_policy.py +3 -3
  23. pulumi_newrelic/get_application.py +4 -0
  24. pulumi_newrelic/get_authentication_domain.py +4 -0
  25. pulumi_newrelic/get_cloud_account.py +4 -0
  26. pulumi_newrelic/get_entity.py +66 -4
  27. pulumi_newrelic/get_group.py +145 -0
  28. pulumi_newrelic/get_key_transaction.py +4 -0
  29. pulumi_newrelic/get_obfuscation_expression.py +4 -0
  30. pulumi_newrelic/get_service_level_alert_helper.py +12 -0
  31. pulumi_newrelic/get_test_grok_pattern.py +4 -0
  32. pulumi_newrelic/get_user.py +10 -6
  33. pulumi_newrelic/group.py +426 -0
  34. pulumi_newrelic/infra_alert_condition.py +33 -9
  35. pulumi_newrelic/insights/event.py +6 -0
  36. pulumi_newrelic/log_parsing_rule.py +12 -2
  37. pulumi_newrelic/monitor_downtime.py +28 -2
  38. pulumi_newrelic/notification_channel.py +72 -0
  39. pulumi_newrelic/notification_destination.py +132 -2
  40. pulumi_newrelic/nrql_alert_condition.py +28 -4
  41. pulumi_newrelic/nrql_drop_rule.py +30 -4
  42. pulumi_newrelic/obfuscation_expression.py +6 -2
  43. pulumi_newrelic/obfuscation_rule.py +6 -2
  44. pulumi_newrelic/one_dashboard.py +2 -2
  45. pulumi_newrelic/one_dashboard_json.py +2 -2
  46. pulumi_newrelic/one_dashboard_raw.py +6 -0
  47. pulumi_newrelic/plugins/application_settings.py +22 -2
  48. pulumi_newrelic/plugins/workload.py +112 -4
  49. pulumi_newrelic/service_level.py +20 -6
  50. pulumi_newrelic/synthetics/alert_condition.py +26 -2
  51. pulumi_newrelic/synthetics/broken_links_monitor.py +12 -2
  52. pulumi_newrelic/synthetics/cert_check_monitor.py +12 -2
  53. pulumi_newrelic/synthetics/get_private_location.py +8 -0
  54. pulumi_newrelic/synthetics/get_secure_credential.py +4 -0
  55. pulumi_newrelic/synthetics/monitor.py +20 -2
  56. pulumi_newrelic/synthetics/multi_location_alert_condition.py +12 -4
  57. pulumi_newrelic/synthetics/private_location.py +6 -2
  58. pulumi_newrelic/synthetics/script_monitor.py +20 -2
  59. pulumi_newrelic/synthetics/secure_credential.py +6 -2
  60. pulumi_newrelic/synthetics/step_monitor.py +8 -2
  61. pulumi_newrelic/user.py +4 -0
  62. pulumi_newrelic/workflow.py +22 -4
  63. {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0a1710157101.dist-info}/METADATA +1 -1
  64. pulumi_newrelic-5.21.0a1710157101.dist-info/RECORD +89 -0
  65. pulumi_newrelic-5.20.0a1709365820.dist-info/RECORD +0 -87
  66. {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0a1710157101.dist-info}/WHEEL +0 -0
  67. {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0a1710157101.dist-info}/top_level.txt +0 -0
@@ -315,6 +315,7 @@ class LogParsingRule(pulumi.CustomResource):
315
315
  ## Example Usage
316
316
 
317
317
  Use this example to create the log parse rule.
318
+ <!--Start PulumiCodeChooser -->
318
319
  ```python
319
320
  import pulumi
320
321
  import pulumi_newrelic as newrelic
@@ -326,10 +327,13 @@ class LogParsingRule(pulumi.CustomResource):
326
327
  lucene="logtype:linux_messages",
327
328
  nrql="SELECT * FROM Log WHERE logtype = 'linux_messages'")
328
329
  ```
330
+ <!--End PulumiCodeChooser -->
331
+
329
332
  ## Additional Example
330
333
 
331
334
  Use this example to validate a grok pattern and create the log parse rule. More
332
335
  information on grok pattern can be found [here](https://docs.newrelic.com/docs/logs/ui-data/parsing/#grok)
336
+ <!--Start PulumiCodeChooser -->
333
337
  ```python
334
338
  import pulumi
335
339
  import pulumi_newrelic as newrelic
@@ -344,12 +348,13 @@ class LogParsingRule(pulumi.CustomResource):
344
348
  nrql="SELECT * FROM Log WHERE logtype = 'linux_messages'",
345
349
  matched=grok.test_groks[0].matched)
346
350
  ```
351
+ <!--End PulumiCodeChooser -->
347
352
 
348
353
  ## Import
349
354
 
350
355
  New Relic log parsing rule can be imported using the rule ID, e.g.
351
356
 
352
- bash
357
+ bash
353
358
 
354
359
  ```sh
355
360
  $ pulumi import newrelic:index/logParsingRule:LogParsingRule foo 3456789
@@ -378,6 +383,7 @@ class LogParsingRule(pulumi.CustomResource):
378
383
  ## Example Usage
379
384
 
380
385
  Use this example to create the log parse rule.
386
+ <!--Start PulumiCodeChooser -->
381
387
  ```python
382
388
  import pulumi
383
389
  import pulumi_newrelic as newrelic
@@ -389,10 +395,13 @@ class LogParsingRule(pulumi.CustomResource):
389
395
  lucene="logtype:linux_messages",
390
396
  nrql="SELECT * FROM Log WHERE logtype = 'linux_messages'")
391
397
  ```
398
+ <!--End PulumiCodeChooser -->
399
+
392
400
  ## Additional Example
393
401
 
394
402
  Use this example to validate a grok pattern and create the log parse rule. More
395
403
  information on grok pattern can be found [here](https://docs.newrelic.com/docs/logs/ui-data/parsing/#grok)
404
+ <!--Start PulumiCodeChooser -->
396
405
  ```python
397
406
  import pulumi
398
407
  import pulumi_newrelic as newrelic
@@ -407,12 +416,13 @@ class LogParsingRule(pulumi.CustomResource):
407
416
  nrql="SELECT * FROM Log WHERE logtype = 'linux_messages'",
408
417
  matched=grok.test_groks[0].matched)
409
418
  ```
419
+ <!--End PulumiCodeChooser -->
410
420
 
411
421
  ## Import
412
422
 
413
423
  New Relic log parsing rule can be imported using the rule ID, e.g.
414
424
 
415
- bash
425
+ bash
416
426
 
417
427
  ```sh
418
428
  $ pulumi import newrelic:index/logParsingRule:LogParsingRule foo 3456789
@@ -374,6 +374,7 @@ class MonitorDowntime(pulumi.CustomResource):
374
374
 
375
375
  ## Example Usage
376
376
 
377
+ <!--Start PulumiCodeChooser -->
377
378
  ```python
378
379
  import pulumi
379
380
  import pulumi_newrelic as newrelic
@@ -395,13 +396,16 @@ class MonitorDowntime(pulumi.CustomResource):
395
396
  start_time="2023-11-30T10:30:00",
396
397
  time_zone="Asia/Kolkata")
397
398
  ```
399
+ <!--End PulumiCodeChooser -->
398
400
  Monitor Downtimes are of four types; **one-time**, **daily**, **weekly** and **monthly**. For more details on each type and the right arguments that go with them, check out the argument reference and examples sections below.
401
+
399
402
  ## Examples
400
403
 
401
404
  ### One-Time Monitor Downtime
402
405
 
403
406
  The below example illustrates creating a **one-time** monitor downtime.
404
407
 
408
+ <!--Start PulumiCodeChooser -->
405
409
  ```python
406
410
  import pulumi
407
411
  import pulumi_newrelic as newrelic
@@ -416,6 +420,7 @@ class MonitorDowntime(pulumi.CustomResource):
416
420
  start_time="2023-12-04T10:15:00",
417
421
  time_zone="America/Los_Angeles")
418
422
  ```
423
+ <!--End PulumiCodeChooser -->
419
424
 
420
425
  ### Daily Monitor Downtime
421
426
 
@@ -423,6 +428,7 @@ class MonitorDowntime(pulumi.CustomResource):
423
428
 
424
429
  Note that `end_repeat` has been specified in the configuration; however, this is optional, in accordance with the rules of `end_repeat` specified in the argument reference section above. This example uses the `on_date` nested argument of `end_repeat`, however, the other nested argument, `on_repeat` may also be used _instead_, as you may see in some of the other examples below; though both `on_date` and `on_repeat` cannot be specified together, as they are mutually exclusive.
425
430
 
431
+ <!--Start PulumiCodeChooser -->
426
432
  ```python
427
433
  import pulumi
428
434
  import pulumi_newrelic as newrelic
@@ -440,6 +446,7 @@ class MonitorDowntime(pulumi.CustomResource):
440
446
  start_time="2023-12-04T18:15:00",
441
447
  time_zone="Asia/Kolkata")
442
448
  ```
449
+ <!--End PulumiCodeChooser -->
443
450
 
444
451
  ### Weekly Monitor Downtime
445
452
 
@@ -447,6 +454,7 @@ class MonitorDowntime(pulumi.CustomResource):
447
454
 
448
455
  Note that `maintenance_days` has been specified in the configuration as it is required with weekly monitor downtimes; and `end_repeat` has not been specified as it is optional, all in accordance with the rules of these arguments specified in the argument reference section above.
449
456
 
457
+ <!--Start PulumiCodeChooser -->
450
458
  ```python
451
459
  import pulumi
452
460
  import pulumi_newrelic as newrelic
@@ -465,6 +473,7 @@ class MonitorDowntime(pulumi.CustomResource):
465
473
  start_time="2023-12-04T14:15:00",
466
474
  time_zone="US/Hawaii")
467
475
  ```
476
+ <!--End PulumiCodeChooser -->
468
477
 
469
478
  ### Monthly Monitor Downtime
470
479
 
@@ -472,6 +481,7 @@ class MonitorDowntime(pulumi.CustomResource):
472
481
 
473
482
  Note that `frequency` has been specified in the configuration as it is required with monthly monitor downtimes, and `end_repeat` has been specified too, though it is optional. `frequency` has been specified with `days_of_week` comprising both of its nested arguments, `ordinal_day_of_month` and `week_day`; all in accordance with the rules of these arguments specified in the argument reference section above.
474
483
 
484
+ <!--Start PulumiCodeChooser -->
475
485
  ```python
476
486
  import pulumi
477
487
  import pulumi_newrelic as newrelic
@@ -495,7 +505,9 @@ class MonitorDowntime(pulumi.CustomResource):
495
505
  start_time="2023-12-04T07:15:00",
496
506
  time_zone="Europe/Dublin")
497
507
  ```
508
+ <!--End PulumiCodeChooser -->
498
509
  However, the `frequency` block in monthly monitor downtimes may also be specified with its other nested argument, `days_of_month`, as shown in the example below - though both `days_of_month` and `days_of_week` cannot be specified together, as they are mutually exclusive.
510
+ <!--Start PulumiCodeChooser -->
499
511
  ```python
500
512
  import pulumi
501
513
  import pulumi_newrelic as newrelic
@@ -521,12 +533,13 @@ class MonitorDowntime(pulumi.CustomResource):
521
533
  start_time="2023-12-04T07:15:00",
522
534
  time_zone="Europe/Dublin")
523
535
  ```
536
+ <!--End PulumiCodeChooser -->
524
537
 
525
538
  ## Import
526
539
 
527
540
  A monitor downtime can be imported into Terraform configuration using its `guid`, i.e.
528
541
 
529
- bash
542
+ bash
530
543
 
531
544
  ```sh
532
545
  $ pulumi import newrelic:index/monitorDowntime:MonitorDowntime monitor <guid>
@@ -558,6 +571,7 @@ class MonitorDowntime(pulumi.CustomResource):
558
571
 
559
572
  ## Example Usage
560
573
 
574
+ <!--Start PulumiCodeChooser -->
561
575
  ```python
562
576
  import pulumi
563
577
  import pulumi_newrelic as newrelic
@@ -579,13 +593,16 @@ class MonitorDowntime(pulumi.CustomResource):
579
593
  start_time="2023-11-30T10:30:00",
580
594
  time_zone="Asia/Kolkata")
581
595
  ```
596
+ <!--End PulumiCodeChooser -->
582
597
  Monitor Downtimes are of four types; **one-time**, **daily**, **weekly** and **monthly**. For more details on each type and the right arguments that go with them, check out the argument reference and examples sections below.
598
+
583
599
  ## Examples
584
600
 
585
601
  ### One-Time Monitor Downtime
586
602
 
587
603
  The below example illustrates creating a **one-time** monitor downtime.
588
604
 
605
+ <!--Start PulumiCodeChooser -->
589
606
  ```python
590
607
  import pulumi
591
608
  import pulumi_newrelic as newrelic
@@ -600,6 +617,7 @@ class MonitorDowntime(pulumi.CustomResource):
600
617
  start_time="2023-12-04T10:15:00",
601
618
  time_zone="America/Los_Angeles")
602
619
  ```
620
+ <!--End PulumiCodeChooser -->
603
621
 
604
622
  ### Daily Monitor Downtime
605
623
 
@@ -607,6 +625,7 @@ class MonitorDowntime(pulumi.CustomResource):
607
625
 
608
626
  Note that `end_repeat` has been specified in the configuration; however, this is optional, in accordance with the rules of `end_repeat` specified in the argument reference section above. This example uses the `on_date` nested argument of `end_repeat`, however, the other nested argument, `on_repeat` may also be used _instead_, as you may see in some of the other examples below; though both `on_date` and `on_repeat` cannot be specified together, as they are mutually exclusive.
609
627
 
628
+ <!--Start PulumiCodeChooser -->
610
629
  ```python
611
630
  import pulumi
612
631
  import pulumi_newrelic as newrelic
@@ -624,6 +643,7 @@ class MonitorDowntime(pulumi.CustomResource):
624
643
  start_time="2023-12-04T18:15:00",
625
644
  time_zone="Asia/Kolkata")
626
645
  ```
646
+ <!--End PulumiCodeChooser -->
627
647
 
628
648
  ### Weekly Monitor Downtime
629
649
 
@@ -631,6 +651,7 @@ class MonitorDowntime(pulumi.CustomResource):
631
651
 
632
652
  Note that `maintenance_days` has been specified in the configuration as it is required with weekly monitor downtimes; and `end_repeat` has not been specified as it is optional, all in accordance with the rules of these arguments specified in the argument reference section above.
633
653
 
654
+ <!--Start PulumiCodeChooser -->
634
655
  ```python
635
656
  import pulumi
636
657
  import pulumi_newrelic as newrelic
@@ -649,6 +670,7 @@ class MonitorDowntime(pulumi.CustomResource):
649
670
  start_time="2023-12-04T14:15:00",
650
671
  time_zone="US/Hawaii")
651
672
  ```
673
+ <!--End PulumiCodeChooser -->
652
674
 
653
675
  ### Monthly Monitor Downtime
654
676
 
@@ -656,6 +678,7 @@ class MonitorDowntime(pulumi.CustomResource):
656
678
 
657
679
  Note that `frequency` has been specified in the configuration as it is required with monthly monitor downtimes, and `end_repeat` has been specified too, though it is optional. `frequency` has been specified with `days_of_week` comprising both of its nested arguments, `ordinal_day_of_month` and `week_day`; all in accordance with the rules of these arguments specified in the argument reference section above.
658
680
 
681
+ <!--Start PulumiCodeChooser -->
659
682
  ```python
660
683
  import pulumi
661
684
  import pulumi_newrelic as newrelic
@@ -679,7 +702,9 @@ class MonitorDowntime(pulumi.CustomResource):
679
702
  start_time="2023-12-04T07:15:00",
680
703
  time_zone="Europe/Dublin")
681
704
  ```
705
+ <!--End PulumiCodeChooser -->
682
706
  However, the `frequency` block in monthly monitor downtimes may also be specified with its other nested argument, `days_of_month`, as shown in the example below - though both `days_of_month` and `days_of_week` cannot be specified together, as they are mutually exclusive.
707
+ <!--Start PulumiCodeChooser -->
683
708
  ```python
684
709
  import pulumi
685
710
  import pulumi_newrelic as newrelic
@@ -705,12 +730,13 @@ class MonitorDowntime(pulumi.CustomResource):
705
730
  start_time="2023-12-04T07:15:00",
706
731
  time_zone="Europe/Dublin")
707
732
  ```
733
+ <!--End PulumiCodeChooser -->
708
734
 
709
735
  ## Import
710
736
 
711
737
  A monitor downtime can be imported into Terraform configuration using its `guid`, i.e.
712
738
 
713
- bash
739
+ bash
714
740
 
715
741
  ```sh
716
742
  $ pulumi import newrelic:index/monitorDowntime:MonitorDowntime monitor <guid>
@@ -286,6 +286,7 @@ class NotificationChannel(pulumi.CustomResource):
286
286
  ## Example Usage
287
287
 
288
288
  ##### [Webhook](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#webhook)
289
+ <!--Start PulumiCodeChooser -->
289
290
  ```python
290
291
  import pulumi
291
292
  import pulumi_newrelic as newrelic
@@ -301,7 +302,9 @@ class NotificationChannel(pulumi.CustomResource):
301
302
  )],
302
303
  type="WEBHOOK")
303
304
  ```
305
+ <!--End PulumiCodeChooser -->
304
306
  See additional examples.
307
+
305
308
  ## Additional Examples
306
309
 
307
310
  > **NOTE:** We support all properties. The mentioned properties are just an example.
@@ -309,6 +312,7 @@ class NotificationChannel(pulumi.CustomResource):
309
312
  ##### [ServiceNow](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenow)
310
313
  To see the properties’ keys for your account, check ServiceNow incidents table.
311
314
 
315
+ <!--Start PulumiCodeChooser -->
312
316
  ```python
313
317
  import pulumi
314
318
  import pulumi_newrelic as newrelic
@@ -329,8 +333,10 @@ class NotificationChannel(pulumi.CustomResource):
329
333
  ],
330
334
  type="SERVICENOW_INCIDENTS")
331
335
  ```
336
+ <!--End PulumiCodeChooser -->
332
337
 
333
338
  ##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
339
+ <!--Start PulumiCodeChooser -->
334
340
  ```python
335
341
  import pulumi
336
342
  import pulumi_newrelic as newrelic
@@ -351,8 +357,10 @@ class NotificationChannel(pulumi.CustomResource):
351
357
  ],
352
358
  type="EMAIL")
353
359
  ```
360
+ <!--End PulumiCodeChooser -->
354
361
 
355
362
  ##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
363
+ <!--Start PulumiCodeChooser -->
356
364
  ```python
357
365
  import pulumi
358
366
  import pulumi_newrelic as newrelic
@@ -381,8 +389,10 @@ class NotificationChannel(pulumi.CustomResource):
381
389
  ],
382
390
  type="JIRA_CLASSIC")
383
391
  ```
392
+ <!--End PulumiCodeChooser -->
384
393
 
385
394
  ##### [PagerDuty with account integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
395
+ <!--Start PulumiCodeChooser -->
386
396
  ```python
387
397
  import pulumi
388
398
  import pulumi_newrelic as newrelic
@@ -398,6 +408,7 @@ class NotificationChannel(pulumi.CustomResource):
398
408
  ),
399
409
  newrelic.NotificationChannelPropertyArgs(
400
410
  key="service",
411
+ label="Service Name",
401
412
  value="PTQK3FM",
402
413
  ),
403
414
  newrelic.NotificationChannelPropertyArgs(
@@ -425,8 +436,10 @@ class NotificationChannel(pulumi.CustomResource):
425
436
  ],
426
437
  type="PAGERDUTY_ACCOUNT_INTEGRATION")
427
438
  ```
439
+ <!--End PulumiCodeChooser -->
428
440
 
429
441
  ##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
442
+ <!--Start PulumiCodeChooser -->
430
443
  ```python
431
444
  import pulumi
432
445
  import pulumi_newrelic as newrelic
@@ -461,8 +474,10 @@ class NotificationChannel(pulumi.CustomResource):
461
474
  ],
462
475
  type="PAGERDUTY_SERVICE_INTEGRATION")
463
476
  ```
477
+ <!--End PulumiCodeChooser -->
464
478
 
465
479
  #### Mobile Push
480
+ <!--Start PulumiCodeChooser -->
466
481
  ```python
467
482
  import pulumi
468
483
  import pulumi_newrelic as newrelic
@@ -473,8 +488,10 @@ class NotificationChannel(pulumi.CustomResource):
473
488
  product="IINT",
474
489
  type="MOBILE_PUSH")
475
490
  ```
491
+ <!--End PulumiCodeChooser -->
476
492
 
477
493
  #### [AWS Event Bridge](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#eventBridge)
494
+ <!--Start PulumiCodeChooser -->
478
495
  ```python
479
496
  import pulumi
480
497
  import pulumi_newrelic as newrelic
@@ -495,8 +512,10 @@ class NotificationChannel(pulumi.CustomResource):
495
512
  ],
496
513
  type="EVENT_BRIDGE")
497
514
  ```
515
+ <!--End PulumiCodeChooser -->
498
516
 
499
517
  #### [SLACK](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#slack)
518
+ <!--Start PulumiCodeChooser -->
500
519
  ```python
501
520
  import pulumi
502
521
  import pulumi_newrelic as newrelic
@@ -517,6 +536,7 @@ class NotificationChannel(pulumi.CustomResource):
517
536
  ],
518
537
  type="SLACK")
519
538
  ```
539
+ <!--End PulumiCodeChooser -->
520
540
 
521
541
  > **NOTE:** Sensitive data such as channel API keys, service keys, etc are not returned from the underlying API for security reasons and may not be set in state when importing.
522
542
 
@@ -525,6 +545,7 @@ class NotificationChannel(pulumi.CustomResource):
525
545
  Create a destination resource and reference that destination to the channel resource:
526
546
 
527
547
  ### Create a destination
548
+ <!--Start PulumiCodeChooser -->
528
549
  ```python
529
550
  import pulumi
530
551
  import pulumi_newrelic as newrelic
@@ -541,8 +562,10 @@ class NotificationChannel(pulumi.CustomResource):
541
562
  )],
542
563
  type="WEBHOOK")
543
564
  ```
565
+ <!--End PulumiCodeChooser -->
544
566
 
545
567
  ### Create a channel
568
+ <!--Start PulumiCodeChooser -->
546
569
  ```python
547
570
  import pulumi
548
571
  import pulumi_newrelic as newrelic
@@ -558,6 +581,7 @@ class NotificationChannel(pulumi.CustomResource):
558
581
  label="Payload Template",
559
582
  )])
560
583
  ```
584
+ <!--End PulumiCodeChooser -->
561
585
 
562
586
  ## Additional Information
563
587
 
@@ -565,6 +589,18 @@ class NotificationChannel(pulumi.CustomResource):
565
589
 
566
590
  > **NOTE:** `AlertChannel` are legacy resources.
567
591
 
592
+ ## Import
593
+
594
+ Channels can only be used by a single workflow, therefore importing them is not particularly useful, because in the UI channels are created upon workflow creation.
595
+
596
+ Additionally, the channel id isn't available via the UI, and you'd need to look it up with the `channels` query in the NerdGraph API.
597
+
598
+ That being said, importing is possible using -
599
+
600
+ ```sh
601
+ $ pulumi import newrelic:index/notificationChannel:NotificationChannel foo <destination_id>
602
+ ```
603
+
568
604
  :param str resource_name: The name of the resource.
569
605
  :param pulumi.ResourceOptions opts: Options for the resource.
570
606
  :param pulumi.Input[int] account_id: Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
@@ -589,6 +625,7 @@ class NotificationChannel(pulumi.CustomResource):
589
625
  ## Example Usage
590
626
 
591
627
  ##### [Webhook](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#webhook)
628
+ <!--Start PulumiCodeChooser -->
592
629
  ```python
593
630
  import pulumi
594
631
  import pulumi_newrelic as newrelic
@@ -604,7 +641,9 @@ class NotificationChannel(pulumi.CustomResource):
604
641
  )],
605
642
  type="WEBHOOK")
606
643
  ```
644
+ <!--End PulumiCodeChooser -->
607
645
  See additional examples.
646
+
608
647
  ## Additional Examples
609
648
 
610
649
  > **NOTE:** We support all properties. The mentioned properties are just an example.
@@ -612,6 +651,7 @@ class NotificationChannel(pulumi.CustomResource):
612
651
  ##### [ServiceNow](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenow)
613
652
  To see the properties’ keys for your account, check ServiceNow incidents table.
614
653
 
654
+ <!--Start PulumiCodeChooser -->
615
655
  ```python
616
656
  import pulumi
617
657
  import pulumi_newrelic as newrelic
@@ -632,8 +672,10 @@ class NotificationChannel(pulumi.CustomResource):
632
672
  ],
633
673
  type="SERVICENOW_INCIDENTS")
634
674
  ```
675
+ <!--End PulumiCodeChooser -->
635
676
 
636
677
  ##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
678
+ <!--Start PulumiCodeChooser -->
637
679
  ```python
638
680
  import pulumi
639
681
  import pulumi_newrelic as newrelic
@@ -654,8 +696,10 @@ class NotificationChannel(pulumi.CustomResource):
654
696
  ],
655
697
  type="EMAIL")
656
698
  ```
699
+ <!--End PulumiCodeChooser -->
657
700
 
658
701
  ##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
702
+ <!--Start PulumiCodeChooser -->
659
703
  ```python
660
704
  import pulumi
661
705
  import pulumi_newrelic as newrelic
@@ -684,8 +728,10 @@ class NotificationChannel(pulumi.CustomResource):
684
728
  ],
685
729
  type="JIRA_CLASSIC")
686
730
  ```
731
+ <!--End PulumiCodeChooser -->
687
732
 
688
733
  ##### [PagerDuty with account integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
734
+ <!--Start PulumiCodeChooser -->
689
735
  ```python
690
736
  import pulumi
691
737
  import pulumi_newrelic as newrelic
@@ -701,6 +747,7 @@ class NotificationChannel(pulumi.CustomResource):
701
747
  ),
702
748
  newrelic.NotificationChannelPropertyArgs(
703
749
  key="service",
750
+ label="Service Name",
704
751
  value="PTQK3FM",
705
752
  ),
706
753
  newrelic.NotificationChannelPropertyArgs(
@@ -728,8 +775,10 @@ class NotificationChannel(pulumi.CustomResource):
728
775
  ],
729
776
  type="PAGERDUTY_ACCOUNT_INTEGRATION")
730
777
  ```
778
+ <!--End PulumiCodeChooser -->
731
779
 
732
780
  ##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
781
+ <!--Start PulumiCodeChooser -->
733
782
  ```python
734
783
  import pulumi
735
784
  import pulumi_newrelic as newrelic
@@ -764,8 +813,10 @@ class NotificationChannel(pulumi.CustomResource):
764
813
  ],
765
814
  type="PAGERDUTY_SERVICE_INTEGRATION")
766
815
  ```
816
+ <!--End PulumiCodeChooser -->
767
817
 
768
818
  #### Mobile Push
819
+ <!--Start PulumiCodeChooser -->
769
820
  ```python
770
821
  import pulumi
771
822
  import pulumi_newrelic as newrelic
@@ -776,8 +827,10 @@ class NotificationChannel(pulumi.CustomResource):
776
827
  product="IINT",
777
828
  type="MOBILE_PUSH")
778
829
  ```
830
+ <!--End PulumiCodeChooser -->
779
831
 
780
832
  #### [AWS Event Bridge](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#eventBridge)
833
+ <!--Start PulumiCodeChooser -->
781
834
  ```python
782
835
  import pulumi
783
836
  import pulumi_newrelic as newrelic
@@ -798,8 +851,10 @@ class NotificationChannel(pulumi.CustomResource):
798
851
  ],
799
852
  type="EVENT_BRIDGE")
800
853
  ```
854
+ <!--End PulumiCodeChooser -->
801
855
 
802
856
  #### [SLACK](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#slack)
857
+ <!--Start PulumiCodeChooser -->
803
858
  ```python
804
859
  import pulumi
805
860
  import pulumi_newrelic as newrelic
@@ -820,6 +875,7 @@ class NotificationChannel(pulumi.CustomResource):
820
875
  ],
821
876
  type="SLACK")
822
877
  ```
878
+ <!--End PulumiCodeChooser -->
823
879
 
824
880
  > **NOTE:** Sensitive data such as channel API keys, service keys, etc are not returned from the underlying API for security reasons and may not be set in state when importing.
825
881
 
@@ -828,6 +884,7 @@ class NotificationChannel(pulumi.CustomResource):
828
884
  Create a destination resource and reference that destination to the channel resource:
829
885
 
830
886
  ### Create a destination
887
+ <!--Start PulumiCodeChooser -->
831
888
  ```python
832
889
  import pulumi
833
890
  import pulumi_newrelic as newrelic
@@ -844,8 +901,10 @@ class NotificationChannel(pulumi.CustomResource):
844
901
  )],
845
902
  type="WEBHOOK")
846
903
  ```
904
+ <!--End PulumiCodeChooser -->
847
905
 
848
906
  ### Create a channel
907
+ <!--Start PulumiCodeChooser -->
849
908
  ```python
850
909
  import pulumi
851
910
  import pulumi_newrelic as newrelic
@@ -861,6 +920,7 @@ class NotificationChannel(pulumi.CustomResource):
861
920
  label="Payload Template",
862
921
  )])
863
922
  ```
923
+ <!--End PulumiCodeChooser -->
864
924
 
865
925
  ## Additional Information
866
926
 
@@ -868,6 +928,18 @@ class NotificationChannel(pulumi.CustomResource):
868
928
 
869
929
  > **NOTE:** `AlertChannel` are legacy resources.
870
930
 
931
+ ## Import
932
+
933
+ Channels can only be used by a single workflow, therefore importing them is not particularly useful, because in the UI channels are created upon workflow creation.
934
+
935
+ Additionally, the channel id isn't available via the UI, and you'd need to look it up with the `channels` query in the NerdGraph API.
936
+
937
+ That being said, importing is possible using -
938
+
939
+ ```sh
940
+ $ pulumi import newrelic:index/notificationChannel:NotificationChannel foo <destination_id>
941
+ ```
942
+
871
943
  :param str resource_name: The name of the resource.
872
944
  :param NotificationChannelArgs args: The arguments to use to populate this resource's properties.
873
945
  :param pulumi.ResourceOptions opts: Options for the resource.