pulumi-newrelic 5.23.0__py3-none-any.whl → 5.23.0a1711707796__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 +32 -28
  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.0a1711707796.dist-info}/METADATA +1 -1
  65. pulumi_newrelic-5.23.0a1711707796.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.0a1711707796.dist-info}/WHEEL +0 -0
  68. {pulumi_newrelic-5.23.0.dist-info → pulumi_newrelic-5.23.0a1711707796.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.
@@ -162,50 +162,51 @@ def get_entity(account_id: Optional[int] = None,
162
162
 
163
163
  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
164
 
165
+ <!--Start PulumiCodeChooser -->
165
166
  ```python
166
167
  import pulumi
167
168
  import pulumi_newrelic as newrelic
168
169
 
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",
170
+ app = newrelic.get_entity(domain="APM",
171
+ name="my-app",
174
172
  type="APPLICATION")
175
173
  ```
174
+ <!--End PulumiCodeChooser -->
176
175
  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`.
176
+ <!--Start PulumiCodeChooser -->
177
177
  ```python
178
178
  import pulumi
179
179
  import pulumi_newrelic as newrelic
180
180
 
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,
181
+ app = newrelic.get_entity(account_id=654321,
186
182
  domain="APM",
183
+ name="my-app",
187
184
  type="APPLICATION")
188
185
  ```
186
+ <!--End PulumiCodeChooser -->
189
187
  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
188
 
191
189
  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
190
  ### Query for an OTEL entity
193
191
 
192
+ <!--Start PulumiCodeChooser -->
194
193
  ```python
195
194
  import pulumi
196
195
  import pulumi_newrelic as newrelic
197
196
 
198
- app = newrelic.get_entity(name="my-otel-app",
199
- domain="EXT",
200
- type="SERVICE",
197
+ app = newrelic.get_entity(domain="EXT",
198
+ name="my-otel-app",
201
199
  tags=[newrelic.GetEntityTagArgs(
202
200
  key="accountID",
203
201
  value="12345",
204
- )])
202
+ )],
203
+ type="SERVICE")
205
204
  ```
205
+ <!--End PulumiCodeChooser -->
206
206
 
207
207
  ### Query for an entity by type (AWS Lambda entity in this example)
208
208
 
209
+ <!--Start PulumiCodeChooser -->
209
210
  ```python
210
211
  import pulumi
211
212
  import pulumi_newrelic as newrelic
@@ -213,6 +214,7 @@ def get_entity(account_id: Optional[int] = None,
213
214
  app = newrelic.get_entity(name="my_lambda_trace",
214
215
  type="AWSLAMBDAFUNCTION")
215
216
  ```
217
+ <!--End PulumiCodeChooser -->
216
218
 
217
219
 
218
220
  :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.
@@ -268,50 +270,51 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
268
270
 
269
271
  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
272
 
273
+ <!--Start PulumiCodeChooser -->
271
274
  ```python
272
275
  import pulumi
273
276
  import pulumi_newrelic as newrelic
274
277
 
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",
278
+ app = newrelic.get_entity(domain="APM",
279
+ name="my-app",
280
280
  type="APPLICATION")
281
281
  ```
282
+ <!--End PulumiCodeChooser -->
282
283
  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`.
284
+ <!--Start PulumiCodeChooser -->
283
285
  ```python
284
286
  import pulumi
285
287
  import pulumi_newrelic as newrelic
286
288
 
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,
289
+ app = newrelic.get_entity(account_id=654321,
292
290
  domain="APM",
291
+ name="my-app",
293
292
  type="APPLICATION")
294
293
  ```
294
+ <!--End PulumiCodeChooser -->
295
295
  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
296
 
297
297
  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
298
  ### Query for an OTEL entity
299
299
 
300
+ <!--Start PulumiCodeChooser -->
300
301
  ```python
301
302
  import pulumi
302
303
  import pulumi_newrelic as newrelic
303
304
 
304
- app = newrelic.get_entity(name="my-otel-app",
305
- domain="EXT",
306
- type="SERVICE",
305
+ app = newrelic.get_entity(domain="EXT",
306
+ name="my-otel-app",
307
307
  tags=[newrelic.GetEntityTagArgs(
308
308
  key="accountID",
309
309
  value="12345",
310
- )])
310
+ )],
311
+ type="SERVICE")
311
312
  ```
313
+ <!--End PulumiCodeChooser -->
312
314
 
313
315
  ### Query for an entity by type (AWS Lambda entity in this example)
314
316
 
317
+ <!--Start PulumiCodeChooser -->
315
318
  ```python
316
319
  import pulumi
317
320
  import pulumi_newrelic as newrelic
@@ -319,6 +322,7 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
319
322
  app = newrelic.get_entity(name="my_lambda_trace",
320
323
  type="AWSLAMBDAFUNCTION")
321
324
  ```
325
+ <!--End PulumiCodeChooser -->
322
326
 
323
327
 
324
328
  :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.
@@ -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.
@@ -60,15 +60,15 @@ def get_key_transaction(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
68
  txn = newrelic.get_key_transaction(name="txn")
68
- foo = newrelic.AlertPolicy("foo", name="foo")
69
- foo_alert_condition = newrelic.AlertCondition("foo",
70
- policy_id=foo.id,
71
- name="foo",
69
+ foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
70
+ foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
71
+ policy_id=foo_alert_policy.id,
72
72
  type="apm_kt_metric",
73
73
  entities=[txn.id],
74
74
  metric="error_percentage",
@@ -81,6 +81,7 @@ def get_key_transaction(name: Optional[str] = None,
81
81
  time_function="all",
82
82
  )])
83
83
  ```
84
+ <!--End PulumiCodeChooser -->
84
85
 
85
86
 
86
87
  :param str name: The name of the key transaction in New Relic.
@@ -103,15 +104,15 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
103
104
 
104
105
  ## Example Usage
105
106
 
107
+ <!--Start PulumiCodeChooser -->
106
108
  ```python
107
109
  import pulumi
108
110
  import pulumi_newrelic as newrelic
109
111
 
110
112
  txn = newrelic.get_key_transaction(name="txn")
111
- foo = newrelic.AlertPolicy("foo", name="foo")
112
- foo_alert_condition = newrelic.AlertCondition("foo",
113
- policy_id=foo.id,
114
- name="foo",
113
+ foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
114
+ foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
115
+ policy_id=foo_alert_policy.id,
115
116
  type="apm_kt_metric",
116
117
  entities=[txn.id],
117
118
  metric="error_percentage",
@@ -124,6 +125,7 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
124
125
  time_function="all",
125
126
  )])
126
127
  ```
128
+ <!--End PulumiCodeChooser -->
127
129
 
128
130
 
129
131
  :param str name: The name of the key transaction in New Relic.