pulumi-newrelic 5.23.0a1713333809__py3-none-any.whl → 5.23.0a1713975814__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.
Files changed (66) hide show
  1. pulumi_newrelic/_inputs.py +110 -270
  2. pulumi_newrelic/account_management.py +20 -20
  3. pulumi_newrelic/alert_channel.py +76 -92
  4. pulumi_newrelic/alert_condition.py +104 -149
  5. pulumi_newrelic/alert_muting_rule.py +33 -35
  6. pulumi_newrelic/alert_policy.py +68 -43
  7. pulumi_newrelic/alert_policy_channel.py +12 -8
  8. pulumi_newrelic/cloud/_inputs.py +322 -1072
  9. pulumi_newrelic/cloud/aws_govcloud_link_account.py +4 -6
  10. pulumi_newrelic/cloud/aws_integrations.py +13 -15
  11. pulumi_newrelic/cloud/aws_link_account.py +4 -6
  12. pulumi_newrelic/cloud/azure_integrations.py +10 -12
  13. pulumi_newrelic/cloud/azure_link_account.py +4 -6
  14. pulumi_newrelic/cloud/gcp_integrations.py +6 -6
  15. pulumi_newrelic/cloud/gcp_link_account.py +4 -6
  16. pulumi_newrelic/cloud/outputs.py +322 -1072
  17. pulumi_newrelic/data_partition_rule.py +0 -4
  18. pulumi_newrelic/entity_tags.py +13 -17
  19. pulumi_newrelic/events_to_metrics_rule.py +2 -4
  20. pulumi_newrelic/get_account.py +0 -4
  21. pulumi_newrelic/get_application.py +8 -10
  22. pulumi_newrelic/get_authentication_domain.py +4 -8
  23. pulumi_newrelic/get_cloud_account.py +0 -4
  24. pulumi_newrelic/get_entity.py +28 -32
  25. pulumi_newrelic/get_group.py +42 -8
  26. pulumi_newrelic/get_key_transaction.py +8 -10
  27. pulumi_newrelic/get_obfuscation_expression.py +2 -4
  28. pulumi_newrelic/get_service_level_alert_helper.py +22 -46
  29. pulumi_newrelic/get_test_grok_pattern.py +4 -6
  30. pulumi_newrelic/get_user.py +0 -4
  31. pulumi_newrelic/group.py +40 -42
  32. pulumi_newrelic/infra_alert_condition.py +154 -131
  33. pulumi_newrelic/insights/event.py +8 -25
  34. pulumi_newrelic/log_parsing_rule.py +6 -10
  35. pulumi_newrelic/monitor_downtime.py +174 -193
  36. pulumi_newrelic/notification_channel.py +124 -150
  37. pulumi_newrelic/nrql_alert_condition.py +38 -48
  38. pulumi_newrelic/nrql_drop_rule.py +34 -38
  39. pulumi_newrelic/obfuscation_expression.py +2 -4
  40. pulumi_newrelic/obfuscation_rule.py +4 -4
  41. pulumi_newrelic/one_dashboard.py +42 -48
  42. pulumi_newrelic/one_dashboard_raw.py +86 -86
  43. pulumi_newrelic/outputs.py +110 -270
  44. pulumi_newrelic/plugins/_inputs.py +16 -16
  45. pulumi_newrelic/plugins/application_settings.py +6 -8
  46. pulumi_newrelic/plugins/outputs.py +16 -16
  47. pulumi_newrelic/plugins/workload.py +158 -40
  48. pulumi_newrelic/service_level.py +38 -123
  49. pulumi_newrelic/synthetics/alert_condition.py +34 -64
  50. pulumi_newrelic/synthetics/broken_links_monitor.py +18 -20
  51. pulumi_newrelic/synthetics/cert_check_monitor.py +16 -18
  52. pulumi_newrelic/synthetics/get_private_location.py +0 -8
  53. pulumi_newrelic/synthetics/get_secure_credential.py +0 -12
  54. pulumi_newrelic/synthetics/monitor.py +48 -52
  55. pulumi_newrelic/synthetics/multi_location_alert_condition.py +69 -83
  56. pulumi_newrelic/synthetics/private_location.py +6 -6
  57. pulumi_newrelic/synthetics/script_monitor.py +38 -42
  58. pulumi_newrelic/synthetics/secure_credential.py +25 -22
  59. pulumi_newrelic/synthetics/step_monitor.py +18 -20
  60. pulumi_newrelic/user.py +8 -10
  61. pulumi_newrelic/workflow.py +20 -24
  62. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/METADATA +1 -1
  63. pulumi_newrelic-5.23.0a1713975814.dist-info/RECORD +89 -0
  64. pulumi_newrelic-5.23.0a1713333809.dist-info/RECORD +0 -89
  65. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/WHEEL +0 -0
  66. {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/top_level.txt +0 -0
@@ -28,12 +28,12 @@ class WorkloadArgs:
28
28
  The set of arguments for constructing a Workload resource.
29
29
  :param pulumi.Input[int] account_id: The New Relic account ID where you want to create the workload.
30
30
  :param pulumi.Input[str] description: Relevant information about the workload.
31
- :param pulumi.Input[Sequence[pulumi.Input[str]]] entity_guids: A list of entity GUIDs manually assigned to this workload. At least one of either `entity_guids` or `entity_search_query` is required.
32
- :param pulumi.Input[Sequence[pulumi.Input['WorkloadEntitySearchQueryArgs']]] entity_search_queries: A list of search queries that define a dynamic workload. At least one of either `entity_guids` or `entity_search_query` is required. See Nested entity_search_query blocks below for details.
31
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] entity_guids: A list of entity GUIDs manually assigned to this workload.
32
+ :param pulumi.Input[Sequence[pulumi.Input['WorkloadEntitySearchQueryArgs']]] entity_search_queries: A list of search queries that define a dynamic workload.
33
33
  :param pulumi.Input[str] name: The workload's name.
