pulumi-newrelic 5.16.0a1698964311__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 +58 -1
- pulumi_newrelic/_inputs.py +10772 -2775
- pulumi_newrelic/_utilities.py +92 -11
- pulumi_newrelic/account_management.py +56 -42
- pulumi_newrelic/alert_channel.py +177 -151
- pulumi_newrelic/alert_condition.py +313 -301
- pulumi_newrelic/alert_muting_rule.py +195 -138
- pulumi_newrelic/alert_policy.py +157 -109
- pulumi_newrelic/alert_policy_channel.py +95 -81
- pulumi_newrelic/api_access_key.py +191 -209
- pulumi_newrelic/browser_application.py +161 -153
- pulumi_newrelic/cloud/__init__.py +3 -1
- pulumi_newrelic/cloud/_inputs.py +4267 -2710
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +238 -200
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +159 -212
- pulumi_newrelic/cloud/aws_integrations.py +518 -1490
- pulumi_newrelic/cloud/aws_link_account.py +88 -76
- pulumi_newrelic/cloud/azure_integrations.py +681 -587
- pulumi_newrelic/cloud/azure_link_account.py +129 -117
- pulumi_newrelic/cloud/gcp_integrations.py +436 -408
- pulumi_newrelic/cloud/gcp_link_account.py +71 -59
- pulumi_newrelic/cloud/oci_link_account.py +926 -0
- pulumi_newrelic/cloud/outputs.py +1678 -2317
- pulumi_newrelic/config/__init__.py +2 -1
- pulumi_newrelic/config/__init__.pyi +45 -0
- pulumi_newrelic/config/vars.py +22 -17
- pulumi_newrelic/data_partition_rule.py +129 -117
- pulumi_newrelic/entity_tags.py +153 -31
- pulumi_newrelic/events_to_metrics_rule.py +114 -102
- pulumi_newrelic/get_account.py +41 -29
- pulumi_newrelic/get_alert_channel.py +73 -28
- pulumi_newrelic/get_alert_policy.py +83 -34
- pulumi_newrelic/get_application.py +51 -39
- pulumi_newrelic/get_authentication_domain.py +111 -0
- pulumi_newrelic/get_cloud_account.py +43 -31
- pulumi_newrelic/get_entity.py +126 -121
- pulumi_newrelic/get_group.py +190 -0
- pulumi_newrelic/get_key_transaction.py +117 -38
- pulumi_newrelic/get_notification_destination.py +86 -36
- pulumi_newrelic/get_obfuscation_expression.py +47 -35
- pulumi_newrelic/get_service_level_alert_helper.py +237 -137
- pulumi_newrelic/get_test_grok_pattern.py +47 -32
- pulumi_newrelic/get_user.py +165 -0
- pulumi_newrelic/group.py +286 -0
- pulumi_newrelic/infra_alert_condition.py +400 -382
- pulumi_newrelic/insights/__init__.py +2 -1
- pulumi_newrelic/insights/_inputs.py +94 -23
- pulumi_newrelic/insights/event.py +56 -48
- pulumi_newrelic/insights/outputs.py +51 -18
- pulumi_newrelic/key_transaction.py +465 -0
- pulumi_newrelic/log_parsing_rule.py +169 -153
- pulumi_newrelic/monitor_downtime.py +914 -0
- pulumi_newrelic/notification_channel.py +560 -418
- pulumi_newrelic/notification_destination.py +379 -124
- pulumi_newrelic/nrql_alert_condition.py +945 -513
- pulumi_newrelic/nrql_drop_rule.py +121 -129
- pulumi_newrelic/obfuscation_expression.py +88 -76
- pulumi_newrelic/obfuscation_rule.py +123 -109
- pulumi_newrelic/one_dashboard.py +118 -108
- pulumi_newrelic/one_dashboard_json.py +77 -67
- pulumi_newrelic/one_dashboard_raw.py +214 -202
- pulumi_newrelic/outputs.py +5491 -2141
- pulumi_newrelic/pipeline_cloud_rule.py +335 -0
- pulumi_newrelic/plugins/__init__.py +2 -1
- pulumi_newrelic/plugins/_inputs.py +520 -90
- pulumi_newrelic/plugins/application_settings.py +463 -167
- pulumi_newrelic/plugins/outputs.py +337 -75
- pulumi_newrelic/plugins/workload.py +387 -151
- pulumi_newrelic/provider.py +156 -142
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +277 -255
- pulumi_newrelic/synthetics/__init__.py +2 -1
- pulumi_newrelic/synthetics/_inputs.py +275 -106
- pulumi_newrelic/synthetics/alert_condition.py +174 -160
- pulumi_newrelic/synthetics/broken_links_monitor.py +367 -207
- pulumi_newrelic/synthetics/cert_check_monitor.py +380 -218
- pulumi_newrelic/synthetics/get_private_location.py +51 -39
- pulumi_newrelic/synthetics/get_secure_credential.py +39 -27
- pulumi_newrelic/synthetics/monitor.py +668 -462
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +219 -201
- pulumi_newrelic/synthetics/outputs.py +102 -85
- pulumi_newrelic/synthetics/private_location.py +120 -110
- pulumi_newrelic/synthetics/script_monitor.py +623 -375
- pulumi_newrelic/synthetics/secure_credential.py +99 -93
- pulumi_newrelic/synthetics/step_monitor.py +545 -201
- pulumi_newrelic/user.py +366 -0
- pulumi_newrelic/workflow.py +348 -312
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +8 -7
- pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.16.0a1698964311.dist-info/RECORD +0 -82
- {pulumi_newrelic-5.16.0a1698964311.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).
|
|
@@ -291,17 +297,19 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
291
297
|
import pulumi_newrelic as newrelic
|
|
292
298
|
|
|
293
299
|
foo = newrelic.NotificationChannel("foo",
|
|
294
|
-
account_id=12345678,
|
|
300
|
+
account_id="12345678",
|
|
301
|
+
name="webhook-example",
|
|
302
|
+
type="WEBHOOK",
|
|
295
303
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
296
304
|
product="IINT",
|
|
297
|
-
properties=[
|
|
298
|
-
key
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
)
|
|
302
|
-
type="WEBHOOK")
|
|
305
|
+
properties=[{
|
|
306
|
+
"key": "payload",
|
|
307
|
+
"value": "name: {{ foo }}",
|
|
308
|
+
"label": "Payload Template",
|
|
309
|
+
}])
|
|
303
310
|
```
|
|
304
311
|
See additional examples.
|
|
312
|
+
|
|
305
313
|
## Additional Examples
|
|
306
314
|
|
|
307
315
|
> **NOTE:** We support all properties. The mentioned properties are just an example.
|
|
@@ -314,20 +322,33 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
314
322
|
import pulumi_newrelic as newrelic
|
|
315
323
|
|
|
316
324
|
foo = newrelic.NotificationChannel("foo",
|
|
317
|
-
account_id=12345678,
|
|
325
|
+
account_id="12345678",
|
|
326
|
+
name="servicenow-incident-example",
|
|
327
|
+
type="SERVICENOW_INCIDENTS",
|
|
318
328
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
319
329
|
product="IINT",
|
|
320
330
|
properties=[
|
|
321
|
-
|
|
322
|
-
key
|
|
323
|
-
value
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
key
|
|
327
|
-
value
|
|
328
|
-
|
|
329
|
-
]
|
|
330
|
-
|
|
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")
|
|
331
352
|
```
|
|
332
353
|
|
|
333
354
|
##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
|
|
@@ -336,20 +357,21 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
336
357
|
import pulumi_newrelic as newrelic
|
|
337
358
|
|
|
338
359
|
foo = newrelic.NotificationChannel("foo",
|
|
339
|
-
account_id=12345678,
|
|
360
|
+
account_id="12345678",
|
|
361
|
+
name="email-example",
|
|
362
|
+
type="EMAIL",
|
|
340
363
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
341
364
|
product="IINT",
|
|
342
365
|
properties=[
|
|
343
|
-
|
|
344
|
-
key
|
|
345
|
-
value
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
key
|
|
349
|
-
value
|
|
350
|
-
|
|
351
|
-
]
|
|
352
|
-
type="EMAIL")
|
|
366
|
+
{
|
|
367
|
+
"key": "subject",
|
|
368
|
+
"value": "New Subject Title",
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
"key": "customDetailsEmail",
|
|
372
|
+
"value": "issue id - {{issueId}}",
|
|
373
|
+
},
|
|
374
|
+
])
|
|
353
375
|
```
|
|
354
376
|
|
|
355
377
|
##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
|
|
@@ -358,28 +380,31 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
358
380
|
import pulumi_newrelic as newrelic
|
|
359
381
|
|
|
360
382
|
foo = newrelic.NotificationChannel("foo",
|
|
361
|
-
account_id=12345678,
|
|
383
|
+
account_id="12345678",
|
|
384
|
+
name="jira-example",
|
|
385
|
+
type="JIRA_CLASSIC",
|
|
362
386
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
363
387
|
product="ERROR_TRACKING",
|
|
364
388
|
properties=[
|
|
365
|
-
|
|
366
|
-
key
|
|
367
|
-
value
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
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
|
+
])
|
|
383
408
|
```
|
|
384
409
|
|
|
385
410
|
##### [PagerDuty with account integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
@@ -388,42 +413,43 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
388
413
|
import pulumi_newrelic as newrelic
|
|
389
414
|
|
|
390
415
|
foo = newrelic.NotificationChannel("foo",
|
|
391
|
-
account_id=12345678,
|
|
416
|
+
account_id="12345678",
|
|
417
|
+
name="pagerduty-account-example",
|
|
418
|
+
type="PAGERDUTY_ACCOUNT_INTEGRATION",
|
|
392
419
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
393
420
|
product="IINT",
|
|
394
421
|
properties=[
|
|
395
|
-
|
|
396
|
-
key
|
|
397
|
-
value
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
key
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
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
|
+
}
|
|
423
450
|
\"\"\",
|
|
424
|
-
|
|
425
|
-
]
|
|
426
|
-
type="PAGERDUTY_ACCOUNT_INTEGRATION")
|
|
451
|
+
},
|
|
452
|
+
])
|
|
427
453
|
```
|
|
428
454
|
|
|
429
455
|
##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
@@ -432,34 +458,34 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
432
458
|
import pulumi_newrelic as newrelic
|
|
433
459
|
|
|
434
460
|
foo = newrelic.NotificationChannel("foo",
|
|
435
|
-
account_id=12345678,
|
|
461
|
+
account_id="12345678",
|
|
462
|
+
name="pagerduty-account-example",
|
|
463
|
+
type="PAGERDUTY_SERVICE_INTEGRATION",
|
|
436
464
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
437
465
|
product="IINT",
|
|
438
466
|
properties=[
|
|
439
|
-
|
|
440
|
-
key
|
|
441
|
-
value
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
key
|
|
445
|
-
value
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
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
|
+
}
|
|
459
486
|
\"\"\",
|
|
460
|
-
|
|
461
|
-
]
|
|
462
|
-
type="PAGERDUTY_SERVICE_INTEGRATION")
|
|
487
|
+
},
|
|
488
|
+
])
|
|
463
489
|
```
|
|
464
490
|
|
|
465
491
|
#### Mobile Push
|
|
@@ -468,10 +494,11 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
468
494
|
import pulumi_newrelic as newrelic
|
|
469
495
|
|
|
470
496
|
foo = newrelic.NotificationChannel("foo",
|
|
471
|
-
account_id=12345678,
|
|
497
|
+
account_id="12345678",
|
|
498
|
+
name="mobile-push-example",
|
|
499
|
+
type="MOBILE_PUSH",
|
|
472
500
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
473
|
-
product="IINT"
|
|
474
|
-
type="MOBILE_PUSH")
|
|
501
|
+
product="IINT")
|
|
475
502
|
```
|
|
476
503
|
|
|
477
504
|
#### [AWS Event Bridge](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#eventBridge)
|
|
@@ -480,20 +507,21 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
480
507
|
import pulumi_newrelic as newrelic
|
|
481
508
|
|
|
482
509
|
foo = newrelic.NotificationChannel("foo",
|
|
483
|
-
account_id=12345678,
|
|
510
|
+
account_id="12345678",
|
|
511
|
+
name="event-bridge-example",
|
|
512
|
+
type="EVENT_BRIDGE",
|
|
484
513
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
485
514
|
product="IINT",
|
|
486
515
|
properties=[
|
|
487
|
-
|
|
488
|
-
key
|
|
489
|
-
value
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
key
|
|
493
|
-
value
|
|
494
|
-
|
|
495
|
-
]
|
|
496
|
-
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
|
+
])
|
|
497
525
|
```
|
|
498
526
|
|
|
499
527
|
#### [SLACK](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#slack)
|
|
@@ -502,20 +530,48 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
502
530
|
import pulumi_newrelic as newrelic
|
|
503
531
|
|
|
504
532
|
foo = newrelic.NotificationChannel("foo",
|
|
505
|
-
account_id=12345678,
|
|
533
|
+
account_id="12345678",
|
|
534
|
+
name="slack-example",
|
|
535
|
+
type="SLACK",
|
|
506
536
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
507
537
|
product="IINT",
|
|
508
538
|
properties=[
|
|
509
|
-
|
|
510
|
-
key
|
|
511
|
-
value
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
key
|
|
515
|
-
value
|
|
516
|
-
|
|
517
|
-
]
|
|
518
|
-
|
|
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
|
+
])
|
|
519
575
|
```
|
|
520
576
|
|
|
521
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.
|
|
@@ -530,16 +586,17 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
530
586
|
import pulumi_newrelic as newrelic
|
|
531
587
|
|
|
532
588
|
webhook_destination = newrelic.NotificationDestination("webhook-destination",
|
|
533
|
-
account_id=12345678,
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
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
|
+
})
|
|
543
600
|
```
|
|
544
601
|
|
|
545
602
|
### Create a channel
|
|
@@ -548,32 +605,49 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
548
605
|
import pulumi_newrelic as newrelic
|
|
549
606
|
|
|
550
607
|
webhook_channel = newrelic.NotificationChannel("webhook-channel",
|
|
551
|
-
account_id=12345678,
|
|
608
|
+
account_id="12345678",
|
|
609
|
+
name="channel-webhook",
|
|
552
610
|
type="WEBHOOK",
|
|
553
|
-
destination_id=
|
|
611
|
+
destination_id=webhook_destination["id"],
|
|
554
612
|
product="IINT",
|
|
555
|
-
properties=[
|
|
556
|
-
key
|
|
557
|
-
value
|
|
558
|
-
label
|
|
559
|
-
|
|
613
|
+
properties=[{
|
|
614
|
+
"key": "payload",
|
|
615
|
+
"value": "{name: foo}",
|
|
616
|
+
"label": "Payload Template",
|
|
617
|
+
}])
|
|
560
618
|
```
|
|
561
619
|
|
|
562
620
|
## Additional Information
|
|
563
621
|
|
|
564
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.
|
|
565
625
|
|
|
566
|
-
|
|
626
|
+
If you're currently using `AlertChannel` to manage channels, we **strongly recommend** migrating to these notifications-based resources at the earliest.
|
|
627
|
+
|
|
628
|
+
Please refer to the examples in this page, or this example for illustrations on setting up channels with these resources.
|
|
629
|
+
|
|
630
|
+
## Import
|
|
631
|
+
|
|
632
|
+
Channels can only be used by a single workflow, therefore importing them is not particularly useful, because in the UI channels are created upon workflow creation.
|
|
633
|
+
|
|
634
|
+
Additionally, the channel id isn't available via the UI, and you'd need to look it up with the `channels` query in the NerdGraph API.
|
|
635
|
+
|
|
636
|
+
That being said, importing is possible using -
|
|
637
|
+
|
|
638
|
+
```sh
|
|
639
|
+
$ pulumi import newrelic:index/notificationChannel:NotificationChannel foo <destination_id>
|
|
640
|
+
```
|
|
567
641
|
|
|
568
642
|
:param str resource_name: The name of the resource.
|
|
569
643
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
570
|
-
:param pulumi.Input[
|
|
571
|
-
:param pulumi.Input[bool] active: Indicates whether the channel is active.
|
|
572
|
-
:param pulumi.Input[str] destination_id: The id of the destination.
|
|
573
|
-
:param pulumi.Input[str] name: The name of the channel.
|
|
574
|
-
:param pulumi.Input[str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
575
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
576
|
-
: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`.
|
|
577
651
|
"""
|
|
578
652
|
...
|
|
579
653
|
@overload
|
|
@@ -594,17 +668,19 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
594
668
|
import pulumi_newrelic as newrelic
|
|
595
669
|
|
|
596
670
|
foo = newrelic.NotificationChannel("foo",
|
|
597
|
-
account_id=12345678,
|
|
671
|
+
account_id="12345678",
|
|
672
|
+
name="webhook-example",
|
|
673
|
+
type="WEBHOOK",
|
|
598
674
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
599
675
|
product="IINT",
|
|
600
|
-
properties=[
|
|
601
|
-
key
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
)
|
|
605
|
-
type="WEBHOOK")
|
|
676
|
+
properties=[{
|
|
677
|
+
"key": "payload",
|
|
678
|
+
"value": "name: {{ foo }}",
|
|
679
|
+
"label": "Payload Template",
|
|
680
|
+
}])
|
|
606
681
|
```
|
|
607
682
|
See additional examples.
|
|
683
|
+
|
|
608
684
|
## Additional Examples
|
|
609
685
|
|
|
610
686
|
> **NOTE:** We support all properties. The mentioned properties are just an example.
|
|
@@ -617,20 +693,33 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
617
693
|
import pulumi_newrelic as newrelic
|
|
618
694
|
|
|
619
695
|
foo = newrelic.NotificationChannel("foo",
|
|
620
|
-
account_id=12345678,
|
|
696
|
+
account_id="12345678",
|
|
697
|
+
name="servicenow-incident-example",
|
|
698
|
+
type="SERVICENOW_INCIDENTS",
|
|
621
699
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
622
700
|
product="IINT",
|
|
623
701
|
properties=[
|
|
624
|
-
|
|
625
|
-
key
|
|
626
|
-
value
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
key
|
|
630
|
-
value
|
|
631
|
-
|
|
632
|
-
]
|
|
633
|
-
|
|
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")
|
|
634
723
|
```
|
|
635
724
|
|
|
636
725
|
##### [Email](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#email)
|
|
@@ -639,20 +728,21 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
639
728
|
import pulumi_newrelic as newrelic
|
|
640
729
|
|
|
641
730
|
foo = newrelic.NotificationChannel("foo",
|
|
642
|
-
account_id=12345678,
|
|
731
|
+
account_id="12345678",
|
|
732
|
+
name="email-example",
|
|
733
|
+
type="EMAIL",
|
|
643
734
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
644
735
|
product="IINT",
|
|
645
736
|
properties=[
|
|
646
|
-
|
|
647
|
-
key
|
|
648
|
-
value
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
key
|
|
652
|
-
value
|
|
653
|
-
|
|
654
|
-
]
|
|
655
|
-
type="EMAIL")
|
|
737
|
+
{
|
|
738
|
+
"key": "subject",
|
|
739
|
+
"value": "New Subject Title",
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"key": "customDetailsEmail",
|
|
743
|
+
"value": "issue id - {{issueId}}",
|
|
744
|
+
},
|
|
745
|
+
])
|
|
656
746
|
```
|
|
657
747
|
|
|
658
748
|
##### [Jira Classic](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#jira)
|
|
@@ -661,28 +751,31 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
661
751
|
import pulumi_newrelic as newrelic
|
|
662
752
|
|
|
663
753
|
foo = newrelic.NotificationChannel("foo",
|
|
664
|
-
account_id=12345678,
|
|
754
|
+
account_id="12345678",
|
|
755
|
+
name="jira-example",
|
|
756
|
+
type="JIRA_CLASSIC",
|
|
665
757
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
666
758
|
product="ERROR_TRACKING",
|
|
667
759
|
properties=[
|
|
668
|
-
|
|
669
|
-
key
|
|
670
|
-
value
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
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
|
+
])
|
|
686
779
|
```
|
|
687
780
|
|
|
688
781
|
##### [PagerDuty with account integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
@@ -691,42 +784,43 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
691
784
|
import pulumi_newrelic as newrelic
|
|
692
785
|
|
|
693
786
|
foo = newrelic.NotificationChannel("foo",
|
|
694
|
-
account_id=12345678,
|
|
787
|
+
account_id="12345678",
|
|
788
|
+
name="pagerduty-account-example",
|
|
789
|
+
type="PAGERDUTY_ACCOUNT_INTEGRATION",
|
|
695
790
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
696
791
|
product="IINT",
|
|
697
792
|
properties=[
|
|
698
|
-
|
|
699
|
-
key
|
|
700
|
-
value
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
key
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
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
|
+
}
|
|
726
821
|
\"\"\",
|
|
727
|
-
|
|
728
|
-
]
|
|
729
|
-
type="PAGERDUTY_ACCOUNT_INTEGRATION")
|
|
822
|
+
},
|
|
823
|
+
])
|
|
730
824
|
```
|
|
731
825
|
|
|
732
826
|
##### [PagerDuty with service integration](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#pagerduty)
|
|
@@ -735,34 +829,34 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
735
829
|
import pulumi_newrelic as newrelic
|
|
736
830
|
|
|
737
831
|
foo = newrelic.NotificationChannel("foo",
|
|
738
|
-
account_id=12345678,
|
|
832
|
+
account_id="12345678",
|
|
833
|
+
name="pagerduty-account-example",
|
|
834
|
+
type="PAGERDUTY_SERVICE_INTEGRATION",
|
|
739
835
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
740
836
|
product="IINT",
|
|
741
837
|
properties=[
|
|
742
|
-
|
|
743
|
-
key
|
|
744
|
-
value
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
key
|
|
748
|
-
value
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
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
|
+
}
|
|
762
857
|
\"\"\",
|
|
763
|
-
|
|
764
|
-
]
|
|
765
|
-
type="PAGERDUTY_SERVICE_INTEGRATION")
|
|
858
|
+
},
|
|
859
|
+
])
|
|
766
860
|
```
|
|
767
861
|
|
|
768
862
|
#### Mobile Push
|
|
@@ -771,10 +865,11 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
771
865
|
import pulumi_newrelic as newrelic
|
|
772
866
|
|
|
773
867
|
foo = newrelic.NotificationChannel("foo",
|
|
774
|
-
account_id=12345678,
|
|
868
|
+
account_id="12345678",
|
|
869
|
+
name="mobile-push-example",
|
|
870
|
+
type="MOBILE_PUSH",
|
|
775
871
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
776
|
-
product="IINT"
|
|
777
|
-
type="MOBILE_PUSH")
|
|
872
|
+
product="IINT")
|
|
778
873
|
```
|
|
779
874
|
|
|
780
875
|
#### [AWS Event Bridge](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#eventBridge)
|
|
@@ -783,20 +878,21 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
783
878
|
import pulumi_newrelic as newrelic
|
|
784
879
|
|
|
785
880
|
foo = newrelic.NotificationChannel("foo",
|
|
786
|
-
account_id=12345678,
|
|
881
|
+
account_id="12345678",
|
|
882
|
+
name="event-bridge-example",
|
|
883
|
+
type="EVENT_BRIDGE",
|
|
787
884
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
788
885
|
product="IINT",
|
|
789
886
|
properties=[
|
|
790
|
-
|
|
791
|
-
key
|
|
792
|
-
value
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
key
|
|
796
|
-
value
|
|
797
|
-
|
|
798
|
-
]
|
|
799
|
-
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
|
+
])
|
|
800
896
|
```
|
|
801
897
|
|
|
802
898
|
#### [SLACK](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels/#slack)
|
|
@@ -805,20 +901,48 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
805
901
|
import pulumi_newrelic as newrelic
|
|
806
902
|
|
|
807
903
|
foo = newrelic.NotificationChannel("foo",
|
|
808
|
-
account_id=12345678,
|
|
904
|
+
account_id="12345678",
|
|
905
|
+
name="slack-example",
|
|
906
|
+
type="SLACK",
|
|
809
907
|
destination_id="00b6bd1d-ac06-4d3d-bd72-49551e70f7a8",
|
|
810
908
|
product="IINT",
|
|
811
909
|
properties=[
|
|
812
|
-
|
|
813
|
-
key
|
|
814
|
-
value
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
key
|
|
818
|
-
value
|
|
819
|
-
|
|
820
|
-
]
|
|
821
|
-
|
|
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
|
+
])
|
|
822
946
|
```
|
|
823
947
|
|
|
824
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.
|
|
@@ -833,16 +957,17 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
833
957
|
import pulumi_newrelic as newrelic
|
|
834
958
|
|
|
835
959
|
webhook_destination = newrelic.NotificationDestination("webhook-destination",
|
|
836
|
-
account_id=12345678,
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
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
|
+
})
|
|
846
971
|
```
|
|
847
972
|
|
|
848
973
|
### Create a channel
|
|
@@ -851,22 +976,39 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
851
976
|
import pulumi_newrelic as newrelic
|
|
852
977
|
|
|
853
978
|
webhook_channel = newrelic.NotificationChannel("webhook-channel",
|
|
854
|
-
account_id=12345678,
|
|
979
|
+
account_id="12345678",
|
|
980
|
+
name="channel-webhook",
|
|
855
981
|
type="WEBHOOK",
|
|
856
|
-
destination_id=
|
|
982
|
+
destination_id=webhook_destination["id"],
|
|
857
983
|
product="IINT",
|
|
858
|
-
properties=[
|
|
859
|
-
key
|
|
860
|
-
value
|
|
861
|
-
label
|
|
862
|
-
|
|
984
|
+
properties=[{
|
|
985
|
+
"key": "payload",
|
|
986
|
+
"value": "{name: foo}",
|
|
987
|
+
"label": "Payload Template",
|
|
988
|
+
}])
|
|
863
989
|
```
|
|
864
990
|
|
|
865
991
|
## Additional Information
|
|
866
992
|
|
|
867
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.
|
|
868
996
|
|
|
869
|
-
|
|
997
|
+
If you're currently using `AlertChannel` to manage channels, we **strongly recommend** migrating to these notifications-based resources at the earliest.
|
|
998
|
+
|
|
999
|
+
Please refer to the examples in this page, or this example for illustrations on setting up channels with these resources.
|
|
1000
|
+
|
|
1001
|
+
## Import
|
|
1002
|
+
|
|
1003
|
+
Channels can only be used by a single workflow, therefore importing them is not particularly useful, because in the UI channels are created upon workflow creation.
|
|
1004
|
+
|
|
1005
|
+
Additionally, the channel id isn't available via the UI, and you'd need to look it up with the `channels` query in the NerdGraph API.
|
|
1006
|
+
|
|
1007
|
+
That being said, importing is possible using -
|
|
1008
|
+
|
|
1009
|
+
```sh
|
|
1010
|
+
$ pulumi import newrelic:index/notificationChannel:NotificationChannel foo <destination_id>
|
|
1011
|
+
```
|
|
870
1012
|
|
|
871
1013
|
:param str resource_name: The name of the resource.
|
|
872
1014
|
:param NotificationChannelArgs args: The arguments to use to populate this resource's properties.
|
|
@@ -883,13 +1025,13 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
883
1025
|
def _internal_init(__self__,
|
|
884
1026
|
resource_name: str,
|
|
885
1027
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
886
|
-
account_id: Optional[pulumi.Input[
|
|
887
|
-
active: Optional[pulumi.Input[bool]] = None,
|
|
888
|
-
destination_id: Optional[pulumi.Input[str]] = None,
|
|
889
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
890
|
-
product: Optional[pulumi.Input[str]] = None,
|
|
891
|
-
properties: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
892
|
-
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,
|
|
893
1035
|
__props__=None):
|
|
894
1036
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
895
1037
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -925,14 +1067,14 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
925
1067
|
def get(resource_name: str,
|
|
926
1068
|
id: pulumi.Input[str],
|
|
927
1069
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
928
|
-
account_id: Optional[pulumi.Input[
|
|
929
|
-
active: Optional[pulumi.Input[bool]] = None,
|
|
930
|
-
destination_id: Optional[pulumi.Input[str]] = None,
|
|
931
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
932
|
-
product: Optional[pulumi.Input[str]] = None,
|
|
933
|
-
properties: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
934
|
-
status: Optional[pulumi.Input[str]] = None,
|
|
935
|
-
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':
|
|
936
1078
|
"""
|
|
937
1079
|
Get an existing NotificationChannel resource's state with the given name, id, and optional extra
|
|
938
1080
|
properties used to qualify the lookup.
|
|
@@ -940,14 +1082,14 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
940
1082
|
:param str resource_name: The unique name of the resulting resource.
|
|
941
1083
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
942
1084
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
943
|
-
:param pulumi.Input[
|
|
944
|
-
:param pulumi.Input[bool] active: Indicates whether the channel is active.
|
|
945
|
-
:param pulumi.Input[str] destination_id: The id of the destination.
|
|
946
|
-
:param pulumi.Input[str] name: The name of the channel.
|
|
947
|
-
:param pulumi.Input[str] product: The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
948
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
949
|
-
:param pulumi.Input[str] status: The status of the channel.
|
|
950
|
-
: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`.
|
|
951
1093
|
"""
|
|
952
1094
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
953
1095
|
|
|
@@ -963,47 +1105,47 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
963
1105
|
__props__.__dict__["type"] = type
|
|
964
1106
|
return NotificationChannel(resource_name, opts=opts, __props__=__props__)
|
|
965
1107
|
|
|
966
|
-
@property
|
|
1108
|
+
@_builtins.property
|
|
967
1109
|
@pulumi.getter(name="accountId")
|
|
968
|
-
def account_id(self) -> pulumi.Output[
|
|
1110
|
+
def account_id(self) -> pulumi.Output[_builtins.str]:
|
|
969
1111
|
"""
|
|
970
1112
|
Determines the New Relic account where the notification channel will be created. Defaults to the account associated with the API key used.
|
|
971
1113
|
"""
|
|
972
1114
|
return pulumi.get(self, "account_id")
|
|
973
1115
|
|
|
974
|
-
@property
|
|
1116
|
+
@_builtins.property
|
|
975
1117
|
@pulumi.getter
|
|
976
|
-
def active(self) -> pulumi.Output[Optional[bool]]:
|
|
1118
|
+
def active(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
977
1119
|
"""
|
|
978
1120
|
Indicates whether the channel is active.
|
|
979
1121
|
"""
|
|
980
1122
|
return pulumi.get(self, "active")
|
|
981
1123
|
|
|
982
|
-
@property
|
|
1124
|
+
@_builtins.property
|
|
983
1125
|
@pulumi.getter(name="destinationId")
|
|
984
|
-
def destination_id(self) -> pulumi.Output[str]:
|
|
1126
|
+
def destination_id(self) -> pulumi.Output[_builtins.str]:
|
|
985
1127
|
"""
|
|
986
1128
|
The id of the destination.
|
|
987
1129
|
"""
|
|
988
1130
|
return pulumi.get(self, "destination_id")
|
|
989
1131
|
|
|
990
|
-
@property
|
|
1132
|
+
@_builtins.property
|
|
991
1133
|
@pulumi.getter
|
|
992
|
-
def name(self) -> pulumi.Output[str]:
|
|
1134
|
+
def name(self) -> pulumi.Output[_builtins.str]:
|
|
993
1135
|
"""
|
|
994
1136
|
The name of the channel.
|
|
995
1137
|
"""
|
|
996
1138
|
return pulumi.get(self, "name")
|
|
997
1139
|
|
|
998
|
-
@property
|
|
1140
|
+
@_builtins.property
|
|
999
1141
|
@pulumi.getter
|
|
1000
|
-
def product(self) -> pulumi.Output[str]:
|
|
1142
|
+
def product(self) -> pulumi.Output[_builtins.str]:
|
|
1001
1143
|
"""
|
|
1002
1144
|
The type of product. One of: `DISCUSSIONS`, `ERROR_TRACKING` or `IINT` (workflows).
|
|
1003
1145
|
"""
|
|
1004
1146
|
return pulumi.get(self, "product")
|
|
1005
1147
|
|
|
1006
|
-
@property
|
|
1148
|
+
@_builtins.property
|
|
1007
1149
|
@pulumi.getter
|
|
1008
1150
|
def properties(self) -> pulumi.Output[Sequence['outputs.NotificationChannelProperty']]:
|
|
1009
1151
|
"""
|
|
@@ -1011,19 +1153,19 @@ class NotificationChannel(pulumi.CustomResource):
|
|
|
1011
1153
|
"""
|
|
1012
1154
|
return pulumi.get(self, "properties")
|
|
1013
1155
|
|
|
1014
|
-
@property
|
|
1156
|
+
@_builtins.property
|
|
1015
1157
|
@pulumi.getter
|
|
1016
|
-
def status(self) -> pulumi.Output[str]:
|
|
1158
|
+
def status(self) -> pulumi.Output[_builtins.str]:
|
|
1017
1159
|
"""
|
|
1018
1160
|
The status of the channel.
|
|
1019
1161
|
"""
|
|
1020
1162
|
return pulumi.get(self, "status")
|
|
1021
1163
|
|
|
1022
|
-
@property
|
|
1164
|
+
@_builtins.property
|
|
1023
1165
|
@pulumi.getter
|
|
1024
|
-
def type(self) -> pulumi.Output[str]:
|
|
1166
|
+
def type(self) -> pulumi.Output[_builtins.str]:
|
|
1025
1167
|
"""
|
|
1026
|
-
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`.
|
|
1027
1169
|
"""
|
|
1028
1170
|
return pulumi.get(self, "type")
|
|
1029
1171
|
|