pulumi-newrelic 5.20.0a1709365820__py3-none-any.whl → 5.21.0__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 (72) hide show
  1. pulumi_newrelic/__init__.py +10 -0
  2. pulumi_newrelic/_inputs.py +69 -29
  3. pulumi_newrelic/account_management.py +6 -2
  4. pulumi_newrelic/alert_channel.py +34 -2
  5. pulumi_newrelic/alert_condition.py +26 -2
  6. pulumi_newrelic/alert_muting_rule.py +6 -2
  7. pulumi_newrelic/alert_policy.py +48 -4
  8. pulumi_newrelic/alert_policy_channel.py +8 -4
  9. pulumi_newrelic/api_access_key.py +6 -26
  10. pulumi_newrelic/browser_application.py +6 -2
  11. pulumi_newrelic/cloud/aws_govcloud_integrations.py +2 -2
  12. pulumi_newrelic/cloud/aws_govcloud_link_account.py +6 -2
  13. pulumi_newrelic/cloud/aws_integrations.py +6 -2
  14. pulumi_newrelic/cloud/aws_link_account.py +6 -2
  15. pulumi_newrelic/cloud/azure_integrations.py +6 -2
  16. pulumi_newrelic/cloud/azure_link_account.py +6 -2
  17. pulumi_newrelic/cloud/gcp_integrations.py +6 -2
  18. pulumi_newrelic/cloud/gcp_link_account.py +6 -2
  19. pulumi_newrelic/data_partition_rule.py +8 -2
  20. pulumi_newrelic/entity_tags.py +8 -4
  21. pulumi_newrelic/events_to_metrics_rule.py +8 -4
  22. pulumi_newrelic/get_account.py +4 -0
  23. pulumi_newrelic/get_alert_policy.py +3 -3
  24. pulumi_newrelic/get_application.py +4 -0
  25. pulumi_newrelic/get_authentication_domain.py +4 -0
  26. pulumi_newrelic/get_cloud_account.py +4 -0
  27. pulumi_newrelic/get_entity.py +66 -4
  28. pulumi_newrelic/get_group.py +145 -0
  29. pulumi_newrelic/get_key_transaction.py +4 -0
  30. pulumi_newrelic/get_notification_destination.py +14 -1
  31. pulumi_newrelic/get_obfuscation_expression.py +4 -0
  32. pulumi_newrelic/get_service_level_alert_helper.py +12 -0
  33. pulumi_newrelic/get_test_grok_pattern.py +4 -0
  34. pulumi_newrelic/get_user.py +10 -6
  35. pulumi_newrelic/group.py +426 -0
  36. pulumi_newrelic/infra_alert_condition.py +33 -9
  37. pulumi_newrelic/insights/event.py +6 -0
  38. pulumi_newrelic/log_parsing_rule.py +12 -2
  39. pulumi_newrelic/monitor_downtime.py +28 -2
  40. pulumi_newrelic/notification_channel.py +72 -0
  41. pulumi_newrelic/notification_destination.py +160 -2
  42. pulumi_newrelic/nrql_alert_condition.py +28 -4
  43. pulumi_newrelic/nrql_drop_rule.py +30 -4
  44. pulumi_newrelic/obfuscation_expression.py +6 -2
  45. pulumi_newrelic/obfuscation_rule.py +6 -2
  46. pulumi_newrelic/one_dashboard.py +2 -2
  47. pulumi_newrelic/one_dashboard_json.py +2 -2
  48. pulumi_newrelic/one_dashboard_raw.py +6 -0
  49. pulumi_newrelic/outputs.py +78 -29
  50. pulumi_newrelic/plugins/_inputs.py +2 -2
  51. pulumi_newrelic/plugins/application_settings.py +22 -2
  52. pulumi_newrelic/plugins/outputs.py +2 -2
  53. pulumi_newrelic/plugins/workload.py +112 -4
  54. pulumi_newrelic/service_level.py +20 -6
  55. pulumi_newrelic/synthetics/alert_condition.py +26 -2
  56. pulumi_newrelic/synthetics/broken_links_monitor.py +19 -23
  57. pulumi_newrelic/synthetics/cert_check_monitor.py +19 -23
  58. pulumi_newrelic/synthetics/get_private_location.py +8 -0
  59. pulumi_newrelic/synthetics/get_secure_credential.py +4 -0
  60. pulumi_newrelic/synthetics/monitor.py +27 -23
  61. pulumi_newrelic/synthetics/multi_location_alert_condition.py +12 -4
  62. pulumi_newrelic/synthetics/private_location.py +6 -2
  63. pulumi_newrelic/synthetics/script_monitor.py +27 -23
  64. pulumi_newrelic/synthetics/secure_credential.py +6 -2
  65. pulumi_newrelic/synthetics/step_monitor.py +15 -23
  66. pulumi_newrelic/user.py +4 -0
  67. pulumi_newrelic/workflow.py +22 -4
  68. {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0.dist-info}/METADATA +1 -1
  69. pulumi_newrelic-5.21.0.dist-info/RECORD +89 -0
  70. {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0.dist-info}/WHEEL +1 -1
  71. pulumi_newrelic-5.20.0a1709365820.dist-info/RECORD +0 -87
  72. {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0.dist-info}/top_level.txt +0 -0
