pulumi-newrelic 5.21.0a1710157101__py3-none-any.whl → 5.39.0a1736849617__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.0a1736849617.dist-info}/METADATA +7 -6
  82. pulumi_newrelic-5.39.0a1736849617.dist-info/RECORD +90 -0
  83. {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736849617.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.0a1736849617.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = ['AlertPolicyChannelArgs', 'AlertPolicyChannel']
@@ -14,14 +19,14 @@ __all__ = ['AlertPolicyChannelArgs', 'AlertPolicyChannel']
14
19
  @pulumi.input_type
15
20
  class AlertPolicyChannelArgs:
16
21
  def __init__(__self__, *,
17
- channel_ids: pulumi.Input[Sequence[pulumi.Input[int]]],
18
- policy_id: pulumi.Input[int],
19
- account_id: Optional[pulumi.Input[int]] = None):
22
+ channel_ids: pulumi.Input[Sequence[pulumi.Input[str]]],
23
+ policy_id: pulumi.Input[str],
24
+ account_id: Optional[pulumi.Input[str]] = None):
20
25
  """
21
26
  The set of arguments for constructing a AlertPolicyChannel resource.
22
- :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
23
- :param pulumi.Input[int] policy_id: The ID of the policy.
24
- :param pulumi.Input[int] account_id: Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
27
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] channel_ids: Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
28
+ :param pulumi.Input[str] policy_id: The ID of the policy.
29
+ :param pulumi.Input[str] account_id: Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
25
30
  """
26
31
  pulumi.set(__self__, "channel_ids", channel_ids)
27
32
  pulumi.set(__self__, "policy_id", policy_id)
@@ -30,52 +35,52 @@ class AlertPolicyChannelArgs:
30
35
 
31
36
  @property
32
37
  @pulumi.getter(name="channelIds")
33
- def channel_ids(self) -> pulumi.Input[Sequence[pulumi.Input[int]]]:
38
+ def channel_ids(self) -> pulumi.Input[Sequence[pulumi.Input[str]]]:
34
39
  """
35
40
  Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
36
41
  """
37
42
  return pulumi.get(self, "channel_ids")
38
43
 
39
44
  @channel_ids.setter
40
- def channel_ids(self, value: pulumi.Input[Sequence[pulumi.Input[int]]]):
45
+ def channel_ids(self, value: pulumi.Input[Sequence[pulumi.Input[str]]]):
41
46
  pulumi.set(self, "channel_ids", value)
42
47
 
43
48
  @property
44
49
  @pulumi.getter(name="policyId")
45
- def policy_id(self) -> pulumi.Input[int]:
50
+ def policy_id(self) -> pulumi.Input[str]:
46
51
  """
47
52
  The ID of the policy.
48
53
  """
49
54
  return pulumi.get(self, "policy_id")
50
55
 
51
56
  @policy_id.setter
52
- def policy_id(self, value: pulumi.Input[int]):
57
+ def policy_id(self, value: pulumi.Input[str]):
53
58
  pulumi.set(self, "policy_id", value)
54
59
 
55
60
  @property
56
61
  @pulumi.getter(name="accountId")
57
- def account_id(self) -> Optional[pulumi.Input[int]]:
62
+ def account_id(self) -> Optional[pulumi.Input[str]]:
58
63
  """
59
64
  Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
60
65
  """
61
66
  return pulumi.get(self, "account_id")
62
67
 
63
68
  @account_id.setter
64
- def account_id(self, value: Optional[pulumi.Input[int]]):
69
+ def account_id(self, value: Optional[pulumi.Input[str]]):
65
70
  pulumi.set(self, "account_id", value)
66
71
 
67
72
 
68
73
  @pulumi.input_type
69
74
  class _AlertPolicyChannelState:
70
75
  def __init__(__self__, *,
71
- account_id: Optional[pulumi.Input[int]] = None,
72
- channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
73
- policy_id: Optional[pulumi.Input[int]] = None):
76
+ account_id: Optional[pulumi.Input[str]] = None,
77
+ channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
78
+ policy_id: Optional[pulumi.Input[str]] = None):
74
79
  """
75
80
  Input properties used for looking up and filtering AlertPolicyChannel resources.
76
- :param pulumi.Input[int] account_id: Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
77
- :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
78
- :param pulumi.Input[int] policy_id: The ID of the policy.
81
+ :param pulumi.Input[str] account_id: Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
82
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] channel_ids: Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
83
+ :param pulumi.Input[str] policy_id: The ID of the policy.
79
84
  """
