pulumi-newrelic 5.23.0__py3-none-any.whl → 5.23.0a1711605988__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 (68) hide show
  1. pulumi_newrelic/_inputs.py +270 -183
  2. pulumi_newrelic/account_management.py +20 -20
  3. pulumi_newrelic/alert_channel.py +92 -76
  4. pulumi_newrelic/alert_condition.py +163 -104
  5. pulumi_newrelic/alert_muting_rule.py +35 -33
  6. pulumi_newrelic/alert_policy.py +43 -68
  7. pulumi_newrelic/alert_policy_channel.py +8 -12
  8. pulumi_newrelic/cloud/_inputs.py +1072 -322
  9. pulumi_newrelic/cloud/aws_govcloud_link_account.py +6 -4
  10. pulumi_newrelic/cloud/aws_integrations.py +15 -13
  11. pulumi_newrelic/cloud/aws_link_account.py +6 -4
  12. pulumi_newrelic/cloud/azure_integrations.py +12 -10
  13. pulumi_newrelic/cloud/azure_link_account.py +6 -4
  14. pulumi_newrelic/cloud/gcp_integrations.py +6 -6
  15. pulumi_newrelic/cloud/gcp_link_account.py +6 -4
  16. pulumi_newrelic/cloud/outputs.py +1072 -322
  17. pulumi_newrelic/data_partition_rule.py +4 -0
  18. pulumi_newrelic/entity_tags.py +17 -13
  19. pulumi_newrelic/events_to_metrics_rule.py +4 -2
  20. pulumi_newrelic/get_account.py +4 -0
  21. pulumi_newrelic/get_application.py +10 -8
  22. pulumi_newrelic/get_authentication_domain.py +8 -4
  23. pulumi_newrelic/get_cloud_account.py +4 -0
  24. pulumi_newrelic/get_entity.py +33 -48
  25. pulumi_newrelic/get_group.py +8 -42
  26. pulumi_newrelic/get_key_transaction.py +10 -8
  27. pulumi_newrelic/get_notification_destination.py +1 -20
  28. pulumi_newrelic/get_obfuscation_expression.py +4 -2
  29. pulumi_newrelic/get_service_level_alert_helper.py +46 -22
  30. pulumi_newrelic/get_test_grok_pattern.py +6 -4
  31. pulumi_newrelic/get_user.py +4 -0
  32. pulumi_newrelic/group.py +42 -40
  33. pulumi_newrelic/infra_alert_condition.py +145 -154
  34. pulumi_newrelic/insights/event.py +25 -8
  35. pulumi_newrelic/log_parsing_rule.py +10 -6
  36. pulumi_newrelic/monitor_downtime.py +193 -174
  37. pulumi_newrelic/notification_channel.py +150 -124
  38. pulumi_newrelic/notification_destination.py +1 -95
  39. pulumi_newrelic/nrql_alert_condition.py +48 -38
  40. pulumi_newrelic/nrql_drop_rule.py +38 -34
  41. pulumi_newrelic/obfuscation_expression.py +4 -2
  42. pulumi_newrelic/obfuscation_rule.py +4 -4
  43. pulumi_newrelic/one_dashboard.py +48 -42
  44. pulumi_newrelic/one_dashboard_raw.py +86 -86
  45. pulumi_newrelic/outputs.py +270 -180
  46. pulumi_newrelic/plugins/_inputs.py +16 -16
  47. pulumi_newrelic/plugins/application_settings.py +36 -20
  48. pulumi_newrelic/plugins/outputs.py +16 -16
  49. pulumi_newrelic/plugins/workload.py +40 -158
  50. pulumi_newrelic/service_level.py +123 -38
  51. pulumi_newrelic/synthetics/alert_condition.py +78 -34
  52. pulumi_newrelic/synthetics/broken_links_monitor.py +20 -18
  53. pulumi_newrelic/synthetics/cert_check_monitor.py +18 -16
  54. pulumi_newrelic/synthetics/get_private_location.py +8 -0
  55. pulumi_newrelic/synthetics/get_secure_credential.py +12 -0
  56. pulumi_newrelic/synthetics/monitor.py +52 -48
  57. pulumi_newrelic/synthetics/multi_location_alert_condition.py +83 -69
  58. pulumi_newrelic/synthetics/private_location.py +6 -6
  59. pulumi_newrelic/synthetics/script_monitor.py +42 -38
  60. pulumi_newrelic/synthetics/secure_credential.py +22 -25
  61. pulumi_newrelic/synthetics/step_monitor.py +20 -18
  62. pulumi_newrelic/user.py +10 -8
  63. pulumi_newrelic/workflow.py +24 -20
  64. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/METADATA +1 -1
  65. pulumi_newrelic-5.23.0a1711605988.dist-info/RECORD +89 -0
  66. pulumi_newrelic-5.23.0.dist-info/RECORD +0 -89
  67. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/WHEEL +0 -0
  68. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711605988.dist-info}/top_level.txt +0 -0
