pulumi-newrelic 5.20.0a1709365820__py3-none-any.whl → 5.21.0a1710157101__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 (67) hide show
  1. pulumi_newrelic/__init__.py +10 -0
  2. pulumi_newrelic/account_management.py +6 -2
  3. pulumi_newrelic/alert_channel.py +34 -2
  4. pulumi_newrelic/alert_condition.py +26 -2
  5. pulumi_newrelic/alert_muting_rule.py +6 -2
  6. pulumi_newrelic/alert_policy.py +48 -4
  7. pulumi_newrelic/alert_policy_channel.py +8 -4
  8. pulumi_newrelic/api_access_key.py +6 -26
  9. pulumi_newrelic/browser_application.py +6 -2
  10. pulumi_newrelic/cloud/aws_govcloud_integrations.py +2 -2
  11. pulumi_newrelic/cloud/aws_govcloud_link_account.py +6 -2
  12. pulumi_newrelic/cloud/aws_integrations.py +6 -2
  13. pulumi_newrelic/cloud/aws_link_account.py +6 -2
  14. pulumi_newrelic/cloud/azure_integrations.py +6 -2
  15. pulumi_newrelic/cloud/azure_link_account.py +6 -2
  16. pulumi_newrelic/cloud/gcp_integrations.py +6 -2
  17. pulumi_newrelic/cloud/gcp_link_account.py +6 -2
  18. pulumi_newrelic/data_partition_rule.py +8 -2
  19. pulumi_newrelic/entity_tags.py +8 -4
  20. pulumi_newrelic/events_to_metrics_rule.py +8 -4
  21. pulumi_newrelic/get_account.py +4 -0
  22. pulumi_newrelic/get_alert_policy.py +3 -3
  23. pulumi_newrelic/get_application.py +4 -0
  24. pulumi_newrelic/get_authentication_domain.py +4 -0
  25. pulumi_newrelic/get_cloud_account.py +4 -0
  26. pulumi_newrelic/get_entity.py +66 -4
  27. pulumi_newrelic/get_group.py +145 -0
  28. pulumi_newrelic/get_key_transaction.py +4 -0
  29. pulumi_newrelic/get_obfuscation_expression.py +4 -0
  30. pulumi_newrelic/get_service_level_alert_helper.py +12 -0
  31. pulumi_newrelic/get_test_grok_pattern.py +4 -0
  32. pulumi_newrelic/get_user.py +10 -6
  33. pulumi_newrelic/group.py +426 -0
  34. pulumi_newrelic/infra_alert_condition.py +33 -9
  35. pulumi_newrelic/insights/event.py +6 -0
  36. pulumi_newrelic/log_parsing_rule.py +12 -2
  37. pulumi_newrelic/monitor_downtime.py +28 -2
  38. pulumi_newrelic/notification_channel.py +72 -0
  39. pulumi_newrelic/notification_destination.py +132 -2
  40. pulumi_newrelic/nrql_alert_condition.py +28 -4
  41. pulumi_newrelic/nrql_drop_rule.py +30 -4
  42. pulumi_newrelic/obfuscation_expression.py +6 -2
  43. pulumi_newrelic/obfuscation_rule.py +6 -2
  44. pulumi_newrelic/one_dashboard.py +2 -2
  45. pulumi_newrelic/one_dashboard_json.py +2 -2
  46. pulumi_newrelic/one_dashboard_raw.py +6 -0
  47. pulumi_newrelic/plugins/application_settings.py +22 -2
  48. pulumi_newrelic/plugins/workload.py +112 -4
  49. pulumi_newrelic/service_level.py +20 -6
  50. pulumi_newrelic/synthetics/alert_condition.py +26 -2
  51. pulumi_newrelic/synthetics/broken_links_monitor.py +12 -2
  52. pulumi_newrelic/synthetics/cert_check_monitor.py +12 -2
  53. pulumi_newrelic/synthetics/get_private_location.py +8 -0
  54. pulumi_newrelic/synthetics/get_secure_credential.py +4 -0
  55. pulumi_newrelic/synthetics/monitor.py +20 -2
  56. pulumi_newrelic/synthetics/multi_location_alert_condition.py +12 -4
  57. pulumi_newrelic/synthetics/private_location.py +6 -2
  58. pulumi_newrelic/synthetics/script_monitor.py +20 -2
  59. pulumi_newrelic/synthetics/secure_credential.py +6 -2
  60. pulumi_newrelic/synthetics/step_monitor.py +8 -2
  61. pulumi_newrelic/user.py +4 -0
  62. pulumi_newrelic/workflow.py +22 -4
  63. {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0a1710157101.dist-info}/METADATA +1 -1
  64. pulumi_newrelic-5.21.0a1710157101.dist-info/RECORD +89 -0
  65. pulumi_newrelic-5.20.0a1709365820.dist-info/RECORD +0 -87
  66. {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0a1710157101.dist-info}/WHEEL +0 -0
  67. {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0a1710157101.dist-info}/top_level.txt +0 -0