80
85
  if account_id is not None:
81
86
  pulumi.set(__self__, "account_id", account_id)
@@ -86,38 +91,38 @@ class _AlertPolicyChannelState:
86
91
 
87
92
  @property
88
93
  @pulumi.getter(name="accountId")
89
- def account_id(self) -> Optional[pulumi.Input[int]]:
94
+ def account_id(self) -> Optional[pulumi.Input[str]]:
90
95
  """
91
96
  Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
92
97
  """
93
98
  return pulumi.get(self, "account_id")
94
99
 
95
100
  @account_id.setter
96
- def account_id(self, value: Optional[pulumi.Input[int]]):
101
+ def account_id(self, value: Optional[pulumi.Input[str]]):
97
102
  pulumi.set(self, "account_id", value)
98
103
 
99
104
  @property
100
105
  @pulumi.getter(name="channelIds")
101
- def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]:
106
+ def channel_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
102
107
  """
103
108
  Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
104
109
  """
105
110
  return pulumi.get(self, "channel_ids")
106
111
 
107
112
  @channel_ids.setter
108
- def channel_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]]):
113
+ def channel_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
109
114
  pulumi.set(self, "channel_ids", value)
110
115
 
111
116
  @property
112
117
  @pulumi.getter(name="policyId")
113
- def policy_id(self) -> Optional[pulumi.Input[int]]:
118
+ def policy_id(self) -> Optional[pulumi.Input[str]]:
114
119
  """
115
120
  The ID of the policy.
116
121
  """
117
122
  return pulumi.get(self, "policy_id")
118
123
 
119
124
  @policy_id.setter
120
- def policy_id(self, value: Optional[pulumi.Input[int]]):
125
+ def policy_id(self, value: Optional[pulumi.Input[str]]):
121
126
  pulumi.set(self, "policy_id", value)
122
127
 
123
128
 
@@ -126,39 +131,42 @@ class AlertPolicyChannel(pulumi.CustomResource):
126
131
  def __init__(__self__,
127
132
  resource_name: str,
128
133
  opts: Optional[pulumi.ResourceOptions] = None,
129
- account_id: Optional[pulumi.Input[int]] = None,
130
- channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
131
- policy_id: Optional[pulumi.Input[int]] = None,
134
+ account_id: Optional[pulumi.Input[str]] = None,
135
+ channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
136
+ policy_id: Optional[pulumi.Input[str]] = None,
132
137
  __props__=None):
133
138
  """
134
139
  Use this resource to map alert policies to alert channels in New Relic.
135
140
 
136
- > **WARNING:** The `AlertPolicyChannel` resource is deprecated and will be removed in the next major release. For managing channel resources in Workflows, use `NotificationChannel`.
141
+ > **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`, with the channels to be mapped created using a combination of the newer resources `NotificationDestination` and `NotificationChannel`. We **strongly recommend** migrating to these new resources at the earliest. Please refer to this example for a detailed illustration on setting up channels and workflows with these resources.
137
142
 
138
143
  ## Example Usage
139
144
 
140
145
  The example below will apply multiple alert channels to an existing New Relic alert policy.
141
146
 
142
- <!--Start PulumiCodeChooser -->
143
147
  ```python
144
148
  import pulumi
145
149
  import pulumi_newrelic as newrelic
146
150
 
151
+ # Fetches the data for this policy from your New Relic account
152
+ # and is referenced in the newrelic_alert_policy_channel block below.
147
153
  example_policy = newrelic.get_alert_policy(name="my-alert-policy")
148
154
  # Creates an email alert channel.
149
- email_channel = newrelic.AlertChannel("emailChannel",
155
+ email_channel = newrelic.AlertChannel("email_channel",
156
+ name="bar",
150
157
  type="email",
151
- config=newrelic.AlertChannelConfigArgs(
152
- recipients="foo@example.com",
153
- include_json_attachment="1",
154
- ))
158
+ config={
159
+ "recipients": "foo@example.com",
160
+ "include_json_attachment": "1",
161
+ })
155
162
  # Creates a Slack alert channel.
156
- slack_channel = newrelic.AlertChannel("slackChannel",
163
+ slack_channel = newrelic.AlertChannel("slack_channel",
164
+ name="slack-channel-example",
157
165
  type="slack",
158
- config=newrelic.AlertChannelConfigArgs(
159
- channel="#example-channel",
160
- url="http://example-org.slack.com",
161
- ))
166
+ config={
167
+ "channel": "#example-channel",
168
+ "url": "http://example-org.slack.com",
169
+ })
162
170
  # Applies the created channels above to the alert policy
163
171
  # referenced at the top of the config.
164
172
  foo = newrelic.AlertPolicyChannel("foo",
@@ -168,7 +176,6 @@ class AlertPolicyChannel(pulumi.CustomResource):
168
176
  slack_channel.id,
169
177
  ])
170
178
  ```
171
- <!--End PulumiCodeChooser -->
172
179
 
173
180
  ## Import
174
181
 
@@ -181,9 +188,9 @@ class AlertPolicyChannel(pulumi.CustomResource):
181
188
 
182
189
  :param str resource_name: The name of the resource.
183
190
  :param pulumi.ResourceOptions opts: Options for the resource.
184
- :param pulumi.Input[int] account_id: Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
185
- :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
186
- :param pulumi.Input[int] policy_id: The ID of the policy.
191
+ :param pulumi.Input[str] account_id: Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
192
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] channel_ids: Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
193
+ :param pulumi.Input[str] policy_id: The ID of the policy.
187
194
  """
