pulumi-newrelic 5.23.0__py3-none-any.whl → 5.23.0a1711605988__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 (68) hide show
  1. pulumi_newrelic/_inputs.py +270 -183
  2. pulumi_newrelic/account_management.py +20 -20
  3. pulumi_newrelic/alert_channel.py +92 -76
  4. pulumi_newrelic/alert_condition.py +163 -104
  5. pulumi_newrelic/alert_muting_rule.py +35 -33
  6. pulumi_newrelic/alert_policy.py +43 -68
  7. pulumi_newrelic/alert_policy_channel.py +8 -12
  8. pulumi_newrelic/cloud/_inputs.py +1072 -322
  9. pulumi_newrelic/cloud/aws_govcloud_link_account.py +6 -4
  10. pulumi_newrelic/cloud/aws_integrations.py +15 -13
  11. pulumi_newrelic/cloud/aws_link_account.py +6 -4
  12. pulumi_newrelic/cloud/azure_integrations.py +12 -10
  13. pulumi_newrelic/cloud/azure_link_account.py +6 -4
  14. pulumi_newrelic/cloud/gcp_integrations.py +6 -6
  15. pulumi_newrelic/cloud/gcp_link_account.py +6 -4
  16. pulumi_newrelic/cloud/outputs.py +1072 -322
  17. pulumi_newrelic/data_partition_rule.py +4 -0
  18. pulumi_newrelic/entity_tags.py +17 -13
  19. pulumi_newrelic/events_to_metrics_rule.py +4 -2
  20. pulumi_newrelic/get_account.py +4 -0
  21. pulumi_newrelic/get_application.py +10 -8
  22. pulumi_newrelic/get_authentication_domain.py +8 -4
  23. pulumi_newrelic/get_cloud_account.py +4 -0
  24. pulumi_newrelic/get_entity.py +33 -48
  25. pulumi_newrelic/get_group.py +8 -42
  26. pulumi_newrelic/get_key_transaction.py +10 -8
  27. pulumi_newrelic/get_notification_destination.py +1 -20
  28. pulumi_newrelic/get_obfuscation_expression.py +4 -2
  29. pulumi_newrelic/get_service_level_alert_helper.py +46 -22
  30. pulumi_newrelic/get_test_grok_pattern.py +6 -4
  31. pulumi_newrelic/get_user.py +4 -0
  32. pulumi_newrelic/group.py +42 -40
  33. pulumi_newrelic/infra_alert_condition.py +145 -154
  34. pulumi_newrelic/insights/event.py +25 -8
  35. pulumi_newrelic/log_parsing_rule.py +10 -6
  36. pulumi_newrelic/monitor_downtime.py +193 -174
  37. pulumi_newrelic/notification_channel.py +150 -124
  38. pulumi_newrelic/notification_destination.py +1 -95
  39. pulumi_newrelic/nrql_alert_condition.py +48 -38
  40. pulumi_newrelic/nrql_drop_rule.py +38 -34
  41. pulumi_newrelic/obfuscation_expression.py +4 -2
  42. pulumi_newrelic/obfuscation_rule.py +4 -4
  43. pulumi_newrelic/one_dashboard.py +48 -42
  44. pulumi_newrelic/one_dashboard_raw.py +86 -86
  45. pulumi_newrelic/outputs.py +270 -180
  46. pulumi_newrelic/plugins/_inputs.py +16 -16
  47. pulumi_newrelic/plugins/application_settings.py +36 -20
  48. pulumi_newrelic/plugins/outputs.py +16 -16
  49. pulumi_newrelic/plugins/workload.py +40 -158
  50. pulumi_newrelic/service_level.py +123 -38
  51. pulumi_newrelic/synthetics/alert_condition.py +78 -34
  52. pulumi_newrelic/synthetics/broken_links_monitor.py +20 -18
  53. pulumi_newrelic/synthetics/cert_check_monitor.py +18 -16
  54. pulumi_newrelic/synthetics/get_private_location.py +8 -0
  55. pulumi_newrelic/synthetics/get_secure_credential.py +12 -0
  56. pulumi_newrelic/synthetics/monitor.py +52 -48
  57. pulumi_newrelic/synthetics/multi_location_alert_condition.py +83 -69
  58. pulumi_newrelic/synthetics/private_location.py +6 -6
  59. pulumi_newrelic/synthetics/script_monitor.py +42 -38
  60. pulumi_newrelic/synthetics/secure_credential.py +22 -25
  61. pulumi_newrelic/synthetics/step_monitor.py +20 -18
  62. pulumi_newrelic/user.py +10 -8
  63. pulumi_newrelic/workflow.py +24 -20
  64. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/METADATA +1 -1
  65. pulumi_newrelic-5.23.0a1711605988.dist-info/RECORD +89 -0
  66. pulumi_newrelic-5.23.0.dist-info/RECORD +0 -89
  67. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/WHEEL +0 -0
  68. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/top_level.txt +0 -0