@@ -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.
@@ -0,0 +1,145 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import copy
6
+ import warnings
7
+ import pulumi
8
+ import pulumi.runtime
9
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
10
+ from . import _utilities
11
+
12
+ __all__ = [
13
+ 'GetGroupResult',
14
+ 'AwaitableGetGroupResult',
15
+ 'get_group',
16
+ 'get_group_output',
17
+ ]
18
+
19
+ @pulumi.output_type
20
+ class GetGroupResult:
21
+ """
22
+ A collection of values returned by getGroup.
23
+ """
24
+ def __init__(__self__, authentication_domain_id=None, id=None, name=None, user_ids=None):
25
+ if authentication_domain_id and not isinstance(authentication_domain_id, str):
26
+ raise TypeError("Expected argument 'authentication_domain_id' to be a str")
27
+ pulumi.set(__self__, "authentication_domain_id", authentication_domain_id)
28
+ if id and not isinstance(id, str):
29
+ raise TypeError("Expected argument 'id' to be a str")
30
+ pulumi.set(__self__, "id", id)
31
+ if name and not isinstance(name, str):
32
+ raise TypeError("Expected argument 'name' to be a str")
33
+ pulumi.set(__self__, "name", name)
34
+ if user_ids and not isinstance(user_ids, list):
35
+ raise TypeError("Expected argument 'user_ids' to be a list")
36
+ pulumi.set(__self__, "user_ids", user_ids)
37
+
38
+ @property
39
+ @pulumi.getter(name="authenticationDomainId")
40
+ def authentication_domain_id(self) -> str:
41
+ return pulumi.get(self, "authentication_domain_id")
42
+
43
+ @property
44
+ @pulumi.getter
45
+ def id(self) -> str:
46
+ """
47
+ The ID of the fetched matching group.
48
+ """
49
+ return pulumi.get(self, "id")
50
+
51
+ @property
52
+ @pulumi.getter
53
+ def name(self) -> str:
54
+ return pulumi.get(self, "name")
55
+
56
+ @property
57
+ @pulumi.getter(name="userIds")
58
+ def user_ids(self) -> Sequence[str]:
59
+ """
60
+ IDs of users who belong to the group. In the absence of any users in the group, the value of this attribute would be an empty list.
61
+ """
62
+ return pulumi.get(self, "user_ids")
63
+
64
+
65
+ class AwaitableGetGroupResult(GetGroupResult):
66
+ # pylint: disable=using-constant-test
67
+ def __await__(self):
68
+ if False:
69
+ yield self
70
+ return GetGroupResult(
71
+ authentication_domain_id=self.authentication_domain_id,
72
+ id=self.id,
73
+ name=self.name,
74
+ user_ids=self.user_ids)
75
+
76
+
77
+ def get_group(authentication_domain_id: Optional[str] = None,
78
+ name: Optional[str] = None,
79
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGroupResult:
80
+ """
81
+ The `Group` data source helps search for a group by its name and retrieve the ID of the matching group and other associated attributes.
82
+
83
+ ## Example Usage
84
+
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
+
87
+ <!--Start PulumiCodeChooser -->
88
+ ```python
89
+ import pulumi
90
+ import pulumi_newrelic as newrelic
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,
94
+ name="Test Group")
95
+ ```
96
+ <!--End PulumiCodeChooser -->
97
+
98
+
99
+ :param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
100
+ :param str name: The name of the group to search for.
101
+
102
+ > **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
103
+ """
104
+ __args__ = dict()
105
+ __args__['authenticationDomainId'] = authentication_domain_id
106
+ __args__['name'] = name
107
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
108
+ __ret__ = pulumi.runtime.invoke('newrelic:index/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult).value
109
+
110
+ return AwaitableGetGroupResult(
111
+ authentication_domain_id=pulumi.get(__ret__, 'authentication_domain_id'),
112
+ id=pulumi.get(__ret__, 'id'),
113
+ name=pulumi.get(__ret__, 'name'),
114
+ user_ids=pulumi.get(__ret__, 'user_ids'))
115
+
116
+
117
+ @_utilities.lift_output_func(get_group)
118
+ def get_group_output(authentication_domain_id: Optional[pulumi.Input[str]] = None,
119
+ name: Optional[pulumi.Input[str]] = None,
120
+ opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGroupResult]:
121
+ """
122
+ The `Group` data source helps search for a group by its name and retrieve the ID of the matching group and other associated attributes.
123
+
124
+ ## Example Usage
125
+
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.
127
+
128
+ <!--Start PulumiCodeChooser -->
129
+ ```python
130
+ import pulumi
131
+ import pulumi_newrelic as newrelic
132
+
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,
135
+ name="Test Group")
136
+ ```
137
+ <!--End PulumiCodeChooser -->
138
+
139
+
140
+ :param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
141
+ :param str name: The name of the group to search for.
142
+
143
+ > **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
144
+ """
145
+ ...
@@ -60,6 +60,7 @@ 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
@@ -80,6 +81,7 @@ def get_key_transaction(name: Optional[str] = None,
80
81
  time_function="all",
81
82
  )])
