pulumi-newrelic 5.25.3a1719333998__py3-none-any.whl → 5.26.0a1716962128__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.
@@ -1337,11 +1337,13 @@ class NrqlAlertConditionCriticalArgs:
1337
1337
 
1338
1338
  @property
1339
1339
  @pulumi.getter
1340
- @_utilities.deprecated("""use `threshold_duration` attribute instead""")
1341
1340
  def duration(self) -> Optional[pulumi.Input[int]]:
1342
1341
  """
1343
1342
  In minutes, must be in the range of 1 to 120 (inclusive).
1344
1343
  """
1344
+ warnings.warn("""use `threshold_duration` attribute instead""", DeprecationWarning)
1345
+ pulumi.log.warn("""duration is deprecated: use `threshold_duration` attribute instead""")
1346
+
1345
1347
  return pulumi.get(self, "duration")
1346
1348
 
1347
1349
  @duration.setter
@@ -1386,11 +1388,13 @@ class NrqlAlertConditionCriticalArgs:
1386
1388
 
1387
1389
  @property
1388
1390
  @pulumi.getter(name="timeFunction")
1389
- @_utilities.deprecated("""use `threshold_occurrences` attribute instead""")
1390
1391
  def time_function(self) -> Optional[pulumi.Input[str]]:
1391
1392
  """
1392
1393
  Valid values are: 'all' or 'any'
1393
1394
  """
1395
+ warnings.warn("""use `threshold_occurrences` attribute instead""", DeprecationWarning)
1396
+ pulumi.log.warn("""time_function is deprecated: use `threshold_occurrences` attribute instead""")
1397
+
1394
1398
  return pulumi.get(self, "time_function")
1395
1399
 
1396
1400
  @time_function.setter
@@ -1431,11 +1435,13 @@ class NrqlAlertConditionNrqlArgs:
1431
1435
 
1432
1436
  @property
1433
1437
  @pulumi.getter(name="evaluationOffset")
1434
- @_utilities.deprecated("""use `aggregation_method` attribute instead""")
1435
1438
  def evaluation_offset(self) -> Optional[pulumi.Input[int]]:
1436
1439
  """
1437
1440
  NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's `evaluation_offset`.
1438
1441
  """
1442
+ warnings.warn("""use `aggregation_method` attribute instead""", DeprecationWarning)
1443
+ pulumi.log.warn("""evaluation_offset is deprecated: use `aggregation_method` attribute instead""")
1444
+
1439
1445
  return pulumi.get(self, "evaluation_offset")
1440
1446
 
1441
1447
  @evaluation_offset.setter
@@ -1444,11 +1450,13 @@ class NrqlAlertConditionNrqlArgs:
1444
1450
 
1445
1451
  @property
1446
1452
  @pulumi.getter(name="sinceValue")
1447
- @_utilities.deprecated("""use `aggregation_method` attribute instead""")
1448
1453
  def since_value(self) -> Optional[pulumi.Input[str]]:
1449
1454
  """
1450
1455
  NRQL queries are evaluated in one-minute time windows. The start time depends on the value you provide in the NRQL condition's `since_value`.
1451
1456
  """
1457
+ warnings.warn("""use `aggregation_method` attribute instead""", DeprecationWarning)
1458
+ pulumi.log.warn("""since_value is deprecated: use `aggregation_method` attribute instead""")
1459
+
1452
1460
  return pulumi.get(self, "since_value")
1453
1461
 
1454
1462
  @since_value.setter
@@ -1509,11 +1517,13 @@ class NrqlAlertConditionTermArgs:
1509
1517
 
1510
1518
  @property
1511
1519
  @pulumi.getter
1512
- @_utilities.deprecated("""use `threshold_duration` attribute instead""")
1513
1520
  def duration(self) -> Optional[pulumi.Input[int]]:
1514
1521
  """
1515
1522
  In minutes, must be in the range of 1 to 120 (inclusive).
1516
1523
  """
