pulumi-newrelic 5.20.0a1709365820__py3-none-any.whl → 5.21.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pulumi_newrelic/__init__.py +10 -0
- pulumi_newrelic/_inputs.py +69 -29
- pulumi_newrelic/account_management.py +6 -2
- pulumi_newrelic/alert_channel.py +34 -2
- pulumi_newrelic/alert_condition.py +26 -2
- pulumi_newrelic/alert_muting_rule.py +6 -2
- pulumi_newrelic/alert_policy.py +48 -4
- pulumi_newrelic/alert_policy_channel.py +8 -4
- pulumi_newrelic/api_access_key.py +6 -26
- pulumi_newrelic/browser_application.py +6 -2
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +2 -2
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +6 -2
- pulumi_newrelic/cloud/aws_integrations.py +6 -2
- pulumi_newrelic/cloud/aws_link_account.py +6 -2
- pulumi_newrelic/cloud/azure_integrations.py +6 -2
- pulumi_newrelic/cloud/azure_link_account.py +6 -2
- pulumi_newrelic/cloud/gcp_integrations.py +6 -2
- pulumi_newrelic/cloud/gcp_link_account.py +6 -2
- pulumi_newrelic/data_partition_rule.py +8 -2
- pulumi_newrelic/entity_tags.py +8 -4
- pulumi_newrelic/events_to_metrics_rule.py +8 -4
- pulumi_newrelic/get_account.py +4 -0
- pulumi_newrelic/get_alert_policy.py +3 -3
- pulumi_newrelic/get_application.py +4 -0
- pulumi_newrelic/get_authentication_domain.py +4 -0
- pulumi_newrelic/get_cloud_account.py +4 -0
- pulumi_newrelic/get_entity.py +66 -4
- pulumi_newrelic/get_group.py +145 -0
- pulumi_newrelic/get_key_transaction.py +4 -0
- pulumi_newrelic/get_notification_destination.py +14 -1
- pulumi_newrelic/get_obfuscation_expression.py +4 -0
- pulumi_newrelic/get_service_level_alert_helper.py +12 -0
- pulumi_newrelic/get_test_grok_pattern.py +4 -0
- pulumi_newrelic/get_user.py +10 -6
- pulumi_newrelic/group.py +426 -0
- pulumi_newrelic/infra_alert_condition.py +33 -9
- pulumi_newrelic/insights/event.py +6 -0
- pulumi_newrelic/log_parsing_rule.py +12 -2
- pulumi_newrelic/monitor_downtime.py +28 -2
- pulumi_newrelic/notification_channel.py +72 -0
- pulumi_newrelic/notification_destination.py +160 -2
- pulumi_newrelic/nrql_alert_condition.py +28 -4
- pulumi_newrelic/nrql_drop_rule.py +30 -4
- pulumi_newrelic/obfuscation_expression.py +6 -2
- pulumi_newrelic/obfuscation_rule.py +6 -2
- pulumi_newrelic/one_dashboard.py +2 -2
- pulumi_newrelic/one_dashboard_json.py +2 -2
- pulumi_newrelic/one_dashboard_raw.py +6 -0
- pulumi_newrelic/outputs.py +78 -29
- pulumi_newrelic/plugins/_inputs.py +2 -2
- pulumi_newrelic/plugins/application_settings.py +22 -2
- pulumi_newrelic/plugins/outputs.py +2 -2
- pulumi_newrelic/plugins/workload.py +112 -4
- pulumi_newrelic/service_level.py +20 -6
- pulumi_newrelic/synthetics/alert_condition.py +26 -2
- pulumi_newrelic/synthetics/broken_links_monitor.py +19 -23
- pulumi_newrelic/synthetics/cert_check_monitor.py +19 -23
- pulumi_newrelic/synthetics/get_private_location.py +8 -0
- pulumi_newrelic/synthetics/get_secure_credential.py +4 -0
- pulumi_newrelic/synthetics/monitor.py +27 -23
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +12 -4
- pulumi_newrelic/synthetics/private_location.py +6 -2
- pulumi_newrelic/synthetics/script_monitor.py +27 -23
- pulumi_newrelic/synthetics/secure_credential.py +6 -2
- pulumi_newrelic/synthetics/step_monitor.py +15 -23
- pulumi_newrelic/user.py +4 -0
- pulumi_newrelic/workflow.py +22 -4
- {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0.dist-info}/METADATA +1 -1
- pulumi_newrelic-5.21.0.dist-info/RECORD +89 -0
- {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.20.0a1709365820.dist-info/RECORD +0 -87
- {pulumi_newrelic-5.20.0a1709365820.dist-info → pulumi_newrelic-5.21.0.dist-info}/top_level.txt +0 -0
@@ -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.
|
@@ -22,13 +22,16 @@ class GetNotificationDestinationResult:
|
|
22
22
|
"""
|
23
23
|
A collection of values returned by getNotificationDestination.
|
24
24
|
"""
|
25
|
-
def __init__(__self__, account_id=None, active=None, id=None, name=None, properties=None, status=None, type=None):
|
25
|
+
def __init__(__self__, account_id=None, active=None, guid=None, id=None, name=None, properties=None, status=None, type=None):
|
26
26
|
if account_id and not isinstance(account_id, int):
|
27
27
|
raise TypeError("Expected argument 'account_id' to be a int")
|
28
28
|
pulumi.set(__self__, "account_id", account_id)
|
29
29
|
if active and not isinstance(active, bool):
|
30
30
|
raise TypeError("Expected argument 'active' to be a bool")
|
31
31
|
pulumi.set(__self__, "active", active)
|
32
|
+
if guid and not isinstance(guid, str):
|
33
|
+
raise TypeError("Expected argument 'guid' to be a str")
|
34
|
+
pulumi.set(__self__, "guid", guid)
|
32
35
|
if id and not isinstance(id, str):
|
33
36
|
raise TypeError("Expected argument 'id' to be a str")
|
34
37
|
pulumi.set(__self__, "id", id)
|
@@ -58,6 +61,14 @@ class GetNotificationDestinationResult:
|
|
58
61
|
"""
|
59
62
|
return pulumi.get(self, "active")
|
60
63
|
|
64
|
+
@property
|
65
|
+
@pulumi.getter
|
66
|
+
def guid(self) -> str:
|
67
|
+
"""
|
68
|
+
The unique entity identifier of the destination in New Relic.
|
69
|
+
"""
|
70
|
+
return pulumi.get(self, "guid")
|
71
|
+
|
61
72
|
@property
|
62
73
|
@pulumi.getter
|
63
74
|
def id(self) -> Optional[str]:
|
@@ -104,6 +115,7 @@ class AwaitableGetNotificationDestinationResult(GetNotificationDestinationResult
|
|
104
115
|
return GetNotificationDestinationResult(
|
105
116
|
account_id=self.account_id,
|
106
117
|
active=self.active,
|
118
|
+
guid=self.guid,
|
107
119
|
id=self.id,
|
108
120
|
name=self.name,
|
109
121
|
properties=self.properties,
|
@@ -134,6 +146,7 @@ def get_notification_destination(account_id: Optional[int] = None,
|
|
134
146
|
return AwaitableGetNotificationDestinationResult(
|
135
147
|
account_id=pulumi.get(__ret__, 'account_id'),
|
136
148
|
active=pulumi.get(__ret__, 'active'),
|
149
|
+
guid=pulumi.get(__ret__, 'guid'),
|
137
150
|
id=pulumi.get(__ret__, 'id'),
|
138
151
|
name=pulumi.get(__ret__, 'name'),
|
139
152
|
properties=pulumi.get(__ret__, 'properties'),
|
@@ -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`.
|
pulumi_newrelic/get_user.py
CHANGED
@@ -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
|
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
|
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
|
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
|
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
|
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
|
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.
|