@@ -286,22 +286,23 @@ 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
292
293
 
293
294
  foo = newrelic.NotificationChannel("foo",
294
295
  account_id=12345678,
295
- name="webhook-example",
296
- type="WEBHOOK",
297
296
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
298
297
  product="IINT",
299
298
  properties=[newrelic.NotificationChannelPropertyArgs(
300
299
  key="payload",
301
- value="name: {{ foo }}",
302
300
  label="Payload Template",
303
- )])
301
+ value="name: {{ foo }}",
302
+ )],
303
+ type="WEBHOOK")
304
304
  ```
305
+ <!--End PulumiCodeChooser -->
305
306
  See additional examples.
306
307
 
307
308
  ## Additional Examples
@@ -311,14 +312,13 @@ class NotificationChannel(pulumi.CustomResource):
311
312
  ##### [ServiceNow](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenow)
312
313
  To see the properties’ keys for your account, check ServiceNow incidents table.
313
314
 
315
+ <!--Start PulumiCodeChooser -->
314
316
  ```python
315
317
  import pulumi
316
318
  import pulumi_newrelic as newrelic
317
319
 
318
320
  foo = newrelic.NotificationChannel("foo",
319
321
  account_id=12345678,
320
- name="servicenow-incident-example",
321
- type="SERVICENOW_INCIDENTS",
322
322
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
323
323
  product="IINT",
324
324
  properties=[
@@ -330,18 +330,19 @@ class NotificationChannel(pulumi.CustomResource):
330
330
  key="short_description",
331
331
  value="Short description",
332
332
  ),
333
- ])
333
+ ],
334
+ type="SERVICENOW_INCIDENTS")
334
335
  ```
336
+ <!--End PulumiCodeChooser -->
335
337
 
336
338
  ##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
339
+ <!--Start PulumiCodeChooser -->
337
340
  ```python
338
341
  import pulumi
339
342
  import pulumi_newrelic as newrelic
340
343
 
341
344
  foo = newrelic.NotificationChannel("foo",
342
345
  account_id=12345678,
343
- name="email-example",
344
- type="EMAIL",
345
346
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
346
347
  product="IINT",
347
348
  properties=[
@@ -353,18 +354,19 @@ class NotificationChannel(pulumi.CustomResource):
353
354
  key="customDetailsEmail",
354
355
  value="issue id - {{issueId}}",
355
356
  ),
356
- ])
357
+ ],
358
+ type="EMAIL")
357
359
  ```
360
+ <!--End PulumiCodeChooser -->
358
361
 
359
362
  ##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
363
+ <!--Start PulumiCodeChooser -->
360
364
  ```python
361
365
  import pulumi
362
366
  import pulumi_newrelic as newrelic
363
367
 
364
368
  foo = newrelic.NotificationChannel("foo",
365
369
  account_id=12345678,
366
- name="jira-example",
367
- type="JIRA_CLASSIC",
368
370
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
369
371
  product="ERROR_TRACKING",
370
372
  properties=[
@@ -384,18 +386,19 @@ class NotificationChannel(pulumi.CustomResource):
384
386
  key="summary",
385
387
  value="{{ annotations.title.[0] }}",
386
388
  ),
387
- ])
389
+ ],
390
+ type="JIRA_CLASSIC")
388
391
  ```
392
+ <!--End PulumiCodeChooser -->
389
393
 
390
394
  ##### [PagerDuty with account integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
395
+ <!--Start PulumiCodeChooser -->
391
396
  ```python