@@ -248,6 +248,7 @@ class DataPartitionRule(pulumi.CustomResource):
248
248
 
249
249
  ## Example Usage
250
250
 
251
+ <!--Start PulumiCodeChooser -->
251
252
  ```python
252
253
  import pulumi
253
254
  import pulumi_newrelic as newrelic
@@ -259,6 +260,7 @@ class DataPartitionRule(pulumi.CustomResource):
259
260
  retention_policy="STANDARD",
260
261
  target_data_partition="Log_name")
261
262
  ```
263
+ <!--End PulumiCodeChooser -->
262
264
 
263
265
  ## Additional Information
264
266
 
@@ -294,6 +296,7 @@ class DataPartitionRule(pulumi.CustomResource):
294
296
 
295
297
  ## Example Usage
296
298
 
299
+ <!--Start PulumiCodeChooser -->
297
300
  ```python
298
301
  import pulumi
299
302
  import pulumi_newrelic as newrelic
@@ -305,6 +308,7 @@ class DataPartitionRule(pulumi.CustomResource):
305
308
  retention_policy="STANDARD",
306
309
  target_data_partition="Log_name")
307
310
  ```
311
+ <!--End PulumiCodeChooser -->
308
312
 
309
313
  ## Additional Information
310
314
 
@@ -21,7 +21,7 @@ class EntityTagsArgs:
21
21
  """
22
22
  The set of arguments for constructing a EntityTags resource.
23
23
  :param pulumi.Input[str] guid: The guid of the entity to tag.
24
- :param pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]] tags: A set of key-value pairs to represent a tag. For example: Team:TeamName
24
+ :param pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
25
25
  """
26
26
  pulumi.set(__self__, "guid", guid)
27
27
  pulumi.set(__self__, "tags", tags)
@@ -42,7 +42,7 @@ class EntityTagsArgs:
42
42
  @pulumi.getter
43
43
  def tags(self) -> pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]]:
44
44
  """
45
- A set of key-value pairs to represent a tag. For example: Team:TeamName
45
+ A nested block that describes an entity tag. See Nested tag blocks below for details.
46
46
  """
47
47
  return pulumi.get(self, "tags")
48
48
 
@@ -59,7 +59,7 @@ class _EntityTagsState:
59
59
  """
60
60
  Input properties used for looking up and filtering EntityTags resources.
61
61
  :param pulumi.Input[str] guid: The guid of the entity to tag.
62
- :param pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]] tags: A set of key-value pairs to represent a tag. For example: Team:TeamName
62
+ :param pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
63
63
  """
64
64
  if guid is not None:
65
65
  pulumi.set(__self__, "guid", guid)
@@ -82,7 +82,7 @@ class _EntityTagsState:
82
82
  @pulumi.getter
83
83
  def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]]]:
84
84
  """
85
- A set of key-value pairs to represent a tag. For example: Team:TeamName
85
+ A nested block that describes an entity tag. See Nested tag blocks below for details.
86
86
  """
87
87
  return pulumi.get(self, "tags")
88
88
 
@@ -104,15 +104,16 @@ class EntityTags(pulumi.CustomResource):
104
104
 