188
195
  ...
189
196
  @overload
@@ -194,32 +201,35 @@ class AlertPolicyChannel(pulumi.CustomResource):
194
201
  """
195
202
  Use this resource to map alert policies to alert channels in New Relic.
196
203
 
197
- > **WARNING:** The `AlertPolicyChannel` resource is deprecated and will be removed in the next major release. For managing channel resources in Workflows, use `NotificationChannel`.
204
+ > **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`, with the channels to be mapped created using a combination of the newer resources `NotificationDestination` and `NotificationChannel`. We **strongly recommend** migrating to these new resources at the earliest. Please refer to this example for a detailed illustration on setting up channels and workflows with these resources.
198
205
 
199
206
  ## Example Usage
200
207
 
201
208
  The example below will apply multiple alert channels to an existing New Relic alert policy.
202
209
 
203
- <!--Start PulumiCodeChooser -->
204
210
  ```python
205
211
  import pulumi
206
212
  import pulumi_newrelic as newrelic
207
213
 
214
+ # Fetches the data for this policy from your New Relic account
215
+ # and is referenced in the newrelic_alert_policy_channel block below.
208
216
  example_policy = newrelic.get_alert_policy(name="my-alert-policy")
209
217
  # Creates an email alert channel.
210
- email_channel = newrelic.AlertChannel("emailChannel",
218
+ email_channel = newrelic.AlertChannel("email_channel",
219
+ name="bar",
211
220
  type="email",
212
- config=newrelic.AlertChannelConfigArgs(
213
- recipients="foo@example.com",
214
- include_json_attachment="1",
215
- ))
221
+ config={
222
+ "recipients": "foo@example.com",
223
+ "include_json_attachment": "1",
224
+ })
216
225
  # Creates a Slack alert channel.
217
- slack_channel = newrelic.AlertChannel("slackChannel",
226
+ slack_channel = newrelic.AlertChannel("slack_channel",
227
+ name="slack-channel-example",
218
228
  type="slack",
219
- config=newrelic.AlertChannelConfigArgs(
220
- channel="#example-channel",
221
- url="http://example-org.slack.com",
222
- ))
229
+ config={
230
+ "channel": "#example-channel",
231
+ "url": "http://example-org.slack.com",
232
+ })
223
233
  # Applies the created channels above to the alert policy
224
234
  # referenced at the top of the config.
225
235
  foo = newrelic.AlertPolicyChannel("foo",
@@ -229,7 +239,6 @@ class AlertPolicyChannel(pulumi.CustomResource):
229
239
  slack_channel.id,
230
240
  ])
231
241
  ```
232
- <!--End PulumiCodeChooser -->
233
242
 
234
243
  ## Import
235
244
 
@@ -255,9 +264,9 @@ class AlertPolicyChannel(pulumi.CustomResource):
255
264
  def _internal_init(__self__,
256
265
  resource_name: str,
257
266
  opts: Optional[pulumi.ResourceOptions] = None,
258
- account_id: Optional[pulumi.Input[int]] = None,
259
- channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
260
- policy_id: Optional[pulumi.Input[int]] = None,
267
+ account_id: Optional[pulumi.Input[str]] = None,
268
+ channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
269
+ policy_id: Optional[pulumi.Input[str]] = None,
261
270
  __props__=None):
262
271
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
263
272
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -284,9 +293,9 @@ class AlertPolicyChannel(pulumi.CustomResource):
284
293
  def get(resource_name: str,
285
294
  id: pulumi.Input[str],
286
295
  opts: Optional[pulumi.ResourceOptions] = None,
287
- account_id: Optional[pulumi.Input[int]] = None,
288
- channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
289
- policy_id: Optional[pulumi.Input[int]] = None) -> 'AlertPolicyChannel':
296
+ account_id: Optional[pulumi.Input[str]] = None,
297
+ channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
298
+ policy_id: Optional[pulumi.Input[str]] = None) -> 'AlertPolicyChannel':
290
299
  """
