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.
Files changed (85) hide show
  1. pulumi_newrelic/__init__.py +9 -0
  2. pulumi_newrelic/_inputs.py +7153 -461
  3. pulumi_newrelic/_utilities.py +41 -5
  4. pulumi_newrelic/account_management.py +11 -6
  5. pulumi_newrelic/alert_channel.py +116 -127
  6. pulumi_newrelic/alert_condition.py +116 -129
  7. pulumi_newrelic/alert_muting_rule.py +128 -76
  8. pulumi_newrelic/alert_policy.py +78 -75
  9. pulumi_newrelic/alert_policy_channel.py +77 -68
  10. pulumi_newrelic/api_access_key.py +45 -28
  11. pulumi_newrelic/browser_application.py +77 -78
  12. pulumi_newrelic/cloud/_inputs.py +2527 -1082
  13. pulumi_newrelic/cloud/aws_govcloud_integrations.py +133 -128
  14. pulumi_newrelic/cloud/aws_govcloud_link_account.py +23 -20
  15. pulumi_newrelic/cloud/aws_integrations.py +298 -1326
  16. pulumi_newrelic/cloud/aws_link_account.py +23 -20
  17. pulumi_newrelic/cloud/azure_integrations.py +521 -483
  18. pulumi_newrelic/cloud/azure_link_account.py +34 -31
  19. pulumi_newrelic/cloud/gcp_integrations.py +341 -322
  20. pulumi_newrelic/cloud/gcp_link_account.py +23 -20
  21. pulumi_newrelic/cloud/outputs.py +327 -1072
  22. pulumi_newrelic/config/__init__.pyi +6 -1
  23. pulumi_newrelic/config/vars.py +7 -2
  24. pulumi_newrelic/data_partition_rule.py +19 -18
  25. pulumi_newrelic/entity_tags.py +32 -31
  26. pulumi_newrelic/events_to_metrics_rule.py +23 -20
  27. pulumi_newrelic/get_account.py +24 -16
  28. pulumi_newrelic/get_alert_channel.py +26 -13
  29. pulumi_newrelic/get_alert_policy.py +35 -12
  30. pulumi_newrelic/get_application.py +39 -31
  31. pulumi_newrelic/get_authentication_domain.py +17 -13
  32. pulumi_newrelic/get_cloud_account.py +26 -18
  33. pulumi_newrelic/get_entity.py +90 -147
  34. pulumi_newrelic/get_group.py +58 -13
  35. pulumi_newrelic/get_key_transaction.py +109 -34
  36. pulumi_newrelic/get_notification_destination.py +64 -14
  37. pulumi_newrelic/get_obfuscation_expression.py +36 -28
  38. pulumi_newrelic/get_service_level_alert_helper.py +135 -117
  39. pulumi_newrelic/get_test_grok_pattern.py +29 -18
  40. pulumi_newrelic/get_user.py +17 -9
  41. pulumi_newrelic/group.py +5 -146
  42. pulumi_newrelic/infra_alert_condition.py +160 -167
  43. pulumi_newrelic/insights/_inputs.py +43 -0
  44. pulumi_newrelic/insights/event.py +48 -47
  45. pulumi_newrelic/insights/outputs.py +5 -0
  46. pulumi_newrelic/key_transaction.py +464 -0
  47. pulumi_newrelic/log_parsing_rule.py +25 -24
  48. pulumi_newrelic/monitor_downtime.py +211 -225
  49. pulumi_newrelic/notification_channel.py +381 -366
  50. pulumi_newrelic/notification_destination.py +192 -54
  51. pulumi_newrelic/nrql_alert_condition.py +345 -262
  52. pulumi_newrelic/nrql_drop_rule.py +31 -30
  53. pulumi_newrelic/obfuscation_expression.py +23 -20
  54. pulumi_newrelic/obfuscation_rule.py +38 -33
  55. pulumi_newrelic/one_dashboard.py +29 -24
  56. pulumi_newrelic/one_dashboard_json.py +19 -14
  57. pulumi_newrelic/one_dashboard_raw.py +110 -105
  58. pulumi_newrelic/outputs.py +2446 -245
  59. pulumi_newrelic/plugins/_inputs.py +145 -10
  60. pulumi_newrelic/plugins/application_settings.py +25 -36
  61. pulumi_newrelic/plugins/outputs.py +15 -10
  62. pulumi_newrelic/plugins/workload.py +215 -92
  63. pulumi_newrelic/provider.py +27 -33
  64. pulumi_newrelic/pulumi-plugin.json +2 -1
  65. pulumi_newrelic/service_level.py +185 -186
  66. pulumi_newrelic/synthetics/_inputs.py +159 -2
  67. pulumi_newrelic/synthetics/alert_condition.py +87 -98
  68. pulumi_newrelic/synthetics/broken_links_monitor.py +216 -99
  69. pulumi_newrelic/synthetics/cert_check_monitor.py +219 -100
  70. pulumi_newrelic/synthetics/get_private_location.py +34 -30
  71. pulumi_newrelic/synthetics/get_secure_credential.py +24 -16
  72. pulumi_newrelic/synthetics/monitor.py +348 -193
  73. pulumi_newrelic/synthetics/multi_location_alert_condition.py +105 -100
  74. pulumi_newrelic/synthetics/outputs.py +7 -2
  75. pulumi_newrelic/synthetics/private_location.py +25 -20
  76. pulumi_newrelic/synthetics/script_monitor.py +317 -182
  77. pulumi_newrelic/synthetics/secure_credential.py +23 -22
  78. pulumi_newrelic/synthetics/step_monitor.py +405 -100
  79. pulumi_newrelic/user.py +13 -10
  80. pulumi_newrelic/workflow.py +209 -196
  81. {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/METADATA +7 -6
  82. pulumi_newrelic-5.39.0a1736834464.dist-info/RECORD +90 -0
  83. {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/WHEEL +1 -1
  84. pulumi_newrelic-5.21.0a1710157101.dist-info/RECORD +0 -89
  85. {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/top_level.txt +0 -0
@@ -4,12 +4,17 @@
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
 
12
- accountId: Optional[int]
17
+ accountId: Optional[str]
13
18
 
14
19
  adminApiKey: Optional[str]
15
20
 
@@ -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
 
12
17
  import types
@@ -16,8 +21,8 @@ __config__ = pulumi.Config('newrelic')
16
21
 
17
22
  class _ExportableConfig(types.ModuleType):
18
23
  @property
19
- def account_id(self) -> Optional[int]:
20
- return __config__.get_int('accountId') or _utilities.get_env_int('NEW_RELIC_ACCOUNT_ID')
24
+ def account_id(self) -> Optional[str]:
25
+ return __config__.get('accountId') or _utilities.get_env('NEW_RELIC_ACCOUNT_ID')
21
26
 
22
27
  @property
23
28
  def admin_api_key(self) -> Optional[str]:
@@ -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
 
12
17
  __all__ = ['DataPartitionRuleArgs', 'DataPartitionRule']
@@ -18,7 +23,7 @@ class DataPartitionRuleArgs:
18
23
  nrql: pulumi.Input[str],
19
24
  retention_policy: pulumi.Input[str],
20
25
  target_data_partition: pulumi.Input[str],
21
- account_id: Optional[pulumi.Input[int]] = None,
26
+ account_id: Optional[pulumi.Input[str]] = None,
22
27
  description: Optional[pulumi.Input[str]] = None):
23
28
  """
24
29
  The set of arguments for constructing a DataPartitionRule resource.
@@ -26,7 +31,7 @@ class DataPartitionRuleArgs:
26
31
  :param pulumi.Input[str] nrql: The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
27
32
  :param pulumi.Input[str] retention_policy: The retention policy of the data partition data. Valid values are `SECONDARY` and `STANDARD`.
28
33
  :param pulumi.Input[str] target_data_partition: The name of the data partition where logs will be allocated once the rule is enabled.
29
- :param pulumi.Input[int] account_id: The account id associated with the data partition rule.
34
+ :param pulumi.Input[str] account_id: The account id associated with the data partition rule.
30
35
  :param pulumi.Input[str] description: The description of the data partition rule.
31
36
  """
32
37
  pulumi.set(__self__, "enabled", enabled)
@@ -88,14 +93,14 @@ class DataPartitionRuleArgs:
88
93
 
89
94
  @property
90
95
  @pulumi.getter(name="accountId")
91
- def account_id(self) -> Optional[pulumi.Input[int]]:
96
+ def account_id(self) -> Optional[pulumi.Input[str]]:
92
97
  """
93
98
  The account id associated with the data partition rule.
94
99
  """
95
100
  return pulumi.get(self, "account_id")
96
101
 
97
102
  @account_id.setter
98
- def account_id(self, value: Optional[pulumi.Input[int]]):
103
+ def account_id(self, value: Optional[pulumi.Input[str]]):
99
104
  pulumi.set(self, "account_id", value)
100
105
 
101
106
  @property
@@ -114,7 +119,7 @@ class DataPartitionRuleArgs:
114
119
  @pulumi.input_type
115
120
  class _DataPartitionRuleState:
116
121
  def __init__(__self__, *,
117
- account_id: Optional[pulumi.Input[int]] = None,
122
+ account_id: Optional[pulumi.Input[str]] = None,
118
123
  deleted: Optional[pulumi.Input[bool]] = None,
119
124
  description: Optional[pulumi.Input[str]] = None,
120
125
  enabled: Optional[pulumi.Input[bool]] = None,
@@ -123,7 +128,7 @@ class _DataPartitionRuleState:
123
128
  target_data_partition: Optional[pulumi.Input[str]] = None):
124
129
  """
125
130
  Input properties used for looking up and filtering DataPartitionRule resources.
126
- :param pulumi.Input[int] account_id: The account id associated with the data partition rule.
131
+ :param pulumi.Input[str] account_id: The account id associated with the data partition rule.
127
132
  :param pulumi.Input[bool] deleted: Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
128
133
  :param pulumi.Input[str] description: The description of the data partition rule.
129
134
  :param pulumi.Input[bool] enabled: Whether or not this data partition rule is enabled.
@@ -148,14 +153,14 @@ class _DataPartitionRuleState:
148
153
 
149
154
  @property
150
155
  @pulumi.getter(name="accountId")
151
- def account_id(self) -> Optional[pulumi.Input[int]]:
156
+ def account_id(self) -> Optional[pulumi.Input[str]]:
152
157
  """
153
158
  The account id associated with the data partition rule.
154
159
  """
155
160
  return pulumi.get(self, "account_id")
156
161
 
157
162
  @account_id.setter
158
- def account_id(self, value: Optional[pulumi.Input[int]]):
163
+ def account_id(self, value: Optional[pulumi.Input[str]]):
159
164
  pulumi.set(self, "account_id", value)
160
165
 
161
166
  @property
@@ -236,7 +241,7 @@ class DataPartitionRule(pulumi.CustomResource):
236
241
  def __init__(__self__,
237
242
  resource_name: str,
238
243
  opts: Optional[pulumi.ResourceOptions] = None,
239
- account_id: Optional[pulumi.Input[int]] = None,
244
+ account_id: Optional[pulumi.Input[str]] = None,
240
245
  description: Optional[pulumi.Input[str]] = None,
241
246
  enabled: Optional[pulumi.Input[bool]] = None,
242
247
  nrql: Optional[pulumi.Input[str]] = None,
@@ -248,7 +253,6 @@ class DataPartitionRule(pulumi.CustomResource):
248
253
 
249
254
  ## Example Usage
250
255
 
251
- <!--Start PulumiCodeChooser -->
252
256
  ```python
253
257
  import pulumi
254
258
  import pulumi_newrelic as newrelic
@@ -260,7 +264,6 @@ class DataPartitionRule(pulumi.CustomResource):
260
264
  retention_policy="STANDARD",
261
265
  target_data_partition="Log_name")
262
266
  ```
263
- <!--End PulumiCodeChooser -->
264
267
 
265
268
  ## Additional Information
266
269
 
@@ -278,7 +281,7 @@ class DataPartitionRule(pulumi.CustomResource):
278
281
 
279
282
  :param str resource_name: The name of the resource.
280
283
  :param pulumi.ResourceOptions opts: Options for the resource.
281
- :param pulumi.Input[int] account_id: The account id associated with the data partition rule.
284
+ :param pulumi.Input[str] account_id: The account id associated with the data partition rule.
282
285
  :param pulumi.Input[str] description: The description of the data partition rule.
283
286
  :param pulumi.Input[bool] enabled: Whether or not this data partition rule is enabled.
284
287
  :param pulumi.Input[str] nrql: The NRQL to match events for this data partition rule. Logs matching this criteria will be routed to the specified data partition.
@@ -296,7 +299,6 @@ class DataPartitionRule(pulumi.CustomResource):
296
299
 
297
300
  ## Example Usage
298
301
 
299
- <!--Start PulumiCodeChooser -->
300
302
  ```python
301
303
  import pulumi
302
304
  import pulumi_newrelic as newrelic
@@ -308,7 +310,6 @@ class DataPartitionRule(pulumi.CustomResource):
308
310
  retention_policy="STANDARD",
309
311
  target_data_partition="Log_name")
310
312
  ```
311
- <!--End PulumiCodeChooser -->
312
313
 
313
314
  ## Additional Information
314
315
 
@@ -339,7 +340,7 @@ class DataPartitionRule(pulumi.CustomResource):
339
340
  def _internal_init(__self__,
340
341
  resource_name: str,
341
342
  opts: Optional[pulumi.ResourceOptions] = None,
342
- account_id: Optional[pulumi.Input[int]] = None,
343
+ account_id: Optional[pulumi.Input[str]] = None,
343
344
  description: Optional[pulumi.Input[str]] = None,
344
345
  enabled: Optional[pulumi.Input[bool]] = None,
345
346
  nrql: Optional[pulumi.Input[str]] = None,
@@ -379,7 +380,7 @@ class DataPartitionRule(pulumi.CustomResource):
379
380
  def get(resource_name: str,
380
381
  id: pulumi.Input[str],
381
382
  opts: Optional[pulumi.ResourceOptions] = None,
382
- account_id: Optional[pulumi.Input[int]] = None,
383
+ account_id: Optional[pulumi.Input[str]] = None,
383
384
  deleted: Optional[pulumi.Input[bool]] = None,
384
385
  description: Optional[pulumi.Input[str]] = None,
385
386
  enabled: Optional[pulumi.Input[bool]] = None,
@@ -393,7 +394,7 @@ class DataPartitionRule(pulumi.CustomResource):
393
394
  :param str resource_name: The unique name of the resulting resource.
394
395
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
395
396
  :param pulumi.ResourceOptions opts: Options for the resource.
396
- :param pulumi.Input[int] account_id: The account id associated with the data partition rule.
397
+ :param pulumi.Input[str] account_id: The account id associated with the data partition rule.
397
398
  :param pulumi.Input[bool] deleted: Whether or not this data partition rule is deleted. Deleting a data partition rule does not delete the already persisted data. This data will be retained for a given period of time specified in the retention policy field.
398
399
  :param pulumi.Input[str] description: The description of the data partition rule.
399
400
  :param pulumi.Input[bool] enabled: Whether or not this data partition rule is enabled.
@@ -416,7 +417,7 @@ class DataPartitionRule(pulumi.CustomResource):
416
417
 
417
418
  @property
418
419
  @pulumi.getter(name="accountId")
419
- def account_id(self) -> pulumi.Output[int]:
420
+ def account_id(self) -> pulumi.Output[str]:
420
421
  """
421
422
  The account id associated with the data partition rule.
422
423
  """
@@ -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 *
@@ -97,38 +102,36 @@ class EntityTags(pulumi.CustomResource):
97
102
  resource_name: str,
98
103
  opts: Optional[pulumi.ResourceOptions] = None,
99
104
  guid: Optional[pulumi.Input[str]] = None,
100
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]]] = None,
105
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]]] = None,
101
106
  __props__=None):
102
107
  """
103
108
  Use this resource to create, update, and delete tags for a New Relic One entity.
104
109
 
105
110
  ## Example Usage
106
111
 
107
- <!--Start PulumiCodeChooser -->
108
112
  ```python
109
113
  import pulumi
110
114
  import pulumi_newrelic as newrelic
111
115
 
112
- foo_entity = newrelic.get_entity(name="Example application",
116
+ foo = newrelic.get_entity(name="Example application",
113
117
  type="APPLICATION",
114
118
  domain="APM")
115
- foo_entity_tags = newrelic.EntityTags("fooEntityTags",
116
- guid=foo_entity.guid,
119
+ foo_entity_tags = newrelic.EntityTags("foo",
120
+ guid=foo.guid,
117
121
  tags=[
118
- newrelic.EntityTagsTagArgs(
119
- key="my-key",
120
- values=[
122
+ {
123
+ "key": "my-key",
124
+ "values": [
121
125
  "my-value",
122
126
  "my-other-value",
123
127
  ],
124
- ),
125
- newrelic.EntityTagsTagArgs(
126
- key="my-key-2",
127
- values=["my-value-2"],
128
- ),
128
+ },
129
+ {
130
+ "key": "my-key-2",
131
+ "values": ["my-value-2"],
132
+ },
129
133
  ])
130
134
  ```
131
- <!--End PulumiCodeChooser -->
132
135
 
133
136
  ## Import
134
137
 
@@ -145,7 +148,7 @@ class EntityTags(pulumi.CustomResource):
145
148
  :param str resource_name: The name of the resource.
146
149
  :param pulumi.ResourceOptions opts: Options for the resource.
147
150
  :param pulumi.Input[str] guid: The guid of the entity to tag.
148
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
151
+ :param pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
149
152
  """
150
153
  ...
151
154
  @overload
@@ -158,31 +161,29 @@ class EntityTags(pulumi.CustomResource):
158
161
 
159
162
  ## Example Usage
160
163
 
161
- <!--Start PulumiCodeChooser -->
162
164
  ```python
163
165
  import pulumi
164
166
  import pulumi_newrelic as newrelic
165
167
 
166
- foo_entity = newrelic.get_entity(name="Example application",
168
+ foo = newrelic.get_entity(name="Example application",
167
169
  type="APPLICATION",
168
170
  domain="APM")
169
- foo_entity_tags = newrelic.EntityTags("fooEntityTags",
170
- guid=foo_entity.guid,
171
+ foo_entity_tags = newrelic.EntityTags("foo",
172
+ guid=foo.guid,
171
173
  tags=[
172
- newrelic.EntityTagsTagArgs(
173
- key="my-key",
174
- values=[
174
+ {
175
+ "key": "my-key",
176
+ "values": [
175
177
  "my-value",
176
178
  "my-other-value",
177
179
  ],
178
- ),
179
- newrelic.EntityTagsTagArgs(
180
- key="my-key-2",
181
- values=["my-value-2"],
182
- ),
180
+ },
181
+ {
182
+ "key": "my-key-2",
183
+ "values": ["my-value-2"],
184
+ },
183
185
  ])
184
186
  ```
185
- <!--End PulumiCodeChooser -->
186
187
 
187
188
  ## Import
188
189
 
@@ -212,7 +213,7 @@ class EntityTags(pulumi.CustomResource):
212
213
  resource_name: str,
213
214
  opts: Optional[pulumi.ResourceOptions] = None,
214
215
  guid: Optional[pulumi.Input[str]] = None,
215
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]]] = None,
216
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]]] = None,
216
217
  __props__=None):
217
218
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
218
219
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -239,7 +240,7 @@ class EntityTags(pulumi.CustomResource):
239
240
  id: pulumi.Input[str],
240
241
  opts: Optional[pulumi.ResourceOptions] = None,
241
242
  guid: Optional[pulumi.Input[str]] = None,
242
- tags: Optional[pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]]] = None) -> 'EntityTags':
243
+ tags: Optional[pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]]] = None) -> 'EntityTags':
243
244
  """
244
245
  Get an existing EntityTags resource's state with the given name, id, and optional extra
245
246
  properties used to qualify the lookup.
@@ -248,7 +249,7 @@ class EntityTags(pulumi.CustomResource):
248
249
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
249
250
  :param pulumi.ResourceOptions opts: Options for the resource.
250
251
  :param pulumi.Input[str] guid: The guid of the entity to tag.
251
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
252
+ :param pulumi.Input[Sequence[pulumi.Input[Union['EntityTagsTagArgs', 'EntityTagsTagArgsDict']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
252
253
  """
253
254
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
254
255
 
@@ -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
 
12
17
  __all__ = ['EventsToMetricsRuleArgs', 'EventsToMetricsRule']
@@ -15,14 +20,14 @@ __all__ = ['EventsToMetricsRuleArgs', 'EventsToMetricsRule']
15
20
  class EventsToMetricsRuleArgs:
16
21
  def __init__(__self__, *,
17
22
  nrql: pulumi.Input[str],
18
- account_id: Optional[pulumi.Input[int]] = None,
23
+ account_id: Optional[pulumi.Input[str]] = None,
19
24
  description: Optional[pulumi.Input[str]] = None,
20
25
  enabled: Optional[pulumi.Input[bool]] = None,
21
26
  name: Optional[pulumi.Input[str]] = None):
22
27
  """
23
28
  The set of arguments for constructing a EventsToMetricsRule resource.
24
29
  :param pulumi.Input[str] nrql: Explains how to create metrics from events.
25
- :param pulumi.Input[int] account_id: Account with the event and where the metrics will be put.
30
+ :param pulumi.Input[str] account_id: Account with the event and where the metrics will be put.
26
31
  :param pulumi.Input[str] description: Provides additional information about the rule.
27
32
  :param pulumi.Input[bool] enabled: True means this rule is enabled. False means the rule is currently not creating metrics.
28
33
  :param pulumi.Input[str] name: The name of the rule. This must be unique within an account.
@@ -51,14 +56,14 @@ class EventsToMetricsRuleArgs:
51
56
 
52
57
  @property
53
58
  @pulumi.getter(name="accountId")
54
- def account_id(self) -> Optional[pulumi.Input[int]]:
59
+ def account_id(self) -> Optional[pulumi.Input[str]]:
55
60
  """
56
61
  Account with the event and where the metrics will be put.
57
62
  """
58
63
  return pulumi.get(self, "account_id")
59
64
 
60
65
  @account_id.setter
61
- def account_id(self, value: Optional[pulumi.Input[int]]):
66
+ def account_id(self, value: Optional[pulumi.Input[str]]):
62
67
  pulumi.set(self, "account_id", value)
63
68
 
64
69
  @property
@@ -101,7 +106,7 @@ class EventsToMetricsRuleArgs:
101
106
  @pulumi.input_type
102
107
  class _EventsToMetricsRuleState:
103
108
  def __init__(__self__, *,
104
- account_id: Optional[pulumi.Input[int]] = None,
109
+ account_id: Optional[pulumi.Input[str]] = None,
105
110
  description: Optional[pulumi.Input[str]] = None,
106
111
  enabled: Optional[pulumi.Input[bool]] = None,
107
112
  name: Optional[pulumi.Input[str]] = None,
@@ -109,7 +114,7 @@ class _EventsToMetricsRuleState:
109
114
  rule_id: Optional[pulumi.Input[str]] = None):
110
115
  """
111
116
  Input properties used for looking up and filtering EventsToMetricsRule resources.
112
- :param pulumi.Input[int] account_id: Account with the event and where the metrics will be put.
117
+ :param pulumi.Input[str] account_id: Account with the event and where the metrics will be put.
113
118
  :param pulumi.Input[str] description: Provides additional information about the rule.
114
119
  :param pulumi.Input[bool] enabled: True means this rule is enabled. False means the rule is currently not creating metrics.
115
120
  :param pulumi.Input[str] name: The name of the rule. This must be unique within an account.
@@ -131,14 +136,14 @@ class _EventsToMetricsRuleState:
131
136
 
132
137
  @property
133
138
  @pulumi.getter(name="accountId")
134
- def account_id(self) -> Optional[pulumi.Input[int]]:
139
+ def account_id(self) -> Optional[pulumi.Input[str]]:
135
140
  """
136
141
  Account with the event and where the metrics will be put.
137
142
  """
138
143
  return pulumi.get(self, "account_id")
139
144
 
140
145
  @account_id.setter
141
- def account_id(self, value: Optional[pulumi.Input[int]]):
146
+ def account_id(self, value: Optional[pulumi.Input[str]]):
142
147
  pulumi.set(self, "account_id", value)
143
148
 
144
149
  @property
@@ -207,7 +212,7 @@ class EventsToMetricsRule(pulumi.CustomResource):
207
212
  def __init__(__self__,
208
213
  resource_name: str,
209
214
  opts: Optional[pulumi.ResourceOptions] = None,
210
- account_id: Optional[pulumi.Input[int]] = None,
215
+ account_id: Optional[pulumi.Input[str]] = None,
211
216
  description: Optional[pulumi.Input[str]] = None,
212
217
  enabled: Optional[pulumi.Input[bool]] = None,
213
218
  name: Optional[pulumi.Input[str]] = None,
@@ -218,17 +223,16 @@ class EventsToMetricsRule(pulumi.CustomResource):
218
223
 
219
224
  ## Example Usage
220
225
 
221
- <!--Start PulumiCodeChooser -->
222
226
  ```python
223
227
  import pulumi
224
228
  import pulumi_newrelic as newrelic
225
229
 
226
230
  foo = newrelic.EventsToMetricsRule("foo",
227
- account_id=12345,
231
+ account_id="12345",
232
+ name="Example events to metrics rule",
228
233
  description="Example description",
229
234
  nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
230
235
  ```
231
- <!--End PulumiCodeChooser -->
232
236
 
233
237
  ## Import
234
238
 
@@ -244,7 +248,7 @@ class EventsToMetricsRule(pulumi.CustomResource):
244
248
 
245
249
  :param str resource_name: The name of the resource.
246
250
  :param pulumi.ResourceOptions opts: Options for the resource.
247
- :param pulumi.Input[int] account_id: Account with the event and where the metrics will be put.
251
+ :param pulumi.Input[str] account_id: Account with the event and where the metrics will be put.
248
252
  :param pulumi.Input[str] description: Provides additional information about the rule.
249
253
  :param pulumi.Input[bool] enabled: True means this rule is enabled. False means the rule is currently not creating metrics.
250
254
  :param pulumi.Input[str] name: The name of the rule. This must be unique within an account.
@@ -261,17 +265,16 @@ class EventsToMetricsRule(pulumi.CustomResource):
261
265
 
262
266
  ## Example Usage
263
267
 
264
- <!--Start PulumiCodeChooser -->
265
268
  ```python
266
269
  import pulumi
267
270
  import pulumi_newrelic as newrelic
268
271
 
269
272
  foo = newrelic.EventsToMetricsRule("foo",
270
- account_id=12345,
273
+ account_id="12345",
274
+ name="Example events to metrics rule",
271
275
  description="Example description",
272
276
  nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
273
277
  ```
274
- <!--End PulumiCodeChooser -->
275
278
 
276
279
  ## Import
277
280
 
@@ -300,7 +303,7 @@ class EventsToMetricsRule(pulumi.CustomResource):
300
303
  def _internal_init(__self__,
301
304
  resource_name: str,
302
305
  opts: Optional[pulumi.ResourceOptions] = None,
303
- account_id: Optional[pulumi.Input[int]] = None,
306
+ account_id: Optional[pulumi.Input[str]] = None,
304
307
  description: Optional[pulumi.Input[str]] = None,
305
308
  enabled: Optional[pulumi.Input[bool]] = None,
306
309
  name: Optional[pulumi.Input[str]] = None,
@@ -332,7 +335,7 @@ class EventsToMetricsRule(pulumi.CustomResource):
332
335
  def get(resource_name: str,
333
336
  id: pulumi.Input[str],
334
337
  opts: Optional[pulumi.ResourceOptions] = None,
335
- account_id: Optional[pulumi.Input[int]] = None,
338
+ account_id: Optional[pulumi.Input[str]] = None,
336
339
  description: Optional[pulumi.Input[str]] = None,
337
340
  enabled: Optional[pulumi.Input[bool]] = None,
338
341
  name: Optional[pulumi.Input[str]] = None,
@@ -345,7 +348,7 @@ class EventsToMetricsRule(pulumi.CustomResource):
345
348
  :param str resource_name: The unique name of the resulting resource.
346
349
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
347
350
  :param pulumi.ResourceOptions opts: Options for the resource.
348
- :param pulumi.Input[int] account_id: Account with the event and where the metrics will be put.
351
+ :param pulumi.Input[str] account_id: Account with the event and where the metrics will be put.
349
352
  :param pulumi.Input[str] description: Provides additional information about the rule.
350
353
  :param pulumi.Input[bool] enabled: True means this rule is enabled. False means the rule is currently not creating metrics.
351
354
  :param pulumi.Input[str] name: The name of the rule. This must be unique within an account.
@@ -366,7 +369,7 @@ class EventsToMetricsRule(pulumi.CustomResource):
366
369
 
367
370
  @property
368
371
  @pulumi.getter(name="accountId")
369
- def account_id(self) -> pulumi.Output[int]:
372
+ def account_id(self) -> pulumi.Output[str]:
370
373
  """
371
374
  Account with the event and where the metrics will be put.
372
375
  """
@@ -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
 
12
17
  __all__ = [
@@ -22,8 +27,8 @@ class GetAccountResult:
22
27
  A collection of values returned by getAccount.
23
28
  """
24
29
  def __init__(__self__, account_id=None, id=None, name=None, scope=None):
25
- if account_id and not isinstance(account_id, int):
26
- raise TypeError("Expected argument 'account_id' to be a int")
30
+ if account_id and not isinstance(account_id, str):
31
+ raise TypeError("Expected argument 'account_id' to be a str")
27
32
  pulumi.set(__self__, "account_id", account_id)
28
33
  if id and not isinstance(id, str):
29
34
  raise TypeError("Expected argument 'id' to be a str")
@@ -37,7 +42,7 @@ class GetAccountResult:
37
42
 
38
43
  @property
39
44
  @pulumi.getter(name="accountId")
40
- def account_id(self) -> Optional[int]:
45
+ def account_id(self) -> Optional[str]:
41
46
  return pulumi.get(self, "account_id")
42
47
 
43
48
  @property
@@ -71,7 +76,7 @@ class AwaitableGetAccountResult(GetAccountResult):
71
76
  scope=self.scope)
72
77
 
73
78
 
74
- def get_account(account_id: Optional[int] = None,
79
+ def get_account(account_id: Optional[str] = None,
75
80
  name: Optional[str] = None,
76
81
  scope: Optional[str] = None,
77
82
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAccountResult:
@@ -82,17 +87,15 @@ def get_account(account_id: Optional[int] = None,
82
87
 
83
88
  ## Example Usage
84
89
 
85
- <!--Start PulumiCodeChooser -->
86
90
  ```python
87
91
  import pulumi
88
92
  import pulumi_newrelic as newrelic
89
93
 
90
94
  acc = newrelic.get_account(scope="global")
91
95
  ```
92
- <!--End PulumiCodeChooser -->
93
96
 
94
97
 
95
- :param int account_id: The account ID in New Relic.
98
+ :param str account_id: The account ID in New Relic.
96
99
  :param str name: The account name in New Relic.
97
100
  :param str scope: The scope of the account in New Relic. Valid values are "global" and "in_region". Defaults to "in_region".
98
101
  """
@@ -108,13 +111,10 @@ def get_account(account_id: Optional[int] = None,
108
111
  id=pulumi.get(__ret__, 'id'),
109
112
  name=pulumi.get(__ret__, 'name'),
110
113
  scope=pulumi.get(__ret__, 'scope'))
111
-
112
-
113
- @_utilities.lift_output_func(get_account)
114
- def get_account_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
114
+ def get_account_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
115
115
  name: Optional[pulumi.Input[Optional[str]]] = None,
116
116
  scope: Optional[pulumi.Input[Optional[str]]] = None,
117
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAccountResult]:
117
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAccountResult]:
118
118
  """
119
119
  Use this data source to get information about a specific account in New Relic.
120
120
  Accounts can be located by ID or name. At most one of the two attributes can
@@ -122,18 +122,26 @@ def get_account_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
122
122
 
123
123
  ## Example Usage
124
124
 
125
- <!--Start PulumiCodeChooser -->
126
125
  ```python
127
126
  import pulumi
128
127
  import pulumi_newrelic as newrelic
129
128
 
130
129
  acc = newrelic.get_account(scope="global")
131
130
  ```
132
- <!--End PulumiCodeChooser -->
133
131
 
134
132
 
135
- :param int account_id: The account ID in New Relic.
133
+ :param str account_id: The account ID in New Relic.
136
134
  :param str name: The account name in New Relic.
137
135
  :param str scope: The scope of the account in New Relic. Valid values are "global" and "in_region". Defaults to "in_region".
138
136
  """
139
- ...
137
+ __args__ = dict()
138
+ __args__['accountId'] = account_id
139
+ __args__['name'] = name
140
+ __args__['scope'] = scope
141
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
142
+ __ret__ = pulumi.runtime.invoke_output('newrelic:index/getAccount:getAccount', __args__, opts=opts, typ=GetAccountResult)
143
+ return __ret__.apply(lambda __response__: GetAccountResult(
144
+ account_id=pulumi.get(__response__, 'account_id'),
145
+ id=pulumi.get(__response__, 'id'),
146
+ name=pulumi.get(__response__, 'name'),
147
+ scope=pulumi.get(__response__, 'scope')))