1524
+ warnings.warn("""use `threshold_duration` attribute instead""", DeprecationWarning)
1525
+ pulumi.log.warn("""duration is deprecated: use `threshold_duration` attribute instead""")
1526
+
1517
1527
  return pulumi.get(self, "duration")
1518
1528
 
1519
1529
  @duration.setter
@@ -1570,11 +1580,13 @@ class NrqlAlertConditionTermArgs:
1570
1580
 
1571
1581
  @property
1572
1582
  @pulumi.getter(name="timeFunction")
1573
- @_utilities.deprecated("""use `threshold_occurrences` attribute instead""")
1574
1583
  def time_function(self) -> Optional[pulumi.Input[str]]:
1575
1584
  """
1576
1585
  Valid values are: 'all' or 'any'
1577
1586
  """
1587
+ warnings.warn("""use `threshold_occurrences` attribute instead""", DeprecationWarning)
1588
+ pulumi.log.warn("""time_function is deprecated: use `threshold_occurrences` attribute instead""")
1589
+
1578
1590
  return pulumi.get(self, "time_function")
1579
1591
 
1580
1592
  @time_function.setter
@@ -1631,11 +1643,13 @@ class NrqlAlertConditionWarningArgs:
1631
1643
 
1632
1644
  @property
1633
1645
  @pulumi.getter
1634
- @_utilities.deprecated("""use `threshold_duration` attribute instead""")
1635
1646
  def duration(self) -> Optional[pulumi.Input[int]]:
1636
1647
  """
1637
1648
  In minutes, must be in the range of 1 to 120 (inclusive).
1638
1649
  """
1650
+ warnings.warn("""use `threshold_duration` attribute instead""", DeprecationWarning)
1651
+ pulumi.log.warn("""duration is deprecated: use `threshold_duration` attribute instead""")
1652
+
1639
1653
  return pulumi.get(self, "duration")
1640
1654
 
1641
1655
  @duration.setter
@@ -1680,11 +1694,13 @@ class NrqlAlertConditionWarningArgs:
1680
1694
 
1681
1695
  @property
1682
1696
  @pulumi.getter(name="timeFunction")
1683
- @_utilities.deprecated("""use `threshold_occurrences` attribute instead""")
1684
1697
  def time_function(self) -> Optional[pulumi.Input[str]]:
1685
1698
  """
1686
1699
  Valid values are: 'all' or 'any'
1687
1700
  """
1701
+ warnings.warn("""use `threshold_occurrences` attribute instead""", DeprecationWarning)
1702
+ pulumi.log.warn("""time_function is deprecated: use `threshold_occurrences` attribute instead""")
1703
+
1688
1704
  return pulumi.get(self, "time_function")
1689
1705
 
1690
1706
  @time_function.setter
@@ -4,7 +4,6 @@
4
4
 
5
5
 
6
6
  import asyncio
7
- import functools
8
7
  import importlib.metadata
9
8
  import importlib.util
10
9
  import inspect
@@ -12,7 +11,6 @@ import json
12
11
  import os
13
12
  import sys
14
13
  import typing
15
- import warnings
16
14
 
17
15
  import pulumi
18
16
  import pulumi.runtime
@@ -21,8 +19,6 @@ from pulumi.runtime.sync_await import _sync_await
21
19
  from semver import VersionInfo as SemverVersion
22
20
  from parver import Version as PEP440Version
23
21
 
24
- C = typing.TypeVar("C", bound=typing.Callable)
25
-
26
22
 
27
23
  def get_env(*args):
28
24
  for v in args:
@@ -291,36 +287,5 @@ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bo
291
287
  await o._resources,
292
288
  )
293
289
 