82
83
  ```
84
+ <!--End PulumiCodeChooser -->
83
85
 
84
86
 
85
87
  :param str name: The name of the key transaction in New Relic.
@@ -102,6 +104,7 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
102
104
 
103
105
  ## Example Usage
104
106
 
107
+ <!--Start PulumiCodeChooser -->
105
108
  ```python
106
109
  import pulumi
107
110
  import pulumi_newrelic as newrelic
@@ -122,6 +125,7 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
122
125
  time_function="all",
123
126
  )])
124
127
  ```
128
+ <!--End PulumiCodeChooser -->
125
129
 
126
130
 
127
131
  :param str name: The name of the key transaction in New Relic.
@@ -70,6 +70,7 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
70
70
 
71
71
  ## Example Usage
72
72
 
73
+ <!--Start PulumiCodeChooser -->
73
74
  ```python
74
75
  import pulumi
75
76
  import pulumi_newrelic as newrelic
@@ -86,6 +87,7 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
86
87
  method="MASK",
87
88
  )])
88
89
  ```
90
+ <!--End PulumiCodeChooser -->
89
91
 
90
92
 
91
93
  :param int account_id: The account id associated with the obfuscation expression. If left empty will default to account ID specified in provider level configuration.
@@ -112,6 +114,7 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
112
114
 
113
115
  ## Example Usage
114
116
 
117
+ <!--Start PulumiCodeChooser -->
115
118
  ```python
116
119
  import pulumi
117
120
  import pulumi_newrelic as newrelic
@@ -128,6 +131,7 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
128
131
  method="MASK",
129
132
  )])
130
133
  ```
134
+ <!--End PulumiCodeChooser -->
131
135
 
132
136
 
133
137
  :param int account_id: The account id associated with the obfuscation expression. If left empty will default to account ID specified in provider level configuration.
@@ -170,6 +170,7 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
170
170
 
171
171
  Firstly set up your service level objective, we recommend using local variables for the `target` and `time_window.rolling.count`, as they are also necessary for the helper.
172
172
 
173
+ <!--Start PulumiCodeChooser -->
173
174
  ```python
174
175
  import pulumi
175
176
  import pulumi_newrelic as newrelic
@@ -200,12 +201,14 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
200
201
  ),
201
202
  ))
202
203
  ```
204
+ <!--End PulumiCodeChooser -->
203
205
  Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
204
206
  Note that the Service Level was set up using bad events, that's why `is_bad_events` is set to `true`.
205
207
  If the Service Level was configured with good events that would be unnecessary as the field defaults to `false`.
206
208
 
207
209
  Here is an example of a `slow_burn` alert.
208
210
 
211
+ <!--Start PulumiCodeChooser -->
209
212
  ```python
210
213
  import pulumi
211
214
  import pulumi_newrelic as newrelic
@@ -236,9 +239,11 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
236
239
  aggregation_delay="120",
237
240
  slide_by=900)
238
241
  ```
242
+ <!--End PulumiCodeChooser -->
239
243
 
240
244
  Here is an example of a custom alert:
241
245
 
246
+ <!--Start PulumiCodeChooser -->
242
247
  ```python