392
397
  import pulumi
393
398
  import pulumi_newrelic as newrelic
394
399
 
395
400
  foo = newrelic.NotificationChannel("foo",
396
401
  account_id=12345678,
397
- name="pagerduty-account-example",
398
- type="PAGERDUTY_ACCOUNT_INTEGRATION",
399
402
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
400
403
  product="IINT",
401
404
  properties=[
@@ -414,33 +417,35 @@ class NotificationChannel(pulumi.CustomResource):
414
417
  ),
415
418
  newrelic.NotificationChannelPropertyArgs(
416
419
  key="customDetails",
417
- value=\"\"\"{
418
- "id":{{json issueId}},
419
- "IssueURL":{{json issuePageUrl}},
420
- "NewRelic priority":{{json priority}},
421
- "Total Incidents":{{json totalIncidents}},
422
- "Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
423
- "Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
424
- "Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
425
- "isCorrelated":{{json isCorrelated}},
426
- "Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
427
- "Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
428
- "Workflow Name":{{json workflowName}}
429
- }
420
+ value=\"\"\" {
421
+ "id":{{json issueId}},
422
+ "IssueURL":{{json issuePageUrl}},
423
+ "NewRelic priority":{{json priority}},
424
+ "Total Incidents":{{json totalIncidents}},
425
+ "Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
426
+ "Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
427
+ "Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
428
+ "isCorrelated":{{json isCorrelated}},
429
+ "Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
430
+ "Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
431
+ "Workflow Name":{{json workflowName}}
432
+ }
433
+
430
434
  \"\"\",
431
435
  ),
432
- ])
436
+ ],
437
+ type="PAGERDUTY_ACCOUNT_INTEGRATION")
433
438
  ```
439
+ <!--End PulumiCodeChooser -->
434
440
 
435
441
  ##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
442
+ <!--Start PulumiCodeChooser -->
436
443
  ```python
437
444
  import pulumi
438
445
  import pulumi_newrelic as newrelic
439
446
 
440
447
  foo = newrelic.NotificationChannel("foo",
441
448
  account_id=12345678,
442
- name="pagerduty-account-example",
443
- type="PAGERDUTY_SERVICE_INTEGRATION",
444
449
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
445
450
  product="IINT",
446
451
  properties=[
@@ -450,46 +455,49 @@ class NotificationChannel(pulumi.CustomResource):
450
455
  ),
451
456
  newrelic.NotificationChannelPropertyArgs(
452
457
  key="customDetails",
453
- value=\"\"\"{
454
- "id":{{json issueId}},
455
- "IssueURL":{{json issuePageUrl}},
456
- "NewRelic priority":{{json priority}},
457
- "Total Incidents":{{json totalIncidents}},
458
- "Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
459
- "Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
460
- "Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
461
- "isCorrelated":{{json isCorrelated}},
462
- "Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
463
- "Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
464
- "Workflow Name":{{json workflowName}}
465
- }
458
+ value=\"\"\" {
459
+ "id":{{json issueId}},
460
+ "IssueURL":{{json issuePageUrl}},
461
+ "NewRelic priority":{{json priority}},
462
+ "Total Incidents":{{json totalIncidents}},
463
+ "Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
464
+ "Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
465
+ "Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
466
+ "isCorrelated":{{json isCorrelated}},
467
+ "Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
468
+ "Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
469
+ "Workflow Name":{{json workflowName}}
470
+ }
471
+
466
472
  \"\"\",
467
473
  ),
468
- ])
474
+ ],
475
+ type="PAGERDUTY_SERVICE_INTEGRATION")
469
476
  ```
477
+ <!--End PulumiCodeChooser -->
470
478
 
471
479
  #### Mobile Push
480
+ <!--Start PulumiCodeChooser -->
472
481
  ```python
