pulumi-newrelic 5.23.0a1712988017__py3-none-any.whl → 5.23.0a1713561620__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 (53) hide show
  1. pulumi_newrelic/account_management.py +6 -2
  2. pulumi_newrelic/alert_channel.py +48 -36
  3. pulumi_newrelic/alert_condition.py +20 -16
  4. pulumi_newrelic/alert_muting_rule.py +12 -10
  5. pulumi_newrelic/alert_policy.py +26 -10
  6. pulumi_newrelic/alert_policy_channel.py +12 -4
  7. pulumi_newrelic/cloud/aws_govcloud_link_account.py +4 -2
  8. pulumi_newrelic/cloud/aws_integrations.py +6 -4
  9. pulumi_newrelic/cloud/aws_link_account.py +4 -2
  10. pulumi_newrelic/cloud/azure_integrations.py +10 -8
  11. pulumi_newrelic/cloud/azure_link_account.py +4 -2
  12. pulumi_newrelic/cloud/gcp_integrations.py +6 -2
  13. pulumi_newrelic/cloud/gcp_link_account.py +4 -2
  14. pulumi_newrelic/entity_tags.py +6 -6
  15. pulumi_newrelic/events_to_metrics_rule.py +2 -0
  16. pulumi_newrelic/get_application.py +8 -6
  17. pulumi_newrelic/get_authentication_domain.py +4 -4
  18. pulumi_newrelic/get_entity.py +28 -16
  19. pulumi_newrelic/get_group.py +46 -4
  20. pulumi_newrelic/get_key_transaction.py +8 -6
  21. pulumi_newrelic/get_obfuscation_expression.py +2 -0
  22. pulumi_newrelic/get_service_level_alert_helper.py +22 -16
  23. pulumi_newrelic/get_test_grok_pattern.py +4 -2
  24. pulumi_newrelic/group.py +40 -30
  25. pulumi_newrelic/infra_alert_condition.py +28 -18
  26. pulumi_newrelic/insights/event.py +8 -8
  27. pulumi_newrelic/log_parsing_rule.py +6 -2
  28. pulumi_newrelic/monitor_downtime.py +104 -92
  29. pulumi_newrelic/notification_channel.py +124 -106
  30. pulumi_newrelic/nrql_alert_condition.py +38 -28
  31. pulumi_newrelic/nrql_drop_rule.py +6 -6
  32. pulumi_newrelic/obfuscation_expression.py +2 -0
  33. pulumi_newrelic/obfuscation_rule.py +4 -0
  34. pulumi_newrelic/one_dashboard_raw.py +86 -82
  35. pulumi_newrelic/plugins/application_settings.py +6 -4
  36. pulumi_newrelic/plugins/workload.py +138 -0
  37. pulumi_newrelic/service_level.py +38 -32
  38. pulumi_newrelic/synthetics/alert_condition.py +20 -14
  39. pulumi_newrelic/synthetics/broken_links_monitor.py +18 -12
  40. pulumi_newrelic/synthetics/cert_check_monitor.py +16 -10
  41. pulumi_newrelic/synthetics/monitor.py +48 -36
  42. pulumi_newrelic/synthetics/multi_location_alert_condition.py +20 -12
  43. pulumi_newrelic/synthetics/private_location.py +6 -2
  44. pulumi_newrelic/synthetics/script_monitor.py +34 -22
  45. pulumi_newrelic/synthetics/secure_credential.py +4 -4
  46. pulumi_newrelic/synthetics/step_monitor.py +14 -8
  47. pulumi_newrelic/user.py +8 -6
  48. pulumi_newrelic/workflow.py +20 -8
  49. {pulumi_newrelic-5.23.0a1712988017.dist-info → pulumi_newrelic-5.23.0a1713561620.dist-info}/METADATA +1 -1
  50. pulumi_newrelic-5.23.0a1713561620.dist-info/RECORD +89 -0
  51. pulumi_newrelic-5.23.0a1712988017.dist-info/RECORD +0 -89
  52. {pulumi_newrelic-5.23.0a1712988017.dist-info → pulumi_newrelic-5.23.0a1713561620.dist-info}/WHEEL +0 -0
  53. {pulumi_newrelic-5.23.0a1712988017.dist-info → pulumi_newrelic-5.23.0a1713561620.dist-info}/top_level.txt +0 -0