294
-
295
- # This is included to provide an upgrade path for users who are using a version
296
- # of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
297
- def deprecated(message: str) -> typing.Callable[[C], C]:
298
- """
299
- Decorator to indicate a function is deprecated.
300
-
301
- As well as inserting appropriate statements to indicate that the function is
302
- deprecated, this decorator also tags the function with a special attribute
303
- so that Pulumi code can detect that it is deprecated and react appropriately
304
- in certain situations.
305
-
306
- message is the deprecation message that should be printed if the function is called.
307
- """
308
-
309
- def decorator(fn: C) -> C:
310
- if not callable(fn):
311
- raise TypeError("Expected fn to be callable")
312
-
313
- @functools.wraps(fn)
314
- def deprecated_fn(*args, **kwargs):
315
- warnings.warn(message)
316
- pulumi.warn(f"{fn.__name__} is deprecated: {message}")
317
-
318
- return fn(*args, **kwargs)
319
-
320
- deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
321
- return typing.cast(C, deprecated_fn)
322
-
323
- return decorator
324
-
325
290
  def get_plugin_download_url():
326
291
  return None
@@ -169,7 +169,7 @@ class AlertChannel(pulumi.CustomResource):
169
169
  """
170
170
  Use this resource to create and manage New Relic alert channels.
171
171
 
172
- > **WARNING:** The `AlertChannel` resource is **deprecated** and will be **removed in a future major release**. As an alternative, you can set up channels using a combination of the newer resources `NotificationDestination` for a detailed illustration on setting up channels with these resources.
172
+ > **WARNING:** The `AlertChannel` resource is deprecated and will be removed in the next major release. For managing channel resources in Workflows, use `NotificationChannel`.
173
173
 
174
174
  ## Example Usage
175
175
 
@@ -317,7 +317,7 @@ class AlertChannel(pulumi.CustomResource):
317
317
  """
318
318
  Use this resource to create and manage New Relic alert channels.
319
319
 
320
- > **WARNING:** The `AlertChannel` resource is **deprecated** and will be **removed in a future major release**. As an alternative, you can set up channels using a combination of the newer resources `NotificationDestination` for a detailed illustration on setting up channels with these resources.
320
+ > **WARNING:** The `AlertChannel` resource is deprecated and will be removed in the next major release. For managing channel resources in Workflows, use `NotificationChannel`.
321
321
 
322
322
  ## Example Usage
323
323
 
@@ -51,11 +51,13 @@ class AlertPolicyArgs:
51
51
 
52
52
  @property
53
53
  @pulumi.getter(name="channelIds")