@@ -1187,6 +1187,7 @@ class AzureIntegrations(pulumi.CustomResource):
1187
1187
 
1188
1188
  Leave an integration block empty to use its default configuration. You can also use the full example, including the Azure set up, found in our guides.
1189
1189
 
1190
+ <!--Start PulumiCodeChooser -->
1190
1191
  ```python
1191
1192
  import pulumi
1192
1193
  import pulumi_newrelic as newrelic
@@ -1336,12 +1337,13 @@ class AzureIntegrations(pulumi.CustomResource):
1336
1337
  resource_groups=["resource_groups"],
1337
1338
  ))
1338
1339
  ```
1340
+ <!--End PulumiCodeChooser -->
1339
1341
 
1340
1342
  ## Import
1341
1343
 
1342
1344
  Linked Azure accounts can be imported using `id`, you can find the `id` of existing Azure linked accounts in Azure dashboard under Infrastructure in NewRelic.
1343
1345
 
1344
- bash
1346
+ bash
1345
1347
 
1346
1348
  ```sh
1347
1349
  $ pulumi import newrelic:cloud/azureIntegrations:AzureIntegrations foo <id>
@@ -1409,6 +1411,7 @@ class AzureIntegrations(pulumi.CustomResource):
1409
1411
 
1410
1412
  Leave an integration block empty to use its default configuration. You can also use the full example, including the Azure set up, found in our guides.
1411
1413
 
1414
+ <!--Start PulumiCodeChooser -->
1412
1415
  ```python
1413
1416
  import pulumi
1414
1417
  import pulumi_newrelic as newrelic
@@ -1558,12 +1561,13 @@ class AzureIntegrations(pulumi.CustomResource):
1558
1561
  resource_groups=["resource_groups"],
1559
1562
  ))
1560
1563
  ```
1564
+ <!--End PulumiCodeChooser -->
1561
1565
 
1562
1566
  ## Import
1563
1567
 
1564
1568
  Linked Azure accounts can be imported using `id`, you can find the `id` of existing Azure linked accounts in Azure dashboard under Infrastructure in NewRelic.
1565
1569
 
1566
- bash
1570
+ bash
1567
1571
 
1568
1572
  ```sh
1569
1573
  $ pulumi import newrelic:cloud/azureIntegrations:AzureIntegrations foo <id>
@@ -242,6 +242,7 @@ class AzureLinkAccount(pulumi.CustomResource):
242
242
 
243
243
  You can also use the full example, including the Azure set up, found in our guides.
244
244
 
245
+ <!--Start PulumiCodeChooser -->
245
246
  ```python
246
247
  import pulumi
247
248
  import pulumi_newrelic as newrelic
@@ -253,12 +254,13 @@ class AzureLinkAccount(pulumi.CustomResource):
253
254
  subscription_id="Subscription ID of Azure",
254
255
  tenant_id="Tenant ID of the Azure")
255
256
  ```