243
248
  import pulumi
244
249
  import pulumi_newrelic as newrelic
@@ -271,6 +276,7 @@ def get_service_level_alert_helper(alert_type: Optional[str] = None,
271
276
  aggregation_delay="120",
272
277
  slide_by=60)
273
278
  ```
279
+ <!--End PulumiCodeChooser -->
274
280
 
275
281
 
276
282
  :param str alert_type: The type of alert we want to set. Valid values are:
@@ -323,6 +329,7 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
323
329
 
324
330
  Firstly set up your service level objective, we recommend using local variables for the `target` and `time_window.rolling.count`, as they are also necessary for the helper.
325
331
 
332
+ <!--Start PulumiCodeChooser -->
326
333
  ```python
327
334
  import pulumi
328
335
  import pulumi_newrelic as newrelic
@@ -353,12 +360,14 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
353
360
  ),
354
361
  ))
355
362
  ```
363
+ <!--End PulumiCodeChooser -->
356
364
  Then use the helper to obtain the necessary fields to set up an alert on that Service Level.
357
365
  Note that the Service Level was set up using bad events, that's why `is_bad_events` is set to `true`.
358
366
  If the Service Level was configured with good events that would be unnecessary as the field defaults to `false`.
359
367
 
360
368
  Here is an example of a `slow_burn` alert.
361
369
 
370
+ <!--Start PulumiCodeChooser -->
362
371
  ```python
363
372
  import pulumi
364
373
  import pulumi_newrelic as newrelic
@@ -389,9 +398,11 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
389
398
  aggregation_delay="120",
390
399
  slide_by=900)
391
400
  ```
401
+ <!--End PulumiCodeChooser -->
392
402
 
393
403
  Here is an example of a custom alert:
394
404
 
405
+ <!--Start PulumiCodeChooser -->
395
406
  ```python
396
407
  import pulumi
397
408
  import pulumi_newrelic as newrelic
@@ -424,6 +435,7 @@ def get_service_level_alert_helper_output(alert_type: Optional[pulumi.Input[str]
424
435
  aggregation_delay="120",
425
436
  slide_by=60)
426
437
  ```
438
+ <!--End PulumiCodeChooser -->
427
439
 
428
440
 
429
441
  :param str alert_type: The type of alert we want to set. Valid values are:
@@ -91,6 +91,7 @@ def get_test_grok_pattern(account_id: Optional[int] = None,
91
91
  """
92
92
  ## Example Usage
93
93
 
94
+ <!--Start PulumiCodeChooser -->
94
95
  ```python
95
96
  import pulumi
96
97
  import pulumi_newrelic as newrelic
@@ -101,6 +102,7 @@ def get_test_grok_pattern(account_id: Optional[int] = None,
101
102
  "bytes_received: 2048",
102
103
  ])
103
104
  ```
105
+ <!--End PulumiCodeChooser -->
104
106
 
105
107
 
106
108
  :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`.
