pulumi-newrelic 5.23.0__py3-none-any.whl → 5.23.0a1711707796__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_newrelic/_inputs.py +270 -183
- pulumi_newrelic/account_management.py +20 -20
- pulumi_newrelic/alert_channel.py +92 -76
- pulumi_newrelic/alert_condition.py +163 -104
- pulumi_newrelic/alert_muting_rule.py +35 -33
- pulumi_newrelic/alert_policy.py +43 -68
- pulumi_newrelic/alert_policy_channel.py +8 -12
- pulumi_newrelic/cloud/_inputs.py +1072 -322
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +6 -4
- pulumi_newrelic/cloud/aws_integrations.py +15 -13
- pulumi_newrelic/cloud/aws_link_account.py +6 -4
- pulumi_newrelic/cloud/azure_integrations.py +12 -10
- pulumi_newrelic/cloud/azure_link_account.py +6 -4
- pulumi_newrelic/cloud/gcp_integrations.py +6 -6
- pulumi_newrelic/cloud/gcp_link_account.py +6 -4
- pulumi_newrelic/cloud/outputs.py +1072 -322
- pulumi_newrelic/data_partition_rule.py +4 -0
- pulumi_newrelic/entity_tags.py +17 -13
- pulumi_newrelic/events_to_metrics_rule.py +4 -2
- pulumi_newrelic/get_account.py +4 -0
- pulumi_newrelic/get_application.py +10 -8
- pulumi_newrelic/get_authentication_domain.py +8 -4
- pulumi_newrelic/get_cloud_account.py +4 -0
- pulumi_newrelic/get_entity.py +32 -28
- pulumi_newrelic/get_group.py +8 -42
- pulumi_newrelic/get_key_transaction.py +10 -8
- pulumi_newrelic/get_notification_destination.py +1 -20
- pulumi_newrelic/get_obfuscation_expression.py +4 -2
- pulumi_newrelic/get_service_level_alert_helper.py +46 -22
- pulumi_newrelic/get_test_grok_pattern.py +6 -4
- pulumi_newrelic/get_user.py +4 -0
- pulumi_newrelic/group.py +42 -40
- pulumi_newrelic/infra_alert_condition.py +145 -154
- pulumi_newrelic/insights/event.py +25 -8
- pulumi_newrelic/log_parsing_rule.py +10 -6
- pulumi_newrelic/monitor_downtime.py +193 -174
- pulumi_newrelic/notification_channel.py +150 -124
- pulumi_newrelic/notification_destination.py +1 -95
- pulumi_newrelic/nrql_alert_condition.py +48 -38
- pulumi_newrelic/nrql_drop_rule.py +38 -34
- pulumi_newrelic/obfuscation_expression.py +4 -2
- pulumi_newrelic/obfuscation_rule.py +4 -4
- pulumi_newrelic/one_dashboard.py +48 -42
- pulumi_newrelic/one_dashboard_raw.py +86 -86
- pulumi_newrelic/outputs.py +270 -180
- pulumi_newrelic/plugins/_inputs.py +16 -16
- pulumi_newrelic/plugins/application_settings.py +36 -20
- pulumi_newrelic/plugins/outputs.py +16 -16
- pulumi_newrelic/plugins/workload.py +40 -158
- pulumi_newrelic/service_level.py +123 -38
- pulumi_newrelic/synthetics/alert_condition.py +78 -34
- pulumi_newrelic/synthetics/broken_links_monitor.py +20 -18
- pulumi_newrelic/synthetics/cert_check_monitor.py +18 -16
- pulumi_newrelic/synthetics/get_private_location.py +8 -0
- pulumi_newrelic/synthetics/get_secure_credential.py +12 -0
- pulumi_newrelic/synthetics/monitor.py +52 -48
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +83 -69
- pulumi_newrelic/synthetics/private_location.py +6 -6
- pulumi_newrelic/synthetics/script_monitor.py +42 -38
- pulumi_newrelic/synthetics/secure_credential.py +22 -25
- pulumi_newrelic/synthetics/step_monitor.py +20 -18
- pulumi_newrelic/user.py +10 -8
- pulumi_newrelic/workflow.py +24 -20
- {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711707796.dist-info}/METADATA +1 -1
- pulumi_newrelic-5.23.0a1711707796.dist-info/RECORD +89 -0
- pulumi_newrelic-5.23.0.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711707796.dist-info}/WHEEL +0 -0
- {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711707796.dist-info}/top_level.txt +0 -0
@@ -18,8 +18,8 @@ class AccountManagementArgs:
|
|
18
18
|
name: Optional[pulumi.Input[str]] = None):
|
19
19
|
"""
|
20
20
|
The set of arguments for constructing a AccountManagement resource.
|
21
|
-
:param pulumi.Input[str] region:
|
22
|
-
:param pulumi.Input[str] name:
|
21
|
+
:param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
|
22
|
+
:param pulumi.Input[str] name: The name of the Account.
|
23
23
|
"""
|
24
24
|
pulumi.set(__self__, "region", region)
|
25
25
|
if name is not None:
|
@@ -29,7 +29,7 @@ class AccountManagementArgs:
|
|
29
29
|
@pulumi.getter
|
30
30
|
def region(self) -> pulumi.Input[str]:
|
31
31
|
"""
|
32
|
-
|
32
|
+
The region code of the account. One of: `us01`, `eu01`.
|
33
33
|
"""
|
34
34
|
return pulumi.get(self, "region")
|
35
35
|
|
@@ -41,7 +41,7 @@ class AccountManagementArgs:
|
|
41
41
|
@pulumi.getter
|
42
42
|
def name(self) -> Optional[pulumi.Input[str]]:
|
43
43
|
"""
|
44
|
-
|
44
|
+
The name of the Account.
|
45
45
|
"""
|
46
46
|
return pulumi.get(self, "name")
|
47
47
|
|
@@ -57,8 +57,8 @@ class _AccountManagementState:
|
|
57
57
|
region: Optional[pulumi.Input[str]] = None):
|
58
58
|
"""
|
59
59
|
Input properties used for looking up and filtering AccountManagement resources.
|
60
|
-
:param pulumi.Input[str] name:
|
61
|
-
:param pulumi.Input[str] region:
|
60
|
+
:param pulumi.Input[str] name: The name of the Account.
|
61
|
+
:param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
|
62
62
|
"""
|
63
63
|
if name is not None:
|
64
64
|
pulumi.set(__self__, "name", name)
|
@@ -69,7 +69,7 @@ class _AccountManagementState:
|
|
69
69
|
@pulumi.getter
|
70
70
|
def name(self) -> Optional[pulumi.Input[str]]:
|
71
71
|
"""
|
72
|
-
|
72
|
+
The name of the Account.
|
73
73
|
"""
|
74
74
|
return pulumi.get(self, "name")
|
75
75
|
|
@@ -81,7 +81,7 @@ class _AccountManagementState:
|
|
81
81
|
@pulumi.getter
|
82
82
|
def region(self) -> Optional[pulumi.Input[str]]:
|
83
83
|
"""
|
84
|
-
|
84
|
+
The region code of the account. One of: `us01`, `eu01`.
|
85
85
|
"""
|
86
86
|
return pulumi.get(self, "region")
|
87
87
|
|
@@ -106,14 +106,14 @@ class AccountManagement(pulumi.CustomResource):
|
|
106
106
|
## Example Usage
|
107
107
|
|
108
108
|
##### Create Account
|
109
|
+
<!--Start PulumiCodeChooser -->
|
109
110
|
```python
|
110
111
|
import pulumi
|
111
112
|
import pulumi_newrelic as newrelic
|
112
113
|
|
113
|
-
foo = newrelic.AccountManagement("foo",
|
114
|
-
name="Test Account Name",
|
115
|
-
region="us01")
|
114
|
+
foo = newrelic.AccountManagement("foo", region="us01")
|
116
115
|
```
|
116
|
+
<!--End PulumiCodeChooser -->
|
117
117
|
|
118
118
|
## Import
|
119
119
|
|
@@ -127,8 +127,8 @@ class AccountManagement(pulumi.CustomResource):
|
|
127
127
|
|
128
128
|
:param str resource_name: The name of the resource.
|
129
129
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
130
|
-
:param pulumi.Input[str] name:
|
131
|
-
:param pulumi.Input[str] region:
|
130
|
+
:param pulumi.Input[str] name: The name of the Account.
|
131
|
+
:param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
|
132
132
|
"""
|
133
133
|
...
|
134
134
|
@overload
|
@@ -144,14 +144,14 @@ class AccountManagement(pulumi.CustomResource):
|
|
144
144
|
## Example Usage
|
145
145
|
|
146
146
|
##### Create Account
|
147
|
+
<!--Start PulumiCodeChooser -->
|
147
148
|
```python
|
148
149
|
import pulumi
|
149
150
|
import pulumi_newrelic as newrelic
|
150
151
|
|
151
|
-
foo = newrelic.AccountManagement("foo",
|
152
|
-
name="Test Account Name",
|
153
|
-
region="us01")
|
152
|
+
foo = newrelic.AccountManagement("foo", region="us01")
|
154
153
|
```
|
154
|
+
<!--End PulumiCodeChooser -->
|
155
155
|
|
156
156
|
## Import
|
157
157
|
|
@@ -212,8 +212,8 @@ class AccountManagement(pulumi.CustomResource):
|
|
212
212
|
:param str resource_name: The unique name of the resulting resource.
|
213
213
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
214
214
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
215
|
-
:param pulumi.Input[str] name:
|
216
|
-
:param pulumi.Input[str] region:
|
215
|
+
:param pulumi.Input[str] name: The name of the Account.
|
216
|
+
:param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
|
217
217
|
"""
|
218
218
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
219
219
|
|
@@ -227,7 +227,7 @@ class AccountManagement(pulumi.CustomResource):
|
|
227
227
|
@pulumi.getter
|
228
228
|
def name(self) -> pulumi.Output[str]:
|
229
229
|
"""
|
230
|
-
|
230
|
+
The name of the Account.
|
231
231
|
"""
|
232
232
|
return pulumi.get(self, "name")
|
233
233
|
|
@@ -235,7 +235,7 @@ class AccountManagement(pulumi.CustomResource):
|
|
235
235
|
@pulumi.getter
|
236
236
|
def region(self) -> pulumi.Output[str]:
|
237
237
|
"""
|
238
|
-
|
238
|
+
The region code of the account. One of: `us01`, `eu01`.
|
239
239
|
"""
|
240
240
|
return pulumi.get(self, "region")
|
241
241
|
|
pulumi_newrelic/alert_channel.py
CHANGED
@@ -22,10 +22,10 @@ class AlertChannelArgs:
|
|
22
22
|
name: Optional[pulumi.Input[str]] = None):
|
23
23
|
"""
|
24
24
|
The set of arguments for constructing a AlertChannel resource.
|
25
|
-
:param pulumi.Input[str] type:
|
26
|
-
:param pulumi.Input[int] account_id:
|
27
|
-
:param pulumi.Input['AlertChannelConfigArgs'] config:
|
28
|
-
:param pulumi.Input[str] name:
|
25
|
+
:param pulumi.Input[str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
|
26
|
+
:param pulumi.Input[int] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
|
27
|
+
:param pulumi.Input['AlertChannelConfigArgs'] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
|
28
|
+
:param pulumi.Input[str] name: The name of the channel.
|
29
29
|
"""
|
30
30
|
pulumi.set(__self__, "type", type)
|
31
31
|
if account_id is not None:
|
@@ -39,7 +39,7 @@ class AlertChannelArgs:
|
|
39
39
|
@pulumi.getter
|
40
40
|
def type(self) -> pulumi.Input[str]:
|
41
41
|
"""
|
42
|
-
|
42
|
+
The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
|
43
43
|
"""
|
44
44
|
return pulumi.get(self, "type")
|
45
45
|
|
@@ -51,7 +51,7 @@ class AlertChannelArgs:
|
|
51
51
|
@pulumi.getter(name="accountId")
|
52
52
|
def account_id(self) -> Optional[pulumi.Input[int]]:
|
53
53
|
"""
|
54
|
-
|
54
|
+
Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
|
55
55
|
"""
|
56
56
|
return pulumi.get(self, "account_id")
|
57
57
|
|
@@ -63,7 +63,7 @@ class AlertChannelArgs:
|
|
63
63
|
@pulumi.getter
|
64
64
|
def config(self) -> Optional[pulumi.Input['AlertChannelConfigArgs']]:
|
65
65
|
"""
|
66
|
-
|
66
|
+
A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
|
67
67
|
"""
|
68
68
|
return pulumi.get(self, "config")
|
69
69
|
|
@@ -75,7 +75,7 @@ class AlertChannelArgs:
|
|
75
75
|
@pulumi.getter
|
76
76
|
def name(self) -> Optional[pulumi.Input[str]]:
|
77
77
|
"""
|
78
|
-
|
78
|
+
The name of the channel.
|
79
79
|
"""
|
80
80
|
return pulumi.get(self, "name")
|
81
81
|
|
@@ -93,10 +93,10 @@ class _AlertChannelState:
|
|
93
93
|
type: Optional[pulumi.Input[str]] = None):
|
94
94
|
"""
|
95
95
|
Input properties used for looking up and filtering AlertChannel resources.
|
96
|
-
:param pulumi.Input[int] account_id:
|
97
|
-
:param pulumi.Input['AlertChannelConfigArgs'] config:
|
98
|
-
:param pulumi.Input[str] name:
|
99
|
-
:param pulumi.Input[str] type:
|
96
|
+
:param pulumi.Input[int] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
|
97
|
+
:param pulumi.Input['AlertChannelConfigArgs'] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
|
98
|
+
:param pulumi.Input[str] name: The name of the channel.
|
99
|
+
:param pulumi.Input[str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
|
100
100
|
"""
|
101
101
|
if account_id is not None:
|
102
102
|
pulumi.set(__self__, "account_id", account_id)
|
@@ -111,7 +111,7 @@ class _AlertChannelState:
|
|
111
111
|
@pulumi.getter(name="accountId")
|
112
112
|
def account_id(self) -> Optional[pulumi.Input[int]]:
|
113
113
|
"""
|
114
|
-
|
114
|
+
Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
|
115
115
|
"""
|
116
116
|
return pulumi.get(self, "account_id")
|
117
117
|
|
@@ -123,7 +123,7 @@ class _AlertChannelState:
|
|
123
123
|
@pulumi.getter
|
124
124
|
def config(self) -> Optional[pulumi.Input['AlertChannelConfigArgs']]:
|
125
125
|
"""
|
126
|
-
|
126
|
+
A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
|
127
127
|
"""
|
128
128
|
return pulumi.get(self, "config")
|
129
129
|
|
@@ -135,7 +135,7 @@ class _AlertChannelState:
|
|
135
135
|
@pulumi.getter
|
136
136
|
def name(self) -> Optional[pulumi.Input[str]]:
|
137
137
|
"""
|
138
|
-
|
138
|
+
The name of the channel.
|
139
139
|
"""
|
140
140
|
return pulumi.get(self, "name")
|
141
141
|
|
@@ -147,7 +147,7 @@ class _AlertChannelState:
|
|
147
147
|
@pulumi.getter
|
148
148
|
def type(self) -> Optional[pulumi.Input[str]]:
|
149
149
|
"""
|
150
|
-
|
150
|
+
The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
|
151
151
|
"""
|
152
152
|
return pulumi.get(self, "type")
|
153
153
|
|
@@ -174,87 +174,92 @@ class AlertChannel(pulumi.CustomResource):
|
|
174
174
|
## Example Usage
|
175
175
|
|
176
176
|
### Email
|
177
|
+
<!--Start PulumiCodeChooser -->
|
177
178
|
```python
|
178
179
|
import pulumi
|
179
180
|
import pulumi_newrelic as newrelic
|
180
181
|
|
181
182
|
foo = newrelic.AlertChannel("foo",
|
182
|
-
name="foo",
|
183
|
-
type="email",
|
184
183
|
config=newrelic.AlertChannelConfigArgs(
|
185
|
-
recipients="foo@example.com",
|
186
184
|
include_json_attachment="true",
|
187
|
-
|
185
|
+
recipients="foo@example.com",
|
186
|
+
),
|
187
|
+
type="email")
|
188
188
|
```
|
189
|
+
<!--End PulumiCodeChooser -->
|
189
190
|
|
190
191
|
## Additional Examples
|
191
192
|
|
192
193
|
##### Slack
|
194
|
+
<!--Start PulumiCodeChooser -->
|
193
195
|
```python
|
194
196
|
import pulumi
|
195
197
|
import pulumi_newrelic as newrelic
|
196
198
|
|
197
199
|
foo = newrelic.AlertChannel("foo",
|
198
|
-
name="slack-example",
|
199
|
-
type="slack",
|
200
200
|
config=newrelic.AlertChannelConfigArgs(
|
201
|
-
url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
|
202
201
|
channel="example-alerts-channel",
|
203
|
-
|
202
|
+
url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
|
203
|
+
),
|
204
|
+
type="slack")
|
204
205
|
```
|
206
|
+
<!--End PulumiCodeChooser -->
|
205
207
|
|
206
208
|
> **NOTE:** For instructions on setting up Webhooks with Slack, please visit the article linked under the argument `slack` in the aforementioned configuration, or [this article](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/notification-channels-control-where-send-alerts/#slack) in New Relic's docs for additional details on setting up the `New Relic Alerts` Slack application, and subsequently using the generated Webhook URL.
|
207
209
|
|
208
210
|
### OpsGenie
|
211
|
+
<!--Start PulumiCodeChooser -->
|
209
212
|
```python
|
210
213
|
import pulumi
|
211
214
|
import pulumi_newrelic as newrelic
|
212
215
|
|
213
216
|
foo = newrelic.AlertChannel("foo",
|
214
|
-
name="opsgenie-example",
|
215
|
-
type="opsgenie",
|
216
217
|
config=newrelic.AlertChannelConfigArgs(
|
217
218
|
api_key="abc123",
|
218
|
-
teams="team1, team2",
|
219
|
-
tags="tag1, tag2",
|
220
219
|
recipients="user1@domain.com, user2@domain.com",
|
221
|
-
|
220
|
+
tags="tag1, tag2",
|
221
|
+
teams="team1, team2",
|
222
|
+
),
|
223
|
+
type="opsgenie")
|
222
224
|
```
|
225
|
+
<!--End PulumiCodeChooser -->
|
223
226
|
|
224
227
|
### PagerDuty
|
228
|
+
<!--Start PulumiCodeChooser -->
|
225
229
|
```python
|
226
230
|
import pulumi
|
227
231
|
import pulumi_newrelic as newrelic
|
228
232
|
|
229
233
|
foo = newrelic.AlertChannel("foo",
|
230
|
-
name="pagerduty-example",
|
231
|
-
type="pagerduty",
|
232
234
|
config=newrelic.AlertChannelConfigArgs(
|
233
235
|
service_key="abc123",
|
234
|
-
)
|
236
|
+
),
|
237
|
+
type="pagerduty")
|
235
238
|
```
|
239
|
+
<!--End PulumiCodeChooser -->
|
236
240
|
|
237
241
|
### VictorOps
|
242
|
+
<!--Start PulumiCodeChooser -->
|
238
243
|
```python
|
239
244
|
import pulumi
|
240
245
|
import pulumi_newrelic as newrelic
|
241
246
|
|
242
247
|
foo = newrelic.AlertChannel("foo",
|
243
|
-
name="victorops-example",
|
244
|
-
type="victorops",
|
245
248
|
config=newrelic.AlertChannelConfigArgs(
|
246
249
|
key="abc123",
|
247
250
|
route_key="/example",
|
248
|
-
)
|
251
|
+
),
|
252
|
+
type="victorops")
|
249
253
|
```
|
254
|
+
<!--End PulumiCodeChooser -->
|
250
255
|
|
251
256
|
### Webhook
|
257
|
+
<!--Start PulumiCodeChooser -->
|
252
258
|
```python
|
253
259
|
import pulumi
|
254
260
|
import pulumi_newrelic as newrelic
|
255
261
|
|
256
262
|
foo = newrelic.AlertChannel("foo",
|
257
|
-
name="webhook-example",
|
258
263
|
type="webhook",
|
259
264
|
config=newrelic.AlertChannelConfigArgs(
|
260
265
|
base_url="http://www.test.com",
|
@@ -269,27 +274,30 @@ class AlertChannel(pulumi.CustomResource):
|
|
269
274
|
},
|
270
275
|
))
|
271
276
|
```
|
277
|
+
<!--End PulumiCodeChooser -->
|
272
278
|
|
273
279
|
### Webhook with complex payload
|
280
|
+
<!--Start PulumiCodeChooser -->
|
274
281
|
```python
|
275
282
|
import pulumi
|
276
283
|
import pulumi_newrelic as newrelic
|
277
284
|
|
278
285
|
foo = newrelic.AlertChannel("foo",
|
279
|
-
name="webhook-example",
|
280
|
-
type="webhook",
|
281
286
|
config=newrelic.AlertChannelConfigArgs(
|
282
287
|
base_url="http://www.test.com",
|
283
|
-
payload_type="application/json",
|
284
288
|
payload_string=\"\"\"{
|
285
289
|
"my_custom_values": {
|
286
290
|
"condition_name": "$CONDITION_NAME",
|
287
291
|
"policy_name": "$POLICY_NAME"
|
288
292
|
}
|
289
293
|
}
|
294
|
+
|
290
295
|
\"\"\",
|
291
|
-
|
296
|
+
payload_type="application/json",
|
297
|
+
),
|
298
|
+
type="webhook")
|
292
299
|
```
|
300
|
+
<!--End PulumiCodeChooser -->
|
293
301
|
|
294
302
|
## Import
|
295
303
|
|
@@ -303,10 +311,10 @@ class AlertChannel(pulumi.CustomResource):
|
|
303
311
|
|
304
312
|
:param str resource_name: The name of the resource.
|
305
313
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
306
|
-
:param pulumi.Input[int] account_id:
|
307
|
-
:param pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']] config:
|
308
|
-
:param pulumi.Input[str] name:
|
309
|
-
:param pulumi.Input[str] type:
|
314
|
+
:param pulumi.Input[int] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
|
315
|
+
:param pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
|
316
|
+
:param pulumi.Input[str] name: The name of the channel.
|
317
|
+
:param pulumi.Input[str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
|
310
318
|
"""
|
311
319
|
...
|
312
320
|
@overload
|
@@ -322,87 +330,92 @@ class AlertChannel(pulumi.CustomResource):
|
|
322
330
|
## Example Usage
|
323
331
|
|
324
332
|
### Email
|
333
|
+
<!--Start PulumiCodeChooser -->
|
325
334
|
```python
|
326
335
|
import pulumi
|
327
336
|
import pulumi_newrelic as newrelic
|
328
337
|
|
329
338
|
foo = newrelic.AlertChannel("foo",
|
330
|
-
name="foo",
|
331
|
-
type="email",
|
332
339
|
config=newrelic.AlertChannelConfigArgs(
|
333
|
-
recipients="foo@example.com",
|
334
340
|
include_json_attachment="true",
|
335
|
-
|
341
|
+
recipients="foo@example.com",
|
342
|
+
),
|
343
|
+
type="email")
|
336
344
|
```
|
345
|
+
<!--End PulumiCodeChooser -->
|
337
346
|
|
338
347
|
## Additional Examples
|
339
348
|
|
340
349
|
##### Slack
|
350
|
+
<!--Start PulumiCodeChooser -->
|
341
351
|
```python
|
342
352
|
import pulumi
|
343
353
|
import pulumi_newrelic as newrelic
|
344
354
|
|
345
355
|
foo = newrelic.AlertChannel("foo",
|
346
|
-
name="slack-example",
|
347
|
-
type="slack",
|
348
356
|
config=newrelic.AlertChannelConfigArgs(
|
349
|
-
url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
|
350
357
|
channel="example-alerts-channel",
|
351
|
-
|
358
|
+
url="https://hooks.slack.com/services/XXXXXXX/XXXXXXX/XXXXXXXXXX",
|
359
|
+
),
|
360
|
+
type="slack")
|
352
361
|
```
|
362
|
+
<!--End PulumiCodeChooser -->
|
353
363
|
|
354
364
|
> **NOTE:** For instructions on setting up Webhooks with Slack, please visit the article linked under the argument `slack` in the aforementioned configuration, or [this article](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-notifications/notification-channels-control-where-send-alerts/#slack) in New Relic's docs for additional details on setting up the `New Relic Alerts` Slack application, and subsequently using the generated Webhook URL.
|
355
365
|
|
356
366
|
### OpsGenie
|
367
|
+
<!--Start PulumiCodeChooser -->
|
357
368
|
```python
|
358
369
|
import pulumi
|
359
370
|
import pulumi_newrelic as newrelic
|
360
371
|
|
361
372
|
foo = newrelic.AlertChannel("foo",
|
362
|
-
name="opsgenie-example",
|
363
|
-
type="opsgenie",
|
364
373
|
config=newrelic.AlertChannelConfigArgs(
|
365
374
|
api_key="abc123",
|
366
|
-
teams="team1, team2",
|
367
|
-
tags="tag1, tag2",
|
368
375
|
recipients="user1@domain.com, user2@domain.com",
|
369
|
-
|
376
|
+
tags="tag1, tag2",
|
377
|
+
teams="team1, team2",
|
378
|
+
),
|
379
|
+
type="opsgenie")
|
370
380
|
```
|
381
|
+
<!--End PulumiCodeChooser -->
|
371
382
|
|
372
383
|
### PagerDuty
|
384
|
+
<!--Start PulumiCodeChooser -->
|
373
385
|
```python
|
374
386
|
import pulumi
|
375
387
|
import pulumi_newrelic as newrelic
|
376
388
|
|
377
389
|
foo = newrelic.AlertChannel("foo",
|
378
|
-
name="pagerduty-example",
|
379
|
-
type="pagerduty",
|
380
390
|
config=newrelic.AlertChannelConfigArgs(
|
381
391
|
service_key="abc123",
|
382
|
-
)
|
392
|
+
),
|
393
|
+
type="pagerduty")
|
383
394
|
```
|
395
|
+
<!--End PulumiCodeChooser -->
|
384
396
|
|
385
397
|
### VictorOps
|
398
|
+
<!--Start PulumiCodeChooser -->
|
386
399
|
```python
|
387
400
|
import pulumi
|
388
401
|
import pulumi_newrelic as newrelic
|
389
402
|
|
390
403
|
foo = newrelic.AlertChannel("foo",
|
391
|
-
name="victorops-example",
|
392
|
-
type="victorops",
|
393
404
|
config=newrelic.AlertChannelConfigArgs(
|
394
405
|
key="abc123",
|
395
406
|
route_key="/example",
|
396
|
-
)
|
407
|
+
),
|
408
|
+
type="victorops")
|
397
409
|
```
|
410
|
+
<!--End PulumiCodeChooser -->
|
398
411
|
|
399
412
|
### Webhook
|
413
|
+
<!--Start PulumiCodeChooser -->
|
400
414
|
```python
|
401
415
|
import pulumi
|
402
416
|
import pulumi_newrelic as newrelic
|
403
417
|
|
404
418
|
foo = newrelic.AlertChannel("foo",
|
405
|
-
name="webhook-example",
|
406
419
|
type="webhook",
|
407
420
|
config=newrelic.AlertChannelConfigArgs(
|
408
421
|
base_url="http://www.test.com",
|
@@ -417,27 +430,30 @@ class AlertChannel(pulumi.CustomResource):
|
|
417
430
|
},
|
418
431
|
))
|
419
432
|
```
|
433
|
+
<!--End PulumiCodeChooser -->
|
420
434
|
|
421
435
|
### Webhook with complex payload
|
436
|
+
<!--Start PulumiCodeChooser -->
|
422
437
|
```python
|
423
438
|
import pulumi
|
424
439
|
import pulumi_newrelic as newrelic
|
425
440
|
|
426
441
|
foo = newrelic.AlertChannel("foo",
|
427
|
-
name="webhook-example",
|
428
|
-
type="webhook",
|
429
442
|
config=newrelic.AlertChannelConfigArgs(
|
430
443
|
base_url="http://www.test.com",
|
431
|
-
payload_type="application/json",
|
432
444
|
payload_string=\"\"\"{
|
433
445
|
"my_custom_values": {
|
434
446
|
"condition_name": "$CONDITION_NAME",
|
435
447
|
"policy_name": "$POLICY_NAME"
|
436
448
|
}
|
437
449
|
}
|
450
|
+
|
438
451
|
\"\"\",
|
439
|
-
|
452
|
+
payload_type="application/json",
|
453
|
+
),
|
454
|
+
type="webhook")
|
440
455
|
```
|
456
|
+
<!--End PulumiCodeChooser -->
|
441
457
|
|
442
458
|
## Import
|
443
459
|
|
@@ -504,10 +520,10 @@ class AlertChannel(pulumi.CustomResource):
|
|
504
520
|
:param str resource_name: The unique name of the resulting resource.
|
505
521
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
506
522
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
507
|
-
:param pulumi.Input[int] account_id:
|
508
|
-
:param pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']] config:
|
509
|
-
:param pulumi.Input[str] name:
|
510
|
-
:param pulumi.Input[str] type:
|
523
|
+
:param pulumi.Input[int] account_id: Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
|
524
|
+
:param pulumi.Input[pulumi.InputType['AlertChannelConfigArgs']] config: A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
|
525
|
+
:param pulumi.Input[str] name: The name of the channel.
|
526
|
+
:param pulumi.Input[str] type: The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
|
511
527
|
"""
|
512
528
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
513
529
|
|
@@ -523,7 +539,7 @@ class AlertChannel(pulumi.CustomResource):
|
|
523
539
|
@pulumi.getter(name="accountId")
|
524
540
|
def account_id(self) -> pulumi.Output[int]:
|
525
541
|
"""
|
526
|
-
|
542
|
+
Determines the New Relic account where the alert channel will be created. Defaults to the account associated with the API key used.
|
527
543
|
"""
|
528
544
|
return pulumi.get(self, "account_id")
|
529
545
|
|
@@ -531,7 +547,7 @@ class AlertChannel(pulumi.CustomResource):
|
|
531
547
|
@pulumi.getter
|
532
548
|
def config(self) -> pulumi.Output[Optional['outputs.AlertChannelConfig']]:
|
533
549
|
"""
|
534
|
-
|
550
|
+
A nested block that describes an alert channel configuration. Only one config block is permitted per alert channel definition. See Nested config blocks below for details.
|
535
551
|
"""
|
536
552
|
return pulumi.get(self, "config")
|
537
553
|
|
@@ -539,7 +555,7 @@ class AlertChannel(pulumi.CustomResource):
|
|
539
555
|
@pulumi.getter
|
540
556
|
def name(self) -> pulumi.Output[str]:
|
541
557
|
"""
|
542
|
-
|
558
|
+
The name of the channel.
|
543
559
|
"""
|
544
560
|
return pulumi.get(self, "name")
|
545
561
|
|
@@ -547,7 +563,7 @@ class AlertChannel(pulumi.CustomResource):
|
|
547
563
|
@pulumi.getter
|
548
564
|
def type(self) -> pulumi.Output[str]:
|
549
565
|
"""
|
550
|
-
|
566
|
+
The type of channel. One of: `email`, `slack`, `opsgenie`, `pagerduty`, `victorops`, or `webhook`.
|
551
567
|
"""
|
552
568
|
return pulumi.get(self, "type")
|
553
569
|
|