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