pulumi-newrelic 5.20.0a1709643785__py3-none-any.whl → 5.39.0a1736834464__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 +13 -4
- pulumi_newrelic/alert_channel.py +122 -101
- pulumi_newrelic/alert_condition.py +120 -109
- pulumi_newrelic/alert_muting_rule.py +130 -74
- pulumi_newrelic/alert_policy.py +88 -67
- pulumi_newrelic/alert_policy_channel.py +81 -68
- pulumi_newrelic/api_access_key.py +49 -52
- pulumi_newrelic/browser_application.py +79 -76
- pulumi_newrelic/cloud/_inputs.py +2527 -1082
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +135 -130
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +25 -18
- pulumi_newrelic/cloud/aws_integrations.py +300 -1324
- pulumi_newrelic/cloud/aws_link_account.py +25 -18
- pulumi_newrelic/cloud/azure_integrations.py +523 -481
- pulumi_newrelic/cloud/azure_link_account.py +36 -29
- pulumi_newrelic/cloud/gcp_integrations.py +343 -320
- pulumi_newrelic/cloud/gcp_link_account.py +25 -18
- 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 +23 -16
- pulumi_newrelic/entity_tags.py +36 -31
- pulumi_newrelic/events_to_metrics_rule.py +27 -20
- pulumi_newrelic/get_account.py +24 -12
- pulumi_newrelic/get_alert_channel.py +26 -13
- pulumi_newrelic/get_alert_policy.py +35 -12
- pulumi_newrelic/get_application.py +39 -27
- pulumi_newrelic/get_authentication_domain.py +17 -9
- pulumi_newrelic/get_cloud_account.py +26 -14
- pulumi_newrelic/get_entity.py +90 -85
- pulumi_newrelic/get_group.py +58 -9
- pulumi_newrelic/get_key_transaction.py +109 -30
- pulumi_newrelic/get_notification_destination.py +64 -14
- pulumi_newrelic/get_obfuscation_expression.py +36 -24
- pulumi_newrelic/get_service_level_alert_helper.py +135 -105
- pulumi_newrelic/get_test_grok_pattern.py +29 -14
- pulumi_newrelic/get_user.py +17 -5
- pulumi_newrelic/group.py +5 -132
- pulumi_newrelic/infra_alert_condition.py +157 -140
- pulumi_newrelic/insights/_inputs.py +43 -0
- pulumi_newrelic/insights/event.py +50 -43
- pulumi_newrelic/insights/outputs.py +5 -0
- pulumi_newrelic/key_transaction.py +464 -0
- pulumi_newrelic/log_parsing_rule.py +29 -18
- pulumi_newrelic/monitor_downtime.py +215 -203
- pulumi_newrelic/notification_channel.py +387 -326
- pulumi_newrelic/notification_destination.py +248 -118
- pulumi_newrelic/nrql_alert_condition.py +353 -246
- pulumi_newrelic/nrql_drop_rule.py +57 -30
- pulumi_newrelic/obfuscation_expression.py +25 -18
- pulumi_newrelic/obfuscation_rule.py +40 -31
- pulumi_newrelic/one_dashboard.py +31 -26
- pulumi_newrelic/one_dashboard_json.py +21 -16
- pulumi_newrelic/one_dashboard_raw.py +112 -101
- pulumi_newrelic/outputs.py +2446 -245
- pulumi_newrelic/plugins/_inputs.py +145 -10
- pulumi_newrelic/plugins/application_settings.py +29 -20
- pulumi_newrelic/plugins/outputs.py +15 -10
- pulumi_newrelic/plugins/workload.py +285 -54
- pulumi_newrelic/provider.py +27 -33
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +193 -180
- pulumi_newrelic/synthetics/_inputs.py +159 -2
- pulumi_newrelic/synthetics/alert_condition.py +91 -78
- pulumi_newrelic/synthetics/broken_links_monitor.py +220 -93
- pulumi_newrelic/synthetics/cert_check_monitor.py +223 -94
- pulumi_newrelic/synthetics/get_private_location.py +34 -22
- pulumi_newrelic/synthetics/get_secure_credential.py +24 -12
- pulumi_newrelic/synthetics/monitor.py +352 -179
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +109 -96
- pulumi_newrelic/synthetics/outputs.py +7 -2
- pulumi_newrelic/synthetics/private_location.py +27 -18
- pulumi_newrelic/synthetics/script_monitor.py +321 -168
- pulumi_newrelic/synthetics/secure_credential.py +25 -20
- pulumi_newrelic/synthetics/step_monitor.py +409 -98
- pulumi_newrelic/user.py +13 -6
- pulumi_newrelic/workflow.py +215 -184
- {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/METADATA +7 -6
- pulumi_newrelic-5.39.0a1736834464.dist-info/RECORD +90 -0
- {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.20.0a1709643785.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/top_level.txt +0 -0
@@ -4,11 +4,17 @@
|
|
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
|
from . import outputs
|
17
|
+
from ._inputs import *
|
12
18
|
|
13
19
|
__all__ = [
|
14
20
|
'GetNotificationDestinationResult',
|
@@ -22,13 +28,16 @@ class GetNotificationDestinationResult:
|
|
22
28
|
"""
|
23
29
|
A collection of values returned by getNotificationDestination.
|
24
30
|
"""
|
25
|
-
def __init__(__self__, account_id=None, active=None, id=None, name=None, properties=None, status=None, type=None):
|
26
|
-
if account_id and not isinstance(account_id,
|
27
|
-
raise TypeError("Expected argument 'account_id' to be a
|
31
|
+
def __init__(__self__, account_id=None, active=None, guid=None, id=None, name=None, properties=None, secure_urls=None, status=None, type=None):
|
32
|
+
if account_id and not isinstance(account_id, str):
|
33
|
+
raise TypeError("Expected argument 'account_id' to be a str")
|
28
34
|
pulumi.set(__self__, "account_id", account_id)
|
29
35
|
if active and not isinstance(active, bool):
|
30
36
|
raise TypeError("Expected argument 'active' to be a bool")
|
31
37
|
pulumi.set(__self__, "active", active)
|
38
|
+
if guid and not isinstance(guid, str):
|
39
|
+
raise TypeError("Expected argument 'guid' to be a str")
|
40
|
+
pulumi.set(__self__, "guid", guid)
|
32
41
|
if id and not isinstance(id, str):
|
33
42
|
raise TypeError("Expected argument 'id' to be a str")
|
34
43
|
pulumi.set(__self__, "id", id)
|
@@ -38,6 +47,9 @@ class GetNotificationDestinationResult:
|
|
38
47
|
if properties and not isinstance(properties, list):
|
39
48
|
raise TypeError("Expected argument 'properties' to be a list")
|
40
49
|
pulumi.set(__self__, "properties", properties)
|
50
|
+
if secure_urls and not isinstance(secure_urls, list):
|
51
|
+
raise TypeError("Expected argument 'secure_urls' to be a list")
|
52
|
+
pulumi.set(__self__, "secure_urls", secure_urls)
|
41
53
|
if status and not isinstance(status, str):
|
42
54
|
raise TypeError("Expected argument 'status' to be a str")
|
43
55
|
pulumi.set(__self__, "status", status)
|
@@ -47,7 +59,7 @@ class GetNotificationDestinationResult:
|
|
47
59
|
|
48
60
|
@property
|
49
61
|
@pulumi.getter(name="accountId")
|
50
|
-
def account_id(self) ->
|
62
|
+
def account_id(self) -> str:
|
51
63
|
return pulumi.get(self, "account_id")
|
52
64
|
|
53
65
|
@property
|
@@ -58,6 +70,14 @@ class GetNotificationDestinationResult:
|
|
58
70
|
"""
|
59
71
|
return pulumi.get(self, "active")
|
60
72
|
|
73
|
+
@property
|
74
|
+
@pulumi.getter
|
75
|
+
def guid(self) -> str:
|
76
|
+
"""
|
77
|
+
The unique entity identifier of the destination in New Relic.
|
78
|
+
"""
|
79
|
+
return pulumi.get(self, "guid")
|
80
|
+
|
61
81
|
@property
|
62
82
|
@pulumi.getter
|
63
83
|
def id(self) -> Optional[str]:
|
@@ -79,6 +99,14 @@ class GetNotificationDestinationResult:
|
|
79
99
|
"""
|
80
100
|
return pulumi.get(self, "properties")
|
81
101
|
|
102
|
+
@property
|
103
|
+
@pulumi.getter(name="secureUrls")
|
104
|
+
def secure_urls(self) -> Sequence['outputs.GetNotificationDestinationSecureUrlResult']:
|
105
|
+
"""
|
106
|
+
The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
|
107
|
+
"""
|
108
|
+
return pulumi.get(self, "secure_urls")
|
109
|
+
|
82
110
|
@property
|
83
111
|
@pulumi.getter
|
84
112
|
def status(self) -> str:
|
@@ -91,7 +119,7 @@ class GetNotificationDestinationResult:
|
|
91
119
|
@pulumi.getter
|
92
120
|
def type(self) -> str:
|
93
121
|
"""
|
94
|
-
The notification destination type, either: `EMAIL`, `SERVICE_NOW`, `WEBHOOK`, `JIRA`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`, `SLACK` and `SLACK_COLLABORATION`.
|
122
|
+
The notification destination type, either: `EMAIL`, `SERVICE_NOW`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`, `SLACK` and `SLACK_COLLABORATION`.
|
95
123
|
"""
|
96
124
|
return pulumi.get(self, "type")
|
97
125
|
|
@@ -104,55 +132,77 @@ class AwaitableGetNotificationDestinationResult(GetNotificationDestinationResult
|
|
104
132
|
return GetNotificationDestinationResult(
|
105
133
|
account_id=self.account_id,
|
106
134
|
active=self.active,
|
135
|
+
guid=self.guid,
|
107
136
|
id=self.id,
|
108
137
|
name=self.name,
|
109
138
|
properties=self.properties,
|
139
|
+
secure_urls=self.secure_urls,
|
110
140
|
status=self.status,
|
111
141
|
type=self.type)
|
112
142
|
|
113
143
|
|
114
|
-
def get_notification_destination(account_id: Optional[
|
144
|
+
def get_notification_destination(account_id: Optional[str] = None,
|
115
145
|
id: Optional[str] = None,
|
116
146
|
name: Optional[str] = None,
|
147
|
+
secure_urls: Optional[Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']]] = None,
|
117
148
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNotificationDestinationResult:
|
118
149
|
"""
|
119
150
|
Use this data source to access information about an existing resource.
|
120
151
|
|
121
|
-
:param
|
152
|
+
:param 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`.
|
122
153
|
:param str id: The id of the notification destination in New Relic.
|
123
154
|
:param str name: The name of the notification destination.
|
124
155
|
|
125
156
|
Optional:
|
157
|
+
:param Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']] secure_urls: The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
|
126
158
|
"""
|
127
159
|
__args__ = dict()
|
128
160
|
__args__['accountId'] = account_id
|
129
161
|
__args__['id'] = id
|
130
162
|
__args__['name'] = name
|
163
|
+
__args__['secureUrls'] = secure_urls
|
131
164
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
132
165
|
__ret__ = pulumi.runtime.invoke('newrelic:index/getNotificationDestination:getNotificationDestination', __args__, opts=opts, typ=GetNotificationDestinationResult).value
|
133
166
|
|
134
167
|
return AwaitableGetNotificationDestinationResult(
|
135
168
|
account_id=pulumi.get(__ret__, 'account_id'),
|
136
169
|
active=pulumi.get(__ret__, 'active'),
|
170
|
+
guid=pulumi.get(__ret__, 'guid'),
|
137
171
|
id=pulumi.get(__ret__, 'id'),
|
138
172
|
name=pulumi.get(__ret__, 'name'),
|
139
173
|
properties=pulumi.get(__ret__, 'properties'),
|
174
|
+
secure_urls=pulumi.get(__ret__, 'secure_urls'),
|
140
175
|
status=pulumi.get(__ret__, 'status'),
|
141
176
|
type=pulumi.get(__ret__, 'type'))
|
142
|
-
|
143
|
-
|
144
|
-
@_utilities.lift_output_func(get_notification_destination)
|
145
|
-
def get_notification_destination_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
177
|
+
def get_notification_destination_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
|
146
178
|
id: Optional[pulumi.Input[Optional[str]]] = None,
|
147
179
|
name: Optional[pulumi.Input[Optional[str]]] = None,
|
148
|
-
|
180
|
+
secure_urls: Optional[pulumi.Input[Optional[Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']]]]] = None,
|
181
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNotificationDestinationResult]:
|
149
182
|
"""
|
150
183
|
Use this data source to access information about an existing resource.
|
151
184
|
|
152
|
-
:param
|
185
|
+
:param 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`.
|
153
186
|
:param str id: The id of the notification destination in New Relic.
|
154
187
|
:param str name: The name of the notification destination.
|
155
188
|
|
156
189
|
Optional:
|
190
|
+
:param Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']] secure_urls: The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
|
157
191
|
"""
|
158
|
-
|
192
|
+
__args__ = dict()
|
193
|
+
__args__['accountId'] = account_id
|
194
|
+
__args__['id'] = id
|
195
|
+
__args__['name'] = name
|
196
|
+
__args__['secureUrls'] = secure_urls
|
197
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
198
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getNotificationDestination:getNotificationDestination', __args__, opts=opts, typ=GetNotificationDestinationResult)
|
199
|
+
return __ret__.apply(lambda __response__: GetNotificationDestinationResult(
|
200
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
201
|
+
active=pulumi.get(__response__, 'active'),
|
202
|
+
guid=pulumi.get(__response__, 'guid'),
|
203
|
+
id=pulumi.get(__response__, 'id'),
|
204
|
+
name=pulumi.get(__response__, 'name'),
|
205
|
+
properties=pulumi.get(__response__, 'properties'),
|
206
|
+
secure_urls=pulumi.get(__response__, 'secure_urls'),
|
207
|
+
status=pulumi.get(__response__, 'status'),
|
208
|
+
type=pulumi.get(__response__, 'type')))
|
@@ -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__ = [
|
@@ -22,8 +27,8 @@ class GetObfuscationExpressionResult:
|
|
22
27
|
A collection of values returned by getObfuscationExpression.
|
23
28
|
"""
|
24
29
|
def __init__(__self__, account_id=None, id=None, name=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 id and not isinstance(id, str):
|
29
34
|
raise TypeError("Expected argument 'id' to be a str")
|
@@ -34,7 +39,7 @@ class GetObfuscationExpressionResult:
|
|
34
39
|
|
35
40
|
@property
|
36
41
|
@pulumi.getter(name="accountId")
|
37
|
-
def account_id(self) -> Optional[
|
42
|
+
def account_id(self) -> Optional[str]:
|
38
43
|
return pulumi.get(self, "account_id")
|
39
44
|
|
40
45
|
@property
|
@@ -62,7 +67,7 @@ class AwaitableGetObfuscationExpressionResult(GetObfuscationExpressionResult):
|
|
62
67
|
name=self.name)
|
63
68
|
|
64
69
|
|
65
|
-
def get_obfuscation_expression(account_id: Optional[
|
70
|
+
def get_obfuscation_expression(account_id: Optional[str] = None,
|
66
71
|
name: Optional[str] = None,
|
67
72
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetObfuscationExpressionResult:
|
68
73
|
"""
|
@@ -74,21 +79,22 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
|
|
74
79
|
import pulumi
|
75
80
|
import pulumi_newrelic as newrelic
|
76
81
|
|
77
|
-
expression = newrelic.get_obfuscation_expression(account_id=123456,
|
82
|
+
expression = newrelic.get_obfuscation_expression(account_id="123456",
|
78
83
|
name="The expression")
|
79
84
|
rule = newrelic.ObfuscationRule("rule",
|
85
|
+
name="ruleName",
|
80
86
|
description="description of the rule",
|
81
87
|
filter="hostStatus=running",
|
82
88
|
enabled=True,
|
83
|
-
actions=[
|
84
|
-
attributes
|
85
|
-
expression_id
|
86
|
-
method
|
87
|
-
|
89
|
+
actions=[{
|
90
|
+
"attributes": ["message"],
|
91
|
+
"expression_id": expression.id,
|
92
|
+
"method": "MASK",
|
93
|
+
}])
|
88
94
|
```
|
89
95
|
|
90
96
|
|
91
|
-
:param
|
97
|
+
:param str account_id: The account id associated with the obfuscation expression. If left empty will default to account ID specified in provider level configuration.
|
92
98
|
:param str name: Name of expression.
|
93
99
|
"""
|
94
100
|
__args__ = dict()
|
@@ -101,12 +107,9 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
|
|
101
107
|
account_id=pulumi.get(__ret__, 'account_id'),
|
102
108
|
id=pulumi.get(__ret__, 'id'),
|
103
109
|
name=pulumi.get(__ret__, 'name'))
|
104
|
-
|
105
|
-
|
106
|
-
@_utilities.lift_output_func(get_obfuscation_expression)
|
107
|
-
def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
110
|
+
def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
|
108
111
|
name: Optional[pulumi.Input[str]] = None,
|
109
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetObfuscationExpressionResult]:
|
112
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetObfuscationExpressionResult]:
|
110
113
|
"""
|
111
114
|
Use this data source to get information about a specific Obfuscation Expression in New Relic that already exists.
|
112
115
|
|
@@ -116,21 +119,30 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
|
|
116
119
|
import pulumi
|
117
120
|
import pulumi_newrelic as newrelic
|
118
121
|
|
119
|
-
expression = newrelic.get_obfuscation_expression(account_id=123456,
|
122
|
+
expression = newrelic.get_obfuscation_expression(account_id="123456",
|
120
123
|
name="The expression")
|
121
124
|
rule = newrelic.ObfuscationRule("rule",
|
125
|
+
name="ruleName",
|
122
126
|
description="description of the rule",
|
123
127
|
filter="hostStatus=running",
|
124
128
|
enabled=True,
|
125
|
-
actions=[
|
126
|
-
attributes
|
127
|
-
expression_id
|
128
|
-
method
|
129
|
-
|
129
|
+
actions=[{
|
130
|
+
"attributes": ["message"],
|
131
|
+
"expression_id": expression.id,
|
132
|
+
"method": "MASK",
|
133
|
+
}])
|
130
134
|
```
|
131
135
|
|
132
136
|
|
133
|
-
:param
|
137
|
+
:param str account_id: The account id associated with the obfuscation expression. If left empty will default to account ID specified in provider level configuration.
|
134
138
|
:param str name: Name of expression.
|
135
139
|
"""
|
136
|
-
|
140
|
+
__args__ = dict()
|
141
|
+
__args__['accountId'] = account_id
|
142
|
+
__args__['name'] = name
|
143
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
144
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getObfuscationExpression:getObfuscationExpression', __args__, opts=opts, typ=GetObfuscationExpressionResult)
|
145
|
+
return __ret__.apply(lambda __response__: GetObfuscationExpressionResult(
|
146
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
147
|
+
id=pulumi.get(__response__, 'id'),
|
148
|
+
name=pulumi.get(__response__, 'name')))
|
@@ -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__ = [
|
@@ -178,27 +183,28 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
|
|
178
183
|
foo_period = 28
|
179
184
|
foo = newrelic.ServiceLevel("foo",
|
180
185
|
guid="MXxBUE18QVBQTElDQVRJT058MQ",
|
186
|
+
name="Latency",
|
181
187
|
description="Proportion of requests that are served faster than a threshold.",
|
182
|
-
events=
|
183
|
-
account_id
|
184
|
-
valid_events
|
185
|
-
from_
|
186
|
-
where
|
187
|
-
|
188
|
-
bad_events
|
189
|
-
from_
|
190
|
-
where
|
191
|
-
|
192
|
-
|
193
|
-
objective=
|
194
|
-
target
|
195
|
-
time_window
|
196
|
-
rolling
|
197
|
-
count
|
198
|
-
unit
|
199
|
-
|
200
|
-
|
201
|
-
)
|
188
|
+
events={
|
189
|
+
"account_id": "12345678",
|
190
|
+
"valid_events": {
|
191
|
+
"from_": "Transaction",
|
192
|
+
"where": "appName = 'Example application' AND (transactionType='Web')",
|
193
|
+
},
|
194
|
+
"bad_events": {
|
195
|
+
"from_": "Transaction",
|
196
|
+
"where": "appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
|
197
|
+
},
|
198
|
+
},
|
199
|
+
objective={
|
200
|
+
"target": foo_target,
|
201
|
+
"time_window": {
|
202
|
+
"rolling": {
|
203
|
+
"count": foo_period,
|
204
|
+
"unit": "DAY",
|
205
|
+
},
|
206
|
+
},
|
207
|
+
})
|
202
208
|
```
|
203
209
|
Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
|
204
210
|
Note that the Service Level was set up using bad events, that's why `is_bad_events` is set to `true`.
|
@@ -211,25 +217,26 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
|
|
211
217
|
import pulumi_newrelic as newrelic
|
212
218
|
|
213
219
|
foo_slow_burn = newrelic.get_service_level_alert_helper(alert_type="slow_burn",
|
214
|
-
sli_guid=
|
215
|
-
slo_target=
|
216
|
-
slo_period=
|
220
|
+
sli_guid=foo["sliGuid"],
|
221
|
+
slo_target=foo_target,
|
222
|
+
slo_period=foo_period,
|
217
223
|
is_bad_events=True)
|
218
|
-
your_condition = newrelic.NrqlAlertCondition("
|
219
|
-
account_id=12345678,
|
220
|
-
policy_id=67890,
|
224
|
+
your_condition = newrelic.NrqlAlertCondition("your_condition",
|
225
|
+
account_id="12345678",
|
226
|
+
policy_id="67890",
|
221
227
|
type="static",
|
228
|
+
name="Slow burn alert",
|
222
229
|
enabled=True,
|
223
230
|
violation_time_limit_seconds=259200,
|
224
|
-
nrql=
|
225
|
-
query
|
226
|
-
|
227
|
-
critical=
|
228
|
-
operator
|
229
|
-
threshold
|
230
|
-
threshold_duration
|
231
|
-
threshold_occurrences
|
232
|
-
|
231
|
+
nrql={
|
232
|
+
"query": foo_slow_burn.nrql,
|
233
|
+
},
|
234
|
+
critical={
|
235
|
+
"operator": "above_or_equals",
|
236
|
+
"threshold": foo_slow_burn.threshold,
|
237
|
+
"threshold_duration": 900,
|
238
|
+
"threshold_occurrences": "at_least_once",
|
239
|
+
},
|
233
240
|
fill_option="none",
|
234
241
|
aggregation_window=foo_slow_burn.evaluation_period,
|
235
242
|
aggregation_method="event_flow",
|
@@ -244,27 +251,28 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
|
|
244
251
|
import pulumi_newrelic as newrelic
|
245
252
|
|
246
253
|
foo_custom = newrelic.get_service_level_alert_helper(alert_type="custom",
|
247
|
-
sli_guid=
|
248
|
-
slo_target=
|
249
|
-
slo_period=
|
254
|
+
sli_guid=foo["sliGuid"],
|
255
|
+
slo_target=foo_target,
|
256
|
+
slo_period=foo_period,
|
250
257
|
custom_tolerated_budget_consumption=4,
|
251
258
|
custom_evaluation_period=5400,
|
252
259
|
is_bad_events=True)
|
253
|
-
your_condition = newrelic.NrqlAlertCondition("
|
254
|
-
account_id=12345678,
|
255
|
-
policy_id=67890,
|
260
|
+
your_condition = newrelic.NrqlAlertCondition("your_condition",
|
261
|
+
account_id="12345678",
|
262
|
+
policy_id="67890",
|
256
263
|
type="static",
|
264
|
+
name="Custom burn alert",
|
257
265
|
enabled=True,
|
258
266
|
violation_time_limit_seconds=259200,
|
259
|
-
nrql=
|
260
|
-
query
|
261
|
-
|
262
|
-
critical=
|
263
|
-
operator
|
264
|
-
threshold
|
265
|
-
threshold_duration
|
266
|
-
threshold_occurrences
|
267
|
-
|
267
|
+
nrql={
|
268
|
+
"query": foo_custom.nrql,
|
269
|
+
},
|
270
|
+
critical={
|
271
|
+
"operator": "above_or_equals",
|
272
|
+
"threshold": foo_custom.threshold,
|
273
|
+
"threshold_duration": 900,
|
274
|
+
"threshold_occurrences": "at_least_once",
|
275
|
+
},
|
268
276
|
fill_option="none",
|
269
277
|
aggregation_window=foo_custom.evaluation_period,
|
270
278
|
aggregation_method="event_flow",
|
@@ -305,9 +313,6 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
|
|
305
313
|
slo_target=pulumi.get(__ret__, 'slo_target'),
|
306
314
|
threshold=pulumi.get(__ret__, 'threshold'),
|
307
315
|
tolerated_budget_consumption=pulumi.get(__ret__, 'tolerated_budget_consumption'))
|
308
|
-
|
309
|
-
|
310
|
-
@_utilities.lift_output_func(get_service_level_alert_helper)
|
311
316
|
def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]] = None,
|
312
317
|
custom_evaluation_period: Optional[pulumi.Input[Optional[int]]] = None,
|
313
318
|
custom_tolerated_budget_consumption: Optional[pulumi.Input[Optional[float]]] = None,
|
@@ -315,7 +320,7 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
|
|
315
320
|
sli_guid: Optional[pulumi.Input[str]] = None,
|
316
321
|
slo_period: Optional[pulumi.Input[int]] = None,
|
317
322
|
slo_target: Optional[pulumi.Input[float]] = None,
|
318
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServiceLevelAlertHelperResult]:
|
323
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServiceLevelAlertHelperResult]:
|
319
324
|
"""
|
320
325
|
Use this data source to obtain the necessary fields to set up alerts on your service levels. It can be used for a `custom` alert_type in order to set up an alert with custom tolerated budget consumption and custom evaluation period or for recommended ones like `fast_burn` or `slow_burn`. For more information check [the documentation](https://docs.newrelic.com/docs/service-level-management/alerts-slm/).
|
321
326
|
|
@@ -331,27 +336,28 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
|
|
331
336
|
foo_period = 28
|
332
337
|
foo = newrelic.ServiceLevel("foo",
|
333
338
|
guid="MXxBUE18QVBQTElDQVRJT058MQ",
|
339
|
+
name="Latency",
|
334
340
|
description="Proportion of requests that are served faster than a threshold.",
|
335
|
-
events=
|
336
|
-
account_id
|
337
|
-
valid_events
|
338
|
-
from_
|
339
|
-
where
|
340
|
-
|
341
|
-
bad_events
|
342
|
-
from_
|
343
|
-
where
|
344
|
-
|
345
|
-
|
346
|
-
objective=
|
347
|
-
target
|
348
|
-
time_window
|
349
|
-
rolling
|
350
|
-
count
|
351
|
-
unit
|
352
|
-
|
353
|
-
|
354
|
-
)
|
341
|
+
events={
|
342
|
+
"account_id": "12345678",
|
343
|
+
"valid_events": {
|
344
|
+
"from_": "Transaction",
|
345
|
+
"where": "appName = 'Example application' AND (transactionType='Web')",
|
346
|
+
},
|
347
|
+
"bad_events": {
|
348
|
+
"from_": "Transaction",
|
349
|
+
"where": "appName = 'Example application' AND (transactionType= 'Web') AND duration > 0.1",
|
350
|
+
},
|
351
|
+
},
|
352
|
+
objective={
|
353
|
+
"target": foo_target,
|
354
|
+
"time_window": {
|
355
|
+
"rolling": {
|
356
|
+
"count": foo_period,
|
357
|
+
"unit": "DAY",
|
358
|
+
},
|
359
|
+
},
|
360
|
+
})
|
355
361
|
```
|
356
362
|
Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
|
357
363
|
Note that the Service Level was set up using bad events, that's why `is_bad_events` is set to `true`.
|
@@ -364,25 +370,26 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
|
|
364
370
|
import pulumi_newrelic as newrelic
|
365
371
|
|
366
372
|
foo_slow_burn = newrelic.get_service_level_alert_helper(alert_type="slow_burn",
|
367
|
-
sli_guid=
|
368
|
-
slo_target=
|
369
|
-
slo_period=
|
373
|
+
sli_guid=foo["sliGuid"],
|
374
|
+
slo_target=foo_target,
|
375
|
+
slo_period=foo_period,
|
370
376
|
is_bad_events=True)
|
371
|
-
your_condition = newrelic.NrqlAlertCondition("
|
372
|
-
account_id=12345678,
|
373
|
-
policy_id=67890,
|
377
|
+
your_condition = newrelic.NrqlAlertCondition("your_condition",
|
378
|
+
account_id="12345678",
|
379
|
+
policy_id="67890",
|
374
380
|
type="static",
|
381
|
+
name="Slow burn alert",
|
375
382
|
enabled=True,
|
376
383
|
violation_time_limit_seconds=259200,
|
377
|
-
nrql=
|
378
|
-
query
|
379
|
-
|
380
|
-
critical=
|
381
|
-
operator
|
382
|
-
threshold
|
383
|
-
threshold_duration
|
384
|
-
threshold_occurrences
|
385
|
-
|
384
|
+
nrql={
|
385
|
+
"query": foo_slow_burn.nrql,
|
386
|
+
},
|
387
|
+
critical={
|
388
|
+
"operator": "above_or_equals",
|
389
|
+
"threshold": foo_slow_burn.threshold,
|
390
|
+
"threshold_duration": 900,
|
391
|
+
"threshold_occurrences": "at_least_once",
|
392
|
+
},
|
386
393
|
fill_option="none",
|
387
394
|
aggregation_window=foo_slow_burn.evaluation_period,
|
388
395
|
aggregation_method="event_flow",
|
@@ -397,27 +404,28 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
|
|
397
404
|
import pulumi_newrelic as newrelic
|
398
405
|
|
399
406
|
foo_custom = newrelic.get_service_level_alert_helper(alert_type="custom",
|
400
|
-
sli_guid=
|
401
|
-
slo_target=
|
402
|
-
slo_period=
|
407
|
+
sli_guid=foo["sliGuid"],
|
408
|
+
slo_target=foo_target,
|
409
|
+
slo_period=foo_period,
|
403
410
|
custom_tolerated_budget_consumption=4,
|
404
411
|
custom_evaluation_period=5400,
|
405
412
|
is_bad_events=True)
|
406
|
-
your_condition = newrelic.NrqlAlertCondition("
|
407
|
-
account_id=12345678,
|
408
|
-
policy_id=67890,
|
413
|
+
your_condition = newrelic.NrqlAlertCondition("your_condition",
|
414
|
+
account_id="12345678",
|
415
|
+
policy_id="67890",
|
409
416
|
type="static",
|
417
|
+
name="Custom burn alert",
|
410
418
|
enabled=True,
|
411
419
|
violation_time_limit_seconds=259200,
|
412
|
-
nrql=
|
413
|
-
query
|
414
|
-
|
415
|
-
critical=
|
416
|
-
operator
|
417
|
-
threshold
|
418
|
-
threshold_duration
|
419
|
-
threshold_occurrences
|
420
|
-
|
420
|
+
nrql={
|
421
|
+
"query": foo_custom.nrql,
|
422
|
+
},
|
423
|
+
critical={
|
424
|
+
"operator": "above_or_equals",
|
425
|
+
"threshold": foo_custom.threshold,
|
426
|
+
"threshold_duration": 900,
|
427
|
+
"threshold_occurrences": "at_least_once",
|
428
|
+
},
|
421
429
|
fill_option="none",
|
422
430
|
aggregation_window=foo_custom.evaluation_period,
|
423
431
|
aggregation_method="event_flow",
|
@@ -434,4 +442,26 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
|
|
434
442
|
:param int slo_period: The time window of the Service Level Objective in days. Valid values are `1`, `7` and `28`.
|
435
443
|
:param float slo_target: The target of the Service Level Objective, valid values between `0` and `100`.
|
436
444
|
"""
|
437
|
-
|
445
|
+
__args__ = dict()
|
446
|
+
__args__['alertType'] = alert_type
|
447
|
+
__args__['customEvaluationPeriod'] = custom_evaluation_period
|
448
|
+
__args__['customToleratedBudgetConsumption'] = custom_tolerated_budget_consumption
|
449
|
+
__args__['isBadEvents'] = is_bad_events
|
450
|
+
__args__['sliGuid'] = sli_guid
|
451
|
+
__args__['sloPeriod'] = slo_period
|
452
|
+
__args__['sloTarget'] = slo_target
|
453
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
454
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getServiceLevelAlertHelper:getServiceLevelAlertHelper', __args__, opts=opts, typ=GetServiceLevelAlertHelperResult)
|
455
|
+
return __ret__.apply(lambda __response__: GetServiceLevelAlertHelperResult(
|
456
|
+
alert_type=pulumi.get(__response__, 'alert_type'),
|
457
|
+
custom_evaluation_period=pulumi.get(__response__, 'custom_evaluation_period'),
|
458
|
+
custom_tolerated_budget_consumption=pulumi.get(__response__, 'custom_tolerated_budget_consumption'),
|
459
|
+
evaluation_period=pulumi.get(__response__, 'evaluation_period'),
|
460
|
+
id=pulumi.get(__response__, 'id'),
|
461
|
+
is_bad_events=pulumi.get(__response__, 'is_bad_events'),
|
462
|
+
nrql=pulumi.get(__response__, 'nrql'),
|
463
|
+
sli_guid=pulumi.get(__response__, 'sli_guid'),
|
464
|
+
slo_period=pulumi.get(__response__, 'slo_period'),
|
465
|
+
slo_target=pulumi.get(__response__, 'slo_target'),
|
466
|
+
threshold=pulumi.get(__response__, 'threshold'),
|
467
|
+
tolerated_budget_consumption=pulumi.get(__response__, 'tolerated_budget_consumption')))
|