pulumi-newrelic 5.16.0a1698964311__py3-none-any.whl → 5.58.0a1763707205__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.
Potentially problematic release.
This version of pulumi-newrelic might be problematic. Click here for more details.
- pulumi_newrelic/__init__.py +58 -1
- pulumi_newrelic/_inputs.py +10772 -2775
- pulumi_newrelic/_utilities.py +92 -11
- pulumi_newrelic/account_management.py +56 -42
- pulumi_newrelic/alert_channel.py +177 -151
- pulumi_newrelic/alert_condition.py +313 -301
- pulumi_newrelic/alert_muting_rule.py +195 -138
- pulumi_newrelic/alert_policy.py +157 -109
- pulumi_newrelic/alert_policy_channel.py +95 -81
- pulumi_newrelic/api_access_key.py +191 -209
- pulumi_newrelic/browser_application.py +161 -153
- pulumi_newrelic/cloud/__init__.py +3 -1
- pulumi_newrelic/cloud/_inputs.py +4267 -2710
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +238 -200
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +159 -212
- pulumi_newrelic/cloud/aws_integrations.py +518 -1490
- pulumi_newrelic/cloud/aws_link_account.py +88 -76
- pulumi_newrelic/cloud/azure_integrations.py +681 -587
- pulumi_newrelic/cloud/azure_link_account.py +129 -117
- pulumi_newrelic/cloud/gcp_integrations.py +436 -408
- pulumi_newrelic/cloud/gcp_link_account.py +71 -59
- pulumi_newrelic/cloud/oci_link_account.py +926 -0
- pulumi_newrelic/cloud/outputs.py +1678 -2317
- pulumi_newrelic/config/__init__.py +2 -1
- pulumi_newrelic/config/__init__.pyi +45 -0
- pulumi_newrelic/config/vars.py +22 -17
- pulumi_newrelic/data_partition_rule.py +129 -117
- pulumi_newrelic/entity_tags.py +153 -31
- pulumi_newrelic/events_to_metrics_rule.py +114 -102
- pulumi_newrelic/get_account.py +41 -29
- pulumi_newrelic/get_alert_channel.py +73 -28
- pulumi_newrelic/get_alert_policy.py +83 -34
- pulumi_newrelic/get_application.py +51 -39
- pulumi_newrelic/get_authentication_domain.py +111 -0
- pulumi_newrelic/get_cloud_account.py +43 -31
- pulumi_newrelic/get_entity.py +126 -121
- pulumi_newrelic/get_group.py +190 -0
- pulumi_newrelic/get_key_transaction.py +117 -38
- pulumi_newrelic/get_notification_destination.py +86 -36
- pulumi_newrelic/get_obfuscation_expression.py +47 -35
- pulumi_newrelic/get_service_level_alert_helper.py +237 -137
- pulumi_newrelic/get_test_grok_pattern.py +47 -32
- pulumi_newrelic/get_user.py +165 -0
- pulumi_newrelic/group.py +286 -0
- pulumi_newrelic/infra_alert_condition.py +400 -382
- pulumi_newrelic/insights/__init__.py +2 -1
- pulumi_newrelic/insights/_inputs.py +94 -23
- pulumi_newrelic/insights/event.py +56 -48
- pulumi_newrelic/insights/outputs.py +51 -18
- pulumi_newrelic/key_transaction.py +465 -0
- pulumi_newrelic/log_parsing_rule.py +169 -153
- pulumi_newrelic/monitor_downtime.py +914 -0
- pulumi_newrelic/notification_channel.py +560 -418
- pulumi_newrelic/notification_destination.py +379 -124
- pulumi_newrelic/nrql_alert_condition.py +945 -513
- pulumi_newrelic/nrql_drop_rule.py +121 -129
- pulumi_newrelic/obfuscation_expression.py +88 -76
- pulumi_newrelic/obfuscation_rule.py +123 -109
- pulumi_newrelic/one_dashboard.py +118 -108
- pulumi_newrelic/one_dashboard_json.py +77 -67
- pulumi_newrelic/one_dashboard_raw.py +214 -202
- pulumi_newrelic/outputs.py +5491 -2141
- pulumi_newrelic/pipeline_cloud_rule.py +335 -0
- pulumi_newrelic/plugins/__init__.py +2 -1
- pulumi_newrelic/plugins/_inputs.py +520 -90
- pulumi_newrelic/plugins/application_settings.py +463 -167
- pulumi_newrelic/plugins/outputs.py +337 -75
- pulumi_newrelic/plugins/workload.py +387 -151
- pulumi_newrelic/provider.py +156 -142
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +277 -255
- pulumi_newrelic/synthetics/__init__.py +2 -1
- pulumi_newrelic/synthetics/_inputs.py +275 -106
- pulumi_newrelic/synthetics/alert_condition.py +174 -160
- pulumi_newrelic/synthetics/broken_links_monitor.py +367 -207
- pulumi_newrelic/synthetics/cert_check_monitor.py +380 -218
- pulumi_newrelic/synthetics/get_private_location.py +51 -39
- pulumi_newrelic/synthetics/get_secure_credential.py +39 -27
- pulumi_newrelic/synthetics/monitor.py +668 -462
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +219 -201
- pulumi_newrelic/synthetics/outputs.py +102 -85
- pulumi_newrelic/synthetics/private_location.py +120 -110
- pulumi_newrelic/synthetics/script_monitor.py +623 -375
- pulumi_newrelic/synthetics/secure_credential.py +99 -93
- pulumi_newrelic/synthetics/step_monitor.py +545 -201
- pulumi_newrelic/user.py +366 -0
- pulumi_newrelic/workflow.py +348 -312
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +8 -7
- pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.16.0a1698964311.dist-info/RECORD +0 -82
- {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
# coding=utf-8
|
|
2
|
-
# *** WARNING: this file was generated by
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
3
|
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import builtins as _builtins
|
|
6
6
|
import warnings
|
|
7
|
+
import sys
|
|
7
8
|
import pulumi
|
|
8
9
|
import pulumi.runtime
|
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
10
15
|
from . import _utilities
|
|
11
16
|
from . import outputs
|
|
12
17
|
|
|
@@ -23,8 +28,8 @@ class GetTestGrokPatternResult:
|
|
|
23
28
|
A collection of values returned by getTestGrokPattern.
|
|
24
29
|
"""
|
|
25
30
|
def __init__(__self__, account_id=None, grok=None, id=None, log_lines=None, test_groks=None):
|
|
26
|
-
if account_id and not isinstance(account_id,
|
|
27
|
-
raise TypeError("Expected argument 'account_id' to be a
|
|
31
|
+
if account_id and not isinstance(account_id, str):
|
|
32
|
+
raise TypeError("Expected argument 'account_id' to be a str")
|
|
28
33
|
pulumi.set(__self__, "account_id", account_id)
|
|
29
34
|
if grok and not isinstance(grok, str):
|
|
30
35
|
raise TypeError("Expected argument 'grok' to be a str")
|
|
@@ -39,30 +44,30 @@ class GetTestGrokPatternResult:
|
|
|
39
44
|
raise TypeError("Expected argument 'test_groks' to be a list")
|
|
40
45
|
pulumi.set(__self__, "test_groks", test_groks)
|
|
41
46
|
|
|
42
|
-
@property
|
|
47
|
+
@_builtins.property
|
|
43
48
|
@pulumi.getter(name="accountId")
|
|
44
|
-
def account_id(self) -> Optional[
|
|
49
|
+
def account_id(self) -> Optional[_builtins.str]:
|
|
45
50
|
return pulumi.get(self, "account_id")
|
|
46
51
|
|
|
47
|
-
@property
|
|
52
|
+
@_builtins.property
|
|
48
53
|
@pulumi.getter
|
|
49
|
-
def grok(self) -> str:
|
|
54
|
+
def grok(self) -> _builtins.str:
|
|
50
55
|
return pulumi.get(self, "grok")
|
|
51
56
|
|
|
52
|
-
@property
|
|
57
|
+
@_builtins.property
|
|
53
58
|
@pulumi.getter
|
|
54
|
-
def id(self) -> str:
|
|
59
|
+
def id(self) -> _builtins.str:
|
|
55
60
|
"""
|
|
56
61
|
The provider-assigned unique ID for this managed resource.
|
|
57
62
|
"""
|
|
58
63
|
return pulumi.get(self, "id")
|
|
59
64
|
|
|
60
|
-
@property
|
|
65
|
+
@_builtins.property
|
|
61
66
|
@pulumi.getter(name="logLines")
|
|
62
|
-
def log_lines(self) -> Sequence[str]:
|
|
67
|
+
def log_lines(self) -> Sequence[_builtins.str]:
|
|
63
68
|
return pulumi.get(self, "log_lines")
|
|
64
69
|
|
|
65
|
-
@property
|
|
70
|
+
@_builtins.property
|
|
66
71
|
@pulumi.getter(name="testGroks")
|
|
67
72
|
def test_groks(self) -> Sequence['outputs.GetTestGrokPatternTestGrokResult']:
|
|
68
73
|
"""
|
|
@@ -84,9 +89,9 @@ class AwaitableGetTestGrokPatternResult(GetTestGrokPatternResult):
|
|
|
84
89
|
test_groks=self.test_groks)
|
|
85
90
|
|
|
86
91
|
|
|
87
|
-
def get_test_grok_pattern(account_id: Optional[
|
|
88
|
-
grok: Optional[str] = None,
|
|
89
|
-
log_lines: Optional[Sequence[str]] = None,
|
|
92
|
+
def get_test_grok_pattern(account_id: Optional[_builtins.str] = None,
|
|
93
|
+
grok: Optional[_builtins.str] = None,
|
|
94
|
+
log_lines: Optional[Sequence[_builtins.str]] = None,
|
|
90
95
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetTestGrokPatternResult:
|
|
91
96
|
"""
|
|
92
97
|
## Example Usage
|
|
@@ -95,7 +100,8 @@ def get_test_grok_pattern(account_id: Optional[int] = None,
|
|
|
95
100
|
import pulumi
|
|
96
101
|
import pulumi_newrelic as newrelic
|
|
97
102
|
|
|
98
|
-
|
|
103
|
+
# Data source
|
|
104
|
+
foo = newrelic.get_test_grok_pattern(grok="%{IP:host_ip}",
|
|
99
105
|
log_lines=[
|
|
100
106
|
"host_ip: 43.3.120.2",
|
|
101
107
|
"bytes_received: 2048",
|
|
@@ -103,9 +109,9 @@ def get_test_grok_pattern(account_id: Optional[int] = None,
|
|
|
103
109
|
```
|
|
104
110
|
|
|
105
111
|
|
|
106
|
-
:param
|
|
107
|
-
:param str grok: The Grok pattern to test.
|
|
108
|
-
:param Sequence[str] log_lines: The log lines to test the Grok pattern against.
|
|
112
|
+
:param _builtins.str 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`.
|
|
113
|
+
:param _builtins.str grok: The Grok pattern to test.
|
|
114
|
+
:param Sequence[_builtins.str] log_lines: The log lines to test the Grok pattern against.
|
|
109
115
|
"""
|
|
110
116
|
__args__ = dict()
|
|
111
117
|
__args__['accountId'] = account_id
|
|
@@ -120,13 +126,10 @@ def get_test_grok_pattern(account_id: Optional[int] = None,
|
|
|
120
126
|
id=pulumi.get(__ret__, 'id'),
|
|
121
127
|
log_lines=pulumi.get(__ret__, 'log_lines'),
|
|
122
128
|
test_groks=pulumi.get(__ret__, 'test_groks'))
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
grok: Optional[pulumi.Input[str]] = None,
|
|
128
|
-
log_lines: Optional[pulumi.Input[Sequence[str]]] = None,
|
|
129
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetTestGrokPatternResult]:
|
|
129
|
+
def get_test_grok_pattern_output(account_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
130
|
+
grok: Optional[pulumi.Input[_builtins.str]] = None,
|
|
131
|
+
log_lines: Optional[pulumi.Input[Sequence[_builtins.str]]] = None,
|
|
132
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetTestGrokPatternResult]:
|
|
130
133
|
"""
|
|
131
134
|
## Example Usage
|
|
132
135
|
|
|
@@ -134,7 +137,8 @@ def get_test_grok_pattern_output(account_id: Optional[pulumi.Input[Optional[int]
|
|
|
134
137
|
import pulumi
|
|
135
138
|
import pulumi_newrelic as newrelic
|
|
136
139
|
|
|
137
|
-
|
|
140
|
+
# Data source
|
|
141
|
+
foo = newrelic.get_test_grok_pattern(grok="%{IP:host_ip}",
|
|
138
142
|
log_lines=[
|
|
139
143
|
"host_ip: 43.3.120.2",
|
|
140
144
|
"bytes_received: 2048",
|
|
@@ -142,8 +146,19 @@ def get_test_grok_pattern_output(account_id: Optional[pulumi.Input[Optional[int]
|
|
|
142
146
|
```
|
|
143
147
|
|
|
144
148
|
|
|
145
|
-
:param
|
|
146
|
-
:param str grok: The Grok pattern to test.
|
|
147
|
-
:param Sequence[str] log_lines: The log lines to test the Grok pattern against.
|
|
149
|
+
:param _builtins.str 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`.
|
|
150
|
+
:param _builtins.str grok: The Grok pattern to test.
|
|
151
|
+
:param Sequence[_builtins.str] log_lines: The log lines to test the Grok pattern against.
|
|
148
152
|
"""
|
|
149
|
-
|
|
153
|
+
__args__ = dict()
|
|
154
|
+
__args__['accountId'] = account_id
|
|
155
|
+
__args__['grok'] = grok
|
|
156
|
+
__args__['logLines'] = log_lines
|
|
157
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
158
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getTestGrokPattern:getTestGrokPattern', __args__, opts=opts, typ=GetTestGrokPatternResult)
|
|
159
|
+
return __ret__.apply(lambda __response__: GetTestGrokPatternResult(
|
|
160
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
|
161
|
+
grok=pulumi.get(__response__, 'grok'),
|
|
162
|
+
id=pulumi.get(__response__, 'id'),
|
|
163
|
+
log_lines=pulumi.get(__response__, 'log_lines'),
|
|
164
|
+
test_groks=pulumi.get(__response__, 'test_groks')))
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
|
+
from . import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = [
|
|
18
|
+
'GetUserResult',
|
|
19
|
+
'AwaitableGetUserResult',
|
|
20
|
+
'get_user',
|
|
21
|
+
'get_user_output',
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
@pulumi.output_type
|
|
25
|
+
class GetUserResult:
|
|
26
|
+
"""
|
|
27
|
+
A collection of values returned by getUser.
|
|
28
|
+
"""
|
|
29
|
+
def __init__(__self__, authentication_domain_id=None, email_id=None, id=None, name=None):
|
|
30
|
+
if authentication_domain_id and not isinstance(authentication_domain_id, str):
|
|
31
|
+
raise TypeError("Expected argument 'authentication_domain_id' to be a str")
|
|
32
|
+
pulumi.set(__self__, "authentication_domain_id", authentication_domain_id)
|
|
33
|
+
if email_id and not isinstance(email_id, str):
|
|
34
|
+
raise TypeError("Expected argument 'email_id' to be a str")
|
|
35
|
+
pulumi.set(__self__, "email_id", email_id)
|
|
36
|
+
if id and not isinstance(id, str):
|
|
37
|
+
raise TypeError("Expected argument 'id' to be a str")
|
|
38
|
+
pulumi.set(__self__, "id", id)
|
|
39
|
+
if name and not isinstance(name, str):
|
|
40
|
+
raise TypeError("Expected argument 'name' to be a str")
|
|
41
|
+
pulumi.set(__self__, "name", name)
|
|
42
|
+
|
|
43
|
+
@_builtins.property
|
|
44
|
+
@pulumi.getter(name="authenticationDomainId")
|
|
45
|
+
def authentication_domain_id(self) -> _builtins.str:
|
|
46
|
+
return pulumi.get(self, "authentication_domain_id")
|
|
47
|
+
|
|
48
|
+
@_builtins.property
|
|
49
|
+
@pulumi.getter(name="emailId")
|
|
50
|
+
def email_id(self) -> _builtins.str:
|
|
51
|
+
return pulumi.get(self, "email_id")
|
|
52
|
+
|
|
53
|
+
@_builtins.property
|
|
54
|
+
@pulumi.getter
|
|
55
|
+
def id(self) -> _builtins.str:
|
|
56
|
+
"""
|
|
57
|
+
The ID of the matching user fetched.
|
|
58
|
+
"""
|
|
59
|
+
return pulumi.get(self, "id")
|
|
60
|
+
|
|
61
|
+
@_builtins.property
|
|
62
|
+
@pulumi.getter
|
|
63
|
+
def name(self) -> _builtins.str:
|
|
64
|
+
return pulumi.get(self, "name")
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
class AwaitableGetUserResult(GetUserResult):
|
|
68
|
+
# pylint: disable=using-constant-test
|
|
69
|
+
def __await__(self):
|
|
70
|
+
if False:
|
|
71
|
+
yield self
|
|
72
|
+
return GetUserResult(
|
|
73
|
+
authentication_domain_id=self.authentication_domain_id,
|
|
74
|
+
email_id=self.email_id,
|
|
75
|
+
id=self.id,
|
|
76
|
+
name=self.name)
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def get_user(authentication_domain_id: Optional[_builtins.str] = None,
|
|
80
|
+
email_id: Optional[_builtins.str] = None,
|
|
81
|
+
name: Optional[_builtins.str] = None,
|
|
82
|
+
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetUserResult:
|
|
83
|
+
"""
|
|
84
|
+
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.
|
|
85
|
+
|
|
86
|
+
## Example Usage
|
|
87
|
+
|
|
88
|
+
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.
|
|
89
|
+
```python
|
|
90
|
+
import pulumi
|
|
91
|
+
import pulumi_newrelic as newrelic
|
|
92
|
+
|
|
93
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
94
|
+
user_one = newrelic.get_user(authentication_domain_id=foo.id,
|
|
95
|
+
name="Test User")
|
|
96
|
+
user_two = newrelic.get_user(authentication_domain_id=foo.id,
|
|
97
|
+
email_id="test_user@random.com")
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
:param _builtins.str authentication_domain_id: The ID of the authentication domain the user to be searched for belongs to.
|
|
102
|
+
:param _builtins.str email_id: The email ID of the user to search for.
|
|
103
|
+
|
|
104
|
+
It should be noted that either `name` or `email_id` must be specified in order to retrieve a matching user.
|
|
105
|
+
|
|
106
|
+
> **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.
|
|
107
|
+
|
|
108
|
+
> **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.
|
|
109
|
+
:param _builtins.str name: The name of the user to search for.
|
|
110
|
+
"""
|
|
111
|
+
__args__ = dict()
|
|
112
|
+
__args__['authenticationDomainId'] = authentication_domain_id
|
|
113
|
+
__args__['emailId'] = email_id
|
|
114
|
+
__args__['name'] = name
|
|
115
|
+
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
116
|
+
__ret__ = pulumi.runtime.invoke('newrelic:index/getUser:getUser', __args__, opts=opts, typ=GetUserResult).value
|
|
117
|
+
|
|
118
|
+
return AwaitableGetUserResult(
|
|
119
|
+
authentication_domain_id=pulumi.get(__ret__, 'authentication_domain_id'),
|
|
120
|
+
email_id=pulumi.get(__ret__, 'email_id'),
|
|
121
|
+
id=pulumi.get(__ret__, 'id'),
|
|
122
|
+
name=pulumi.get(__ret__, 'name'))
|
|
123
|
+
def get_user_output(authentication_domain_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
124
|
+
email_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
125
|
+
name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
|
|
126
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetUserResult]:
|
|
127
|
+
"""
|
|
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.
|
|
129
|
+
|
|
130
|
+
## Example Usage
|
|
131
|
+
|
|
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
|
+
```python
|
|
134
|
+
import pulumi
|
|
135
|
+
import pulumi_newrelic as newrelic
|
|
136
|
+
|
|
137
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
138
|
+
user_one = newrelic.get_user(authentication_domain_id=foo.id,
|
|
139
|
+
name="Test User")
|
|
140
|
+
user_two = newrelic.get_user(authentication_domain_id=foo.id,
|
|
141
|
+
email_id="test_user@random.com")
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
:param _builtins.str authentication_domain_id: The ID of the authentication domain the user to be searched for belongs to.
|
|
146
|
+
:param _builtins.str email_id: The email ID of the user to search for.
|
|
147
|
+
|
|
148
|
+
It should be noted that either `name` or `email_id` must be specified in order to retrieve a matching user.
|
|
149
|
+
|
|
150
|
+
> **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.
|
|
151
|
+
|
|
152
|
+
> **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.
|
|
153
|
+
:param _builtins.str name: The name of the user to search for.
|
|
154
|
+
"""
|
|
155
|
+
__args__ = dict()
|
|
156
|
+
__args__['authenticationDomainId'] = authentication_domain_id
|
|
157
|
+
__args__['emailId'] = email_id
|
|
158
|
+
__args__['name'] = name
|
|
159
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
160
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getUser:getUser', __args__, opts=opts, typ=GetUserResult)
|
|
161
|
+
return __ret__.apply(lambda __response__: GetUserResult(
|
|
162
|
+
authentication_domain_id=pulumi.get(__response__, 'authentication_domain_id'),
|
|
163
|
+
email_id=pulumi.get(__response__, 'email_id'),
|
|
164
|
+
id=pulumi.get(__response__, 'id'),
|
|
165
|
+
name=pulumi.get(__response__, 'name')))
|
pulumi_newrelic/group.py
ADDED
|
@@ -0,0 +1,286 @@
|
|
|
1
|
+
# coding=utf-8
|
|
2
|
+
# *** WARNING: this file was generated by pulumi-language-python. ***
|
|
3
|
+
# *** Do not edit by hand unless you're certain you know what you are doing! ***
|
|
4
|
+
|
|
5
|
+
import builtins as _builtins
|
|
6
|
+
import warnings
|
|
7
|
+
import sys
|
|
8
|
+
import pulumi
|
|
9
|
+
import pulumi.runtime
|
|
10
|
+
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
|
11
|
+
if sys.version_info >= (3, 11):
|
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
|
13
|
+
else:
|
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
|
15
|
+
from . import _utilities
|
|
16
|
+
|
|
17
|
+
__all__ = ['GroupArgs', 'Group']
|
|
18
|
+
|
|
19
|
+
@pulumi.input_type
|
|
20
|
+
class GroupArgs:
|
|
21
|
+
def __init__(__self__, *,
|
|
22
|
+
authentication_domain_id: pulumi.Input[_builtins.str],
|
|
23
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
24
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None):
|
|
25
|
+
"""
|
|
26
|
+
The set of arguments for constructing a Group resource.
|
|
27
|
+
:param pulumi.Input[_builtins.str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
|
28
|
+
:param pulumi.Input[_builtins.str] name: The name of the group to be created.
|
|
29
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
|
30
|
+
|
|
31
|
+
> **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.
|
|
32
|
+
|
|
33
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
|
34
|
+
"""
|
|
35
|
+
pulumi.set(__self__, "authentication_domain_id", authentication_domain_id)
|
|
36
|
+
if name is not None:
|
|
37
|
+
pulumi.set(__self__, "name", name)
|
|
38
|
+
if user_ids is not None:
|
|
39
|
+
pulumi.set(__self__, "user_ids", user_ids)
|
|
40
|
+
|
|
41
|
+
@_builtins.property
|
|
42
|
+
@pulumi.getter(name="authenticationDomainId")
|
|
43
|
+
def authentication_domain_id(self) -> pulumi.Input[_builtins.str]:
|
|
44
|
+
"""
|
|
45
|
+
The ID of the authentication domain to which the group to be created would belong.
|
|
46
|
+
"""
|
|
47
|
+
return pulumi.get(self, "authentication_domain_id")
|
|
48
|
+
|
|
49
|
+
@authentication_domain_id.setter
|
|
50
|
+
def authentication_domain_id(self, value: pulumi.Input[_builtins.str]):
|
|
51
|
+
pulumi.set(self, "authentication_domain_id", value)
|
|
52
|
+
|
|
53
|
+
@_builtins.property
|
|
54
|
+
@pulumi.getter
|
|
55
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
56
|
+
"""
|
|
57
|
+
The name of the group to be created.
|
|
58
|
+
"""
|
|
59
|
+
return pulumi.get(self, "name")
|
|
60
|
+
|
|
61
|
+
@name.setter
|
|
62
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
63
|
+
pulumi.set(self, "name", value)
|
|
64
|
+
|
|
65
|
+
@_builtins.property
|
|
66
|
+
@pulumi.getter(name="userIds")
|
|
67
|
+
def user_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
|
|
68
|
+
"""
|
|
69
|
+
A list of IDs of users to be included in the group to be created.
|
|
70
|
+
|
|
71
|
+
> **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.
|
|
72
|
+
|
|
73
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
|
74
|
+
"""
|
|
75
|
+
return pulumi.get(self, "user_ids")
|
|
76
|
+
|
|
77
|
+
@user_ids.setter
|
|
78
|
+
def user_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
|
|
79
|
+
pulumi.set(self, "user_ids", value)
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
@pulumi.input_type
|
|
83
|
+
class _GroupState:
|
|
84
|
+
def __init__(__self__, *,
|
|
85
|
+
authentication_domain_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
86
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
87
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None):
|
|
88
|
+
"""
|
|
89
|
+
Input properties used for looking up and filtering Group resources.
|
|
90
|
+
:param pulumi.Input[_builtins.str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
|
91
|
+
:param pulumi.Input[_builtins.str] name: The name of the group to be created.
|
|
92
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
|
93
|
+
|
|
94
|
+
> **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.
|
|
95
|
+
|
|
96
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
|
97
|
+
"""
|
|
98
|
+
if authentication_domain_id is not None:
|
|
99
|
+
pulumi.set(__self__, "authentication_domain_id", authentication_domain_id)
|
|
100
|
+
if name is not None:
|
|
101
|
+
pulumi.set(__self__, "name", name)
|
|
102
|
+
if user_ids is not None:
|
|
103
|
+
pulumi.set(__self__, "user_ids", user_ids)
|
|
104
|
+
|
|
105
|
+
@_builtins.property
|
|
106
|
+
@pulumi.getter(name="authenticationDomainId")
|
|
107
|
+
def authentication_domain_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
108
|
+
"""
|
|
109
|
+
The ID of the authentication domain to which the group to be created would belong.
|
|
110
|
+
"""
|
|
111
|
+
return pulumi.get(self, "authentication_domain_id")
|
|
112
|
+
|
|
113
|
+
@authentication_domain_id.setter
|
|
114
|
+
def authentication_domain_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
115
|
+
pulumi.set(self, "authentication_domain_id", value)
|
|
116
|
+
|
|
117
|
+
@_builtins.property
|
|
118
|
+
@pulumi.getter
|
|
119
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
120
|
+
"""
|
|
121
|
+
The name of the group to be created.
|
|
122
|
+
"""
|
|
123
|
+
return pulumi.get(self, "name")
|
|
124
|
+
|
|
125
|
+
@name.setter
|
|
126
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
127
|
+
pulumi.set(self, "name", value)
|
|
128
|
+
|
|
129
|
+
@_builtins.property
|
|
130
|
+
@pulumi.getter(name="userIds")
|
|
131
|
+
def user_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
|
|
132
|
+
"""
|
|
133
|
+
A list of IDs of users to be included in the group to be created.
|
|
134
|
+
|
|
135
|
+
> **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.
|
|
136
|
+
|
|
137
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
|
138
|
+
"""
|
|
139
|
+
return pulumi.get(self, "user_ids")
|
|
140
|
+
|
|
141
|
+
@user_ids.setter
|
|
142
|
+
def user_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
|
|
143
|
+
pulumi.set(self, "user_ids", value)
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
@pulumi.type_token("newrelic:index/group:Group")
|
|
147
|
+
class Group(pulumi.CustomResource):
|
|
148
|
+
@overload
|
|
149
|
+
def __init__(__self__,
|
|
150
|
+
resource_name: str,
|
|
151
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
152
|
+
authentication_domain_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
153
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
154
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
155
|
+
__props__=None):
|
|
156
|
+
"""
|
|
157
|
+
## Import
|
|
158
|
+
|
|
159
|
+
A group can be imported using its ID. Example:
|
|
160
|
+
|
|
161
|
+
```sh
|
|
162
|
+
$ pulumi import newrelic:index/group:Group foo <group_id>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
:param str resource_name: The name of the resource.
|
|
166
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
167
|
+
:param pulumi.Input[_builtins.str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
|
168
|
+
:param pulumi.Input[_builtins.str] name: The name of the group to be created.
|
|
169
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
|
170
|
+
|
|
171
|
+
> **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.
|
|
172
|
+
|
|
173
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
|
174
|
+
"""
|
|
175
|
+
...
|
|
176
|
+
@overload
|
|
177
|
+
def __init__(__self__,
|
|
178
|
+
resource_name: str,
|
|
179
|
+
args: GroupArgs,
|
|
180
|
+
opts: Optional[pulumi.ResourceOptions] = None):
|
|
181
|
+
"""
|
|
182
|
+
## Import
|
|
183
|
+
|
|
184
|
+
A group can be imported using its ID. Example:
|
|
185
|
+
|
|
186
|
+
```sh
|
|
187
|
+
$ pulumi import newrelic:index/group:Group foo <group_id>
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
:param str resource_name: The name of the resource.
|
|
191
|
+
:param GroupArgs args: The arguments to use to populate this resource's properties.
|
|
192
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
193
|
+
"""
|
|
194
|
+
...
|
|
195
|
+
def __init__(__self__, resource_name: str, *args, **kwargs):
|
|
196
|
+
resource_args, opts = _utilities.get_resource_args_opts(GroupArgs, pulumi.ResourceOptions, *args, **kwargs)
|
|
197
|
+
if resource_args is not None:
|
|
198
|
+
__self__._internal_init(resource_name, opts, **resource_args.__dict__)
|
|
199
|
+
else:
|
|
200
|
+
__self__._internal_init(resource_name, *args, **kwargs)
|
|
201
|
+
|
|
202
|
+
def _internal_init(__self__,
|
|
203
|
+
resource_name: str,
|
|
204
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
205
|
+
authentication_domain_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
206
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
207
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None,
|
|
208
|
+
__props__=None):
|
|
209
|
+
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
210
|
+
if not isinstance(opts, pulumi.ResourceOptions):
|
|
211
|
+
raise TypeError('Expected resource options to be a ResourceOptions instance')
|
|
212
|
+
if opts.id is None:
|
|
213
|
+
if __props__ is not None:
|
|
214
|
+
raise TypeError('__props__ is only valid when passed in combination with a valid opts.id to get an existing resource')
|
|
215
|
+
__props__ = GroupArgs.__new__(GroupArgs)
|
|
216
|
+
|
|
217
|
+
if authentication_domain_id is None and not opts.urn:
|
|
218
|
+
raise TypeError("Missing required property 'authentication_domain_id'")
|
|
219
|
+
__props__.__dict__["authentication_domain_id"] = authentication_domain_id
|
|
220
|
+
__props__.__dict__["name"] = name
|
|
221
|
+
__props__.__dict__["user_ids"] = user_ids
|
|
222
|
+
super(Group, __self__).__init__(
|
|
223
|
+
'newrelic:index/group:Group',
|
|
224
|
+
resource_name,
|
|
225
|
+
__props__,
|
|
226
|
+
opts)
|
|
227
|
+
|
|
228
|
+
@staticmethod
|
|
229
|
+
def get(resource_name: str,
|
|
230
|
+
id: pulumi.Input[str],
|
|
231
|
+
opts: Optional[pulumi.ResourceOptions] = None,
|
|
232
|
+
authentication_domain_id: Optional[pulumi.Input[_builtins.str]] = None,
|
|
233
|
+
name: Optional[pulumi.Input[_builtins.str]] = None,
|
|
234
|
+
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]] = None) -> 'Group':
|
|
235
|
+
"""
|
|
236
|
+
Get an existing Group resource's state with the given name, id, and optional extra
|
|
237
|
+
properties used to qualify the lookup.
|
|
238
|
+
|
|
239
|
+
:param str resource_name: The unique name of the resulting resource.
|
|
240
|
+
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
241
|
+
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
242
|
+
:param pulumi.Input[_builtins.str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
|
243
|
+
:param pulumi.Input[_builtins.str] name: The name of the group to be created.
|
|
244
|
+
:param pulumi.Input[Sequence[pulumi.Input[_builtins.str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
|
245
|
+
|
|
246
|
+
> **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.
|
|
247
|
+
|
|
248
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
|
249
|
+
"""
|
|
250
|
+
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
|
251
|
+
|
|
252
|
+
__props__ = _GroupState.__new__(_GroupState)
|
|
253
|
+
|
|
254
|
+
__props__.__dict__["authentication_domain_id"] = authentication_domain_id
|
|
255
|
+
__props__.__dict__["name"] = name
|
|
256
|
+
__props__.__dict__["user_ids"] = user_ids
|
|
257
|
+
return Group(resource_name, opts=opts, __props__=__props__)
|
|
258
|
+
|
|
259
|
+
@_builtins.property
|
|
260
|
+
@pulumi.getter(name="authenticationDomainId")
|
|
261
|
+
def authentication_domain_id(self) -> pulumi.Output[_builtins.str]:
|
|
262
|
+
"""
|
|
263
|
+
The ID of the authentication domain to which the group to be created would belong.
|
|
264
|
+
"""
|
|
265
|
+
return pulumi.get(self, "authentication_domain_id")
|
|
266
|
+
|
|
267
|
+
@_builtins.property
|
|
268
|
+
@pulumi.getter
|
|
269
|
+
def name(self) -> pulumi.Output[_builtins.str]:
|
|
270
|
+
"""
|
|
271
|
+
The name of the group to be created.
|
|
272
|
+
"""
|
|
273
|
+
return pulumi.get(self, "name")
|
|
274
|
+
|
|
275
|
+
@_builtins.property
|
|
276
|
+
@pulumi.getter(name="userIds")
|
|
277
|
+
def user_ids(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
|
|
278
|
+
"""
|
|
279
|
+
A list of IDs of users to be included in the group to be created.
|
|
280
|
+
|
|
281
|
+
> **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.
|
|
282
|
+
|
|
283
|
+
> **WARNING:** Changing the `authentication_domain_id` of a `Group` resource that has already been applied would result in a **replacement** of the resource – destruction of the existing resource, followed by the addition of a new resource with the specified configuration. This is due to the fact that updating the `authentication_domain_id` of an existing group is not supported.
|
|
284
|
+
"""
|
|
285
|
+
return pulumi.get(self, "user_ids")
|
|
286
|
+
|