pulumi-newrelic 5.20.0a1709643785__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 +13 -4
  5. pulumi_newrelic/alert_channel.py +122 -101
  6. pulumi_newrelic/alert_condition.py +120 -109
  7. pulumi_newrelic/alert_muting_rule.py +130 -74
  8. pulumi_newrelic/alert_policy.py +88 -67
  9. pulumi_newrelic/alert_policy_channel.py +81 -68
  10. pulumi_newrelic/api_access_key.py +49 -52
  11. pulumi_newrelic/browser_application.py +79 -76
  12. pulumi_newrelic/cloud/_inputs.py +2527 -1082
  13. pulumi_newrelic/cloud/aws_govcloud_integrations.py +135 -130
  14. pulumi_newrelic/cloud/aws_govcloud_link_account.py +25 -18
  15. pulumi_newrelic/cloud/aws_integrations.py +300 -1324
  16. pulumi_newrelic/cloud/aws_link_account.py +25 -18
  17. pulumi_newrelic/cloud/azure_integrations.py +523 -481
  18. pulumi_newrelic/cloud/azure_link_account.py +36 -29
  19. pulumi_newrelic/cloud/gcp_integrations.py +343 -320
  20. pulumi_newrelic/cloud/gcp_link_account.py +25 -18
  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 +23 -16
  25. pulumi_newrelic/entity_tags.py +36 -31
  26. pulumi_newrelic/events_to_metrics_rule.py +27 -20
  27. pulumi_newrelic/get_account.py +24 -12
  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 -27
  31. pulumi_newrelic/get_authentication_domain.py +17 -9
  32. pulumi_newrelic/get_cloud_account.py +26 -14
  33. pulumi_newrelic/get_entity.py +90 -85
  34. pulumi_newrelic/get_group.py +58 -9
  35. pulumi_newrelic/get_key_transaction.py +109 -30
  36. pulumi_newrelic/get_notification_destination.py +64 -14
  37. pulumi_newrelic/get_obfuscation_expression.py +36 -24
  38. pulumi_newrelic/get_service_level_alert_helper.py +135 -105
  39. pulumi_newrelic/get_test_grok_pattern.py +29 -14
  40. pulumi_newrelic/get_user.py +17 -5
  41. pulumi_newrelic/group.py +5 -132
  42. pulumi_newrelic/infra_alert_condition.py +157 -140
  43. pulumi_newrelic/insights/_inputs.py +43 -0
  44. pulumi_newrelic/insights/event.py +50 -43
  45. pulumi_newrelic/insights/outputs.py +5 -0
  46. pulumi_newrelic/key_transaction.py +464 -0
  47. pulumi_newrelic/log_parsing_rule.py +29 -18
  48. pulumi_newrelic/monitor_downtime.py +215 -203
  49. pulumi_newrelic/notification_channel.py +387 -326
  50. pulumi_newrelic/notification_destination.py +248 -118
  51. pulumi_newrelic/nrql_alert_condition.py +353 -246
  52. pulumi_newrelic/nrql_drop_rule.py +57 -30
  53. pulumi_newrelic/obfuscation_expression.py +25 -18
  54. pulumi_newrelic/obfuscation_rule.py +40 -31
  55. pulumi_newrelic/one_dashboard.py +31 -26
  56. pulumi_newrelic/one_dashboard_json.py +21 -16
  57. pulumi_newrelic/one_dashboard_raw.py +112 -101
  58. pulumi_newrelic/outputs.py +2446 -245
  59. pulumi_newrelic/plugins/_inputs.py +145 -10
  60. pulumi_newrelic/plugins/application_settings.py +29 -20
  61. pulumi_newrelic/plugins/outputs.py +15 -10
  62. pulumi_newrelic/plugins/workload.py +285 -54
  63. pulumi_newrelic/provider.py +27 -33
  64. pulumi_newrelic/pulumi-plugin.json +2 -1
  65. pulumi_newrelic/service_level.py +193 -180
  66. pulumi_newrelic/synthetics/_inputs.py +159 -2
  67. pulumi_newrelic/synthetics/alert_condition.py +91 -78
  68. pulumi_newrelic/synthetics/broken_links_monitor.py +220 -93
  69. pulumi_newrelic/synthetics/cert_check_monitor.py +223 -94
  70. pulumi_newrelic/synthetics/get_private_location.py +34 -22
  71. pulumi_newrelic/synthetics/get_secure_credential.py +24 -12
  72. pulumi_newrelic/synthetics/monitor.py +352 -179
  73. pulumi_newrelic/synthetics/multi_location_alert_condition.py +109 -96
  74. pulumi_newrelic/synthetics/outputs.py +7 -2
  75. pulumi_newrelic/synthetics/private_location.py +27 -18
  76. pulumi_newrelic/synthetics/script_monitor.py +321 -168
  77. pulumi_newrelic/synthetics/secure_credential.py +25 -20
  78. pulumi_newrelic/synthetics/step_monitor.py +409 -98
  79. pulumi_newrelic/user.py +13 -6
  80. pulumi_newrelic/workflow.py +215 -184
  81. {pulumi_newrelic-5.20.0a1709643785.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.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/WHEEL +1 -1
  84. pulumi_newrelic-5.20.0a1709643785.dist-info/RECORD +0 -89
  85. {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.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,14 +131,14 @@ 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
 
@@ -143,21 +148,25 @@ class AlertPolicyChannel(pulumi.CustomResource):
143
148
  import pulumi
144
149
  import pulumi_newrelic as newrelic
145
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.
146
153
  example_policy = newrelic.get_alert_policy(name="my-alert-policy")
147
154
  # Creates an email alert channel.
148
- email_channel = newrelic.AlertChannel("emailChannel",
155
+ email_channel = newrelic.AlertChannel("email_channel",
156
+ name="bar",
149
157
  type="email",
150
- config=newrelic.AlertChannelConfigArgs(
151
- recipients="foo@example.com",
152
- include_json_attachment="1",
153
- ))
158
+ config={
159
+ "recipients": "foo@example.com",
160
+ "include_json_attachment": "1",
161
+ })
154
162
  # Creates a Slack alert channel.
155
- slack_channel = newrelic.AlertChannel("slackChannel",
163
+ slack_channel = newrelic.AlertChannel("slack_channel",
164
+ name="slack-channel-example",
156
165
  type="slack",
157
- config=newrelic.AlertChannelConfigArgs(
158
- channel="#example-channel",
159
- url="http://example-org.slack.com",
160
- ))
166
+ config={
167
+ "channel": "#example-channel",
168
+ "url": "http://example-org.slack.com",
169
+ })
161
170
  # Applies the created channels above to the alert policy
162
171
  # referenced at the top of the config.
163
172
  foo = newrelic.AlertPolicyChannel("foo",
@@ -173,15 +182,15 @@ class AlertPolicyChannel(pulumi.CustomResource):
173
182
  Alert policy channels can be imported using the following notation: `<policyID>:<channelID>:<channelID>`, e.g.
174
183
 
175
184
  ```sh
176
- $ pulumi import newrelic:index/alertPolicyChannel:AlertPolicyChannel foo 123456:3462754:2938324
185
+ $ pulumi import newrelic:index/alertPolicyChannel:AlertPolicyChannel foo 123456:3462754:2938324
177
186
  ```
178
- When importing `newrelic_alert_policy_channel` resource, the attribute `channel_ids`* will be set in your Terraform state. You can import multiple channels as long as those channel IDs are included as part of the import ID hash.
187
+ When importing `newrelic_alert_policy_channel` resource, the attribute `channel_ids`* will be set in your Terraform state. You can import multiple channels as long as those channel IDs are included as part of the import ID hash.
179
188
 
180
189
  :param str resource_name: The name of the resource.
181
190
  :param pulumi.ResourceOptions opts: Options for the resource.
182
- :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.
183
- :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.
184
- :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.
185
194
  """
186
195
  ...
187
196
  @overload
@@ -192,7 +201,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
192
201
  """
193
202
  Use this resource to map alert policies to alert channels in New Relic.
194
203
 
195
- > **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.
196
205
 
197
206
  ## Example Usage
198
207
 
@@ -202,21 +211,25 @@ class AlertPolicyChannel(pulumi.CustomResource):
202
211
  import pulumi
203
212
  import pulumi_newrelic as newrelic
204
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.
205
216
  example_policy = newrelic.get_alert_policy(name="my-alert-policy")
206
217
  # Creates an email alert channel.
207
- email_channel = newrelic.AlertChannel("emailChannel",
218
+ email_channel = newrelic.AlertChannel("email_channel",
219
+ name="bar",
208
220
  type="email",
209
- config=newrelic.AlertChannelConfigArgs(
210
- recipients="foo@example.com",
211
- include_json_attachment="1",
212
- ))
221
+ config={
222
+ "recipients": "foo@example.com",
223
+ "include_json_attachment": "1",
224
+ })
213
225
  # Creates a Slack alert channel.
214
- slack_channel = newrelic.AlertChannel("slackChannel",
226
+ slack_channel = newrelic.AlertChannel("slack_channel",
227
+ name="slack-channel-example",
215
228
  type="slack",
216
- config=newrelic.AlertChannelConfigArgs(
217
- channel="#example-channel",
218
- url="http://example-org.slack.com",
219
- ))
229
+ config={
230
+ "channel": "#example-channel",
231
+ "url": "http://example-org.slack.com",
232
+ })
220
233
  # Applies the created channels above to the alert policy
221
234
  # referenced at the top of the config.
222
235
  foo = newrelic.AlertPolicyChannel("foo",
@@ -232,9 +245,9 @@ class AlertPolicyChannel(pulumi.CustomResource):
232
245
  Alert policy channels can be imported using the following notation: `<policyID>:<channelID>:<channelID>`, e.g.
233
246
 
234
247
  ```sh
235
- $ pulumi import newrelic:index/alertPolicyChannel:AlertPolicyChannel foo 123456:3462754:2938324
248
+ $ pulumi import newrelic:index/alertPolicyChannel:AlertPolicyChannel foo 123456:3462754:2938324
236
249
  ```
237
- When importing `newrelic_alert_policy_channel` resource, the attribute `channel_ids`* will be set in your Terraform state. You can import multiple channels as long as those channel IDs are included as part of the import ID hash.
250
+ When importing `newrelic_alert_policy_channel` resource, the attribute `channel_ids`* will be set in your Terraform state. You can import multiple channels as long as those channel IDs are included as part of the import ID hash.
238
251
 
239
252
  :param str resource_name: The name of the resource.
240
253
  :param AlertPolicyChannelArgs args: The arguments to use to populate this resource's properties.
@@ -251,9 +264,9 @@ class AlertPolicyChannel(pulumi.CustomResource):
251
264
  def _internal_init(__self__,
252
265
  resource_name: str,
253
266
  opts: Optional[pulumi.ResourceOptions] = None,
254
- account_id: Optional[pulumi.Input[int]] = None,
255
- channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
256
- 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,
257
270
  __props__=None):
258
271
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
259
272
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -280,9 +293,9 @@ class AlertPolicyChannel(pulumi.CustomResource):
280
293
  def get(resource_name: str,
281
294
  id: pulumi.Input[str],
282
295
  opts: Optional[pulumi.ResourceOptions] = None,
283
- account_id: Optional[pulumi.Input[int]] = None,
284
- channel_ids: Optional[pulumi.Input[Sequence[pulumi.Input[int]]]] = None,
285
- 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':
286
299
  """
287
300
  Get an existing AlertPolicyChannel resource's state with the given name, id, and optional extra
288
301
  properties used to qualify the lookup.
@@ -290,9 +303,9 @@ class AlertPolicyChannel(pulumi.CustomResource):
290
303
  :param str resource_name: The unique name of the resulting resource.
291
304
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
292
305
  :param pulumi.ResourceOptions opts: Options for the resource.
293
- :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.
294
- :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.
295
- :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.
296
309
  """
297
310
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
298
311
 
@@ -305,7 +318,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
305
318
 
306
319
  @property
307
320
  @pulumi.getter(name="accountId")
308
- def account_id(self) -> pulumi.Output[int]:
321
+ def account_id(self) -> pulumi.Output[str]:
309
322
  """
310
323
  Determines the New Relic account where the alert policy channel will be created. Defaults to the account associated with the API key used.
311
324
  """
@@ -313,7 +326,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
313
326
 
314
327
  @property
315
328
  @pulumi.getter(name="channelIds")
316
- def channel_ids(self) -> pulumi.Output[Sequence[int]]:
329
+ def channel_ids(self) -> pulumi.Output[Sequence[str]]:
317
330
  """
318
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.
319
332
  """
@@ -321,7 +334,7 @@ class AlertPolicyChannel(pulumi.CustomResource):
321
334
 
322
335
  @property
323
336
  @pulumi.getter(name="policyId")
324
- def policy_id(self) -> pulumi.Output[int]:
337
+ def policy_id(self) -> pulumi.Output[str]:
325
338
  """
326
339
  The ID of the policy.
327
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:
@@ -262,37 +267,33 @@ class ApiAccessKey(pulumi.CustomResource):
262
267
 
263
268
  ## Example Usage
264
269
 
265
- ```python
266
- import pulumi
267
- import pulumi_newrelic as newrelic
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).
268
271
 
269
- foobar = newrelic.ApiAccessKey("foobar",
270
- account_id=1234567,
271
- ingest_type="LICENSE",
272
- key_type="INGEST",
273
- notes="To be used with service X")
274
- ```
272
+ ## Extended Usage
275
273
 
276
- > **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).
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
277
 
278
278
  ## Import
279
279
 
280
- Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`. `<key_type>` will be either `INGEST` or `USER`.
280
+ Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`. `<key_type>`
281
+ will be either `INGEST` or `USER`.
281
282
 
282
283
  For example:
283
284
 
284
285
  ```sh
285
- $ pulumi import newrelic:index/apiAccessKey:ApiAccessKey foobar "1234567:INGEST"
286
+ $ pulumi import newrelic:index/apiAccessKey:ApiAccessKey foobar "1234567:INGEST"
286
287
  ```
287
288
 
288
289
  :param str resource_name: The name of the resource.
289
290
  :param pulumi.ResourceOptions opts: Options for the resource.
290
- :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.
291
292
  :param pulumi.Input[str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
292
293
  :param pulumi.Input[str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
293
294
  :param pulumi.Input[str] name: The name of the key.
294
295
  :param pulumi.Input[str] notes: Any notes about this ingest key.
295
- :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.
296
297
  """
297
298
  ...
298
299
  @overload
@@ -317,27 +318,23 @@ class ApiAccessKey(pulumi.CustomResource):
317
318
 
318
319
  ## Example Usage
319
320
 
320
- ```python
321
- import pulumi
322
- import pulumi_newrelic as newrelic
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).
323
322
 
324
- foobar = newrelic.ApiAccessKey("foobar",
325
- account_id=1234567,
326
- ingest_type="LICENSE",
327
- key_type="INGEST",
328
- notes="To be used with service X")
329
- ```
323
+ ## Extended Usage
330
324
 
331
- > **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).
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.
332
328
 
333
329
  ## Import
334
330
 
335
- Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`. `<key_type>` will be either `INGEST` or `USER`.
331
+ Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`. `<key_type>`
332
+ will be either `INGEST` or `USER`.
336
333
 
337
334
  For example:
338
335
 
339
336
  ```sh
340
- $ pulumi import newrelic:index/apiAccessKey:ApiAccessKey foobar "1234567:INGEST"
337
+ $ pulumi import newrelic:index/apiAccessKey:ApiAccessKey foobar "1234567:INGEST"
341
338
  ```
342
339
 
343
340
  :param str resource_name: The name of the resource.
@@ -355,12 +352,12 @@ class ApiAccessKey(pulumi.CustomResource):
355
352
  def _internal_init(__self__,
356
353
  resource_name: str,
357
354
  opts: Optional[pulumi.ResourceOptions] = None,
358
- account_id: Optional[pulumi.Input[int]] = None,
355
+ account_id: Optional[pulumi.Input[str]] = None,
359
356
  ingest_type: Optional[pulumi.Input[str]] = None,
360
357
  key_type: Optional[pulumi.Input[str]] = None,
361
358
  name: Optional[pulumi.Input[str]] = None,
362
359
  notes: Optional[pulumi.Input[str]] = None,
363
- user_id: Optional[pulumi.Input[int]] = None,
360
+ user_id: Optional[pulumi.Input[str]] = None,
364
361
  __props__=None):
365
362
  opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
366
363
  if not isinstance(opts, pulumi.ResourceOptions):
@@ -393,13 +390,13 @@ class ApiAccessKey(pulumi.CustomResource):
393
390
  def get(resource_name: str,
394
391
  id: pulumi.Input[str],
395
392
  opts: Optional[pulumi.ResourceOptions] = None,
396
- account_id: Optional[pulumi.Input[int]] = None,
393
+ account_id: Optional[pulumi.Input[str]] = None,
397
394
  ingest_type: Optional[pulumi.Input[str]] = None,
398
395
  key: Optional[pulumi.Input[str]] = None,
399
396
  key_type: Optional[pulumi.Input[str]] = None,
400
397
  name: Optional[pulumi.Input[str]] = None,
401
398
  notes: Optional[pulumi.Input[str]] = None,
402
- user_id: Optional[pulumi.Input[int]] = None) -> 'ApiAccessKey':
399
+ user_id: Optional[pulumi.Input[str]] = None) -> 'ApiAccessKey':
403
400
  """
404
401
  Get an existing ApiAccessKey resource's state with the given name, id, and optional extra
405
402
  properties used to qualify the lookup.
@@ -407,13 +404,13 @@ class ApiAccessKey(pulumi.CustomResource):
407
404
  :param str resource_name: The unique name of the resulting resource.
408
405
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
409
406
  :param pulumi.ResourceOptions opts: Options for the resource.
410
- :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.
411
408
  :param pulumi.Input[str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
412
409
  :param pulumi.Input[str] key: The actual API key. This attribute is masked and not be visible in your terminal, CI, etc.
413
410
  :param pulumi.Input[str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
414
411
  :param pulumi.Input[str] name: The name of the key.
415
412
  :param pulumi.Input[str] notes: Any notes about this ingest key.
416
- :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.
417
414
  """
418
415
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
419
416
 
@@ -430,7 +427,7 @@ class ApiAccessKey(pulumi.CustomResource):
430
427
 
431
428
  @property
432
429
  @pulumi.getter(name="accountId")
433
- def account_id(self) -> pulumi.Output[int]:
430
+ def account_id(self) -> pulumi.Output[str]:
434
431
  """
435
432
  The New Relic account ID of the account you wish to create the API access key.
436
433
  """
@@ -478,7 +475,7 @@ class ApiAccessKey(pulumi.CustomResource):
478
475
 
479
476
  @property
480
477
  @pulumi.getter(name="userId")
481
- def user_id(self) -> pulumi.Output[int]:
478
+ def user_id(self) -> pulumi.Output[str]:
482
479
  """
483
480
  Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
484
481
  """