291
300
  Get an existing AlertPolicyChannel resource's state with the given name, id, and optional extra
292
301
  properties used to qualify the lookup.
@@ -294,9 +303,9 @@ class AlertPolicyChannel(pulumi.CustomResource):
294
303
  :param str resource_name: The unique name of the resulting resource.
295
304
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
296
305
  :param pulumi.ResourceOptions opts: Options for the resource.
297
- :param pulumi.Input[int] account_id: Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
298
- :param pulumi.Input[Sequence[pulumi.Input[int]]] channel_ids: Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
299
- :param pulumi.Input[int] policy_id: The ID of the policy.
306
+ :param pulumi.Input[str] account_id: Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
307
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] channel_ids: Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
308
+ :param pulumi.Input[str] policy_id: The ID of the policy.
300
309
  """
301
310
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
302
311
 
@@ -309,7 +318,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
309
318
 
310
319
  @property
311
320
  @pulumi.getter(name="accountId")
312
- def account_id(self) -> pulumi.Output[int]:
321
+ def account_id(self) -> pulumi.Output[str]:
313
322
  """
314
323
  Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
315
324
  """
@@ -317,7 +326,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
317
326
 
318
327
  @property
319
328
  @pulumi.getter(name="channelIds")
320
- def channel_ids(self) -> pulumi.Output[Sequence[int]]:
329
+ def channel_ids(self) -> pulumi.Output[Sequence[str]]:
321
330
  """
322
331
  Array of channel IDs to apply to the specified policy. We recommended sorting channel IDs in ascending order to avoid drift in your state.
323
332
  """
@@ -325,7 +334,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
325
334
 
326
335
  @property
327
336
  @pulumi.getter(name="policyId")
328
- def policy_id(self) -> pulumi.Output[int]:
337
+ def policy_id(self) -> pulumi.Output[str]:
329
338
  """
330
339
  The ID of the policy.
331
340
  """
@@ -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__ = ['ApiAccessKeyArgs', 'ApiAccessKey']
@@ -14,20 +19,20 @@ __all__ = ['ApiAccessKeyArgs', 'ApiAccessKey']
14
19
  @pulumi.input_type
15
20
  class ApiAccessKeyArgs:
16
21
  def __init__(__self__, *,
17
- account_id: pulumi.Input[int],
22
+ account_id: pulumi.Input[str],
18
23
  key_type: pulumi.Input[str],
19
24
  ingest_type: Optional[pulumi.Input[str]] = None,
20
25
  name: Optional[pulumi.Input[str]] = None,
21
26
  notes: Optional[pulumi.Input[str]] = None,
22
- user_id: Optional[pulumi.Input[int]] = None):
27
+ user_id: Optional[pulumi.Input[str]] = None):
23
28
  """
24
29
  The set of arguments for constructing a ApiAccessKey resource.