473
482
  import pulumi
474
483
  import pulumi_newrelic as newrelic
475
484
 
476
485
  foo = newrelic.NotificationChannel("foo",
477
486
  account_id=12345678,
478
- name="mobile-push-example",
479
- type="MOBILE_PUSH",
480
487
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
481
- product="IINT")
488
+ product="IINT",
489
+ type="MOBILE_PUSH")
482
490
  ```
491
+ <!--End PulumiCodeChooser -->
483
492
 
484
493
  #### [AWS Event Bridge](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#eventBridge)
494
+ <!--Start PulumiCodeChooser -->
485
495
  ```python
486
496
  import pulumi
487
497
  import pulumi_newrelic as newrelic
488
498
 
489
499
  foo = newrelic.NotificationChannel("foo",
490
500
  account_id=12345678,
491
- name="event-bridge-example",
492
- type="EVENT_BRIDGE",
493
501
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
494
502
  product="IINT",
495
503
  properties=[
@@ -501,18 +509,19 @@ class NotificationChannel(pulumi.CustomResource):
501
509
  key="eventContent",
502
510
  value="{ id: {{ json issueId }} }",
503
511
  ),
504
- ])
512
+ ],
513
+ type="EVENT_BRIDGE")
505
514
  ```
515
+ <!--End PulumiCodeChooser -->
506
516
 
507
517
  #### [SLACK](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#slack)
518
+ <!--Start PulumiCodeChooser -->
508
519
  ```python
509
520
  import pulumi
510
521
  import pulumi_newrelic as newrelic
511
522
 
512
523
  foo = newrelic.NotificationChannel("foo",
513
524
  account_id=12345678,
514
- name="slack-example",
515
- type="SLACK",
516
525
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
517
526
  product="IINT",
518
527
  properties=[
@@ -524,8 +533,10 @@ class NotificationChannel(pulumi.CustomResource):
524
533
  key="customDetailsSlack",
525
534
  value="issue id - {{issueId}}",
526
535
  ),
527
- ])
536
+ ],
537
+ type="SLACK")
528
538
  ```
539
+ <!--End PulumiCodeChooser -->
529
540
 
530
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.
531
542
 
@@ -534,34 +545,35 @@ class NotificationChannel(pulumi.CustomResource):
534
545
  Create a destination resource and reference that destination to the channel resource:
535
546
 
536
547
  ### Create a destination
548
+ <!--Start PulumiCodeChooser -->
537
549
  ```python
538
550
  import pulumi
539
551
  import pulumi_newrelic as newrelic
540
552
 
541
553
  webhook_destination = newrelic.NotificationDestination("webhook-destination",
542
554
  account_id=12345678,
543
- name="destination-webhook",
544
- type="WEBHOOK",
555
+ auth_basic=newrelic.NotificationDestinationAuthBasicArgs(
556
+ password="password",
557
+ user="username",
558
+ ),
545
559
  properties=[newrelic.NotificationDestinationPropertyArgs(
546
560
  key="url",
547
561
  value="https://webhook.mywebhook.com",
548
562
  )],
549
- auth_basic=newrelic.NotificationDestinationAuthBasicArgs(
550
- user="username",
551
- password="password",
552
- ))
563
+ type="WEBHOOK")
553
564
  ```
565
+ <!--End PulumiCodeChooser -->
554
566
 
555
567
  ### Create a channel
568
+ <!--Start PulumiCodeChooser -->
556
569
  ```python
557
570
  import pulumi
558
571
  import pulumi_newrelic as newrelic
559
572
 
560
573
  webhook_channel = newrelic.NotificationChannel("webhook-channel",
561
574
  account_id=12345678,
562
- name="channel-webhook",
563
575
  type="WEBHOOK",
564
- destination_id=webhook_destination["id"],
576
+ destination_id=newrelic_notification_destination["webhook-destination"]["id"],
565
577
  product="IINT",
566
578
  properties=[newrelic.NotificationChannelPropertyArgs(
567
579
  key="payload",
@@ -569,6 +581,7 @@ class NotificationChannel(pulumi.CustomResource):
569
581
  label="Payload Template",
570
582
  )])
