pulumi-newrelic 5.22.0__py3-none-any.whl → 5.58.0a1763707205__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.

Files changed (92) hide show
  1. pulumi_newrelic/__init__.py +28 -1
  2. pulumi_newrelic/_inputs.py +10385 -2976
  3. pulumi_newrelic/_utilities.py +50 -10
  4. pulumi_newrelic/account_management.py +48 -42
  5. pulumi_newrelic/alert_channel.py +165 -175
  6. pulumi_newrelic/alert_condition.py +307 -319
  7. pulumi_newrelic/alert_muting_rule.py +193 -140
  8. pulumi_newrelic/alert_policy.py +121 -117
  9. pulumi_newrelic/alert_policy_channel.py +89 -79
  10. pulumi_newrelic/api_access_key.py +195 -193
  11. pulumi_newrelic/browser_application.py +120 -114
  12. pulumi_newrelic/cloud/__init__.py +3 -1
  13. pulumi_newrelic/cloud/_inputs.py +4267 -2714
  14. pulumi_newrelic/cloud/aws_govcloud_integrations.py +206 -196
  15. pulumi_newrelic/cloud/aws_govcloud_link_account.py +143 -228
  16. pulumi_newrelic/cloud/aws_integrations.py +510 -1490
  17. pulumi_newrelic/cloud/aws_link_account.py +80 -76
  18. pulumi_newrelic/cloud/azure_integrations.py +673 -587
  19. pulumi_newrelic/cloud/azure_link_account.py +121 -117
  20. pulumi_newrelic/cloud/gcp_integrations.py +428 -408
  21. pulumi_newrelic/cloud/gcp_link_account.py +65 -61
  22. pulumi_newrelic/cloud/oci_link_account.py +926 -0
  23. pulumi_newrelic/cloud/outputs.py +1678 -2321
  24. pulumi_newrelic/config/__init__.py +2 -1
  25. pulumi_newrelic/config/__init__.pyi +8 -3
  26. pulumi_newrelic/config/vars.py +22 -17
  27. pulumi_newrelic/data_partition_rule.py +119 -117
  28. pulumi_newrelic/entity_tags.py +111 -53
  29. pulumi_newrelic/events_to_metrics_rule.py +106 -102
  30. pulumi_newrelic/get_account.py +41 -33
  31. pulumi_newrelic/get_alert_channel.py +73 -28
  32. pulumi_newrelic/get_alert_policy.py +82 -33
  33. pulumi_newrelic/get_application.py +51 -43
  34. pulumi_newrelic/get_authentication_domain.py +27 -23
  35. pulumi_newrelic/get_cloud_account.py +43 -35
  36. pulumi_newrelic/get_entity.py +126 -183
  37. pulumi_newrelic/get_group.py +76 -31
  38. pulumi_newrelic/get_key_transaction.py +117 -42
  39. pulumi_newrelic/get_notification_destination.py +75 -38
  40. pulumi_newrelic/get_obfuscation_expression.py +47 -39
  41. pulumi_newrelic/get_service_level_alert_helper.py +189 -171
  42. pulumi_newrelic/get_test_grok_pattern.py +47 -36
  43. pulumi_newrelic/get_user.py +39 -31
  44. pulumi_newrelic/group.py +59 -199
  45. pulumi_newrelic/infra_alert_condition.py +399 -405
  46. pulumi_newrelic/insights/__init__.py +2 -1
  47. pulumi_newrelic/insights/_inputs.py +71 -28
  48. pulumi_newrelic/insights/event.py +54 -52
  49. pulumi_newrelic/insights/outputs.py +28 -23
  50. pulumi_newrelic/key_transaction.py +465 -0
  51. pulumi_newrelic/log_parsing_rule.py +159 -157
  52. pulumi_newrelic/monitor_downtime.py +311 -331
  53. pulumi_newrelic/notification_channel.py +534 -464
  54. pulumi_newrelic/notification_destination.py +238 -141
  55. pulumi_newrelic/nrql_alert_condition.py +820 -614
  56. pulumi_newrelic/nrql_drop_rule.py +113 -151
  57. pulumi_newrelic/obfuscation_expression.py +80 -76
  58. pulumi_newrelic/obfuscation_rule.py +115 -109
  59. pulumi_newrelic/one_dashboard.py +110 -104
  60. pulumi_newrelic/one_dashboard_json.py +69 -63
  61. pulumi_newrelic/one_dashboard_raw.py +212 -206
  62. pulumi_newrelic/outputs.py +4936 -2234
  63. pulumi_newrelic/pipeline_cloud_rule.py +335 -0
  64. pulumi_newrelic/plugins/__init__.py +2 -1
  65. pulumi_newrelic/plugins/_inputs.py +519 -89
  66. pulumi_newrelic/plugins/application_settings.py +463 -187
  67. pulumi_newrelic/plugins/outputs.py +336 -74
  68. pulumi_newrelic/plugins/workload.py +313 -189
  69. pulumi_newrelic/provider.py +156 -142
  70. pulumi_newrelic/pulumi-plugin.json +2 -1
  71. pulumi_newrelic/service_level.py +263 -263
  72. pulumi_newrelic/synthetics/__init__.py +2 -1
  73. pulumi_newrelic/synthetics/_inputs.py +265 -108
  74. pulumi_newrelic/synthetics/alert_condition.py +170 -180
  75. pulumi_newrelic/synthetics/broken_links_monitor.py +297 -249
  76. pulumi_newrelic/synthetics/cert_check_monitor.py +306 -258
  77. pulumi_newrelic/synthetics/get_private_location.py +51 -47
  78. pulumi_newrelic/synthetics/get_secure_credential.py +39 -31
  79. pulumi_newrelic/synthetics/monitor.py +658 -460
  80. pulumi_newrelic/synthetics/multi_location_alert_condition.py +211 -205
  81. pulumi_newrelic/synthetics/outputs.py +92 -87
  82. pulumi_newrelic/synthetics/private_location.py +118 -112
  83. pulumi_newrelic/synthetics/script_monitor.py +613 -373
  84. pulumi_newrelic/synthetics/secure_credential.py +97 -95
  85. pulumi_newrelic/synthetics/step_monitor.py +445 -275
  86. pulumi_newrelic/user.py +84 -80
  87. pulumi_newrelic/workflow.py +336 -322
  88. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +7 -6
  89. pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
  90. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
  91. pulumi_newrelic-5.22.0.dist-info/RECORD +0 -89
  92. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = [
@@ -22,8 +27,8 @@ class GetCloudAccountResult:
22
27
  A collection of values returned by getCloudAccount.
23
28
  """
24
29
  def __init__(__self__, account_id=None, cloud_provider=None, id=None, name=None):
25
- if account_id and not isinstance(account_id, int):
26
- raise TypeError("Expected argument 'account_id' to be a int")
30
+ if account_id and not isinstance(account_id, str):
31
+ raise TypeError("Expected argument 'account_id' to be a str")
27
32
  pulumi.set(__self__, "account_id", account_id)
28
33
  if cloud_provider and not isinstance(cloud_provider, str):
29
34
  raise TypeError("Expected argument 'cloud_provider' to be a str")
@@ -35,27 +40,27 @@ class GetCloudAccountResult:
35
40
  raise TypeError("Expected argument 'name' to be a str")
36
41
  pulumi.set(__self__, "name", name)
37
42
 
38
- @property
43
+ @_builtins.property
39
44
  @pulumi.getter(name="accountId")
40
- def account_id(self) -> Optional[int]:
45
+ def account_id(self) -> Optional[_builtins.str]:
41
46
  return pulumi.get(self, "account_id")
42
47
 
43
- @property
48
+ @_builtins.property
44
49
  @pulumi.getter(name="cloudProvider")
45
- def cloud_provider(self) -> str:
50
+ def cloud_provider(self) -> _builtins.str:
46
51
  return pulumi.get(self, "cloud_provider")
47
52
 
48
- @property
53
+ @_builtins.property
49
54
  @pulumi.getter
50
- def id(self) -> str:
55
+ def id(self) -> _builtins.str:
51
56
  """
52
57
  The provider-assigned unique ID for this managed resource.
53
58
  """
54
59
  return pulumi.get(self, "id")
55
60
 
56
- @property
61
+ @_builtins.property
57
62
  @pulumi.getter
58
- def name(self) -> str:
63
+ def name(self) -> _builtins.str:
59
64
  return pulumi.get(self, "name")
60
65
 
61
66
 
@@ -71,9 +76,9 @@ class AwaitableGetCloudAccountResult(GetCloudAccountResult):
71
76
  name=self.name)
72
77
 
73
78
 
74
- def get_cloud_account(account_id: Optional[int] = None,
75
- cloud_provider: Optional[str] = None,
76
- name: Optional[str] = None,
79
+ def get_cloud_account(account_id: Optional[_builtins.str] = None,
80
+ cloud_provider: Optional[_builtins.str] = None,
81
+ name: Optional[_builtins.str] = None,
77
82
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCloudAccountResult:
78
83
  """
79
84
  Use this data source to get information about a specific cloud account linked to New Relic.
@@ -81,21 +86,19 @@ def get_cloud_account(account_id: Optional[int] = None,
81
86
 
82
87
  ## Example Usage
83
88
 
84
- <!--Start PulumiCodeChooser -->
85
89
  ```python
86
90
  import pulumi
87
91
  import pulumi_newrelic as newrelic
88
92
 
89
- account = newrelic.get_cloud_account(account_id=12345,
93
+ account = newrelic.get_cloud_account(account_id="12345",
90
94
  cloud_provider="aws",
91
95
  name="my aws account")
92
96
  ```
93
- <!--End PulumiCodeChooser -->
94
97
 
95
98
 
96
- :param int account_id: The account ID in New Relic.
97
- :param str cloud_provider: The cloud provider of the account (aws, gcp, azure, etc)
98
- :param str name: The cloud account name in New Relic.
99
+ :param _builtins.str account_id: The account ID in New Relic.
100
+ :param _builtins.str cloud_provider: The cloud provider of the account (aws, gcp, azure, etc)
101
+ :param _builtins.str name: The cloud account name in New Relic.
99
102
  """
100
103
  __args__ = dict()
101
104
  __args__['accountId'] = account_id
@@ -109,33 +112,38 @@ def get_cloud_account(account_id: Optional[int] = None,
109
112
  cloud_provider=pulumi.get(__ret__, 'cloud_provider'),
110
113
  id=pulumi.get(__ret__, 'id'),
111
114
  name=pulumi.get(__ret__, 'name'))
112
-
113
-
114
- @_utilities.lift_output_func(get_cloud_account)
115
- def get_cloud_account_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
116
- cloud_provider: Optional[pulumi.Input[str]] = None,
117
- name: Optional[pulumi.Input[str]] = None,
118
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCloudAccountResult]:
115
+ def get_cloud_account_output(account_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
116
+ cloud_provider: Optional[pulumi.Input[_builtins.str]] = None,
117
+ name: Optional[pulumi.Input[_builtins.str]] = None,
118
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetCloudAccountResult]:
119
119
  """
120
120
  Use this data source to get information about a specific cloud account linked to New Relic.
121
121
  Accounts can be located by a combination of New Relic Account ID, name and cloud provider (aws, gcp, azure, etc). Name and cloud provider are required attributes. If no account_id is specified on the resource the provider level account_id will be used.
122
122
 
123
123
  ## Example Usage
124
124
 
125
- <!--Start PulumiCodeChooser -->
126
125
  ```python
127
126
  import pulumi
128
127
  import pulumi_newrelic as newrelic
129
128
 
130
- account = newrelic.get_cloud_account(account_id=12345,
129
+ account = newrelic.get_cloud_account(account_id="12345",
131
130
  cloud_provider="aws",
132
131
  name="my aws account")
133
132
  ```
134
- <!--End PulumiCodeChooser -->
135
133
 
136
134
 
137
- :param int account_id: The account ID in New Relic.
138
- :param str cloud_provider: The cloud provider of the account (aws, gcp, azure, etc)
139
- :param str name: The cloud account name in New Relic.
135
+ :param _builtins.str account_id: The account ID in New Relic.
136
+ :param _builtins.str cloud_provider: The cloud provider of the account (aws, gcp, azure, etc)
137
+ :param _builtins.str name: The cloud account name in New Relic.
140
138
  """
141
- ...
139
+ __args__ = dict()
140
+ __args__['accountId'] = account_id
141
+ __args__['cloudProvider'] = cloud_provider
142
+ __args__['name'] = name
143
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
144
+ __ret__ = pulumi.runtime.invoke_output('newrelic:index/getCloudAccount:getCloudAccount', __args__, opts=opts, typ=GetCloudAccountResult)
145
+ return __ret__.apply(lambda __response__: GetCloudAccountResult(
146
+ account_id=pulumi.get(__response__, 'account_id'),
147
+ cloud_provider=pulumi.get(__response__, 'cloud_provider'),
148
+ id=pulumi.get(__response__, 'id'),
149
+ name=pulumi.get(__response__, 'name')))
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
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 *
@@ -23,16 +28,19 @@ class GetEntityResult:
23
28
  """
24
29
  A collection of values returned by getEntity.
25
30
  """
26
- def __init__(__self__, account_id=None, application_id=None, domain=None, guid=None, id=None, ignore_case=None, name=None, serving_apm_application_id=None, tags=None, type=None):
27
- if account_id and not isinstance(account_id, int):
28
- raise TypeError("Expected argument 'account_id' to be a int")
31
+ def __init__(__self__, account_id=None, application_id=None, domain=None, entity_tags=None, guid=None, id=None, ignore_case=None, ignore_not_found=None, name=None, serving_apm_application_id=None, tags=None, type=None):
32
+ if account_id and not isinstance(account_id, str):
33
+ raise TypeError("Expected argument 'account_id' to be a str")
29
34
  pulumi.set(__self__, "account_id", account_id)
30
- if application_id and not isinstance(application_id, int):
31
- raise TypeError("Expected argument 'application_id' to be a int")
35
+ if application_id and not isinstance(application_id, str):
36
+ raise TypeError("Expected argument 'application_id' to be a str")
32
37
  pulumi.set(__self__, "application_id", application_id)
33
38
  if domain and not isinstance(domain, str):
34
39
  raise TypeError("Expected argument 'domain' to be a str")
35
40
  pulumi.set(__self__, "domain", domain)
41
+ if entity_tags and not isinstance(entity_tags, str):
42
+ raise TypeError("Expected argument 'entity_tags' to be a str")
43
+ pulumi.set(__self__, "entity_tags", entity_tags)
36
44
  if guid and not isinstance(guid, str):
37
45
  raise TypeError("Expected argument 'guid' to be a str")
38
46
  pulumi.set(__self__, "guid", guid)
@@ -42,11 +50,14 @@ class GetEntityResult:
42
50
  if ignore_case and not isinstance(ignore_case, bool):
43
51
  raise TypeError("Expected argument 'ignore_case' to be a bool")
44
52
  pulumi.set(__self__, "ignore_case", ignore_case)
53
+ if ignore_not_found and not isinstance(ignore_not_found, bool):
54
+ raise TypeError("Expected argument 'ignore_not_found' to be a bool")
55
+ pulumi.set(__self__, "ignore_not_found", ignore_not_found)
45
56
  if name and not isinstance(name, str):
46
57
  raise TypeError("Expected argument 'name' to be a str")
47
58
  pulumi.set(__self__, "name", name)
48
- if serving_apm_application_id and not isinstance(serving_apm_application_id, int):
49
- raise TypeError("Expected argument 'serving_apm_application_id' to be a int")
59
+ if serving_apm_application_id and not isinstance(serving_apm_application_id, str):
60
+ raise TypeError("Expected argument 'serving_apm_application_id' to be a str")
50
61
  pulumi.set(__self__, "serving_apm_application_id", serving_apm_application_id)
51
62
  if tags and not isinstance(tags, list):
52
63
  raise TypeError("Expected argument 'tags' to be a list")
@@ -55,66 +66,80 @@ class GetEntityResult:
55
66
  raise TypeError("Expected argument 'type' to be a str")
56
67
  pulumi.set(__self__, "type", type)
57
68
 
58
- @property
69
+ @_builtins.property
59
70
  @pulumi.getter(name="accountId")
60
- def account_id(self) -> int:
71
+ def account_id(self) -> _builtins.str:
61
72
  return pulumi.get(self, "account_id")
62
73
 
63
- @property
74
+ @_builtins.property
64
75
  @pulumi.getter(name="applicationId")
65
- def application_id(self) -> int:
76
+ def application_id(self) -> _builtins.str:
66
77
  """
67
78
  The domain-specific application ID of the entity. Only returned for APM and Browser applications.
68
79
  """
69
80
  return pulumi.get(self, "application_id")
70
81
 
71
- @property
82
+ @_builtins.property
72
83
  @pulumi.getter
73
- def domain(self) -> str:
84
+ def domain(self) -> _builtins.str:
74
85
  return pulumi.get(self, "domain")
75
86
 
76
- @property
87
+ @_builtins.property
88
+ @pulumi.getter(name="entityTags")
89
+ def entity_tags(self) -> _builtins.str:
90
+ """
91
+ A JSON-encoded string, comprising tags associated with the entity fetched.
92
+ * See the **Additional Examples** section below, for an illustration depicting the usage of `jsondecode` with the attribute `entity_tags`, to get the tags associated with the entity fetched.
93
+ """
94
+ return pulumi.get(self, "entity_tags")
95
+
96
+ @_builtins.property
77
97
  @pulumi.getter
78
- def guid(self) -> str:
98
+ def guid(self) -> _builtins.str:
79
99
  """
80
100
  The unique GUID of the entity.
81
101
  """
82
102
  return pulumi.get(self, "guid")
83
103
 
84
- @property
104
+ @_builtins.property
85
105
  @pulumi.getter
86
- def id(self) -> str:
106
+ def id(self) -> _builtins.str:
87
107
  """
88
108
  The provider-assigned unique ID for this managed resource.
89
109
  """
90
110
  return pulumi.get(self, "id")
91
111
 
92
- @property
112
+ @_builtins.property
93
113
  @pulumi.getter(name="ignoreCase")
94
- def ignore_case(self) -> Optional[bool]:
114
+ def ignore_case(self) -> Optional[_builtins.bool]:
95
115
  return pulumi.get(self, "ignore_case")
96
116
 
97
- @property
117
+ @_builtins.property
118
+ @pulumi.getter(name="ignoreNotFound")
119
+ def ignore_not_found(self) -> Optional[_builtins.bool]:
120
+ return pulumi.get(self, "ignore_not_found")
121
+
122
+ @_builtins.property
98
123
  @pulumi.getter
99
- def name(self) -> str:
124
+ def name(self) -> _builtins.str:
100
125
  return pulumi.get(self, "name")
101
126
 
102
- @property
127
+ @_builtins.property
103
128
  @pulumi.getter(name="servingApmApplicationId")
104
- def serving_apm_application_id(self) -> int:
129
+ def serving_apm_application_id(self) -> _builtins.str:
105
130
  """
106
131
  The browser-specific ID of the backing APM entity. Only returned for Browser applications.
107
132
  """
108
133
  return pulumi.get(self, "serving_apm_application_id")
109
134
 
110
- @property
135
+ @_builtins.property
111
136
  @pulumi.getter
112
137
  def tags(self) -> Optional[Sequence['outputs.GetEntityTagResult']]:
113
138
  return pulumi.get(self, "tags")
114
139
 
115
- @property
140
+ @_builtins.property
116
141
  @pulumi.getter
117
- def type(self) -> str:
142
+ def type(self) -> _builtins.str:
118
143
  return pulumi.get(self, "type")
119
144
 
120
145
 
@@ -127,97 +152,47 @@ class AwaitableGetEntityResult(GetEntityResult):
127
152
  account_id=self.account_id,
128
153
  application_id=self.application_id,
129
154
  domain=self.domain,
155
+ entity_tags=self.entity_tags,
130
156
  guid=self.guid,
131
157
  id=self.id,
132
158
  ignore_case=self.ignore_case,
159
+ ignore_not_found=self.ignore_not_found,
133
160
  name=self.name,
134
161
  serving_apm_application_id=self.serving_apm_application_id,
135
162
  tags=self.tags,
136
163
  type=self.type)
137
164
 
138
165
 
139
- def get_entity(account_id: Optional[int] = None,
140
- domain: Optional[str] = None,
141
- ignore_case: Optional[bool] = None,
142
- name: Optional[str] = None,
143
- tags: Optional[Sequence[pulumi.InputType['GetEntityTagArgs']]] = None,
144
- type: Optional[str] = None,
166
+ def get_entity(account_id: Optional[_builtins.str] = None,
167
+ domain: Optional[_builtins.str] = None,
168
+ entity_tags: Optional[_builtins.str] = None,
169
+ ignore_case: Optional[_builtins.bool] = None,
170
+ ignore_not_found: Optional[_builtins.bool] = None,
171
+ name: Optional[_builtins.str] = None,
172
+ tags: Optional[Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']]] = None,
173
+ type: Optional[_builtins.str] = None,
145
174
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEntityResult:
146
175
  """
147
- Use this data source to get information about a specific entity in New Relic One that already exists.
148
-
149
- ### Example: Filter By Account ID
150
-
151
- The default behaviour of this data source is to retrieve entities matching the specified parameters (such as `name`, `domain`, `type`) from NerdGraph with the credentials specified in the configuration of the provider (account ID and API Key), filter them by the account ID specified in the configuration of the provider, and return the first match.
152
-
153
- This would mean, if no entity with the specified search parameters is found associated with the account ID in the configuration of the provider, i.e. `NEW_RELIC_ACCOUNT_ID`, an error is thrown, stating that no matching entity has been found.
154
-
155
- <!--Start PulumiCodeChooser -->
156
- ```python
157
- import pulumi
158
- import pulumi_newrelic as newrelic
159
-
160
- app = newrelic.get_entity(domain="APM",
161
- name="my-app",
162
- type="APPLICATION")
163
- ```
164
- <!--End PulumiCodeChooser -->
165
- However, in order to cater to scenarios in which it could be necessary to retrieve an entity belonging to a subaccount using the account ID and API Key of the parent account (for instance, when entities with identical names are present in both the parent account and subaccounts, since matching entities from subaccounts too are returned by NerdGraph), the `account_id` attribute of this data source may be availed. This ensures that the account ID in the configuration of the provider, used to filter entities returned by the API is now overridden by the `account_id` specified in the configuration; i.e., in the below example, the data source would now return an entity matching the specified `name`, belonging to the account with the ID `account_id`.
166
- <!--Start PulumiCodeChooser -->
167
- ```python
168
- import pulumi
169
- import pulumi_newrelic as newrelic
170
-
171
- app = newrelic.get_entity(account_id=654321,
172
- domain="APM",
173
- name="my-app",
174
- type="APPLICATION")
175
- ```
176
- <!--End PulumiCodeChooser -->
177
- The following example explains a use case along the lines of the aforementioned; using the `account_id` argument in the data source to allow the filtering criteria to be the `account_id` specified (of the subaccount), and not the account ID in the provider configuration.
178
-
179
- In simpler terms, when entities are queried from the parent account, entities with matching names are returned from subaccounts too, hence, specifying the `account_id` of the subaccount in the configuration allows the entity returned to belong to the subaccount with `account_id`.
180
- ### Query for an OTEL entity
181
-
182
- <!--Start PulumiCodeChooser -->
183
- ```python
184
- import pulumi
185
- import pulumi_newrelic as newrelic
186
-
187
- app = newrelic.get_entity(domain="EXT",
188
- name="my-otel-app",
189
- tags=[newrelic.GetEntityTagArgs(
190
- key="accountID",
191
- value="12345",
192
- )],
193
- type="SERVICE")
194
- ```
195
- <!--End PulumiCodeChooser -->
196
-
197
- ### Query for an entity by type (AWS Lambda entity in this example)
198
-
199
- <!--Start PulumiCodeChooser -->
200
- ```python
201
- import pulumi
202
- import pulumi_newrelic as newrelic
203
-
204
- app = newrelic.get_entity(name="my_lambda_trace",
205
- type="AWSLAMBDAFUNCTION")
206
- ```
207
- <!--End PulumiCodeChooser -->
208
-
209
-
210
- :param int account_id: The New Relic account ID the entity to be returned would be associated with, i.e. if specified, the data source would filter matching entities received by `account_id` and return the first match. If not, matching entities are filtered by the account ID specified in the configuration of the provider. See the **Example: Filter By Account ID** section above for more details.
211
- :param str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
212
- :param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
213
- :param str name: The name of the entity in New Relic One. The first entity matching this name for the given search parameters will be returned.
214
- :param Sequence[pulumi.InputType['GetEntityTagArgs']] tags: A tag applied to the entity. See Nested tag blocks below for details.
215
- :param str type: The entity's type. Valid values are APPLICATION, DASHBOARD, HOST, MONITOR, WORKLOAD, AWSLAMBDAFUNCTION, SERVICE_LEVEL, and KEY_TRANSACTION. Note: Other entity types may also be queryable as the list of entity types may fluctuate over time.
176
+ Use this data source to access information about an existing resource.
177
+
178
+ :param _builtins.str account_id: The New Relic account ID the entity to be returned would be associated with, i.e. if specified, the data source would filter matching entities received by `account_id` and return the first match. If not, matching entities are filtered by the account ID specified in the configuration of the provider. See the **Example: Filter By Account ID** section above for more details.
179
+ :param _builtins.str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
180
+ :param _builtins.str entity_tags: A JSON-encoded string, comprising tags associated with the entity fetched.
181
+ * See the **Additional Examples** section below, for an illustration depicting the usage of `jsondecode` with the attribute `entity_tags`, to get the tags associated with the entity fetched.
182
+ :param _builtins.bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
183
+ :param _builtins.bool ignore_not_found: A boolean argument that, when set to true, prevents an error from being thrown when the queried entity is not found. Instead, a warning is displayed. Defaults to `false`.
184
+
185
+ > **WARNING:** Setting the `ignore_not_found` argument to `true` will display an 'entity not found' warning instead of throwing an error. This can lead to downstream errors if the values of attributes exported by this data source are used elsewhere, as all of these values would be null. Please use this argument at your own risk.
186
+ :param _builtins.str name: The name of the entity in New Relic One. The first entity matching this name for the given search parameters will be returned.
187
+ :param Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']] tags: A tag applied to the entity. See Nested tag blocks below for details.
188
+ :param _builtins.str type: The entity's type. Valid values are APPLICATION, DASHBOARD, HOST, MONITOR, WORKLOAD, AWSLAMBDAFUNCTION, SERVICE_LEVEL, and KEY_TRANSACTION. Note: Other entity types may also be queryable as the list of entity types may fluctuate over time.
216
189
  """
217
190
  __args__ = dict()
218
191
  __args__['accountId'] = account_id
219
192
  __args__['domain'] = domain
193
+ __args__['entityTags'] = entity_tags
220
194
  __args__['ignoreCase'] = ignore_case
195
+ __args__['ignoreNotFound'] = ignore_not_found
221
196
  __args__['name'] = name
222
197
  __args__['tags'] = tags
223
198
  __args__['type'] = type
@@ -228,92 +203,60 @@ def get_entity(account_id: Optional[int] = None,
228
203
  account_id=pulumi.get(__ret__, 'account_id'),
229
204
  application_id=pulumi.get(__ret__, 'application_id'),
230
205
  domain=pulumi.get(__ret__, 'domain'),
206
+ entity_tags=pulumi.get(__ret__, 'entity_tags'),
231
207
  guid=pulumi.get(__ret__, 'guid'),
232
208
  id=pulumi.get(__ret__, 'id'),
233
209
  ignore_case=pulumi.get(__ret__, 'ignore_case'),
210
+ ignore_not_found=pulumi.get(__ret__, 'ignore_not_found'),
234
211
  name=pulumi.get(__ret__, 'name'),
235
212
  serving_apm_application_id=pulumi.get(__ret__, 'serving_apm_application_id'),
236
213
  tags=pulumi.get(__ret__, 'tags'),
237
214
  type=pulumi.get(__ret__, 'type'))
238
-
239
-
240
- @_utilities.lift_output_func(get_entity)
241
- def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
242
- domain: Optional[pulumi.Input[Optional[str]]] = None,
243
- ignore_case: Optional[pulumi.Input[Optional[bool]]] = None,
244
- name: Optional[pulumi.Input[str]] = None,
245
- tags: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEntityTagArgs']]]]] = None,
246
- type: Optional[pulumi.Input[Optional[str]]] = None,
247
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetEntityResult]:
215
+ def get_entity_output(account_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
216
+ domain: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
217
+ entity_tags: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
218
+ ignore_case: Optional[pulumi.Input[Optional[_builtins.bool]]] = None,
219
+ ignore_not_found: Optional[pulumi.Input[Optional[_builtins.bool]]] = None,
220
+ name: Optional[pulumi.Input[_builtins.str]] = None,
221
+ tags: Optional[pulumi.Input[Optional[Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']]]]] = None,
222
+ type: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
223
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetEntityResult]:
248
224
  """
249
- Use this data source to get information about a specific entity in New Relic One that already exists.
250
-
251
- ### Example: Filter By Account ID
252
-
253
- The default behaviour of this data source is to retrieve entities matching the specified parameters (such as `name`, `domain`, `type`) from NerdGraph with the credentials specified in the configuration of the provider (account ID and API Key), filter them by the account ID specified in the configuration of the provider, and return the first match.
254
-
255
- This would mean, if no entity with the specified search parameters is found associated with the account ID in the configuration of the provider, i.e. `NEW_RELIC_ACCOUNT_ID`, an error is thrown, stating that no matching entity has been found.
256
-
257
- <!--Start PulumiCodeChooser -->
258
- ```python
259
- import pulumi
260
- import pulumi_newrelic as newrelic
261
-
262
- app = newrelic.get_entity(domain="APM",
263
- name="my-app",
264
- type="APPLICATION")
265
- ```
266
- <!--End PulumiCodeChooser -->
267
- However, in order to cater to scenarios in which it could be necessary to retrieve an entity belonging to a subaccount using the account ID and API Key of the parent account (for instance, when entities with identical names are present in both the parent account and subaccounts, since matching entities from subaccounts too are returned by NerdGraph), the `account_id` attribute of this data source may be availed. This ensures that the account ID in the configuration of the provider, used to filter entities returned by the API is now overridden by the `account_id` specified in the configuration; i.e., in the below example, the data source would now return an entity matching the specified `name`, belonging to the account with the ID `account_id`.
268
- <!--Start PulumiCodeChooser -->
269
- ```python
270
- import pulumi
271
- import pulumi_newrelic as newrelic
272
-
273
- app = newrelic.get_entity(account_id=654321,
274
- domain="APM",
275
- name="my-app",
276
- type="APPLICATION")
277
- ```
278
- <!--End PulumiCodeChooser -->
279
- The following example explains a use case along the lines of the aforementioned; using the `account_id` argument in the data source to allow the filtering criteria to be the `account_id` specified (of the subaccount), and not the account ID in the provider configuration.
280
-
281
- In simpler terms, when entities are queried from the parent account, entities with matching names are returned from subaccounts too, hence, specifying the `account_id` of the subaccount in the configuration allows the entity returned to belong to the subaccount with `account_id`.
282
- ### Query for an OTEL entity
283
-
284
- <!--Start PulumiCodeChooser -->
285
- ```python
286
- import pulumi
287
- import pulumi_newrelic as newrelic
288
-
289
- app = newrelic.get_entity(domain="EXT",
290
- name="my-otel-app",
291
- tags=[newrelic.GetEntityTagArgs(
292
- key="accountID",
293
- value="12345",
294
- )],
295
- type="SERVICE")
296
- ```
297
- <!--End PulumiCodeChooser -->
298
-
299
- ### Query for an entity by type (AWS Lambda entity in this example)
300
-
301
- <!--Start PulumiCodeChooser -->
302
- ```python
303
- import pulumi
304
- import pulumi_newrelic as newrelic
305
-
306
- app = newrelic.get_entity(name="my_lambda_trace",
307
- type="AWSLAMBDAFUNCTION")
308
- ```
309
- <!--End PulumiCodeChooser -->
310
-
311
-
312
- :param int account_id: The New Relic account ID the entity to be returned would be associated with, i.e. if specified, the data source would filter matching entities received by `account_id` and return the first match. If not, matching entities are filtered by the account ID specified in the configuration of the provider. See the **Example: Filter By Account ID** section above for more details.
313
- :param str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
314
- :param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
315
- :param str name: The name of the entity in New Relic One. The first entity matching this name for the given search parameters will be returned.
316
- :param Sequence[pulumi.InputType['GetEntityTagArgs']] tags: A tag applied to the entity. See Nested tag blocks below for details.
317
- :param str type: The entity's type. Valid values are APPLICATION, DASHBOARD, HOST, MONITOR, WORKLOAD, AWSLAMBDAFUNCTION, SERVICE_LEVEL, and KEY_TRANSACTION. Note: Other entity types may also be queryable as the list of entity types may fluctuate over time.
225
+ Use this data source to access information about an existing resource.
226
+
227
+ :param _builtins.str account_id: The New Relic account ID the entity to be returned would be associated with, i.e. if specified, the data source would filter matching entities received by `account_id` and return the first match. If not, matching entities are filtered by the account ID specified in the configuration of the provider. See the **Example: Filter By Account ID** section above for more details.
228
+ :param _builtins.str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
229
+ :param _builtins.str entity_tags: A JSON-encoded string, comprising tags associated with the entity fetched.
230
+ * See the **Additional Examples** section below, for an illustration depicting the usage of `jsondecode` with the attribute `entity_tags`, to get the tags associated with the entity fetched.
231
+ :param _builtins.bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
232
+ :param _builtins.bool ignore_not_found: A boolean argument that, when set to true, prevents an error from being thrown when the queried entity is not found. Instead, a warning is displayed. Defaults to `false`.
233
+
234
+ > **WARNING:** Setting the `ignore_not_found` argument to `true` will display an 'entity not found' warning instead of throwing an error. This can lead to downstream errors if the values of attributes exported by this data source are used elsewhere, as all of these values would be null. Please use this argument at your own risk.
235
+ :param _builtins.str name: The name of the entity in New Relic One. The first entity matching this name for the given search parameters will be returned.
236
+ :param Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']] tags: A tag applied to the entity. See Nested tag blocks below for details.
237
+ :param _builtins.str type: The entity's type. Valid values are APPLICATION, DASHBOARD, HOST, MONITOR, WORKLOAD, AWSLAMBDAFUNCTION, SERVICE_LEVEL, and KEY_TRANSACTION. Note: Other entity types may also be queryable as the list of entity types may fluctuate over time.
318
238
  """
319
- ...
239
+ __args__ = dict()
240
+ __args__['accountId'] = account_id
241
+ __args__['domain'] = domain
242
+ __args__['entityTags'] = entity_tags
243
+ __args__['ignoreCase'] = ignore_case
244
+ __args__['ignoreNotFound'] = ignore_not_found
245
+ __args__['name'] = name
246
+ __args__['tags'] = tags
247
+ __args__['type'] = type
248
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
249
+ __ret__ = pulumi.runtime.invoke_output('newrelic:index/getEntity:getEntity', __args__, opts=opts, typ=GetEntityResult)
250
+ return __ret__.apply(lambda __response__: GetEntityResult(
251
+ account_id=pulumi.get(__response__, 'account_id'),
252
+ application_id=pulumi.get(__response__, 'application_id'),
253
+ domain=pulumi.get(__response__, 'domain'),
254
+ entity_tags=pulumi.get(__response__, 'entity_tags'),
255
+ guid=pulumi.get(__response__, 'guid'),
256
+ id=pulumi.get(__response__, 'id'),
257
+ ignore_case=pulumi.get(__response__, 'ignore_case'),
258
+ ignore_not_found=pulumi.get(__response__, 'ignore_not_found'),
259
+ name=pulumi.get(__response__, 'name'),
260
+ serving_apm_application_id=pulumi.get(__response__, 'serving_apm_application_id'),
261
+ tags=pulumi.get(__response__, 'tags'),
262
+ type=pulumi.get(__response__, 'type')))