25
- :param pulumi.Input[int] account_id: The New Relic account ID of the account you wish to create the API access key.
30
+ :param pulumi.Input[str] account_id: The New Relic account ID of the account you wish to create the API access key.
26
31
  :param pulumi.Input[str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
27
32
  :param pulumi.Input[str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
28
33
  :param pulumi.Input[str] name: The name of the key.
29
34
  :param pulumi.Input[str] notes: Any notes about this ingest key.
30
- :param pulumi.Input[int] user_id: Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
35
+ :param pulumi.Input[str] user_id: Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
31
36
  """
32
37
  pulumi.set(__self__, "account_id", account_id)
33
38
  pulumi.set(__self__, "key_type", key_type)
@@ -42,14 +47,14 @@ class ApiAccessKeyArgs:
42
47
 
43
48
  @property
44
49
  @pulumi.getter(name="accountId")
45
- def account_id(self) -> pulumi.Input[int]:
50
+ def account_id(self) -> pulumi.Input[str]:
46
51
  """
47
52
  The New Relic account ID of the account you wish to create the API access key.
48
53
  """
49
54
  return pulumi.get(self, "account_id")
50
55
 
51
56
  @account_id.setter
52
- def account_id(self, value: pulumi.Input[int]):
57
+ def account_id(self, value: pulumi.Input[str]):
53
58
  pulumi.set(self, "account_id", value)
54
59
 
55
60
  @property
@@ -102,36 +107,36 @@ class ApiAccessKeyArgs:
102
107
 
103
108
  @property
104
109
  @pulumi.getter(name="userId")
105
- def user_id(self) -> Optional[pulumi.Input[int]]:
110
+ def user_id(self) -> Optional[pulumi.Input[str]]:
106
111
  """
107
112
  Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
108
113
  """
109
114
  return pulumi.get(self, "user_id")
110
115
 
111
116
  @user_id.setter
112
- def user_id(self, value: Optional[pulumi.Input[int]]):
117
+ def user_id(self, value: Optional[pulumi.Input[str]]):
113
118
  pulumi.set(self, "user_id", value)
114
119
 
115
120
 
116
121
  @pulumi.input_type
117
122
  class _ApiAccessKeyState:
118
123
  def __init__(__self__, *,
119
- account_id: Optional[pulumi.Input[int]] = None,
124
+ account_id: Optional[pulumi.Input[str]] = None,
120
125
  ingest_type: Optional[pulumi.Input[str]] = None,
121
126
  key: Optional[pulumi.Input[str]] = None,
122
127
  key_type: Optional[pulumi.Input[str]] = None,
123
128
  name: Optional[pulumi.Input[str]] = None,
124
129
  notes: Optional[pulumi.Input[str]] = None,
125
- user_id: Optional[pulumi.Input[int]] = None):
130
+ user_id: Optional[pulumi.Input[str]] = None):
126
131
  """
127
132
  Input properties used for looking up and filtering ApiAccessKey resources.
128
- :param pulumi.Input[int] account_id: The New Relic account ID of the account you wish to create the API access key.
133
+ :param pulumi.Input[str] account_id: The New Relic account ID of the account you wish to create the API access key.
129
134
  :param pulumi.Input[str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
130
135
  :param pulumi.Input[str] key: The actual API key. This attribute is masked and not be visible in your terminal, CI, etc.
131
136
  :param pulumi.Input[str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
132
137
  :param pulumi.Input[str] name: The name of the key.
133
138
  :param pulumi.Input[str] notes: Any notes about this ingest key.
134
- :param pulumi.Input[int] user_id: Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
139
+ :param pulumi.Input[str] user_id: Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
135
140
  """
136
141
  if account_id is not None:
137
142
  pulumi.set(__self__, "account_id", account_id)
@@ -150,14 +155,14 @@ class _ApiAccessKeyState:
150
155
 
151
156
  @property
152
157
  @pulumi.getter(name="accountId")
153
- def account_id(self) -> Optional[pulumi.Input[int]]:
158
+ def account_id(self) -> Optional[pulumi.Input[str]]:
154
159
  """
155
160
  The New Relic account ID of the account you wish to create the API access key.
156
161
  """
157
162
  return pulumi.get(self, "account_id")
158
163
 
159
164
  @account_id.setter
160
- def account_id(self, value: Optional[pulumi.Input[int]]):
165
+ def account_id(self, value: Optional[pulumi.Input[str]]):
161
166
  pulumi.set(self, "account_id", value)
162
167
 
163
168
  @property
@@ -222,14 +227,14 @@ class _ApiAccessKeyState:
222
227
 
223
228
  @property
224
229
  @pulumi.getter(name="userId")
225
- def user_id(self) -> Optional[pulumi.Input[int]]:
230
+ def user_id(self) -> Optional[pulumi.Input[str]]:
226
231
  """
227
232
  Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
228
233
  """
229
234
  return pulumi.get(self, "user_id")
230
235
 
231
236
  @user_id.setter
232
- def user_id(self, value: Optional[pulumi.Input[int]]):
237
+ def user_id(self, value: Optional[pulumi.Input[str]]):
233
238
  pulumi.set(self, "user_id", value)
234
239
 
235
240
 
@@ -238,12 +243,12 @@ class ApiAccessKey(pulumi.CustomResource):
238
243
  def __init__(__self__,
239
244
  resource_name: str,
240
245
  opts: Optional[pulumi.ResourceOptions] = None,
241
- account_id: Optional[pulumi.Input[int]] = None,
246
+ account_id: Optional[pulumi.Input[str]] = None,
242
247
  ingest_type: Optional[pulumi.Input[str]] = None,
243
248
  key_type: Optional[pulumi.Input[str]] = None,
244
249
  name: Optional[pulumi.Input[str]] = None,
245
250
  notes: Optional[pulumi.Input[str]] = None,
246
- user_id: Optional[pulumi.Input[int]] = None,
251
+ user_id: Optional[pulumi.Input[str]] = None,
247
252
  __props__=None):
248
253
  """
249
254
  Use this resource to programmatically create and manage the following types of keys:
@@ -264,6 +269,12 @@ class ApiAccessKey(pulumi.CustomResource):
264
269
 
265
270
  > **WARNING:** Creating 'Ingest - License' and 'Ingest - Browser' keys using this resource is restricted to 'core' or 'full platform' New Relic user accounts. If you've signed up as a 'basic' user with New Relic, or have been added as a 'basic' user to your organization on New Relic, you would not be able to use your account to create 'Ingest' keys. If you see the message `"You do not have permission to create this key"` in the response of the API called by this resource, it could be owing to the aforementioned. For more insights into user account types on New Relic and associated privileges, please check out this [page](https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-user-management/user-type/#api-access).
266
271
 
272
+ ## Extended Usage
273
+
274
+ This module may be used to create a user or ingest key using the `create_access_keys_service` resource, and fetch the created key using `fetch_access_keys_service`, by performing a NerdGraph query under the hood, using the ID of the key created via the resource to fetch the created key.
275
+ Please refer\\
276
+ create access keys and fetch access keys for more info.
277
+
267
278
  ## Import
268
279
 
269
280
  Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`. `<key_type>`
@@ -277,12 +288,12 @@ class ApiAccessKey(pulumi.CustomResource):
277
288
 
278
289
  :param str resource_name: The name of the resource.
279
290
  :param pulumi.ResourceOptions opts: Options for the resource.
280
- :param pulumi.Input[int] account_id: The New Relic account ID of the account you wish to create the API access key.
291
+ :param pulumi.Input[str] account_id: The New Relic account ID of the account you wish to create the API access key.
281
292
  :param pulumi.Input[str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
282
293
  :param pulumi.Input[str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
283
294
  :param pulumi.Input[str] name: The name of the key.
284
295
  :param pulumi.Input[str] notes: Any notes about this ingest key.
285
- :param pulumi.Input[int] user_id: Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
296
+ :param pulumi.Input[str] user_id: Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
286
297
  """
287
298
  ...
288
299
  @overload
@@ -309,6 +320,12 @@ class ApiAccessKey(pulumi.CustomResource):
309
320
 
310
321
  > **WARNING:** Creating 'Ingest - License' and 'Ingest - Browser' keys using this resource is restricted to 'core' or 'full platform' New Relic user accounts. If you've signed up as a 'basic' user with New Relic, or have been added as a 'basic' user to your organization on New Relic, you would not be able to use your account to create 'Ingest' keys. If you see the message `"You do not have permission to create this key"` in the response of the API called by this resource, it could be owing to the aforementioned. For more insights into user account types on New Relic and associated privileges, please check out this [page](https://docs.newrelic.com/docs/accounts/accounts-billing/new-relic-one-user-management/user-type/#api-access).
311
322
 
323
+ ## Extended Usage
324
+
325
+ This module may be used to create a user or ingest key using the `create_access_keys_service` resource, and fetch the created key using `fetch_access_keys_service`, by performing a NerdGraph query under the hood, using the ID of the key created via the resource to fetch the created key.
326
+ Please refer\\
327
+ create access keys and fetch access keys for more info.
328
+
312
329
  ## Import
313
330
 
314
331
  Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`. `<key_type>`
@@ -335,12 +352,12 @@ class ApiAccessKey(pulumi.CustomResource):
335
352
  def _internal_init(__self__,
336
353
  resource_name: str,
337
354
  opts: Optional[pulumi.ResourceOptions] = None,
338
- account_id: Optional[pulumi.Input[int]] = None,
355
+ account_id: Optional[pulumi.Input[str]] = None,
339
356
  ingest_type: Optional[pulumi.Input[str]] = None,
340
357
  key_type: Optional[pulumi.Input[str]] = None,
341
358
  name: Optional[pulumi.Input[str]] = None,
342
359
  notes: Optional[pulumi.Input[str]] = None,
343
- user_id: Optional[pulumi.Input[int]] = None,
360
+ user_id: Optional[pulumi.Input[str]] = None,
344
361
  __props__=None):
345
362
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
346
363
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -373,13 +390,13 @@ class ApiAccessKey(pulumi.CustomResource):
373
390
  def get(resource_name: str,
374
391
  id: pulumi.Input[str],
375
392
  opts: Optional[pulumi.ResourceOptions] = None,
376
- account_id: Optional[pulumi.Input[int]] = None,
393
+ account_id: Optional[pulumi.Input[str]] = None,
377
394
  ingest_type: Optional[pulumi.Input[str]] = None,
378
395
  key: Optional[pulumi.Input[str]] = None,
379
396
  key_type: Optional[pulumi.Input[str]] = None,
380
397
  name: Optional[pulumi.Input[str]] = None,
381
398
  notes: Optional[pulumi.Input[str]] = None,
382
- user_id: Optional[pulumi.Input[int]] = None) -> 'ApiAccessKey':
399
+ user_id: Optional[pulumi.Input[str]] = None) -> 'ApiAccessKey':
383
400
  """
384
401
  Get an existing ApiAccessKey resource's state with the given name, id, and optional extra
385
402
  properties used to qualify the lookup.
@@ -387,13 +404,13 @@ class ApiAccessKey(pulumi.CustomResource):
387
404
  :param str resource_name: The unique name of the resulting resource.
388
405
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
389
406
  :param pulumi.ResourceOptions opts: Options for the resource.
390
- :param pulumi.Input[int] account_id: The New Relic account ID of the account you wish to create the API access key.
407
+ :param pulumi.Input[str] account_id: The New Relic account ID of the account you wish to create the API access key.
391
408
  :param pulumi.Input[str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
392
409
  :param pulumi.Input[str] key: The actual API key. This attribute is masked and not be visible in your terminal, CI, etc.
393
410
  :param pulumi.Input[str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
394
411
  :param pulumi.Input[str] name: The name of the key.
395
412
  :param pulumi.Input[str] notes: Any notes about this ingest key.
396
- :param pulumi.Input[int] user_id: Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
413
+ :param pulumi.Input[str] user_id: Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
397
414
  """
398
415
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
399
416
 
@@ -410,7 +427,7 @@ class ApiAccessKey(pulumi.CustomResource):
410
427
 
411
428
  @property
412
429
  @pulumi.getter(name="accountId")
413
- def account_id(self) -> pulumi.Output[int]:
430
+ def account_id(self) -> pulumi.Output[str]:
414
431
  """
415
432
  The New Relic account ID of the account you wish to create the API access key.
416
433
  """
@@ -458,7 +475,7 @@ class ApiAccessKey(pulumi.CustomResource):
458
475
 
459
476
  @property
460
477
  @pulumi.getter(name="userId")
461
- def user_id(self) -> pulumi.Output[int]:
478
+ def user_id(self) -> pulumi.Output[str]:
462
479
  """
463
480
  Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
464
481
  """