34
34
  :param pulumi.Input[Sequence[pulumi.Input[int]]] scope_account_ids: A list of account IDs that will be used to get entities from.
35
- :param pulumi.Input['WorkloadStatusConfigAutomaticArgs'] status_config_automatic: An input object used to represent an automatic status configuration.See Nested status_config_automatic blocks below for details.
36
- :param pulumi.Input['WorkloadStatusConfigStaticArgs'] status_config_static: A list of static status configurations. You can only configure one static status for a workload.See Nested status_config_static blocks below for details.
35
+ :param pulumi.Input['WorkloadStatusConfigAutomaticArgs'] status_config_automatic: An input object used to represent an automatic status configuration.
36
+ :param pulumi.Input['WorkloadStatusConfigStaticArgs'] status_config_static: A list of static status configurations. You can only configure one static status for a workload.
37
37
  """
38
38
  if account_id is not None:
39
39
  pulumi.set(__self__, "account_id", account_id)
@@ -80,7 +80,7 @@ class WorkloadArgs:
80
80
  @pulumi.getter(name="entityGuids")
81
81
  def entity_guids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
82
82
  """
83
- A list of entity GUIDs manually assigned to this workload. At least one of either `entity_guids` or `entity_search_query` is required.
83
+ A list of entity GUIDs manually assigned to this workload.
84
84
  """
85
85
  return pulumi.get(self, "entity_guids")
86
86
 
@@ -92,7 +92,7 @@ class WorkloadArgs:
92
92
  @pulumi.getter(name="entitySearchQueries")
93
93
  def entity_search_queries(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['WorkloadEntitySearchQueryArgs']]]]:
94
94
  """
95
- A list of search queries that define a dynamic workload. At least one of either `entity_guids` or `entity_search_query` is required. See Nested entity_search_query blocks below for details.
95
+ A list of search queries that define a dynamic workload.
96
96
  """
97
97
  return pulumi.get(self, "entity_search_queries")
98
98
 
@@ -128,7 +128,7 @@ class WorkloadArgs:
128
128
  @pulumi.getter(name="statusConfigAutomatic")
129
129
  def status_config_automatic(self) -> Optional[pulumi.Input['WorkloadStatusConfigAutomaticArgs']]:
130
130
  """
131
- An input object used to represent an automatic status configuration.See Nested status_config_automatic blocks below for details.
131
+ An input object used to represent an automatic status configuration.
132
132
  """
133
133
  return pulumi.get(self, "status_config_automatic")
134
134
 
@@ -140,7 +140,7 @@ class WorkloadArgs:
140
140
  @pulumi.getter(name="statusConfigStatic")
141
141
  def status_config_static(self) -> Optional[pulumi.Input['WorkloadStatusConfigStaticArgs']]:
142
142
  """
