pulumi-newrelic 5.22.0__py3-none-any.whl → 5.58.0a1763707205__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-newrelic might be problematic. Click here for more details.
- pulumi_newrelic/__init__.py +28 -1
- pulumi_newrelic/_inputs.py +10385 -2976
- pulumi_newrelic/_utilities.py +50 -10
- pulumi_newrelic/account_management.py +48 -42
- pulumi_newrelic/alert_channel.py +165 -175
- pulumi_newrelic/alert_condition.py +307 -319
- pulumi_newrelic/alert_muting_rule.py +193 -140
- pulumi_newrelic/alert_policy.py +121 -117
- pulumi_newrelic/alert_policy_channel.py +89 -79
- pulumi_newrelic/api_access_key.py +195 -193
- pulumi_newrelic/browser_application.py +120 -114
- pulumi_newrelic/cloud/__init__.py +3 -1
- pulumi_newrelic/cloud/_inputs.py +4267 -2714
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +206 -196
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +143 -228
- pulumi_newrelic/cloud/aws_integrations.py +510 -1490
- pulumi_newrelic/cloud/aws_link_account.py +80 -76
- pulumi_newrelic/cloud/azure_integrations.py +673 -587
- pulumi_newrelic/cloud/azure_link_account.py +121 -117
- pulumi_newrelic/cloud/gcp_integrations.py +428 -408
- pulumi_newrelic/cloud/gcp_link_account.py +65 -61
- pulumi_newrelic/cloud/oci_link_account.py +926 -0
- pulumi_newrelic/cloud/outputs.py +1678 -2321
- pulumi_newrelic/config/__init__.py +2 -1
- pulumi_newrelic/config/__init__.pyi +8 -3
- pulumi_newrelic/config/vars.py +22 -17
- pulumi_newrelic/data_partition_rule.py +119 -117
- pulumi_newrelic/entity_tags.py +111 -53
- pulumi_newrelic/events_to_metrics_rule.py +106 -102
- pulumi_newrelic/get_account.py +41 -33
- pulumi_newrelic/get_alert_channel.py +73 -28
- pulumi_newrelic/get_alert_policy.py +82 -33
- pulumi_newrelic/get_application.py +51 -43
- pulumi_newrelic/get_authentication_domain.py +27 -23
- pulumi_newrelic/get_cloud_account.py +43 -35
- pulumi_newrelic/get_entity.py +126 -183
- pulumi_newrelic/get_group.py +76 -31
- pulumi_newrelic/get_key_transaction.py +117 -42
- pulumi_newrelic/get_notification_destination.py +75 -38
- pulumi_newrelic/get_obfuscation_expression.py +47 -39
- pulumi_newrelic/get_service_level_alert_helper.py +189 -171
- pulumi_newrelic/get_test_grok_pattern.py +47 -36
- pulumi_newrelic/get_user.py +39 -31
- pulumi_newrelic/group.py +59 -199
- pulumi_newrelic/infra_alert_condition.py +399 -405
- pulumi_newrelic/insights/__init__.py +2 -1
- pulumi_newrelic/insights/_inputs.py +71 -28
- pulumi_newrelic/insights/event.py +54 -52
- pulumi_newrelic/insights/outputs.py +28 -23
- pulumi_newrelic/key_transaction.py +465 -0
- pulumi_newrelic/log_parsing_rule.py +159 -157
- pulumi_newrelic/monitor_downtime.py +311 -331
- pulumi_newrelic/notification_channel.py +534 -464
- pulumi_newrelic/notification_destination.py +238 -141
- pulumi_newrelic/nrql_alert_condition.py +820 -614
- pulumi_newrelic/nrql_drop_rule.py +113 -151
- pulumi_newrelic/obfuscation_expression.py +80 -76
- pulumi_newrelic/obfuscation_rule.py +115 -109
- pulumi_newrelic/one_dashboard.py +110 -104
- pulumi_newrelic/one_dashboard_json.py +69 -63
- pulumi_newrelic/one_dashboard_raw.py +212 -206
- pulumi_newrelic/outputs.py +4936 -2234
- pulumi_newrelic/pipeline_cloud_rule.py +335 -0
- pulumi_newrelic/plugins/__init__.py +2 -1
- pulumi_newrelic/plugins/_inputs.py +519 -89
- pulumi_newrelic/plugins/application_settings.py +463 -187
- pulumi_newrelic/plugins/outputs.py +336 -74
- pulumi_newrelic/plugins/workload.py +313 -189
- pulumi_newrelic/provider.py +156 -142
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +263 -263
- pulumi_newrelic/synthetics/__init__.py +2 -1
- pulumi_newrelic/synthetics/_inputs.py +265 -108
- pulumi_newrelic/synthetics/alert_condition.py +170 -180
- pulumi_newrelic/synthetics/broken_links_monitor.py +297 -249
- pulumi_newrelic/synthetics/cert_check_monitor.py +306 -258
- pulumi_newrelic/synthetics/get_private_location.py +51 -47
- pulumi_newrelic/synthetics/get_secure_credential.py +39 -31
- pulumi_newrelic/synthetics/monitor.py +658 -460
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +211 -205
- pulumi_newrelic/synthetics/outputs.py +92 -87
- pulumi_newrelic/synthetics/private_location.py +118 -112
- pulumi_newrelic/synthetics/script_monitor.py +613 -373
- pulumi_newrelic/synthetics/secure_credential.py +97 -95
- pulumi_newrelic/synthetics/step_monitor.py +445 -275
- pulumi_newrelic/user.py +84 -80
- pulumi_newrelic/workflow.py +336 -322
- {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +7 -6
- pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
- {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.22.0.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ._inputs import *
|
|
@@ -16,22 +21,22 @@ __all__ = ['NotificationChannelArgs', 'NotificationChannel']
|
|
|
16
21
|
@pulumi.input_type
|
|
17
22
|
class NotificationChannelArgs:
|
|
18
23
|
def __init__(__self__, *,
|
|
19
|
-
destination_id: pulumi.Input[str],
|
|
20
|
-
product: pulumi.Input[str],
|
|
24
|
+
destination_id: pulumi.Input[_builtins.str],
|
|
25
|
+
product: pulumi.Input[_builtins.str],
|
|
21
26
|
properties: pulumi.Input[Sequence[pulumi.Input['NotificationChannelPropertyArgs']]],
|
|
22
|
-
type: pulumi.Input[str],
|
|
23
|
-
account_id: Optional[pulumi.Input[
|
|
24
|
-
active: Optional[pulumi.Input[bool]] = None,
|
|
25
|
-
name: Optional[pulumi.Input[str]] = None):
|
|
27
|
+
type: pulumi.Input[_builtins.str],
|
|
28
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
29
|
+
active: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
30
|
+
name: Optional[pulumi.Input[_builtins.str]] = None):
|
|
26
31
|
"""
|
|
27
32
|
The set of arguments for constructing a NotificationChannel resource.
|
|
28
|
-
:param pulumi.Input[str] destination_id: The id of the destination.
|
|
29
|
-
:param pulumi.Input[str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
33
|
+
:param pulumi.Input[_builtins.str] destination_id: The id of the destination.
|
|
34
|
+
:param pulumi.Input[_builtins.str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
30
35
|
:param pulumi.Input[Sequence[pulumi.Input['NotificationChannelPropertyArgs']]] properties: A nested block that describes a notification channel property. See Nested property blocks below for details.
|
|
31
|
-
:param pulumi.Input[str] type: The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `
|
|
32
|
-
:param pulumi.Input[
|
|
33
|
-
:param pulumi.Input[bool] active: Indicates whether the channel is active.
|
|
34
|
-
:param pulumi.Input[str] name: The name of the channel.
|
|
36
|
+
:param pulumi.Input[_builtins.str] type: The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION`, `PAGERDUTY_SERVICE_INTEGRATION`, `MICROSOFT_TEAMS` or `WORKFLOW_AUTOMATION`.
|
|
37
|
+
:param pulumi.Input[_builtins.str] account_id: Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
|
|
38
|
+
:param pulumi.Input[_builtins.bool] active: Indicates whether the channel is active.
|
|
39
|
+
:param pulumi.Input[_builtins.str] name: The name of the channel.
|
|
35
40
|
"""
|
|
36
41
|
pulumi.set(__self__, "destination_id", destination_id)
|
|
37
42
|
pulumi.set(__self__, "product", product)
|
|
@@ -44,31 +49,31 @@ class NotificationChannelArgs:
|
|
|
44
49
|
if name is not None:
|
|
45
50
|
pulumi.set(__self__, "name", name)
|
|
46
51
|
|
|
47
|
-
@property
|
|
52
|
+
@_builtins.property
|
|
48
53
|
@pulumi.getter(name="destinationId")
|
|
49
|
-
def destination_id(self) -> pulumi.Input[str]:
|
|
54
|
+
def destination_id(self) -> pulumi.Input[_builtins.str]:
|
|
50
55
|
"""
|
|
51
56
|
The id of the destination.
|
|
52
57
|
"""
|
|
53
58
|
return pulumi.get(self, "destination_id")
|
|
54
59
|
|
|
55
60
|
@destination_id.setter
|
|
56
|
-
def destination_id(self, value: pulumi.Input[str]):
|
|
61
|
+
def destination_id(self, value: pulumi.Input[_builtins.str]):
|
|
57
62
|
pulumi.set(self, "destination_id", value)
|
|
58
63
|
|
|
59
|
-
@property
|
|
64
|
+
@_builtins.property
|
|
60
65
|
@pulumi.getter
|
|
61
|
-
def product(self) -> pulumi.Input[str]:
|
|
66
|
+
def product(self) -> pulumi.Input[_builtins.str]:
|
|
62
67
|
"""
|
|
63
68
|
The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
64
69
|
"""
|
|
65
70
|
return pulumi.get(self, "product")
|
|
66
71
|
|
|
67
72
|
@product.setter
|
|
68
|
-
def product(self, value: pulumi.Input[str]):
|
|
73
|
+
def product(self, value: pulumi.Input[_builtins.str]):
|
|
69
74
|
pulumi.set(self, "product", value)
|
|
70
75
|
|
|
71
|
-
@property
|
|
76
|
+
@_builtins.property
|
|
72
77
|
@pulumi.getter
|
|
73
78
|
def properties(self) -> pulumi.Input[Sequence[pulumi.Input['NotificationChannelPropertyArgs']]]:
|
|
74
79
|
"""
|
|
@@ -80,76 +85,76 @@ class NotificationChannelArgs:
|
|
|
80
85
|
def properties(self, value: pulumi.Input[Sequence[pulumi.Input['NotificationChannelPropertyArgs']]]):
|
|
81
86
|
pulumi.set(self, "properties", value)
|
|
82
87
|
|
|
83
|
-
@property
|
|
88
|
+
@_builtins.property
|
|
84
89
|
@pulumi.getter
|
|
85
|
-
def type(self) -> pulumi.Input[str]:
|
|
90
|
+
def type(self) -> pulumi.Input[_builtins.str]:
|
|
86
91
|
"""
|
|
87
|
-
The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `
|
|
92
|
+
The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION`, `PAGERDUTY_SERVICE_INTEGRATION`, `MICROSOFT_TEAMS` or `WORKFLOW_AUTOMATION`.
|
|
88
93
|
"""
|
|
89
94
|
return pulumi.get(self, "type")
|
|
90
95
|
|
|
91
96
|
@type.setter
|
|
92
|
-
def type(self, value: pulumi.Input[str]):
|
|
97
|
+
def type(self, value: pulumi.Input[_builtins.str]):
|
|
93
98
|
pulumi.set(self, "type", value)
|
|
94
99
|
|
|
95
|
-
@property
|
|
100
|
+
@_builtins.property
|
|
96
101
|
@pulumi.getter(name="accountId")
|
|
97
|
-
def account_id(self) -> Optional[pulumi.Input[
|
|
102
|
+
def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
98
103
|
"""
|
|
99
104
|
Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
|
|
100
105
|
"""
|
|
101
106
|
return pulumi.get(self, "account_id")
|
|
102
107
|
|
|
103
108
|
@account_id.setter
|
|
104
|
-
def account_id(self, value: Optional[pulumi.Input[
|
|
109
|
+
def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
105
110
|
pulumi.set(self, "account_id", value)
|
|
106
111
|
|
|
107
|
-
@property
|
|
112
|
+
@_builtins.property
|
|
108
113
|
@pulumi.getter
|
|
109
|
-
def active(self) -> Optional[pulumi.Input[bool]]:
|
|
114
|
+
def active(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
110
115
|
"""
|
|
111
116
|
Indicates whether the channel is active.
|
|
112
117
|
"""
|
|
113
118
|
return pulumi.get(self, "active")
|
|
114
119
|
|
|
115
120
|
@active.setter
|
|
116
|
-
def active(self, value: Optional[pulumi.Input[bool]]):
|
|
121
|
+
def active(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
117
122
|
pulumi.set(self, "active", value)
|
|
118
123
|
|
|
119
|
-
@property
|
|
124
|
+
@_builtins.property
|
|
120
125
|
@pulumi.getter
|
|
121
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
126
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
122
127
|
"""
|
|
123
128
|
The name of the channel.
|
|
124
129
|
"""
|
|
125
130
|
return pulumi.get(self, "name")
|
|
126
131
|
|
|
127
132
|
@name.setter
|
|
128
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
133
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
129
134
|
pulumi.set(self, "name", value)
|
|
130
135
|
|
|
131
136
|
|
|
132
137
|
@pulumi.input_type
|
|
133
138
|
class _NotificationChannelState:
|
|
134
139
|
def __init__(__self__, *,
|
|
135
|
-
account_id: Optional[pulumi.Input[
|
|
136
|
-
active: Optional[pulumi.Input[bool]] = None,
|
|
137
|
-
destination_id: Optional[pulumi.Input[str]] = None,
|
|
138
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
139
|
-
product: Optional[pulumi.Input[str]] = None,
|
|
140
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
141
|
+
active: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
142
|
+
destination_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
143
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
144
|
+
product: Optional[pulumi.Input[_builtins.str]] = None,
|
|
140
145
|
properties: Optional[pulumi.Input[Sequence[pulumi.Input['NotificationChannelPropertyArgs']]]] = None,
|
|
141
|
-
status: Optional[pulumi.Input[str]] = None,
|
|
142
|
-
type: Optional[pulumi.Input[str]] = None):
|
|
146
|
+
status: Optional[pulumi.Input[_builtins.str]] = None,
|
|
147
|
+
type: Optional[pulumi.Input[_builtins.str]] = None):
|
|
143
148
|
"""
|
|
144
149
|
Input properties used for looking up and filtering NotificationChannel resources.
|
|
145
|
-
:param pulumi.Input[
|
|
146
|
-
:param pulumi.Input[bool] active: Indicates whether the channel is active.
|
|
147
|
-
:param pulumi.Input[str] destination_id: The id of the destination.
|
|
148
|
-
:param pulumi.Input[str] name: The name of the channel.
|
|
149
|
-
:param pulumi.Input[str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
150
|
+
:param pulumi.Input[_builtins.str] account_id: Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
|
|
151
|
+
:param pulumi.Input[_builtins.bool] active: Indicates whether the channel is active.
|
|
152
|
+
:param pulumi.Input[_builtins.str] destination_id: The id of the destination.
|
|
153
|
+
:param pulumi.Input[_builtins.str] name: The name of the channel.
|
|
154
|
+
:param pulumi.Input[_builtins.str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
150
155
|
:param pulumi.Input[Sequence[pulumi.Input['NotificationChannelPropertyArgs']]] properties: A nested block that describes a notification channel property. See Nested property blocks below for details.
|
|
151
|
-
:param pulumi.Input[str] status: The status of the channel.
|
|
152
|
-
:param pulumi.Input[str] type: The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `
|
|
156
|
+
:param pulumi.Input[_builtins.str] status: The status of the channel.
|
|
157
|
+
:param pulumi.Input[_builtins.str] type: The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION`, `PAGERDUTY_SERVICE_INTEGRATION`, `MICROSOFT_TEAMS` or `WORKFLOW_AUTOMATION`.
|
|
153
158
|
"""
|
|
154
159
|
if account_id is not None:
|
|
155
160
|
pulumi.set(__self__, "account_id", account_id)
|
|
@@ -168,67 +173,67 @@ class _NotificationChannelState:
|
|
|
168
173
|
if type is not None:
|
|
169
174
|
pulumi.set(__self__, "type", type)
|
|
170
175
|
|
|
171
|
-
@property
|
|
176
|
+
@_builtins.property
|
|
172
177
|
@pulumi.getter(name="accountId")
|
|
173
|
-
def account_id(self) -> Optional[pulumi.Input[
|
|
178
|
+
def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
174
179
|
"""
|
|
175
180
|
Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
|
|
176
181
|
"""
|
|
177
182
|
return pulumi.get(self, "account_id")
|
|
178
183
|
|
|
179
184
|
@account_id.setter
|
|
180
|
-
def account_id(self, value: Optional[pulumi.Input[
|
|
185
|
+
def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
181
186
|
pulumi.set(self, "account_id", value)
|
|
182
187
|
|
|
183
|
-
@property
|
|
188
|
+
@_builtins.property
|
|
184
189
|
@pulumi.getter
|
|
185
|
-
def active(self) -> Optional[pulumi.Input[bool]]:
|
|
190
|
+
def active(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
186
191
|
"""
|
|
187
192
|
Indicates whether the channel is active.
|
|
188
193
|
"""
|
|
189
194
|
return pulumi.get(self, "active")
|
|
190
195
|
|
|
191
196
|
@active.setter
|
|
192
|
-
def active(self, value: Optional[pulumi.Input[bool]]):
|
|
197
|
+
def active(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
193
198
|
pulumi.set(self, "active", value)
|
|
194
199
|
|
|
195
|
-
@property
|
|
200
|
+
@_builtins.property
|
|
196
201
|
@pulumi.getter(name="destinationId")
|
|
197
|
-
def destination_id(self) -> Optional[pulumi.Input[str]]:
|
|
202
|
+
def destination_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
198
203
|
"""
|
|
199
204
|
The id of the destination.
|
|
200
205
|
"""
|
|
201
206
|
return pulumi.get(self, "destination_id")
|
|
202
207
|
|
|
203
208
|
@destination_id.setter
|
|
204
|
-
def destination_id(self, value: Optional[pulumi.Input[str]]):
|
|
209
|
+
def destination_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
205
210
|
pulumi.set(self, "destination_id", value)
|
|
206
211
|
|
|
207
|
-
@property
|
|
212
|
+
@_builtins.property
|
|
208
213
|
@pulumi.getter
|
|
209
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
214
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
210
215
|
"""
|
|
211
216
|
The name of the channel.
|
|
212
217
|
"""
|
|
213
218
|
return pulumi.get(self, "name")
|
|
214
219
|
|
|
215
220
|
@name.setter
|
|
216
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
221
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
217
222
|
pulumi.set(self, "name", value)
|
|
218
223
|
|
|
219
|
-
@property
|
|
224
|
+
@_builtins.property
|
|
220
225
|
@pulumi.getter
|
|
221
|
-
def product(self) -> Optional[pulumi.Input[str]]:
|
|
226
|
+
def product(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
222
227
|
"""
|
|
223
228
|
The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
224
229
|
"""
|
|
225
230
|
return pulumi.get(self, "product")
|
|
226
231
|
|
|
227
232
|
@product.setter
|
|
228
|
-
def product(self, value: Optional[pulumi.Input[str]]):
|
|
233
|
+
def product(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
229
234
|
pulumi.set(self, "product", value)
|
|
230
235
|
|
|
231
|
-
@property
|
|
236
|
+
@_builtins.property
|
|
232
237
|
@pulumi.getter
|
|
233
238
|
def properties(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NotificationChannelPropertyArgs']]]]:
|
|
234
239
|
"""
|
|
@@ -240,43 +245,44 @@ class _NotificationChannelState:
|
|
|
240
245
|
def properties(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['NotificationChannelPropertyArgs']]]]):
|
|
241
246
|
pulumi.set(self, "properties", value)
|
|
242
247
|
|
|
243
|
-
@property
|
|
248
|
+
@_builtins.property
|
|
244
249
|
@pulumi.getter
|
|
245
|
-
def status(self) -> Optional[pulumi.Input[str]]:
|
|
250
|
+
def status(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
246
251
|
"""
|
|
247
252
|
The status of the channel.
|
|
248
253
|
"""
|
|
249
254
|
return pulumi.get(self, "status")
|
|
250
255
|
|
|
251
256
|
@status.setter
|
|
252
|
-
def status(self, value: Optional[pulumi.Input[str]]):
|
|
257
|
+
def status(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
253
258
|
pulumi.set(self, "status", value)
|
|
254
259
|
|
|
255
|
-
@property
|
|
260
|
+
@_builtins.property
|
|
256
261
|
@pulumi.getter
|
|
257
|
-
def type(self) -> Optional[pulumi.Input[str]]:
|
|
262
|
+
def type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
258
263
|
"""
|
|
259
|
-
The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `
|
|
264
|
+
The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION`, `PAGERDUTY_SERVICE_INTEGRATION`, `MICROSOFT_TEAMS` or `WORKFLOW_AUTOMATION`.
|
|
260
265
|
"""
|
|
261
266
|
return pulumi.get(self, "type")
|
|
262
267
|
|
|
263
268
|
@type.setter
|
|
264
|
-
def type(self, value: Optional[pulumi.Input[str]]):
|
|
269
|
+
def type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
265
270
|
pulumi.set(self, "type", value)
|
|
266
271
|
|
|
267
272
|
|
|
273
|
+
@pulumi.type_token("newrelic:index/notificationChannel:NotificationChannel")
|
|
268
274
|
class NotificationChannel(pulumi.CustomResource):
|
|
269
275
|
@overload
|
|
270
276
|
def __init__(__self__,
|
|
271
277
|
resource_name: str,
|
|
272
278
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
273
|
-
account_id: Optional[pulumi.Input[
|
|
274
|
-
active: Optional[pulumi.Input[bool]] = None,
|
|
275
|
-
destination_id: Optional[pulumi.Input[str]] = None,
|
|
276
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
277
|
-
product: Optional[pulumi.Input[str]] = None,
|
|
278
|
-
properties: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
279
|
-
type: Optional[pulumi.Input[str]] = None,
|
|
279
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
280
|
+
active: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
281
|
+
destination_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
282
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
283
|
+
product: Optional[pulumi.Input[_builtins.str]] = None,
|
|
284
|
+
properties: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NotificationChannelPropertyArgs', 'NotificationChannelPropertyArgsDict']]]]] = None,
|
|
285
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
280
286
|
__props__=None):
|
|
281
287
|
"""
|
|
282
288
|
Use this resource to create and manage New Relic notification channels. Details regarding supported products and permissions can be found [here](https://docs.newrelic.com/docs/alerts-applied-intelligence/notifications/destinations).
|
|
@@ -286,23 +292,22 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
286
292
|
## Example Usage
|
|
287
293
|
|
|
288
294
|
##### [Webhook](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#webhook)
|
|
289
|
-
<!--Start PulumiCodeChooser -->
|
|
290
295
|
```python
|
|
291
296
|
import pulumi
|
|
292
297
|
import pulumi_newrelic as newrelic
|
|
293
298
|
|
|
294
299
|
foo = newrelic.NotificationChannel("foo",
|
|
295
|
-
account_id=12345678,
|
|
300
|
+
account_id="12345678",
|
|
301
|
+
name="webhook-example",
|
|
302
|
+
type="WEBHOOK",
|
|
296
303
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
297
304
|
product="IINT",
|
|
298
|
-
properties=[
|
|
299
|
-
key
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
)
|
|
303
|
-
type="WEBHOOK")
|
|
305
|
+
properties=[{
|
|
306
|
+
"key": "payload",
|
|
307
|
+
"value": "name: {{ foo }}",
|
|
308
|
+
"label": "Payload Template",
|
|
309
|
+
}])
|
|
304
310
|
```
|
|
305
|
-
<!--End PulumiCodeChooser -->
|
|
306
311
|
See additional examples.
|
|
307
312
|
|
|
308
313
|
## Additional Examples
|
|
@@ -312,231 +317,262 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
312
317
|
##### [ServiceNow](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenow)
|
|
313
318
|
To see the properties’ keys for your account, check ServiceNow incidents table.
|
|
314
319
|
|
|
315
|
-
<!--Start PulumiCodeChooser -->
|
|
316
320
|
```python
|
|
317
321
|
import pulumi
|
|
318
322
|
import pulumi_newrelic as newrelic
|
|
319
323
|
|
|
320
324
|
foo = newrelic.NotificationChannel("foo",
|
|
321
|
-
account_id=12345678,
|
|
325
|
+
account_id="12345678",
|
|
326
|
+
name="servicenow-incident-example",
|
|
327
|
+
type="SERVICENOW_INCIDENTS",
|
|
322
328
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
323
329
|
product="IINT",
|
|
324
330
|
properties=[
|
|
325
|
-
|
|
326
|
-
key
|
|
327
|
-
value
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
key
|
|
331
|
-
value
|
|
332
|
-
|
|
333
|
-
]
|
|
334
|
-
|
|
331
|
+
{
|
|
332
|
+
"key": "description",
|
|
333
|
+
"value": "General description",
|
|
334
|
+
},
|
|
335
|
+
{
|
|
336
|
+
"key": "short_description",
|
|
337
|
+
"value": "Short description",
|
|
338
|
+
},
|
|
339
|
+
])
|
|
340
|
+
```
|
|
341
|
+
##### [ServiceNowApp](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenowapp)
|
|
342
|
+
```python
|
|
343
|
+
import pulumi
|
|
344
|
+
import pulumi_newrelic as newrelic
|
|
345
|
+
|
|
346
|
+
foo = newrelic.NotificationChannel("foo",
|
|
347
|
+
account_id="12345678",
|
|
348
|
+
name="servicenow-app-example",
|
|
349
|
+
type="SERVICE_NOW_APP",
|
|
350
|
+
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
351
|
+
product="IINT")
|
|
335
352
|
```
|
|
336
|
-
<!--End PulumiCodeChooser -->
|
|
337
353
|
|
|
338
354
|
##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
|
|
339
|
-
<!--Start PulumiCodeChooser -->
|
|
340
355
|
```python
|
|
341
356
|
import pulumi
|
|
342
357
|
import pulumi_newrelic as newrelic
|
|
343
358
|
|
|
344
359
|
foo = newrelic.NotificationChannel("foo",
|
|
345
|
-
account_id=12345678,
|
|
360
|
+
account_id="12345678",
|
|
361
|
+
name="email-example",
|
|
362
|
+
type="EMAIL",
|
|
346
363
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
347
364
|
product="IINT",
|
|
348
365
|
properties=[
|
|
349
|
-
|
|
350
|
-
key
|
|
351
|
-
value
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
key
|
|
355
|
-
value
|
|
356
|
-
|
|
357
|
-
]
|
|
358
|
-
type="EMAIL")
|
|
366
|
+
{
|
|
367
|
+
"key": "subject",
|
|
368
|
+
"value": "New Subject Title",
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"key": "customDetailsEmail",
|
|
372
|
+
"value": "issue id - {{issueId}}",
|
|
373
|
+
},
|
|
374
|
+
])
|
|
359
375
|
```
|
|
360
|
-
<!--End PulumiCodeChooser -->
|
|
361
376
|
|
|
362
377
|
##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
|
|
363
|
-
<!--Start PulumiCodeChooser -->
|
|
364
378
|
```python
|
|
365
379
|
import pulumi
|
|
366
380
|
import pulumi_newrelic as newrelic
|
|
367
381
|
|
|
368
382
|
foo = newrelic.NotificationChannel("foo",
|
|
369
|
-
account_id=12345678,
|
|
383
|
+
account_id="12345678",
|
|
384
|
+
name="jira-example",
|
|
385
|
+
type="JIRA_CLASSIC",
|
|
370
386
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
371
387
|
product="ERROR_TRACKING",
|
|
372
388
|
properties=[
|
|
373
|
-
|
|
374
|
-
key
|
|
375
|
-
value
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
389
|
+
{
|
|
390
|
+
"key": "project",
|
|
391
|
+
"value": "10000",
|
|
392
|
+
"label": "Project-Name",
|
|
393
|
+
},
|
|
394
|
+
{
|
|
395
|
+
"key": "issuetype",
|
|
396
|
+
"value": "10004",
|
|
397
|
+
"label": "Bug",
|
|
398
|
+
},
|
|
399
|
+
{
|
|
400
|
+
"key": "description",
|
|
401
|
+
"value": "Issue ID: {{ issueId }}",
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
"key": "summary",
|
|
405
|
+
"value": "{{ annotations.title.[0] }}",
|
|
406
|
+
},
|
|
407
|
+
])
|
|
391
408
|
```
|
|
392
|
-
<!--End PulumiCodeChooser -->
|
|
393
409
|
|
|
394
410
|
##### [PagerDuty with account integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
395
|
-
<!--Start PulumiCodeChooser -->
|
|
396
411
|
```python
|
|
397
412
|
import pulumi
|
|
398
413
|
import pulumi_newrelic as newrelic
|
|
399
414
|
|
|
400
415
|
foo = newrelic.NotificationChannel("foo",
|
|
401
|
-
account_id=12345678,
|
|
416
|
+
account_id="12345678",
|
|
417
|
+
name="pagerduty-account-example",
|
|
418
|
+
type="PAGERDUTY_ACCOUNT_INTEGRATION",
|
|
402
419
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
403
420
|
product="IINT",
|
|
404
421
|
properties=[
|
|
405
|
-
|
|
406
|
-
key
|
|
407
|
-
value
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
key
|
|
411
|
-
label
|
|
412
|
-
value
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
key
|
|
416
|
-
value
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
key
|
|
420
|
-
value
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
422
|
+
{
|
|
423
|
+
"key": "summary",
|
|
424
|
+
"value": "General summary",
|
|
425
|
+
},
|
|
426
|
+
{
|
|
427
|
+
"key": "service",
|
|
428
|
+
"label": "Service Name",
|
|
429
|
+
"value": "PTQK3FM",
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"key": "email",
|
|
433
|
+
"value": "example@email.com",
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
"key": "customDetails",
|
|
437
|
+
"value": \"\"\"{
|
|
438
|
+
\\"id\\":{{json issueId}},
|
|
439
|
+
\\"IssueURL\\":{{json issuePageUrl}},
|
|
440
|
+
\\"NewRelic priority\\":{{json priority}},
|
|
441
|
+
\\"Total Incidents\\":{{json totalIncidents}},
|
|
442
|
+
\\"Impacted Entities\\":\\"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
443
|
+
\\"Runbook\\":\\"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
444
|
+
\\"Description\\":\\"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
445
|
+
\\"isCorrelated\\":{{json isCorrelated}},
|
|
446
|
+
\\"Alert Policy Names\\":\\"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
447
|
+
\\"Alert Condition Names\\":\\"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
448
|
+
\\"Workflow Name\\":{{json workflowName}}
|
|
449
|
+
}
|
|
434
450
|
\"\"\",
|
|
435
|
-
|
|
436
|
-
]
|
|
437
|
-
type="PAGERDUTY_ACCOUNT_INTEGRATION")
|
|
451
|
+
},
|
|
452
|
+
])
|
|
438
453
|
```
|
|
439
|
-
<!--End PulumiCodeChooser -->
|
|
440
454
|
|
|
441
455
|
##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
442
|
-
<!--Start PulumiCodeChooser -->
|
|
443
456
|
```python
|
|
444
457
|
import pulumi
|
|
445
458
|
import pulumi_newrelic as newrelic
|
|
446
459
|
|
|
447
460
|
foo = newrelic.NotificationChannel("foo",
|
|
448
|
-
account_id=12345678,
|
|
461
|
+
account_id="12345678",
|
|
462
|
+
name="pagerduty-account-example",
|
|
463
|
+
type="PAGERDUTY_SERVICE_INTEGRATION",
|
|
449
464
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
450
465
|
product="IINT",
|
|
451
466
|
properties=[
|
|
452
|
-
|
|
453
|
-
key
|
|
454
|
-
value
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
key
|
|
458
|
-
value
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
467
|
+
{
|
|
468
|
+
"key": "summary",
|
|
469
|
+
"value": "General summary",
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
"key": "customDetails",
|
|
473
|
+
"value": \"\"\"{
|
|
474
|
+
\\"id\\":{{json issueId}},
|
|
475
|
+
\\"IssueURL\\":{{json issuePageUrl}},
|
|
476
|
+
\\"NewRelic priority\\":{{json priority}},
|
|
477
|
+
\\"Total Incidents\\":{{json totalIncidents}},
|
|
478
|
+
\\"Impacted Entities\\":\\"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
479
|
+
\\"Runbook\\":\\"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
480
|
+
\\"Description\\":\\"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
481
|
+
\\"isCorrelated\\":{{json isCorrelated}},
|
|
482
|
+
\\"Alert Policy Names\\":\\"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
483
|
+
\\"Alert Condition Names\\":\\"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
484
|
+
\\"Workflow Name\\":{{json workflowName}}
|
|
485
|
+
}
|
|
472
486
|
\"\"\",
|
|
473
|
-
|
|
474
|
-
]
|
|
475
|
-
type="PAGERDUTY_SERVICE_INTEGRATION")
|
|
487
|
+
},
|
|
488
|
+
])
|
|
476
489
|
```
|
|
477
|
-
<!--End PulumiCodeChooser -->
|
|
478
490
|
|
|
479
491
|
#### Mobile Push
|
|
480
|
-
<!--Start PulumiCodeChooser -->
|
|
481
492
|
```python
|
|
482
493
|
import pulumi
|
|
483
494
|
import pulumi_newrelic as newrelic
|
|
484
495
|
|
|
485
496
|
foo = newrelic.NotificationChannel("foo",
|
|
486
|
-
account_id=12345678,
|
|
497
|
+
account_id="12345678",
|
|
498
|
+
name="mobile-push-example",
|
|
499
|
+
type="MOBILE_PUSH",
|
|
487
500
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
488
|
-
product="IINT"
|
|
489
|
-
type="MOBILE_PUSH")
|
|
501
|
+
product="IINT")
|
|
490
502
|
```
|
|
491
|
-
<!--End PulumiCodeChooser -->
|
|
492
503
|
|
|
493
504
|
#### [AWS Event Bridge](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#eventBridge)
|
|
494
|
-
<!--Start PulumiCodeChooser -->
|
|
495
505
|
```python
|
|
496
506
|
import pulumi
|
|
497
507
|
import pulumi_newrelic as newrelic
|
|
498
508
|
|
|
499
509
|
foo = newrelic.NotificationChannel("foo",
|
|
500
|
-
account_id=12345678,
|
|
510
|
+
account_id="12345678",
|
|
511
|
+
name="event-bridge-example",
|
|
512
|
+
type="EVENT_BRIDGE",
|
|
501
513
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
502
514
|
product="IINT",
|
|
503
515
|
properties=[
|
|
504
|
-
|
|
505
|
-
key
|
|
506
|
-
value
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
key
|
|
510
|
-
value
|
|
511
|
-
|
|
512
|
-
]
|
|
513
|
-
type="EVENT_BRIDGE")
|
|
516
|
+
{
|
|
517
|
+
"key": "eventSource",
|
|
518
|
+
"value": "aws.partner/mydomain/myaccountid/name",
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
"key": "eventContent",
|
|
522
|
+
"value": "{ id: {{ json issueId }} }",
|
|
523
|
+
},
|
|
524
|
+
])
|
|
514
525
|
```
|
|
515
|
-
<!--End PulumiCodeChooser -->
|
|
516
526
|
|
|
517
527
|
#### [SLACK](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#slack)
|
|
518
|
-
<!--Start PulumiCodeChooser -->
|
|
519
528
|
```python
|
|
520
529
|
import pulumi
|
|
521
530
|
import pulumi_newrelic as newrelic
|
|
522
531
|
|
|
523
532
|
foo = newrelic.NotificationChannel("foo",
|
|
524
|
-
account_id=12345678,
|
|
533
|
+
account_id="12345678",
|
|
534
|
+
name="slack-example",
|
|
535
|
+
type="SLACK",
|
|
525
536
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
526
537
|
product="IINT",
|
|
527
538
|
properties=[
|
|
528
|
-
|
|
529
|
-
key
|
|
530
|
-
value
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
key
|
|
534
|
-
value
|
|
535
|
-
|
|
536
|
-
]
|
|
537
|
-
|
|
539
|
+
{
|
|
540
|
+
"key": "channelId",
|
|
541
|
+
"value": "123456",
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
"key": "customDetailsSlack",
|
|
545
|
+
"value": "issue id - {{issueId}}",
|
|
546
|
+
},
|
|
547
|
+
])
|
|
548
|
+
```
|
|
549
|
+
|
|
550
|
+
#### [MICROSOFT_TEAMS](https://docs.newrelic.com/docs/alerts/get-notified/microsoft-teams-integrations/)
|
|
551
|
+
```python
|
|
552
|
+
import pulumi
|
|
553
|
+
import pulumi_newrelic as newrelic
|
|
554
|
+
|
|
555
|
+
foo = newrelic.NotificationChannel("foo",
|
|
556
|
+
account_id="12345678",
|
|
557
|
+
name="ms-teams-example",
|
|
558
|
+
type="MICROSOFT_TEAMS",
|
|
559
|
+
destination_id="52d36b54-3d68-4ac4-9d0a-581febb91f2c",
|
|
560
|
+
product="IINT",
|
|
561
|
+
properties=[
|
|
562
|
+
{
|
|
563
|
+
"key": "teamId",
|
|
564
|
+
"value": "906379b4-f5ac-40fd-b242-d4faaa4d3963",
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
"key": "channelId",
|
|
568
|
+
"value": "19:wk9tU4tSr335Y1cNiXOynredbi3lFoeabu0kybfmbBA1@thread.tacv2",
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"key": "customDetails",
|
|
572
|
+
"value": "{{ nrAccountId }}",
|
|
573
|
+
},
|
|
574
|
+
])
|
|
538
575
|
```
|
|
539
|
-
<!--End PulumiCodeChooser -->
|
|
540
576
|
|
|
541
577
|
> **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
578
|
|
|
@@ -545,49 +581,51 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
545
581
|
Create a destination resource and reference that destination to the channel resource:
|
|
546
582
|
|
|
547
583
|
### Create a destination
|
|
548
|
-
<!--Start PulumiCodeChooser -->
|
|
549
584
|
```python
|
|
550
585
|
import pulumi
|
|
551
586
|
import pulumi_newrelic as newrelic
|
|
552
587
|
|
|
553
588
|
webhook_destination = newrelic.NotificationDestination("webhook-destination",
|
|
554
|
-
account_id=12345678,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
589
|
+
account_id="12345678",
|
|
590
|
+
name="destination-webhook",
|
|
591
|
+
type="WEBHOOK",
|
|
592
|
+
properties=[{
|
|
593
|
+
"key": "url",
|
|
594
|
+
"value": "https://webhook.mywebhook.com",
|
|
595
|
+
}],
|
|
596
|
+
auth_basic={
|
|
597
|
+
"user": "username",
|
|
598
|
+
"password": "password",
|
|
599
|
+
})
|
|
564
600
|
```
|
|
565
|
-
<!--End PulumiCodeChooser -->
|
|
566
601
|
|
|
567
602
|
### Create a channel
|
|
568
|
-
<!--Start PulumiCodeChooser -->
|
|
569
603
|
```python
|
|
570
604
|
import pulumi
|
|
571
605
|
import pulumi_newrelic as newrelic
|
|
572
606
|
|
|
573
607
|
webhook_channel = newrelic.NotificationChannel("webhook-channel",
|
|
574
|
-
account_id=12345678,
|
|
608
|
+
account_id="12345678",
|
|
609
|
+
name="channel-webhook",
|
|
575
610
|
type="WEBHOOK",
|
|
576
|
-
destination_id=
|
|
611
|
+
destination_id=webhook_destination["id"],
|
|
577
612
|
product="IINT",
|
|
578
|
-
properties=[
|
|
579
|
-
key
|
|
580
|
-
value
|
|
581
|
-
label
|
|
582
|
-
|
|
613
|
+
properties=[{
|
|
614
|
+
"key": "payload",
|
|
615
|
+
"value": "{name: foo}",
|
|
616
|
+
"label": "Payload Template",
|
|
617
|
+
}])
|
|
583
618
|
```
|
|
584
|
-
<!--End PulumiCodeChooser -->
|
|
585
619
|
|
|
586
620
|
## Additional Information
|
|
587
621
|
|
|
588
622
|
More details about the channels API can be found [here](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels).
|
|
623
|
+
### Moving from Legacy Alert Channels to Notification Channels
|
|
624
|
+
As described in the documentation of this resource, channels can be created and managed using `NotificationDestination` and `NotificationChannel`. A combination of these resources is an alternative to the legacy resource `AlertChannel`, which is **deprecated** and will be **removed in a future major release**, as stated in the documentation of the resource.
|
|
625
|
+
|
|
626
|
+
If you're currently using `AlertChannel` to manage channels, we **strongly recommend** migrating to these notifications-based resources at the earliest.
|
|
589
627
|
|
|
590
|
-
|
|
628
|
+
Please refer to the examples in this page, or this example for illustrations on setting up channels with these resources.
|
|
591
629
|
|
|
592
630
|
## Import
|
|
593
631
|
|
|
@@ -603,13 +641,13 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
603
641
|
|
|
604
642
|
:param str resource_name: The name of the resource.
|
|
605
643
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
606
|
-
:param pulumi.Input[
|
|
607
|
-
:param pulumi.Input[bool] active: Indicates whether the channel is active.
|
|
608
|
-
:param pulumi.Input[str] destination_id: The id of the destination.
|
|
609
|
-
:param pulumi.Input[str] name: The name of the channel.
|
|
610
|
-
:param pulumi.Input[str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
611
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
612
|
-
:param pulumi.Input[str] type: The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `
|
|
644
|
+
:param pulumi.Input[_builtins.str] account_id: Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
|
|
645
|
+
:param pulumi.Input[_builtins.bool] active: Indicates whether the channel is active.
|
|
646
|
+
:param pulumi.Input[_builtins.str] destination_id: The id of the destination.
|
|
647
|
+
:param pulumi.Input[_builtins.str] name: The name of the channel.
|
|
648
|
+
:param pulumi.Input[_builtins.str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
649
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['NotificationChannelPropertyArgs', 'NotificationChannelPropertyArgsDict']]]] properties: A nested block that describes a notification channel property. See Nested property blocks below for details.
|
|
650
|
+
:param pulumi.Input[_builtins.str] type: The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION`, `PAGERDUTY_SERVICE_INTEGRATION`, `MICROSOFT_TEAMS` or `WORKFLOW_AUTOMATION`.
|
|
613
651
|
"""
|
|
614
652
|
...
|
|
615
653
|
@overload
|
|
@@ -625,23 +663,22 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
625
663
|
## Example Usage
|
|
626
664
|
|
|
627
665
|
##### [Webhook](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#webhook)
|
|
628
|
-
<!--Start PulumiCodeChooser -->
|
|
629
666
|
```python
|
|
630
667
|
import pulumi
|
|
631
668
|
import pulumi_newrelic as newrelic
|
|
632
669
|
|
|
633
670
|
foo = newrelic.NotificationChannel("foo",
|
|
634
|
-
account_id=12345678,
|
|
671
|
+
account_id="12345678",
|
|
672
|
+
name="webhook-example",
|
|
673
|
+
type="WEBHOOK",
|
|
635
674
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
636
675
|
product="IINT",
|
|
637
|
-
properties=[
|
|
638
|
-
key
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
)
|
|
642
|
-
type="WEBHOOK")
|
|
676
|
+
properties=[{
|
|
677
|
+
"key": "payload",
|
|
678
|
+
"value": "name: {{ foo }}",
|
|
679
|
+
"label": "Payload Template",
|
|
680
|
+
}])
|
|
643
681
|
```
|
|
644
|
-
<!--End PulumiCodeChooser -->
|
|
645
682
|
See additional examples.
|
|
646
683
|
|
|
647
684
|
## Additional Examples
|
|
@@ -651,231 +688,262 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
651
688
|
##### [ServiceNow](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenow)
|
|
652
689
|
To see the properties’ keys for your account, check ServiceNow incidents table.
|
|
653
690
|
|
|
654
|
-
<!--Start PulumiCodeChooser -->
|
|
655
691
|
```python
|
|
656
692
|
import pulumi
|
|
657
693
|
import pulumi_newrelic as newrelic
|
|
658
694
|
|
|
659
695
|
foo = newrelic.NotificationChannel("foo",
|
|
660
|
-
account_id=12345678,
|
|
696
|
+
account_id="12345678",
|
|
697
|
+
name="servicenow-incident-example",
|
|
698
|
+
type="SERVICENOW_INCIDENTS",
|
|
661
699
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
662
700
|
product="IINT",
|
|
663
701
|
properties=[
|
|
664
|
-
|
|
665
|
-
key
|
|
666
|
-
value
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
key
|
|
670
|
-
value
|
|
671
|
-
|
|
672
|
-
]
|
|
673
|
-
|
|
702
|
+
{
|
|
703
|
+
"key": "description",
|
|
704
|
+
"value": "General description",
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
"key": "short_description",
|
|
708
|
+
"value": "Short description",
|
|
709
|
+
},
|
|
710
|
+
])
|
|
711
|
+
```
|
|
712
|
+
##### [ServiceNowApp](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#servicenowapp)
|
|
713
|
+
```python
|
|
714
|
+
import pulumi
|
|
715
|
+
import pulumi_newrelic as newrelic
|
|
716
|
+
|
|
717
|
+
foo = newrelic.NotificationChannel("foo",
|
|
718
|
+
account_id="12345678",
|
|
719
|
+
name="servicenow-app-example",
|
|
720
|
+
type="SERVICE_NOW_APP",
|
|
721
|
+
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
722
|
+
product="IINT")
|
|
674
723
|
```
|
|
675
|
-
<!--End PulumiCodeChooser -->
|
|
676
724
|
|
|
677
725
|
##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
|
|
678
|
-
<!--Start PulumiCodeChooser -->
|
|
679
726
|
```python
|
|
680
727
|
import pulumi
|
|
681
728
|
import pulumi_newrelic as newrelic
|
|
682
729
|
|
|
683
730
|
foo = newrelic.NotificationChannel("foo",
|
|
684
|
-
account_id=12345678,
|
|
731
|
+
account_id="12345678",
|
|
732
|
+
name="email-example",
|
|
733
|
+
type="EMAIL",
|
|
685
734
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
686
735
|
product="IINT",
|
|
687
736
|
properties=[
|
|
688
|
-
|
|
689
|
-
key
|
|
690
|
-
value
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
key
|
|
694
|
-
value
|
|
695
|
-
|
|
696
|
-
]
|
|
697
|
-
type="EMAIL")
|
|
737
|
+
{
|
|
738
|
+
"key": "subject",
|
|
739
|
+
"value": "New Subject Title",
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"key": "customDetailsEmail",
|
|
743
|
+
"value": "issue id - {{issueId}}",
|
|
744
|
+
},
|
|
745
|
+
])
|
|
698
746
|
```
|
|
699
|
-
<!--End PulumiCodeChooser -->
|
|
700
747
|
|
|
701
748
|
##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
|
|
702
|
-
<!--Start PulumiCodeChooser -->
|
|
703
749
|
```python
|
|
704
750
|
import pulumi
|
|
705
751
|
import pulumi_newrelic as newrelic
|
|
706
752
|
|
|
707
753
|
foo = newrelic.NotificationChannel("foo",
|
|
708
|
-
account_id=12345678,
|
|
754
|
+
account_id="12345678",
|
|
755
|
+
name="jira-example",
|
|
756
|
+
type="JIRA_CLASSIC",
|
|
709
757
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
710
758
|
product="ERROR_TRACKING",
|
|
711
759
|
properties=[
|
|
712
|
-
|
|
713
|
-
key
|
|
714
|
-
value
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
760
|
+
{
|
|
761
|
+
"key": "project",
|
|
762
|
+
"value": "10000",
|
|
763
|
+
"label": "Project-Name",
|
|
764
|
+
},
|
|
765
|
+
{
|
|
766
|
+
"key": "issuetype",
|
|
767
|
+
"value": "10004",
|
|
768
|
+
"label": "Bug",
|
|
769
|
+
},
|
|
770
|
+
{
|
|
771
|
+
"key": "description",
|
|
772
|
+
"value": "Issue ID: {{ issueId }}",
|
|
773
|
+
},
|
|
774
|
+
{
|
|
775
|
+
"key": "summary",
|
|
776
|
+
"value": "{{ annotations.title.[0] }}",
|
|
777
|
+
},
|
|
778
|
+
])
|
|
730
779
|
```
|
|
731
|
-
<!--End PulumiCodeChooser -->
|
|
732
780
|
|
|
733
781
|
##### [PagerDuty with account integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
734
|
-
<!--Start PulumiCodeChooser -->
|
|
735
782
|
```python
|
|
736
783
|
import pulumi
|
|
737
784
|
import pulumi_newrelic as newrelic
|
|
738
785
|
|
|
739
786
|
foo = newrelic.NotificationChannel("foo",
|
|
740
|
-
account_id=12345678,
|
|
787
|
+
account_id="12345678",
|
|
788
|
+
name="pagerduty-account-example",
|
|
789
|
+
type="PAGERDUTY_ACCOUNT_INTEGRATION",
|
|
741
790
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
742
791
|
product="IINT",
|
|
743
792
|
properties=[
|
|
744
|
-
|
|
745
|
-
key
|
|
746
|
-
value
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
key
|
|
750
|
-
label
|
|
751
|
-
value
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
key
|
|
755
|
-
value
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
key
|
|
759
|
-
value
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
793
|
+
{
|
|
794
|
+
"key": "summary",
|
|
795
|
+
"value": "General summary",
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"key": "service",
|
|
799
|
+
"label": "Service Name",
|
|
800
|
+
"value": "PTQK3FM",
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"key": "email",
|
|
804
|
+
"value": "example@email.com",
|
|
805
|
+
},
|
|
806
|
+
{
|
|
807
|
+
"key": "customDetails",
|
|
808
|
+
"value": \"\"\"{
|
|
809
|
+
\\"id\\":{{json issueId}},
|
|
810
|
+
\\"IssueURL\\":{{json issuePageUrl}},
|
|
811
|
+
\\"NewRelic priority\\":{{json priority}},
|
|
812
|
+
\\"Total Incidents\\":{{json totalIncidents}},
|
|
813
|
+
\\"Impacted Entities\\":\\"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
814
|
+
\\"Runbook\\":\\"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
815
|
+
\\"Description\\":\\"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
816
|
+
\\"isCorrelated\\":{{json isCorrelated}},
|
|
817
|
+
\\"Alert Policy Names\\":\\"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
818
|
+
\\"Alert Condition Names\\":\\"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
819
|
+
\\"Workflow Name\\":{{json workflowName}}
|
|
820
|
+
}
|
|
773
821
|
\"\"\",
|
|
774
|
-
|
|
775
|
-
]
|
|
776
|
-
type="PAGERDUTY_ACCOUNT_INTEGRATION")
|
|
822
|
+
},
|
|
823
|
+
])
|
|
777
824
|
```
|
|
778
|
-
<!--End PulumiCodeChooser -->
|
|
779
825
|
|
|
780
826
|
##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
781
|
-
<!--Start PulumiCodeChooser -->
|
|
782
827
|
```python
|
|
783
828
|
import pulumi
|
|
784
829
|
import pulumi_newrelic as newrelic
|
|
785
830
|
|
|
786
831
|
foo = newrelic.NotificationChannel("foo",
|
|
787
|
-
account_id=12345678,
|
|
832
|
+
account_id="12345678",
|
|
833
|
+
name="pagerduty-account-example",
|
|
834
|
+
type="PAGERDUTY_SERVICE_INTEGRATION",
|
|
788
835
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
789
836
|
product="IINT",
|
|
790
837
|
properties=[
|
|
791
|
-
|
|
792
|
-
key
|
|
793
|
-
value
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
key
|
|
797
|
-
value
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
838
|
+
{
|
|
839
|
+
"key": "summary",
|
|
840
|
+
"value": "General summary",
|
|
841
|
+
},
|
|
842
|
+
{
|
|
843
|
+
"key": "customDetails",
|
|
844
|
+
"value": \"\"\"{
|
|
845
|
+
\\"id\\":{{json issueId}},
|
|
846
|
+
\\"IssueURL\\":{{json issuePageUrl}},
|
|
847
|
+
\\"NewRelic priority\\":{{json priority}},
|
|
848
|
+
\\"Total Incidents\\":{{json totalIncidents}},
|
|
849
|
+
\\"Impacted Entities\\":\\"{{#each entitiesData.names}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
850
|
+
\\"Runbook\\":\\"{{#each accumulations.runbookUrl}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
851
|
+
\\"Description\\":\\"{{#each annotations.description}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
852
|
+
\\"isCorrelated\\":{{json isCorrelated}},
|
|
853
|
+
\\"Alert Policy Names\\":\\"{{#each accumulations.policyName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
854
|
+
\\"Alert Condition Names\\":\\"{{#each accumulations.conditionName}}{{this}}{{#unless @last}}, {{/unless}}{{/each}}\\",
|
|
855
|
+
\\"Workflow Name\\":{{json workflowName}}
|
|
856
|
+
}
|
|
811
857
|
\"\"\",
|
|
812
|
-
|
|
813
|
-
]
|
|
814
|
-
type="PAGERDUTY_SERVICE_INTEGRATION")
|
|
858
|
+
},
|
|
859
|
+
])
|
|
815
860
|
```
|
|
816
|
-
<!--End PulumiCodeChooser -->
|
|
817
861
|
|
|
818
862
|
#### Mobile Push
|
|
819
|
-
<!--Start PulumiCodeChooser -->
|
|
820
863
|
```python
|
|
821
864
|
import pulumi
|
|
822
865
|
import pulumi_newrelic as newrelic
|
|
823
866
|
|
|
824
867
|
foo = newrelic.NotificationChannel("foo",
|
|
825
|
-
account_id=12345678,
|
|
868
|
+
account_id="12345678",
|
|
869
|
+
name="mobile-push-example",
|
|
870
|
+
type="MOBILE_PUSH",
|
|
826
871
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
827
|
-
product="IINT"
|
|
828
|
-
type="MOBILE_PUSH")
|
|
872
|
+
product="IINT")
|
|
829
873
|
```
|
|
830
|
-
<!--End PulumiCodeChooser -->
|
|
831
874
|
|
|
832
875
|
#### [AWS Event Bridge](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#eventBridge)
|
|
833
|
-
<!--Start PulumiCodeChooser -->
|
|
834
876
|
```python
|
|
835
877
|
import pulumi
|
|
836
878
|
import pulumi_newrelic as newrelic
|
|
837
879
|
|
|
838
880
|
foo = newrelic.NotificationChannel("foo",
|
|
839
|
-
account_id=12345678,
|
|
881
|
+
account_id="12345678",
|
|
882
|
+
name="event-bridge-example",
|
|
883
|
+
type="EVENT_BRIDGE",
|
|
840
884
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
841
885
|
product="IINT",
|
|
842
886
|
properties=[
|
|
843
|
-
|
|
844
|
-
key
|
|
845
|
-
value
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
key
|
|
849
|
-
value
|
|
850
|
-
|
|
851
|
-
]
|
|
852
|
-
type="EVENT_BRIDGE")
|
|
887
|
+
{
|
|
888
|
+
"key": "eventSource",
|
|
889
|
+
"value": "aws.partner/mydomain/myaccountid/name",
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"key": "eventContent",
|
|
893
|
+
"value": "{ id: {{ json issueId }} }",
|
|
894
|
+
},
|
|
895
|
+
])
|
|
853
896
|
```
|
|
854
|
-
<!--End PulumiCodeChooser -->
|
|
855
897
|
|
|
856
898
|
#### [SLACK](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#slack)
|
|
857
|
-
<!--Start PulumiCodeChooser -->
|
|
858
899
|
```python
|
|
859
900
|
import pulumi
|
|
860
901
|
import pulumi_newrelic as newrelic
|
|
861
902
|
|
|
862
903
|
foo = newrelic.NotificationChannel("foo",
|
|
863
|
-
account_id=12345678,
|
|
904
|
+
account_id="12345678",
|
|
905
|
+
name="slack-example",
|
|
906
|
+
type="SLACK",
|
|
864
907
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
865
908
|
product="IINT",
|
|
866
909
|
properties=[
|
|
867
|
-
|
|
868
|
-
key
|
|
869
|
-
value
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
key
|
|
873
|
-
value
|
|
874
|
-
|
|
875
|
-
]
|
|
876
|
-
|
|
910
|
+
{
|
|
911
|
+
"key": "channelId",
|
|
912
|
+
"value": "123456",
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
"key": "customDetailsSlack",
|
|
916
|
+
"value": "issue id - {{issueId}}",
|
|
917
|
+
},
|
|
918
|
+
])
|
|
919
|
+
```
|
|
920
|
+
|
|
921
|
+
#### [MICROSOFT_TEAMS](https://docs.newrelic.com/docs/alerts/get-notified/microsoft-teams-integrations/)
|
|
922
|
+
```python
|
|
923
|
+
import pulumi
|
|
924
|
+
import pulumi_newrelic as newrelic
|
|
925
|
+
|
|
926
|
+
foo = newrelic.NotificationChannel("foo",
|
|
927
|
+
account_id="12345678",
|
|
928
|
+
name="ms-teams-example",
|
|
929
|
+
type="MICROSOFT_TEAMS",
|
|
930
|
+
destination_id="52d36b54-3d68-4ac4-9d0a-581febb91f2c",
|
|
931
|
+
product="IINT",
|
|
932
|
+
properties=[
|
|
933
|
+
{
|
|
934
|
+
"key": "teamId",
|
|
935
|
+
"value": "906379b4-f5ac-40fd-b242-d4faaa4d3963",
|
|
936
|
+
},
|
|
937
|
+
{
|
|
938
|
+
"key": "channelId",
|
|
939
|
+
"value": "19:wk9tU4tSr335Y1cNiXOynredbi3lFoeabu0kybfmbBA1@thread.tacv2",
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
"key": "customDetails",
|
|
943
|
+
"value": "{{ nrAccountId }}",
|
|
944
|
+
},
|
|
945
|
+
])
|
|
877
946
|
```
|
|
878
|
-
<!--End PulumiCodeChooser -->
|
|
879
947
|
|
|
880
948
|
> **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
949
|
|
|
@@ -884,49 +952,51 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
884
952
|
Create a destination resource and reference that destination to the channel resource:
|
|
885
953
|
|
|
886
954
|
### Create a destination
|
|
887
|
-
<!--Start PulumiCodeChooser -->
|
|
888
955
|
```python
|
|
889
956
|
import pulumi
|
|
890
957
|
import pulumi_newrelic as newrelic
|
|
891
958
|
|
|
892
959
|
webhook_destination = newrelic.NotificationDestination("webhook-destination",
|
|
893
|
-
account_id=12345678,
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
960
|
+
account_id="12345678",
|
|
961
|
+
name="destination-webhook",
|
|
962
|
+
type="WEBHOOK",
|
|
963
|
+
properties=[{
|
|
964
|
+
"key": "url",
|
|
965
|
+
"value": "https://webhook.mywebhook.com",
|
|
966
|
+
}],
|
|
967
|
+
auth_basic={
|
|
968
|
+
"user": "username",
|
|
969
|
+
"password": "password",
|
|
970
|
+
})
|
|
903
971
|
```
|
|
904
|
-
<!--End PulumiCodeChooser -->
|
|
905
972
|
|
|
906
973
|
### Create a channel
|
|
907
|
-
<!--Start PulumiCodeChooser -->
|
|
908
974
|
```python
|
|
909
975
|
import pulumi
|
|
910
976
|
import pulumi_newrelic as newrelic
|
|
911
977
|
|
|
912
978
|
webhook_channel = newrelic.NotificationChannel("webhook-channel",
|
|
913
|
-
account_id=12345678,
|
|
979
|
+
account_id="12345678",
|
|
980
|
+
name="channel-webhook",
|
|
914
981
|
type="WEBHOOK",
|
|
915
|
-
destination_id=
|
|
982
|
+
destination_id=webhook_destination["id"],
|
|
916
983
|
product="IINT",
|
|
917
|
-
properties=[
|
|
918
|
-
key
|
|
919
|
-
value
|
|
920
|
-
label
|
|
921
|
-
|
|
984
|
+
properties=[{
|
|
985
|
+
"key": "payload",
|
|
986
|
+
"value": "{name: foo}",
|
|
987
|
+
"label": "Payload Template",
|
|
988
|
+
}])
|
|
922
989
|
```
|
|
923
|
-
<!--End PulumiCodeChooser -->
|
|
924
990
|
|
|
925
991
|
## Additional Information
|
|
926
992
|
|
|
927
993
|
More details about the channels API can be found [here](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels).
|
|
994
|
+
### Moving from Legacy Alert Channels to Notification Channels
|
|
995
|
+
As described in the documentation of this resource, channels can be created and managed using `NotificationDestination` and `NotificationChannel`. A combination of these resources is an alternative to the legacy resource `AlertChannel`, which is **deprecated** and will be **removed in a future major release**, as stated in the documentation of the resource.
|
|
996
|
+
|
|
997
|
+
If you're currently using `AlertChannel` to manage channels, we **strongly recommend** migrating to these notifications-based resources at the earliest.
|
|
928
998
|
|
|
929
|
-
|
|
999
|
+
Please refer to the examples in this page, or this example for illustrations on setting up channels with these resources.
|
|
930
1000
|
|
|
931
1001
|
## Import
|
|
932
1002
|
|
|
@@ -955,13 +1025,13 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
955
1025
|
def _internal_init(__self__,
|
|
956
1026
|
resource_name: str,
|
|
957
1027
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
958
|
-
account_id: Optional[pulumi.Input[
|
|
959
|
-
active: Optional[pulumi.Input[bool]] = None,
|
|
960
|
-
destination_id: Optional[pulumi.Input[str]] = None,
|
|
961
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
962
|
-
product: Optional[pulumi.Input[str]] = None,
|
|
963
|
-
properties: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
964
|
-
type: Optional[pulumi.Input[str]] = None,
|
|
1028
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1029
|
+
active: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1030
|
+
destination_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1031
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1032
|
+
product: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1033
|
+
properties: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NotificationChannelPropertyArgs', 'NotificationChannelPropertyArgsDict']]]]] = None,
|
|
1034
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
965
1035
|
__props__=None):
|
|
966
1036
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
967
1037
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -997,14 +1067,14 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
997
1067
|
def get(resource_name: str,
|
|
998
1068
|
id: pulumi.Input[str],
|
|
999
1069
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
1000
|
-
account_id: Optional[pulumi.Input[
|
|
1001
|
-
active: Optional[pulumi.Input[bool]] = None,
|
|
1002
|
-
destination_id: Optional[pulumi.Input[str]] = None,
|
|
1003
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
1004
|
-
product: Optional[pulumi.Input[str]] = None,
|
|
1005
|
-
properties: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
1006
|
-
status: Optional[pulumi.Input[str]] = None,
|
|
1007
|
-
type: Optional[pulumi.Input[str]] = None) -> 'NotificationChannel':
|
|
1070
|
+
account_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1071
|
+
active: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
1072
|
+
destination_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1073
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1074
|
+
product: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1075
|
+
properties: Optional[pulumi.Input[Sequence[pulumi.Input[Union['NotificationChannelPropertyArgs', 'NotificationChannelPropertyArgsDict']]]]] = None,
|
|
1076
|
+
status: Optional[pulumi.Input[_builtins.str]] = None,
|
|
1077
|
+
type: Optional[pulumi.Input[_builtins.str]] = None) -> 'NotificationChannel':
|
|
1008
1078
|
"""
|
|
1009
1079
|
Get an existing NotificationChannel resource's state with the given name, id, and optional extra
|
|
1010
1080
|
properties used to qualify the lookup.
|
|
@@ -1012,14 +1082,14 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
1012
1082
|
:param str resource_name: The unique name of the resulting resource.
|
|
1013
1083
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
1014
1084
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
1015
|
-
:param pulumi.Input[
|
|
1016
|
-
:param pulumi.Input[bool] active: Indicates whether the channel is active.
|
|
1017
|
-
:param pulumi.Input[str] destination_id: The id of the destination.
|
|
1018
|
-
:param pulumi.Input[str] name: The name of the channel.
|
|
1019
|
-
:param pulumi.Input[str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
1020
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
1021
|
-
:param pulumi.Input[str] status: The status of the channel.
|
|
1022
|
-
:param pulumi.Input[str] type: The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `
|
|
1085
|
+
:param pulumi.Input[_builtins.str] account_id: Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
|
|
1086
|
+
:param pulumi.Input[_builtins.bool] active: Indicates whether the channel is active.
|
|
1087
|
+
:param pulumi.Input[_builtins.str] destination_id: The id of the destination.
|
|
1088
|
+
:param pulumi.Input[_builtins.str] name: The name of the channel.
|
|
1089
|
+
:param pulumi.Input[_builtins.str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
1090
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['NotificationChannelPropertyArgs', 'NotificationChannelPropertyArgsDict']]]] properties: A nested block that describes a notification channel property. See Nested property blocks below for details.
|
|
1091
|
+
:param pulumi.Input[_builtins.str] status: The status of the channel.
|
|
1092
|
+
:param pulumi.Input[_builtins.str] type: The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION`, `PAGERDUTY_SERVICE_INTEGRATION`, `MICROSOFT_TEAMS` or `WORKFLOW_AUTOMATION`.
|
|
1023
1093
|
"""
|
|
1024
1094
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
1025
1095
|
|
|
@@ -1035,47 +1105,47 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
1035
1105
|
__props__.__dict__["type"] = type
|
|
1036
1106
|
return NotificationChannel(resource_name, opts=opts, __props__=__props__)
|
|
1037
1107
|
|
|
1038
|
-
@property
|
|
1108
|
+
@_builtins.property
|
|
1039
1109
|
@pulumi.getter(name="accountId")
|
|
1040
|
-
def account_id(self) -> pulumi.Output[
|
|
1110
|
+
def account_id(self) -> pulumi.Output[_builtins.str]:
|
|
1041
1111
|
"""
|
|
1042
1112
|
Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
|
|
1043
1113
|
"""
|
|
1044
1114
|
return pulumi.get(self, "account_id")
|
|
1045
1115
|
|
|
1046
|
-
@property
|
|
1116
|
+
@_builtins.property
|
|
1047
1117
|
@pulumi.getter
|
|
1048
|
-
def active(self) -> pulumi.Output[Optional[bool]]:
|
|
1118
|
+
def active(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
1049
1119
|
"""
|
|
1050
1120
|
Indicates whether the channel is active.
|
|
1051
1121
|
"""
|
|
1052
1122
|
return pulumi.get(self, "active")
|
|
1053
1123
|
|
|
1054
|
-
@property
|
|
1124
|
+
@_builtins.property
|
|
1055
1125
|
@pulumi.getter(name="destinationId")
|
|
1056
|
-
def destination_id(self) -> pulumi.Output[str]:
|
|
1126
|
+
def destination_id(self) -> pulumi.Output[_builtins.str]:
|
|
1057
1127
|
"""
|
|
1058
1128
|
The id of the destination.
|
|
1059
1129
|
"""
|
|
1060
1130
|
return pulumi.get(self, "destination_id")
|
|
1061
1131
|
|
|
1062
|
-
@property
|
|
1132
|
+
@_builtins.property
|
|
1063
1133
|
@pulumi.getter
|
|
1064
|
-
def name(self) -> pulumi.Output[str]:
|
|
1134
|
+
def name(self) -> pulumi.Output[_builtins.str]:
|
|
1065
1135
|
"""
|
|
1066
1136
|
The name of the channel.
|
|
1067
1137
|
"""
|
|
1068
1138
|
return pulumi.get(self, "name")
|
|
1069
1139
|
|
|
1070
|
-
@property
|
|
1140
|
+
@_builtins.property
|
|
1071
1141
|
@pulumi.getter
|
|
1072
|
-
def product(self) -> pulumi.Output[str]:
|
|
1142
|
+
def product(self) -> pulumi.Output[_builtins.str]:
|
|
1073
1143
|
"""
|
|
1074
1144
|
The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
1075
1145
|
"""
|
|
1076
1146
|
return pulumi.get(self, "product")
|
|
1077
1147
|
|
|
1078
|
-
@property
|
|
1148
|
+
@_builtins.property
|
|
1079
1149
|
@pulumi.getter
|
|
1080
1150
|
def properties(self) -> pulumi.Output[Sequence['outputs.NotificationChannelProperty']]:
|
|
1081
1151
|
"""
|
|
@@ -1083,19 +1153,19 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
1083
1153
|
"""
|
|
1084
1154
|
return pulumi.get(self, "properties")
|
|
1085
1155
|
|
|
1086
|
-
@property
|
|
1156
|
+
@_builtins.property
|
|
1087
1157
|
@pulumi.getter
|
|
1088
|
-
def status(self) -> pulumi.Output[str]:
|
|
1158
|
+
def status(self) -> pulumi.Output[_builtins.str]:
|
|
1089
1159
|
"""
|
|
1090
1160
|
The status of the channel.
|
|
1091
1161
|
"""
|
|
1092
1162
|
return pulumi.get(self, "status")
|
|
1093
1163
|
|
|
1094
|
-
@property
|
|
1164
|
+
@_builtins.property
|
|
1095
1165
|
@pulumi.getter
|
|
1096
|
-
def type(self) -> pulumi.Output[str]:
|
|
1166
|
+
def type(self) -> pulumi.Output[_builtins.str]:
|
|
1097
1167
|
"""
|
|
1098
|
-
The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `
|
|
1168
|
+
The type of channel. One of: `EMAIL`, `SERVICENOW_INCIDENTS`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA_CLASSIC`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `SLACK` and `SLACK_COLLABORATION`, `PAGERDUTY_ACCOUNT_INTEGRATION`, `PAGERDUTY_SERVICE_INTEGRATION`, `MICROSOFT_TEAMS` or `WORKFLOW_AUTOMATION`.
|
|
1099
1169
|
"""
|
|
1100
1170
|
return pulumi.get(self, "type")
|
|
1101
1171
|
|