@@ -130,6 +132,7 @@ def get_test_grok_pattern_output(account_id: Optional[pulumi.Input[Optional[int]
130
132
  """
131
133
  ## Example Usage
132
134
 
135
+ <!--Start PulumiCodeChooser -->
133
136
  ```python
134
137
  import pulumi
135
138
  import pulumi_newrelic as newrelic
@@ -140,6 +143,7 @@ def get_test_grok_pattern_output(account_id: Optional[pulumi.Input[Optional[int]
140
143
  "bytes_received: 2048",
141
144
  ])
142
145
  ```
146
+ <!--End PulumiCodeChooser -->
143
147
 
144
148
 
145
149
  :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`.
@@ -76,11 +76,12 @@ def get_user(authentication_domain_id: Optional[str] = None,
76
76
  name: Optional[str] = None,
77
77
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUserResult:
78
78
  """
79
- The `User` data source may be used to search for a user by their name and/or email ID, and accordingly, fetch the ID of the matching user.
79
+ The `User` data source helps search for a user by their name and/or email ID, and accordingly, fetch the ID of the matching user.
80
80
 
81
81
  ## Example Usage
82
82
 
83
- The below example illustrates fetching a user's ID (and other arguments) using the ID of the authentication domain the user belongs to, as well as a name and/or email ID, which can be used as criteria to search for a user who matches these specified parameters.
83
+ The below example illustrates fetching a the ID of a user (and other arguments) using the ID of the authentication domain the user belongs to, as well as a name and/or email ID, which can be used as criteria to search for a user who matches these specified parameters.
84
+ <!--Start PulumiCodeChooser -->
84
85
  ```python
85
86
  import pulumi
86
87
  import pulumi_newrelic as newrelic
@@ -91,6 +92,7 @@ def get_user(authentication_domain_id: Optional[str] = None,
91
92
  user_two = newrelic.get_user(authentication_domain_id=foo.id,
92
93
  email_id="test_user@random.com")
93
94
  ```
95
+ <!--End PulumiCodeChooser -->
94
96
 
95
97
 
96
98
  :param str authentication_domain_id: The ID of the authentication domain the user to be searched for belongs to.
@@ -98,7 +100,7 @@ def get_user(authentication_domain_id: Optional[str] = None,
98
100
 
99
101
  It should be noted that either `name` or `email_id` must be specified in order to retrieve a matching user.
100
102
 
101
- > **NOTE** If the specified `name` matches, or is contained in the names of multiple users in the account, the data source will return the first match from the list of all matching users retrieved from the API. However, when using the `email_id` argument as the search criterion, only the user with the specified email ID will be returned, as each user has a unique email ID and multiple users cannot have the same email ID.
103
+ > **NOTE** If the `name` specified in the configuration matches the names of multiple users in the account, the data source will return the first match from the list of all matching users retrieved from the API. However, when using the `email_id` argument as the search criterion, only the user with the specified email ID will be returned, as each user has a unique email ID and multiple users cannot have the same email ID.
102
104
 
103
105
  > **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
104
106
  :param str name: The name of the user to search for.
@@ -123,11 +125,12 @@ def get_user_output(authentication_domain_id: Optional[pulumi.Input[str]] = None
123
125
  name: Optional[pulumi.Input[Optional[str]]] = None,
124
126
  opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetUserResult]:
125
127
  """
126
- The `User` data source may be used to search for a user by their name and/or email ID, and accordingly, fetch the ID of the matching user.
128
+ The `User` data source helps search for a user by their name and/or email ID, and accordingly, fetch the ID of the matching user.
127
129
 
128
130
  ## Example Usage
129
131
 
130
- The below example illustrates fetching a user's ID (and other arguments) using the ID of the authentication domain the user belongs to, as well as a name and/or email ID, which can be used as criteria to search for a user who matches these specified parameters.
132
+ The below example illustrates fetching a the ID of a user (and other arguments) using the ID of the authentication domain the user belongs to, as well as a name and/or email ID, which can be used as criteria to search for a user who matches these specified parameters.
133
+ <!--Start PulumiCodeChooser -->
131
134
  ```python
132
135
  import pulumi
133
136
  import pulumi_newrelic as newrelic
@@ -138,6 +141,7 @@ def get_user_output(authentication_domain_id: Optional[pulumi.Input[str]] = None
138
141
  user_two = newrelic.get_user(authentication_domain_id=foo.id,
139
142
  email_id="test_user@random.com")
140
143
  ```
144
+ <!--End PulumiCodeChooser -->
141
145
 
142
146
 
143
147
  :param str authentication_domain_id: The ID of the authentication domain the user to be searched for belongs to.
@@ -145,7 +149,7 @@ def get_user_output(authentication_domain_id: Optional[pulumi.Input[str]] = None
145
149
 
146
150
  It should be noted that either `name` or `email_id` must be specified in order to retrieve a matching user.
147
151
 
148
- > **NOTE** If the specified `name` matches, or is contained in the names of multiple users in the account, the data source will return the first match from the list of all matching users retrieved from the API. However, when using the `email_id` argument as the search criterion, only the user with the specified email ID will be returned, as each user has a unique email ID and multiple users cannot have the same email ID.
152
+ > **NOTE** If the `name` specified in the configuration matches the names of multiple users in the account, the data source will return the first match from the list of all matching users retrieved from the API. However, when using the `email_id` argument as the search criterion, only the user with the specified email ID will be returned, as each user has a unique email ID and multiple users cannot have the same email ID.
149
153
 
150
154
  > **NOTE** The ID of an authentication domain can be retrieved using its name, via the data source `get_authentication_domain`, as shown in the example above. Head over to the documentation of this data source for more details and examples.
151
155
  :param str name: The name of the user to search for.