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,22 +1,30 @@
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
5
 
6
+ import asyncio
7
+ import functools
8
+ import importlib.metadata
6
9
  import importlib.util
7
10
  import inspect
8
11
  import json
9
12
  import os
10
- import pkg_resources
11
13
  import sys
12
14
  import typing
15
+ import warnings
16
+ import base64
13
17
 
14
18
  import pulumi
15
19
  import pulumi.runtime
20
+ from pulumi.runtime.sync_await import _sync_await
21
+ from pulumi.runtime.proto import resource_pb2
16
22
 
17
23
  from semver import VersionInfo as SemverVersion
18
24
  from parver import Version as PEP440Version
19
25
 
26
+ C = typing.TypeVar("C", bound=typing.Callable)
27
+
20
28
 
21
29
  def get_env(*args):
22
30
  for v in args:
@@ -70,7 +78,7 @@ def _get_semver_version():
70
78
  # to receive a valid semver string when receiving requests from the language host, so it's our
71
79
  # responsibility as the library to convert our own PEP440 version into a valid semver string.
72
80
 
73
- pep440_version_string = pkg_resources.require(root_package)[0].version
81
+ pep440_version_string = importlib.metadata.version(root_package)
74
82
  pep440_version = PEP440Version.parse(pep440_version_string)
75
83
  (major, minor, patch) = pep440_version.release
76
84
  prerelease = None
@@ -81,12 +89,16 @@ def _get_semver_version():
81
89
  elif pep440_version.pre_tag == 'rc':
82
90
  prerelease = f"rc.{pep440_version.pre}"
83
91
  elif pep440_version.dev is not None:
92
+ # PEP440 has explicit support for dev builds, while semver encodes them as "prerelease" versions. To bridge
93
+ # between the two, we convert our dev build version into a prerelease tag. This matches what all of our other
94
+ # packages do when constructing their own semver string.
84
95
  prerelease = f"dev.{pep440_version.dev}"
96
+ elif pep440_version.local is not None:
97
+ # PEP440 only allows a small set of prerelease tags, so when converting an arbitrary prerelease,
98
+ # PypiVersion in /pkg/codegen/python/utilities.go converts it to a local version. Therefore, we need to
99
+ # do the reverse conversion here and set the local version as the prerelease tag.
100
+ prerelease = pep440_version.local
85
101
 
86
- # The only significant difference between PEP440 and semver as it pertains to us is that PEP440 has explicit support
87
- # for dev builds, while semver encodes them as "prerelease" versions. In order to bridge between the two, we convert
88
- # our dev build version into a prerelease tag. This matches what all of our other packages do when constructing
89
- # their own semver string.
90
102
  return SemverVersion(major=major, minor=minor, patch=patch, prerelease=prerelease)
91
103
 
92
104
 
@@ -94,10 +106,6 @@ def _get_semver_version():
94
106
  _version = _get_semver_version()
95
107
  _version_str = str(_version)
96
108
 
97
-
98
- def get_version():
99
- return _version_str
100
-
101
109
  def get_resource_opts_defaults() -> pulumi.ResourceOptions:
102
110
  return pulumi.ResourceOptions(
103
111
  version=get_version(),
@@ -246,5 +254,78 @@ def lift_output_func(func: typing.Any) -> typing.Callable[[_F], _F]:
246
254
 
247
255
  return (lambda _: lifted_func)
248
256
 
257
+
258
+ def call_plain(
259
+ tok: str,
260
+ props: pulumi.Inputs,
261
+ res: typing.Optional[pulumi.Resource] = None,
262
+ typ: typing.Optional[type] = None,
263
+ ) -> typing.Any:
264
+ """
265
+ Wraps pulumi.runtime.plain to force the output and return it plainly.
266
+ """
267
+
268
+ output = pulumi.runtime.call(tok, props, res, typ)
269
+
270
+ # Ingoring deps silently. They are typically non-empty, r.f() calls include r as a dependency.
271
+ result, known, secret, _ = _sync_await(asyncio.create_task(_await_output(output)))
272
+
273
+ problem = None
274
+ if not known:
275
+ problem = ' an unknown value'
276
+ elif secret:
277
+ problem = ' a secret value'
278
+
279
+ if problem:
280
+ raise AssertionError(
281
+ f"Plain resource method '{tok}' incorrectly returned {problem}. "
282
+ + "This is an error in the provider, please report this to the provider developer."
283
+ )
284
+
285
+ return result
286
+
287
+
288
+ async def _await_output(o: pulumi.Output[typing.Any]) -> typing.Tuple[object, bool, bool, set]:
289
+ return (
290
+ await o._future,
291
+ await o._is_known,
292
+ await o._is_secret,
293
+ await o._resources,
294
+ )
295
+
296
+
297
+ # This is included to provide an upgrade path for users who are using a version
298
+ # of the Pulumi SDK (<3.121.0) that does not include the `deprecated` decorator.
299
+ def deprecated(message: str) -> typing.Callable[[C], C]:
300
+ """
301
+ Decorator to indicate a function is deprecated.
302
+
303
+ As well as inserting appropriate statements to indicate that the function is
304
+ deprecated, this decorator also tags the function with a special attribute
305
+ so that Pulumi code can detect that it is deprecated and react appropriately
306
+ in certain situations.
307
+
308
+ message is the deprecation message that should be printed if the function is called.
309
+ """
310
+
311
+ def decorator(fn: C) -> C:
312
+ if not callable(fn):
313
+ raise TypeError("Expected fn to be callable")
314
+
315
+ @functools.wraps(fn)
316
+ def deprecated_fn(*args, **kwargs):
317
+ warnings.warn(message)
318
+ pulumi.warn(f"{fn.__name__} is deprecated: {message}")
319
+
320
+ return fn(*args, **kwargs)
321
+
322
+ deprecated_fn.__dict__["_pulumi_deprecated_callable"] = fn
323
+ return typing.cast(C, deprecated_fn)
324
+
325
+ return decorator
326
+
249
327
  def get_plugin_download_url():
250
328
  return None
329
+
330
+ def get_version():
331
+ return _version_str
@@ -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__ = ['AccountManagementArgs', 'AccountManagement']
@@ -14,89 +19,90 @@ __all__ = ['AccountManagementArgs', 'AccountManagement']
14
19
  @pulumi.input_type
15
20
  class AccountManagementArgs:
16
21
  def __init__(__self__, *,
17
- region: pulumi.Input[str],
18
- name: Optional[pulumi.Input[str]] = None):
22
+ region: pulumi.Input[_builtins.str],
23
+ name: Optional[pulumi.Input[_builtins.str]] = None):
19
24
  """
20
25
  The set of arguments for constructing a AccountManagement resource.
21
- :param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
22
- :param pulumi.Input[str] name: The name of the Account.
26
+ :param pulumi.Input[_builtins.str] region: The region code of the account. One of: `us01`, `eu01`.
27
+ :param pulumi.Input[_builtins.str] name: The name of the Account.
23
28
  """
24
29
  pulumi.set(__self__, "region", region)
25
30
  if name is not None:
26
31
  pulumi.set(__self__, "name", name)
27
32
 
28
- @property
33
+ @_builtins.property
29
34
  @pulumi.getter
30
- def region(self) -> pulumi.Input[str]:
35
+ def region(self) -> pulumi.Input[_builtins.str]:
31
36
  """
32
37
  The region code of the account. One of: `us01`, `eu01`.
33
38
  """
34
39
  return pulumi.get(self, "region")
35
40
 
36
41
  @region.setter
37
- def region(self, value: pulumi.Input[str]):
42
+ def region(self, value: pulumi.Input[_builtins.str]):
38
43
  pulumi.set(self, "region", value)
39
44
 
40
- @property
45
+ @_builtins.property
41
46
  @pulumi.getter
42
- def name(self) -> Optional[pulumi.Input[str]]:
47
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
43
48
  """
44
49
  The name of the Account.
45
50
  """
46
51
  return pulumi.get(self, "name")
47
52
 
48
53
  @name.setter