54
- @_utilities.deprecated("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
55
54
  def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
56
55
  """
57
56
  An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
58
57
  """
58
+ warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
59
+ pulumi.log.warn("""channel_ids is deprecated: The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
60
+
59
61
  return pulumi.get(self, "channel_ids")
60
62
 
61
63
  @channel_ids.setter
@@ -127,11 +129,13 @@ class _AlertPolicyState:
127
129
 
128
130
  @property
129
131
  @pulumi.getter(name="channelIds")
130
- @_utilities.deprecated("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
131
132
  def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
132
133
  """
133
134
  An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
134
135
  """
136
+ warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
137
+ pulumi.log.warn("""channel_ids is deprecated: The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
138
+
135
139
  return pulumi.get(self, "channel_ids")
136
140
 
137
141
  @channel_ids.setter
@@ -446,11 +450,13 @@ class AlertPolicy(pulumi.CustomResource):
446
450
 
447
451
  @property
448
452
  @pulumi.getter(name="channelIds")
449
- @_utilities.deprecated("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
450
453
  def channel_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
451
454
  """
452
455
  An array of channel IDs (integers) to assign to the policy. Adding or removing channel IDs from this array will result in a new alert policy resource being created and the old one being destroyed. Also note that channel IDs _cannot_ be imported.
453
456
  """
457
+ warnings.warn("""The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""", DeprecationWarning)
458
+ pulumi.log.warn("""channel_ids is deprecated: The `channel_ids` attribute is deprecated and will be removed in the next major release of the provider.""")
459
+
454
460
  return pulumi.get(self, "channel_ids")
455
461
 
456
462
  @property
@@ -133,7 +133,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
133
133
  """
134
134
  Use this resource to map alert policies to alert channels in New Relic.
135
135
 
136
- > **WARNING:** The `AlertPolicyChannel` resource is **deprecated** and will be **removed in a future major release**. As an alternative, you can map channels to policies using the resource `Workflow` for a detailed illustration on setting up channels and workflows with these resources.
136
+ > **WARNING:** The `AlertPolicyChannel` resource is deprecated and will be removed in the next major release. For managing channel resources in Workflows, use `NotificationChannel`.
137
137
 
138
138
  ## Example Usage
139
139
 
@@ -196,7 +196,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
196
196
  """
197
197
  Use this resource to map alert policies to alert channels in New Relic.
198
198
 
199
- > **WARNING:** The `AlertPolicyChannel` resource is **deprecated** and will be **removed in a future major release**. As an alternative, you can map channels to policies using the resource `Workflow` for a detailed illustration on setting up channels and workflows with these resources.
199
+ > **WARNING:** The `AlertPolicyChannel` resource is deprecated and will be removed in the next major release. For managing channel resources in Workflows, use `NotificationChannel`.
200
200
 
201
201
  ## Example Usage
202
202
 
@@ -23,7 +23,7 @@ class GetEntityResult:
23
23
  """
24
24
  A collection of values returned by getEntity.
25
25
  """
26
- def __init__(__self__, account_id=None, application_id=None, domain=None, entity_tags=None, guid=None, id=None, ignore_case=None, ignore_not_found=None, name=None, serving_apm_application_id=None, tags=None, type=None):
26
+ def __init__(__self__, account_id=None, application_id=None, domain=None, guid=None, id=None, ignore_case=None, ignore_not_found=None, name=None, serving_apm_application_id=None, tags=None, type=None):
27
27
  if account_id and not isinstance(account_id, str):
28
28
  raise TypeError("Expected argument 'account_id' to be a str")
29
29
  pulumi.set(__self__, "account_id", account_id)
@@ -33,9 +33,6 @@ class GetEntityResult:
33
33
  if domain and not isinstance(domain, str):
34
34
  raise TypeError("Expected argument 'domain' to be a str")
35
35
  pulumi.set(__self__, "domain", domain)
36
- if entity_tags and not isinstance(entity_tags, str):
37
- raise TypeError("Expected argument 'entity_tags' to be a str")
38
- pulumi.set(__self__, "entity_tags", entity_tags)
39
36
  if guid and not isinstance(guid, str):
40
37
  raise TypeError("Expected argument 'guid' to be a str")
41
38
  pulumi.set(__self__, "guid", guid)
@@ -79,15 +76,6 @@ class GetEntityResult:
79
76
  def domain(self) -> str:
80
77
  return pulumi.get(self, "domain")
81
78
 
82
- @property
83
- @pulumi.getter(name="entityTags")
84
- def entity_tags(self) -> str:
85
- """
86
- A JSON-encoded string, comprising tags associated with the entity fetched.
87
- * See the **Additional Examples** section below, for an illustration depicting the usage of `jsondecode` with the attribute `entity_tags`, to get the tags associated with the entity fetched.
88
- """
89
- return pulumi.get(self, "entity_tags")
90
-
91
79
  @property
92
80
  @pulumi.getter
93
81
  def guid(self) -> str:
@@ -147,7 +135,6 @@ class AwaitableGetEntityResult(GetEntityResult):
147
135
  account_id=self.account_id,
148
136
  application_id=self.application_id,
149
137
  domain=self.domain,
150
- entity_tags=self.entity_tags,
151
138
  guid=self.guid,
152
139
  id=self.id,
153
140
  ignore_case=self.ignore_case,
@@ -160,7 +147,6 @@ class AwaitableGetEntityResult(GetEntityResult):
160
147
 
161
148
  def get_entity(account_id: Optional[str] = None,
162
149
  domain: Optional[str] = None,
163
- entity_tags: Optional[str] = None,
164
150
  ignore_case: Optional[bool] = None,
165
151
  ignore_not_found: Optional[bool] = None,
166
152
  name: Optional[str] = None,
@@ -168,12 +154,69 @@ def get_entity(account_id: Optional[str] = None,
168
154
  type: Optional[str] = None,
169
155
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEntityResult:
170
156
  """
171
- Use this data source to access information about an existing resource.
157
+ Use this data source to get information about a specific entity in New Relic One that already exists.
158
+
159
+ ### Example: Filter By Account ID
160
+
161
+ The default behaviour of this data source is to retrieve entities matching the specified parameters (such as `name`, `domain`, `type`) from NerdGraph with the credentials specified in the configuration of the provider (account ID and API Key), filter them by the account ID specified in the configuration of the provider, and return the first match.
162
+
163
+ This would mean, if no entity with the specified search parameters is found associated with the account ID in the configuration of the provider, i.e. `NEW_RELIC_ACCOUNT_ID`, an error is thrown, stating that no matching entity has been found.
164
+
165
+ ```python
166
+ import pulumi
167
+ import pulumi_newrelic as newrelic
168
+
169
+ # The entity returned by this configuration would have to
170
+ # belong to the account_id specified in the provider
171
+ # configuration, i.e. NEW_RELIC_ACCOUNT_ID.
172
+ app = newrelic.get_entity(name="my-app",
173
+ domain="APM",
174
+ type="APPLICATION")
175
+ ```
176
+ However, in order to cater to scenarios in which it could be necessary to retrieve an entity belonging to a subaccount using the account ID and API Key of the parent account (for instance, when entities with identical names are present in both the parent account and subaccounts, since matching entities from subaccounts too are returned by NerdGraph), the `account_id` attribute of this data source may be availed. This ensures that the account ID in the configuration of the provider, used to filter entities returned by the API is now overridden by the `account_id` specified in the configuration; i.e., in the below example, the data source would now return an entity matching the specified `name`, belonging to the account with the ID `account_id`.
177
+ ```python
178
+ import pulumi
179
+ import pulumi_newrelic as newrelic
180
+
181
+ # The entity returned by this configuration, unlike in
182
+ # the above example, would have to belong to the account_id
183
+ # specified in the configuration below, i.e. 654321.
184
+ app = newrelic.get_entity(name="my-app",
185
+ account_id="654321",
186
+ domain="APM",
187
+ type="APPLICATION")
188
+ ```
189
+ The following example explains a use case along the lines of the aforementioned; using the `account_id` argument in the data source to allow the filtering criteria to be the `account_id` specified (of the subaccount), and not the account ID in the provider configuration.
190
+
191
+ In simpler terms, when entities are queried from the parent account, entities with matching names are returned from subaccounts too, hence, specifying the `account_id` of the subaccount in the configuration allows the entity returned to belong to the subaccount with `account_id`.
192
+ ### Query for an OTEL entity
193
+
194
+ ```python
195
+ import pulumi
196
+ import pulumi_newrelic as newrelic
197
+
198
+ app = newrelic.get_entity(name="my-otel-app",
199
+ domain="EXT",
200
+ type="SERVICE",
201
+ tags=[newrelic.GetEntityTagArgs(
202
+ key="accountID",
203
+ value="12345",
204
+ )])
205
+ ```
206
+
207
+ ### Query for an entity by type (AWS Lambda entity in this example)
208
+
209
+ ```python
210
+ import pulumi
211
+ import pulumi_newrelic as newrelic
212
+
213
+ app = newrelic.get_entity(name="my_lambda_trace",
214
+ type="AWSLAMBDAFUNCTION")
215
+ ```
216
+
172
217
 
173
218
  :param str account_id: The New Relic account ID the entity to be returned would be associated with, i.e. if specified, the data source would filter matching entities received by `account_id` and return the first match. If not, matching entities are filtered by the account ID specified in the configuration of the provider. See the **Example: Filter By Account ID** section above for more details.
174
219
  :param str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
175
- :param str entity_tags: A JSON-encoded string, comprising tags associated with the entity fetched.
176
- * See the **Additional Examples** section below, for an illustration depicting the usage of `jsondecode` with the attribute `entity_tags`, to get the tags associated with the entity fetched.
177
220
  :param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
178
221
  :param bool ignore_not_found: A boolean argument that, when set to true, prevents an error from being thrown when the queried entity is not found. Instead, a warning is displayed. Defaults to `false`.
179
222
 
@@ -185,7 +228,6 @@ def get_entity(account_id: Optional[str] = None,
185
228
  __args__ = dict()
186
229
  __args__['accountId'] = account_id
187
230
  __args__['domain'] = domain
188
- __args__['entityTags'] = entity_tags
189
231
  __args__['ignoreCase'] = ignore_case
190
232
  __args__['ignoreNotFound'] = ignore_not_found
191
233
  __args__['name'] = name
@@ -198,7 +240,6 @@ def get_entity(account_id: Optional[str] = None,
198
240
  account_id=pulumi.get(__ret__, 'account_id'),
199
241
  application_id=pulumi.get(__ret__, 'application_id'),
200
242
  domain=pulumi.get(__ret__, 'domain'),
201
- entity_tags=pulumi.get(__ret__, 'entity_tags'),
202
243
  guid=pulumi.get(__ret__, 'guid'),
203
244
  id=pulumi.get(__ret__, 'id'),
204
245
  ignore_case=pulumi.get(__ret__, 'ignore_case'),
@@ -212,7 +253,6 @@ def get_entity(account_id: Optional[str] = None,
212
253
  @_utilities.lift_output_func(get_entity)
213
254
  def get_entity_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
214
255
  domain: Optional[pulumi.Input[Optional[str]]] = None,
215
- entity_tags: Optional[pulumi.Input[Optional[str]]] = None,
216
256
  ignore_case: Optional[pulumi.Input[Optional[bool]]] = None,
217
257
  ignore_not_found: Optional[pulumi.Input[Optional[bool]]] = None,
218
258
  name: Optional[pulumi.Input[str]] = None,
@@ -220,12 +260,69 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
220
260
  type: Optional[pulumi.Input[Optional[str]]] = None,
221
261
  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetEntityResult]:
222
262
  """
223
- Use this data source to access information about an existing resource.
263
+ Use this data source to get information about a specific entity in New Relic One that already exists.
264
+
265
+ ### Example: Filter By Account ID
266
+
267
+ The default behaviour of this data source is to retrieve entities matching the specified parameters (such as `name`, `domain`, `type`) from NerdGraph with the credentials specified in the configuration of the provider (account ID and API Key), filter them by the account ID specified in the configuration of the provider, and return the first match.
268
+
269
+ This would mean, if no entity with the specified search parameters is found associated with the account ID in the configuration of the provider, i.e. `NEW_RELIC_ACCOUNT_ID`, an error is thrown, stating that no matching entity has been found.
270
+
271
+ ```python
272
+ import pulumi
273
+ import pulumi_newrelic as newrelic
274
+
275
+ # The entity returned by this configuration would have to
276
+ # belong to the account_id specified in the provider
277
+ # configuration, i.e. NEW_RELIC_ACCOUNT_ID.
278
+ app = newrelic.get_entity(name="my-app",
279
+ domain="APM",
280
+ type="APPLICATION")
281
+ ```
282
+ However, in order to cater to scenarios in which it could be necessary to retrieve an entity belonging to a subaccount using the account ID and API Key of the parent account (for instance, when entities with identical names are present in both the parent account and subaccounts, since matching entities from subaccounts too are returned by NerdGraph), the `account_id` attribute of this data source may be availed. This ensures that the account ID in the configuration of the provider, used to filter entities returned by the API is now overridden by the `account_id` specified in the configuration; i.e., in the below example, the data source would now return an entity matching the specified `name`, belonging to the account with the ID `account_id`.
283
+ ```python
284
+ import pulumi
285
+ import pulumi_newrelic as newrelic
286
+
287
+ # The entity returned by this configuration, unlike in
288
+ # the above example, would have to belong to the account_id
289
+ # specified in the configuration below, i.e. 654321.
290
+ app = newrelic.get_entity(name="my-app",
291
+ account_id="654321",
292
+ domain="APM",
293
+ type="APPLICATION")
294
+ ```
295
+ The following example explains a use case along the lines of the aforementioned; using the `account_id` argument in the data source to allow the filtering criteria to be the `account_id` specified (of the subaccount), and not the account ID in the provider configuration.
296
+
297
+ In simpler terms, when entities are queried from the parent account, entities with matching names are returned from subaccounts too, hence, specifying the `account_id` of the subaccount in the configuration allows the entity returned to belong to the subaccount with `account_id`.
298
+ ### Query for an OTEL entity
299
+
300
+ ```python
301
+ import pulumi
302
+ import pulumi_newrelic as newrelic
303
+
304
+ app = newrelic.get_entity(name="my-otel-app",
305
+ domain="EXT",
306
+ type="SERVICE",
307
+ tags=[newrelic.GetEntityTagArgs(
308
+ key="accountID",
309
+ value="12345",
310
+ )])
311
+ ```
312
+
313
+ ### Query for an entity by type (AWS Lambda entity in this example)
314
+
315
+ ```python
316
+ import pulumi
317
+ import pulumi_newrelic as newrelic
318
+
319
+ app = newrelic.get_entity(name="my_lambda_trace",
320
+ type="AWSLAMBDAFUNCTION")
321
+ ```
322
+
224
323
 
225
324
  :param str account_id: The New Relic account ID the entity to be returned would be associated with, i.e. if specified, the data source would filter matching entities received by `account_id` and return the first match. If not, matching entities are filtered by the account ID specified in the configuration of the provider. See the **Example: Filter By Account ID** section above for more details.
226
325
  :param str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
227
- :param str entity_tags: A JSON-encoded string, comprising tags associated with the entity fetched.
228
- * See the **Additional Examples** section below, for an illustration depicting the usage of `jsondecode` with the attribute `entity_tags`, to get the tags associated with the entity fetched.
229
326
  :param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
230
327
  :param bool ignore_not_found: A boolean argument that, when set to true, prevents an error from being thrown when the queried entity is not found. Instead, a warning is displayed. Defaults to `false`.
231
328
 
@@ -573,12 +573,8 @@ class NotificationChannel(pulumi.CustomResource):
573
573
  ## Additional Information
574
574
 
575
575
  More details about the channels API can be found [here](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels).
576
- ### Moving from Legacy Alert Channels to Notification Channels
577
- As described in the documentation of this resource, channels can be created and managed using `NotificationDestination`, which is **deprecated** and will be **removed in a future major release**, as stated in the documentation of the resource.
578
576
 
579
- If you're currently using `AlertChannel` to manage channels, we **strongly recommend** migrating to these notifications-based resources at the earliest.
580
-
581
- Please refer to the examples in this page, or this example for illustrations on setting up channels with these resources.
577
+ > **NOTE:** `AlertChannel` are legacy resources.
582
578
 
583
579
  ## Import
584
580
 
@@ -903,12 +899,8 @@ class NotificationChannel(pulumi.CustomResource):
903
899
  ## Additional Information
904
900
 
905
901
  More details about the channels API can be found [here](https://docs.newrelic.com/docs/apis/nerdgraph/examples/nerdgraph-api-notifications-channels).
906
- ### Moving from Legacy Alert Channels to Notification Channels
907
- As described in the documentation of this resource, channels can be created and managed using `NotificationDestination`, which is **deprecated** and will be **removed in a future major release**, as stated in the documentation of the resource.
908
-
909
- If you're currently using `AlertChannel` to manage channels, we **strongly recommend** migrating to these notifications-based resources at the earliest.
910
902
 
911
- Please refer to the examples in this page, or this example for illustrations on setting up channels with these resources.
903
+ > **NOTE:** `AlertChannel` are legacy resources.
912
904
 
913
905
  ## Import
914
906
 
@@ -368,11 +368,13 @@ class NrqlAlertConditionArgs:
368
368
 
369
369
  @property
370
370
  @pulumi.getter
371
- @_utilities.deprecated("""use `critical` and `warning` attributes instead""")
372
371
  def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
373
372
  """
374
373
  **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
375
374
  """
375
+ warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
376
+ pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
377
+
376
378
  return pulumi.get(self, "terms")
377
379
 
378
380
  @terms.setter
@@ -393,12 +395,14 @@ class NrqlAlertConditionArgs:
393
395
 
394
396
  @property
395
397
  @pulumi.getter(name="violationTimeLimit")
396
- @_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
397
398
  def violation_time_limit(self) -> Optional[pulumi.Input[str]]:
398
399
  """
399
400
  **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
400
401
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
401
402
  """
403
+ warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
404
+ pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
405
+
402
406
  return pulumi.get(self, "violation_time_limit")
403
407
 
404
408
  @violation_time_limit.setter
@@ -804,11 +808,13 @@ class _NrqlAlertConditionState:
804
808
 
805
809
  @property
806
810
  @pulumi.getter
807
- @_utilities.deprecated("""use `critical` and `warning` attributes instead""")
808
811
  def terms(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['NrqlAlertConditionTermArgs']]]]:
809
812
  """
810
813
  **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
811
814
  """
815
+ warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
816
+ pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
817
+
812
818
  return pulumi.get(self, "terms")
813
819
 
814
820
  @terms.setter
@@ -829,12 +835,14 @@ class _NrqlAlertConditionState:
829
835
 
830
836
  @property
831
837
  @pulumi.getter(name="violationTimeLimit")
832
- @_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
833
838
  def violation_time_limit(self) -> Optional[pulumi.Input[str]]:
834
839
  """
835
840
  **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
836
841
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
837
842
  """
843
+ warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
844
+ pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
845
+
838
846
  return pulumi.get(self, "violation_time_limit")
839
847
 
840
848
  @violation_time_limit.setter
@@ -1803,11 +1811,13 @@ class NrqlAlertCondition(pulumi.CustomResource):
1803
1811
 
1804
1812
  @property
1805
1813
  @pulumi.getter
1806
- @_utilities.deprecated("""use `critical` and `warning` attributes instead""")
1807
1814
  def terms(self) -> pulumi.Output[Optional[Sequence['outputs.NrqlAlertConditionTerm']]]:
1808
1815
  """
1809
1816
  **DEPRECATED** Use `critical`, and `warning` instead. A list of terms for this condition. See Terms below for details.
1810
1817
  """
1818
+ warnings.warn("""use `critical` and `warning` attributes instead""", DeprecationWarning)
1819
+ pulumi.log.warn("""terms is deprecated: use `critical` and `warning` attributes instead""")
1820
+
1811
1821
  return pulumi.get(self, "terms")
1812
1822
 
1813
1823
  @property
@@ -1820,12 +1830,14 @@ class NrqlAlertCondition(pulumi.CustomResource):
1820
1830
 
1821
1831
  @property
1822
1832
  @pulumi.getter(name="violationTimeLimit")
1823
- @_utilities.deprecated("""use `violation_time_limit_seconds` attribute instead""")
1824
1833
  def violation_time_limit(self) -> pulumi.Output[str]:
1825
1834
  """
1826
1835
  **DEPRECATED:** Use `violation_time_limit_seconds` instead. Sets a time limit, in hours, that will automatically force-close a long-lasting incident after the time limit you select. Possible values are `ONE_HOUR`, `TWO_HOURS`, `FOUR_HOURS`, `EIGHT_HOURS`, `TWELVE_HOURS`, `TWENTY_FOUR_HOURS`, `THIRTY_DAYS` (case insensitive).<br>
1827
1836
  <small>\\***Note**: One of `violation_time_limit` _or_ `violation_time_limit_seconds` must be set, but not both.</small>
1828
1837
  """
1838
+ warnings.warn("""use `violation_time_limit_seconds` attribute instead""", DeprecationWarning)
1839
+ pulumi.log.warn("""violation_time_limit is deprecated: use `violation_time_limit_seconds` attribute instead""")
1840
+
1829
1841
  return pulumi.get(self, "violation_time_limit")
1830
1842
 
1831
1843
  @property