pulumi-newrelic 5.53.0a1757744311__py3-none-any.whl → 5.53.0a1758684614__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-newrelic might be problematic. Click here for more details.

@@ -19,23 +19,25 @@ __all__ = ['ApiAccessKeyArgs', 'ApiAccessKey']
19
19
  @pulumi.input_type
20
20
  class ApiAccessKeyArgs:
21
21
  def __init__(__self__, *,
22
- account_id: pulumi.Input[_builtins.str],
23
22
  key_type: pulumi.Input[_builtins.str],
23
+ account_id: Optional[pulumi.Input[_builtins.str]] = None,
24
24
  ingest_type: Optional[pulumi.Input[_builtins.str]] = None,
25
25
  name: Optional[pulumi.Input[_builtins.str]] = None,
26
26
  notes: Optional[pulumi.Input[_builtins.str]] = None,
27
27
  user_id: Optional[pulumi.Input[_builtins.str]] = None):
28
28
  """
29
29
  The set of arguments for constructing a ApiAccessKey resource.
30
- :param pulumi.Input[_builtins.str] account_id: The New Relic account ID of the account you wish to create the API access key.
31
- :param pulumi.Input[_builtins.str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
32
- :param pulumi.Input[_builtins.str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
33
- :param pulumi.Input[_builtins.str] name: The name of the key.
34
- :param pulumi.Input[_builtins.str] notes: Any notes about this ingest key.
35
- :param pulumi.Input[_builtins.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.
36
- """
37
- pulumi.set(__self__, "account_id", account_id)
30
+ :param pulumi.Input[_builtins.str] key_type: The type of API key to create. Valid options are `INGEST` or `USER` (case-sensitive).
31
+ - If `key_type` is `INGEST`, then `ingest_type` must be specified.
32
+ - If `key_type` is `USER`, then `user_id` must be specified.
33
+ :param pulumi.Input[_builtins.str] account_id: The New Relic account ID where the API access key will be created.
34
+ :param pulumi.Input[_builtins.str] ingest_type: Required if `key_type` is `INGEST`. Valid options are `BROWSER` or `LICENSE` (case-sensitive).
35
+ :param pulumi.Input[_builtins.str] notes: Additional notes about the API access key.
36
+ :param pulumi.Input[_builtins.str] user_id: Required if `key_type` is `USER`. The New Relic user ID for which the API access key will be created.
37
+ """
38
38
  pulumi.set(__self__, "key_type", key_type)
39
+ if account_id is not None:
40
+ pulumi.set(__self__, "account_id", account_id)
39
41
  if ingest_type is not None:
40
42
  pulumi.set(__self__, "ingest_type", ingest_type)
41
43
  if name is not None:
@@ -45,23 +47,13 @@ class ApiAccessKeyArgs:
45
47
  if user_id is not None:
46
48
  pulumi.set(__self__, "user_id", user_id)
47
49
 
48
- @_builtins.property
49
- @pulumi.getter(name="accountId")
50
- def account_id(self) -> pulumi.Input[_builtins.str]:
51
- """
52
- The New Relic account ID of the account you wish to create the API access key.
53
- """
54
- return pulumi.get(self, "account_id")
55
-
56
- @account_id.setter
57
- def account_id(self, value: pulumi.Input[_builtins.str]):
58
- pulumi.set(self, "account_id", value)
59
-
60
50
  @_builtins.property
61
51
  @pulumi.getter(name="keyType")
62
52
  def key_type(self) -> pulumi.Input[_builtins.str]:
63
53
  """