105
105
  ## Example Usage
106
106
 
107
+ <!--Start PulumiCodeChooser -->
107
108
  ```python
108
109
  import pulumi
109
110
  import pulumi_newrelic as newrelic
110
111
 
111
- foo = newrelic.get_entity(name="Example application",
112
+ foo_entity = newrelic.get_entity(name="Example application",
112
113
  type="APPLICATION",
113
114
  domain="APM")
114
- foo_entity_tags = newrelic.EntityTags("foo",
115
- guid=foo.guid,
115
+ foo_entity_tags = newrelic.EntityTags("fooEntityTags",
116
+ guid=foo_entity.guid,
116
117
  tags=[
117
118
  newrelic.EntityTagsTagArgs(
118
119
  key="my-key",
@@ -127,6 +128,7 @@ class EntityTags(pulumi.CustomResource):
127
128
  ),
128
129
  ])
129
130
  ```
131
+ <!--End PulumiCodeChooser -->
130
132
 
131
133
  ## Import
132
134
 
@@ -143,7 +145,7 @@ class EntityTags(pulumi.CustomResource):
143
145
  :param str resource_name: The name of the resource.
144
146
  :param pulumi.ResourceOptions opts: Options for the resource.
145
147
  :param pulumi.Input[str] guid: The guid of the entity to tag.
146
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A set of key-value pairs to represent a tag. For example: Team:TeamName
148
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
147
149
  """
148
150
  ...
149
151
  @overload
@@ -156,15 +158,16 @@ class EntityTags(pulumi.CustomResource):
156
158
 
157
159
  ## Example Usage
158
160
 
161
+ <!--Start PulumiCodeChooser -->
159
162
  ```python
160
163
  import pulumi
161
164
  import pulumi_newrelic as newrelic
162
165
 
163
- foo = newrelic.get_entity(name="Example application",
166
+ foo_entity = newrelic.get_entity(name="Example application",
164
167
  type="APPLICATION",
165
168
  domain="APM")
166
- foo_entity_tags = newrelic.EntityTags("foo",
167
- guid=foo.guid,
169
+ foo_entity_tags = newrelic.EntityTags("fooEntityTags",
170
+ guid=foo_entity.guid,
168
171
  tags=[
169
172
  newrelic.EntityTagsTagArgs(
170
173
  key="my-key",
@@ -179,6 +182,7 @@ class EntityTags(pulumi.CustomResource):
179
182
  ),
180
183
  ])
181
184
  ```
185
+ <!--End PulumiCodeChooser -->
182
186
 
183
187
  ## Import
184
188
 
@@ -244,7 +248,7 @@ class EntityTags(pulumi.CustomResource):
244
248
  :param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
245
249
  :param pulumi.ResourceOptions opts: Options for the resource.
246
250
  :param pulumi.Input[str] guid: The guid of the entity to tag.
247
- :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A set of key-value pairs to represent a tag. For example: Team:TeamName
251
+ :param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A nested block that describes an entity tag. See Nested tag blocks below for details.
248
252
  """
249
253
  opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
250
254
 
@@ -266,7 +270,7 @@ class EntityTags(pulumi.CustomResource):
266
270
  @pulumi.getter
267
271
  def tags(self) -> pulumi.Output[Sequence['outputs.EntityTagsTag']]:
268
272
  """
269
- A set of key-value pairs to represent a tag. For example: Team:TeamName
273
+ A nested block that describes an entity tag. See Nested tag blocks below for details.
270
274
  """
271
275
  return pulumi.get(self, "tags")
272
276
 
@@ -218,16 +218,17 @@ class EventsToMetricsRule(pulumi.CustomResource):
218
218
 
219
219
  ## Example Usage
220
220
 
221
+ <!--Start PulumiCodeChooser -->
221
222
  ```python
222
223
  import pulumi
223
224
  import pulumi_newrelic as newrelic
224
225
 
225
226
  foo = newrelic.EventsToMetricsRule("foo",
226
227
  account_id=12345,
227
- name="Example events to metrics rule",
228
228
  description="Example description",
229
229
  nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
230
230
  ```