257
+ <!--End PulumiCodeChooser -->
256
258
 
257
259
  ## Import
258
260
 
259
261
  Linked Azure accounts can be imported using `id`, you can find the `id` of existing Azure linked accounts in Azure dashboard under Infrastructure in NewRelic
260
262
 
261
- bash
263
+ bash
262
264
 
263
265
  ```sh
264
266
  $ pulumi import newrelic:cloud/azureLinkAccount:AzureLinkAccount foo <id>
@@ -294,6 +296,7 @@ class AzureLinkAccount(pulumi.CustomResource):
294
296
 
295
297
  You can also use the full example, including the Azure set up, found in our guides.
296
298
 
299
+ <!--Start PulumiCodeChooser -->
297
300
  ```python
298
301
  import pulumi
299
302
  import pulumi_newrelic as newrelic
@@ -305,12 +308,13 @@ class AzureLinkAccount(pulumi.CustomResource):
305
308
  subscription_id="Subscription ID of Azure",
306
309
  tenant_id="Tenant ID of the Azure")
307
310
  ```
311
+ <!--End PulumiCodeChooser -->
308
312
 
309
313
  ## Import
310
314
 
311
315
  Linked Azure accounts can be imported using `id`, you can find the `id` of existing Azure linked accounts in Azure dashboard under Infrastructure in NewRelic
312
316
 
313
- bash
317
+ bash
314
318
 
315
319
  ```sh
316
320
  $ pulumi import newrelic:cloud/azureLinkAccount:AzureLinkAccount foo <id>
@@ -971,6 +971,7 @@ class GcpIntegrations(pulumi.CustomResource):
971
971
 
972
972
  Leave an integration block empty to use its default configuration. You can also use the full example, including the GCP set up, found in our guides.
973
973
 
974
+ <!--Start PulumiCodeChooser -->
974
975
  ```python
975
976
  import pulumi
976
977
  import pulumi_newrelic as newrelic
@@ -1058,12 +1059,13 @@ class GcpIntegrations(pulumi.CustomResource):
1058
1059
  metrics_polling_interval=400,
1059
1060
  ))
1060
1061
  ```
1062
+ <!--End PulumiCodeChooser -->
1061
1063
 
1062
1064
  ## Import
1063
1065
 
1064
1066
  Linked GCP account integrations can be imported using the `id`, e.g.
1065
1067
 
1066
- bash
1068
+ bash
1067
1069
 
1068
1070
  ```sh
1069
1071
  $ pulumi import newrelic:cloud/gcpIntegrations:GcpIntegrations foo <id>
@@ -1119,6 +1121,7 @@ class GcpIntegrations(pulumi.CustomResource):
1119
1121
 
1120
1122
  Leave an integration block empty to use its default configuration. You can also use the full example, including the GCP set up, found in our guides.
1121
1123
 
1124
+ <!--Start PulumiCodeChooser -->
1122
1125
  ```python
1123
1126
  import pulumi
1124
1127
  import pulumi_newrelic as newrelic
@@ -1206,12 +1209,13 @@ class GcpIntegrations(pulumi.CustomResource):
1206
1209
  metrics_polling_interval=400,
1207
1210
  ))
1208
1211
  ```
1212
+ <!--End PulumiCodeChooser -->
1209
1213
 
1210
1214
  ## Import
1211
1215
 
1212
1216
  Linked GCP account integrations can be imported using the `id`, e.g.
1213
1217
 
1214
- bash
1218
+ bash
1215
1219
 
1216
1220
  ```sh
1217
1221
  $ pulumi import newrelic:cloud/gcpIntegrations:GcpIntegrations foo <id>
@@ -150,6 +150,7 @@ class GcpLinkAccount(pulumi.CustomResource):
150
150
 
151
151
  You can also use the full example, including the GCP set up, found in our guides.
152
152
 
153
+ <!--Start PulumiCodeChooser -->
153
154
  ```python
154
155
  import pulumi
155
156
  import pulumi_newrelic as newrelic
@@ -158,12 +159,13 @@ class GcpLinkAccount(pulumi.CustomResource):
158
159
  account_id="account id of newrelic account",
159
160
  project_id="id of the Project")
160
161
  ```
