pulumi-newrelic 5.21.0a1710157101__py3-none-any.whl → 5.39.0a1736849617__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pulumi_newrelic/__init__.py +9 -0
- pulumi_newrelic/_inputs.py +7153 -461
- pulumi_newrelic/_utilities.py +41 -5
- pulumi_newrelic/account_management.py +11 -6
- pulumi_newrelic/alert_channel.py +116 -127
- pulumi_newrelic/alert_condition.py +116 -129
- pulumi_newrelic/alert_muting_rule.py +128 -76
- pulumi_newrelic/alert_policy.py +78 -75
- pulumi_newrelic/alert_policy_channel.py +77 -68
- pulumi_newrelic/api_access_key.py +45 -28
- pulumi_newrelic/browser_application.py +77 -78
- pulumi_newrelic/cloud/_inputs.py +2527 -1082
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +133 -128
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +23 -20
- pulumi_newrelic/cloud/aws_integrations.py +298 -1326
- pulumi_newrelic/cloud/aws_link_account.py +23 -20
- pulumi_newrelic/cloud/azure_integrations.py +521 -483
- pulumi_newrelic/cloud/azure_link_account.py +34 -31
- pulumi_newrelic/cloud/gcp_integrations.py +341 -322
- pulumi_newrelic/cloud/gcp_link_account.py +23 -20
- pulumi_newrelic/cloud/outputs.py +327 -1072
- pulumi_newrelic/config/__init__.pyi +6 -1
- pulumi_newrelic/config/vars.py +7 -2
- pulumi_newrelic/data_partition_rule.py +19 -18
- pulumi_newrelic/entity_tags.py +32 -31
- pulumi_newrelic/events_to_metrics_rule.py +23 -20
- pulumi_newrelic/get_account.py +24 -16
- pulumi_newrelic/get_alert_channel.py +26 -13
- pulumi_newrelic/get_alert_policy.py +35 -12
- pulumi_newrelic/get_application.py +39 -31
- pulumi_newrelic/get_authentication_domain.py +17 -13
- pulumi_newrelic/get_cloud_account.py +26 -18
- pulumi_newrelic/get_entity.py +90 -147
- pulumi_newrelic/get_group.py +58 -13
- pulumi_newrelic/get_key_transaction.py +109 -34
- pulumi_newrelic/get_notification_destination.py +64 -14
- pulumi_newrelic/get_obfuscation_expression.py +36 -28
- pulumi_newrelic/get_service_level_alert_helper.py +135 -117
- pulumi_newrelic/get_test_grok_pattern.py +29 -18
- pulumi_newrelic/get_user.py +17 -9
- pulumi_newrelic/group.py +5 -146
- pulumi_newrelic/infra_alert_condition.py +160 -167
- pulumi_newrelic/insights/_inputs.py +43 -0
- pulumi_newrelic/insights/event.py +48 -47
- pulumi_newrelic/insights/outputs.py +5 -0
- pulumi_newrelic/key_transaction.py +464 -0
- pulumi_newrelic/log_parsing_rule.py +25 -24
- pulumi_newrelic/monitor_downtime.py +211 -225
- pulumi_newrelic/notification_channel.py +381 -366
- pulumi_newrelic/notification_destination.py +192 -54
- pulumi_newrelic/nrql_alert_condition.py +345 -262
- pulumi_newrelic/nrql_drop_rule.py +31 -30
- pulumi_newrelic/obfuscation_expression.py +23 -20
- pulumi_newrelic/obfuscation_rule.py +38 -33
- pulumi_newrelic/one_dashboard.py +29 -24
- pulumi_newrelic/one_dashboard_json.py +19 -14
- pulumi_newrelic/one_dashboard_raw.py +110 -105
- pulumi_newrelic/outputs.py +2446 -245
- pulumi_newrelic/plugins/_inputs.py +145 -10
- pulumi_newrelic/plugins/application_settings.py +25 -36
- pulumi_newrelic/plugins/outputs.py +15 -10
- pulumi_newrelic/plugins/workload.py +215 -92
- pulumi_newrelic/provider.py +27 -33
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +185 -186
- pulumi_newrelic/synthetics/_inputs.py +159 -2
- pulumi_newrelic/synthetics/alert_condition.py +87 -98
- pulumi_newrelic/synthetics/broken_links_monitor.py +216 -99
- pulumi_newrelic/synthetics/cert_check_monitor.py +219 -100
- pulumi_newrelic/synthetics/get_private_location.py +34 -30
- pulumi_newrelic/synthetics/get_secure_credential.py +24 -16
- pulumi_newrelic/synthetics/monitor.py +348 -193
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +105 -100
- pulumi_newrelic/synthetics/outputs.py +7 -2
- pulumi_newrelic/synthetics/private_location.py +25 -20
- pulumi_newrelic/synthetics/script_monitor.py +317 -182
- pulumi_newrelic/synthetics/secure_credential.py +23 -22
- pulumi_newrelic/synthetics/step_monitor.py +405 -100
- pulumi_newrelic/user.py +13 -10
- pulumi_newrelic/workflow.py +209 -196
- {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736849617.dist-info}/METADATA +7 -6
- pulumi_newrelic-5.39.0a1736849617.dist-info/RECORD +90 -0
- {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736849617.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.21.0a1710157101.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.21.0a1710157101.dist-info → pulumi_newrelic-5.39.0a1736849617.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
+
import sys
|
7
8
|
import pulumi
|
8
9
|
import pulumi.runtime
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
11
|
+
if sys.version_info >= (3, 11):
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
13
|
+
else:
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
10
15
|
from .. import _utilities
|
11
16
|
from . import outputs
|
12
17
|
from ._inputs import *
|
@@ -16,22 +21,22 @@ __all__ = ['WorkloadArgs', 'Workload']
|
|
16
21
|
@pulumi.input_type
|
17
22
|
class WorkloadArgs:
|
18
23
|
def __init__(__self__, *,
|
19
|
-
account_id: Optional[pulumi.Input[
|
24
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
20
25
|
description: Optional[pulumi.Input[str]] = None,
|
21
26
|
entity_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
22
27
|
entity_search_queries: Optional[pulumi.Input[Sequence[pulumi.Input['WorkloadEntitySearchQueryArgs']]]] = None,
|
23
28
|
name: Optional[pulumi.Input[str]] = None,
|
24
|
-
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
29
|
+
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
25
30
|
status_config_automatic: Optional[pulumi.Input['WorkloadStatusConfigAutomaticArgs']] = None,
|
26
31
|
status_config_static: Optional[pulumi.Input['WorkloadStatusConfigStaticArgs']] = None):
|
27
32
|
"""
|
28
33
|
The set of arguments for constructing a Workload resource.
|
29
|
-
:param pulumi.Input[
|
34
|
+
:param pulumi.Input[str] account_id: The New Relic account ID where you want to create the workload.
|
30
35
|
:param pulumi.Input[str] description: Relevant information about the workload.
|
31
36
|
: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
37
|
: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.
|
33
38
|
:param pulumi.Input[str] name: The workload's name.
|
34
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
39
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] scope_account_ids: A list of account IDs that will be used to get entities from.
|
35
40
|
: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
41
|
: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.
|
37
42
|
"""
|
@@ -54,14 +59,14 @@ class WorkloadArgs:
|
|
54
59
|
|
55
60
|
@property
|
56
61
|
@pulumi.getter(name="accountId")
|
57
|
-
def account_id(self) -> Optional[pulumi.Input[
|
62
|
+
def account_id(self) -> Optional[pulumi.Input[str]]:
|
58
63
|
"""
|
59
64
|
The New Relic account ID where you want to create the workload.
|
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[
|
69
|
+
def account_id(self, value: Optional[pulumi.Input[str]]):
|
65
70
|
pulumi.set(self, "account_id", value)
|
66
71
|
|
67
72
|
@property
|
@@ -114,14 +119,14 @@ class WorkloadArgs:
|
|
114
119
|
|
115
120
|
@property
|
116
121
|
@pulumi.getter(name="scopeAccountIds")
|
117
|
-
def scope_account_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[
|
122
|
+
def scope_account_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
118
123
|
"""
|
119
124
|
A list of account IDs that will be used to get entities from.
|
120
125
|
"""
|
121
126
|
return pulumi.get(self, "scope_account_ids")
|
122
127
|
|
123
128
|
@scope_account_ids.setter
|
124
|
-
def scope_account_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[
|
129
|
+
def scope_account_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
125
130
|
pulumi.set(self, "scope_account_ids", value)
|
126
131
|
|
127
132
|
@property
|
@@ -152,7 +157,7 @@ class WorkloadArgs:
|
|
152
157
|
@pulumi.input_type
|
153
158
|
class _WorkloadState:
|
154
159
|
def __init__(__self__, *,
|
155
|
-
account_id: Optional[pulumi.Input[
|
160
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
156
161
|
composite_entity_search_query: Optional[pulumi.Input[str]] = None,
|
157
162
|
description: Optional[pulumi.Input[str]] = None,
|
158
163
|
entity_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
@@ -160,13 +165,13 @@ class _WorkloadState:
|
|
160
165
|
guid: Optional[pulumi.Input[str]] = None,
|
161
166
|
name: Optional[pulumi.Input[str]] = None,
|
162
167
|
permalink: Optional[pulumi.Input[str]] = None,
|
163
|
-
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
168
|
+
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
164
169
|
status_config_automatic: Optional[pulumi.Input['WorkloadStatusConfigAutomaticArgs']] = None,
|
165
170
|
status_config_static: Optional[pulumi.Input['WorkloadStatusConfigStaticArgs']] = None,
|
166
|
-
workload_id: Optional[pulumi.Input[
|
171
|
+
workload_id: Optional[pulumi.Input[str]] = None):
|
167
172
|
"""
|
168
173
|
Input properties used for looking up and filtering Workload resources.
|
169
|
-
:param pulumi.Input[
|
174
|
+
:param pulumi.Input[str] account_id: The New Relic account ID where you want to create the workload.
|
170
175
|
:param pulumi.Input[str] composite_entity_search_query: The composite query used to compose a dynamic workload.
|
171
176
|
:param pulumi.Input[str] description: Relevant information about the workload.
|
172
177
|
: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.
|
@@ -174,10 +179,10 @@ class _WorkloadState:
|
|
174
179
|
:param pulumi.Input[str] guid: The unique entity identifier of the workload in New Relic.
|
175
180
|
:param pulumi.Input[str] name: The workload's name.
|
176
181
|
:param pulumi.Input[str] permalink: The URL of the workload.
|
177
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
182
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] scope_account_ids: A list of account IDs that will be used to get entities from.
|
178
183
|
: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
184
|
: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.
|
180
|
-
:param pulumi.Input[
|
185
|
+
:param pulumi.Input[str] workload_id: The unique entity identifier of the workload.
|
181
186
|
"""
|
182
187
|
if account_id is not None:
|
183
188
|
pulumi.set(__self__, "account_id", account_id)
|
@@ -206,14 +211,14 @@ class _WorkloadState:
|
|
206
211
|
|
207
212
|
@property
|
208
213
|
@pulumi.getter(name="accountId")
|
209
|
-
def account_id(self) -> Optional[pulumi.Input[
|
214
|
+
def account_id(self) -> Optional[pulumi.Input[str]]:
|
210
215
|
"""
|
211
216
|
The New Relic account ID where you want to create the workload.
|
212
217
|
"""
|
213
218
|
return pulumi.get(self, "account_id")
|
214
219
|
|
215
220
|
@account_id.setter
|
216
|
-
def account_id(self, value: Optional[pulumi.Input[
|
221
|
+
def account_id(self, value: Optional[pulumi.Input[str]]):
|
217
222
|
pulumi.set(self, "account_id", value)
|
218
223
|
|
219
224
|
@property
|
@@ -302,14 +307,14 @@ class _WorkloadState:
|
|
302
307
|
|
303
308
|
@property
|
304
309
|
@pulumi.getter(name="scopeAccountIds")
|
305
|
-
def scope_account_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[
|
310
|
+
def scope_account_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
306
311
|
"""
|
307
312
|
A list of account IDs that will be used to get entities from.
|
308
313
|
"""
|
309
314
|
return pulumi.get(self, "scope_account_ids")
|
310
315
|
|
311
316
|
@scope_account_ids.setter
|
312
|
-
def scope_account_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[
|
317
|
+
def scope_account_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
313
318
|
pulumi.set(self, "scope_account_ids", value)
|
314
319
|
|
315
320
|
@property
|
@@ -338,14 +343,14 @@ class _WorkloadState:
|
|
338
343
|
|
339
344
|
@property
|
340
345
|
@pulumi.getter(name="workloadId")
|
341
|
-
def workload_id(self) -> Optional[pulumi.Input[
|
346
|
+
def workload_id(self) -> Optional[pulumi.Input[str]]:
|
342
347
|
"""
|
343
348
|
The unique entity identifier of the workload.
|
344
349
|
"""
|
345
350
|
return pulumi.get(self, "workload_id")
|
346
351
|
|
347
352
|
@workload_id.setter
|
348
|
-
def workload_id(self, value: Optional[pulumi.Input[
|
353
|
+
def workload_id(self, value: Optional[pulumi.Input[str]]):
|
349
354
|
pulumi.set(self, "workload_id", value)
|
350
355
|
|
351
356
|
|
@@ -354,14 +359,14 @@ class Workload(pulumi.CustomResource):
|
|
354
359
|
def __init__(__self__,
|
355
360
|
resource_name: str,
|
356
361
|
opts: Optional[pulumi.ResourceOptions] = None,
|
357
|
-
account_id: Optional[pulumi.Input[
|
362
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
358
363
|
description: Optional[pulumi.Input[str]] = None,
|
359
364
|
entity_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
360
|
-
entity_search_queries: Optional[pulumi.Input[Sequence[pulumi.Input[
|
365
|
+
entity_search_queries: Optional[pulumi.Input[Sequence[pulumi.Input[Union['WorkloadEntitySearchQueryArgs', 'WorkloadEntitySearchQueryArgsDict']]]]] = None,
|
361
366
|
name: Optional[pulumi.Input[str]] = None,
|
362
|
-
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
363
|
-
status_config_automatic: Optional[pulumi.Input[
|
364
|
-
status_config_static: Optional[pulumi.Input[
|
367
|
+
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
368
|
+
status_config_automatic: Optional[pulumi.Input[Union['WorkloadStatusConfigAutomaticArgs', 'WorkloadStatusConfigAutomaticArgsDict']]] = None,
|
369
|
+
status_config_static: Optional[pulumi.Input[Union['WorkloadStatusConfigStaticArgs', 'WorkloadStatusConfigStaticArgsDict']]] = None,
|
365
370
|
__props__=None):
|
366
371
|
"""
|
367
372
|
Use this resource to create, update, and delete a New Relic One workload.
|
@@ -373,57 +378,116 @@ class Workload(pulumi.CustomResource):
|
|
373
378
|
## Example Usage
|
374
379
|
|
375
380
|
Include entities with a certain string on the name.
|
376
|
-
<!--Start PulumiCodeChooser -->
|
377
381
|
```python
|
378
382
|
import pulumi
|
379
383
|
import pulumi_newrelic as newrelic
|
380
384
|
|
381
385
|
foo = newrelic.plugins.Workload("foo",
|
382
|
-
|
386
|
+
name="Example workload",
|
387
|
+
account_id="12345678",
|
383
388
|
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
384
|
-
entity_search_queries=[
|
385
|
-
query
|
386
|
-
|
387
|
-
scope_account_ids=[12345678])
|
389
|
+
entity_search_queries=[{
|
390
|
+
"query": "name like '%Example application%'",
|
391
|
+
}],
|
392
|
+
scope_account_ids=["12345678"])
|
388
393
|
```
|
389
|
-
<!--End PulumiCodeChooser -->
|
390
394
|
|
391
395
|
Include entities with a set of tags.
|
392
|
-
<!--Start PulumiCodeChooser -->
|
393
396
|
```python
|
394
397
|
import pulumi
|
395
398
|
import pulumi_newrelic as newrelic
|
396
399
|
|
397
400
|
foo = newrelic.plugins.Workload("foo",
|
398
|
-
|
401
|
+
name="Example workload with tags",
|
402
|
+
account_id="12345678",
|
399
403
|
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
400
|
-
entity_search_queries=[
|
401
|
-
query
|
402
|
-
|
403
|
-
scope_account_ids=[12345678])
|
404
|
+
entity_search_queries=[{
|
405
|
+
"query": "tags.accountId = '12345678' AND tags.environment='production' AND tags.language='java'",
|
406
|
+
}],
|
407
|
+
scope_account_ids=["12345678"])
|
404
408
|
```
|
405
|
-
<!--End PulumiCodeChooser -->
|
406
409
|
|
407
410
|
Include entities with a set of tags.
|
408
|
-
<!--Start PulumiCodeChooser -->
|
409
411
|
```python
|
410
412
|
import pulumi
|
411
413
|
import pulumi_newrelic as newrelic
|
412
414
|
|
413
415
|
foo = newrelic.plugins.Workload("foo",
|
414
|
-
|
416
|
+
name="Example workload with tags",
|
417
|
+
account_id="12345678",
|
415
418
|
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
416
|
-
entity_search_queries=[
|
417
|
-
query
|
418
|
-
|
419
|
-
scope_account_ids=[12345678])
|
419
|
+
entity_search_queries=[{
|
420
|
+
"query": "tags.accountId = '12345678' AND tags.environment='production' AND tags.language='java'",
|
421
|
+
}],
|
422
|
+
scope_account_ids=["12345678"])
|
420
423
|
```
|
421
|
-
<!--End PulumiCodeChooser -->
|
422
424
|
|
423
425
|
Include automatic status
|
424
426
|
|
425
427
|
> 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
428
|
|
429
|
+
```python
|
430
|
+
import pulumi
|
431
|
+
import pulumi_newrelic as newrelic
|
432
|
+
|
433
|
+
foo = newrelic.plugins.Workload("foo",
|
434
|
+
name="Example workload",
|
435
|
+
account_id="12345678",
|
436
|
+
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
437
|
+
entity_search_queries=[{
|
438
|
+
"query": "name like '%Example application%'",
|
439
|
+
}],
|
440
|
+
scope_account_ids=["12345678"],
|
441
|
+
description="Description",
|
442
|
+
status_config_automatic={
|
443
|
+
"enabled": True,
|
444
|
+
"remaining_entities_rule": {
|
445
|
+
"remaining_entities_rule_rollup": {
|
446
|
+
"strategy": "BEST_STATUS_WINS",
|
447
|
+
"threshold_type": "FIXED",
|
448
|
+
"threshold_value": 100,
|
449
|
+
"group_by": "ENTITY_TYPE",
|
450
|
+
},
|
451
|
+
},
|
452
|
+
"rules": [{
|
453
|
+
"entity_guids": ["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
454
|
+
"nrql_queries": [{
|
455
|
+
"query": "name like '%Example application2%'",
|
456
|
+
}],
|
457
|
+
"rollup": {
|
458
|
+
"strategy": "BEST_STATUS_WINS",
|
459
|
+
"threshold_type": "FIXED",
|
460
|
+
"threshold_value": 100,
|
461
|
+
},
|
462
|
+
}],
|
463
|
+
})
|
464
|
+
```
|
465
|
+
|
466
|
+
Include static status
|
467
|
+
|
468
|
+
> 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)
|
469
|
+
|
470
|
+
```python
|
471
|
+
import pulumi
|
472
|
+
import pulumi_newrelic as newrelic
|
473
|
+
|
474
|
+
foo = newrelic.plugins.Workload("foo",
|
475
|
+
name="Example workload",
|
476
|
+
account_id="12345678",
|
477
|
+
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
478
|
+
entity_search_queries=[{
|
479
|
+
"query": "name like '%Example application%'",
|
480
|
+
}],
|
481
|
+
scope_account_ids=["12345678"],
|
482
|
+
description="Description",
|
483
|
+
status_config_static={
|
484
|
+
"description": "test",
|
485
|
+
"enabled": True,
|
486
|
+
"status": "OPERATIONAL",
|
487
|
+
"summary": "summary of the status",
|
488
|
+
})
|
489
|
+
```
|
490
|
+
|
427
491
|
## Import
|
428
492
|
|
429
493
|
New Relic workloads can be imported using a concatenated string of the format
|
@@ -438,14 +502,14 @@ class Workload(pulumi.CustomResource):
|
|
438
502
|
|
439
503
|
:param str resource_name: The name of the resource.
|
440
504
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
441
|
-
:param pulumi.Input[
|
505
|
+
:param pulumi.Input[str] account_id: The New Relic account ID where you want to create the workload.
|
442
506
|
:param pulumi.Input[str] description: Relevant information about the workload.
|
443
507
|
: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[
|
508
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['WorkloadEntitySearchQueryArgs', 'WorkloadEntitySearchQueryArgsDict']]]] 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.
|
445
509
|
:param pulumi.Input[str] name: The workload's name.
|
446
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
447
|
-
:param pulumi.Input[
|
448
|
-
:param pulumi.Input[
|
510
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] scope_account_ids: A list of account IDs that will be used to get entities from.
|
511
|
+
:param pulumi.Input[Union['WorkloadStatusConfigAutomaticArgs', 'WorkloadStatusConfigAutomaticArgsDict']] status_config_automatic: An input object used to represent an automatic status configuration.See Nested status_config_automatic blocks below for details.
|
512
|
+
:param pulumi.Input[Union['WorkloadStatusConfigStaticArgs', 'WorkloadStatusConfigStaticArgsDict']] 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.
|
449
513
|
"""
|
450
514
|
...
|
451
515
|
@overload
|
@@ -463,57 +527,116 @@ class Workload(pulumi.CustomResource):
|
|
463
527
|
## Example Usage
|
464
528
|
|
465
529
|
Include entities with a certain string on the name.
|
466
|
-
<!--Start PulumiCodeChooser -->
|
467
530
|
```python
|
468
531
|
import pulumi
|
469
532
|
import pulumi_newrelic as newrelic
|
470
533
|
|
471
534
|
foo = newrelic.plugins.Workload("foo",
|
472
|
-
|
535
|
+
name="Example workload",
|
536
|
+
account_id="12345678",
|
473
537
|
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
474
|
-
entity_search_queries=[
|
475
|
-
query
|
476
|
-
|
477
|
-
scope_account_ids=[12345678])
|
538
|
+
entity_search_queries=[{
|
539
|
+
"query": "name like '%Example application%'",
|
540
|
+
}],
|
541
|
+
scope_account_ids=["12345678"])
|
478
542
|
```
|
479
|
-
<!--End PulumiCodeChooser -->
|
480
543
|
|
481
544
|
Include entities with a set of tags.
|
482
|
-
<!--Start PulumiCodeChooser -->
|
483
545
|
```python
|
484
546
|
import pulumi
|
485
547
|
import pulumi_newrelic as newrelic
|
486
548
|
|
487
549
|
foo = newrelic.plugins.Workload("foo",
|
488
|
-
|
550
|
+
name="Example workload with tags",
|
551
|
+
account_id="12345678",
|
489
552
|
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
490
|
-
entity_search_queries=[
|
491
|
-
query
|
492
|
-
|
493
|
-
scope_account_ids=[12345678])
|
553
|
+
entity_search_queries=[{
|
554
|
+
"query": "tags.accountId = '12345678' AND tags.environment='production' AND tags.language='java'",
|
555
|
+
}],
|
556
|
+
scope_account_ids=["12345678"])
|
494
557
|
```
|
495
|
-
<!--End PulumiCodeChooser -->
|
496
558
|
|
497
559
|
Include entities with a set of tags.
|
498
|
-
<!--Start PulumiCodeChooser -->
|
499
560
|
```python
|
500
561
|
import pulumi
|
501
562
|
import pulumi_newrelic as newrelic
|
502
563
|
|
503
564
|
foo = newrelic.plugins.Workload("foo",
|
504
|
-
|
565
|
+
name="Example workload with tags",
|
566
|
+
account_id="12345678",
|
505
567
|
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
506
|
-
entity_search_queries=[
|
507
|
-
query
|
508
|
-
|
509
|
-
scope_account_ids=[12345678])
|
568
|
+
entity_search_queries=[{
|
569
|
+
"query": "tags.accountId = '12345678' AND tags.environment='production' AND tags.language='java'",
|
570
|
+
}],
|
571
|
+
scope_account_ids=["12345678"])
|
510
572
|
```
|
511
|
-
<!--End PulumiCodeChooser -->
|
512
573
|
|
513
574
|
Include automatic status
|
514
575
|
|
515
576
|
> 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
577
|
|
578
|
+
```python
|
579
|
+
import pulumi
|
580
|
+
import pulumi_newrelic as newrelic
|
581
|
+
|
582
|
+
foo = newrelic.plugins.Workload("foo",
|
583
|
+
name="Example workload",
|
584
|
+
account_id="12345678",
|
585
|
+
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
586
|
+
entity_search_queries=[{
|
587
|
+
"query": "name like '%Example application%'",
|
588
|
+
}],
|
589
|
+
scope_account_ids=["12345678"],
|
590
|
+
description="Description",
|
591
|
+
status_config_automatic={
|
592
|
+
"enabled": True,
|
593
|
+
"remaining_entities_rule": {
|
594
|
+
"remaining_entities_rule_rollup": {
|
595
|
+
"strategy": "BEST_STATUS_WINS",
|
596
|
+
"threshold_type": "FIXED",
|
597
|
+
"threshold_value": 100,
|
598
|
+
"group_by": "ENTITY_TYPE",
|
599
|
+
},
|
600
|
+
},
|
601
|
+
"rules": [{
|
602
|
+
"entity_guids": ["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
603
|
+
"nrql_queries": [{
|
604
|
+
"query": "name like '%Example application2%'",
|
605
|
+
}],
|
606
|
+
"rollup": {
|
607
|
+
"strategy": "BEST_STATUS_WINS",
|
608
|
+
"threshold_type": "FIXED",
|
609
|
+
"threshold_value": 100,
|
610
|
+
},
|
611
|
+
}],
|
612
|
+
})
|
613
|
+
```
|
614
|
+
|
615
|
+
Include static status
|
616
|
+
|
617
|
+
> 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)
|
618
|
+
|
619
|
+
```python
|
620
|
+
import pulumi
|
621
|
+
import pulumi_newrelic as newrelic
|
622
|
+
|
623
|
+
foo = newrelic.plugins.Workload("foo",
|
624
|
+
name="Example workload",
|
625
|
+
account_id="12345678",
|
626
|
+
entity_guids=["MjUyMDUyOHxBUE18QVBQTElDQVRJT058MjE1MDM3Nzk1"],
|
627
|
+
entity_search_queries=[{
|
628
|
+
"query": "name like '%Example application%'",
|
629
|
+
}],
|
630
|
+
scope_account_ids=["12345678"],
|
631
|
+
description="Description",
|
632
|
+
status_config_static={
|
633
|
+
"description": "test",
|
634
|
+
"enabled": True,
|
635
|
+
"status": "OPERATIONAL",
|
636
|
+
"summary": "summary of the status",
|
637
|
+
})
|
638
|
+
```
|
639
|
+
|
517
640
|
## Import
|
518
641
|
|
519
642
|
New Relic workloads can be imported using a concatenated string of the format
|
@@ -541,14 +664,14 @@ class Workload(pulumi.CustomResource):
|
|
541
664
|
def _internal_init(__self__,
|
542
665
|
resource_name: str,
|
543
666
|
opts: Optional[pulumi.ResourceOptions] = None,
|
544
|
-
account_id: Optional[pulumi.Input[
|
667
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
545
668
|
description: Optional[pulumi.Input[str]] = None,
|
546
669
|
entity_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
547
|
-
entity_search_queries: Optional[pulumi.Input[Sequence[pulumi.Input[
|
670
|
+
entity_search_queries: Optional[pulumi.Input[Sequence[pulumi.Input[Union['WorkloadEntitySearchQueryArgs', 'WorkloadEntitySearchQueryArgsDict']]]]] = None,
|
548
671
|
name: Optional[pulumi.Input[str]] = None,
|
549
|
-
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
550
|
-
status_config_automatic: Optional[pulumi.Input[
|
551
|
-
status_config_static: Optional[pulumi.Input[
|
672
|
+
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
673
|
+
status_config_automatic: Optional[pulumi.Input[Union['WorkloadStatusConfigAutomaticArgs', 'WorkloadStatusConfigAutomaticArgsDict']]] = None,
|
674
|
+
status_config_static: Optional[pulumi.Input[Union['WorkloadStatusConfigStaticArgs', 'WorkloadStatusConfigStaticArgsDict']]] = None,
|
552
675
|
__props__=None):
|
553
676
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
554
677
|
if not isinstance(opts, pulumi.ResourceOptions):
|
@@ -580,18 +703,18 @@ class Workload(pulumi.CustomResource):
|
|
580
703
|
def get(resource_name: str,
|
581
704
|
id: pulumi.Input[str],
|
582
705
|
opts: Optional[pulumi.ResourceOptions] = None,
|
583
|
-
account_id: Optional[pulumi.Input[
|
706
|
+
account_id: Optional[pulumi.Input[str]] = None,
|
584
707
|
composite_entity_search_query: Optional[pulumi.Input[str]] = None,
|
585
708
|
description: Optional[pulumi.Input[str]] = None,
|
586
709
|
entity_guids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
587
|
-
entity_search_queries: Optional[pulumi.Input[Sequence[pulumi.Input[
|
710
|
+
entity_search_queries: Optional[pulumi.Input[Sequence[pulumi.Input[Union['WorkloadEntitySearchQueryArgs', 'WorkloadEntitySearchQueryArgsDict']]]]] = None,
|
588
711
|
guid: Optional[pulumi.Input[str]] = None,
|
589
712
|
name: Optional[pulumi.Input[str]] = None,
|
590
713
|
permalink: Optional[pulumi.Input[str]] = None,
|
591
|
-
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[
|
592
|
-
status_config_automatic: Optional[pulumi.Input[
|
593
|
-
status_config_static: Optional[pulumi.Input[
|
594
|
-
workload_id: Optional[pulumi.Input[
|
714
|
+
scope_account_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
|
715
|
+
status_config_automatic: Optional[pulumi.Input[Union['WorkloadStatusConfigAutomaticArgs', 'WorkloadStatusConfigAutomaticArgsDict']]] = None,
|
716
|
+
status_config_static: Optional[pulumi.Input[Union['WorkloadStatusConfigStaticArgs', 'WorkloadStatusConfigStaticArgsDict']]] = None,
|
717
|
+
workload_id: Optional[pulumi.Input[str]] = None) -> 'Workload':
|
595
718
|
"""
|
596
719
|
Get an existing Workload resource's state with the given name, id, and optional extra
|
597
720
|
properties used to qualify the lookup.
|
@@ -599,18 +722,18 @@ class Workload(pulumi.CustomResource):
|
|
599
722
|
:param str resource_name: The unique name of the resulting resource.
|
600
723
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
601
724
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
602
|
-
:param pulumi.Input[
|
725
|
+
:param pulumi.Input[str] account_id: The New Relic account ID where you want to create the workload.
|
603
726
|
:param pulumi.Input[str] composite_entity_search_query: The composite query used to compose a dynamic workload.
|
604
727
|
:param pulumi.Input[str] description: Relevant information about the workload.
|
605
728
|
: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[
|
729
|
+
:param pulumi.Input[Sequence[pulumi.Input[Union['WorkloadEntitySearchQueryArgs', 'WorkloadEntitySearchQueryArgsDict']]]] 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.
|
607
730
|
:param pulumi.Input[str] guid: The unique entity identifier of the workload in New Relic.
|
608
731
|
:param pulumi.Input[str] name: The workload's name.
|
609
732
|
:param pulumi.Input[str] permalink: The URL of the workload.
|
610
|
-
:param pulumi.Input[Sequence[pulumi.Input[
|
611
|
-
:param pulumi.Input[
|
612
|
-
:param pulumi.Input[
|
613
|
-
:param pulumi.Input[
|
733
|
+
:param pulumi.Input[Sequence[pulumi.Input[str]]] scope_account_ids: A list of account IDs that will be used to get entities from.
|
734
|
+
:param pulumi.Input[Union['WorkloadStatusConfigAutomaticArgs', 'WorkloadStatusConfigAutomaticArgsDict']] status_config_automatic: An input object used to represent an automatic status configuration.See Nested status_config_automatic blocks below for details.
|
735
|
+
:param pulumi.Input[Union['WorkloadStatusConfigStaticArgs', 'WorkloadStatusConfigStaticArgsDict']] 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.
|
736
|
+
:param pulumi.Input[str] workload_id: The unique entity identifier of the workload.
|
614
737
|
"""
|
615
738
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
616
739
|
|
@@ -632,7 +755,7 @@ class Workload(pulumi.CustomResource):
|
|
632
755
|
|
633
756
|
@property
|
634
757
|
@pulumi.getter(name="accountId")
|
635
|
-
def account_id(self) -> pulumi.Output[
|
758
|
+
def account_id(self) -> pulumi.Output[str]:
|
636
759
|
"""
|
637
760
|
The New Relic account ID where you want to create the workload.
|
638
761
|
"""
|
@@ -696,7 +819,7 @@ class Workload(pulumi.CustomResource):
|
|
696
819
|
|
697
820
|
@property
|
698
821
|
@pulumi.getter(name="scopeAccountIds")
|
699
|
-
def scope_account_ids(self) -> pulumi.Output[Sequence[
|
822
|
+
def scope_account_ids(self) -> pulumi.Output[Sequence[str]]:
|
700
823
|
"""
|
701
824
|
A list of account IDs that will be used to get entities from.
|
702
825
|
"""
|
@@ -720,7 +843,7 @@ class Workload(pulumi.CustomResource):
|
|
720
843
|
|
721
844
|
@property
|
722
845
|
@pulumi.getter(name="workloadId")
|
723
|
-
def workload_id(self) -> pulumi.Output[
|
846
|
+
def workload_id(self) -> pulumi.Output[str]:
|
724
847
|
"""
|
725
848
|
The unique entity identifier of the workload.
|
726
849
|
"""
|