231
+ <!--End PulumiCodeChooser -->
231
232
 
232
233
  ## Import
233
234
 
@@ -260,16 +261,17 @@ class EventsToMetricsRule(pulumi.CustomResource):
260
261
 
261
262
  ## Example Usage
262
263
 
264
+ <!--Start PulumiCodeChooser -->
263
265
  ```python
264
266
  import pulumi
265
267
  import pulumi_newrelic as newrelic
266
268
 
267
269
  foo = newrelic.EventsToMetricsRule("foo",
268
270
  account_id=12345,
269
- name="Example events to metrics rule",
270
271
  description="Example description",
271
272
  nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
272
273
  ```
274
+ <!--End PulumiCodeChooser -->
273
275
 
274
276
  ## Import
275
277
 
@@ -82,12 +82,14 @@ def get_account(account_id: Optional[int] = None,
82
82
 
83
83
  ## Example Usage
84
84
 
85
+ <!--Start PulumiCodeChooser -->
85
86
  ```python
86
87
  import pulumi
87
88
  import pulumi_newrelic as newrelic
88
89
 
89
90
  acc = newrelic.get_account(scope="global")
90
91
  ```
92
+ <!--End PulumiCodeChooser -->
91
93
 
92
94
 
93
95
  :param int account_id: The account ID in New Relic.
@@ -120,12 +122,14 @@ def get_account_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
120
122
 
121
123
  ## Example Usage
122
124
 
125
+ <!--Start PulumiCodeChooser -->
123
126
  ```python
124
127
  import pulumi
125
128
  import pulumi_newrelic as newrelic
126
129
 
127
130
  acc = newrelic.get_account(scope="global")
128
131
  ```
132
+ <!--End PulumiCodeChooser -->
129
133
 
130
134
 
131
135
  :param int account_id: The account ID in New Relic.
@@ -86,15 +86,15 @@ def get_application(name: Optional[str] = None,
86
86
 
87
87
  ## Example Usage
88
88
 
89
+ <!--Start PulumiCodeChooser -->
89
90
  ```python
90
91
  import pulumi
91
92
  import pulumi_newrelic as newrelic
92
93
 
93
94
  app = newrelic.get_application(name="my-app")
94
- foo = newrelic.AlertPolicy("foo", name="foo")
95
- foo_alert_condition = newrelic.AlertCondition("foo",
96
- policy_id=foo.id,
97
- name="foo",
95
+ foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
96
+ foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
97
+ policy_id=foo_alert_policy.id,
98
98
  type="apm_app_metric",
99
99
  entities=[app.id],
100
100
  metric="apdex",
@@ -107,6 +107,7 @@ def get_application(name: Optional[str] = None,
107
107
  time_function="all",
108
108
  )])
109
109
  ```
110
+ <!--End PulumiCodeChooser -->
110
111
 
111
112
 
112
113
  :param str name: The name of the application in New Relic.
@@ -133,15 +134,15 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
133
134
 
134
135
  ## Example Usage
135
136
 
137
+ <!--Start PulumiCodeChooser -->
136
138
  ```python
137
139
  import pulumi
138
140
  import pulumi_newrelic as newrelic
139
141
 
140
142
  app = newrelic.get_application(name="my-app")
141
- foo = newrelic.AlertPolicy("foo", name="foo")
142
- foo_alert_condition = newrelic.AlertCondition("foo",
143
- policy_id=foo.id,
144
- name="foo",
143
+ foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
144
+ foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
145
+ policy_id=foo_alert_policy.id,
145
146
  type="apm_app_metric",
146
147
  entities=[app.id],
147
148
  metric="apdex",
@@ -154,6 +155,7 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
154
155
  time_function="all",
155
156
  )])
156
157
  ```
158
+ <!--End PulumiCodeChooser -->
157
159
 
158
160
 
159
161
  :param str name: The name of the application in New Relic.
@@ -60,13 +60,15 @@ def get_authentication_domain(name: Optional[str] = None,
60
60
 
61
61
  ## Example Usage
62
62
 
63
+ <!--Start PulumiCodeChooser -->
63
64
  ```python
64
65
  import pulumi
65
66
  import pulumi_newrelic as newrelic
66
67
 
67
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
68
- pulumi.export("foo", foo.id)
68
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
69
+ pulumi.export("foo", foo_authentication_domain.id)
69
70
  ```
71
+ <!--End PulumiCodeChooser -->
70
72
 
71
73
 
72
74
  :param str name: The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
@@ -89,13 +91,15 @@ def get_authentication_domain_output(name: Optional[pulumi.Input[str]] = None,
89
91
 
90
92
  ## Example Usage
91
93
 
94
+ <!--Start PulumiCodeChooser -->
92
95
  ```python
93
96
  import pulumi
94
97
  import pulumi_newrelic as newrelic
95
98
 
96
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
97
- pulumi.export("foo", foo.id)
99
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
100
+ pulumi.export("foo", foo_authentication_domain.id)
98
101
  ```
102
+ <!--End PulumiCodeChooser -->
99
103
 
100
104
 
101
105
  :param str name: The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
@@ -81,6 +81,7 @@ def get_cloud_account(account_id: Optional[int] = None,
81
81
 
82
82
  ## Example Usage
83
83
 
84
+ <!--Start PulumiCodeChooser -->
84
85
  ```python
85
86
  import pulumi
86
87
  import pulumi_newrelic as newrelic
@@ -89,6 +90,7 @@ def get_cloud_account(account_id: Optional[int] = None,
89
90
  cloud_provider="aws",
90
91
  name="my aws account")
91
92
  ```
93
+ <!--End PulumiCodeChooser -->
92
94
 
93
95
 
94
96
  :param int account_id: The account ID in New Relic.
@@ -120,6 +122,7 @@ def get_cloud_account_output(account_id: Optional[pulumi.Input[Optional[int]]] =
120
122
 
121
123
  ## Example Usage
122
124
 
125
+ <!--Start PulumiCodeChooser -->
123
126
  ```python
124
127
  import pulumi
125
128
  import pulumi_newrelic as newrelic
@@ -128,6 +131,7 @@ def get_cloud_account_output(account_id: Optional[pulumi.Input[Optional[int]]] =
128
131
  cloud_provider="aws",
129
132
  name="my aws account")
130
133
  ```
134
+ <!--End PulumiCodeChooser -->
131
135
 
132
136
 
133
137
  :param int account_id: The account ID in New Relic.
@@ -23,7 +23,7 @@ class GetEntityResult:
23
23
  """
24
24
  A collection of values returned by getEntity.
25
25
  """
26
- def __init__(__self__, account_id=None, application_id=None, domain=None, guid=None, id=None, ignore_case=None, ignore_not_found=None, name=None, serving_apm_application_id=None, tags=None, type=None):
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
27
  if account_id and not isinstance(account_id, int):
28
28
  raise TypeError("Expected argument 'account_id' to be a int")
29
29
  pulumi.set(__self__, "account_id", account_id)
@@ -42,9 +42,6 @@ class GetEntityResult:
42
42
  if ignore_case and not isinstance(ignore_case, bool):
43
43
  raise TypeError("Expected argument 'ignore_case' to be a bool")
44
44
  pulumi.set(__self__, "ignore_case", ignore_case)
45
- if ignore_not_found and not isinstance(ignore_not_found, bool):
46
- raise TypeError("Expected argument 'ignore_not_found' to be a bool")
47
- pulumi.set(__self__, "ignore_not_found", ignore_not_found)
48
45
  if name and not isinstance(name, str):
49
46
  raise TypeError("Expected argument 'name' to be a str")
50
47
  pulumi.set(__self__, "name", name)
@@ -97,11 +94,6 @@ class GetEntityResult:
97
94
  def ignore_case(self) -> Optional[bool]:
98
95
  return pulumi.get(self, "ignore_case")
99
96
 
100
- @property
101
- @pulumi.getter(name="ignoreNotFound")
102
- def ignore_not_found(self) -> Optional[bool]:
103
- return pulumi.get(self, "ignore_not_found")
104
-
105
97
  @property
106
98
  @pulumi.getter
107
99
  def name(self) -> str:
@@ -138,7 +130,6 @@ class AwaitableGetEntityResult(GetEntityResult):
138
130
  guid=self.guid,
139
131
  id=self.id,
140
132
  ignore_case=self.ignore_case,
141
- ignore_not_found=self.ignore_not_found,
142
133
  name=self.name,
143
134
  serving_apm_application_id=self.serving_apm_application_id,
144
135
  tags=self.tags,
@@ -148,7 +139,6 @@ class AwaitableGetEntityResult(GetEntityResult):
148
139
  def get_entity(account_id: Optional[int] = None,
149
140
  domain: Optional[str] = None,
150
141
  ignore_case: Optional[bool] = None,
151
- ignore_not_found: Optional[bool] = None,
152
142
  name: Optional[str] = None,
153
143
  tags: Optional[Sequence[pulumi.InputType['GetEntityTagArgs']]] = None,
154
144
  type: Optional[str] = None,
@@ -162,50 +152,51 @@ def get_entity(account_id: Optional[int] = None,
162
152
 
163
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.
164
154
 
155
+ <!--Start PulumiCodeChooser -->
165
156
  ```python
166
157
  import pulumi
167
158
  import pulumi_newrelic as newrelic
168
159
 
169
- # The entity returned by this configuration would have to
170
- # belong to the account_id specified in the provider
171
- # configuration, i.e. NEW_RELIC_ACCOUNT_ID.
172
- app = newrelic.get_entity(name="my-app",
173
- domain="APM",
160
+ app = newrelic.get_entity(domain="APM",
161
+ name="my-app",
174
162
  type="APPLICATION")
175
163
  ```
164
+ <!--End PulumiCodeChooser -->
176
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 -->
177
167
  ```python
178
168
  import pulumi
179
169
  import pulumi_newrelic as newrelic
180
170
 
181
- # The entity returned by this configuration, unlike in
182
- # the above example, would have to belong to the account_id
183
- # specified in the configuration below, i.e. 654321.
184
- app = newrelic.get_entity(name="my-app",
185
- account_id=654321,
171
+ app = newrelic.get_entity(account_id=654321,
186
172
  domain="APM",
173
+ name="my-app",
187
174
  type="APPLICATION")
188
175
  ```
176
+ <!--End PulumiCodeChooser -->
189
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.
190
178
 
191
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`.
192
180
  ### Query for an OTEL entity
193
181
 
182
+ <!--Start PulumiCodeChooser -->
194
183
  ```python
195
184
  import pulumi
196
185
  import pulumi_newrelic as newrelic
197
186
 
198
- app = newrelic.get_entity(name="my-otel-app",
199
- domain="EXT",
200
- type="SERVICE",
187
+ app = newrelic.get_entity(domain="EXT",
188
+ name="my-otel-app",
201
189
  tags=[newrelic.GetEntityTagArgs(
202
190
  key="accountID",
203
191
  value="12345",
204
- )])
192
+ )],
193
+ type="SERVICE")
205
194
  ```
195
+ <!--End PulumiCodeChooser -->
206
196
 
207
197
  ### Query for an entity by type (AWS Lambda entity in this example)
208
198
 
199
+ <!--Start PulumiCodeChooser -->
209
200
  ```python
210
201
  import pulumi
211
202
  import pulumi_newrelic as newrelic
@@ -213,14 +204,12 @@ def get_entity(account_id: Optional[int] = None,
213
204
  app = newrelic.get_entity(name="my_lambda_trace",
214
205
  type="AWSLAMBDAFUNCTION")
215
206
  ```
207
+ <!--End PulumiCodeChooser -->
216
208
 
217
209
 
218
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.
219
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.
220
212
  :param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
221
- :param 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`.
222
-
223
- > **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.
224
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.
225
214
  :param Sequence[pulumi.InputType['GetEntityTagArgs']] tags: A tag applied to the entity. See Nested tag blocks below for details.
226
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.
@@ -229,7 +218,6 @@ def get_entity(account_id: Optional[int] = None,
229
218
  __args__['accountId'] = account_id
230
219
  __args__['domain'] = domain
231
220
  __args__['ignoreCase'] = ignore_case
232
- __args__['ignoreNotFound'] = ignore_not_found
233
221
  __args__['name'] = name
234
222
  __args__['tags'] = tags
235
223
  __args__['type'] = type
@@ -243,7 +231,6 @@ def get_entity(account_id: Optional[int] = None,
243
231
  guid=pulumi.get(__ret__, 'guid'),
244
232
  id=pulumi.get(__ret__, 'id'),
245
233
  ignore_case=pulumi.get(__ret__, 'ignore_case'),
246
- ignore_not_found=pulumi.get(__ret__, 'ignore_not_found'),
247
234
  name=pulumi.get(__ret__, 'name'),
248
235
  serving_apm_application_id=pulumi.get(__ret__, 'serving_apm_application_id'),
249
236
  tags=pulumi.get(__ret__, 'tags'),
@@ -254,7 +241,6 @@ def get_entity(account_id: Optional[int] = None,
254
241
  def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
255
242
  domain: Optional[pulumi.Input[Optional[str]]] = None,
256
243
  ignore_case: Optional[pulumi.Input[Optional[bool]]] = None,
257
- ignore_not_found: Optional[pulumi.Input[Optional[bool]]] = None,
258
244
  name: Optional[pulumi.Input[str]] = None,
259
245
  tags: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEntityTagArgs']]]]] = None,
260
246
  type: Optional[pulumi.Input[Optional[str]]] = None,
@@ -268,50 +254,51 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
268
254
 
269
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.
270
256
 
257
+ <!--Start PulumiCodeChooser -->
271
258
  ```python
272
259
  import pulumi
273
260
  import pulumi_newrelic as newrelic
274
261
 
275
- # The entity returned by this configuration would have to
276
- # belong to the account_id specified in the provider
277
- # configuration, i.e. NEW_RELIC_ACCOUNT_ID.
278
- app = newrelic.get_entity(name="my-app",
279
- domain="APM",
262
+ app = newrelic.get_entity(domain="APM",
263
+ name="my-app",
280
264
  type="APPLICATION")
281
265
  ```
266
+ <!--End PulumiCodeChooser -->
282
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 -->
283
269
  ```python
284
270
  import pulumi
285
271
  import pulumi_newrelic as newrelic
286
272
 
287
- # The entity returned by this configuration, unlike in
288
- # the above example, would have to belong to the account_id
289
- # specified in the configuration below, i.e. 654321.
290
- app = newrelic.get_entity(name="my-app",
291
- account_id=654321,
273
+ app = newrelic.get_entity(account_id=654321,
292
274
  domain="APM",
275
+ name="my-app",
293
276
  type="APPLICATION")
294
277
  ```
278
+ <!--End PulumiCodeChooser -->
295
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.
296
280
 
297
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`.
298
282
  ### Query for an OTEL entity
299
283
 
284
+ <!--Start PulumiCodeChooser -->
300
285
  ```python
301
286
  import pulumi
302
287
  import pulumi_newrelic as newrelic
303
288
 
304
- app = newrelic.get_entity(name="my-otel-app",
305
- domain="EXT",
306
- type="SERVICE",
289
+ app = newrelic.get_entity(domain="EXT",
290
+ name="my-otel-app",
307
291
  tags=[newrelic.GetEntityTagArgs(
308
292
  key="accountID",
309
293
  value="12345",
310
- )])
294
+ )],
295
+ type="SERVICE")
311
296
  ```
297
+ <!--End PulumiCodeChooser -->
312
298
 
313
299
  ### Query for an entity by type (AWS Lambda entity in this example)
314
300
 
301
+ <!--Start PulumiCodeChooser -->
315
302
  ```python
316
303
  import pulumi
317
304
  import pulumi_newrelic as newrelic
@@ -319,14 +306,12 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
319
306
  app = newrelic.get_entity(name="my_lambda_trace",
320
307
  type="AWSLAMBDAFUNCTION")
321
308
  ```
309
+ <!--End PulumiCodeChooser -->
322
310
 
323
311
 
324
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.
325
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.
326
314
  :param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
327
- :param 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`.
328
-
329
- > **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.
330
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.
331
316
  :param Sequence[pulumi.InputType['GetEntityTagArgs']] tags: A tag applied to the entity. See Nested tag blocks below for details.
332
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.
@@ -84,33 +84,16 @@ def get_group(authentication_domain_id: Optional[str] = None,
84
84
 
85
85
  The below example illustrates fetching the ID of a group (and IDs of users who belong to the group, if any) using the required arguments.
86
86
 
87
+ <!--Start PulumiCodeChooser -->
87
88
  ```python
88
89
  import pulumi
89
90
  import pulumi_newrelic as newrelic
90
91
 
91
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
92
- foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
92
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
93
+ foo_group = newrelic.get_group(authentication_domain_id=foo_authentication_domain.id,
93
94
  name="Test Group")
94
95
  ```
95
-
96
- ## Additional Examples
97
-
98
- The following example demonstrates utilizing attributes exported by this data source.
99
-
100
- In order to directly reference the attributes `id` and `user_ids` from this data source, you can use the syntax `data.newrelic_group.foo.id` and `data.newrelic_group.foo.user_ids`, respectively. However, if you need to assign these values to local variables and perform further processing (such as conditionally formatting the `user_ids` attribute as shown in the example below), consider using the provided configuration. These variables can then be accessed elsewhere using the syntax `local.id` and `local.user_id`, respectively.
101
-
102
- ```python
103
- import pulumi
104
- import pulumi_newrelic as newrelic
105
- import pulumi_std as std
106
-
107
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
108
- foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
109
- name="Test Group")
110
- id = foo_get_group.id
111
- user_ids = std.join(separator=", ",
112
- input=foo_get_group.user_ids).result if len(foo_get_group.user_ids) > 0 else ""
113
- ```
96
+ <!--End PulumiCodeChooser -->
114
97
 
115
98
 
116
99
  :param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
@@ -142,33 +125,16 @@ def get_group_output(authentication_domain_id: Optional[pulumi.Input[str]] = Non
142
125
 
143
126
  The below example illustrates fetching the ID of a group (and IDs of users who belong to the group, if any) using the required arguments.
144
127
 
128
+ <!--Start PulumiCodeChooser -->
145
129
  ```python
146
130
  import pulumi
147
131
  import pulumi_newrelic as newrelic
148
132
 
149
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
150
- foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
151
- name="Test Group")
152
- ```
153
-
154
- ## Additional Examples
155
-
156
- The following example demonstrates utilizing attributes exported by this data source.
157
-
158
- In order to directly reference the attributes `id` and `user_ids` from this data source, you can use the syntax `data.newrelic_group.foo.id` and `data.newrelic_group.foo.user_ids`, respectively. However, if you need to assign these values to local variables and perform further processing (such as conditionally formatting the `user_ids` attribute as shown in the example below), consider using the provided configuration. These variables can then be accessed elsewhere using the syntax `local.id` and `local.user_id`, respectively.
159
-
160
- ```python
161
- import pulumi
162
- import pulumi_newrelic as newrelic
163
- import pulumi_std as std
164
-
165
- foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
166
- foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
133
+ foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
134
+ foo_group = newrelic.get_group(authentication_domain_id=foo_authentication_domain.id,
167
135
  name="Test Group")
168
- id = foo_get_group.id
169
- user_ids = std.join(separator=", ",
170
- input=foo_get_group.user_ids).result if len(foo_get_group.user_ids) > 0 else ""
171
136
  ```
137
+ <!--End PulumiCodeChooser -->
172
138
 
173
139
 
174
140
  :param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.