162
+ <!--End PulumiCodeChooser -->
161
163
 
162
164
  ## Import
163
165
 
164
166
  Linked GCP accounts can be imported using `id`, you can find the `id` of an existing GCP linked accounts in GCP dashboard under Infrastructure in Newrelic Console.
165
167
 
166
- bash
168
+ bash
167
169
 
168
170
  ```sh
169
171
  $ pulumi import newrelic:cloud/gcpLinkAccount:GcpLinkAccount newrelic_cloud_gcp_link_account.foo <id>
@@ -200,6 +202,7 @@ class GcpLinkAccount(pulumi.CustomResource):
200
202
 
201
203
  You can also use the full example, including the GCP set up, found in our guides.
202
204
 
205
+ <!--Start PulumiCodeChooser -->
203
206
  ```python
204
207
  import pulumi
205
208
  import pulumi_newrelic as newrelic
@@ -208,12 +211,13 @@ class GcpLinkAccount(pulumi.CustomResource):
208
211
  account_id="account id of newrelic account",
209
212
  project_id="id of the Project")
210
213
  ```
214
+ <!--End PulumiCodeChooser -->
211
215
 
212
216
  ## Import
213
217
 
214
218
  Linked GCP accounts can be imported using `id`, you can find the `id` of an existing GCP linked accounts in GCP dashboard under Infrastructure in Newrelic Console.
215
219
 
216
- bash
220
+ bash
217
221
 
218
222
  ```sh
219
223
  $ pulumi import newrelic:cloud/gcpLinkAccount:GcpLinkAccount newrelic_cloud_gcp_link_account.foo <id>
@@ -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,8 @@ class DataPartitionRule(pulumi.CustomResource):
259
260
  retention_policy="STANDARD",
260
261
  target_data_partition="Log_name")
261
262
  ```
263
+ <!--End PulumiCodeChooser -->
264
+
262
265
  ## Additional Information
263
266
 
264
267
  More details about the data partition can be found [here](https://docs.newrelic.com/docs/logs/ui-data/data-partitions/)
@@ -267,7 +270,7 @@ class DataPartitionRule(pulumi.CustomResource):
267
270
 
268
271
  New Relic data partition rule can be imported using the rule ID, e.g.
269
272
 
270
- bash
273
+ bash
271
274
 
272
275
  ```sh
273
276
  $ pulumi import newrelic:index/dataPartitionRule:DataPartitionRule foo <id>
@@ -293,6 +296,7 @@ class DataPartitionRule(pulumi.CustomResource):
293
296
 
294
297
  ## Example Usage
295
298
 
299
+ <!--Start PulumiCodeChooser -->
296
300
  ```python
297
301
  import pulumi
298
302
  import pulumi_newrelic as newrelic
@@ -304,6 +308,8 @@ class DataPartitionRule(pulumi.CustomResource):
304
308
  retention_policy="STANDARD",
305
309
  target_data_partition="Log_name")
306
310
  ```
311
+ <!--End PulumiCodeChooser -->
312
+
307
313
  ## Additional Information
308
314
 