49
- def name(self, value: Optional[pulumi.Input[str]]):
54
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
50
55
  pulumi.set(self, "name", value)
51
56
 
52
57
 
53
58
  @pulumi.input_type
54
59
  class _AccountManagementState:
55
60
  def __init__(__self__, *,
56
- name: Optional[pulumi.Input[str]] = None,
57
- region: Optional[pulumi.Input[str]] = None):
61
+ name: Optional[pulumi.Input[_builtins.str]] = None,
62
+ region: Optional[pulumi.Input[_builtins.str]] = None):
58
63
  """
59
64
  Input properties used for looking up and filtering AccountManagement resources.
60
- :param pulumi.Input[str] name: The name of the Account.
61
- :param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
65
+ :param pulumi.Input[_builtins.str] name: The name of the Account.
66
+ :param pulumi.Input[_builtins.str] region: The region code of the account. One of: `us01`, `eu01`.
62
67
  """
63
68
  if name is not None:
64
69
  pulumi.set(__self__, "name", name)
65
70
  if region is not None:
66
71
  pulumi.set(__self__, "region", region)
67
72
 
68
- @property
73
+ @_builtins.property
69
74
  @pulumi.getter
70
- def name(self) -> Optional[pulumi.Input[str]]:
75
+ def name(self) -> Optional[pulumi.Input[_builtins.str]]:
71
76
  """
72
77
  The name of the Account.
73
78
  """
74
79
  return pulumi.get(self, "name")
75
80
 
76
81
  @name.setter
77
- def name(self, value: Optional[pulumi.Input[str]]):
82
+ def name(self, value: Optional[pulumi.Input[_builtins.str]]):
78
83
  pulumi.set(self, "name", value)
79
84
 
80
- @property
85
+ @_builtins.property
81
86
  @pulumi.getter
82
- def region(self) -> Optional[pulumi.Input[str]]:
87
+ def region(self) -> Optional[pulumi.Input[_builtins.str]]:
83
88
  """
84
89
  The region code of the account. One of: `us01`, `eu01`.
85
90
  """
86
91
  return pulumi.get(self, "region")
87
92
 
88
93
  @region.setter
89
- def region(self, value: Optional[pulumi.Input[str]]):
94
+ def region(self, value: Optional[pulumi.Input[_builtins.str]]):
90
95
  pulumi.set(self, "region", value)
91
96
 
92
97
 
98
+ @pulumi.type_token("newrelic:index/accountManagement:AccountManagement")
93
99
  class AccountManagement(pulumi.CustomResource):
94
100
  @overload
95
101
  def __init__(__self__,
96
102
  resource_name: str,
97
103
  opts: Optional[pulumi.ResourceOptions] = None,
98
- name: Optional[pulumi.Input[str]] = None,
99
- region: Optional[pulumi.Input[str]] = None,
104
+ name: Optional[pulumi.Input[_builtins.str]] = None,
105
+ region: Optional[pulumi.Input[_builtins.str]] = None,
100
106
  __props__=None):
101
107
  """
102
108
  Use this resource to create and manage New Relic sub accounts.
@@ -110,21 +116,25 @@ class AccountManagement(pulumi.CustomResource):
110
116
  import pulumi
111
117
  import pulumi_newrelic as newrelic
112
118
 
113
- foo = newrelic.AccountManagement("foo", region="us01")
119
+ foo = newrelic.AccountManagement("foo",
120
+ name="Test Account Name",
121
+ region="us01")
114
122
  ```
115
123
 
116
124
  ## Import
117
125
 
118
- Accounts can be imported using the `id`, e.g. bash
126
+ Accounts can be imported using the `id`, e.g.
127
+
128
+ bash
119
129
 
120
130
  ```sh
121
- $ pulumi import newrelic:index/accountManagement:AccountManagement foo <id>
131
+ $ pulumi import newrelic:index/accountManagement:AccountManagement foo <id>
122
132
  ```
123
133
 
124
134
  :param str resource_name: The name of the resource.
125
135
  :param pulumi.ResourceOptions opts: Options for the resource.
126
- :param pulumi.Input[str] name: The name of the Account.
127
- :param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
136
+ :param pulumi.Input[_builtins.str] name: The name of the Account.
137
+ :param pulumi.Input[_builtins.str] region: The region code of the account. One of: `us01`, `eu01`.
128
138
  """