64
- What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
54
+ The type of API key to create. Valid options are `INGEST` or `USER` (case-sensitive).
55
+ - If `key_type` is `INGEST`, then `ingest_type` must be specified.
56
+ - If `key_type` is `USER`, then `user_id` must be specified.
65
57
  """
66
58
  return pulumi.get(self, "key_type")
67
59
 
@@ -69,11 +61,23 @@ class ApiAccessKeyArgs:
69
61
  def key_type(self, value: pulumi.Input[_builtins.str]):
70
62
  pulumi.set(self, "key_type", value)
71
63
 
64
+ @_builtins.property
65
+ @pulumi.getter(name="accountId")
66
+ def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
67
+ """
68
+ The New Relic account ID where the API access key will be created.
69
+ """
70
+ return pulumi.get(self, "account_id")
71
+
72
+ @account_id.setter
73
+ def account_id(self, value: Optional[pulumi.Input[_builtins.str]]):
74
+ pulumi.set(self, "account_id", value)
75
+
72
76
  @_builtins.property
73
77
  @pulumi.getter(name="ingestType")
74
78
  def ingest_type(self) -> Optional[pulumi.Input[_builtins.str]]:
75
79
  """
76
- Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
80
+ Required if `key_type` is `INGEST`. Valid options are `BROWSER` or `LICENSE` (case-sensitive).
77
81
  """
78
82
  return pulumi.get(self, "ingest_type")
79
83
 
@@ -84,9 +88,6 @@ class ApiAccessKeyArgs:
84
88
  @_builtins.property
85
89
  @pulumi.getter
86
90
  def name(self) -> Optional[pulumi.Input[_builtins.str]]:
87
- """
88
- The name of the key.
89
- """
90
91
  return pulumi.get(self, "name")
91
92
 
92
93
  @name.setter
@@ -97,7 +98,7 @@ class ApiAccessKeyArgs:
97
98
  @pulumi.getter
98
99
  def notes(self) -> Optional[pulumi.Input[_builtins.str]]:
99
100
  """
100
- Any notes about this ingest key.
101
+ Additional notes about the API access key.
101
102
  """
102
103
  return pulumi.get(self, "notes")
103
104
 
@@ -109,7 +110,7 @@ class ApiAccessKeyArgs:
109
110
  @pulumi.getter(name="userId")
110
111
  def user_id(self) -> Optional[pulumi.Input[_builtins.str]]:
111
112
  """
112
- Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
113
+ Required if `key_type` is `USER`. The New Relic user ID for which the API access key will be created.
113
114
  """
114
115
  return pulumi.get(self, "user_id")
115
116
 
@@ -130,13 +131,15 @@ class _ApiAccessKeyState:
130
131
  user_id: Optional[pulumi.Input[_builtins.str]] = None):
131
132
  """
132
133
  Input properties used for looking up and filtering ApiAccessKey resources.