143
- A list of static status configurations. You can only configure one static status for a workload.See Nested status_config_static blocks below for details.
143
+ A list of static status configurations. You can only configure one static status for a workload.
144
144
  """
145
145
  return pulumi.get(self, "status_config_static")
146
146
 
@@ -169,14 +169,14 @@ class _WorkloadState:
169
169
  :param pulumi.Input[int] account_id: The New Relic account ID where you want to create the workload.
170
170
  :param pulumi.Input[str] composite_entity_search_query: The composite query used to compose a dynamic workload.
171
171
  :param pulumi.Input[str] description: Relevant information about the workload.
172
- :param pulumi.Input[Sequence[pulumi.Input[str]]] entity_guids: A list of entity GUIDs manually assigned to this workload. At least one of either `entity_guids` or `entity_search_query` is required.
173
- :param pulumi.Input[Sequence[pulumi.Input['WorkloadEntitySearchQueryArgs']]] entity_search_queries: A list of search queries that define a dynamic workload. At least one of either `entity_guids` or `entity_search_query` is required. See Nested entity_search_query blocks below for details.
172
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] entity_guids: A list of entity GUIDs manually assigned to this workload.
173
+ :param pulumi.Input[Sequence[pulumi.Input['WorkloadEntitySearchQueryArgs']]] entity_search_queries: A list of search queries that define a dynamic workload.
174
174
  :param pulumi.Input[str] guid: The unique entity identifier of the workload in New Relic.
175
175
  :param pulumi.Input[str] name: The workload's name.
176
176
  :param pulumi.Input[str] permalink: The URL of the workload.
177
177
  :param pulumi.Input[Sequence[pulumi.Input[int]]] scope_account_ids: A list of account IDs that will be used to get entities from.
178
- :param pulumi.Input['WorkloadStatusConfigAutomaticArgs'] status_config_automatic: An input object used to represent an automatic status configuration.See Nested status_config_automatic blocks below for details.
179
- :param pulumi.Input['WorkloadStatusConfigStaticArgs'] status_config_static: A list of static status configurations. You can only configure one static status for a workload.See Nested status_config_static blocks below for details.
178
+ :param pulumi.Input['WorkloadStatusConfigAutomaticArgs'] status_config_automatic: An input object used to represent an automatic status configuration.
179
+ :param pulumi.Input['WorkloadStatusConfigStaticArgs'] status_config_static: A list of static status configurations. You can only configure one static status for a workload.
180
180
  :param pulumi.Input[int] workload_id: The unique entity identifier of the workload.
181
181
  """
182
182
  if account_id is not None:
@@ -244,7 +244,7 @@ class _WorkloadState:
244
244
  @pulumi.getter(name="entityGuids")
245
245
  def entity_guids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
246
246
  """
247
- A list of entity GUIDs manually assigned to this workload. At least one of either `entity_guids` or `entity_search_query` is required.
247
+ A list of entity GUIDs manually assigned to this workload.
248
248
  """
249
249
  return pulumi.get(self, "entity_guids")
250
250
 
@@ -256,7 +256,7 @@ class _WorkloadState:
256
256
  @pulumi.getter(name="entitySearchQueries")
257
257
  def entity_search_queries(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['WorkloadEntitySearchQueryArgs']]]]:
258
258
  """
259
- A list of search queries that define a dynamic workload. At least one of either `entity_guids` or `entity_search_query` is required. See Nested entity_search_query blocks below for details.
259
+ A list of search queries that define a dynamic workload.
260
260
  """
261
261
  return pulumi.get(self, "entity_search_queries")
262
262
 
@@ -316,7 +316,7 @@ class _WorkloadState:
316
316
  @pulumi.getter(name="statusConfigAutomatic")
317
317
  def status_config_automatic(self) -> Optional[pulumi.Input['WorkloadStatusConfigAutomaticArgs']]:
318
318
  """
319
- An input object used to represent an automatic status configuration.See Nested status_config_automatic blocks below for details.
319
+ An input object used to represent an automatic status configuration.
320
320
  """
321
321
  return pulumi.get(self, "status_config_automatic")
322
322
 
@@ -328,7 +328,7 @@ class _WorkloadState:
328
328
  @pulumi.getter(name="statusConfigStatic")
329
329
  def status_config_static(self) -> Optional[pulumi.Input['WorkloadStatusConfigStaticArgs']]:
330
330
  """
331
- A list of static status configurations. You can only configure one static status for a workload.See Nested status_config_static blocks below for details.
331
+ A list of static status configurations. You can only configure one static status for a workload.
332
332
  """
333
333
  return pulumi.get(self, "status_config_static")
334
334
 
@@ -373,12 +373,12 @@ class Workload(pulumi.CustomResource):
373
373
  ## Example Usage
374
374
 
375
375
  Include entities with a certain string on the name.
376
- <!--Start PulumiCodeChooser -->
377
376
  ```python
378
377
  import pulumi
379
378
  import pulumi_newrelic as newrelic
380
379
 
381
380
  foo = newrelic.plugins.Workload("foo",
381
+ name="Example workload",
382
382
  account_id=12345678,
383
383
  entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
384
384
  entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
@@ -386,15 +386,14 @@ class Workload(pulumi.CustomResource):
386
386
  )],
387
387
  scope_account_ids=[12345678])
388
388
  ```
389
- <!--End PulumiCodeChooser -->
390
389
 
391
390
  Include entities with a set of tags.
392
- <!--Start PulumiCodeChooser -->
393
391
  ```python
394
392
  import pulumi
395
393
  import pulumi_newrelic as newrelic
396
394
 
397
395
  foo = newrelic.plugins.Workload("foo",
396
+ name="Example workload with tags",
398
397
  account_id=12345678,
399
398
  entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
400
399
  entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
@@ -402,15 +401,14 @@ class Workload(pulumi.CustomResource):
402
401
  )],
403
402
  scope_account_ids=[12345678])
404
403
  ```
405
- <!--End PulumiCodeChooser -->
406
404
 
407
405
  Include entities with a set of tags.
408
- <!--Start PulumiCodeChooser -->
409
406
  ```python
410
407
  import pulumi
411
408
  import pulumi_newrelic as newrelic
412
409
 
413
410
  foo = newrelic.plugins.Workload("foo",
411
+ name="Example workload with tags",
414
412
  account_id=12345678,
415
413
  entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
416
414
  entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
@@ -418,12 +416,73 @@ class Workload(pulumi.CustomResource):
418
416
  )],
419
417
  scope_account_ids=[12345678])
420
418
  ```
421
- <!--End PulumiCodeChooser -->
422
419
 
423
420
  Include automatic status
424
421
 
