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.

Files changed (92) hide show
  1. pulumi_newrelic/__init__.py +58 -1
  2. pulumi_newrelic/_inputs.py +10772 -2775
  3. pulumi_newrelic/_utilities.py +92 -11
  4. pulumi_newrelic/account_management.py +56 -42
  5. pulumi_newrelic/alert_channel.py +177 -151
  6. pulumi_newrelic/alert_condition.py +313 -301
  7. pulumi_newrelic/alert_muting_rule.py +195 -138
  8. pulumi_newrelic/alert_policy.py +157 -109
  9. pulumi_newrelic/alert_policy_channel.py +95 -81
  10. pulumi_newrelic/api_access_key.py +191 -209
  11. pulumi_newrelic/browser_application.py +161 -153
  12. pulumi_newrelic/cloud/__init__.py +3 -1
  13. pulumi_newrelic/cloud/_inputs.py +4267 -2710
  14. pulumi_newrelic/cloud/aws_govcloud_integrations.py +238 -200
  15. pulumi_newrelic/cloud/aws_govcloud_link_account.py +159 -212
  16. pulumi_newrelic/cloud/aws_integrations.py +518 -1490
  17. pulumi_newrelic/cloud/aws_link_account.py +88 -76
  18. pulumi_newrelic/cloud/azure_integrations.py +681 -587
  19. pulumi_newrelic/cloud/azure_link_account.py +129 -117
  20. pulumi_newrelic/cloud/gcp_integrations.py +436 -408
  21. pulumi_newrelic/cloud/gcp_link_account.py +71 -59
  22. pulumi_newrelic/cloud/oci_link_account.py +926 -0
  23. pulumi_newrelic/cloud/outputs.py +1678 -2317
  24. pulumi_newrelic/config/__init__.py +2 -1
  25. pulumi_newrelic/config/__init__.pyi +45 -0
  26. pulumi_newrelic/config/vars.py +22 -17
  27. pulumi_newrelic/data_partition_rule.py +129 -117
  28. pulumi_newrelic/entity_tags.py +153 -31
  29. pulumi_newrelic/events_to_metrics_rule.py +114 -102
  30. pulumi_newrelic/get_account.py +41 -29
  31. pulumi_newrelic/get_alert_channel.py +73 -28
  32. pulumi_newrelic/get_alert_policy.py +83 -34
  33. pulumi_newrelic/get_application.py +51 -39
  34. pulumi_newrelic/get_authentication_domain.py +111 -0
  35. pulumi_newrelic/get_cloud_account.py +43 -31
  36. pulumi_newrelic/get_entity.py +126 -121
  37. pulumi_newrelic/get_group.py +190 -0
  38. pulumi_newrelic/get_key_transaction.py +117 -38
  39. pulumi_newrelic/get_notification_destination.py +86 -36
  40. pulumi_newrelic/get_obfuscation_expression.py +47 -35
  41. pulumi_newrelic/get_service_level_alert_helper.py +237 -137
  42. pulumi_newrelic/get_test_grok_pattern.py +47 -32
  43. pulumi_newrelic/get_user.py +165 -0
  44. pulumi_newrelic/group.py +286 -0
  45. pulumi_newrelic/infra_alert_condition.py +400 -382
  46. pulumi_newrelic/insights/__init__.py +2 -1
  47. pulumi_newrelic/insights/_inputs.py +94 -23
  48. pulumi_newrelic/insights/event.py +56 -48
  49. pulumi_newrelic/insights/outputs.py +51 -18
  50. pulumi_newrelic/key_transaction.py +465 -0
  51. pulumi_newrelic/log_parsing_rule.py +169 -153
  52. pulumi_newrelic/monitor_downtime.py +914 -0
  53. pulumi_newrelic/notification_channel.py +560 -418
  54. pulumi_newrelic/notification_destination.py +379 -124
  55. pulumi_newrelic/nrql_alert_condition.py +945 -513
  56. pulumi_newrelic/nrql_drop_rule.py +121 -129
  57. pulumi_newrelic/obfuscation_expression.py +88 -76
  58. pulumi_newrelic/obfuscation_rule.py +123 -109
  59. pulumi_newrelic/one_dashboard.py +118 -108
  60. pulumi_newrelic/one_dashboard_json.py +77 -67
  61. pulumi_newrelic/one_dashboard_raw.py +214 -202
  62. pulumi_newrelic/outputs.py +5491 -2141
  63. pulumi_newrelic/pipeline_cloud_rule.py +335 -0
  64. pulumi_newrelic/plugins/__init__.py +2 -1
  65. pulumi_newrelic/plugins/_inputs.py +520 -90
  66. pulumi_newrelic/plugins/application_settings.py +463 -167
  67. pulumi_newrelic/plugins/outputs.py +337 -75
  68. pulumi_newrelic/plugins/workload.py +387 -151
  69. pulumi_newrelic/provider.py +156 -142
  70. pulumi_newrelic/pulumi-plugin.json +2 -1
  71. pulumi_newrelic/service_level.py +277 -255
  72. pulumi_newrelic/synthetics/__init__.py +2 -1
  73. pulumi_newrelic/synthetics/_inputs.py +275 -106
  74. pulumi_newrelic/synthetics/alert_condition.py +174 -160
  75. pulumi_newrelic/synthetics/broken_links_monitor.py +367 -207
  76. pulumi_newrelic/synthetics/cert_check_monitor.py +380 -218
  77. pulumi_newrelic/synthetics/get_private_location.py +51 -39
  78. pulumi_newrelic/synthetics/get_secure_credential.py +39 -27
  79. pulumi_newrelic/synthetics/monitor.py +668 -462
  80. pulumi_newrelic/synthetics/multi_location_alert_condition.py +219 -201
  81. pulumi_newrelic/synthetics/outputs.py +102 -85
  82. pulumi_newrelic/synthetics/private_location.py +120 -110
  83. pulumi_newrelic/synthetics/script_monitor.py +623 -375
  84. pulumi_newrelic/synthetics/secure_credential.py +99 -93
  85. pulumi_newrelic/synthetics/step_monitor.py +545 -201
  86. pulumi_newrelic/user.py +366 -0
  87. pulumi_newrelic/workflow.py +348 -312
  88. {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +8 -7
  89. pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
  90. {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
  91. pulumi_newrelic-5.16.0a1698964311.dist-info/RECORD +0 -82
  92. {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 the Pulumi Terraform Bridge (tfgen) Tool. ***
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 copy
5
+ import builtins as _builtins
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from .. import _utilities
11
16
 
12
17
  __all__ = ['AlertConditionArgs', 'AlertCondition']
@@ -14,22 +19,22 @@ __all__ = ['AlertConditionArgs', 'AlertCondition']
14
19
  @pulumi.input_type
15
20
  class AlertConditionArgs:
16
21
  def __init__(__self__, *,
17
- monitor_id: pulumi.Input[str],
18
- policy_id: pulumi.Input[int],
19
- enabled: Optional[pulumi.Input[bool]] = None,
20
- name: Optional[pulumi.Input[str]] = None,
21
- runbook_url: Optional[pulumi.Input[str]] = None):
22
+ monitor_id: pulumi.Input[_builtins.str],
23
+ policy_id: pulumi.Input[_builtins.str],
24
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
25
+ name: Optional[pulumi.Input[_builtins.str]] = None,
26
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None):
22
27
  """
23
28
  The set of arguments for constructing a AlertCondition resource.
24
- :param pulumi.Input[str] monitor_id: The GUID of the Synthetics monitor to be referenced in the alert condition.
25
- :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
26
- :param pulumi.Input[bool] enabled: Set whether to enable the alert condition. Defaults to `true`.
29
+ :param pulumi.Input[_builtins.str] monitor_id: The GUID of the Synthetics monitor to be referenced in the alert condition.
30
+ :param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
31
+ :param pulumi.Input[_builtins.bool] enabled: Set whether to enable the alert condition. Defaults to `true`.
27
32
 
28
- ```python
29
- import pulumi
30
33
  ```
31
- :param pulumi.Input[str] name: The title of this condition.
32
- :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
34
+ 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.
35
+ ```
36
+ :param pulumi.Input[_builtins.str] name: The title of this condition.
37
+ :param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
33
38
  """
34
39
  pulumi.set(__self__, "monitor_id", monitor_id)
35
40
  pulumi.set(__self__, "policy_id", policy_id)
@@ -40,92 +45,92 @@ class AlertConditionArgs:
40
45
  if runbook_url is not None:
41
46
  pulumi.set(__self__, "runbook_url", runbook_url)
42
47
 
43
- @property
48
+ @_builtins.property
44
49
  @pulumi.getter(name="monitorId")
45
- def monitor_id(self) -> pulumi.Input[str]:
50
+ def monitor_id(self) -> pulumi.Input[_builtins.str]:
46
51
  """
47
52
  The GUID of the Synthetics monitor to be referenced in the alert condition.
48
53
  """
49
54
  return pulumi.get(self, "monitor_id")
50
55
 
51
56
  @monitor_id.setter
52
- def monitor_id(self, value: pulumi.Input[str]):
57
+ def monitor_id(self, value: pulumi.Input[_builtins.str]):
53
58
  pulumi.set(self, "monitor_id", value)
54
59
 
55
- @property
60
+ @_builtins.property
56
61
  @pulumi.getter(name="policyId")
57
- def policy_id(self) -> pulumi.Input[int]:
62
+ def policy_id(self) -> pulumi.Input[_builtins.str]:
58
63
  """
59
64
  The ID of the policy where this condition should be used.
60
65
  """
61
66
  return pulumi.get(self, "policy_id")
62
67
 
63
68
  @policy_id.setter
64
- def policy_id(self, value: pulumi.Input[int]):
69
+ def policy_id(self, value: pulumi.Input[_builtins.str]):
65
70
  pulumi.set(self, "policy_id", value)
66
71
 
67
- @property
72
+ @_builtins.property
68
73
  @pulumi.getter
69
- def enabled(self) -> Optional[pulumi.Input[bool]]:
74
+ def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
70
75
  """
71
76
  Set whether to enable the alert condition. Defaults to `true`.
72
77
 
73
- ```python
74
- import pulumi
78
+ ```
79
+ 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.
75
80
  ```
76
81
  """
77
82
  return pulumi.get(self, "enabled")
78
83
 
79
84
  @enabled.setter
80
- def enabled(self, value: Optional[pulumi.Input[bool]]):
85
+ def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
81
86
  pulumi.set(self, "enabled", value)
82
87
 
83
- @property
88
+ @_builtins.property
84
89
  @pulumi.getter
85
- def name(self) -> Optional[pulumi.Input[str]]:
90
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
86
91
  """
87
92
  The title of this condition.
88
93
  """
89
94
  return pulumi.get(self, "name")
90
95
 
91
96
  @name.setter
92
- def name(self, value: Optional[pulumi.Input[str]]):
97
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
93
98
  pulumi.set(self, "name", value)
94
99
 
95
- @property
100
+ @_builtins.property
96
101
  @pulumi.getter(name="runbookUrl")
97
- def runbook_url(self) -> Optional[pulumi.Input[str]]:
102
+ def runbook_url(self) -> Optional[pulumi.Input[_builtins.str]]:
98
103
  """
99
104
  Runbook URL to display in notifications.
100
105
  """
101
106
  return pulumi.get(self, "runbook_url")
102
107
 
103
108
  @runbook_url.setter
104
- def runbook_url(self, value: Optional[pulumi.Input[str]]):
109
+ def runbook_url(self, value: Optional[pulumi.Input[_builtins.str]]):
105
110
  pulumi.set(self, "runbook_url", value)
106
111
 
107
112
 
108
113
  @pulumi.input_type
109
114
  class _AlertConditionState:
110
115
  def __init__(__self__, *,
111
- enabled: Optional[pulumi.Input[bool]] = None,
112
- entity_guid: Optional[pulumi.Input[str]] = None,
113
- monitor_id: Optional[pulumi.Input[str]] = None,
114
- name: Optional[pulumi.Input[str]] = None,
115
- policy_id: Optional[pulumi.Input[int]] = None,
116
- runbook_url: Optional[pulumi.Input[str]] = None):
116
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
117
+ entity_guid: Optional[pulumi.Input[_builtins.str]] = None,
118
+ monitor_id: Optional[pulumi.Input[_builtins.str]] = None,
119
+ name: Optional[pulumi.Input[_builtins.str]] = None,
120
+ policy_id: Optional[pulumi.Input[_builtins.str]] = None,
121
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None):
117
122
  """
118
123
  Input properties used for looking up and filtering AlertCondition resources.
119
- :param pulumi.Input[bool] enabled: Set whether to enable the alert condition. Defaults to `true`.
124
+ :param pulumi.Input[_builtins.bool] enabled: Set whether to enable the alert condition. Defaults to `true`.
120
125
 
121
- ```python
122
- import pulumi
123
126
  ```
124
- :param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
125
- :param pulumi.Input[str] monitor_id: The GUID of the Synthetics monitor to be referenced in the alert condition.
126
- :param pulumi.Input[str] name: The title of this condition.
127
- :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
128
- :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
127
+ 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.
128
+ ```
129
+ :param pulumi.Input[_builtins.str] entity_guid: The unique entity identifier of the condition in New Relic.
130
+ :param pulumi.Input[_builtins.str] monitor_id: The GUID of the Synthetics monitor to be referenced in the alert condition.
131
+ :param pulumi.Input[_builtins.str] name: The title of this condition.
132
+ :param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
133
+ :param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
129
134
  """
130
135
  if enabled is not None:
131
136
  pulumi.set(__self__, "enabled", enabled)
@@ -140,98 +145,99 @@ class _AlertConditionState:
140
145
  if runbook_url is not None:
141
146
  pulumi.set(__self__, "runbook_url", runbook_url)
142
147
 
143
- @property
148
+ @_builtins.property
144
149
  @pulumi.getter
145
- def enabled(self) -> Optional[pulumi.Input[bool]]:
150
+ def enabled(self) -> Optional[pulumi.Input[_builtins.bool]]:
146
151
  """
147
152
  Set whether to enable the alert condition. Defaults to `true`.
148
153
 
149
- ```python
150
- import pulumi
154
+ ```
155
+ 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.
151
156
  ```
152
157
  """
153
158
  return pulumi.get(self, "enabled")
154
159
 
155
160
  @enabled.setter
156
- def enabled(self, value: Optional[pulumi.Input[bool]]):
161
+ def enabled(self, value: Optional[pulumi.Input[_builtins.bool]]):
157
162
  pulumi.set(self, "enabled", value)
158
163
 
159
- @property
164
+ @_builtins.property
160
165
  @pulumi.getter(name="entityGuid")
161
- def entity_guid(self) -> Optional[pulumi.Input[str]]:
166
+ def entity_guid(self) -> Optional[pulumi.Input[_builtins.str]]:
162
167
  """
163
168
  The unique entity identifier of the condition in New Relic.
164
169
  """
165
170
  return pulumi.get(self, "entity_guid")
166
171
 
167
172
  @entity_guid.setter
168
- def entity_guid(self, value: Optional[pulumi.Input[str]]):
173
+ def entity_guid(self, value: Optional[pulumi.Input[_builtins.str]]):
169
174
  pulumi.set(self, "entity_guid", value)
170
175
 
171
- @property
176
+ @_builtins.property
172
177
  @pulumi.getter(name="monitorId")
173
- def monitor_id(self) -> Optional[pulumi.Input[str]]:
178
+ def monitor_id(self) -> Optional[pulumi.Input[_builtins.str]]:
174
179
  """
175
180
  The GUID of the Synthetics monitor to be referenced in the alert condition.
176
181
  """
177
182
  return pulumi.get(self, "monitor_id")
178
183
 
179
184
  @monitor_id.setter
180
- def monitor_id(self, value: Optional[pulumi.Input[str]]):
185
+ def monitor_id(self, value: Optional[pulumi.Input[_builtins.str]]):
181
186
  pulumi.set(self, "monitor_id", value)
182
187
 
183
- @property
188
+ @_builtins.property
184
189
  @pulumi.getter
185
- def name(self) -> Optional[pulumi.Input[str]]:
190
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
186
191
  """
187
192
  The title of this condition.
188
193
  """
189
194
  return pulumi.get(self, "name")
190
195
 
191
196
  @name.setter
192
- def name(self, value: Optional[pulumi.Input[str]]):
197
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
193
198
  pulumi.set(self, "name", value)
194
199
 
195
- @property
200
+ @_builtins.property
196
201
  @pulumi.getter(name="policyId")
197
- def policy_id(self) -> Optional[pulumi.Input[int]]:
202
+ def policy_id(self) -> Optional[pulumi.Input[_builtins.str]]:
198
203
  """
199
204
  The ID of the policy where this condition should be used.
200
205
  """
201
206
  return pulumi.get(self, "policy_id")
202
207
 
203
208
  @policy_id.setter
204
- def policy_id(self, value: Optional[pulumi.Input[int]]):
209
+ def policy_id(self, value: Optional[pulumi.Input[_builtins.str]]):
205
210
  pulumi.set(self, "policy_id", value)
206
211
 
207
- @property
212
+ @_builtins.property
208
213
  @pulumi.getter(name="runbookUrl")
209
- def runbook_url(self) -> Optional[pulumi.Input[str]]:
214
+ def runbook_url(self) -> Optional[pulumi.Input[_builtins.str]]:
210
215
  """
211
216
  Runbook URL to display in notifications.
212
217
  """
213
218
  return pulumi.get(self, "runbook_url")
214
219
 
215
220
  @runbook_url.setter
216
- def runbook_url(self, value: Optional[pulumi.Input[str]]):
221
+ def runbook_url(self, value: Optional[pulumi.Input[_builtins.str]]):
217
222
  pulumi.set(self, "runbook_url", value)
218
223
 
219
224
 
225
+ @pulumi.type_token("newrelic:synthetics/alertCondition:AlertCondition")
220
226
  class AlertCondition(pulumi.CustomResource):
221
227
  @overload
222
228
  def __init__(__self__,
223
229
  resource_name: str,
224
230
  opts: Optional[pulumi.ResourceOptions] = None,
225
- enabled: Optional[pulumi.Input[bool]] = None,
226
- monitor_id: Optional[pulumi.Input[str]] = None,
227
- name: Optional[pulumi.Input[str]] = None,
228
- policy_id: Optional[pulumi.Input[int]] = None,
229
- runbook_url: Optional[pulumi.Input[str]] = None,
231
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
232
+ monitor_id: Optional[pulumi.Input[_builtins.str]] = None,
233
+ name: Optional[pulumi.Input[_builtins.str]] = None,
234
+ policy_id: Optional[pulumi.Input[_builtins.str]] = None,
235
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
230
236
  __props__=None):
231
237
  """
232
238
  Use this resource to create and manage synthetics alert conditions in New Relic.
233
239
 
234
- > **NOTE:** This is a legacy resource. The NrqlAlertCondition resource is preferred for configuring alerts conditions. In most cases feature parity can be achieved with a NRQL query. This condition type may be deprecated in the future.
240
+ > **WARNING:** The `synthetics.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. For more details and examples on moving away from synthetics alert conditions to the NRQL based alternative, please check out this example.
235
241
 
236
242
  ## Example Usage
237
243
 
@@ -240,10 +246,12 @@ class AlertCondition(pulumi.CustomResource):
240
246
  import pulumi_newrelic as newrelic
241
247
 
242
248
  foo = newrelic.synthetics.AlertCondition("foo",
243
- policy_id=newrelic_alert_policy["foo"]["id"],
244
- monitor_id=newrelic_synthetics_monitor["foo"]["id"],
249
+ policy_id=foo_newrelic_alert_policy["id"],
250
+ name="foo",
251
+ monitor_id=foo_newrelic_synthetics_monitor["id"],
245
252
  runbook_url="https://www.example.com")
246
253
  ```
254
+
247
255
  ## Tags
248
256
 
249
257
  Manage synthetics alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check EntityTags
@@ -252,43 +260,45 @@ class AlertCondition(pulumi.CustomResource):
252
260
  import pulumi
253
261
  import pulumi_newrelic as newrelic
254
262
 
255
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
256
- foo_monitor = newrelic.synthetics.Monitor("fooMonitor",
263
+ foo = newrelic.AlertPolicy("foo", name="foo policy")
264
+ foo_monitor = newrelic.synthetics.Monitor("foo",
257
265
  status="ENABLED",
266
+ name="foo monitor",
258
267
  period="EVERY_MINUTE",
259
268
  uri="https://www.one.newrelic.com",
260
269
  type="SIMPLE",
261
270
  locations_publics=["AP_EAST_1"],
262
- custom_headers=[newrelic.synthetics.MonitorCustomHeaderArgs(
263
- name="some_name",
264
- value="some_value",
265
- )],
271
+ custom_headers=[{
272
+ "name": "some_name",
273
+ "value": "some_value",
274
+ }],
266
275
  treat_redirect_as_failure=True,
267
276
  validation_string="success",
268
277
  bypass_head_request=True,
269
278
  verify_ssl=True,
270
- tags=[newrelic.synthetics.MonitorTagArgs(
271
- key="some_key",
272
- values=["some_value"],
273
- )])
274
- foo_alert_condition = newrelic.synthetics.AlertCondition("fooAlertCondition",
275
- policy_id=foo_alert_policy.id,
279
+ tags=[{
280
+ "key": "some_key",
281
+ "values": ["some_value"],
282
+ }])
283
+ foo_alert_condition = newrelic.synthetics.AlertCondition("foo",
284
+ policy_id=foo.id,
285
+ name="foo synthetics condition",
276
286
  monitor_id=foo_monitor.id,
277
287
  runbook_url="https://www.example.com")
278
- my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
288
+ my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
279
289
  guid=foo_alert_condition.entity_guid,
280
290
  tags=[
281
- newrelic.EntityTagsTagArgs(
282
- key="my-key",
283
- values=[
291
+ {
292
+ "key": "my-key",
293
+ "values": [
284
294
  "my-value",
285
295
  "my-other-value",
286
296
  ],
287
- ),
288
- newrelic.EntityTagsTagArgs(
289
- key="my-key-2",
290
- values=["my-value-2"],
291
- ),
297
+ },
298
+ {
299
+ "key": "my-key-2",
300
+ "values": ["my-value-2"],
301
+ },
292
302
  ])
293
303
  ```
294
304
 
@@ -297,20 +307,20 @@ class AlertCondition(pulumi.CustomResource):
297
307
  Synthetics alert conditions can be imported using a composite ID of `<policy_id>:<condition_id>`, e.g.
298
308
 
299
309
  ```sh
300
- $ pulumi import newrelic:synthetics/alertCondition:AlertCondition main 12345:67890
310
+ $ pulumi import newrelic:synthetics/alertCondition:AlertCondition main 12345:67890
301
311
  ```
302
312
 
303
313
  :param str resource_name: The name of the resource.
304
314
  :param pulumi.ResourceOptions opts: Options for the resource.
305
- :param pulumi.Input[bool] enabled: Set whether to enable the alert condition. Defaults to `true`.
315
+ :param pulumi.Input[_builtins.bool] enabled: Set whether to enable the alert condition. Defaults to `true`.
306
316
 
307
- ```python
308
- import pulumi
309
317
  ```
310
- :param pulumi.Input[str] monitor_id: The GUID of the Synthetics monitor to be referenced in the alert condition.
311
- :param pulumi.Input[str] name: The title of this condition.
312
- :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
313
- :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
318
+ 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.
319
+ ```
320
+ :param pulumi.Input[_builtins.str] monitor_id: The GUID of the Synthetics monitor to be referenced in the alert condition.
321
+ :param pulumi.Input[_builtins.str] name: The title of this condition.
322
+ :param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
323
+ :param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
314
324
  """
315
325
  ...
316
326
  @overload
@@ -321,7 +331,7 @@ class AlertCondition(pulumi.CustomResource):
321
331
  """
322
332
  Use this resource to create and manage synthetics alert conditions in New Relic.
323
333
 
324
- > **NOTE:** This is a legacy resource. The NrqlAlertCondition resource is preferred for configuring alerts conditions. In most cases feature parity can be achieved with a NRQL query. This condition type may be deprecated in the future.
334
+ > **WARNING:** The `synthetics.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. For more details and examples on moving away from synthetics alert conditions to the NRQL based alternative, please check out this example.
325
335
 
326
336
  ## Example Usage
327
337
 
@@ -330,10 +340,12 @@ class AlertCondition(pulumi.CustomResource):
330
340
  import pulumi_newrelic as newrelic
331
341
 
332
342
  foo = newrelic.synthetics.AlertCondition("foo",
333
- policy_id=newrelic_alert_policy["foo"]["id"],
334
- monitor_id=newrelic_synthetics_monitor["foo"]["id"],
343
+ policy_id=foo_newrelic_alert_policy["id"],
344
+ name="foo",
345
+ monitor_id=foo_newrelic_synthetics_monitor["id"],
335
346
  runbook_url="https://www.example.com")
336
347
  ```
348
+
337
349
  ## Tags
338
350
 
339
351
  Manage synthetics alert condition tags with `EntityTags`. For up-to-date documentation about the tagging resource, please check EntityTags
@@ -342,43 +354,45 @@ class AlertCondition(pulumi.CustomResource):
342
354
  import pulumi
343
355
  import pulumi_newrelic as newrelic
344
356
 
345
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
346
- foo_monitor = newrelic.synthetics.Monitor("fooMonitor",
357
+ foo = newrelic.AlertPolicy("foo", name="foo policy")
358
+ foo_monitor = newrelic.synthetics.Monitor("foo",
347
359
  status="ENABLED",
360
+ name="foo monitor",
348
361
  period="EVERY_MINUTE",
349
362
  uri="https://www.one.newrelic.com",
350
363
  type="SIMPLE",
351
364
  locations_publics=["AP_EAST_1"],
352
- custom_headers=[newrelic.synthetics.MonitorCustomHeaderArgs(
353
- name="some_name",
354
- value="some_value",
355
- )],
365
+ custom_headers=[{
366
+ "name": "some_name",
367
+ "value": "some_value",
368
+ }],
356
369
  treat_redirect_as_failure=True,
357
370
  validation_string="success",
358
371
  bypass_head_request=True,
359
372
  verify_ssl=True,
360
- tags=[newrelic.synthetics.MonitorTagArgs(
361
- key="some_key",
362
- values=["some_value"],
363
- )])
364
- foo_alert_condition = newrelic.synthetics.AlertCondition("fooAlertCondition",
365
- policy_id=foo_alert_policy.id,
373
+ tags=[{
374
+ "key": "some_key",
375
+ "values": ["some_value"],
376
+ }])
377
+ foo_alert_condition = newrelic.synthetics.AlertCondition("foo",
378
+ policy_id=foo.id,
379
+ name="foo synthetics condition",
366
380
  monitor_id=foo_monitor.id,
367
381
  runbook_url="https://www.example.com")
368
- my_condition_entity_tags = newrelic.EntityTags("myConditionEntityTags",
382
+ my_condition_entity_tags = newrelic.EntityTags("my_condition_entity_tags",
369
383
  guid=foo_alert_condition.entity_guid,
370
384
  tags=[
371
- newrelic.EntityTagsTagArgs(
372
- key="my-key",
373
- values=[
385
+ {
386
+ "key": "my-key",
387
+ "values": [
374
388
  "my-value",
375
389
  "my-other-value",
376
390
  ],
377
- ),
378
- newrelic.EntityTagsTagArgs(
379
- key="my-key-2",
380
- values=["my-value-2"],
381
- ),
391
+ },
392
+ {
393
+ "key": "my-key-2",
394
+ "values": ["my-value-2"],
395
+ },
382
396
  ])
383
397
  ```
384
398
 
@@ -387,7 +401,7 @@ class AlertCondition(pulumi.CustomResource):
387
401
  Synthetics alert conditions can be imported using a composite ID of `<policy_id>:<condition_id>`, e.g.
388
402
 
389
403
  ```sh
390
- $ pulumi import newrelic:synthetics/alertCondition:AlertCondition main 12345:67890
404
+ $ pulumi import newrelic:synthetics/alertCondition:AlertCondition main 12345:67890
391
405
  ```
392
406
 
393
407
  :param str resource_name: The name of the resource.
@@ -405,11 +419,11 @@ class AlertCondition(pulumi.CustomResource):
405
419
  def _internal_init(__self__,
406
420
  resource_name: str,
407
421
  opts: Optional[pulumi.ResourceOptions] = None,
408
- enabled: Optional[pulumi.Input[bool]] = None,
409
- monitor_id: Optional[pulumi.Input[str]] = None,
410
- name: Optional[pulumi.Input[str]] = None,
411
- policy_id: Optional[pulumi.Input[int]] = None,
412
- runbook_url: Optional[pulumi.Input[str]] = None,
422
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
423
+ monitor_id: Optional[pulumi.Input[_builtins.str]] = None,
424
+ name: Optional[pulumi.Input[_builtins.str]] = None,
425
+ policy_id: Optional[pulumi.Input[_builtins.str]] = None,
426
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None,
413
427
  __props__=None):
414
428
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
415
429
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -439,12 +453,12 @@ class AlertCondition(pulumi.CustomResource):
439
453
  def get(resource_name: str,
440
454
  id: pulumi.Input[str],
441
455
  opts: Optional[pulumi.ResourceOptions] = None,
442
- enabled: Optional[pulumi.Input[bool]] = None,
443
- entity_guid: Optional[pulumi.Input[str]] = None,
444
- monitor_id: Optional[pulumi.Input[str]] = None,
445
- name: Optional[pulumi.Input[str]] = None,
446
- policy_id: Optional[pulumi.Input[int]] = None,
447
- runbook_url: Optional[pulumi.Input[str]] = None) -> 'AlertCondition':
456
+ enabled: Optional[pulumi.Input[_builtins.bool]] = None,
457
+ entity_guid: Optional[pulumi.Input[_builtins.str]] = None,
458
+ monitor_id: Optional[pulumi.Input[_builtins.str]] = None,
459
+ name: Optional[pulumi.Input[_builtins.str]] = None,
460
+ policy_id: Optional[pulumi.Input[_builtins.str]] = None,
461
+ runbook_url: Optional[pulumi.Input[_builtins.str]] = None) -> 'AlertCondition':
448
462
  """
449
463
  Get an existing AlertCondition resource's state with the given name, id, and optional extra
450
464
  properties used to qualify the lookup.
@@ -452,16 +466,16 @@ class AlertCondition(pulumi.CustomResource):
452
466
  :param str resource_name: The unique name of the resulting resource.
453
467
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
454
468
  :param pulumi.ResourceOptions opts: Options for the resource.
455
- :param pulumi.Input[bool] enabled: Set whether to enable the alert condition. Defaults to `true`.
469
+ :param pulumi.Input[_builtins.bool] enabled: Set whether to enable the alert condition. Defaults to `true`.
456
470
 
457
- ```python
458
- import pulumi
459
471
  ```
460
- :param pulumi.Input[str] entity_guid: The unique entity identifier of the condition in New Relic.
461
- :param pulumi.Input[str] monitor_id: The GUID of the Synthetics monitor to be referenced in the alert condition.
462
- :param pulumi.Input[str] name: The title of this condition.
463
- :param pulumi.Input[int] policy_id: The ID of the policy where this condition should be used.
464
- :param pulumi.Input[str] runbook_url: Runbook URL to display in notifications.
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
+ ```
474
+ :param pulumi.Input[_builtins.str] entity_guid: The unique entity identifier of the condition in New Relic.
475
+ :param pulumi.Input[_builtins.str] monitor_id: The GUID of the Synthetics monitor to be referenced in the alert condition.
476
+ :param pulumi.Input[_builtins.str] name: The title of this condition.
477
+ :param pulumi.Input[_builtins.str] policy_id: The ID of the policy where this condition should be used.
478
+ :param pulumi.Input[_builtins.str] runbook_url: Runbook URL to display in notifications.
465
479
  """
466
480
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
467
481
 
@@ -475,53 +489,53 @@ class AlertCondition(pulumi.CustomResource):
475
489
  __props__.__dict__["runbook_url"] = runbook_url
476
490
  return AlertCondition(resource_name, opts=opts, __props__=__props__)
477
491
 
478
- @property
492
+ @_builtins.property
479
493
  @pulumi.getter
480
- def enabled(self) -> pulumi.Output[Optional[bool]]:
494
+ def enabled(self) -> pulumi.Output[Optional[_builtins.bool]]:
481
495
  """
482
496
  Set whether to enable the alert condition. Defaults to `true`.
483
497
 
484
- ```python
485
- import pulumi
498
+ ```
499
+ 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.
486
500
  ```
487
501
  """
488
502
  return pulumi.get(self, "enabled")
489
503
 
490
- @property
504
+ @_builtins.property
491
505
  @pulumi.getter(name="entityGuid")
492
- def entity_guid(self) -> pulumi.Output[str]:
506
+ def entity_guid(self) -> pulumi.Output[_builtins.str]:
493
507
  """
494
508
  The unique entity identifier of the condition in New Relic.
495
509
  """
496
510
  return pulumi.get(self, "entity_guid")
497
511
 
498
- @property
512
+ @_builtins.property
499
513
  @pulumi.getter(name="monitorId")
500
- def monitor_id(self) -> pulumi.Output[str]:
514
+ def monitor_id(self) -> pulumi.Output[_builtins.str]:
501
515
  """
502
516
  The GUID of the Synthetics monitor to be referenced in the alert condition.
503
517
  """
504
518
  return pulumi.get(self, "monitor_id")
505
519
 
506
- @property
520
+ @_builtins.property
507
521
  @pulumi.getter
508
- def name(self) -> pulumi.Output[str]:
522
+ def name(self) -> pulumi.Output[_builtins.str]:
509
523
  """
510
524
  The title of this condition.
511
525
  """
512
526
  return pulumi.get(self, "name")
513
527
 
514
- @property
528
+ @_builtins.property
515
529
  @pulumi.getter(name="policyId")
516
- def policy_id(self) -> pulumi.Output[int]:
530
+ def policy_id(self) -> pulumi.Output[_builtins.str]:
517
531
  """
518
532
  The ID of the policy where this condition should be used.
519
533
  """
520
534
  return pulumi.get(self, "policy_id")
521
535
 
522
- @property
536
+ @_builtins.property
523
537
  @pulumi.getter(name="runbookUrl")
524
- def runbook_url(self) -> pulumi.Output[Optional[str]]:
538
+ def runbook_url(self) -> pulumi.Output[Optional[_builtins.str]]:
525
539
  """
526
540
  Runbook URL to display in notifications.
527
541
  """