571
583
  ```
584
+ <!--End PulumiCodeChooser -->
572
585
 
573
586
  ## Additional Information
574
587
 
@@ -612,22 +625,23 @@ class NotificationChannel(pulumi.CustomResource):
612
625
  ## Example Usage
613
626
 
614
627
  ##### [Webhook](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#webhook)
628
+ <!--Start PulumiCodeChooser -->
615
629
  ```python
616
630
  import pulumi
617
631
  import pulumi_newrelic as newrelic
618
632
 
619
633
  foo = newrelic.NotificationChannel("foo",
620
634
  account_id=12345678,
621
- name="webhook-example",
622
- type="WEBHOOK",
623
635
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
624
636
  product="IINT",
625
637
  properties=[newrelic.NotificationChannelPropertyArgs(
626
638
  key="payload",
627
- value="name: {{ foo }}",
628
639
  label="Payload Template",
629
- )])
640
+ value="name: {{ foo }}",
641
+ )],
642
+ type="WEBHOOK")
630
643
  ```
644
+ <!--End PulumiCodeChooser -->
631
645
  See additional examples.
632
646
 
633
647
  ## Additional Examples
@@ -637,14 +651,13 @@ class NotificationChannel(pulumi.CustomResource):
637
651
  ##### [ServiceNow](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenow)
638
652
  To see the properties’ keys for your account, check ServiceNow incidents table.
639
653
 
654
+ <!--Start PulumiCodeChooser -->
640
655
  ```python
641
656
  import pulumi
642
657
  import pulumi_newrelic as newrelic
643
658
 
644
659
  foo = newrelic.NotificationChannel("foo",
645
660
  account_id=12345678,
646
- name="servicenow-incident-example",
647
- type="SERVICENOW_INCIDENTS",
648
661
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
649
662
  product="IINT",
650
663
  properties=[
@@ -656,18 +669,19 @@ class NotificationChannel(pulumi.CustomResource):
656
669
  key="short_description",
657
670
  value="Short description",
658
671
  ),
659
- ])
672
+ ],
673
+ type="SERVICENOW_INCIDENTS")
660
674
  ```
675
+ <!--End PulumiCodeChooser -->
661
676
 
662
677
  ##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
678
+ <!--Start PulumiCodeChooser -->
663
679
  ```python
664
680
  import pulumi
665
681
  import pulumi_newrelic as newrelic
666
682
 
667
683
  foo = newrelic.NotificationChannel("foo",
668
684
  account_id=12345678,
669
- name="email-example",
670
- type="EMAIL",
671
685
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
672
686
  product="IINT",
673
687
  properties=[
@@ -679,18 +693,19 @@ class NotificationChannel(pulumi.CustomResource):
679
693
  key="customDetailsEmail",
680
694
  value="issue id - {{issueId}}",
681
695
  ),
682
- ])
696
+ ],
697
+ type="EMAIL")
683
698
  ```
699
+ <!--End PulumiCodeChooser -->
684
700
 
685
701
  ##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
702
+ <!--Start PulumiCodeChooser -->
686
703
  ```python
687
704
  import pulumi
688
705
  import pulumi_newrelic as newrelic
689
706
 
690
707
  foo = newrelic.NotificationChannel("foo",
691
708
  account_id=12345678,
692
- name="jira-example",
693
- type="JIRA_CLASSIC",
694
709
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
695
710
  product="ERROR_TRACKING",
696
711
  properties=[
@@ -710,18 +725,19 @@ class NotificationChannel(pulumi.CustomResource):
710
725
  key="summary",
711
726
  value="{{ annotations.title.[0] }}",
712
727
  ),
713
- ])
728
+ ],
729
+ type="JIRA_CLASSIC")
714
730
  ```
731
+ <!--End PulumiCodeChooser -->
715
732
 
716
733
  ##### [PagerDuty with account integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
734
+ <!--Start PulumiCodeChooser -->
717
735
  ```python