129
139
  ...
130
140
  @overload
@@ -144,15 +154,19 @@ class AccountManagement(pulumi.CustomResource):
144
154
  import pulumi
145
155
  import pulumi_newrelic as newrelic
146
156
 
147
- foo = newrelic.AccountManagement("foo", region="us01")
157
+ foo = newrelic.AccountManagement("foo",
158
+ name="Test Account Name",
159
+ region="us01")
148
160
  ```
149
161
 
150
162
  ## Import
151
163
 
152
- Accounts can be imported using the `id`, e.g. bash
164
+ Accounts can be imported using the `id`, e.g.
165
+
166
+ bash
153
167
 
154
168
  ```sh
155
- $ pulumi import newrelic:index/accountManagement:AccountManagement foo <id>
169
+ $ pulumi import newrelic:index/accountManagement:AccountManagement foo <id>
156
170
  ```
157
171
 
158
172
  :param str resource_name: The name of the resource.
@@ -170,8 +184,8 @@ class AccountManagement(pulumi.CustomResource):
170
184
  def _internal_init(__self__,
171
185
  resource_name: str,
172
186
  opts: Optional[pulumi.ResourceOptions] = None,
173
- name: Optional[pulumi.Input[str]] = None,
174
- region: Optional[pulumi.Input[str]] = None,
187
+ name: Optional[pulumi.Input[_builtins.str]] = None,
188
+ region: Optional[pulumi.Input[_builtins.str]] = None,
175
189
  __props__=None):
176
190
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
177
191
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -195,8 +209,8 @@ class AccountManagement(pulumi.CustomResource):
195
209
  def get(resource_name: str,
196
210
  id: pulumi.Input[str],
197
211
  opts: Optional[pulumi.ResourceOptions] = None,
198
- name: Optional[pulumi.Input[str]] = None,
199
- region: Optional[pulumi.Input[str]] = None) -> 'AccountManagement':
212
+ name: Optional[pulumi.Input[_builtins.str]] = None,
213
+ region: Optional[pulumi.Input[_builtins.str]] = None) -> 'AccountManagement':
200
214
  """
201
215
  Get an existing AccountManagement resource's state with the given name, id, and optional extra
202
216
  properties used to qualify the lookup.
@@ -204,8 +218,8 @@ class AccountManagement(pulumi.CustomResource):
204
218
  :param str resource_name: The unique name of the resulting resource.
205
219
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
206
220
  :param pulumi.ResourceOptions opts: Options for the resource.
207
- :param pulumi.Input[str] name: The name of the Account.
208
- :param pulumi.Input[str] region: The region code of the account. One of: `us01`, `eu01`.
221
+ :param pulumi.Input[_builtins.str] name: The name of the Account.
222
+ :param pulumi.Input[_builtins.str] region: The region code of the account. One of: `us01`, `eu01`.
209
223
  """
210
224
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
211
225
 
@@ -215,17 +229,17 @@ class AccountManagement(pulumi.CustomResource):
215
229
  __props__.__dict__["region"] = region
216
230
  return AccountManagement(resource_name, opts=opts, __props__=__props__)
217
231
 
218
- @property
232
+ @_builtins.property
219
233
  @pulumi.getter
220
- def name(self) -> pulumi.Output[str]:
234
+ def name(self) -> pulumi.Output[_builtins.str]:
221
235
  """
222
236
  The name of the Account.
223
237
  """
224
238
  return pulumi.get(self, "name")
225
239
 
226
- @property
240
+ @_builtins.property
227
241
  @pulumi.getter
228
- def region(self) -> pulumi.Output[str]:
242
+ def region(self) -> pulumi.Output[_builtins.str]:
229
243
  """
230
244
  The region code of the account. One of: `us01`, `eu01`.
231
245
  """