@@ -252,7 +252,8 @@ class AzureLinkAccount(pulumi.CustomResource):
252
252
  application_id="ID of the application",
253
253
  client_secret="Secret value of client's Azure account",
254
254
  subscription_id="Subscription ID of Azure",
255
- tenant_id="Tenant ID of the Azure")
255
+ tenant_id="Tenant ID of the Azure",
256
+ name="Name of the linked account")
256
257
  ```
257
258
  <!--End PulumiCodeChooser -->
258
259
 
@@ -306,7 +307,8 @@ class AzureLinkAccount(pulumi.CustomResource):
306
307
  application_id="ID of the application",
307
308
  client_secret="Secret value of client's Azure account",
308
309
  subscription_id="Subscription ID of Azure",
309
- tenant_id="Tenant ID of the Azure")
310
+ tenant_id="Tenant ID of the Azure",
311
+ name="Name of the linked account")
310
312
  ```
311
313
  <!--End PulumiCodeChooser -->
312
314
 
@@ -976,7 +976,9 @@ class GcpIntegrations(pulumi.CustomResource):
976
976
  import pulumi
977
977
  import pulumi_newrelic as newrelic
978
978
 
979
- foo = newrelic.cloud.GcpLinkAccount("foo", project_id="<Your GCP project ID>")
979
+ foo = newrelic.cloud.GcpLinkAccount("foo",
980
+ name="example",
981
+ project_id="<Your GCP project ID>")
980
982
  foo1 = newrelic.cloud.GcpIntegrations("foo1",
981
983
  linked_account_id=foo.id,
982
984
  app_engine=newrelic.cloud.GcpIntegrationsAppEngineArgs(
@@ -1126,7 +1128,9 @@ class GcpIntegrations(pulumi.CustomResource):
1126
1128
  import pulumi
1127
1129
  import pulumi_newrelic as newrelic
1128
1130
 
1129
- foo = newrelic.cloud.GcpLinkAccount("foo", project_id="<Your GCP project ID>")
1131
+ foo = newrelic.cloud.GcpLinkAccount("foo",
1132
+ name="example",
1133
+ project_id="<Your GCP project ID>")
1130
1134
  foo1 = newrelic.cloud.GcpIntegrations("foo1",
1131
1135
  linked_account_id=foo.id,
1132
1136
  app_engine=newrelic.cloud.GcpIntegrationsAppEngineArgs(
@@ -157,7 +157,8 @@ class GcpLinkAccount(pulumi.CustomResource):
157
157
 
158
158
  foo = newrelic.cloud.GcpLinkAccount("foo",
159
159
  account_id="account id of newrelic account",
160
- project_id="id of the Project")
160
+ project_id="id of the Project",
161
+ name="account name")
161
162
  ```
162
163
  <!--End PulumiCodeChooser -->
163
164
 
@@ -209,7 +210,8 @@ class GcpLinkAccount(pulumi.CustomResource):
209
210
 
210
211
  foo = newrelic.cloud.GcpLinkAccount("foo",
211
212
  account_id="account id of newrelic account",
212
- project_id="id of the Project")
213
+ project_id="id of the Project",
214
+ name="account name")
213
215
  ```
214
216
  <!--End PulumiCodeChooser -->
215
217
 
@@ -109,11 +109,11 @@ class EntityTags(pulumi.CustomResource):
109
109
  import pulumi
110
110
  import pulumi_newrelic as newrelic
111
111
 
112
- foo_entity = newrelic.get_entity(name="Example application",
112
+ foo = newrelic.get_entity(name="Example application",
113
113
  type="APPLICATION",
114
114
  domain="APM")
115
- foo_entity_tags = newrelic.EntityTags("fooEntityTags",
116
- guid=foo_entity.guid,
115
+ foo_entity_tags = newrelic.EntityTags("foo",
116
+ guid=foo.guid,
117
117
  tags=[
118
118
  newrelic.EntityTagsTagArgs(
119
119
  key="my-key",
@@ -163,11 +163,11 @@ class EntityTags(pulumi.CustomResource):
163
163
  import pulumi
164
164
  import pulumi_newrelic as newrelic
165
165
 
166
- foo_entity = newrelic.get_entity(name="Example application",
166
+ foo = newrelic.get_entity(name="Example application",
167
167
  type="APPLICATION",
168
168
  domain="APM")
169
- foo_entity_tags = newrelic.EntityTags("fooEntityTags",
170
- guid=foo_entity.guid,
169
+ foo_entity_tags = newrelic.EntityTags("foo",
170
+ guid=foo.guid,
171
171
  tags=[
172
172
  newrelic.EntityTagsTagArgs(
173
173
  key="my-key",
@@ -225,6 +225,7 @@ class EventsToMetricsRule(pulumi.CustomResource):
225
225
 
226
226
  foo = newrelic.EventsToMetricsRule("foo",
227
227
  account_id=12345,
228
+ name="Example events to metrics rule",
228
229
  description="Example description",
229
230
  nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
230
231
  ```
@@ -268,6 +269,7 @@ class EventsToMetricsRule(pulumi.CustomResource):
268
269
 
269
270
  foo = newrelic.EventsToMetricsRule("foo",
270
271
  account_id=12345,
272
+ name="Example events to metrics rule",
271
273
  description="Example description",
272
274
  nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
273
275
  ```
@@ -92,9 +92,10 @@ def get_application(name: Optional[str] = None,
92
92
  import pulumi_newrelic as newrelic
93
93
 
94
94
  app = newrelic.get_application(name="my-app")
95
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
96
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
97
- policy_id=foo_alert_policy.id,
95
+ foo = newrelic.AlertPolicy("foo", name="foo")
96
+ foo_alert_condition = newrelic.AlertCondition("foo",
97
+ policy_id=foo.id,
98
+ name="foo",
98
99
  type="apm_app_metric",
99
100
  entities=[app.id],
100
101
  metric="apdex",
@@ -140,9 +141,10 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
140
141
  import pulumi_newrelic as newrelic
141
142
 
142
143
  app = newrelic.get_application(name="my-app")
143
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
144
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
145
- policy_id=foo_alert_policy.id,
144
+ foo = newrelic.AlertPolicy("foo", name="foo")
145
+ foo_alert_condition = newrelic.AlertCondition("foo",
146
+ policy_id=foo.id,
147
+ name="foo",
146
148
  type="apm_app_metric",
147
149
  entities=[app.id],
148
150
  metric="apdex",
@@ -65,8 +65,8 @@ def get_authentication_domain(name: Optional[str] = None,
65
65
  import pulumi
66
66
  import pulumi_newrelic as newrelic
67
67
 
68
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
69
- pulumi.export("foo", foo_authentication_domain.id)
68
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
69
+ pulumi.export("foo", foo.id)
70
70
  ```
71
71
  <!--End PulumiCodeChooser -->
72
72
 
@@ -96,8 +96,8 @@ def get_authentication_domain_output(name: Optional[pulumi.Input[str]] = None,
96
96
  import pulumi
97
97
  import pulumi_newrelic as newrelic
98
98
 
99
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
100
- pulumi.export("foo", foo_authentication_domain.id)
99
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
100
+ pulumi.export("foo", foo.id)
101
101
  ```
102
102
  <!--End PulumiCodeChooser -->
103
103
 
@@ -167,8 +167,11 @@ def get_entity(account_id: Optional[int] = None,
167
167
  import pulumi
168
168
  import pulumi_newrelic as newrelic
169
169
 
170
- app = newrelic.get_entity(domain="APM",
171
- name="my-app",
170
+ # The entity returned by this configuration would have to
171
+ # belong to the account_id specified in the provider
172
+ # configuration, i.e. NEW_RELIC_ACCOUNT_ID.
173
+ app = newrelic.get_entity(name="my-app",
174
+ domain="APM",
172
175
  type="APPLICATION")
173
176
  ```
174
177
  <!--End PulumiCodeChooser -->
@@ -178,9 +181,12 @@ def get_entity(account_id: Optional[int] = None,
178
181
  import pulumi
179
182
  import pulumi_newrelic as newrelic
180
183
 
181
- app = newrelic.get_entity(account_id=654321,
184
+ # The entity returned by this configuration, unlike in
185
+ # the above example, would have to belong to the account_id
186
+ # specified in the configuration below, i.e. 654321.
187
+ app = newrelic.get_entity(name="my-app",
188
+ account_id=654321,
182
189
  domain="APM",
183
- name="my-app",
184
190
  type="APPLICATION")
185
191
  ```
186
192
  <!--End PulumiCodeChooser -->
@@ -194,13 +200,13 @@ def get_entity(account_id: Optional[int] = None,
194
200
  import pulumi
195
201
  import pulumi_newrelic as newrelic
196
202
 
197
- app = newrelic.get_entity(domain="EXT",
198
- name="my-otel-app",
203
+ app = newrelic.get_entity(name="my-otel-app",
204
+ domain="EXT",
205
+ type="SERVICE",
199
206
  tags=[newrelic.GetEntityTagArgs(
200
207
  key="accountID",
201
208
  value="12345",
202
- )],
203
- type="SERVICE")
209
+ )])
204
210
  ```
205
211
  <!--End PulumiCodeChooser -->
206
212
 
@@ -275,8 +281,11 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
275
281
  import pulumi
276
282
  import pulumi_newrelic as newrelic
277
283
 
278
- app = newrelic.get_entity(domain="APM",
279
- name="my-app",
284
+ # The entity returned by this configuration would have to
285
+ # belong to the account_id specified in the provider
286
+ # configuration, i.e. NEW_RELIC_ACCOUNT_ID.
287
+ app = newrelic.get_entity(name="my-app",
288
+ domain="APM",
280
289
  type="APPLICATION")
281
290
  ```
282
291
  <!--End PulumiCodeChooser -->
@@ -286,9 +295,12 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
286
295
  import pulumi
287
296
  import pulumi_newrelic as newrelic
288
297
 
289
- app = newrelic.get_entity(account_id=654321,
298
+ # The entity returned by this configuration, unlike in
299
+ # the above example, would have to belong to the account_id
300
+ # specified in the configuration below, i.e. 654321.
301
+ app = newrelic.get_entity(name="my-app",
302
+ account_id=654321,
290
303
  domain="APM",
291
- name="my-app",
292
304
  type="APPLICATION")
293
305
  ```
294
306
  <!--End PulumiCodeChooser -->
@@ -302,13 +314,13 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
302
314
  import pulumi
303
315
  import pulumi_newrelic as newrelic
304
316
 
305
- app = newrelic.get_entity(domain="EXT",
306
- name="my-otel-app",
317
+ app = newrelic.get_entity(name="my-otel-app",
318
+ domain="EXT",
319
+ type="SERVICE",
307
320
  tags=[newrelic.GetEntityTagArgs(
308
321
  key="accountID",
309
322
  value="12345",
310
- )],
311
- type="SERVICE")
323
+ )])
312
324
  ```
313
325
  <!--End PulumiCodeChooser -->
314
326
 
@@ -89,12 +89,33 @@ def get_group(authentication_domain_id: Optional[str] = None,
89
89
  import pulumi
90
90
  import pulumi_newrelic as newrelic
91
91
 
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,
92
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
93
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
94
94
  name="Test Group")
95
95
  ```
96
96
  <!--End PulumiCodeChooser -->
97
97
 
98
+ ## Additional Examples
99
+
100
+ The following example demonstrates utilizing attributes exported by this data source.
101
+
102
+ 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.
103
+
104
+ <!--Start PulumiCodeChooser -->
105
+ ```python
106
+ import pulumi
107
+ import pulumi_newrelic as newrelic
108
+ import pulumi_std as std
109
+
110
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
111
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
112
+ name="Test Group")
113
+ id = foo_get_group.id
114
+ user_ids = std.join(separator=", ",
115
+ input=foo_get_group.user_ids).result if len(foo_get_group.user_ids) > 0 else ""
116
+ ```
117
+ <!--End PulumiCodeChooser -->
118
+
98
119
 
99
120
  :param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
100
121
  :param str name: The name of the group to search for.
@@ -130,9 +151,30 @@ def get_group_output(authentication_domain_id: Optional[pulumi.Input[str]] = Non
130
151
  import pulumi
131
152
  import pulumi_newrelic as newrelic
132
153
 
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,
154
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
155
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
156
+ name="Test Group")
157
+ ```
158
+ <!--End PulumiCodeChooser -->
159
+
160
+ ## Additional Examples
161
+
162
+ The following example demonstrates utilizing attributes exported by this data source.
163
+
164
+ 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.
165
+
166
+ <!--Start PulumiCodeChooser -->
167
+ ```python
168
+ import pulumi
169
+ import pulumi_newrelic as newrelic
170
+ import pulumi_std as std
171
+
172
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
173
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
135
174
  name="Test Group")
175
+ id = foo_get_group.id
176
+ user_ids = std.join(separator=", ",
177
+ input=foo_get_group.user_ids).result if len(foo_get_group.user_ids) > 0 else ""
136
178
  ```
137
179
  <!--End PulumiCodeChooser -->
138
180
 
@@ -66,9 +66,10 @@ def get_key_transaction(name: Optional[str] = None,
66
66
  import pulumi_newrelic as newrelic
67
67
 
68
68
  txn = newrelic.get_key_transaction(name="txn")
69
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
70
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
71
- policy_id=foo_alert_policy.id,
69
+ foo = newrelic.AlertPolicy("foo", name="foo")
70
+ foo_alert_condition = newrelic.AlertCondition("foo",
71
+ policy_id=foo.id,
72
+ name="foo",
72
73
  type="apm_kt_metric",
73
74
  entities=[txn.id],
74
75
  metric="error_percentage",
@@ -110,9 +111,10 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
110
111
  import pulumi_newrelic as newrelic
111
112
 
112
113
  txn = newrelic.get_key_transaction(name="txn")
113
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
114
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
115
- policy_id=foo_alert_policy.id,
114
+ foo = newrelic.AlertPolicy("foo", name="foo")
115
+ foo_alert_condition = newrelic.AlertCondition("foo",
116
+ policy_id=foo.id,
117
+ name="foo",
116
118
  type="apm_kt_metric",
117
119
  entities=[txn.id],
118
120
  metric="error_percentage",
@@ -78,6 +78,7 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
78
78
  expression = newrelic.get_obfuscation_expression(account_id=123456,
79
79
  name="The expression")
80
80
  rule = newrelic.ObfuscationRule("rule",
81
+ name="ruleName",
81
82
  description="description of the rule",
82
83
  filter="hostStatus=running",
83
84
  enabled=True,
@@ -122,6 +123,7 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
122
123
  expression = newrelic.get_obfuscation_expression(account_id=123456,
123
124
  name="The expression")
124
125
  rule = newrelic.ObfuscationRule("rule",
126
+ name="ruleName",
125
127
  description="description of the rule",
126
128
  filter="hostStatus=running",
127
129
  enabled=True,
@@ -179,6 +179,7 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
179
179
  foo_period = 28
180
180
  foo = newrelic.ServiceLevel("foo",
181
181
  guid="MXxBUE18QVBQTElDQVRJT058MQ",
182
+ name="Latency",
182
183
  description="Proportion of requests that are served faster than a threshold.",
183
184
  events=newrelic.ServiceLevelEventsArgs(
184
185
  account_id=12345678,
@@ -214,14 +215,15 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
214
215
  import pulumi_newrelic as newrelic
215
216
 
216
217
  foo_slow_burn = newrelic.get_service_level_alert_helper(alert_type="slow_burn",
217
- sli_guid=newrelic_service_level["foo"]["sli_guid"],
218
- slo_target=local["foo_target"],
219
- slo_period=local["foo_period"],
218
+ sli_guid=foo["sliGuid"],
219
+ slo_target=foo_target,
220
+ slo_period=foo_period,
220
221
  is_bad_events=True)
221
- your_condition = newrelic.NrqlAlertCondition("yourCondition",
222
+ your_condition = newrelic.NrqlAlertCondition("your_condition",
222
223
  account_id=12345678,
223
224
  policy_id=67890,
224
225
  type="static",
226
+ name="Slow burn alert",
225
227
  enabled=True,
226
228
  violation_time_limit_seconds=259200,
227
229
  nrql=newrelic.NrqlAlertConditionNrqlArgs(
@@ -249,16 +251,17 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
249
251
  import pulumi_newrelic as newrelic
250
252
 
251
253
  foo_custom = newrelic.get_service_level_alert_helper(alert_type="custom",
252
- sli_guid=newrelic_service_level["foo"]["sli_guid"],
253
- slo_target=local["foo_target"],
254
- slo_period=local["foo_period"],
254
+ sli_guid=foo["sliGuid"],
255
+ slo_target=foo_target,
256
+ slo_period=foo_period,
255
257
  custom_tolerated_budget_consumption=4,
256
258
  custom_evaluation_period=5400,
257
259
  is_bad_events=True)
258
- your_condition = newrelic.NrqlAlertCondition("yourCondition",
260
+ your_condition = newrelic.NrqlAlertCondition("your_condition",
259
261
  account_id=12345678,
260
262
  policy_id=67890,
261
263
  type="static",
264
+ name="Custom burn alert",
262
265
  enabled=True,
263
266
  violation_time_limit_seconds=259200,
264
267
  nrql=newrelic.NrqlAlertConditionNrqlArgs(
@@ -338,6 +341,7 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
338
341
  foo_period = 28
339
342
  foo = newrelic.ServiceLevel("foo",
340
343
  guid="MXxBUE18QVBQTElDQVRJT058MQ",
344
+ name="Latency",
341
345
  description="Proportion of requests that are served faster than a threshold.",
342
346
  events=newrelic.ServiceLevelEventsArgs(
343
347
  account_id=12345678,
@@ -373,14 +377,15 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
373
377
  import pulumi_newrelic as newrelic
374
378
 
375
379
  foo_slow_burn = newrelic.get_service_level_alert_helper(alert_type="slow_burn",
376
- sli_guid=newrelic_service_level["foo"]["sli_guid"],
377
- slo_target=local["foo_target"],
378
- slo_period=local["foo_period"],
380
+ sli_guid=foo["sliGuid"],
381
+ slo_target=foo_target,
382
+ slo_period=foo_period,
379
383
  is_bad_events=True)
380
- your_condition = newrelic.NrqlAlertCondition("yourCondition",
384
+ your_condition = newrelic.NrqlAlertCondition("your_condition",
381
385
  account_id=12345678,
382
386
  policy_id=67890,
383
387
  type="static",
388
+ name="Slow burn alert",
384
389
  enabled=True,
385
390
  violation_time_limit_seconds=259200,
386
391
  nrql=newrelic.NrqlAlertConditionNrqlArgs(
@@ -408,16 +413,17 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
408
413
  import pulumi_newrelic as newrelic
409
414
 
410
415
  foo_custom = newrelic.get_service_level_alert_helper(alert_type="custom",
411
- sli_guid=newrelic_service_level["foo"]["sli_guid"],
412
- slo_target=local["foo_target"],
413
- slo_period=local["foo_period"],
416
+ sli_guid=foo["sliGuid"],
417
+ slo_target=foo_target,
418
+ slo_period=foo_period,
414
419
  custom_tolerated_budget_consumption=4,
415
420
  custom_evaluation_period=5400,
416
421
  is_bad_events=True)
417
- your_condition = newrelic.NrqlAlertCondition("yourCondition",
422
+ your_condition = newrelic.NrqlAlertCondition("your_condition",
418
423
  account_id=12345678,
419
424
  policy_id=67890,
420
425
  type="static",
426
+ name="Custom burn alert",
421
427
  enabled=True,
422
428
  violation_time_limit_seconds=259200,
423
429
  nrql=newrelic.NrqlAlertConditionNrqlArgs(
@@ -96,7 +96,8 @@ def get_test_grok_pattern(account_id: Optional[int] = None,
96
96
  import pulumi
97
97
  import pulumi_newrelic as newrelic
98
98
 
99
- foo = newrelic.get_test_grok_pattern(grok="%%{IP:host_ip}",
99
+ # Data source
100
+ foo = newrelic.get_test_grok_pattern(grok="%{IP:host_ip}",
100
101
  log_lines=[
101
102
  "host_ip: 43.3.120.2",
102
103
  "bytes_received: 2048",
@@ -137,7 +138,8 @@ def get_test_grok_pattern_output(account_id: Optional[pulumi.Input[Optional[int]
137
138
  import pulumi
138
139
  import pulumi_newrelic as newrelic
139
140
 
140
- foo = newrelic.get_test_grok_pattern(grok="%%{IP:host_ip}",
141
+ # Data source
142
+ foo = newrelic.get_test_grok_pattern(grok="%{IP:host_ip}",
141
143
  log_lines=[
142
144
  "host_ip: 43.3.120.2",
143
145
  "bytes_received: 2048",
pulumi_newrelic/group.py CHANGED
@@ -157,9 +157,10 @@ class Group(pulumi.CustomResource):
157
157
  import pulumi
158
158
  import pulumi_newrelic as newrelic
159
159
 
160
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
161
- foo_group = newrelic.Group("fooGroup",
162
- authentication_domain_id=foo_authentication_domain.id,
160
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
161
+ foo_group = newrelic.Group("foo",
162
+ name="Test Group",
163
+ authentication_domain_id=foo.id,
163
164
  user_ids=[
164
165
  "0001112222",
165
166
  "2221110000",
@@ -178,17 +179,20 @@ class Group(pulumi.CustomResource):
178
179
  import pulumi
179
180
  import pulumi_newrelic as newrelic
180
181
 
181
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
182
- foo_user = newrelic.User("fooUser",
182
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
183
+ foo_user = newrelic.User("foo",
184
+ name="Test User One",
183
185
  email_id="test_user_one@test.com",
184
- authentication_domain_id=foo_authentication_domain.id,
186
+ authentication_domain_id=foo.id,
185
187
  user_type="CORE_USER_TIER")
186
188
  bar = newrelic.User("bar",
189
+ name="Test User Two",
187
190
  email_id="test_user_two@test.com",
188
- authentication_domain_id=foo_authentication_domain.id,
191
+ authentication_domain_id=foo.id,
189
192
  user_type="BASIC_USER_TIER")
190
- foo_group = newrelic.Group("fooGroup",
191
- authentication_domain_id=foo_authentication_domain.id,
193
+ foo_group = newrelic.Group("foo",
194
+ name="Test Group",
195
+ authentication_domain_id=foo.id,
192
196
  user_ids=[
193
197
  foo_user.id,
194
198
  bar.id,
@@ -205,15 +209,16 @@ class Group(pulumi.CustomResource):
205
209
  import pulumi
206
210
  import pulumi_newrelic as newrelic
207
211
 
208
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
209
- foo_user = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
212
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
213
+ foo_get_user = newrelic.get_user(authentication_domain_id=foo.id,
210
214
  email_id="test_user_one@test.com")
211
- bar = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
215
+ bar = newrelic.get_user(authentication_domain_id=foo.id,
212
216
  name="Test User Two")
213
- foo_group = newrelic.Group("fooGroup",
214
- authentication_domain_id=foo_authentication_domain.id,
217
+ foo_group = newrelic.Group("foo",
218
+ name="Test Group",
219
+ authentication_domain_id=foo.id,
215
220
  user_ids=[
216
- foo_user.id,
221
+ foo_get_user.id,
217
222
  bar.id,
218
223
  ])
219
224
  ```
@@ -255,9 +260,10 @@ class Group(pulumi.CustomResource):
255
260
  import pulumi
256
261
  import pulumi_newrelic as newrelic
257
262
 
258
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
259
- foo_group = newrelic.Group("fooGroup",
260
- authentication_domain_id=foo_authentication_domain.id,
263
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
264
+ foo_group = newrelic.Group("foo",
265
+ name="Test Group",
266
+ authentication_domain_id=foo.id,
261
267
  user_ids=[
262
268
  "0001112222",
263
269
  "2221110000",
@@ -276,17 +282,20 @@ class Group(pulumi.CustomResource):
276
282
  import pulumi
277
283
  import pulumi_newrelic as newrelic
278
284
 
279
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
280
- foo_user = newrelic.User("fooUser",
285
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
286
+ foo_user = newrelic.User("foo",
287
+ name="Test User One",
281
288
  email_id="test_user_one@test.com",
282
- authentication_domain_id=foo_authentication_domain.id,
289
+ authentication_domain_id=foo.id,
283
290
  user_type="CORE_USER_TIER")
284
291
  bar = newrelic.User("bar",
292
+ name="Test User Two",
285
293
  email_id="test_user_two@test.com",
286
- authentication_domain_id=foo_authentication_domain.id,
294
+ authentication_domain_id=foo.id,
287
295
  user_type="BASIC_USER_TIER")
288
- foo_group = newrelic.Group("fooGroup",
289
- authentication_domain_id=foo_authentication_domain.id,
296
+ foo_group = newrelic.Group("foo",
297
+ name="Test Group",
298
+ authentication_domain_id=foo.id,
290
299
  user_ids=[
291
300
  foo_user.id,
292
301
  bar.id,
@@ -303,15 +312,16 @@ class Group(pulumi.CustomResource):
303
312
  import pulumi
304
313
  import pulumi_newrelic as newrelic
305
314
 
306
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
307
- foo_user = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
315
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
316
+ foo_get_user = newrelic.get_user(authentication_domain_id=foo.id,
308
317
  email_id="test_user_one@test.com")
309
- bar = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
318
+ bar = newrelic.get_user(authentication_domain_id=foo.id,
310
319
  name="Test User Two")
311
- foo_group = newrelic.Group("fooGroup",
312
- authentication_domain_id=foo_authentication_domain.id,
320
+ foo_group = newrelic.Group("foo",
321
+ name="Test Group",
322
+ authentication_domain_id=foo.id,
313
323
  user_ids=[
314
- foo_user.id,
324
+ foo_get_user.id,
315
325
  bar.id,
316
326
  ])
317
327
  ```