425
422
  > The global status of your workload is a quick indicator of the workload health. You can configure it to be calculated automatically, and you can also set an alert and get a notification whenever the workload stops being operational. Alternatively, you can communicate a certain status of the workload by setting up a static value and a description. [See our docs](https://docs.newrelic.com/docs/workloads/use-workloads/workloads/workload-status)
426
423
 
424
+ ```python
425
+ import pulumi
426
+ import pulumi_newrelic as newrelic
427
+
428
+ foo = newrelic.plugins.Workload("foo",
429
+ name="Example workload",
430
+ account_id=12345678,
431
+ entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
432
+ entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
433
+ query="name like '%Example application%'",
434
+ )],
435
+ scope_account_ids=[12345678],
436
+ description="Description",
437
+ status_config_automatic=newrelic.plugins.WorkloadStatusConfigAutomaticArgs(
438
+ enabled=True,
439
+ remaining_entities_rule=newrelic.plugins.WorkloadStatusConfigAutomaticRemainingEntitiesRuleArgs(
440
+ remaining_entities_rule_rollup=newrelic.plugins.WorkloadStatusConfigAutomaticRemainingEntitiesRuleRemainingEntitiesRuleRollupArgs(
441
+ strategy="BEST_STATUS_WINS",
442
+ threshold_type="FIXED",
443
+ threshold_value=100,
444
+ group_by="ENTITY_TYPE",
445
+ ),
446
+ ),
447
+ rules=[newrelic.plugins.WorkloadStatusConfigAutomaticRuleArgs(
448
+ entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
449
+ nrql_queries=[newrelic.plugins.WorkloadStatusConfigAutomaticRuleNrqlQueryArgs(
450
+ query="name like '%Example application2%'",
451
+ )],
452
+ rollup=newrelic.plugins.WorkloadStatusConfigAutomaticRuleRollupArgs(
453
+ strategy="BEST_STATUS_WINS",
454
+ threshold_type="FIXED",
455
+ threshold_value=100,
456
+ ),
457
+ )],
458
+ ))
459
+ ```
460
+
461
+ Include static status
462
+
463
+ > You can use this during maintenance tasks or any other time you want to provide a fixed status for your workload. This overrides all automatic rules. [See our docs](https://docs.newrelic.com/docs/workloads/use-workloads/workloads/workload-status#configure-static)
464
+
465
+ ```python
466
+ import pulumi
467
+ import pulumi_newrelic as newrelic
468
+
469
+ foo = newrelic.plugins.Workload("foo",
470
+ name="Example workload",
471
+ account_id=12345678,
472
+ entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
473
+ entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
474
+ query="name like '%Example application%'",
475
+ )],
476
+ scope_account_ids=[12345678],
477
+ description="Description",
478
+ status_config_static=newrelic.plugins.WorkloadStatusConfigStaticArgs(
479
+ description="test",
480
+ enabled=True,
481
+ status="OPERATIONAL",
482
+ summary="summary of the status",
483
+ ))
484
+ ```
485
+
427
486
  ## Import
428
487
 
429
488
  New Relic workloads can be imported using a concatenated string of the format
@@ -440,12 +499,12 @@ class Workload(pulumi.CustomResource):
440
499
  :param pulumi.ResourceOptions opts: Options for the resource.
441
500
  :param pulumi.Input[int] account_id: The New Relic account ID where you want to create the workload.
442
501
  :param pulumi.Input[str] description: Relevant information about the workload.
443
- :param pulumi.Input[Sequence[pulumi.Input[str]]] entity_guids: A list of entity GUIDs manually assigned to this workload. At least one of either `entity_guids` or `entity_search_query` is required.
444
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkloadEntitySearchQueryArgs']]]] entity_search_queries: A list of search queries that define a dynamic workload. At least one of either `entity_guids` or `entity_search_query` is required. See Nested entity_search_query blocks below for details.
502
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] entity_guids: A list of entity GUIDs manually assigned to this workload.
503
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkloadEntitySearchQueryArgs']]]] entity_search_queries: A list of search queries that define a dynamic workload.
445
504
  :param pulumi.Input[str] name: The workload's name.
446
505
  :param pulumi.Input[Sequence[pulumi.Input[int]]] scope_account_ids: A list of account IDs that will be used to get entities from.
447
- :param pulumi.Input[pulumi.InputType['WorkloadStatusConfigAutomaticArgs']] status_config_automatic: An input object used to represent an automatic status configuration.See Nested status_config_automatic blocks below for details.
448
- :param pulumi.Input[pulumi.InputType['WorkloadStatusConfigStaticArgs']] status_config_static: A list of static status configurations. You can only configure one static status for a workload.See Nested status_config_static blocks below for details.
506
+ :param pulumi.Input[pulumi.InputType['WorkloadStatusConfigAutomaticArgs']] status_config_automatic: An input object used to represent an automatic status configuration.
507
+ :param pulumi.Input[pulumi.InputType['WorkloadStatusConfigStaticArgs']] status_config_static: A list of static status configurations. You can only configure one static status for a workload.
449
508
  """
450
509
  ...
451
510
  @overload
@@ -463,12 +522,12 @@ class Workload(pulumi.CustomResource):
463
522
  ## Example Usage
464
523
 
465
524
  Include entities with a certain string on the name.
466
- <!--Start PulumiCodeChooser -->
467
525
  ```python
468
526
  import pulumi
469
527
  import pulumi_newrelic as newrelic
470
528
 
471
529
  foo = newrelic.plugins.Workload("foo",
530
+ name="Example workload",
472
531
  account_id=12345678,
473
532
  entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
474
533
  entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
@@ -476,15 +535,14 @@ class Workload(pulumi.CustomResource):
476
535
  )],
477
536
  scope_account_ids=[12345678])
478
537
  ```
479
- <!--End PulumiCodeChooser -->
480
538
 
481
539
  Include entities with a set of tags.
482
- <!--Start PulumiCodeChooser -->
483
540
  ```python
484
541
  import pulumi
485
542
  import pulumi_newrelic as newrelic
486
543
 
487
544
  foo = newrelic.plugins.Workload("foo",
545
+ name="Example workload with tags",
488
546
  account_id=12345678,
489
547
  entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
490
548
  entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
@@ -492,15 +550,14 @@ class Workload(pulumi.CustomResource):
492
550
  )],
493
551
  scope_account_ids=[12345678])
494
552
  ```
495
- <!--End PulumiCodeChooser -->
496
553
 
497
554
  Include entities with a set of tags.
498
- <!--Start PulumiCodeChooser -->
499
555
  ```python
500
556
  import pulumi
501
557
  import pulumi_newrelic as newrelic
502
558
 
503
559
  foo = newrelic.plugins.Workload("foo",
560
+ name="Example workload with tags",
504
561
  account_id=12345678,
505
562
  entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
506
563
  entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
@@ -508,12 +565,73 @@ class Workload(pulumi.CustomResource):
508
565
  )],
509
566
  scope_account_ids=[12345678])
510
567
  ```
511
- <!--End PulumiCodeChooser -->
512
568
 
513
569
  Include automatic status
514
570
 
515
571
  > The global status of your workload is a quick indicator of the workload health. You can configure it to be calculated automatically, and you can also set an alert and get a notification whenever the workload stops being operational. Alternatively, you can communicate a certain status of the workload by setting up a static value and a description. [See our docs](https://docs.newrelic.com/docs/workloads/use-workloads/workloads/workload-status)
516
572
 
573
+ ```python
574
+ import pulumi
575
+ import pulumi_newrelic as newrelic
576
+
577
+ foo = newrelic.plugins.Workload("foo",
578
+ name="Example workload",
579
+ account_id=12345678,
580
+ entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
581
+ entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
582
+ query="name like '%Example application%'",
583
+ )],
584
+ scope_account_ids=[12345678],
585
+ description="Description",
586
+ status_config_automatic=newrelic.plugins.WorkloadStatusConfigAutomaticArgs(
587
+ enabled=True,
588
+ remaining_entities_rule=newrelic.plugins.WorkloadStatusConfigAutomaticRemainingEntitiesRuleArgs(
589
+ remaining_entities_rule_rollup=newrelic.plugins.WorkloadStatusConfigAutomaticRemainingEntitiesRuleRemainingEntitiesRuleRollupArgs(
590
+ strategy="BEST_STATUS_WINS",
591
+ threshold_type="FIXED",
592
+ threshold_value=100,
593
+ group_by="ENTITY_TYPE",
594
+ ),
595
+ ),
596
+ rules=[newrelic.plugins.WorkloadStatusConfigAutomaticRuleArgs(
597
+ entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
598
+ nrql_queries=[newrelic.plugins.WorkloadStatusConfigAutomaticRuleNrqlQueryArgs(
599
+ query="name like '%Example application2%'",
600
+ )],
601
+ rollup=newrelic.plugins.WorkloadStatusConfigAutomaticRuleRollupArgs(
602
+ strategy="BEST_STATUS_WINS",
603
+ threshold_type="FIXED",
604
+ threshold_value=100,
605
+ ),
606
+ )],
607
+ ))
608
+ ```
609
+
610
+ Include static status
611
+
612
+ > You can use this during maintenance tasks or any other time you want to provide a fixed status for your workload. This overrides all automatic rules. [See our docs](https://docs.newrelic.com/docs/workloads/use-workloads/workloads/workload-status#configure-static)
613
+
614
+ ```python
615
+ import pulumi
616
+ import pulumi_newrelic as newrelic
617
+
618
+ foo = newrelic.plugins.Workload("foo",
619
+ name="Example workload",
620
+ account_id=12345678,
621
+ entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
622
+ entity_search_queries=[newrelic.plugins.WorkloadEntitySearchQueryArgs(
623
+ query="name like '%Example application%'",
624
+ )],
625
+ scope_account_ids=[12345678],
626
+ description="Description",
627
+ status_config_static=newrelic.plugins.WorkloadStatusConfigStaticArgs(
628
+ description="test",
629
+ enabled=True,
630
+ status="OPERATIONAL",
631
+ summary="summary of the status",
632
+ ))
633
+ ```
634
+
517
635
  ## Import
518
636
 
519
637
  New Relic workloads can be imported using a concatenated string of the format
@@ -602,14 +720,14 @@ class Workload(pulumi.CustomResource):
602
720
  :param pulumi.Input[int] account_id: The New Relic account ID where you want to create the workload.
603
721
  :param pulumi.Input[str] composite_entity_search_query: The composite query used to compose a dynamic workload.
604
722
  :param pulumi.Input[str] description: Relevant information about the workload.
605
- :param pulumi.Input[Sequence[pulumi.Input[str]]] entity_guids: A list of entity GUIDs manually assigned to this workload. At least one of either `entity_guids` or `entity_search_query` is required.
606
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkloadEntitySearchQueryArgs']]]] entity_search_queries: A list of search queries that define a dynamic workload. At least one of either `entity_guids` or `entity_search_query` is required. See Nested entity_search_query blocks below for details.
723
+ :param pulumi.Input[Sequence[pulumi.Input[str]]] entity_guids: A list of entity GUIDs manually assigned to this workload.
724
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['WorkloadEntitySearchQueryArgs']]]] entity_search_queries: A list of search queries that define a dynamic workload.
607
725
  :param pulumi.Input[str] guid: The unique entity identifier of the workload in New Relic.
608
726
  :param pulumi.Input[str] name: The workload's name.
609
727
  :param pulumi.Input[str] permalink: The URL of the workload.
610
728
  :param pulumi.Input[Sequence[pulumi.Input[int]]] scope_account_ids: A list of account IDs that will be used to get entities from.
611
- :param pulumi.Input[pulumi.InputType['WorkloadStatusConfigAutomaticArgs']] status_config_automatic: An input object used to represent an automatic status configuration.See Nested status_config_automatic blocks below for details.
612
- :param pulumi.Input[pulumi.InputType['WorkloadStatusConfigStaticArgs']] status_config_static: A list of static status configurations. You can only configure one static status for a workload.See Nested status_config_static blocks below for details.
729
+ :param pulumi.Input[pulumi.InputType['WorkloadStatusConfigAutomaticArgs']] status_config_automatic: An input object used to represent an automatic status configuration.
730
+ :param pulumi.Input[pulumi.InputType['WorkloadStatusConfigStaticArgs']] status_config_static: A list of static status configurations. You can only configure one static status for a workload.
613
731
  :param pulumi.Input[int] workload_id: The unique entity identifier of the workload.
614
732
  """
615
733
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
@@ -658,7 +776,7 @@ class Workload(pulumi.CustomResource):
658
776
  @pulumi.getter(name="entityGuids")
659
777
  def entity_guids(self) -> pulumi.Output[Sequence[str]]:
660
778
  """
661
- A list of entity GUIDs manually assigned to this workload. At least one of either `entity_guids` or `entity_search_query` is required.
779
+ A list of entity GUIDs manually assigned to this workload.
662
780
  """
663
781
  return pulumi.get(self, "entity_guids")
664
782
 
@@ -666,7 +784,7 @@ class Workload(pulumi.CustomResource):
666
784
  @pulumi.getter(name="entitySearchQueries")
667
785
  def entity_search_queries(self) -> pulumi.Output[Optional[Sequence['outputs.WorkloadEntitySearchQuery']]]:
668
786
  """
669
- A list of search queries that define a dynamic workload. At least one of either `entity_guids` or `entity_search_query` is required. See Nested entity_search_query blocks below for details.
787
+ A list of search queries that define a dynamic workload.
670
788
  """
671
789
  return pulumi.get(self, "entity_search_queries")
672
790
 
@@ -706,7 +824,7 @@ class Workload(pulumi.CustomResource):
706
824
  @pulumi.getter(name="statusConfigAutomatic")
707
825
  def status_config_automatic(self) -> pulumi.Output[Optional['outputs.WorkloadStatusConfigAutomatic']]:
708
826
  """
709
- An input object used to represent an automatic status configuration.See Nested status_config_automatic blocks below for details.
827
+ An input object used to represent an automatic status configuration.
710
828
  """
711
829
  return pulumi.get(self, "status_config_automatic")
712
830
 
@@ -714,7 +832,7 @@ class Workload(pulumi.CustomResource):
714
832
  @pulumi.getter(name="statusConfigStatic")
715
833
  def status_config_static(self) -> pulumi.Output[Optional['outputs.WorkloadStatusConfigStatic']]:
716
834
  """
717
- A list of static status configurations. You can only configure one static status for a workload.See Nested status_config_static blocks below for details.
835
+ A list of static status configurations. You can only configure one static status for a workload.
718
836
  """
719
837
  return pulumi.get(self, "status_config_static")
720
838