309
315
  More details about the data partition can be found [here](https://docs.newrelic.com/docs/logs/ui-data/data-partitions/)
@@ -312,7 +318,7 @@ class DataPartitionRule(pulumi.CustomResource):
312
318
 
313
319
  New Relic data partition rule can be imported using the rule ID, e.g.
314
320
 
315
- bash
321
+ bash
316
322
 
317
323
  ```sh
318
324
  $ pulumi import newrelic:index/dataPartitionRule:DataPartitionRule foo <id>
@@ -104,6 +104,7 @@ 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
@@ -127,14 +128,15 @@ class EntityTags(pulumi.CustomResource):
127
128
  ),
128
129
  ])
129
130
  ```
131
+ <!--End PulumiCodeChooser -->
130
132
 
131
133
  ## Import
132
134
 
133
135
  New Relic One entity tags can be imported using a concatenated string of the format
134
136
 
135
- `<guid>`, e.g.
137
+ `<guid>`, e.g.
136
138
 
137
- bash
139
+ bash
138
140
 
139
141
  ```sh
140
142
  $ pulumi import newrelic:index/entityTags:EntityTags foo MjUyMDUyOHxBUE18QVBRTElDQVRJT058MjE1MDM3Nzk1
@@ -156,6 +158,7 @@ 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
@@ -179,14 +182,15 @@ class EntityTags(pulumi.CustomResource):
179
182
  ),
180
183
  ])
181
184
  ```
185
+ <!--End PulumiCodeChooser -->
182
186
 
183
187
  ## Import
184
188
 
185
189
  New Relic One entity tags can be imported using a concatenated string of the format
186
190
 
187
- `<guid>`, e.g.
191
+ `<guid>`, e.g.
188
192
 
189
- bash
193
+ bash
190
194
 
191
195
  ```sh
192
196
  $ pulumi import newrelic:index/entityTags:EntityTags foo MjUyMDUyOHxBUE18QVBRTElDQVRJT058MjE1MDM3Nzk1
@@ -218,6 +218,7 @@ 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
@@ -227,14 +228,15 @@ class EventsToMetricsRule(pulumi.CustomResource):
227
228
  description="Example description",
228
229
  nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
229
230
  ```
231
+ <!--End PulumiCodeChooser -->
230
232
 
231
233
  ## Import
232
234
 
233
235
  New Relic Events to Metrics rules can be imported using a concatenated string of the format
234
236
 
235
- `<account_id>:<rule_id>`, e.g.
237
+ `<account_id>:<rule_id>`, e.g.
236
238
 
237
- bash
239
+ bash
238
240
 
239
241
  ```sh
240
242
  $ pulumi import newrelic:index/eventsToMetricsRule:EventsToMetricsRule foo 12345:34567
@@ -259,6 +261,7 @@ class EventsToMetricsRule(pulumi.CustomResource):
259
261
 
260
262
  ## Example Usage
261
263
 
264
+ <!--Start PulumiCodeChooser -->
262
265
  ```python
263
266
  import pulumi
264
267
  import pulumi_newrelic as newrelic
@@ -268,14 +271,15 @@ class EventsToMetricsRule(pulumi.CustomResource):
268
271
  description="Example description",
269
272
  nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
270
273
  ```
274
+ <!--End PulumiCodeChooser -->
271
275
 
272
276
  ## Import
273
277
 
274
278
  New Relic Events to Metrics rules can be imported using a concatenated string of the format
275
279
 
276
- `<account_id>:<rule_id>`, e.g.
280
+ `<account_id>:<rule_id>`, e.g.
277
281
 
278
- bash
282
+ bash
279
283
 
280
284
  ```sh
281
285
  $ pulumi import newrelic:index/eventsToMetricsRule:EventsToMetricsRule foo 12345:34567
@@ -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.
@@ -66,7 +66,7 @@ class GetAlertPolicyResult:
66
66
  @pulumi.getter(name="incidentPreference")
67
67
  def incident_preference(self) -> Optional[str]:
68
68
  """
69
- The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
69
+ The rollup strategy for the policy, which can have one of the following values:
70
70
  """
71
71
  return pulumi.get(self, "incident_preference")
72
72
 
@@ -107,7 +107,7 @@ def get_alert_policy(account_id: Optional[int] = None,
107
107
 
108
108
 
109
109
  :param int account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
110
- :param str incident_preference: The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
110
+ :param str incident_preference: The rollup strategy for the policy, which can have one of the following values:
111
111
  :param str name: The name of the alert policy in New Relic.
112
112
  """
113
113
  __args__ = dict()
@@ -136,7 +136,7 @@ def get_alert_policy_output(account_id: Optional[pulumi.Input[Optional[int]]] =
136
136
 
137
137
 
138
138
  :param int account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
139
- :param str incident_preference: The rollup strategy for the policy. Options include: PER_POLICY, PER_CONDITION, or PER_CONDITION_AND_TARGET. The default is PER_POLICY.
139
+ :param str incident_preference: The rollup strategy for the policy, which can have one of the following values:
140
140
  :param str name: The name of the alert policy in New Relic.
141
141
  """
142
142
  ...
@@ -86,6 +86,7 @@ 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
@@ -106,6 +107,7 @@ def get_application(name: Optional[str] = None,
106
107
  time_function="all",
107
108
  )])