718
736
  import pulumi
719
737
  import pulumi_newrelic as newrelic
720
738
 
721
739
  foo = newrelic.NotificationChannel("foo",
722
740
  account_id=12345678,
723
- name="pagerduty-account-example",
724
- type="PAGERDUTY_ACCOUNT_INTEGRATION",
725
741
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
726
742
  product="IINT",
727
743
  properties=[
@@ -740,33 +756,35 @@ class NotificationChannel(pulumi.CustomResource):
740
756
  ),
741
757
  newrelic.NotificationChannelPropertyArgs(
742
758
  key="customDetails",
743
- value=\"\"\"{
744
- "id":{{json issueId}},
745
- "IssueURL":{{json issuePageUrl}},
746
- "NewRelic priority":{{json priority}},
747
- "Total Incidents":{{json totalIncidents}},
748
- "Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
749
- "Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
750
- "Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
751
- "isCorrelated":{{json isCorrelated}},
752
- "Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
753
- "Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
754
- "Workflow Name":{{json workflowName}}
755
- }
759
+ value=\"\"\" {
760
+ "id":{{json issueId}},
761
+ "IssueURL":{{json issuePageUrl}},
762
+ "NewRelic priority":{{json priority}},
763
+ "Total Incidents":{{json totalIncidents}},
764
+ "Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
765
+ "Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
766
+ "Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
767
+ "isCorrelated":{{json isCorrelated}},
768
+ "Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
769
+ "Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
770
+ "Workflow Name":{{json workflowName}}
771
+ }
772
+
756
773
  \"\"\",
757
774
  ),
758
- ])
775
+ ],
776
+ type="PAGERDUTY_ACCOUNT_INTEGRATION")
759
777
  ```
778
+ <!--End PulumiCodeChooser -->
760
779
 
761
780
  ##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
781
+ <!--Start PulumiCodeChooser -->
762
782
  ```python
763
783
  import pulumi
764
784
  import pulumi_newrelic as newrelic
765
785
 
766
786
  foo = newrelic.NotificationChannel("foo",
767
787
  account_id=12345678,
768
- name="pagerduty-account-example",
769
- type="PAGERDUTY_SERVICE_INTEGRATION",
770
788
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
771
789
  product="IINT",
772
790
  properties=[
@@ -776,46 +794,49 @@ class NotificationChannel(pulumi.CustomResource):
776
794
  ),
777
795
  newrelic.NotificationChannelPropertyArgs(
778
796
  key="customDetails",
779
- value=\"\"\"{
780
- "id":{{json issueId}},
781
- "IssueURL":{{json issuePageUrl}},
782
- "NewRelic priority":{{json priority}},
783
- "Total Incidents":{{json totalIncidents}},
784
- "Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
785
- "Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
786
- "Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
787
- "isCorrelated":{{json isCorrelated}},
788
- "Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
789
- "Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
790
- "Workflow Name":{{json workflowName}}
791
- }
797
+ value=\"\"\" {
798
+ "id":{{json issueId}},
799
+ "IssueURL":{{json issuePageUrl}},
800
+ "NewRelic priority":{{json priority}},
801
+ "Total Incidents":{{json totalIncidents}},
802
+ "Impacted Entities":"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
803
+ "Runbook":"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
804
+ "Description":"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
805
+ "isCorrelated":{{json isCorrelated}},
806
+ "Alert Policy Names":"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
807
+ "Alert Condition Names":"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}",
808
+ "Workflow Name":{{json workflowName}}
809
+ }
810
+
792
811
  \"\"\",
793
812
  ),
794
- ])
813
+ ],
814
+ type="PAGERDUTY_SERVICE_INTEGRATION")
795
815
  ```
816
+ <!--End PulumiCodeChooser -->
796
817
 
797
818
  #### Mobile Push
819
+ <!--Start PulumiCodeChooser -->
798
820
  ```python
799
821
  import pulumi
800
822
  import pulumi_newrelic as newrelic
801
823
 
