pulumi-newrelic 5.21.0a1710157101__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 +11 -6
- pulumi_newrelic/alert_channel.py +116 -127
- pulumi_newrelic/alert_condition.py +116 -129
- pulumi_newrelic/alert_muting_rule.py +128 -76
- pulumi_newrelic/alert_policy.py +78 -75
- pulumi_newrelic/alert_policy_channel.py +77 -68
- pulumi_newrelic/api_access_key.py +45 -28
- pulumi_newrelic/browser_application.py +77 -78
- pulumi_newrelic/cloud/_inputs.py +2527 -1082
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +133 -128
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +23 -20
- pulumi_newrelic/cloud/aws_integrations.py +298 -1326
- pulumi_newrelic/cloud/aws_link_account.py +23 -20
- pulumi_newrelic/cloud/azure_integrations.py +521 -483
- pulumi_newrelic/cloud/azure_link_account.py +34 -31
- pulumi_newrelic/cloud/gcp_integrations.py +341 -322
- pulumi_newrelic/cloud/gcp_link_account.py +23 -20
- pulumi_newrelic/cloud/outputs.py +327 -1072
- pulumi_newrelic/config/__init__.pyi +6 -1
- pulumi_newrelic/config/vars.py +7 -2
- pulumi_newrelic/data_partition_rule.py +19 -18
- pulumi_newrelic/entity_tags.py +32 -31
- pulumi_newrelic/events_to_metrics_rule.py +23 -20
- pulumi_newrelic/get_account.py +24 -16
- pulumi_newrelic/get_alert_channel.py +26 -13
- pulumi_newrelic/get_alert_policy.py +35 -12
- pulumi_newrelic/get_application.py +39 -31
- pulumi_newrelic/get_authentication_domain.py +17 -13
- pulumi_newrelic/get_cloud_account.py +26 -18
- pulumi_newrelic/get_entity.py +90 -147
- pulumi_newrelic/get_group.py +58 -13
- pulumi_newrelic/get_key_transaction.py +109 -34
- pulumi_newrelic/get_notification_destination.py +64 -14
- pulumi_newrelic/get_obfuscation_expression.py +36 -28
- pulumi_newrelic/get_service_level_alert_helper.py +135 -117
- pulumi_newrelic/get_test_grok_pattern.py +29 -18
- pulumi_newrelic/get_user.py +17 -9
- pulumi_newrelic/group.py +5 -146
- pulumi_newrelic/infra_alert_condition.py +160 -167
- pulumi_newrelic/insights/_inputs.py +43 -0
- pulumi_newrelic/insights/event.py +48 -47
- pulumi_newrelic/insights/outputs.py +5 -0
- pulumi_newrelic/key_transaction.py +464 -0
- pulumi_newrelic/log_parsing_rule.py +25 -24
- pulumi_newrelic/monitor_downtime.py +211 -225
- pulumi_newrelic/notification_channel.py +381 -366
- pulumi_newrelic/notification_destination.py +192 -54
- pulumi_newrelic/nrql_alert_condition.py +345 -262
- pulumi_newrelic/nrql_drop_rule.py +31 -30
- pulumi_newrelic/obfuscation_expression.py +23 -20
- pulumi_newrelic/obfuscation_rule.py +38 -33
- pulumi_newrelic/one_dashboard.py +29 -24
- pulumi_newrelic/one_dashboard_json.py +19 -14
- pulumi_newrelic/one_dashboard_raw.py +110 -105
- pulumi_newrelic/outputs.py +2446 -245
- pulumi_newrelic/plugins/_inputs.py +145 -10
- pulumi_newrelic/plugins/application_settings.py +25 -36
- pulumi_newrelic/plugins/outputs.py +15 -10
- pulumi_newrelic/plugins/workload.py +215 -92
- pulumi_newrelic/provider.py +27 -33
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +185 -186
- pulumi_newrelic/synthetics/_inputs.py +159 -2
- pulumi_newrelic/synthetics/alert_condition.py +87 -98
- pulumi_newrelic/synthetics/broken_links_monitor.py +216 -99
- pulumi_newrelic/synthetics/cert_check_monitor.py +219 -100
- pulumi_newrelic/synthetics/get_private_location.py +34 -30
- pulumi_newrelic/synthetics/get_secure_credential.py +24 -16
- pulumi_newrelic/synthetics/monitor.py +348 -193
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +105 -100
- pulumi_newrelic/synthetics/outputs.py +7 -2
- pulumi_newrelic/synthetics/private_location.py +25 -20
- pulumi_newrelic/synthetics/script_monitor.py +317 -182
- pulumi_newrelic/synthetics/secure_credential.py +23 -22
- pulumi_newrelic/synthetics/step_monitor.py +405 -100
- pulumi_newrelic/user.py +13 -10
- pulumi_newrelic/workflow.py +209 -196
- {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/METADATA +7 -6
- pulumi_newrelic-5.39.0a1736834464.dist-info/RECORD +90 -0
- {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.21.0a1710157101.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/top_level.txt +0 -0
@@ -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
|
from . import outputs
|
12
17
|
from ._inputs import *
|
@@ -16,9 +21,9 @@ __all__ = ['AlertConditionArgs', 'AlertCondition']
|
|
16
21
|
@pulumi.input_type
|
17
22
|
class AlertConditionArgs:
|
18
23
|
def __init__(__self__, *,
|
19
|
-
entities: pulumi.Input[Sequence[pulumi.Input[
|
24
|
+
entities: pulumi.Input[Sequence[pulumi.Input[str]]],
|
20
25
|
metric: pulumi.Input[str],
|
21
|
-
policy_id: pulumi.Input[
|
26
|
+
policy_id: pulumi.Input[str],
|
22
27
|
terms: pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]],
|
23
28
|
type: pulumi.Input[str],
|
24
29
|
condition_scope: Optional[pulumi.Input[str]] = None,
|
@@ -31,9 +36,9 @@ class AlertConditionArgs:
|
|
31
36
|
violation_close_timer: Optional[pulumi.Input[int]] = None):
|
32
37
|
"""
|
33
38
|
The set of arguments for constructing a AlertCondition resource.
|
34
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
39
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] entities: The instance IDs associated with this condition.
|
35
40
|
: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[
|
41
|
+
:param pulumi.Input[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
43
|
: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
44
|
: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).
|
@@ -46,11 +51,9 @@ class AlertConditionArgs:
|
|
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
|
-
<!--Start PulumiCodeChooser -->
|
50
|
-
```python
|
51
|
-
import pulumi
|
52
54
|
```
|
53
|
-
|
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
|
+
```
|
54
57
|
:param pulumi.Input[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:
|
55
58
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
56
59
|
* when `type` = `apm_jvm_metric`
|
@@ -79,14 +82,14 @@ class AlertConditionArgs:
|
|
79
82
|
|
80
83
|
@property
|
81
84
|
@pulumi.getter
|
82
|
-
def entities(self) -> pulumi.Input[Sequence[pulumi.Input[
|
85
|
+
def entities(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
|
83
86
|
"""
|
84
87
|
The instance IDs associated with this condition.
|
85
88
|
"""
|
86
89
|
return pulumi.get(self, "entities")
|
87
90
|
|
88
91
|
@entities.setter
|
89
|
-
def entities(self, value: pulumi.Input[Sequence[pulumi.Input[
|
92
|
+
def entities(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
|
90
93
|
pulumi.set(self, "entities", value)
|
91
94
|
|
92
95
|
@property
|
@@ -103,14 +106,14 @@ class AlertConditionArgs:
|
|
103
106
|
|
104
107
|
@property
|
105
108
|
@pulumi.getter(name="policyId")
|
106
|
-
def policy_id(self) -> pulumi.Input[
|
109
|
+
def policy_id(self) -> pulumi.Input[str]:
|
107
110
|
"""
|
108
111
|
The ID of the policy where this condition should be used.
|
109
112
|
"""
|
110
113
|
return pulumi.get(self, "policy_id")
|
111
114
|
|
112
115
|
@policy_id.setter
|
113
|
-
def policy_id(self, value: pulumi.Input[
|
116
|
+
def policy_id(self, value: pulumi.Input[str]):
|
114
117
|
pulumi.set(self, "policy_id", value)
|
115
118
|
|
116
119
|
@property
|
@@ -217,11 +220,9 @@ class AlertConditionArgs:
|
|
217
220
|
|
218
221
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
219
222
|
|
220
|
-
<!--Start PulumiCodeChooser -->
|
221
|
-
```python
|
222
|
-
import pulumi
|
223
223
|
```
|
224
|
-
|
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.
|
225
|
+
```
|
225
226
|
"""
|
226
227
|
return pulumi.get(self, "user_defined_value_function")
|
227
228
|
|
@@ -249,12 +250,12 @@ class _AlertConditionState:
|
|
249
250
|
def __init__(__self__, *,
|
250
251
|
condition_scope: Optional[pulumi.Input[str]] = None,
|
251
252
|
enabled: Optional[pulumi.Input[bool]] = None,
|
252
|
-
entities: Optional[pulumi.Input[Sequence[pulumi.Input[
|
253
|
+
entities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
253
254
|
entity_guid: Optional[pulumi.Input[str]] = None,
|
254
255
|
gc_metric: Optional[pulumi.Input[str]] = None,
|
255
256
|
metric: Optional[pulumi.Input[str]] = None,
|
256
257
|
name: Optional[pulumi.Input[str]] = None,
|
257
|
-
policy_id: Optional[pulumi.Input[
|
258
|
+
policy_id: Optional[pulumi.Input[str]] = None,
|
258
259
|
runbook_url: Optional[pulumi.Input[str]] = None,
|
259
260
|
terms: Optional[pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]]] = None,
|
260
261
|
type: Optional[pulumi.Input[str]] = None,
|
@@ -265,12 +266,12 @@ class _AlertConditionState:
|
|
265
266
|
Input properties used for looking up and filtering AlertCondition resources.
|
266
267
|
: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).
|
267
268
|
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
268
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
269
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] entities: The instance IDs associated with this condition.
|
269
270
|
:param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
|
270
271
|
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
271
272
|
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
272
273
|
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
273
|
-
:param pulumi.Input[
|
274
|
+
:param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
|
274
275
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
275
276
|
:param pulumi.Input[Sequence[pulumi.Input['AlertConditionTermArgs']]] terms: A list of terms for this condition. See Terms below for details.
|
276
277
|
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
@@ -279,11 +280,9 @@ class _AlertConditionState:
|
|
279
280
|
|
280
281
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
281
282
|
|
282
|
-
<!--Start PulumiCodeChooser -->
|
283
|
-
```python
|
284
|
-
import pulumi
|
285
283
|
```
|
286
|
-
|
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
|
+
```
|
287
286
|
:param pulumi.Input[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:
|
288
287
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
289
288
|
* when `type` = `apm_jvm_metric`
|
@@ -343,14 +342,14 @@ class _AlertConditionState:
|
|
343
342
|
|
344
343
|
@property
|
345
344
|
@pulumi.getter
|
346
|
-
def entities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[
|
345
|
+
def entities(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
347
346
|
"""
|
348
347
|
The instance IDs associated with this condition.
|
349
348
|
"""
|
350
349
|
return pulumi.get(self, "entities")
|
351
350
|
|
352
351
|
@entities.setter
|
353
|
-
def entities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[
|
352
|
+
def entities(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
354
353
|
pulumi.set(self, "entities", value)
|
355
354
|
|
356
355
|
@property
|
@@ -403,14 +402,14 @@ class _AlertConditionState:
|
|
403
402
|
|
404
403
|
@property
|
405
404
|
@pulumi.getter(name="policyId")
|
406
|
-
def policy_id(self) -> Optional[pulumi.Input[
|
405
|
+
def policy_id(self) -> Optional[pulumi.Input[str]]:
|
407
406
|
"""
|
408
407
|
The ID of the policy where this condition should be used.
|
409
408
|
"""
|
410
409
|
return pulumi.get(self, "policy_id")
|
411
410
|
|
412
411
|
@policy_id.setter
|
413
|
-
def policy_id(self, value: Optional[pulumi.Input[
|
412
|
+
def policy_id(self, value: Optional[pulumi.Input[str]]):
|
414
413
|
pulumi.set(self, "policy_id", value)
|
415
414
|
|
416
415
|
@property
|
@@ -469,11 +468,9 @@ class _AlertConditionState:
|
|
469
468
|
|
470
469
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
471
470
|
|
472
|
-
<!--Start PulumiCodeChooser -->
|
473
|
-
```python
|
474
|
-
import pulumi
|
475
471
|
```
|
476
|
-
|
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.
|
473
|
+
```
|
477
474
|
"""
|
478
475
|
return pulumi.get(self, "user_defined_value_function")
|
479
476
|
|
@@ -503,13 +500,13 @@ class AlertCondition(pulumi.CustomResource):
|
|
503
500
|
opts: Optional[pulumi.ResourceOptions] = None,
|
504
501
|
condition_scope: Optional[pulumi.Input[str]] = None,
|
505
502
|
enabled: Optional[pulumi.Input[bool]] = None,
|
506
|
-
entities: Optional[pulumi.Input[Sequence[pulumi.Input[
|
503
|
+
entities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
507
504
|
gc_metric: Optional[pulumi.Input[str]] = None,
|
508
505
|
metric: Optional[pulumi.Input[str]] = None,
|
509
506
|
name: Optional[pulumi.Input[str]] = None,
|
510
|
-
policy_id: Optional[pulumi.Input[
|
507
|
+
policy_id: Optional[pulumi.Input[str]] = None,
|
511
508
|
runbook_url: Optional[pulumi.Input[str]] = None,
|
512
|
-
terms: Optional[pulumi.Input[Sequence[pulumi.Input[
|
509
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]]] = None,
|
513
510
|
type: Optional[pulumi.Input[str]] = None,
|
514
511
|
user_defined_metric: Optional[pulumi.Input[str]] = None,
|
515
512
|
user_defined_value_function: Optional[pulumi.Input[str]] = None,
|
@@ -522,7 +519,6 @@ class AlertCondition(pulumi.CustomResource):
|
|
522
519
|
|
523
520
|
## Example Usage
|
524
521
|
|
525
|
-
<!--Start PulumiCodeChooser -->
|
526
522
|
```python
|
527
523
|
import pulumi
|
528
524
|
import pulumi_newrelic as newrelic
|
@@ -530,23 +526,23 @@ class AlertCondition(pulumi.CustomResource):
|
|
530
526
|
app = newrelic.get_entity(name="my-app",
|
531
527
|
type="APPLICATION",
|
532
528
|
domain="APM")
|
533
|
-
|
534
|
-
foo_alert_condition = newrelic.AlertCondition("
|
535
|
-
policy_id=
|
529
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
530
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
531
|
+
policy_id=foo.id,
|
532
|
+
name="foo",
|
536
533
|
type="apm_app_metric",
|
537
534
|
entities=[app.application_id],
|
538
535
|
metric="apdex",
|
539
536
|
runbook_url="https://www.example.com",
|
540
537
|
condition_scope="application",
|
541
|
-
terms=[
|
542
|
-
duration
|
543
|
-
operator
|
544
|
-
priority
|
545
|
-
threshold
|
546
|
-
time_function
|
547
|
-
|
538
|
+
terms=[{
|
539
|
+
"duration": 5,
|
540
|
+
"operator": "below",
|
541
|
+
"priority": "critical",
|
542
|
+
"threshold": 0.75,
|
543
|
+
"time_function": "all",
|
544
|
+
}])
|
548
545
|
```
|
549
|
-
<!--End PulumiCodeChooser -->
|
550
546
|
|
551
547
|
## Terms
|
552
548
|
|
@@ -562,44 +558,43 @@ class AlertCondition(pulumi.CustomResource):
|
|
562
558
|
|
563
559
|
Manage alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check EntityTags
|
564
560
|
|
565
|
-
<!--Start PulumiCodeChooser -->
|
566
561
|
```python
|
567
562
|
import pulumi
|
568
563
|
import pulumi_newrelic as newrelic
|
569
564
|
|
570
|
-
|
571
|
-
foo_alert_policy = newrelic.AlertPolicy("
|
572
|
-
foo_alert_condition = newrelic.AlertCondition("
|
565
|
+
foo = newrelic.get_entity(name="foo entitiy")
|
566
|
+
foo_alert_policy = newrelic.AlertPolicy("foo", name="foo policy")
|
567
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
573
568
|
policy_id=foo_alert_policy.id,
|
569
|
+
name="foo condition",
|
574
570
|
type="apm_app_metric",
|
575
|
-
entities=[
|
571
|
+
entities=[foo.application_id],
|
576
572
|
metric="apdex",
|
577
573
|
runbook_url="https://www.example.com",
|
578
574
|
condition_scope="application",
|
579
|
-
terms=[
|
580
|
-
duration
|
581
|
-
operator
|
582
|
-
priority
|
583
|
-
threshold
|
584
|
-
time_function
|
585
|
-
|
586
|
-
my_condition_entity_tags = newrelic.EntityTags("
|
575
|
+
terms=[{
|
576
|
+
"duration": 5,
|
577
|
+
"operator": "below",
|
578
|
+
"priority": "critical",
|
579
|
+
"threshold": 0.75,
|
580
|
+
"time_function": "all",
|
581
|
+
}])
|
582
|
+
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
|
587
583
|
guid=foo_alert_condition.entity_guid,
|
588
584
|
tags=[
|
589
|
-
|
590
|
-
key
|
591
|
-
values
|
585
|
+
{
|
586
|
+
"key": "my-key",
|
587
|
+
"values": [
|
592
588
|
"my-value",
|
593
589
|
"my-other-value",
|
594
590
|
],
|
595
|
-
|
596
|
-
|
597
|
-
key
|
598
|
-
values
|
599
|
-
|
591
|
+
},
|
592
|
+
{
|
593
|
+
"key": "my-key-2",
|
594
|
+
"values": ["my-value-2"],
|
595
|
+
},
|
600
596
|
])
|
601
597
|
```
|
602
|
-
<!--End PulumiCodeChooser -->
|
603
598
|
|
604
599
|
## Import
|
605
600
|
|
@@ -613,24 +608,22 @@ class AlertCondition(pulumi.CustomResource):
|
|
613
608
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
614
609
|
: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).
|
615
610
|
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
616
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
611
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] entities: The instance IDs associated with this condition.
|
617
612
|
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
618
613
|
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
619
614
|
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
620
|
-
:param pulumi.Input[
|
615
|
+
:param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
|
621
616
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
622
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
617
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]] terms: A list of terms for this condition. See Terms below for details.
|
623
618
|
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
624
619
|
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
625
620
|
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
626
621
|
|
627
622
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
628
623
|
|
629
|
-
<!--Start PulumiCodeChooser -->
|
630
|
-
```python
|
631
|
-
import pulumi
|
632
624
|
```
|
633
|
-
|
625
|
+
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.
|
626
|
+
```
|
634
627
|
:param pulumi.Input[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:
|
635
628
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
636
629
|
* when `type` = `apm_jvm_metric`
|
@@ -648,7 +641,6 @@ class AlertCondition(pulumi.CustomResource):
|
|
648
641
|
|
649
642
|
## Example Usage
|
650
643
|
|
651
|
-
<!--Start PulumiCodeChooser -->
|
652
644
|
```python
|
653
645
|
import pulumi
|
654
646
|
import pulumi_newrelic as newrelic
|
@@ -656,23 +648,23 @@ class AlertCondition(pulumi.CustomResource):
|
|
656
648
|
app = newrelic.get_entity(name="my-app",
|
657
649
|
type="APPLICATION",
|
658
650
|
domain="APM")
|
659
|
-
|
660
|
-
foo_alert_condition = newrelic.AlertCondition("
|
661
|
-
policy_id=
|
651
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
652
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
653
|
+
policy_id=foo.id,
|
654
|
+
name="foo",
|
662
655
|
type="apm_app_metric",
|
663
656
|
entities=[app.application_id],
|
664
657
|
metric="apdex",
|
665
658
|
runbook_url="https://www.example.com",
|
666
659
|
condition_scope="application",
|
667
|
-
terms=[
|
668
|
-
duration
|
669
|
-
operator
|
670
|
-
priority
|
671
|
-
threshold
|
672
|
-
time_function
|
673
|
-
|
660
|
+
terms=[{
|
661
|
+
"duration": 5,
|
662
|
+
"operator": "below",
|
663
|
+
"priority": "critical",
|
664
|
+
"threshold": 0.75,
|
665
|
+
"time_function": "all",
|
666
|
+
}])
|
674
667
|
```
|
675
|
-
<!--End PulumiCodeChooser -->
|
676
668
|
|
677
669
|
## Terms
|
678
670
|
|
@@ -688,44 +680,43 @@ class AlertCondition(pulumi.CustomResource):
|
|
688
680
|
|
689
681
|
Manage alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check EntityTags
|
690
682
|
|
691
|
-
<!--Start PulumiCodeChooser -->
|
692
683
|
```python
|
693
684
|
import pulumi
|
694
685
|
import pulumi_newrelic as newrelic
|
695
686
|
|
696
|
-
|
697
|
-
foo_alert_policy = newrelic.AlertPolicy("
|
698
|
-
foo_alert_condition = newrelic.AlertCondition("
|
687
|
+
foo = newrelic.get_entity(name="foo entitiy")
|
688
|
+
foo_alert_policy = newrelic.AlertPolicy("foo", name="foo policy")
|
689
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
699
690
|
policy_id=foo_alert_policy.id,
|
691
|
+
name="foo condition",
|
700
692
|
type="apm_app_metric",
|
701
|
-
entities=[
|
693
|
+
entities=[foo.application_id],
|
702
694
|
metric="apdex",
|
703
695
|
runbook_url="https://www.example.com",
|
704
696
|
condition_scope="application",
|
705
|
-
terms=[
|
706
|
-
duration
|
707
|
-
operator
|
708
|
-
priority
|
709
|
-
threshold
|
710
|
-
time_function
|
711
|
-
|
712
|
-
my_condition_entity_tags = newrelic.EntityTags("
|
697
|
+
terms=[{
|
698
|
+
"duration": 5,
|
699
|
+
"operator": "below",
|
700
|
+
"priority": "critical",
|
701
|
+
"threshold": 0.75,
|
702
|
+
"time_function": "all",
|
703
|
+
}])
|
704
|
+
my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
|
713
705
|
guid=foo_alert_condition.entity_guid,
|
714
706
|
tags=[
|
715
|
-
|
716
|
-
key
|
717
|
-
values
|
707
|
+
{
|
708
|
+
"key": "my-key",
|
709
|
+
"values": [
|
718
710
|
"my-value",
|
719
711
|
"my-other-value",
|
720
712
|
],
|
721
|
-
|
722
|
-
|
723
|
-
key
|
724
|
-
values
|
725
|
-
|
713
|
+
},
|
714
|
+
{
|
715
|
+
"key": "my-key-2",
|
716
|
+
"values": ["my-value-2"],
|
717
|
+
},
|
726
718
|
])
|
727
719
|
```
|
728
|
-
<!--End PulumiCodeChooser -->
|
729
720
|
|
730
721
|
## Import
|
731
722
|
|
@@ -752,13 +743,13 @@ class AlertCondition(pulumi.CustomResource):
|
|
752
743
|
opts: Optional[pulumi.ResourceOptions] = None,
|
753
744
|
condition_scope: Optional[pulumi.Input[str]] = None,
|
754
745
|
enabled: Optional[pulumi.Input[bool]] = None,
|
755
|
-
entities: Optional[pulumi.Input[Sequence[pulumi.Input[
|
746
|
+
entities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
756
747
|
gc_metric: Optional[pulumi.Input[str]] = None,
|
757
748
|
metric: Optional[pulumi.Input[str]] = None,
|
758
749
|
name: Optional[pulumi.Input[str]] = None,
|
759
|
-
policy_id: Optional[pulumi.Input[
|
750
|
+
policy_id: Optional[pulumi.Input[str]] = None,
|
760
751
|
runbook_url: Optional[pulumi.Input[str]] = None,
|
761
|
-
terms: Optional[pulumi.Input[Sequence[pulumi.Input[
|
752
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]]] = None,
|
762
753
|
type: Optional[pulumi.Input[str]] = None,
|
763
754
|
user_defined_metric: Optional[pulumi.Input[str]] = None,
|
764
755
|
user_defined_value_function: Optional[pulumi.Input[str]] = None,
|
@@ -808,14 +799,14 @@ class AlertCondition(pulumi.CustomResource):
|
|
808
799
|
opts: Optional[pulumi.ResourceOptions] = None,
|
809
800
|
condition_scope: Optional[pulumi.Input[str]] = None,
|
810
801
|
enabled: Optional[pulumi.Input[bool]] = None,
|
811
|
-
entities: Optional[pulumi.Input[Sequence[pulumi.Input[
|
802
|
+
entities: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
812
803
|
entity_guid: Optional[pulumi.Input[str]] = None,
|
813
804
|
gc_metric: Optional[pulumi.Input[str]] = None,
|
814
805
|
metric: Optional[pulumi.Input[str]] = None,
|
815
806
|
name: Optional[pulumi.Input[str]] = None,
|
816
|
-
policy_id: Optional[pulumi.Input[
|
807
|
+
policy_id: Optional[pulumi.Input[str]] = None,
|
817
808
|
runbook_url: Optional[pulumi.Input[str]] = None,
|
818
|
-
terms: Optional[pulumi.Input[Sequence[pulumi.Input[
|
809
|
+
terms: Optional[pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]]] = None,
|
819
810
|
type: Optional[pulumi.Input[str]] = None,
|
820
811
|
user_defined_metric: Optional[pulumi.Input[str]] = None,
|
821
812
|
user_defined_value_function: Optional[pulumi.Input[str]] = None,
|
@@ -829,25 +820,23 @@ class AlertCondition(pulumi.CustomResource):
|
|
829
820
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
830
821
|
: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).
|
831
822
|
:param pulumi.Input[bool] enabled: Whether the condition is enabled or not. Defaults to true.
|
832
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
823
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] entities: The instance IDs associated with this condition.
|
833
824
|
:param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
|
834
825
|
:param pulumi.Input[str] gc_metric: A valid Garbage Collection metric e.g. `GC/G1 Young Generation`.
|
835
826
|
:param pulumi.Input[str] metric: The metric field accepts parameters based on the `type` set. One of these metrics based on `type`:
|
836
827
|
:param pulumi.Input[str] name: The title of the condition. Must be between 1 and 64 characters, inclusive.
|
837
|
-
:param pulumi.Input[
|
828
|
+
:param pulumi.Input[str] policy_id: The ID of the policy where this condition should be used.
|
838
829
|
:param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
|
839
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
830
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['AlertConditionTermArgs', 'AlertConditionTermArgsDict']]]] terms: A list of terms for this condition. See Terms below for details.
|
840
831
|
:param pulumi.Input[str] type: The type of condition. One of: `apm_app_metric`, `apm_jvm_metric`, `apm_kt_metric`, `browser_metric`, `mobile_metric`
|
841
832
|
:param pulumi.Input[str] user_defined_metric: A custom metric to be evaluated.
|
842
833
|
:param pulumi.Input[str] user_defined_value_function: One of: `average`, `min`, `max`, `total`, `sample_size`, `rate` or `percent`.
|
843
834
|
|
844
835
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
845
836
|
|
846
|
-
<!--Start PulumiCodeChooser -->
|
847
|
-
```python
|
848
|
-
import pulumi
|
849
837
|
```
|
850
|
-
|
838
|
+
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.
|
839
|
+
```
|
851
840
|
:param pulumi.Input[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:
|
852
841
|
* when `type` = `apm_app_metric` and `condition_scope` = `instance`
|
853
842
|
* when `type` = `apm_jvm_metric`
|
@@ -890,7 +879,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
890
879
|
|
891
880
|
@property
|
892
881
|
@pulumi.getter
|
893
|
-
def entities(self) -> pulumi.Output[Sequence[
|
882
|
+
def entities(self) -> pulumi.Output[Sequence[str]]:
|
894
883
|
"""
|
895
884
|
The instance IDs associated with this condition.
|
896
885
|
"""
|
@@ -930,7 +919,7 @@ class AlertCondition(pulumi.CustomResource):
|
|
930
919
|
|
931
920
|
@property
|
932
921
|
@pulumi.getter(name="policyId")
|
933
|
-
def policy_id(self) -> pulumi.Output[
|
922
|
+
def policy_id(self) -> pulumi.Output[str]:
|
934
923
|
"""
|
935
924
|
The ID of the policy where this condition should be used.
|
936
925
|
"""
|
@@ -976,11 +965,9 @@ class AlertCondition(pulumi.CustomResource):
|
|
976
965
|
|
977
966
|
> **NOTE:** The `user_defined_value_function` can have `rate` or `percent` only when the `type` is `mobile_metric`.
|
978
967
|
|
979
|
-
<!--Start PulumiCodeChooser -->
|
980
|
-
```python
|
981
|
-
import pulumi
|
982
968
|
```
|
983
|
-
|
969
|
+
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.
|
970
|
+
```
|
984
971
|
"""
|
985
972
|
return pulumi.get(self, "user_defined_value_function")
|
986
973
|
|