133
- :param pulumi.Input[_builtins.str] account_id: The New Relic account ID of the account you wish to create the API access key.
134
- :param pulumi.Input[_builtins.str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
135
- :param pulumi.Input[_builtins.str] key: The actual API key. This attribute is masked and not be visible in your terminal, CI, etc.
136
- :param pulumi.Input[_builtins.str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
137
- :param pulumi.Input[_builtins.str] name: The name of the key.
138
- :param pulumi.Input[_builtins.str] notes: Any notes about this ingest key.
139
- :param pulumi.Input[_builtins.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.
134
+ :param pulumi.Input[_builtins.str] account_id: The New Relic account ID where the API access key will be created.
135
+ :param pulumi.Input[_builtins.str] ingest_type: Required if `key_type` is `INGEST`. Valid options are `BROWSER` or `LICENSE` (case-sensitive).
136
+ :param pulumi.Input[_builtins.str] key: The actual API key.
137
+ - <span style="color:tomato;">It is important to exercise caution when exporting the value of `key`, as it is sensitive information</span>. Avoid logging or exposing it inappropriately.
138
+ :param pulumi.Input[_builtins.str] key_type: The type of API key to create. Valid options are `INGEST` or `USER` (case-sensitive).
139
+ - If `key_type` is `INGEST`, then `ingest_type` must be specified.
140
+ - If `key_type` is `USER`, then `user_id` must be specified.
141
+ :param pulumi.Input[_builtins.str] notes: Additional notes about the API access key.
142
+ :param pulumi.Input[_builtins.str] user_id: Required if `key_type` is `USER`. The New Relic user ID for which the API access key will be created.
140
143
  """
141
144
  if account_id is not None:
142
145
  pulumi.set(__self__, "account_id", account_id)
@@ -157,7 +160,7 @@ class _ApiAccessKeyState:
157
160
  @pulumi.getter(name="accountId")
158
161
  def account_id(self) -> Optional[pulumi.Input[_builtins.str]]:
159
162
  """
160
- The New Relic account ID of the account you wish to create the API access key.
163
+ The New Relic account ID where the API access key will be created.
161
164
  """
162
165
  return pulumi.get(self, "account_id")
163
166
 
@@ -169,7 +172,7 @@ class _ApiAccessKeyState:
169
172
  @pulumi.getter(name="ingestType")
170
173
  def ingest_type(self) -> Optional[pulumi.Input[_builtins.str]]:
171
174
  """
172
- Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
175
+ Required if `key_type` is `INGEST`. Valid options are `BROWSER` or `LICENSE` (case-sensitive).
173
176
  """
174
177
  return pulumi.get(self, "ingest_type")
175
178
 
@@ -181,7 +184,8 @@ class _ApiAccessKeyState:
181
184
  @pulumi.getter
182
185
  def key(self) -> Optional[pulumi.Input[_builtins.str]]:
183
186
  """
184
- The actual API key. This attribute is masked and not be visible in your terminal, CI, etc.
187
+ The actual API key.
188
+ - <span style="color:tomato;">It is important to exercise caution when exporting the value of `key`, as it is sensitive information</span>. Avoid logging or exposing it inappropriately.
185
189
  """
186
190
  return pulumi.get(self, "key")
187
191
 
@@ -193,7 +197,9 @@ class _ApiAccessKeyState:
193
197
  @pulumi.getter(name="keyType")
194
198
  def key_type(self) -> Optional[pulumi.Input[_builtins.str]]:
195
199
  """
196
- What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
200
+ The type of API key to create. Valid options are `INGEST` or `USER` (case-sensitive).
201
+ - If `key_type` is `INGEST`, then `ingest_type` must be specified.
202
+ - If `key_type` is `USER`, then `user_id` must be specified.
197
203
  """
198
204
  return pulumi.get(self, "key_type")
199
205
 
@@ -204,9 +210,6 @@ class _ApiAccessKeyState:
204
210
  @_builtins.property
205
211
  @pulumi.getter
206
212
  def name(self) -> Optional[pulumi.Input[_builtins.str]]:
207
- """
208
- The name of the key.
209
- """
210
213
  return pulumi.get(self, "name")
211
214
 
212
215
  @name.setter
@@ -217,7 +220,7 @@ class _ApiAccessKeyState:
217
220
  @pulumi.getter
218
221
  def notes(self) -> Optional[pulumi.Input[_builtins.str]]:
219
222
  """
220
- Any notes about this ingest key.
223
+ Additional notes about the API access key.
221
224
  """
222
225
  return pulumi.get(self, "notes")
223
226
 
@@ -229,7 +232,7 @@ class _ApiAccessKeyState:
229
232
  @pulumi.getter(name="userId")
230
233
  def user_id(self) -> Optional[pulumi.Input[_builtins.str]]:
231
234
  """
232
- Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
235
+ Required if `key_type` is `USER`. The New Relic user ID for which the API access key will be created.
233
236
  """
234
237
  return pulumi.get(self, "user_id")
235
238
 
@@ -254,23 +257,39 @@ class ApiAccessKey(pulumi.CustomResource):
254
257
  """
255
258
  ## Import
256
259
 
257
- Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`. `<key_type>`
258
- will be either `INGEST` or `USER`.
260
+ Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`, where `<key_type>` is either `INGEST` or `USER`. Refer to the considerations listed in the Important Considerations section above regarding limitations on importing the actual key value.
259
261
 
260
262
  For example:
261
263
 
262
264
  ```sh
263
- $ pulumi import newrelic:index/apiAccessKey:ApiAccessKey foobar "1234567:INGEST"
265
+ $ pulumi import newrelic:index/apiAccessKey:ApiAccessKey foobar "131313133A331313130B5F13DF01313FDB13B13133EE5E133D13EAAB3A3C13D3:INGEST"
264
266
  ```
265
267
 
268
+ For customers using Terraform v1.5 and above, it is recommended to use the `import {}` block in your Terraform configuration. This allows Terraform to generate the resource configuration automatically during the import process by running a `pulumi preview -generate-config-out=<filename>.tf`, reducing manual effort and ensuring accuracy.
269
+
270
+ For example:
271
+
272
+ hcl
273
+
274
+ import {
275
+
276
+ id = "131313133A331313130B5F13DF01313FDB13B13133EE5E133D13EAAB3A3C13D3:INGEST"
277
+
278
+ to = newrelic_api_access_key.foobar
279
+
280
+ }
281
+
282
+ This approach simplifies the import process and ensures that the resource configuration aligns with the imported state.
283
+
266
284
  :param str resource_name: The name of the resource.
267
285
  :param pulumi.ResourceOptions opts: Options for the resource.
268
- :param pulumi.Input[_builtins.str] account_id: The New Relic account ID of the account you wish to create the API access key.
269
- :param pulumi.Input[_builtins.str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
270
- :param pulumi.Input[_builtins.str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
271
- :param pulumi.Input[_builtins.str] name: The name of the key.
272
- :param pulumi.Input[_builtins.str] notes: Any notes about this ingest key.
273
- :param pulumi.Input[_builtins.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
+ :param pulumi.Input[_builtins.str] account_id: The New Relic account ID where the API access key will be created.
287
+ :param pulumi.Input[_builtins.str] ingest_type: Required if `key_type` is `INGEST`. Valid options are `BROWSER` or `LICENSE` (case-sensitive).
288
+ :param pulumi.Input[_builtins.str] key_type: The type of API key to create. Valid options are `INGEST` or `USER` (case-sensitive).
289
+ - If `key_type` is `INGEST`, then `ingest_type` must be specified.
290
+ - If `key_type` is `USER`, then `user_id` must be specified.
291
+ :param pulumi.Input[_builtins.str] notes: Additional notes about the API access key.
292
+ :param pulumi.Input[_builtins.str] user_id: Required if `key_type` is `USER`. The New Relic user ID for which the API access key will be created.
274
293
  """
275
294
  ...
276
295
  @overload
@@ -281,15 +300,30 @@ class ApiAccessKey(pulumi.CustomResource):
281
300
  """
282
301
  ## Import
283
302
 
284
- Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`. `<key_type>`
285
- will be either `INGEST` or `USER`.
303
+ Existing API access keys can be imported using a composite ID of `<api_access_key_id>:<key_type>`, where `<key_type>` is either `INGEST` or `USER`. Refer to the considerations listed in the Important Considerations section above regarding limitations on importing the actual key value.
286
304
 
287
305
  For example:
288
306
 
289
307
  ```sh
290
- $ pulumi import newrelic:index/apiAccessKey:ApiAccessKey foobar "1234567:INGEST"
308
+ $ pulumi import newrelic:index/apiAccessKey:ApiAccessKey foobar "131313133A331313130B5F13DF01313FDB13B13133EE5E133D13EAAB3A3C13D3:INGEST"
291
309
  ```
292
310
 
311
+ For customers using Terraform v1.5 and above, it is recommended to use the `import {}` block in your Terraform configuration. This allows Terraform to generate the resource configuration automatically during the import process by running a `pulumi preview -generate-config-out=<filename>.tf`, reducing manual effort and ensuring accuracy.
312
+
313
+ For example:
314
+
315
+ hcl
316
+
317
+ import {
318
+
319
+ id = "131313133A331313130B5F13DF01313FDB13B13133EE5E133D13EAAB3A3C13D3:INGEST"
320
+
321
+ to = newrelic_api_access_key.foobar
322
+
323
+ }
324
+
325
+ This approach simplifies the import process and ensures that the resource configuration aligns with the imported state.
326
+
293
327
  :param str resource_name: The name of the resource.
294
328
  :param ApiAccessKeyArgs args: The arguments to use to populate this resource's properties.
295
329
  :param pulumi.ResourceOptions opts: Options for the resource.
@@ -320,8 +354,6 @@ class ApiAccessKey(pulumi.CustomResource):
320
354
  raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
321
355
  __props__ = ApiAccessKeyArgs.__new__(ApiAccessKeyArgs)
322
356
 
323
- if account_id is None and not opts.urn:
324
- raise TypeError("Missing required property 'account_id'")
325
357
  __props__.__dict__["account_id"] = account_id
326
358
  __props__.__dict__["ingest_type"] = ingest_type
327
359
  if key_type is None and not opts.urn:
@@ -331,8 +363,6 @@ class ApiAccessKey(pulumi.CustomResource):
331
363
  __props__.__dict__["notes"] = notes
332
364
  __props__.__dict__["user_id"] = user_id
333
365
  __props__.__dict__["key"] = None
334
- secret_opts = pulumi.ResourceOptions(additional_secret_outputs=["key"])
335
- opts = pulumi.ResourceOptions.merge(opts, secret_opts)
336
366
  super(ApiAccessKey, __self__).__init__(
337
367
  'newrelic:index/apiAccessKey:ApiAccessKey',
338
368
  resource_name,
@@ -357,13 +387,15 @@ class ApiAccessKey(pulumi.CustomResource):
357
387
  :param str resource_name: The unique name of the resulting resource.
358
388
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
359
389
  :param pulumi.ResourceOptions opts: Options for the resource.
360
- :param pulumi.Input[_builtins.str] account_id: The New Relic account ID of the account you wish to create the API access key.
361
- :param pulumi.Input[_builtins.str] ingest_type: Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
362
- :param pulumi.Input[_builtins.str] key: The actual API key. This attribute is masked and not be visible in your terminal, CI, etc.
363
- :param pulumi.Input[_builtins.str] key_type: What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
364
- :param pulumi.Input[_builtins.str] name: The name of the key.
365
- :param pulumi.Input[_builtins.str] notes: Any notes about this ingest key.
366
- :param pulumi.Input[_builtins.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.
390
+ :param pulumi.Input[_builtins.str] account_id: The New Relic account ID where the API access key will be created.
391
+ :param pulumi.Input[_builtins.str] ingest_type: Required if `key_type` is `INGEST`. Valid options are `BROWSER` or `LICENSE` (case-sensitive).
392
+ :param pulumi.Input[_builtins.str] key: The actual API key.
393
+ - <span style="color:tomato;">It is important to exercise caution when exporting the value of `key`, as it is sensitive information</span>. Avoid logging or exposing it inappropriately.
394
+ :param pulumi.Input[_builtins.str] key_type: The type of API key to create. Valid options are `INGEST` or `USER` (case-sensitive).
395
+ - If `key_type` is `INGEST`, then `ingest_type` must be specified.
396
+ - If `key_type` is `USER`, then `user_id` must be specified.
397
+ :param pulumi.Input[_builtins.str] notes: Additional notes about the API access key.
398
+ :param pulumi.Input[_builtins.str] user_id: Required if `key_type` is `USER`. The New Relic user ID for which the API access key will be created.
367
399
  """
368
400
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
369
401
 
@@ -380,9 +412,9 @@ class ApiAccessKey(pulumi.CustomResource):
380
412
 
381
413
  @_builtins.property
382
414
  @pulumi.getter(name="accountId")
383
- def account_id(self) -> pulumi.Output[_builtins.str]:
415
+ def account_id(self) -> pulumi.Output[Optional[_builtins.str]]:
384
416
  """
385
- The New Relic account ID of the account you wish to create the API access key.
417
+ The New Relic account ID where the API access key will be created.
386
418
  """
387
419
  return pulumi.get(self, "account_id")
388
420
 
@@ -390,7 +422,7 @@ class ApiAccessKey(pulumi.CustomResource):
390
422
  @pulumi.getter(name="ingestType")
391
423
  def ingest_type(self) -> pulumi.Output[_builtins.str]:
392
424
  """
393
- Required if `key_type = INGEST`. Valid options are `BROWSER` or `LICENSE`, case-sensitive.
425
+ Required if `key_type` is `INGEST`. Valid options are `BROWSER` or `LICENSE` (case-sensitive).
394
426
  """
395
427
  return pulumi.get(self, "ingest_type")
396
428
 
@@ -398,7 +430,8 @@ class ApiAccessKey(pulumi.CustomResource):
398
430
  @pulumi.getter
399
431
  def key(self) -> pulumi.Output[_builtins.str]:
400
432
  """
401
- The actual API key. This attribute is masked and not be visible in your terminal, CI, etc.
433
+ The actual API key.
434
+ - <span style="color:tomato;">It is important to exercise caution when exporting the value of `key`, as it is sensitive information</span>. Avoid logging or exposing it inappropriately.
402
435
  """
403
436
  return pulumi.get(self, "key")
404
437
 
@@ -406,23 +439,22 @@ class ApiAccessKey(pulumi.CustomResource):
406
439
  @pulumi.getter(name="keyType")
407
440
  def key_type(self) -> pulumi.Output[_builtins.str]:
408
441
  """
409
- What type of API key to create. Valid options are `INGEST` or `USER`, case-sensitive.
442
+ The type of API key to create. Valid options are `INGEST` or `USER` (case-sensitive).
443
+ - If `key_type` is `INGEST`, then `ingest_type` must be specified.
444
+ - If `key_type` is `USER`, then `user_id` must be specified.
410
445
  """
411
446
  return pulumi.get(self, "key_type")
412
447
 
413
448
  @_builtins.property
414
449
  @pulumi.getter
415
450
  def name(self) -> pulumi.Output[_builtins.str]:
416
- """
417
- The name of the key.
418
- """
419
451
  return pulumi.get(self, "name")
420
452
 
421
453
  @_builtins.property
422
454
  @pulumi.getter
423
455
  def notes(self) -> pulumi.Output[_builtins.str]:
424
456
  """
425
- Any notes about this ingest key.
457
+ Additional notes about the API access key.
426
458
  """
427
459
  return pulumi.get(self, "notes")
428
460
 
@@ -430,7 +462,7 @@ class ApiAccessKey(pulumi.CustomResource):
430
462
  @pulumi.getter(name="userId")
431
463
  def user_id(self) -> pulumi.Output[_builtins.str]:
432
464
  """
433
- Required if `key_type = USER`. The New Relic user ID yous wish to create the API access key for in an account.
465
+ Required if `key_type` is `USER`. The New Relic user ID for which the API access key will be created.
434
466
  """
435
467
  return pulumi.get(self, "user_id")
436
468
 
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "resource": true,
3
3
  "name": "newrelic",
4
- "version": "5.53.0-alpha.1757744311"
4
+ "version": "5.53.0-alpha.1758684614"
5
5
  }
@@ -812,6 +812,37 @@ class ScriptMonitor(pulumi.CustomResource):
812
812
  }])
813
813
  ```
814
814
 
815
+ ### Create a monitor and a secure credential
816
+
817
+ The following example shows how to use `depends_on` to create a monitor that uses a new secure credential.
818
+ The `depends_on` creates an explicit dependency between resources to ensure that the secure credential is created before the monitor that uses it.
819
+
820
+ > **NOTE:** Use the `depends_on` when you are creating both monitor and its secure credentials together.
821
+
822
+ ##### Type: `SCRIPT_BROWSER`
823
+
824
+ ```python
825
+ import pulumi
826
+ import pulumi_newrelic as newrelic
827
+
828
+ example_credential = newrelic.synthetics.SecureCredential("example_credential",
829
+ key="TEST_SECURE_CREDENTIAL",
830
+ value="some_value")
831
+ example_script_monitor = newrelic.synthetics.ScriptMonitor("example_script_monitor",
832
+ name="script_monitor",
833
+ type="SCRIPT_BROWSER",
834
+ period="EVERY_HOUR",
835
+ locations_publics=["US_EAST_1"],
836
+ status="ENABLED",
837
+ script=\"\"\" var assert = require('assert');
838
+ var secureCredential = $secure.TEST_SECURE_CREDENTIAL;
839
+ \"\"\",
840
+ script_language="JAVASCRIPT",
841
+ runtime_type="CHROME_BROWSER",
842
+ runtime_type_version="100",
843
+ opts = pulumi.ResourceOptions(depends_on=[example_credential]))
844
+ ```
845
+
815
846
  ## Import
816
847
 
817
848
  Synthetics monitor scripts can be imported using the `guid`, e.g.
@@ -982,6 +1013,37 @@ class ScriptMonitor(pulumi.CustomResource):
982
1013
  }])
983
1014
  ```
984
1015
 
1016
+ ### Create a monitor and a secure credential
1017
+
1018
+ The following example shows how to use `depends_on` to create a monitor that uses a new secure credential.
1019
+ The `depends_on` creates an explicit dependency between resources to ensure that the secure credential is created before the monitor that uses it.
1020
+
1021
+ > **NOTE:** Use the `depends_on` when you are creating both monitor and its secure credentials together.
1022
+
1023
+ ##### Type: `SCRIPT_BROWSER`
1024
+
1025
+ ```python
1026
+ import pulumi
1027
+ import pulumi_newrelic as newrelic
1028
+
1029
+ example_credential = newrelic.synthetics.SecureCredential("example_credential",
1030
+ key="TEST_SECURE_CREDENTIAL",
1031
+ value="some_value")
1032
+ example_script_monitor = newrelic.synthetics.ScriptMonitor("example_script_monitor",
1033
+ name="script_monitor",
1034
+ type="SCRIPT_BROWSER",
1035
+ period="EVERY_HOUR",
1036
+ locations_publics=["US_EAST_1"],
1037
+ status="ENABLED",
1038
+ script=\"\"\" var assert = require('assert');
1039
+ var secureCredential = $secure.TEST_SECURE_CREDENTIAL;
1040
+ \"\"\",
1041
+ script_language="JAVASCRIPT",
1042
+ runtime_type="CHROME_BROWSER",
1043
+ runtime_type_version="100",
1044
+ opts = pulumi.ResourceOptions(depends_on=[example_credential]))
1045
+ ```
1046
+
985
1047
  ## Import
986
1048
 
987
1049
  Synthetics monitor scripts can be imported using the `guid`, e.g.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pulumi_newrelic
3
- Version: 5.53.0a1757744311
3
+ Version: 5.53.0a1758684614
4
4
  Summary: A Pulumi package for creating and managing New Relic resources.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://pulumi.io
@@ -7,7 +7,7 @@ pulumi_newrelic/alert_condition.py,sha256=UAab2yQ1jGukHc_KwW-bqybNmfjSgRXw5KHx8A
7
7
  pulumi_newrelic/alert_muting_rule.py,sha256=PcduG6-843oqqH0KTj7med_U9h-H8bQf8rDXF2Mcxe0,23720
8
8
  pulumi_newrelic/alert_policy.py,sha256=j7kwAyo26WTjn3WYjbRiZtNer761c9NAY4fgs2Zq9IE,27020
9
9
  pulumi_newrelic/alert_policy_channel.py,sha256=HRsldpJvlCriX_ORNIi8HECVDZwELZWxVc3p5k5BzVo,16827
10
- pulumi_newrelic/api_access_key.py,sha256=poh-h35pCTH0dD739Ne5xxkIXLeiUg_2SCr4E8jUfmY,19023
10
+ pulumi_newrelic/api_access_key.py,sha256=L1cKF2rOcA_xDuXU2zrVi4e6r28VRDEEA27kvBBgqaU,21654
11
11
  pulumi_newrelic/browser_application.py,sha256=X-9hxkceZUKksFgis9Sk0xxiyeU5E80xXLcgMAb27V4,22410
12
12
  pulumi_newrelic/data_partition_rule.py,sha256=trKw0gNOAVf7AVp7bHtpJuyVxGJbOFkx9NZz_YF0o1o,21789
13
13
  pulumi_newrelic/entity_tags.py,sha256=HyxogjoTyc9jBnvUSltxGjK7JdRqrbAfm5DUpcTd1NE,10549
@@ -43,7 +43,7 @@ pulumi_newrelic/one_dashboard_raw.py,sha256=bTp__xyOtRYfwLR81YQLYyi_9NQNpTee7B_d
43
43
  pulumi_newrelic/outputs.py,sha256=lTP4XwC_1Mjxk0x2AQcZGRm9YoNWAHys4ZHHqAkNX9w,621054
44
44
  pulumi_newrelic/pipeline_cloud_rule.py,sha256=I6874bmRCGe0b_ClHs86qyYkpFML2QvD_iMzJ-NN_ws,13644
45
45
  pulumi_newrelic/provider.py,sha256=644yJkWitRT_BZOlW_q-_W0x_bnLAIfOrFx_O1V_CEA,20441
46
- pulumi_newrelic/pulumi-plugin.json,sha256=8BgyYLJlIa3TdJr7A7eOJTt34pihVGFBKOB0v6xfCJE,85
46
+ pulumi_newrelic/pulumi-plugin.json,sha256=pNF5X4xSHUGxqkPZN8noyJqghQ5vJOpF8I9AokldcUo,85
47
47
  pulumi_newrelic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
48
  pulumi_newrelic/service_level.py,sha256=gxclcbnMv1zxbt3ZSR1QCHSzcKiYXUCJfFjbyn3mKvE,29792
49
49
  pulumi_newrelic/user.py,sha256=CTl-KJ2yLDl8dwmRGksYCHCQ2KvUyA8U81WV4cGpaj4,19842
@@ -82,10 +82,10 @@ pulumi_newrelic/synthetics/monitor.py,sha256=Xxm7jgO60MVUcxCU82YdmSEGZom1JtXTpeD
82
82
  pulumi_newrelic/synthetics/multi_location_alert_condition.py,sha256=bNmwOaRYPh4Kn1nA8vcMmkbN2A3s31K6OsibfJyQyeQ,36101
83
83
  pulumi_newrelic/synthetics/outputs.py,sha256=9TA7FAfP8xl1uHI3VBodiigB3HRLI9r6rkIL6ILR_q8,12230
84
84
  pulumi_newrelic/synthetics/private_location.py,sha256=RInZWYYxloyzGmgaVTsEO_fGrnxAjqeLeyPN1PCgZDQ,18586
85
- pulumi_newrelic/synthetics/script_monitor.py,sha256=3yEDZqm5R__WEsgb-EhB5kla7eyd9RdO9eauqfFqB7I,70607
85
+ pulumi_newrelic/synthetics/script_monitor.py,sha256=Ijs_jSriw0BFjqEt7sS5jfaiunBhmEB-Li-ED3lYhaM,73319
86
86
  pulumi_newrelic/synthetics/secure_credential.py,sha256=f4gs62_FcBaeO6YMZLMKwBuOS73qxpKmudoelXbmtso,16701
87
87
  pulumi_newrelic/synthetics/step_monitor.py,sha256=1PtSgEInngOinmSSPaPqIxwJx2iSRoMSa9Fw6zlh-rQ,52671
88
- pulumi_newrelic-5.53.0a1757744311.dist-info/METADATA,sha256=_C1MDbkuQU6qsSV5e8dvinUBeJ5eOJgztecn-hw9e5k,3966
89
- pulumi_newrelic-5.53.0a1757744311.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
- pulumi_newrelic-5.53.0a1757744311.dist-info/top_level.txt,sha256=BjE1Wsu6Ah_A7k08uV5vRSZ2R_5uY3wFvSWJaa7ZoQk,16
91
- pulumi_newrelic-5.53.0a1757744311.dist-info/RECORD,,
88
+ pulumi_newrelic-5.53.0a1758684614.dist-info/METADATA,sha256=DLRo9GQbAnDSXtX_Dt7ZOCWsQmWjPaj7j7mwE1_Hlfo,3966
89
+ pulumi_newrelic-5.53.0a1758684614.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
90
+ pulumi_newrelic-5.53.0a1758684614.dist-info/top_level.txt,sha256=BjE1Wsu6Ah_A7k08uV5vRSZ2R_5uY3wFvSWJaa7ZoQk,16
91
+ pulumi_newrelic-5.53.0a1758684614.dist-info/RECORD,,