802
824
  foo = newrelic.NotificationChannel("foo",
803
825
  account_id=12345678,
804
- name="mobile-push-example",
805
- type="MOBILE_PUSH",
806
826
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
807
- product="IINT")
827
+ product="IINT",
828
+ type="MOBILE_PUSH")
808
829
  ```
830
+ <!--End PulumiCodeChooser -->
809
831
 
810
832
  #### [AWS Event Bridge](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#eventBridge)
833
+ <!--Start PulumiCodeChooser -->
811
834
  ```python
812
835
  import pulumi
813
836
  import pulumi_newrelic as newrelic
814
837
 
815
838
  foo = newrelic.NotificationChannel("foo",
816
839
  account_id=12345678,
817
- name="event-bridge-example",
818
- type="EVENT_BRIDGE",
819
840
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
820
841
  product="IINT",
821
842
  properties=[
@@ -827,18 +848,19 @@ class NotificationChannel(pulumi.CustomResource):
827
848
  key="eventContent",
828
849
  value="{ id: {{ json issueId }} }",
829
850
  ),
830
- ])
851
+ ],
852
+ type="EVENT_BRIDGE")
831
853
  ```
854
+ <!--End PulumiCodeChooser -->
832
855
 
833
856
  #### [SLACK](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#slack)
857
+ <!--Start PulumiCodeChooser -->
834
858
  ```python
835
859
  import pulumi
836
860
  import pulumi_newrelic as newrelic
837
861
 
838
862
  foo = newrelic.NotificationChannel("foo",
839
863
  account_id=12345678,
840
- name="slack-example",
841
- type="SLACK",
842
864
  destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
843
865
  product="IINT",
844
866
  properties=[
@@ -850,8 +872,10 @@ class NotificationChannel(pulumi.CustomResource):
850
872
  key="customDetailsSlack",
851
873
  value="issue id - {{issueId}}",
852
874
  ),
853
- ])
875
+ ],
876
+ type="SLACK")
854
877
  ```
878
+ <!--End PulumiCodeChooser -->
855
879
 
856
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.
857
881
 
@@ -860,34 +884,35 @@ class NotificationChannel(pulumi.CustomResource):
860
884
  Create a destination resource and reference that destination to the channel resource:
861
885
 
862
886
  ### Create a destination
887
+ <!--Start PulumiCodeChooser -->
863
888
  ```python
864
889
  import pulumi
865
890
  import pulumi_newrelic as newrelic
866
891
 
867
892
  webhook_destination = newrelic.NotificationDestination("webhook-destination",
868
893
  account_id=12345678,
869
- name="destination-webhook",
870
- type="WEBHOOK",
894
+ auth_basic=newrelic.NotificationDestinationAuthBasicArgs(
895
+ password="password",
896
+ user="username",
897
+ ),
871
898
  properties=[newrelic.NotificationDestinationPropertyArgs(
872
899
  key="url",
873
900
  value="https://webhook.mywebhook.com",
874
901
  )],
875
- auth_basic=newrelic.NotificationDestinationAuthBasicArgs(
876
- user="username",
877
- password="password",
878
- ))
902
+ type="WEBHOOK")
879
903
  ```
904
+ <!--End PulumiCodeChooser -->
880
905
 
881
906
  ### Create a channel
907
+ <!--Start PulumiCodeChooser -->
882
908
  ```python
883
909
  import pulumi
884
910
  import pulumi_newrelic as newrelic
885
911
 
886
912
  webhook_channel = newrelic.NotificationChannel("webhook-channel",
887
913
  account_id=12345678,
888
- name="channel-webhook",
889
914
  type="WEBHOOK",
890
- destination_id=webhook_destination["id"],
915
+ destination_id=newrelic_notification_destination["webhook-destination"]["id"],
891
916
  product="IINT",
892
917
  properties=[newrelic.NotificationChannelPropertyArgs(
893
918
  key="payload",
@@ -895,6 +920,7 @@ class NotificationChannel(pulumi.CustomResource):
895
920
  label="Payload Template",
896
921
  )])
897
922
  ```
923
+ <!--End PulumiCodeChooser -->
898
924
 
899
925
  ## Additional Information
900
926