108
109
  ```
110
+ <!--End PulumiCodeChooser -->
109
111
 
110
112
 
111
113
  :param str name: The name of the application in New Relic.
@@ -132,6 +134,7 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
132
134
 
133
135
  ## Example Usage
134
136
 
137
+ <!--Start PulumiCodeChooser -->
135
138
  ```python
136
139
  import pulumi
137
140
  import pulumi_newrelic as newrelic
@@ -152,6 +155,7 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
152
155
  time_function="all",
153
156
  )])
154
157
  ```
158
+ <!--End PulumiCodeChooser -->
155
159
 
156
160
 
157
161
  :param str name: The name of the application in New Relic.
@@ -60,6 +60,7 @@ 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
@@ -67,6 +68,7 @@ def get_authentication_domain(name: Optional[str] = None,
67
68
  foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
68
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,6 +91,7 @@ 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
@@ -96,6 +99,7 @@ def get_authentication_domain_output(name: Optional[pulumi.Input[str]] = None,
96
99
  foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
97
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.
@@ -146,12 +146,40 @@ def get_entity(account_id: Optional[int] = None,
146
146
  """
147
147
  Use this data source to get information about a specific entity in New Relic One that already exists.
148
148
 
149
- ## Additional Examples
149
+ ### Example: Filter By Account ID
150
150
 
151
- > If the entities are not found please try again without providing the `type` field.
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
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`.
153
180
  ### Query for an OTEL entity
154
181
 
182
+ <!--Start PulumiCodeChooser -->
155
183
  ```python
156
184
  import pulumi
157
185
  import pulumi_newrelic as newrelic
@@ -164,9 +192,11 @@ def get_entity(account_id: Optional[int] = None,
164
192
  )],
165
193
  type="SERVICE")
166
194
  ```
195
+ <!--End PulumiCodeChooser -->
167
196
 
168
197
  ### Query for an entity by type (AWS Lambda entity in this example)
169
198
 
199
+ <!--Start PulumiCodeChooser -->
170
200
  ```python
171
201
  import pulumi
172
202
  import pulumi_newrelic as newrelic
@@ -174,6 +204,7 @@ def get_entity(account_id: Optional[int] = None,
174
204
  app = newrelic.get_entity(name="my_lambda_trace",
175
205
  type="AWSLAMBDAFUNCTION")
176
206
  ```
207
+ <!--End PulumiCodeChooser -->
177
208
 
178
209
 
179
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.
@@ -217,12 +248,40 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
217
248
  """
218
249
  Use this data source to get information about a specific entity in New Relic One that already exists.
219
250
 
220
- ## Additional Examples
251
+ ### Example: Filter By Account ID
221
252
 
222
- > If the entities are not found please try again without providing the `type` field.
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.
223
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`.
224
282
  ### Query for an OTEL entity
225
283
 
284
+ <!--Start PulumiCodeChooser -->
226
285
  ```python
227
286
  import pulumi
228
287
  import pulumi_newrelic as newrelic
@@ -235,9 +294,11 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
235
294
  )],
236
295
  type="SERVICE")
237
296
  ```
297
+ <!--End PulumiCodeChooser -->
238
298
 
239
299
  ### Query for an entity by type (AWS Lambda entity in this example)
240
300
 
301
+ <!--Start PulumiCodeChooser -->
241
302
  ```python
242
303
  import pulumi
243
304
  import pulumi_newrelic as newrelic
@@ -245,6 +306,7 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
245
306
  app = newrelic.get_entity(name="my_lambda_trace",
246
307
  type="AWSLAMBDAFUNCTION")
247
308
  ```
309
+ <!--End PulumiCodeChooser -->
248
310
 
249
311
 
250
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.