pulumi-newrelic 5.21.0a1710157101__py3-none-any.whl → 5.39.0a1736849617__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pulumi_newrelic/__init__.py +9 -0
- pulumi_newrelic/_inputs.py +7153 -461
- pulumi_newrelic/_utilities.py +41 -5
- pulumi_newrelic/account_management.py +11 -6
- pulumi_newrelic/alert_channel.py +116 -127
- pulumi_newrelic/alert_condition.py +116 -129
- pulumi_newrelic/alert_muting_rule.py +128 -76
- pulumi_newrelic/alert_policy.py +78 -75
- pulumi_newrelic/alert_policy_channel.py +77 -68
- pulumi_newrelic/api_access_key.py +45 -28
- pulumi_newrelic/browser_application.py +77 -78
- pulumi_newrelic/cloud/_inputs.py +2527 -1082
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +133 -128
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +23 -20
- pulumi_newrelic/cloud/aws_integrations.py +298 -1326
- pulumi_newrelic/cloud/aws_link_account.py +23 -20
- pulumi_newrelic/cloud/azure_integrations.py +521 -483
- pulumi_newrelic/cloud/azure_link_account.py +34 -31
- pulumi_newrelic/cloud/gcp_integrations.py +341 -322
- pulumi_newrelic/cloud/gcp_link_account.py +23 -20
- pulumi_newrelic/cloud/outputs.py +327 -1072
- pulumi_newrelic/config/__init__.pyi +6 -1
- pulumi_newrelic/config/vars.py +7 -2
- pulumi_newrelic/data_partition_rule.py +19 -18
- pulumi_newrelic/entity_tags.py +32 -31
- pulumi_newrelic/events_to_metrics_rule.py +23 -20
- pulumi_newrelic/get_account.py +24 -16
- pulumi_newrelic/get_alert_channel.py +26 -13
- pulumi_newrelic/get_alert_policy.py +35 -12
- pulumi_newrelic/get_application.py +39 -31
- pulumi_newrelic/get_authentication_domain.py +17 -13
- pulumi_newrelic/get_cloud_account.py +26 -18
- pulumi_newrelic/get_entity.py +90 -147
- pulumi_newrelic/get_group.py +58 -13
- pulumi_newrelic/get_key_transaction.py +109 -34
- pulumi_newrelic/get_notification_destination.py +64 -14
- pulumi_newrelic/get_obfuscation_expression.py +36 -28
- pulumi_newrelic/get_service_level_alert_helper.py +135 -117
- pulumi_newrelic/get_test_grok_pattern.py +29 -18
- pulumi_newrelic/get_user.py +17 -9
- pulumi_newrelic/group.py +5 -146
- pulumi_newrelic/infra_alert_condition.py +160 -167
- pulumi_newrelic/insights/_inputs.py +43 -0
- pulumi_newrelic/insights/event.py +48 -47
- pulumi_newrelic/insights/outputs.py +5 -0
- pulumi_newrelic/key_transaction.py +464 -0
- pulumi_newrelic/log_parsing_rule.py +25 -24
- pulumi_newrelic/monitor_downtime.py +211 -225
- pulumi_newrelic/notification_channel.py +381 -366
- pulumi_newrelic/notification_destination.py +192 -54
- pulumi_newrelic/nrql_alert_condition.py +345 -262
- pulumi_newrelic/nrql_drop_rule.py +31 -30
- pulumi_newrelic/obfuscation_expression.py +23 -20
- pulumi_newrelic/obfuscation_rule.py +38 -33
- pulumi_newrelic/one_dashboard.py +29 -24
- pulumi_newrelic/one_dashboard_json.py +19 -14
- pulumi_newrelic/one_dashboard_raw.py +110 -105
- pulumi_newrelic/outputs.py +2446 -245
- pulumi_newrelic/plugins/_inputs.py +145 -10
- pulumi_newrelic/plugins/application_settings.py +25 -36
- pulumi_newrelic/plugins/outputs.py +15 -10
- pulumi_newrelic/plugins/workload.py +215 -92
- pulumi_newrelic/provider.py +27 -33
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +185 -186
- pulumi_newrelic/synthetics/_inputs.py +159 -2
- pulumi_newrelic/synthetics/alert_condition.py +87 -98
- pulumi_newrelic/synthetics/broken_links_monitor.py +216 -99
- pulumi_newrelic/synthetics/cert_check_monitor.py +219 -100
- pulumi_newrelic/synthetics/get_private_location.py +34 -30
- pulumi_newrelic/synthetics/get_secure_credential.py +24 -16
- pulumi_newrelic/synthetics/monitor.py +348 -193
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +105 -100
- pulumi_newrelic/synthetics/outputs.py +7 -2
- pulumi_newrelic/synthetics/private_location.py +25 -20
- pulumi_newrelic/synthetics/script_monitor.py +317 -182
- pulumi_newrelic/synthetics/secure_credential.py +23 -22
- pulumi_newrelic/synthetics/step_monitor.py +405 -100
- pulumi_newrelic/user.py +13 -10
- pulumi_newrelic/workflow.py +209 -196
- {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736849617.dist-info}/METADATA +7 -6
- pulumi_newrelic-5.39.0a1736849617.dist-info/RECORD +90 -0
- {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736849617.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.21.0a1710157101.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736849617.dist-info}/top_level.txt +0 -0
pulumi_newrelic/alert_policy.py
CHANGED
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
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
|
|
12
17
|
__all__ = ['AlertPolicyArgs', 'AlertPolicy']
|
@@ -14,14 +19,14 @@ __all__ = ['AlertPolicyArgs', 'AlertPolicy']
|
|
14
19
|
@pulumi.input_type
|
15
20
|
class AlertPolicyArgs:
|
16
21
|
def __init__(__self__, *,
|
17
|
-
account_id: Optional[pulumi.Input[
|
18
|
-
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
22
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
23
|
+
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
19
24
|
incident_preference: Optional[pulumi.Input[str]] = None,
|
20
25
|
name: Optional[pulumi.Input[str]] = None):
|
21
26
|
"""
|
22
27
|
The set of arguments for constructing a AlertPolicy resource.
|
23
|
-
:param pulumi.Input[
|
24
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
28
|
+
:param pulumi.Input[str] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
29
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
|
25
30
|
:param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
|
26
31
|
:param pulumi.Input[str] name: The name of the policy.
|
27
32
|
"""
|
@@ -39,29 +44,27 @@ class AlertPolicyArgs:
|
|
39
44
|
|
40
45
|
@property
|
41
46
|
@pulumi.getter(name="accountId")
|
42
|
-
def account_id(self) -> Optional[pulumi.Input[
|
47
|
+
def account_id(self) -> Optional[pulumi.Input[str]]:
|
43
48
|
"""
|
44
49
|
The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
45
50
|
"""
|
46
51
|
return pulumi.get(self, "account_id")
|
47
52
|
|
48
53
|
@account_id.setter
|
49
|
-
def account_id(self, value: Optional[pulumi.Input[
|
54
|
+
def account_id(self, value: Optional[pulumi.Input[str]]):
|
50
55
|
pulumi.set(self, "account_id", value)
|
51
56
|
|
52
57
|
@property
|
53
58
|
@pulumi.getter(name="channelIds")
|
54
|
-
|
59
|
+
@_utilities.deprecated("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
|
60
|
+
def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
55
61
|
"""
|
56
62
|
An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
|
57
63
|
"""
|
58
|
-
warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
|
59
|
-
pulumi.log.warn("""channel_ids is deprecated: The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
|
60
|
-
|
61
64
|
return pulumi.get(self, "channel_ids")
|
62
65
|
|
63
66
|
@channel_ids.setter
|
64
|
-
def channel_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[
|
67
|
+
def channel_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
65
68
|
pulumi.set(self, "channel_ids", value)
|
66
69
|
|
67
70
|
@property
|
@@ -92,14 +95,14 @@ class AlertPolicyArgs:
|
|
92
95
|
@pulumi.input_type
|
93
96
|
class _AlertPolicyState:
|
94
97
|
def __init__(__self__, *,
|
95
|
-
account_id: Optional[pulumi.Input[
|
96
|
-
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
98
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
99
|
+
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
97
100
|
incident_preference: Optional[pulumi.Input[str]] = None,
|
98
101
|
name: Optional[pulumi.Input[str]] = None):
|
99
102
|
"""
|
100
103
|
Input properties used for looking up and filtering AlertPolicy resources.
|
101
|
-
:param pulumi.Input[
|
102
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
104
|
+
:param pulumi.Input[str] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
105
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
|
103
106
|
:param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
|
104
107
|
:param pulumi.Input[str] name: The name of the policy.
|
105
108
|
"""
|
@@ -117,29 +120,27 @@ class _AlertPolicyState:
|
|
117
120
|
|
118
121
|
@property
|
119
122
|
@pulumi.getter(name="accountId")
|
120
|
-
def account_id(self) -> Optional[pulumi.Input[
|
123
|
+
def account_id(self) -> Optional[pulumi.Input[str]]:
|
121
124
|
"""
|
122
125
|
The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
123
126
|
"""
|
124
127
|
return pulumi.get(self, "account_id")
|
125
128
|
|
126
129
|
@account_id.setter
|
127
|
-
def account_id(self, value: Optional[pulumi.Input[
|
130
|
+
def account_id(self, value: Optional[pulumi.Input[str]]):
|
128
131
|
pulumi.set(self, "account_id", value)
|
129
132
|
|
130
133
|
@property
|
131
134
|
@pulumi.getter(name="channelIds")
|
132
|
-
|
135
|
+
@_utilities.deprecated("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
|
136
|
+
def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
133
137
|
"""
|
134
138
|
An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
|
135
139
|
"""
|
136
|
-
warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
|
137
|
-
pulumi.log.warn("""channel_ids is deprecated: The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
|
138
|
-
|
139
140
|
return pulumi.get(self, "channel_ids")
|
140
141
|
|
141
142
|
@channel_ids.setter
|
142
|
-
def channel_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[
|
143
|
+
def channel_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
143
144
|
pulumi.set(self, "channel_ids", value)
|
144
145
|
|
145
146
|
@property
|
@@ -172,8 +173,8 @@ class AlertPolicy(pulumi.CustomResource):
|
|
172
173
|
def __init__(__self__,
|
173
174
|
resource_name: str,
|
174
175
|
opts: Optional[pulumi.ResourceOptions] = None,
|
175
|
-
account_id: Optional[pulumi.Input[
|
176
|
-
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
176
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
177
|
+
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
177
178
|
incident_preference: Optional[pulumi.Input[str]] = None,
|
178
179
|
name: Optional[pulumi.Input[str]] = None,
|
179
180
|
__props__=None):
|
@@ -184,14 +185,14 @@ class AlertPolicy(pulumi.CustomResource):
|
|
184
185
|
|
185
186
|
### Basic Usage
|
186
187
|
|
187
|
-
<!--Start PulumiCodeChooser -->
|
188
188
|
```python
|
189
189
|
import pulumi
|
190
190
|
import pulumi_newrelic as newrelic
|
191
191
|
|
192
|
-
foo = newrelic.AlertPolicy("foo",
|
192
|
+
foo = newrelic.AlertPolicy("foo",
|
193
|
+
name="example",
|
194
|
+
incident_preference="PER_POLICY")
|
193
195
|
```
|
194
|
-
<!--End PulumiCodeChooser -->
|
195
196
|
|
196
197
|
### Provision multiple notification channels and add those channels to a policy
|
197
198
|
|
@@ -208,52 +209,54 @@ class AlertPolicy(pulumi.CustomResource):
|
|
208
209
|
## Additional Examples
|
209
210
|
|
210
211
|
##### Provision multiple notification channels and add those channels to a policy
|
211
|
-
<!--Start PulumiCodeChooser -->
|
212
212
|
```python
|
213
213
|
import pulumi
|
214
214
|
import pulumi_newrelic as newrelic
|
215
215
|
|
216
216
|
# Provision a Slack notification channel.
|
217
|
-
slack_channel = newrelic.AlertChannel("
|
217
|
+
slack_channel = newrelic.AlertChannel("slack_channel",
|
218
|
+
name="slack-example",
|
218
219
|
type="slack",
|
219
|
-
config=
|
220
|
-
url
|
221
|
-
channel
|
222
|
-
)
|
220
|
+
config={
|
221
|
+
"url": "https://hooks.slack.com/services/xxxxxxx/yyyyyyyy",
|
222
|
+
"channel": "example-alerts-channel",
|
223
|
+
})
|
223
224
|
# Provision an email notification channel.
|
224
|
-
email_channel = newrelic.AlertChannel("
|
225
|
+
email_channel = newrelic.AlertChannel("email_channel",
|
226
|
+
name="email-example",
|
225
227
|
type="email",
|
226
|
-
config=
|
227
|
-
recipients
|
228
|
-
include_json_attachment
|
229
|
-
)
|
228
|
+
config={
|
229
|
+
"recipients": "example@testing.com",
|
230
|
+
"include_json_attachment": "1",
|
231
|
+
})
|
230
232
|
# Provision the alert policy.
|
231
|
-
policy_with_channels = newrelic.AlertPolicy("
|
233
|
+
policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
|
234
|
+
name="example-with-channels",
|
232
235
|
incident_preference="PER_CONDITION",
|
233
236
|
channel_ids=[
|
234
237
|
slack_channel.id,
|
235
238
|
email_channel.id,
|
236
239
|
])
|
237
240
|
```
|
238
|
-
<!--End PulumiCodeChooser -->
|
239
241
|
|
240
242
|
### Reference existing notification channels and add those channel to a policy
|
241
|
-
<!--Start PulumiCodeChooser -->
|
242
243
|
```python
|
243
244
|
import pulumi
|
244
245
|
import pulumi_newrelic as newrelic
|
245
246
|
|
247
|
+
# Reference an existing Slack notification channel.
|
246
248
|
slack_channel = newrelic.get_alert_channel(name="slack-channel-notification")
|
249
|
+
# Reference an existing email notification channel.
|
247
250
|
email_channel = newrelic.get_alert_channel(name="test@example.com")
|
248
251
|
# Provision the alert policy.
|
249
|
-
policy_with_channels = newrelic.AlertPolicy("
|
252
|
+
policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
|
253
|
+
name="example-with-channels",
|
250
254
|
incident_preference="PER_CONDITION",
|
251
255
|
channel_ids=[
|
252
256
|
slack_channel.id,
|
253
257
|
email_channel.id,
|
254
258
|
])
|
255
259
|
```
|
256
|
-
<!--End PulumiCodeChooser -->
|
257
260
|
|
258
261
|
## Import
|
259
262
|
|
@@ -268,8 +271,8 @@ class AlertPolicy(pulumi.CustomResource):
|
|
268
271
|
|
269
272
|
:param str resource_name: The name of the resource.
|
270
273
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
271
|
-
:param pulumi.Input[
|
272
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
274
|
+
:param pulumi.Input[str] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
275
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
|
273
276
|
:param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
|
274
277
|
:param pulumi.Input[str] name: The name of the policy.
|
275
278
|
"""
|
@@ -286,14 +289,14 @@ class AlertPolicy(pulumi.CustomResource):
|
|
286
289
|
|
287
290
|
### Basic Usage
|
288
291
|
|
289
|
-
<!--Start PulumiCodeChooser -->
|
290
292
|
```python
|
291
293
|
import pulumi
|
292
294
|
import pulumi_newrelic as newrelic
|
293
295
|
|
294
|
-
foo = newrelic.AlertPolicy("foo",
|
296
|
+
foo = newrelic.AlertPolicy("foo",
|
297
|
+
name="example",
|
298
|
+
incident_preference="PER_POLICY")
|
295
299
|
```
|
296
|
-
<!--End PulumiCodeChooser -->
|
297
300
|
|
298
301
|
### Provision multiple notification channels and add those channels to a policy
|
299
302
|
|
@@ -310,52 +313,54 @@ class AlertPolicy(pulumi.CustomResource):
|
|
310
313
|
## Additional Examples
|
311
314
|
|
312
315
|
##### Provision multiple notification channels and add those channels to a policy
|
313
|
-
<!--Start PulumiCodeChooser -->
|
314
316
|
```python
|
315
317
|
import pulumi
|
316
318
|
import pulumi_newrelic as newrelic
|
317
319
|
|
318
320
|
# Provision a Slack notification channel.
|
319
|
-
slack_channel = newrelic.AlertChannel("
|
321
|
+
slack_channel = newrelic.AlertChannel("slack_channel",
|
322
|
+
name="slack-example",
|
320
323
|
type="slack",
|
321
|
-
config=
|
322
|
-
url
|
323
|
-
channel
|
324
|
-
)
|
324
|
+
config={
|
325
|
+
"url": "https://hooks.slack.com/services/xxxxxxx/yyyyyyyy",
|
326
|
+
"channel": "example-alerts-channel",
|
327
|
+
})
|
325
328
|
# Provision an email notification channel.
|
326
|
-
email_channel = newrelic.AlertChannel("
|
329
|
+
email_channel = newrelic.AlertChannel("email_channel",
|
330
|
+
name="email-example",
|
327
331
|
type="email",
|
328
|
-
config=
|
329
|
-
recipients
|
330
|
-
include_json_attachment
|
331
|
-
)
|
332
|
+
config={
|
333
|
+
"recipients": "example@testing.com",
|
334
|
+
"include_json_attachment": "1",
|
335
|
+
})
|
332
336
|
# Provision the alert policy.
|
333
|
-
policy_with_channels = newrelic.AlertPolicy("
|
337
|
+
policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
|
338
|
+
name="example-with-channels",
|
334
339
|
incident_preference="PER_CONDITION",
|
335
340
|
channel_ids=[
|
336
341
|
slack_channel.id,
|
337
342
|
email_channel.id,
|
338
343
|
])
|
339
344
|
```
|
340
|
-
<!--End PulumiCodeChooser -->
|
341
345
|
|
342
346
|
### Reference existing notification channels and add those channel to a policy
|
343
|
-
<!--Start PulumiCodeChooser -->
|
344
347
|
```python
|
345
348
|
import pulumi
|
346
349
|
import pulumi_newrelic as newrelic
|
347
350
|
|
351
|
+
# Reference an existing Slack notification channel.
|
348
352
|
slack_channel = newrelic.get_alert_channel(name="slack-channel-notification")
|
353
|
+
# Reference an existing email notification channel.
|
349
354
|
email_channel = newrelic.get_alert_channel(name="test@example.com")
|
350
355
|
# Provision the alert policy.
|
351
|
-
policy_with_channels = newrelic.AlertPolicy("
|
356
|
+
policy_with_channels = newrelic.AlertPolicy("policy_with_channels",
|
357
|
+
name="example-with-channels",
|
352
358
|
incident_preference="PER_CONDITION",
|
353
359
|
channel_ids=[
|
354
360
|
slack_channel.id,
|
355
361
|
email_channel.id,
|
356
362
|
])
|
357
363
|
```
|
358
|
-
<!--End PulumiCodeChooser -->
|
359
364
|
|
360
365
|
## Import
|
361
366
|
|
@@ -383,8 +388,8 @@ class AlertPolicy(pulumi.CustomResource):
|
|
383
388
|
def _internal_init(__self__,
|
384
389
|
resource_name: str,
|
385
390
|
opts: Optional[pulumi.ResourceOptions] = None,
|
386
|
-
account_id: Optional[pulumi.Input[
|
387
|
-
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
391
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
392
|
+
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
388
393
|
incident_preference: Optional[pulumi.Input[str]] = None,
|
389
394
|
name: Optional[pulumi.Input[str]] = None,
|
390
395
|
__props__=None):
|
@@ -410,8 +415,8 @@ class AlertPolicy(pulumi.CustomResource):
|
|
410
415
|
def get(resource_name: str,
|
411
416
|
id: pulumi.Input[str],
|
412
417
|
opts: Optional[pulumi.ResourceOptions] = None,
|
413
|
-
account_id: Optional[pulumi.Input[
|
414
|
-
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
418
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
419
|
+
channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
415
420
|
incident_preference: Optional[pulumi.Input[str]] = None,
|
416
421
|
name: Optional[pulumi.Input[str]] = None) -> 'AlertPolicy':
|
417
422
|
"""
|
@@ -421,8 +426,8 @@ class AlertPolicy(pulumi.CustomResource):
|
|
421
426
|
:param str resource_name: The unique name of the resulting resource.
|
422
427
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
423
428
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
424
|
-
:param pulumi.Input[
|
425
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
429
|
+
:param pulumi.Input[str] account_id: The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
430
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] channel_ids: An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
|
426
431
|
:param pulumi.Input[str] incident_preference: The rollup strategy for the policy. Options include: `PER_POLICY`, `PER_CONDITION`, or `PER_CONDITION_AND_TARGET`. The default is `PER_POLICY`.
|
427
432
|
:param pulumi.Input[str] name: The name of the policy.
|
428
433
|
"""
|
@@ -438,7 +443,7 @@ class AlertPolicy(pulumi.CustomResource):
|
|
438
443
|
|
439
444
|
@property
|
440
445
|
@pulumi.getter(name="accountId")
|
441
|
-
def account_id(self) -> pulumi.Output[
|
446
|
+
def account_id(self) -> pulumi.Output[str]:
|
442
447
|
"""
|
443
448
|
The New Relic account ID to operate on. This allows the user to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
444
449
|
"""
|
@@ -446,13 +451,11 @@ class AlertPolicy(pulumi.CustomResource):
|
|
446
451
|
|
447
452
|
@property
|
448
453
|
@pulumi.getter(name="channelIds")
|
449
|
-
|
454
|
+
@_utilities.deprecated("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
|
455
|
+
def channel_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
450
456
|
"""
|
451
457
|
An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
|
452
458
|
"""
|
453
|
-
warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
|
454
|
-
pulumi.log.warn("""channel_ids is deprecated: The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
|
455
|
-
|
456
459
|
return pulumi.get(self, "channel_ids")
|
457
460
|
|
458
461
|
@property
|