pulumi-newrelic 5.16.0a1698964311__py3-none-any.whl → 5.58.0a1763707205__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pulumi-newrelic might be problematic. Click here for more details.
- pulumi_newrelic/__init__.py +58 -1
- pulumi_newrelic/_inputs.py +10772 -2775
- pulumi_newrelic/_utilities.py +92 -11
- pulumi_newrelic/account_management.py +56 -42
- pulumi_newrelic/alert_channel.py +177 -151
- pulumi_newrelic/alert_condition.py +313 -301
- pulumi_newrelic/alert_muting_rule.py +195 -138
- pulumi_newrelic/alert_policy.py +157 -109
- pulumi_newrelic/alert_policy_channel.py +95 -81
- pulumi_newrelic/api_access_key.py +191 -209
- pulumi_newrelic/browser_application.py +161 -153
- pulumi_newrelic/cloud/__init__.py +3 -1
- pulumi_newrelic/cloud/_inputs.py +4267 -2710
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +238 -200
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +159 -212
- pulumi_newrelic/cloud/aws_integrations.py +518 -1490
- pulumi_newrelic/cloud/aws_link_account.py +88 -76
- pulumi_newrelic/cloud/azure_integrations.py +681 -587
- pulumi_newrelic/cloud/azure_link_account.py +129 -117
- pulumi_newrelic/cloud/gcp_integrations.py +436 -408
- pulumi_newrelic/cloud/gcp_link_account.py +71 -59
- pulumi_newrelic/cloud/oci_link_account.py +926 -0
- pulumi_newrelic/cloud/outputs.py +1678 -2317
- pulumi_newrelic/config/__init__.py +2 -1
- pulumi_newrelic/config/__init__.pyi +45 -0
- pulumi_newrelic/config/vars.py +22 -17
- pulumi_newrelic/data_partition_rule.py +129 -117
- pulumi_newrelic/entity_tags.py +153 -31
- pulumi_newrelic/events_to_metrics_rule.py +114 -102
- pulumi_newrelic/get_account.py +41 -29
- pulumi_newrelic/get_alert_channel.py +73 -28
- pulumi_newrelic/get_alert_policy.py +83 -34
- pulumi_newrelic/get_application.py +51 -39
- pulumi_newrelic/get_authentication_domain.py +111 -0
- pulumi_newrelic/get_cloud_account.py +43 -31
- pulumi_newrelic/get_entity.py +126 -121
- pulumi_newrelic/get_group.py +190 -0
- pulumi_newrelic/get_key_transaction.py +117 -38
- pulumi_newrelic/get_notification_destination.py +86 -36
- pulumi_newrelic/get_obfuscation_expression.py +47 -35
- pulumi_newrelic/get_service_level_alert_helper.py +237 -137
- pulumi_newrelic/get_test_grok_pattern.py +47 -32
- pulumi_newrelic/get_user.py +165 -0
- pulumi_newrelic/group.py +286 -0
- pulumi_newrelic/infra_alert_condition.py +400 -382
- pulumi_newrelic/insights/__init__.py +2 -1
- pulumi_newrelic/insights/_inputs.py +94 -23
- pulumi_newrelic/insights/event.py +56 -48
- pulumi_newrelic/insights/outputs.py +51 -18
- pulumi_newrelic/key_transaction.py +465 -0
- pulumi_newrelic/log_parsing_rule.py +169 -153
- pulumi_newrelic/monitor_downtime.py +914 -0
- pulumi_newrelic/notification_channel.py +560 -418
- pulumi_newrelic/notification_destination.py +379 -124
- pulumi_newrelic/nrql_alert_condition.py +945 -513
- pulumi_newrelic/nrql_drop_rule.py +121 -129
- pulumi_newrelic/obfuscation_expression.py +88 -76
- pulumi_newrelic/obfuscation_rule.py +123 -109
- pulumi_newrelic/one_dashboard.py +118 -108
- pulumi_newrelic/one_dashboard_json.py +77 -67
- pulumi_newrelic/one_dashboard_raw.py +214 -202
- pulumi_newrelic/outputs.py +5491 -2141
- pulumi_newrelic/pipeline_cloud_rule.py +335 -0
- pulumi_newrelic/plugins/__init__.py +2 -1
- pulumi_newrelic/plugins/_inputs.py +520 -90
- pulumi_newrelic/plugins/application_settings.py +463 -167
- pulumi_newrelic/plugins/outputs.py +337 -75
- pulumi_newrelic/plugins/workload.py +387 -151
- pulumi_newrelic/provider.py +156 -142
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +277 -255
- pulumi_newrelic/synthetics/__init__.py +2 -1
- pulumi_newrelic/synthetics/_inputs.py +275 -106
- pulumi_newrelic/synthetics/alert_condition.py +174 -160
- pulumi_newrelic/synthetics/broken_links_monitor.py +367 -207
- pulumi_newrelic/synthetics/cert_check_monitor.py +380 -218
- pulumi_newrelic/synthetics/get_private_location.py +51 -39
- pulumi_newrelic/synthetics/get_secure_credential.py +39 -27
- pulumi_newrelic/synthetics/monitor.py +668 -462
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +219 -201
- pulumi_newrelic/synthetics/outputs.py +102 -85
- pulumi_newrelic/synthetics/private_location.py +120 -110
- pulumi_newrelic/synthetics/script_monitor.py +623 -375
- pulumi_newrelic/synthetics/secure_credential.py +99 -93
- pulumi_newrelic/synthetics/step_monitor.py +545 -201
- pulumi_newrelic/user.py +366 -0
- pulumi_newrelic/workflow.py +348 -312
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +8 -7
- pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.16.0a1698964311.dist-info/RECORD +0 -82
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
from ._inputs import *
|
|
@@ -16,40 +21,40 @@ __all__ = ['AlertConditionArgs', 'AlertCondition']
|
|
|
16
21
|
@pulumi.input_type
|
|
17
22
|
class AlertConditionArgs:
|
|
18
23
|
def __init__(__self__, *,
|
|
19
|
-
entities: pulumi.Input[Sequence[pulumi.Input[
|
|
20
|
-
metric: pulumi.Input[str],
|
|
21
|
-
policy_id: pulumi.Input[
|
|
24
|
+
entities: pulumi.Input[Sequence[pulumi.Input[_builtins.str]]],
|
|
25
|
+
metric: pulumi.Input[_builtins.str],
|
|
26
|
+
policy_id: pulumi.Input[_builtins.str],
|
|
22
27
|
terms: pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]],
|
|
23
|
-
type: pulumi.Input[str],
|
|
24
|
-
condition_scope: Optional[pulumi.Input[str]] = None,
|
|
25
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
26
|
-
gc_metric: Optional[pulumi.Input[str]] = None,
|
|
27
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
28
|
-
runbook_url: Optional[pulumi.Input[str]] = None,
|
|
29
|
-
user_defined_metric: Optional[pulumi.Input[str]] = None,
|
|
30
|
-
user_defined_value_function: Optional[pulumi.Input[str]] = None,
|
|
31
|
-
violation_close_timer: Optional[pulumi.Input[int]] = None):
|
|
28
|
+
type: pulumi.Input[_builtins.str],
|
|
29
|
+
condition_scope: Optional[pulumi.Input[_builtins.str]] = None,
|
|
30
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
31
|
+
gc_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
32
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
33
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
34
|
+
user_defined_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
35
|
+
user_defined_value_function: Optional[pulumi.Input[_builtins.str]] = None,
|
|
36
|
+
violation_close_timer: Optional[pulumi.Input[_builtins.int]] = None):
|
|
32
37
|
"""
|
|
33
38
|
The set of arguments for constructing a AlertCondition resource.
|
|
34
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
35
|
-
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
36
|
-
:param pulumi.Input[
|
|
39
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] entities: The instance IDs associated with this condition.
|
|
40
|
+
:param pulumi.Input[_builtins.str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
41
|
+
:param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
|
|
37
42
|
:param pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]] terms: A list of terms for this condition. See Terms below for details.
|
|
38
|
-
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
39
|
-
:param pulumi.Input[str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
40
|
-
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
|
41
|
-
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
42
|
-
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
43
|
-
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
|
44
|
-
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
|
45
|
-
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
43
|
+
:param pulumi.Input[_builtins.str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
44
|
+
:param pulumi.Input[_builtins.str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
45
|
+
:param pulumi.Input[_builtins.bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
|
46
|
+
:param pulumi.Input[_builtins.str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
47
|
+
:param pulumi.Input[_builtins.str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
48
|
+
:param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
|
|
49
|
+
:param pulumi.Input[_builtins.str] user_defined_metric: A custom metric to be evaluated.
|
|
50
|
+
:param pulumi.Input[_builtins.str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
46
51
|
|
|
47
52
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
|
48
53
|
|
|
49
|
-
```python
|
|
50
|
-
import pulumi
|
|
51
54
|
```
|
|
52
|
-
|
|
55
|
+
Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
|
|
56
|
+
```
|
|
57
|
+
:param pulumi.Input[_builtins.int] violation_close_timer: Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
53
58
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
|
54
59
|
* when `type` = `apm_jvm_metric`
|
|
55
60
|
"""
|
|
@@ -75,43 +80,43 @@ class AlertConditionArgs:
|
|
|
75
80
|
if violation_close_timer is not None:
|
|
76
81
|
pulumi.set(__self__, "violation_close_timer", violation_close_timer)
|
|
77
82
|
|
|
78
|
-
@property
|
|
83
|
+
@_builtins.property
|
|
79
84
|
@pulumi.getter
|
|
80
|
-
def entities(self) -> pulumi.Input[Sequence[pulumi.Input[
|
|
85
|
+
def entities(self) -> pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]:
|
|
81
86
|
"""
|
|
82
87
|
The instance IDs associated with this condition.
|
|
83
88
|
"""
|
|
84
89
|
return pulumi.get(self, "entities")
|
|
85
90
|
|
|
86
91
|
@entities.setter
|
|
87
|
-
def entities(self, value: pulumi.Input[Sequence[pulumi.Input[
|
|
92
|
+
def entities(self, value: pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]):
|
|
88
93
|
pulumi.set(self, "entities", value)
|
|
89
94
|
|
|
90
|
-
@property
|
|
95
|
+
@_builtins.property
|
|
91
96
|
@pulumi.getter
|
|
92
|
-
def metric(self) -> pulumi.Input[str]:
|
|
97
|
+
def metric(self) -> pulumi.Input[_builtins.str]:
|
|
93
98
|
"""
|
|
94
99
|
The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
95
100
|
"""
|
|
96
101
|
return pulumi.get(self, "metric")
|
|
97
102
|
|
|
98
103
|
@metric.setter
|
|
99
|
-
def metric(self, value: pulumi.Input[str]):
|
|
104
|
+
def metric(self, value: pulumi.Input[_builtins.str]):
|
|
100
105
|
pulumi.set(self, "metric", value)
|
|
101
106
|
|
|
102
|
-
@property
|
|
107
|
+
@_builtins.property
|
|
103
108
|
@pulumi.getter(name="policyId")
|
|
104
|
-
def policy_id(self) -> pulumi.Input[
|
|
109
|
+
def policy_id(self) -> pulumi.Input[_builtins.str]:
|
|
105
110
|
"""
|
|
106
111
|
The ID of the policy where this condition should be used.
|
|
107
112
|
"""
|
|
108
113
|
return pulumi.get(self, "policy_id")
|
|
109
114
|
|
|
110
115
|
@policy_id.setter
|
|
111
|
-
def policy_id(self, value: pulumi.Input[
|
|
116
|
+
def policy_id(self, value: pulumi.Input[_builtins.str]):
|
|
112
117
|
pulumi.set(self, "policy_id", value)
|
|
113
118
|
|
|
114
|
-
@property
|
|
119
|
+
@_builtins.property
|
|
115
120
|
@pulumi.getter
|
|
116
121
|
def terms(self) -> pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]:
|
|
117
122
|
"""
|
|
@@ -123,111 +128,111 @@ class AlertConditionArgs:
|
|
|
123
128
|
def terms(self, value: pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]):
|
|
124
129
|
pulumi.set(self, "terms", value)
|
|
125
130
|
|
|
126
|
-
@property
|
|
131
|
+
@_builtins.property
|
|
127
132
|
@pulumi.getter
|
|
128
|
-
def type(self) -> pulumi.Input[str]:
|
|
133
|
+
def type(self) -> pulumi.Input[_builtins.str]:
|
|
129
134
|
"""
|
|
130
135
|
The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
131
136
|
"""
|
|
132
137
|
return pulumi.get(self, "type")
|
|
133
138
|
|
|
134
139
|
@type.setter
|
|
135
|
-
def type(self, value: pulumi.Input[str]):
|
|
140
|
+
def type(self, value: pulumi.Input[_builtins.str]):
|
|
136
141
|
pulumi.set(self, "type", value)
|
|
137
142
|
|
|
138
|
-
@property
|
|
143
|
+
@_builtins.property
|
|
139
144
|
@pulumi.getter(name="conditionScope")
|
|
140
|
-
def condition_scope(self) -> Optional[pulumi.Input[str]]:
|
|
145
|
+
def condition_scope(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
141
146
|
"""
|
|
142
147
|
`application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
143
148
|
"""
|
|
144
149
|
return pulumi.get(self, "condition_scope")
|
|
145
150
|
|
|
146
151
|
@condition_scope.setter
|
|
147
|
-
def condition_scope(self, value: Optional[pulumi.Input[str]]):
|
|
152
|
+
def condition_scope(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
148
153
|
pulumi.set(self, "condition_scope", value)
|
|
149
154
|
|
|
150
|
-
@property
|
|
155
|
+
@_builtins.property
|
|
151
156
|
@pulumi.getter
|
|
152
|
-
def enabled(self) -> Optional[pulumi.Input[bool]]:
|
|
157
|
+
def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
153
158
|
"""
|
|
154
159
|
Whether the condition is enabled or not. Defaults to true.
|
|
155
160
|
"""
|
|
156
161
|
return pulumi.get(self, "enabled")
|
|
157
162
|
|
|
158
163
|
@enabled.setter
|
|
159
|
-
def enabled(self, value: Optional[pulumi.Input[bool]]):
|
|
164
|
+
def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
160
165
|
pulumi.set(self, "enabled", value)
|
|
161
166
|
|
|
162
|
-
@property
|
|
167
|
+
@_builtins.property
|
|
163
168
|
@pulumi.getter(name="gcMetric")
|
|
164
|
-
def gc_metric(self) -> Optional[pulumi.Input[str]]:
|
|
169
|
+
def gc_metric(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
165
170
|
"""
|
|
166
171
|
A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
167
172
|
"""
|
|
168
173
|
return pulumi.get(self, "gc_metric")
|
|
169
174
|
|
|
170
175
|
@gc_metric.setter
|
|
171
|
-
def gc_metric(self, value: Optional[pulumi.Input[str]]):
|
|
176
|
+
def gc_metric(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
172
177
|
pulumi.set(self, "gc_metric", value)
|
|
173
178
|
|
|
174
|
-
@property
|
|
179
|
+
@_builtins.property
|
|
175
180
|
@pulumi.getter
|
|
176
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
181
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
177
182
|
"""
|
|
178
183
|
The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
179
184
|
"""
|
|
180
185
|
return pulumi.get(self, "name")
|
|
181
186
|
|
|
182
187
|
@name.setter
|
|
183
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
188
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
184
189
|
pulumi.set(self, "name", value)
|
|
185
190
|
|
|
186
|
-
@property
|
|
191
|
+
@_builtins.property
|
|
187
192
|
@pulumi.getter(name="runbookUrl")
|
|
188
|
-
def runbook_url(self) -> Optional[pulumi.Input[str]]:
|
|
193
|
+
def runbook_url(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
189
194
|
"""
|
|
190
195
|
Runbook URL to display in notifications.
|
|
191
196
|
"""
|
|
192
197
|
return pulumi.get(self, "runbook_url")
|
|
193
198
|
|
|
194
199
|
@runbook_url.setter
|
|
195
|
-
def runbook_url(self, value: Optional[pulumi.Input[str]]):
|
|
200
|
+
def runbook_url(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
196
201
|
pulumi.set(self, "runbook_url", value)
|
|
197
202
|
|
|
198
|
-
@property
|
|
203
|
+
@_builtins.property
|
|
199
204
|
@pulumi.getter(name="userDefinedMetric")
|
|
200
|
-
def user_defined_metric(self) -> Optional[pulumi.Input[str]]:
|
|
205
|
+
def user_defined_metric(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
201
206
|
"""
|
|
202
207
|
A custom metric to be evaluated.
|
|
203
208
|
"""
|
|
204
209
|
return pulumi.get(self, "user_defined_metric")
|
|
205
210
|
|
|
206
211
|
@user_defined_metric.setter
|
|
207
|
-
def user_defined_metric(self, value: Optional[pulumi.Input[str]]):
|
|
212
|
+
def user_defined_metric(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
208
213
|
pulumi.set(self, "user_defined_metric", value)
|
|
209
214
|
|
|
210
|
-
@property
|
|
215
|
+
@_builtins.property
|
|
211
216
|
@pulumi.getter(name="userDefinedValueFunction")
|
|
212
|
-
def user_defined_value_function(self) -> Optional[pulumi.Input[str]]:
|
|
217
|
+
def user_defined_value_function(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
213
218
|
"""
|
|
214
219
|
One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
215
220
|
|
|
216
221
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
|
217
222
|
|
|
218
|
-
```
|
|
219
|
-
|
|
223
|
+
```
|
|
224
|
+
Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
|
|
220
225
|
```
|
|
221
226
|
"""
|
|
222
227
|
return pulumi.get(self, "user_defined_value_function")
|
|
223
228
|
|
|
224
229
|
@user_defined_value_function.setter
|
|
225
|
-
def user_defined_value_function(self, value: Optional[pulumi.Input[str]]):
|
|
230
|
+
def user_defined_value_function(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
226
231
|
pulumi.set(self, "user_defined_value_function", value)
|
|
227
232
|
|
|
228
|
-
@property
|
|
233
|
+
@_builtins.property
|
|
229
234
|
@pulumi.getter(name="violationCloseTimer")
|
|
230
|
-
def violation_close_timer(self) -> Optional[pulumi.Input[int]]:
|
|
235
|
+
def violation_close_timer(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
231
236
|
"""
|
|
232
237
|
Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
233
238
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
|
@@ -236,49 +241,49 @@ class AlertConditionArgs:
|
|
|
236
241
|
return pulumi.get(self, "violation_close_timer")
|
|
237
242
|
|
|
238
243
|
@violation_close_timer.setter
|
|
239
|
-
def violation_close_timer(self, value: Optional[pulumi.Input[int]]):
|
|
244
|
+
def violation_close_timer(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
240
245
|
pulumi.set(self, "violation_close_timer", value)
|
|
241
246
|
|
|
242
247
|
|
|
243
248
|
@pulumi.input_type
|
|
244
249
|
class _AlertConditionState:
|
|
245
250
|
def __init__(__self__, *,
|
|
246
|
-
condition_scope: Optional[pulumi.Input[str]] = None,
|
|
247
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
248
|
-
entities: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
249
|
-
entity_guid: Optional[pulumi.Input[str]] = None,
|
|
250
|
-
gc_metric: Optional[pulumi.Input[str]] = None,
|
|
251
|
-
metric: Optional[pulumi.Input[str]] = None,
|
|
252
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
253
|
-
policy_id: Optional[pulumi.Input[
|
|
254
|
-
runbook_url: Optional[pulumi.Input[str]] = None,
|
|
251
|
+
condition_scope: Optional[pulumi.Input[_builtins.str]] = None,
|
|
252
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
253
|
+
entities: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
254
|
+
entity_guid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
255
|
+
gc_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
256
|
+
metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
257
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
258
|
+
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
259
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
255
260
|
terms: Optional[pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]] = None,
|
|
256
|
-
type: Optional[pulumi.Input[str]] = None,
|
|
257
|
-
user_defined_metric: Optional[pulumi.Input[str]] = None,
|
|
258
|
-
user_defined_value_function: Optional[pulumi.Input[str]] = None,
|
|
259
|
-
violation_close_timer: Optional[pulumi.Input[int]] = None):
|
|
261
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
262
|
+
user_defined_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
263
|
+
user_defined_value_function: Optional[pulumi.Input[_builtins.str]] = None,
|
|
264
|
+
violation_close_timer: Optional[pulumi.Input[_builtins.int]] = None):
|
|
260
265
|
"""
|
|
261
266
|
Input properties used for looking up and filtering AlertCondition resources.
|
|
262
|
-
:param pulumi.Input[str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
263
|
-
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
|
264
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
265
|
-
:param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
|
|
266
|
-
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
267
|
-
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
268
|
-
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
269
|
-
:param pulumi.Input[
|
|
270
|
-
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
|
267
|
+
:param pulumi.Input[_builtins.str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
268
|
+
:param pulumi.Input[_builtins.bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
|
269
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] entities: The instance IDs associated with this condition.
|
|
270
|
+
:param pulumi.Input[_builtins.str] entity_guid: The unique entity identifier of the condition in New Relic.
|
|
271
|
+
:param pulumi.Input[_builtins.str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
272
|
+
:param pulumi.Input[_builtins.str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
273
|
+
:param pulumi.Input[_builtins.str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
274
|
+
:param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
|
|
275
|
+
:param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
|
|
271
276
|
:param pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]] terms: A list of terms for this condition. See Terms below for details.
|
|
272
|
-
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
273
|
-
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
|
274
|
-
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
277
|
+
:param pulumi.Input[_builtins.str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
278
|
+
:param pulumi.Input[_builtins.str] user_defined_metric: A custom metric to be evaluated.
|
|
279
|
+
:param pulumi.Input[_builtins.str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
275
280
|
|
|
276
281
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
|
277
282
|
|
|
278
|
-
```python
|
|
279
|
-
import pulumi
|
|
280
283
|
```
|
|
281
|
-
|
|
284
|
+
Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
|
|
285
|
+
```
|
|
286
|
+
:param pulumi.Input[_builtins.int] violation_close_timer: Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
282
287
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
|
283
288
|
* when `type` = `apm_jvm_metric`
|
|
284
289
|
"""
|
|
@@ -311,115 +316,115 @@ class _AlertConditionState:
|
|
|
311
316
|
if violation_close_timer is not None:
|
|
312
317
|
pulumi.set(__self__, "violation_close_timer", violation_close_timer)
|
|
313
318
|
|
|
314
|
-
@property
|
|
319
|
+
@_builtins.property
|
|
315
320
|
@pulumi.getter(name="conditionScope")
|
|
316
|
-
def condition_scope(self) -> Optional[pulumi.Input[str]]:
|
|
321
|
+
def condition_scope(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
317
322
|
"""
|
|
318
323
|
`application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
319
324
|
"""
|
|
320
325
|
return pulumi.get(self, "condition_scope")
|
|
321
326
|
|
|
322
327
|
@condition_scope.setter
|
|
323
|
-
def condition_scope(self, value: Optional[pulumi.Input[str]]):
|
|
328
|
+
def condition_scope(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
324
329
|
pulumi.set(self, "condition_scope", value)
|
|
325
330
|
|
|
326
|
-
@property
|
|
331
|
+
@_builtins.property
|
|
327
332
|
@pulumi.getter
|
|
328
|
-
def enabled(self) -> Optional[pulumi.Input[bool]]:
|
|
333
|
+
def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
|
|
329
334
|
"""
|
|
330
335
|
Whether the condition is enabled or not. Defaults to true.
|
|
331
336
|
"""
|
|
332
337
|
return pulumi.get(self, "enabled")
|
|
333
338
|
|
|
334
339
|
@enabled.setter
|
|
335
|
-
def enabled(self, value: Optional[pulumi.Input[bool]]):
|
|
340
|
+
def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
|
|
336
341
|
pulumi.set(self, "enabled", value)
|
|
337
342
|
|
|
338
|
-
@property
|
|
343
|
+
@_builtins.property
|
|
339
344
|
@pulumi.getter
|
|
340
|
-
def entities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
345
|
+
def entities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
|
|
341
346
|
"""
|
|
342
347
|
The instance IDs associated with this condition.
|
|
343
348
|
"""
|
|
344
349
|
return pulumi.get(self, "entities")
|
|
345
350
|
|
|
346
351
|
@entities.setter
|
|
347
|
-
def entities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
352
|
+
def entities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
|
|
348
353
|
pulumi.set(self, "entities", value)
|
|
349
354
|
|
|
350
|
-
@property
|
|
355
|
+
@_builtins.property
|
|
351
356
|
@pulumi.getter(name="entityGuid")
|
|
352
|
-
def entity_guid(self) -> Optional[pulumi.Input[str]]:
|
|
357
|
+
def entity_guid(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
353
358
|
"""
|
|
354
359
|
The unique entity identifier of the condition in New Relic.
|
|
355
360
|
"""
|
|
356
361
|
return pulumi.get(self, "entity_guid")
|
|
357
362
|
|
|
358
363
|
@entity_guid.setter
|
|
359
|
-
def entity_guid(self, value: Optional[pulumi.Input[str]]):
|
|
364
|
+
def entity_guid(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
360
365
|
pulumi.set(self, "entity_guid", value)
|
|
361
366
|
|
|
362
|
-
@property
|
|
367
|
+
@_builtins.property
|
|
363
368
|
@pulumi.getter(name="gcMetric")
|
|
364
|
-
def gc_metric(self) -> Optional[pulumi.Input[str]]:
|
|
369
|
+
def gc_metric(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
365
370
|
"""
|
|
366
371
|
A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
367
372
|
"""
|
|
368
373
|
return pulumi.get(self, "gc_metric")
|
|
369
374
|
|
|
370
375
|
@gc_metric.setter
|
|
371
|
-
def gc_metric(self, value: Optional[pulumi.Input[str]]):
|
|
376
|
+
def gc_metric(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
372
377
|
pulumi.set(self, "gc_metric", value)
|
|
373
378
|
|
|
374
|
-
@property
|
|
379
|
+
@_builtins.property
|
|
375
380
|
@pulumi.getter
|
|
376
|
-
def metric(self) -> Optional[pulumi.Input[str]]:
|
|
381
|
+
def metric(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
377
382
|
"""
|
|
378
383
|
The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
379
384
|
"""
|
|
380
385
|
return pulumi.get(self, "metric")
|
|
381
386
|
|
|
382
387
|
@metric.setter
|
|
383
|
-
def metric(self, value: Optional[pulumi.Input[str]]):
|
|
388
|
+
def metric(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
384
389
|
pulumi.set(self, "metric", value)
|
|
385
390
|
|
|
386
|
-
@property
|
|
391
|
+
@_builtins.property
|
|
387
392
|
@pulumi.getter
|
|
388
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
393
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
389
394
|
"""
|
|
390
395
|
The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
391
396
|
"""
|
|
392
397
|
return pulumi.get(self, "name")
|
|
393
398
|
|
|
394
399
|
@name.setter
|
|
395
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
400
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
396
401
|
pulumi.set(self, "name", value)
|
|
397
402
|
|
|
398
|
-
@property
|
|
403
|
+
@_builtins.property
|
|
399
404
|
@pulumi.getter(name="policyId")
|
|
400
|
-
def policy_id(self) -> Optional[pulumi.Input[
|
|
405
|
+
def policy_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
401
406
|
"""
|
|
402
407
|
The ID of the policy where this condition should be used.
|
|
403
408
|
"""
|
|
404
409
|
return pulumi.get(self, "policy_id")
|
|
405
410
|
|
|
406
411
|
@policy_id.setter
|
|
407
|
-
def policy_id(self, value: Optional[pulumi.Input[
|
|
412
|
+
def policy_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
408
413
|
pulumi.set(self, "policy_id", value)
|
|
409
414
|
|
|
410
|
-
@property
|
|
415
|
+
@_builtins.property
|
|
411
416
|
@pulumi.getter(name="runbookUrl")
|
|
412
|
-
def runbook_url(self) -> Optional[pulumi.Input[str]]:
|
|
417
|
+
def runbook_url(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
413
418
|
"""
|
|
414
419
|
Runbook URL to display in notifications.
|
|
415
420
|
"""
|
|
416
421
|
return pulumi.get(self, "runbook_url")
|
|
417
422
|
|
|
418
423
|
@runbook_url.setter
|
|
419
|
-
def runbook_url(self, value: Optional[pulumi.Input[str]]):
|
|
424
|
+
def runbook_url(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
420
425
|
pulumi.set(self, "runbook_url", value)
|
|
421
426
|
|
|
422
|
-
@property
|
|
427
|
+
@_builtins.property
|
|
423
428
|
@pulumi.getter
|
|
424
429
|
def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]]:
|
|
425
430
|
"""
|
|
@@ -431,51 +436,51 @@ class _AlertConditionState:
|
|
|
431
436
|
def terms(self, value: Optional[pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]]):
|
|
432
437
|
pulumi.set(self, "terms", value)
|
|
433
438
|
|
|
434
|
-
@property
|
|
439
|
+
@_builtins.property
|
|
435
440
|
@pulumi.getter
|
|
436
|
-
def type(self) -> Optional[pulumi.Input[str]]:
|
|
441
|
+
def type(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
437
442
|
"""
|
|
438
443
|
The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
439
444
|
"""
|
|
440
445
|
return pulumi.get(self, "type")
|
|
441
446
|
|
|
442
447
|
@type.setter
|
|
443
|
-
def type(self, value: Optional[pulumi.Input[str]]):
|
|
448
|
+
def type(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
444
449
|
pulumi.set(self, "type", value)
|
|
445
450
|
|
|
446
|
-
@property
|
|
451
|
+
@_builtins.property
|
|
447
452
|
@pulumi.getter(name="userDefinedMetric")
|
|
448
|
-
def user_defined_metric(self) -> Optional[pulumi.Input[str]]:
|
|
453
|
+
def user_defined_metric(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
449
454
|
"""
|
|
450
455
|
A custom metric to be evaluated.
|
|
451
456
|
"""
|
|
452
457
|
return pulumi.get(self, "user_defined_metric")
|
|
453
458
|
|
|
454
459
|
@user_defined_metric.setter
|
|
455
|
-
def user_defined_metric(self, value: Optional[pulumi.Input[str]]):
|
|
460
|
+
def user_defined_metric(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
456
461
|
pulumi.set(self, "user_defined_metric", value)
|
|
457
462
|
|
|
458
|
-
@property
|
|
463
|
+
@_builtins.property
|
|
459
464
|
@pulumi.getter(name="userDefinedValueFunction")
|
|
460
|
-
def user_defined_value_function(self) -> Optional[pulumi.Input[str]]:
|
|
465
|
+
def user_defined_value_function(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
461
466
|
"""
|
|
462
467
|
One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
463
468
|
|
|
464
469
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
|
465
470
|
|
|
466
|
-
```
|
|
467
|
-
|
|
471
|
+
```
|
|
472
|
+
Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
|
|
468
473
|
```
|
|
469
474
|
"""
|
|
470
475
|
return pulumi.get(self, "user_defined_value_function")
|
|
471
476
|
|
|
472
477
|
@user_defined_value_function.setter
|
|
473
|
-
def user_defined_value_function(self, value: Optional[pulumi.Input[str]]):
|
|
478
|
+
def user_defined_value_function(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
474
479
|
pulumi.set(self, "user_defined_value_function", value)
|
|
475
480
|
|
|
476
|
-
@property
|
|
481
|
+
@_builtins.property
|
|
477
482
|
@pulumi.getter(name="violationCloseTimer")
|
|
478
|
-
def violation_close_timer(self) -> Optional[pulumi.Input[int]]:
|
|
483
|
+
def violation_close_timer(self) -> Optional[pulumi.Input[_builtins.int]]:
|
|
479
484
|
"""
|
|
480
485
|
Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
481
486
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
|
@@ -484,33 +489,34 @@ class _AlertConditionState:
|
|
|
484
489
|
return pulumi.get(self, "violation_close_timer")
|
|
485
490
|
|
|
486
491
|
@violation_close_timer.setter
|
|
487
|
-
def violation_close_timer(self, value: Optional[pulumi.Input[int]]):
|
|
492
|
+
def violation_close_timer(self, value: Optional[pulumi.Input[_builtins.int]]):
|
|
488
493
|
pulumi.set(self, "violation_close_timer", value)
|
|
489
494
|
|
|
490
495
|
|
|
496
|
+
@pulumi.type_token("newrelic:index/alertCondition:AlertCondition")
|
|
491
497
|
class AlertCondition(pulumi.CustomResource):
|
|
492
498
|
@overload
|
|
493
499
|
def __init__(__self__,
|
|
494
500
|
resource_name: str,
|
|
495
501
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
496
|
-
condition_scope: Optional[pulumi.Input[str]] = None,
|
|
497
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
498
|
-
entities: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
499
|
-
gc_metric: Optional[pulumi.Input[str]] = None,
|
|
500
|
-
metric: Optional[pulumi.Input[str]] = None,
|
|
501
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
502
|
-
policy_id: Optional[pulumi.Input[
|
|
503
|
-
runbook_url: Optional[pulumi.Input[str]] = None,
|
|
504
|
-
terms: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
505
|
-
type: Optional[pulumi.Input[str]] = None,
|
|
506
|
-
user_defined_metric: Optional[pulumi.Input[str]] = None,
|
|
507
|
-
user_defined_value_function: Optional[pulumi.Input[str]] = None,
|
|
508
|
-
violation_close_timer: Optional[pulumi.Input[int]] = None,
|
|
502
|
+
condition_scope: Optional[pulumi.Input[_builtins.str]] = None,
|
|
503
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
504
|
+
entities: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
505
|
+
gc_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
506
|
+
metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
507
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
508
|
+
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
509
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
510
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]]] = None,
|
|
511
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
512
|
+
user_defined_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
513
|
+
user_defined_value_function: Optional[pulumi.Input[_builtins.str]] = None,
|
|
514
|
+
violation_close_timer: Optional[pulumi.Input[_builtins.int]] = None,
|
|
509
515
|
__props__=None):
|
|
510
516
|
"""
|
|
511
517
|
Use this resource to create and manage alert conditions for APM, Browser, and Mobile in New Relic.
|
|
512
518
|
|
|
513
|
-
> **
|
|
519
|
+
> **WARNING:** The `AlertCondition` resource is deprecated and will be removed in the next major release. The resource NrqlAlertCondition would be a preferred alternative to configure alert conditions - in most cases, feature parity can be achieved with a NRQL query.
|
|
514
520
|
|
|
515
521
|
## Example Usage
|
|
516
522
|
|
|
@@ -521,22 +527,24 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
521
527
|
app = newrelic.get_entity(name="my-app",
|
|
522
528
|
type="APPLICATION",
|
|
523
529
|
domain="APM")
|
|
524
|
-
|
|
525
|
-
foo_alert_condition = newrelic.AlertCondition("
|
|
526
|
-
policy_id=
|
|
530
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
531
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
|
532
|
+
policy_id=foo.id,
|
|
533
|
+
name="foo",
|
|
527
534
|
type="apm_app_metric",
|
|
528
535
|
entities=[app.application_id],
|
|
529
536
|
metric="apdex",
|
|
530
537
|
runbook_url="https://www.example.com",
|
|
531
538
|
condition_scope="application",
|
|
532
|
-
terms=[
|
|
533
|
-
duration
|
|
534
|
-
operator
|
|
535
|
-
priority
|
|
536
|
-
threshold
|
|
537
|
-
time_function
|
|
538
|
-
|
|
539
|
+
terms=[{
|
|
540
|
+
"duration": 5,
|
|
541
|
+
"operator": "below",
|
|
542
|
+
"priority": "critical",
|
|
543
|
+
"threshold": 0.75,
|
|
544
|
+
"time_function": "all",
|
|
545
|
+
}])
|
|
539
546
|
```
|
|
547
|
+
|
|
540
548
|
## Terms
|
|
541
549
|
|
|
542
550
|
The `term` mapping supports the following arguments:
|
|
@@ -555,36 +563,37 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
555
563
|
import pulumi
|
|
556
564
|
import pulumi_newrelic as newrelic
|
|
557
565
|
|
|
558
|
-
|
|
559
|
-
foo_alert_policy = newrelic.AlertPolicy("
|
|
560
|
-
foo_alert_condition = newrelic.AlertCondition("
|
|
566
|
+
foo = newrelic.get_entity(name="foo entitiy")
|
|
567
|
+
foo_alert_policy = newrelic.AlertPolicy("foo", name="foo policy")
|
|
568
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
|
561
569
|
policy_id=foo_alert_policy.id,
|
|
570
|
+
name="foo condition",
|
|
562
571
|
type="apm_app_metric",
|
|
563
|
-
entities=[
|
|
572
|
+
entities=[foo.application_id],
|
|
564
573
|
metric="apdex",
|
|
565
574
|
runbook_url="https://www.example.com",
|
|
566
575
|
condition_scope="application",
|
|
567
|
-
terms=[
|
|
568
|
-
duration
|
|
569
|
-
operator
|
|
570
|
-
priority
|
|
571
|
-
threshold
|
|
572
|
-
time_function
|
|
573
|
-
|
|
574
|
-
my_condition_entity_tags = newrelic.EntityTags("
|
|
576
|
+
terms=[{
|
|
577
|
+
"duration": 5,
|
|
578
|
+
"operator": "below",
|
|
579
|
+
"priority": "critical",
|
|
580
|
+
"threshold": 0.75,
|
|
581
|
+
"time_function": "all",
|
|
582
|
+
}])
|
|
583
|
+
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
|
|
575
584
|
guid=foo_alert_condition.entity_guid,
|
|
576
585
|
tags=[
|
|
577
|
-
|
|
578
|
-
key
|
|
579
|
-
values
|
|
586
|
+
{
|
|
587
|
+
"key": "my-key",
|
|
588
|
+
"values": [
|
|
580
589
|
"my-value",
|
|
581
590
|
"my-other-value",
|
|
582
591
|
],
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
key
|
|
586
|
-
values
|
|
587
|
-
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"key": "my-key-2",
|
|
595
|
+
"values": ["my-value-2"],
|
|
596
|
+
},
|
|
588
597
|
])
|
|
589
598
|
```
|
|
590
599
|
|
|
@@ -593,30 +602,30 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
593
602
|
Alert conditions can be imported using notation `alert_policy_id:alert_condition_id`, e.g.
|
|
594
603
|
|
|
595
604
|
```sh
|
|
596
|
-
|
|
605
|
+
$ pulumi import newrelic:index/alertCondition:AlertCondition main 123456:6789012345
|
|
597
606
|
```
|
|
598
607
|
|
|
599
608
|
:param str resource_name: The name of the resource.
|
|
600
609
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
601
|
-
:param pulumi.Input[str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
602
|
-
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
|
603
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
604
|
-
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
605
|
-
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
606
|
-
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
607
|
-
:param pulumi.Input[
|
|
608
|
-
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
|
609
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
610
|
-
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
611
|
-
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
|
612
|
-
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
610
|
+
:param pulumi.Input[_builtins.str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
611
|
+
:param pulumi.Input[_builtins.bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
|
612
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] entities: The instance IDs associated with this condition.
|
|
613
|
+
:param pulumi.Input[_builtins.str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
614
|
+
:param pulumi.Input[_builtins.str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
615
|
+
:param pulumi.Input[_builtins.str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
616
|
+
:param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
|
|
617
|
+
:param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
|
|
618
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]] terms: A list of terms for this condition. See Terms below for details.
|
|
619
|
+
:param pulumi.Input[_builtins.str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
620
|
+
:param pulumi.Input[_builtins.str] user_defined_metric: A custom metric to be evaluated.
|
|
621
|
+
:param pulumi.Input[_builtins.str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
613
622
|
|
|
614
623
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
|
615
624
|
|
|
616
|
-
```python
|
|
617
|
-
import pulumi
|
|
618
625
|
```
|
|
619
|
-
|
|
626
|
+
Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
|
|
627
|
+
```
|
|
628
|
+
:param pulumi.Input[_builtins.int] violation_close_timer: Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
620
629
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
|
621
630
|
* when `type` = `apm_jvm_metric`
|
|
622
631
|
"""
|
|
@@ -629,7 +638,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
629
638
|
"""
|
|
630
639
|
Use this resource to create and manage alert conditions for APM, Browser, and Mobile in New Relic.
|
|
631
640
|
|
|
632
|
-
> **
|
|
641
|
+
> **WARNING:** The `AlertCondition` resource is deprecated and will be removed in the next major release. The resource NrqlAlertCondition would be a preferred alternative to configure alert conditions - in most cases, feature parity can be achieved with a NRQL query.
|
|
633
642
|
|
|
634
643
|
## Example Usage
|
|
635
644
|
|
|
@@ -640,22 +649,24 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
640
649
|
app = newrelic.get_entity(name="my-app",
|
|
641
650
|
type="APPLICATION",
|
|
642
651
|
domain="APM")
|
|
643
|
-
|
|
644
|
-
foo_alert_condition = newrelic.AlertCondition("
|
|
645
|
-
policy_id=
|
|
652
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
|
653
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
|
654
|
+
policy_id=foo.id,
|
|
655
|
+
name="foo",
|
|
646
656
|
type="apm_app_metric",
|
|
647
657
|
entities=[app.application_id],
|
|
648
658
|
metric="apdex",
|
|
649
659
|
runbook_url="https://www.example.com",
|
|
650
660
|
condition_scope="application",
|
|
651
|
-
terms=[
|
|
652
|
-
duration
|
|
653
|
-
operator
|
|
654
|
-
priority
|
|
655
|
-
threshold
|
|
656
|
-
time_function
|
|
657
|
-
|
|
661
|
+
terms=[{
|
|
662
|
+
"duration": 5,
|
|
663
|
+
"operator": "below",
|
|
664
|
+
"priority": "critical",
|
|
665
|
+
"threshold": 0.75,
|
|
666
|
+
"time_function": "all",
|
|
667
|
+
}])
|
|
658
668
|
```
|
|
669
|
+
|
|
659
670
|
## Terms
|
|
660
671
|
|
|
661
672
|
The `term` mapping supports the following arguments:
|
|
@@ -674,36 +685,37 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
674
685
|
import pulumi
|
|
675
686
|
import pulumi_newrelic as newrelic
|
|
676
687
|
|
|
677
|
-
|
|
678
|
-
foo_alert_policy = newrelic.AlertPolicy("
|
|
679
|
-
foo_alert_condition = newrelic.AlertCondition("
|
|
688
|
+
foo = newrelic.get_entity(name="foo entitiy")
|
|
689
|
+
foo_alert_policy = newrelic.AlertPolicy("foo", name="foo policy")
|
|
690
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
|
680
691
|
policy_id=foo_alert_policy.id,
|
|
692
|
+
name="foo condition",
|
|
681
693
|
type="apm_app_metric",
|
|
682
|
-
entities=[
|
|
694
|
+
entities=[foo.application_id],
|
|
683
695
|
metric="apdex",
|
|
684
696
|
runbook_url="https://www.example.com",
|
|
685
697
|
condition_scope="application",
|
|
686
|
-
terms=[
|
|
687
|
-
duration
|
|
688
|
-
operator
|
|
689
|
-
priority
|
|
690
|
-
threshold
|
|
691
|
-
time_function
|
|
692
|
-
|
|
693
|
-
my_condition_entity_tags = newrelic.EntityTags("
|
|
698
|
+
terms=[{
|
|
699
|
+
"duration": 5,
|
|
700
|
+
"operator": "below",
|
|
701
|
+
"priority": "critical",
|
|
702
|
+
"threshold": 0.75,
|
|
703
|
+
"time_function": "all",
|
|
704
|
+
}])
|
|
705
|
+
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
|
|
694
706
|
guid=foo_alert_condition.entity_guid,
|
|
695
707
|
tags=[
|
|
696
|
-
|
|
697
|
-
key
|
|
698
|
-
values
|
|
708
|
+
{
|
|
709
|
+
"key": "my-key",
|
|
710
|
+
"values": [
|
|
699
711
|
"my-value",
|
|
700
712
|
"my-other-value",
|
|
701
713
|
],
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
key
|
|
705
|
-
values
|
|
706
|
-
|
|
714
|
+
},
|
|
715
|
+
{
|
|
716
|
+
"key": "my-key-2",
|
|
717
|
+
"values": ["my-value-2"],
|
|
718
|
+
},
|
|
707
719
|
])
|
|
708
720
|
```
|
|
709
721
|
|
|
@@ -712,7 +724,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
712
724
|
Alert conditions can be imported using notation `alert_policy_id:alert_condition_id`, e.g.
|
|
713
725
|
|
|
714
726
|
```sh
|
|
715
|
-
|
|
727
|
+
$ pulumi import newrelic:index/alertCondition:AlertCondition main 123456:6789012345
|
|
716
728
|
```
|
|
717
729
|
|
|
718
730
|
:param str resource_name: The name of the resource.
|
|
@@ -730,19 +742,19 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
730
742
|
def _internal_init(__self__,
|
|
731
743
|
resource_name: str,
|
|
732
744
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
733
|
-
condition_scope: Optional[pulumi.Input[str]] = None,
|
|
734
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
735
|
-
entities: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
736
|
-
gc_metric: Optional[pulumi.Input[str]] = None,
|
|
737
|
-
metric: Optional[pulumi.Input[str]] = None,
|
|
738
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
739
|
-
policy_id: Optional[pulumi.Input[
|
|
740
|
-
runbook_url: Optional[pulumi.Input[str]] = None,
|
|
741
|
-
terms: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
742
|
-
type: Optional[pulumi.Input[str]] = None,
|
|
743
|
-
user_defined_metric: Optional[pulumi.Input[str]] = None,
|
|
744
|
-
user_defined_value_function: Optional[pulumi.Input[str]] = None,
|
|
745
|
-
violation_close_timer: Optional[pulumi.Input[int]] = None,
|
|
745
|
+
condition_scope: Optional[pulumi.Input[_builtins.str]] = None,
|
|
746
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
747
|
+
entities: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
748
|
+
gc_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
749
|
+
metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
750
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
751
|
+
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
752
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
753
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]]] = None,
|
|
754
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
755
|
+
user_defined_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
756
|
+
user_defined_value_function: Optional[pulumi.Input[_builtins.str]] = None,
|
|
757
|
+
violation_close_timer: Optional[pulumi.Input[_builtins.int]] = None,
|
|
746
758
|
__props__=None):
|
|
747
759
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
748
760
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -786,20 +798,20 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
786
798
|
def get(resource_name: str,
|
|
787
799
|
id: pulumi.Input[str],
|
|
788
800
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
789
|
-
condition_scope: Optional[pulumi.Input[str]] = None,
|
|
790
|
-
enabled: Optional[pulumi.Input[bool]] = None,
|
|
791
|
-
entities: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
792
|
-
entity_guid: Optional[pulumi.Input[str]] = None,
|
|
793
|
-
gc_metric: Optional[pulumi.Input[str]] = None,
|
|
794
|
-
metric: Optional[pulumi.Input[str]] = None,
|
|
795
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
796
|
-
policy_id: Optional[pulumi.Input[
|
|
797
|
-
runbook_url: Optional[pulumi.Input[str]] = None,
|
|
798
|
-
terms: Optional[pulumi.Input[Sequence[pulumi.Input[
|
|
799
|
-
type: Optional[pulumi.Input[str]] = None,
|
|
800
|
-
user_defined_metric: Optional[pulumi.Input[str]] = None,
|
|
801
|
-
user_defined_value_function: Optional[pulumi.Input[str]] = None,
|
|
802
|
-
violation_close_timer: Optional[pulumi.Input[int]] = None) -> 'AlertCondition':
|
|
801
|
+
condition_scope: Optional[pulumi.Input[_builtins.str]] = None,
|
|
802
|
+
enabled: Optional[pulumi.Input[_builtins.bool]] = None,
|
|
803
|
+
entities: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
804
|
+
entity_guid: Optional[pulumi.Input[_builtins.str]] = None,
|
|
805
|
+
gc_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
806
|
+
metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
807
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
808
|
+
policy_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
809
|
+
runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
|
|
810
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]]] = None,
|
|
811
|
+
type: Optional[pulumi.Input[_builtins.str]] = None,
|
|
812
|
+
user_defined_metric: Optional[pulumi.Input[_builtins.str]] = None,
|
|
813
|
+
user_defined_value_function: Optional[pulumi.Input[_builtins.str]] = None,
|
|
814
|
+
violation_close_timer: Optional[pulumi.Input[_builtins.int]] = None) -> 'AlertCondition':
|
|
803
815
|
"""
|
|
804
816
|
Get an existing AlertCondition resource's state with the given name, id, and optional extra
|
|
805
817
|
properties used to qualify the lookup.
|
|
@@ -807,26 +819,26 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
807
819
|
:param str resource_name: The unique name of the resulting resource.
|
|
808
820
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
809
821
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
810
|
-
:param pulumi.Input[str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
811
|
-
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
|
812
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
813
|
-
:param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
|
|
814
|
-
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
815
|
-
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
816
|
-
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
817
|
-
:param pulumi.Input[
|
|
818
|
-
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
|
819
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
|
820
|
-
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
821
|
-
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
|
822
|
-
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
822
|
+
:param pulumi.Input[_builtins.str] condition_scope: `application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
823
|
+
:param pulumi.Input[_builtins.bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
|
824
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] entities: The instance IDs associated with this condition.
|
|
825
|
+
:param pulumi.Input[_builtins.str] entity_guid: The unique entity identifier of the condition in New Relic.
|
|
826
|
+
:param pulumi.Input[_builtins.str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
827
|
+
:param pulumi.Input[_builtins.str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
828
|
+
:param pulumi.Input[_builtins.str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
829
|
+
:param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
|
|
830
|
+
:param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
|
|
831
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]] terms: A list of terms for this condition. See Terms below for details.
|
|
832
|
+
:param pulumi.Input[_builtins.str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
833
|
+
:param pulumi.Input[_builtins.str] user_defined_metric: A custom metric to be evaluated.
|
|
834
|
+
:param pulumi.Input[_builtins.str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
823
835
|
|
|
824
836
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
|
825
837
|
|
|
826
|
-
```python
|
|
827
|
-
import pulumi
|
|
828
838
|
```
|
|
829
|
-
|
|
839
|
+
Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
|
|
840
|
+
```
|
|
841
|
+
:param pulumi.Input[_builtins.int] violation_close_timer: Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
830
842
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
|
831
843
|
* when `type` = `apm_jvm_metric`
|
|
832
844
|
"""
|
|
@@ -850,79 +862,79 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
850
862
|
__props__.__dict__["violation_close_timer"] = violation_close_timer
|
|
851
863
|
return AlertCondition(resource_name, opts=opts, __props__=__props__)
|
|
852
864
|
|
|
853
|
-
@property
|
|
865
|
+
@_builtins.property
|
|
854
866
|
@pulumi.getter(name="conditionScope")
|
|
855
|
-
def condition_scope(self) -> pulumi.Output[Optional[str]]:
|
|
867
|
+
def condition_scope(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
856
868
|
"""
|
|
857
869
|
`application` or `instance`. Choose `application` for most scenarios. If you are using the JVM plugin in New Relic, the `instance` setting allows your condition to trigger [for specific app instances](https://docs.newrelic.com/docs/alerts/new-relic-alerts/defining-conditions/scope-alert-thresholds-specific-instances).
|
|
858
870
|
"""
|
|
859
871
|
return pulumi.get(self, "condition_scope")
|
|
860
872
|
|
|
861
|
-
@property
|
|
873
|
+
@_builtins.property
|
|
862
874
|
@pulumi.getter
|
|
863
|
-
def enabled(self) -> pulumi.Output[Optional[bool]]:
|
|
875
|
+
def enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
|
|
864
876
|
"""
|
|
865
877
|
Whether the condition is enabled or not. Defaults to true.
|
|
866
878
|
"""
|
|
867
879
|
return pulumi.get(self, "enabled")
|
|
868
880
|
|
|
869
|
-
@property
|
|
881
|
+
@_builtins.property
|
|
870
882
|
@pulumi.getter
|
|
871
|
-
def entities(self) -> pulumi.Output[Sequence[
|
|
883
|
+
def entities(self) -> pulumi.Output[Sequence[_builtins.str]]:
|
|
872
884
|
"""
|
|
873
885
|
The instance IDs associated with this condition.
|
|
874
886
|
"""
|
|
875
887
|
return pulumi.get(self, "entities")
|
|
876
888
|
|
|
877
|
-
@property
|
|
889
|
+
@_builtins.property
|
|
878
890
|
@pulumi.getter(name="entityGuid")
|
|
879
|
-
def entity_guid(self) -> pulumi.Output[str]:
|
|
891
|
+
def entity_guid(self) -> pulumi.Output[_builtins.str]:
|
|
880
892
|
"""
|
|
881
893
|
The unique entity identifier of the condition in New Relic.
|
|
882
894
|
"""
|
|
883
895
|
return pulumi.get(self, "entity_guid")
|
|
884
896
|
|
|
885
|
-
@property
|
|
897
|
+
@_builtins.property
|
|
886
898
|
@pulumi.getter(name="gcMetric")
|
|
887
|
-
def gc_metric(self) -> pulumi.Output[Optional[str]]:
|
|
899
|
+
def gc_metric(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
888
900
|
"""
|
|
889
901
|
A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
|
890
902
|
"""
|
|
891
903
|
return pulumi.get(self, "gc_metric")
|
|
892
904
|
|
|
893
|
-
@property
|
|
905
|
+
@_builtins.property
|
|
894
906
|
@pulumi.getter
|
|
895
|
-
def metric(self) -> pulumi.Output[str]:
|
|
907
|
+
def metric(self) -> pulumi.Output[_builtins.str]:
|
|
896
908
|
"""
|
|
897
909
|
The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
|
898
910
|
"""
|
|
899
911
|
return pulumi.get(self, "metric")
|
|
900
912
|
|
|
901
|
-
@property
|
|
913
|
+
@_builtins.property
|
|
902
914
|
@pulumi.getter
|
|
903
|
-
def name(self) -> pulumi.Output[str]:
|
|
915
|
+
def name(self) -> pulumi.Output[_builtins.str]:
|
|
904
916
|
"""
|
|
905
917
|
The title of the condition. Must be between 1 and 64 characters, inclusive.
|
|
906
918
|
"""
|
|
907
919
|
return pulumi.get(self, "name")
|
|
908
920
|
|
|
909
|
-
@property
|
|
921
|
+
@_builtins.property
|
|
910
922
|
@pulumi.getter(name="policyId")
|
|
911
|
-
def policy_id(self) -> pulumi.Output[
|
|
923
|
+
def policy_id(self) -> pulumi.Output[_builtins.str]:
|
|
912
924
|
"""
|
|
913
925
|
The ID of the policy where this condition should be used.
|
|
914
926
|
"""
|
|
915
927
|
return pulumi.get(self, "policy_id")
|
|
916
928
|
|
|
917
|
-
@property
|
|
929
|
+
@_builtins.property
|
|
918
930
|
@pulumi.getter(name="runbookUrl")
|
|
919
|
-
def runbook_url(self) -> pulumi.Output[Optional[str]]:
|
|
931
|
+
def runbook_url(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
920
932
|
"""
|
|
921
933
|
Runbook URL to display in notifications.
|
|
922
934
|
"""
|
|
923
935
|
return pulumi.get(self, "runbook_url")
|
|
924
936
|
|
|
925
|
-
@property
|
|
937
|
+
@_builtins.property
|
|
926
938
|
@pulumi.getter
|
|
927
939
|
def terms(self) -> pulumi.Output[Sequence['outputs.AlertConditionTerm']]:
|
|
928
940
|
"""
|
|
@@ -930,39 +942,39 @@ class AlertCondition(pulumi.CustomResource):
|
|
|
930
942
|
"""
|
|
931
943
|
return pulumi.get(self, "terms")
|
|
932
944
|
|
|
933
|
-
@property
|
|
945
|
+
@_builtins.property
|
|
934
946
|
@pulumi.getter
|
|
935
|
-
def type(self) -> pulumi.Output[str]:
|
|
947
|
+
def type(self) -> pulumi.Output[_builtins.str]:
|
|
936
948
|
"""
|
|
937
949
|
The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
|
938
950
|
"""
|
|
939
951
|
return pulumi.get(self, "type")
|
|
940
952
|
|
|
941
|
-
@property
|
|
953
|
+
@_builtins.property
|
|
942
954
|
@pulumi.getter(name="userDefinedMetric")
|
|
943
|
-
def user_defined_metric(self) -> pulumi.Output[Optional[str]]:
|
|
955
|
+
def user_defined_metric(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
944
956
|
"""
|
|
945
957
|
A custom metric to be evaluated.
|
|
946
958
|
"""
|
|
947
959
|
return pulumi.get(self, "user_defined_metric")
|
|
948
960
|
|
|
949
|
-
@property
|
|
961
|
+
@_builtins.property
|
|
950
962
|
@pulumi.getter(name="userDefinedValueFunction")
|
|
951
|
-
def user_defined_value_function(self) -> pulumi.Output[Optional[str]]:
|
|
963
|
+
def user_defined_value_function(self) -> pulumi.Output[Optional[_builtins.str]]:
|
|
952
964
|
"""
|
|
953
965
|
One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
|
954
966
|
|
|
955
967
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
|
956
968
|
|
|
957
|
-
```
|
|
958
|
-
|
|
969
|
+
```
|
|
970
|
+
Warning: This resource will use the account ID linked to your API key. At the moment it is not possible to dynamically set the account ID.
|
|
959
971
|
```
|
|
960
972
|
"""
|
|
961
973
|
return pulumi.get(self, "user_defined_value_function")
|
|
962
974
|
|
|
963
|
-
@property
|
|
975
|
+
@_builtins.property
|
|
964
976
|
@pulumi.getter(name="violationCloseTimer")
|
|
965
|
-
def violation_close_timer(self) -> pulumi.Output[Optional[int]]:
|
|
977
|
+
def violation_close_timer(self) -> pulumi.Output[Optional[_builtins.int]]:
|
|
966
978
|
"""
|
|
967
979
|
Automatically close instance-based incidents, including JVM health metric incidents, after the number of hours specified. Must be between 1 and 720 hours. Must be specified in the following two cases, to prevent drift:
|
|
968
980
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|