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
|
|
|
@@ -23,8 +28,8 @@ class GetAlertChannelResult:
|
|
|
23
28
|
A collection of values returned by getAlertChannel.
|
|
24
29
|
"""
|
|
25
30
|
def __init__(__self__, account_id=None, config=None, id=None, name=None, policy_ids=None, type=None):
|
|
26
|
-
if account_id and not isinstance(account_id,
|
|
27
|
-
raise TypeError("Expected argument 'account_id' to be a
|
|
31
|
+
if account_id and not isinstance(account_id, str):
|
|
32
|
+
raise TypeError("Expected argument 'account_id' to be a str")
|
|
28
33
|
pulumi.set(__self__, "account_id", account_id)
|
|
29
34
|
if config and not isinstance(config, dict):
|
|
30
35
|
raise TypeError("Expected argument 'config' to be a dict")
|
|
@@ -42,12 +47,12 @@ class GetAlertChannelResult:
|
|
|
42
47
|
raise TypeError("Expected argument 'type' to be a str")
|
|
43
48
|
pulumi.set(__self__, "type", type)
|
|
44
49
|
|
|
45
|
-
@property
|
|
50
|
+
@_builtins.property
|
|
46
51
|
@pulumi.getter(name="accountId")
|
|
47
|
-
def account_id(self) ->
|
|
52
|
+
def account_id(self) -> _builtins.str:
|
|
48
53
|
return pulumi.get(self, "account_id")
|
|
49
54
|
|
|
50
|
-
@property
|
|
55
|
+
@_builtins.property
|
|
51
56
|
@pulumi.getter
|
|
52
57
|
def config(self) -> 'outputs.GetAlertChannelConfigResult':
|
|
53
58
|
"""
|
|
@@ -55,30 +60,30 @@ class GetAlertChannelResult:
|
|
|
55
60
|
"""
|
|
56
61
|
return pulumi.get(self, "config")
|
|
57
62
|
|
|
58
|
-
@property
|
|
63
|
+
@_builtins.property
|
|
59
64
|
@pulumi.getter
|
|
60
|
-
def id(self) -> str:
|
|
65
|
+
def id(self) -> _builtins.str:
|
|
61
66
|
"""
|
|
62
67
|
The provider-assigned unique ID for this managed resource.
|
|
63
68
|
"""
|
|
64
69
|
return pulumi.get(self, "id")
|
|
65
70
|
|
|
66
|
-
@property
|
|
71
|
+
@_builtins.property
|
|
67
72
|
@pulumi.getter
|
|
68
|
-
def name(self) -> str:
|
|
73
|
+
def name(self) -> _builtins.str:
|
|
69
74
|
return pulumi.get(self, "name")
|
|
70
75
|
|
|
71
|
-
@property
|
|
76
|
+
@_builtins.property
|
|
72
77
|
@pulumi.getter(name="policyIds")
|
|
73
|
-
def policy_ids(self) -> Sequence[
|
|
78
|
+
def policy_ids(self) -> Sequence[_builtins.str]:
|
|
74
79
|
"""
|
|
75
80
|
A list of policy IDs associated with the alert channel.
|
|
76
81
|
"""
|
|
77
82
|
return pulumi.get(self, "policy_ids")
|
|
78
83
|
|
|
79
|
-
@property
|
|
84
|
+
@_builtins.property
|
|
80
85
|
@pulumi.getter
|
|
81
|
-
def type(self) -> str:
|
|
86
|
+
def type(self) -> _builtins.str:
|
|
82
87
|
"""
|
|
83
88
|
Alert channel type, either: `email`, `opsgenie`, `pagerduty`, `slack`, `victorops`, or `webhook`.
|
|
84
89
|
"""
|
|
@@ -99,17 +104,33 @@ class AwaitableGetAlertChannelResult(GetAlertChannelResult):
|
|
|
99
104
|
type=self.type)
|
|
100
105
|
|
|
101
106
|
|
|
102
|
-
def get_alert_channel(account_id: Optional[
|
|
103
|
-
name: Optional[str] = None,
|
|
107
|
+
def get_alert_channel(account_id: Optional[_builtins.str] = None,
|
|
108
|
+
name: Optional[_builtins.str] = None,
|
|
104
109
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlertChannelResult:
|
|
105
110
|
"""
|
|
106
111
|
Use this data source to get information about a specific alert channel in New Relic that already exists.
|
|
107
112
|
|
|
108
113
|
> **WARNING:** The `AlertChannel` data source is deprecated and will be removed in the next major release.
|
|
109
114
|
|
|
115
|
+
## Example Usage
|
|
110
116
|
|
|
111
|
-
|
|
112
|
-
|
|
117
|
+
```python
|
|
118
|
+
import pulumi
|
|
119
|
+
import pulumi_newrelic as newrelic
|
|
120
|
+
|
|
121
|
+
# Data source
|
|
122
|
+
foo = newrelic.get_alert_channel(name="foo@example.com")
|
|
123
|
+
# Resource
|
|
124
|
+
foo_alert_policy = newrelic.AlertPolicy("foo", name="foo")
|
|
125
|
+
# Using the data source and resource together
|
|
126
|
+
foo_alert_policy_channel = newrelic.AlertPolicyChannel("foo",
|
|
127
|
+
policy_id=foo_alert_policy.id,
|
|
128
|
+
channel_id=foo.id)
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
:param _builtins.str account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
133
|
+
:param _builtins.str name: The name of the alert channel in New Relic.
|
|
113
134
|
"""
|
|
114
135
|
__args__ = dict()
|
|
115
136
|
__args__['accountId'] = account_id
|
|
@@ -124,19 +145,43 @@ def get_alert_channel(account_id: Optional[int] = None,
|
|
|
124
145
|
name=pulumi.get(__ret__, 'name'),
|
|
125
146
|
policy_ids=pulumi.get(__ret__, 'policy_ids'),
|
|
126
147
|
type=pulumi.get(__ret__, 'type'))
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
def get_alert_channel_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
131
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
132
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAlertChannelResult]:
|
|
148
|
+
def get_alert_channel_output(account_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
149
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
150
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlertChannelResult]:
|
|
133
151
|
"""
|
|
134
152
|
Use this data source to get information about a specific alert channel in New Relic that already exists.
|
|
135
153
|
|
|
136
154
|
> **WARNING:** The `AlertChannel` data source is deprecated and will be removed in the next major release.
|
|
137
155
|
|
|
156
|
+
## Example Usage
|
|
157
|
+
|
|
158
|
+
```python
|
|
159
|
+
import pulumi
|
|
160
|
+
import pulumi_newrelic as newrelic
|
|
138
161
|
|
|
139
|
-
|
|
140
|
-
|
|
162
|
+
# Data source
|
|
163
|
+
foo = newrelic.get_alert_channel(name="foo@example.com")
|
|
164
|
+
# Resource
|
|
165
|
+
foo_alert_policy = newrelic.AlertPolicy("foo", name="foo")
|
|
166
|
+
# Using the data source and resource together
|
|
167
|
+
foo_alert_policy_channel = newrelic.AlertPolicyChannel("foo",
|
|
168
|
+
policy_id=foo_alert_policy.id,
|
|
169
|
+
channel_id=foo.id)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
:param _builtins.str account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
174
|
+
:param _builtins.str name: The name of the alert channel in New Relic.
|
|
141
175
|
"""
|
|
142
|
-
|
|
176
|
+
__args__ = dict()
|
|
177
|
+
__args__['accountId'] = account_id
|
|
178
|
+
__args__['name'] = name
|
|
179
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
180
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getAlertChannel:getAlertChannel', __args__, opts=opts, typ=GetAlertChannelResult)
|
|
181
|
+
return __ret__.apply(lambda __response__: GetAlertChannelResult(
|
|
182
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
|
183
|
+
config=pulumi.get(__response__, 'config'),
|
|
184
|
+
id=pulumi.get(__response__, 'id'),
|
|
185
|
+
name=pulumi.get(__response__, 'name'),
|
|
186
|
+
policy_ids=pulumi.get(__response__, 'policy_ids'),
|
|
187
|
+
type=pulumi.get(__response__, 'type')))
|
|
@@ -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
|
|
|
12
17
|
__all__ = [
|
|
@@ -22,8 +27,8 @@ class GetAlertPolicyResult:
|
|
|
22
27
|
A collection of values returned by getAlertPolicy.
|
|
23
28
|
"""
|
|
24
29
|
def __init__(__self__, account_id=None, created_at=None, id=None, incident_preference=None, name=None, updated_at=None):
|
|
25
|
-
if account_id and not isinstance(account_id,
|
|
26
|
-
raise TypeError("Expected argument 'account_id' to be a
|
|
30
|
+
if account_id and not isinstance(account_id, str):
|
|
31
|
+
raise TypeError("Expected argument 'account_id' to be a str")
|
|
27
32
|
pulumi.set(__self__, "account_id", account_id)
|
|
28
33
|
if created_at and not isinstance(created_at, str):
|
|
29
34
|
raise TypeError("Expected argument 'created_at' to be a str")
|
|
@@ -41,43 +46,46 @@ class GetAlertPolicyResult:
|
|
|
41
46
|
raise TypeError("Expected argument 'updated_at' to be a str")
|
|
42
47
|
pulumi.set(__self__, "updated_at", updated_at)
|
|
43
48
|
|
|
44
|
-
@property
|
|
49
|
+
@_builtins.property
|
|
45
50
|
@pulumi.getter(name="accountId")
|
|
46
|
-
def account_id(self) ->
|
|
51
|
+
def account_id(self) -> _builtins.str:
|
|
47
52
|
return pulumi.get(self, "account_id")
|
|
48
53
|
|
|
49
|
-
@property
|
|
54
|
+
@_builtins.property
|
|
50
55
|
@pulumi.getter(name="createdAt")
|
|
51
|
-
def created_at(self) -> str:
|
|
56
|
+
def created_at(self) -> _builtins.str:
|
|
52
57
|
"""
|
|
53
58
|
The time the policy was created.
|
|
54
59
|
"""
|
|
55
60
|
return pulumi.get(self, "created_at")
|
|
56
61
|
|
|
57
|
-
@property
|
|
62
|
+
@_builtins.property
|
|
58
63
|
@pulumi.getter
|
|
59
|
-
def id(self) -> str:
|
|
64
|
+
def id(self) -> _builtins.str:
|
|
60
65
|
"""
|
|
61
66
|
The provider-assigned unique ID for this managed resource.
|
|
62
67
|
"""
|
|
63
68
|
return pulumi.get(self, "id")
|
|
64
69
|
|
|
65
|
-
@property
|
|
70
|
+
@_builtins.property
|
|
66
71
|
@pulumi.getter(name="incidentPreference")
|
|
67
|
-
def incident_preference(self) -> Optional[str]:
|
|
72
|
+
def incident_preference(self) -> Optional[_builtins.str]:
|
|
68
73
|
"""
|
|
69
|
-
The rollup strategy for the policy
|
|
74
|
+
The rollup strategy for the policy, which can have one of the following values:
|
|
75
|
+
* `PER_POLICY` - Represents the incident grouping preference **One issue per policy**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-policy) for more details on this incident grouping preference.
|
|
76
|
+
* `PER_CONDITION` - Represents the incident grouping preference **One issue per condition**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-condition) for more details on this incident grouping preference.
|
|
77
|
+
* `PER_CONDITION_AND_TARGET` - Represents the incident grouping preference **One issue per condition and signal**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-signal) for more details on this incident grouping preference.
|
|
70
78
|
"""
|
|
71
79
|
return pulumi.get(self, "incident_preference")
|
|
72
80
|
|
|
73
|
-
@property
|
|
81
|
+
@_builtins.property
|
|
74
82
|
@pulumi.getter
|
|
75
|
-
def name(self) -> str:
|
|
83
|
+
def name(self) -> _builtins.str:
|
|
76
84
|
return pulumi.get(self, "name")
|
|
77
85
|
|
|
78
|
-
@property
|
|
86
|
+
@_builtins.property
|
|
79
87
|
@pulumi.getter(name="updatedAt")
|
|
80
|
-
def updated_at(self) -> str:
|
|
88
|
+
def updated_at(self) -> _builtins.str:
|
|
81
89
|
"""
|
|
82
90
|
The time the policy was last updated.
|
|
83
91
|
"""
|
|
@@ -98,17 +106,33 @@ class AwaitableGetAlertPolicyResult(GetAlertPolicyResult):
|
|
|
98
106
|
updated_at=self.updated_at)
|
|
99
107
|
|
|
100
108
|
|
|
101
|
-
def get_alert_policy(account_id: Optional[
|
|
102
|
-
incident_preference: Optional[str] = None,
|
|
103
|
-
name: Optional[str] = None,
|
|
109
|
+
def get_alert_policy(account_id: Optional[_builtins.str] = None,
|
|
110
|
+
incident_preference: Optional[_builtins.str] = None,
|
|
111
|
+
name: Optional[_builtins.str] = None,
|
|
104
112
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlertPolicyResult:
|
|
105
113
|
"""
|
|
106
114
|
Use this data source to get information about a specific alert policy in New Relic that already exists.
|
|
107
115
|
|
|
116
|
+
## Example Usage
|
|
108
117
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
118
|
+
```python
|
|
119
|
+
import pulumi
|
|
120
|
+
import pulumi_newrelic as newrelic
|
|
121
|
+
|
|
122
|
+
foo = newrelic.get_alert_channel(name="foo@example.com")
|
|
123
|
+
foo_get_alert_policy = newrelic.get_alert_policy(name="foo policy")
|
|
124
|
+
foo_alert_policy_channel = newrelic.AlertPolicyChannel("foo",
|
|
125
|
+
policy_id=foo_get_alert_policy.id,
|
|
126
|
+
channel_id=foo.id)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
:param _builtins.str account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
131
|
+
:param _builtins.str incident_preference: The rollup strategy for the policy, which can have one of the following values:
|
|
132
|
+
* `PER_POLICY` - Represents the incident grouping preference **One issue per policy**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-policy) for more details on this incident grouping preference.
|
|
133
|
+
* `PER_CONDITION` - Represents the incident grouping preference **One issue per condition**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-condition) for more details on this incident grouping preference.
|
|
134
|
+
* `PER_CONDITION_AND_TARGET` - Represents the incident grouping preference **One issue per condition and signal**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-signal) for more details on this incident grouping preference.
|
|
135
|
+
:param _builtins.str name: The name of the alert policy in New Relic.
|
|
112
136
|
"""
|
|
113
137
|
__args__ = dict()
|
|
114
138
|
__args__['accountId'] = account_id
|
|
@@ -124,19 +148,44 @@ def get_alert_policy(account_id: Optional[int] = None,
|
|
|
124
148
|
incident_preference=pulumi.get(__ret__, 'incident_preference'),
|
|
125
149
|
name=pulumi.get(__ret__, 'name'),
|
|
126
150
|
updated_at=pulumi.get(__ret__, 'updated_at'))
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
incident_preference: Optional[pulumi.Input[Optional[str]]] = None,
|
|
132
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
133
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAlertPolicyResult]:
|
|
151
|
+
def get_alert_policy_output(account_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
152
|
+
incident_preference: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
153
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
154
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlertPolicyResult]:
|
|
134
155
|
"""
|
|
135
156
|
Use this data source to get information about a specific alert policy in New Relic that already exists.
|
|
136
157
|
|
|
158
|
+
## Example Usage
|
|
159
|
+
|
|
160
|
+
```python
|
|
161
|
+
import pulumi
|
|
162
|
+
import pulumi_newrelic as newrelic
|
|
137
163
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
164
|
+
foo = newrelic.get_alert_channel(name="foo@example.com")
|
|
165
|
+
foo_get_alert_policy = newrelic.get_alert_policy(name="foo policy")
|
|
166
|
+
foo_alert_policy_channel = newrelic.AlertPolicyChannel("foo",
|
|
167
|
+
policy_id=foo_get_alert_policy.id,
|
|
168
|
+
channel_id=foo.id)
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
:param _builtins.str account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
|
173
|
+
:param _builtins.str incident_preference: The rollup strategy for the policy, which can have one of the following values:
|
|
174
|
+
* `PER_POLICY` - Represents the incident grouping preference **One issue per policy**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-policy) for more details on this incident grouping preference.
|
|
175
|
+
* `PER_CONDITION` - Represents the incident grouping preference **One issue per condition**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-condition) for more details on this incident grouping preference.
|
|
176
|
+
* `PER_CONDITION_AND_TARGET` - Represents the incident grouping preference **One issue per condition and signal**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-signal) for more details on this incident grouping preference.
|
|
177
|
+
:param _builtins.str name: The name of the alert policy in New Relic.
|
|
141
178
|
"""
|
|
142
|
-
|
|
179
|
+
__args__ = dict()
|
|
180
|
+
__args__['accountId'] = account_id
|
|
181
|
+
__args__['incidentPreference'] = incident_preference
|
|
182
|
+
__args__['name'] = name
|
|
183
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
184
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getAlertPolicy:getAlertPolicy', __args__, opts=opts, typ=GetAlertPolicyResult)
|
|
185
|
+
return __ret__.apply(lambda __response__: GetAlertPolicyResult(
|
|
186
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
|
187
|
+
created_at=pulumi.get(__response__, 'created_at'),
|
|
188
|
+
id=pulumi.get(__response__, 'id'),
|
|
189
|
+
incident_preference=pulumi.get(__response__, 'incident_preference'),
|
|
190
|
+
name=pulumi.get(__response__, 'name'),
|
|
191
|
+
updated_at=pulumi.get(__response__, 'updated_at')))
|
|
@@ -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
|
|
|
12
17
|
__all__ = [
|
|
@@ -35,33 +40,33 @@ class GetApplicationResult:
|
|
|
35
40
|
raise TypeError("Expected argument 'name' to be a str")
|
|
36
41
|
pulumi.set(__self__, "name", name)
|
|
37
42
|
|
|
38
|
-
@property
|
|
43
|
+
@_builtins.property
|
|
39
44
|
@pulumi.getter(name="hostIds")
|
|
40
|
-
def host_ids(self) -> Sequence[
|
|
45
|
+
def host_ids(self) -> Sequence[_builtins.str]:
|
|
41
46
|
"""
|
|
42
47
|
A list of host IDs associated with the application.
|
|
43
48
|
"""
|
|
44
49
|
return pulumi.get(self, "host_ids")
|
|
45
50
|
|
|
46
|
-
@property
|
|
51
|
+
@_builtins.property
|
|
47
52
|
@pulumi.getter
|
|
48
|
-
def id(self) -> str:
|
|
53
|
+
def id(self) -> _builtins.str:
|
|
49
54
|
"""
|
|
50
55
|
The provider-assigned unique ID for this managed resource.
|
|
51
56
|
"""
|
|
52
57
|
return pulumi.get(self, "id")
|
|
53
58
|
|
|
54
|
-
@property
|
|
59
|
+
@_builtins.property
|
|
55
60
|
@pulumi.getter(name="instanceIds")
|
|
56
|
-
def instance_ids(self) -> Sequence[
|
|
61
|
+
def instance_ids(self) -> Sequence[_builtins.str]:
|
|
57
62
|
"""
|
|
58
63
|
A list of instance IDs associated with the application.
|
|
59
64
|
"""
|
|
60
65
|
return pulumi.get(self, "instance_ids")
|
|
61
66
|
|
|
62
|
-
@property
|
|
67
|
+
@_builtins.property
|
|
63
68
|
@pulumi.getter
|
|
64
|
-
def name(self) -> str:
|
|
69
|
+
def name(self) -> _builtins.str:
|
|
65
70
|
return pulumi.get(self, "name")
|
|
66
71
|
|
|
67
72
|
|
|
@@ -77,7 +82,7 @@ class AwaitableGetApplicationResult(GetApplicationResult):
|
|
|
77
82
|
name=self.name)
|
|
78
83
|
|
|
79
84
|
|
|
80
|
-
def get_application(name: Optional[str] = None,
|
|
85
|
+
def get_application(name: Optional[_builtins.str] = None,
|
|
81
86
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetApplicationResult:
|
|
82
87
|
"""
|
|
83
88
|
#### DEPRECATED! Use at your own risk. Use the `get_entity` data source instead. This feature may be removed in the next major release
|
|
@@ -91,24 +96,25 @@ def get_application(name: Optional[str] = None,
|
|
|
91
96
|
import pulumi_newrelic as newrelic
|
|
92
97
|
|
|
93
98
|
app = newrelic.get_application(name="my-app")
|
|
94
|
-
|
|
95
|
-
foo_alert_condition = newrelic.AlertCondition("
|
|
96
|
-
policy_id=
|
|
99
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
100
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
|
101
|
+
policy_id=foo.id,
|
|
102
|
+
name="foo",
|
|
97
103
|
type="apm_app_metric",
|
|
98
104
|
entities=[app.id],
|
|
99
105
|
metric="apdex",
|
|
100
106
|
runbook_url="https://www.example.com",
|
|
101
|
-
terms=[
|
|
102
|
-
duration
|
|
103
|
-
operator
|
|
104
|
-
priority
|
|
105
|
-
threshold
|
|
106
|
-
time_function
|
|
107
|
-
|
|
107
|
+
terms=[{
|
|
108
|
+
"duration": 5,
|
|
109
|
+
"operator": "below",
|
|
110
|
+
"priority": "critical",
|
|
111
|
+
"threshold": 0.75,
|
|
112
|
+
"time_function": "all",
|
|
113
|
+
}])
|
|
108
114
|
```
|
|
109
115
|
|
|
110
116
|
|
|
111
|
-
:param str name: The name of the application in New Relic.
|
|
117
|
+
:param _builtins.str name: The name of the application in New Relic.
|
|
112
118
|
"""
|
|
113
119
|
__args__ = dict()
|
|
114
120
|
__args__['name'] = name
|
|
@@ -120,11 +126,8 @@ def get_application(name: Optional[str] = None,
|
|
|
120
126
|
id=pulumi.get(__ret__, 'id'),
|
|
121
127
|
instance_ids=pulumi.get(__ret__, 'instance_ids'),
|
|
122
128
|
name=pulumi.get(__ret__, 'name'))
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
@_utilities.lift_output_func(get_application)
|
|
126
|
-
def get_application_output(name: Optional[pulumi.Input[str]] = None,
|
|
127
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetApplicationResult]:
|
|
129
|
+
def get_application_output(name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
130
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetApplicationResult]:
|
|
128
131
|
"""
|
|
129
132
|
#### DEPRECATED! Use at your own risk. Use the `get_entity` data source instead. This feature may be removed in the next major release
|
|
130
133
|
|
|
@@ -137,23 +140,32 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
|
|
|
137
140
|
import pulumi_newrelic as newrelic
|
|
138
141
|
|
|
139
142
|
app = newrelic.get_application(name="my-app")
|
|
140
|
-
|
|
141
|
-
foo_alert_condition = newrelic.AlertCondition("
|
|
142
|
-
policy_id=
|
|
143
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
144
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
|
145
|
+
policy_id=foo.id,
|
|
146
|
+
name="foo",
|
|
143
147
|
type="apm_app_metric",
|
|
144
148
|
entities=[app.id],
|
|
145
149
|
metric="apdex",
|
|
146
150
|
runbook_url="https://www.example.com",
|
|
147
|
-
terms=[
|
|
148
|
-
duration
|
|
149
|
-
operator
|
|
150
|
-
priority
|
|
151
|
-
threshold
|
|
152
|
-
time_function
|
|
153
|
-
|
|
151
|
+
terms=[{
|
|
152
|
+
"duration": 5,
|
|
153
|
+
"operator": "below",
|
|
154
|
+
"priority": "critical",
|
|
155
|
+
"threshold": 0.75,
|
|
156
|
+
"time_function": "all",
|
|
157
|
+
}])
|
|
154
158
|
```
|
|
155
159
|
|
|
156
160
|
|
|
157
|
-
:param str name: The name of the application in New Relic.
|
|
161
|
+
:param _builtins.str name: The name of the application in New Relic.
|
|
158
162
|
"""
|
|
159
|
-
|
|
163
|
+
__args__ = dict()
|
|
164
|
+
__args__['name'] = name
|
|
165
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
166
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getApplication:getApplication', __args__, opts=opts, typ=GetApplicationResult)
|
|
167
|
+
return __ret__.apply(lambda __response__: GetApplicationResult(
|
|
168
|
+
host_ids=pulumi.get(__response__, 'host_ids'),
|
|
169
|
+
id=pulumi.get(__response__, 'id'),
|
|
170
|
+
instance_ids=pulumi.get(__response__, 'instance_ids'),
|
|
171
|
+
name=pulumi.get(__response__, 'name')))
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
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
|
|
15
|
+
from . import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
'GetAuthenticationDomainResult',
|
|
19
|
+
'AwaitableGetAuthenticationDomainResult',
|
|
20
|
+
'get_authentication_domain',
|
|
21
|
+
'get_authentication_domain_output',
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
@pulumi.output_type
|
|
25
|
+
class GetAuthenticationDomainResult:
|
|
26
|
+
"""
|
|
27
|
+
A collection of values returned by getAuthenticationDomain.
|
|
28
|
+
"""
|
|
29
|
+
def __init__(__self__, id=None, name=None):
|
|
30
|
+
if id and not isinstance(id, str):
|
|
31
|
+
raise TypeError("Expected argument 'id' to be a str")
|
|
32
|
+
pulumi.set(__self__, "id", id)
|
|
33
|
+
if name and not isinstance(name, str):
|
|
34
|
+
raise TypeError("Expected argument 'name' to be a str")
|
|
35
|
+
pulumi.set(__self__, "name", name)
|
|
36
|
+
|
|
37
|
+
@_builtins.property
|
|
38
|
+
@pulumi.getter
|
|
39
|
+
def id(self) -> _builtins.str:
|
|
40
|
+
"""
|
|
41
|
+
The ID of the matching authentication domain fetched.
|
|
42
|
+
"""
|
|
43
|
+
return pulumi.get(self, "id")
|
|
44
|
+
|
|
45
|
+
@_builtins.property
|
|
46
|
+
@pulumi.getter
|
|
47
|
+
def name(self) -> _builtins.str:
|
|
48
|
+
return pulumi.get(self, "name")
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
class AwaitableGetAuthenticationDomainResult(GetAuthenticationDomainResult):
|
|
52
|
+
# pylint: disable=using-constant-test
|
|
53
|
+
def __await__(self):
|
|
54
|
+
if False:
|
|
55
|
+
yield self
|
|
56
|
+
return GetAuthenticationDomainResult(
|
|
57
|
+
id=self.id,
|
|
58
|
+
name=self.name)
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
def get_authentication_domain(name: Optional[_builtins.str] = None,
|
|
62
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAuthenticationDomainResult:
|
|
63
|
+
"""
|
|
64
|
+
Use this data source to fetch the ID of an authentication domain belonging to your account, matching the specified name.
|
|
65
|
+
|
|
66
|
+
## Example Usage
|
|
67
|
+
|
|
68
|
+
```python
|
|
69
|
+
import pulumi
|
|
70
|
+
import pulumi_newrelic as newrelic
|
|
71
|
+
|
|
72
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
73
|
+
pulumi.export("foo", foo.id)
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
:param _builtins.str name: The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
|
|
78
|
+
"""
|
|
79
|
+
__args__ = dict()
|
|
80
|
+
__args__['name'] = name
|
|
81
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
82
|
+
__ret__ = pulumi.runtime.invoke('newrelic:index/getAuthenticationDomain:getAuthenticationDomain', __args__, opts=opts, typ=GetAuthenticationDomainResult).value
|
|
83
|
+
|
|
84
|
+
return AwaitableGetAuthenticationDomainResult(
|
|
85
|
+
id=pulumi.get(__ret__, 'id'),
|
|
86
|
+
name=pulumi.get(__ret__, 'name'))
|
|
87
|
+
def get_authentication_domain_output(name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
88
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAuthenticationDomainResult]:
|
|
89
|
+
"""
|
|
90
|
+
Use this data source to fetch the ID of an authentication domain belonging to your account, matching the specified name.
|
|
91
|
+
|
|
92
|
+
## Example Usage
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
import pulumi
|
|
96
|
+
import pulumi_newrelic as newrelic
|
|
97
|
+
|
|
98
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
99
|
+
pulumi.export("foo", foo.id)
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
:param _builtins.str name: The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
|
|
104
|
+
"""
|
|
105
|
+
__args__ = dict()
|
|
106
|
+
__args__['name'] = name
|
|
107
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
108
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getAuthenticationDomain:getAuthenticationDomain', __args__, opts=opts, typ=GetAuthenticationDomainResult)
|
|
109
|
+
return __ret__.apply(lambda __response__: GetAuthenticationDomainResult(
|
|
110
|
+
id=pulumi.get(__response__, 'id'),
|
|
111
|
+
name=pulumi.get(__response__, 'name')))
|