pulumi-newrelic 5.22.0__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 +28 -1
- pulumi_newrelic/_inputs.py +10385 -2976
- pulumi_newrelic/_utilities.py +50 -10
- pulumi_newrelic/account_management.py +48 -42
- pulumi_newrelic/alert_channel.py +165 -175
- pulumi_newrelic/alert_condition.py +307 -319
- pulumi_newrelic/alert_muting_rule.py +193 -140
- pulumi_newrelic/alert_policy.py +121 -117
- pulumi_newrelic/alert_policy_channel.py +89 -79
- pulumi_newrelic/api_access_key.py +195 -193
- pulumi_newrelic/browser_application.py +120 -114
- pulumi_newrelic/cloud/__init__.py +3 -1
- pulumi_newrelic/cloud/_inputs.py +4267 -2714
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +206 -196
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +143 -228
- pulumi_newrelic/cloud/aws_integrations.py +510 -1490
- pulumi_newrelic/cloud/aws_link_account.py +80 -76
- pulumi_newrelic/cloud/azure_integrations.py +673 -587
- pulumi_newrelic/cloud/azure_link_account.py +121 -117
- pulumi_newrelic/cloud/gcp_integrations.py +428 -408
- pulumi_newrelic/cloud/gcp_link_account.py +65 -61
- pulumi_newrelic/cloud/oci_link_account.py +926 -0
- pulumi_newrelic/cloud/outputs.py +1678 -2321
- pulumi_newrelic/config/__init__.py +2 -1
- pulumi_newrelic/config/__init__.pyi +8 -3
- pulumi_newrelic/config/vars.py +22 -17
- pulumi_newrelic/data_partition_rule.py +119 -117
- pulumi_newrelic/entity_tags.py +111 -53
- pulumi_newrelic/events_to_metrics_rule.py +106 -102
- pulumi_newrelic/get_account.py +41 -33
- pulumi_newrelic/get_alert_channel.py +73 -28
- pulumi_newrelic/get_alert_policy.py +82 -33
- pulumi_newrelic/get_application.py +51 -43
- pulumi_newrelic/get_authentication_domain.py +27 -23
- pulumi_newrelic/get_cloud_account.py +43 -35
- pulumi_newrelic/get_entity.py +126 -183
- pulumi_newrelic/get_group.py +76 -31
- pulumi_newrelic/get_key_transaction.py +117 -42
- pulumi_newrelic/get_notification_destination.py +75 -38
- pulumi_newrelic/get_obfuscation_expression.py +47 -39
- pulumi_newrelic/get_service_level_alert_helper.py +189 -171
- pulumi_newrelic/get_test_grok_pattern.py +47 -36
- pulumi_newrelic/get_user.py +39 -31
- pulumi_newrelic/group.py +59 -199
- pulumi_newrelic/infra_alert_condition.py +399 -405
- pulumi_newrelic/insights/__init__.py +2 -1
- pulumi_newrelic/insights/_inputs.py +71 -28
- pulumi_newrelic/insights/event.py +54 -52
- pulumi_newrelic/insights/outputs.py +28 -23
- pulumi_newrelic/key_transaction.py +465 -0
- pulumi_newrelic/log_parsing_rule.py +159 -157
- pulumi_newrelic/monitor_downtime.py +311 -331
- pulumi_newrelic/notification_channel.py +534 -464
- pulumi_newrelic/notification_destination.py +238 -141
- pulumi_newrelic/nrql_alert_condition.py +820 -614
- pulumi_newrelic/nrql_drop_rule.py +113 -151
- pulumi_newrelic/obfuscation_expression.py +80 -76
- pulumi_newrelic/obfuscation_rule.py +115 -109
- pulumi_newrelic/one_dashboard.py +110 -104
- pulumi_newrelic/one_dashboard_json.py +69 -63
- pulumi_newrelic/one_dashboard_raw.py +212 -206
- pulumi_newrelic/outputs.py +4936 -2234
- pulumi_newrelic/pipeline_cloud_rule.py +335 -0
- pulumi_newrelic/plugins/__init__.py +2 -1
- pulumi_newrelic/plugins/_inputs.py +519 -89
- pulumi_newrelic/plugins/application_settings.py +463 -187
- pulumi_newrelic/plugins/outputs.py +336 -74
- pulumi_newrelic/plugins/workload.py +313 -189
- pulumi_newrelic/provider.py +156 -142
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +263 -263
- pulumi_newrelic/synthetics/__init__.py +2 -1
- pulumi_newrelic/synthetics/_inputs.py +265 -108
- pulumi_newrelic/synthetics/alert_condition.py +170 -180
- pulumi_newrelic/synthetics/broken_links_monitor.py +297 -249
- pulumi_newrelic/synthetics/cert_check_monitor.py +306 -258
- pulumi_newrelic/synthetics/get_private_location.py +51 -47
- pulumi_newrelic/synthetics/get_secure_credential.py +39 -31
- pulumi_newrelic/synthetics/monitor.py +658 -460
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +211 -205
- pulumi_newrelic/synthetics/outputs.py +92 -87
- pulumi_newrelic/synthetics/private_location.py +118 -112
- pulumi_newrelic/synthetics/script_monitor.py +613 -373
- pulumi_newrelic/synthetics/secure_credential.py +97 -95
- pulumi_newrelic/synthetics/step_monitor.py +445 -275
- pulumi_newrelic/user.py +84 -80
- pulumi_newrelic/workflow.py +336 -322
- {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +7 -6
- pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
- {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.22.0.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
pulumi_newrelic/group.py
CHANGED
|
@@ -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
|
|
|
12
17
|
__all__ = ['GroupArgs', 'Group']
|
|
@@ -14,14 +19,14 @@ __all__ = ['GroupArgs', 'Group']
|
|
|
14
19
|
@pulumi.input_type
|
|
15
20
|
class GroupArgs:
|
|
16
21
|
def __init__(__self__, *,
|
|
17
|
-
authentication_domain_id: pulumi.Input[str],
|
|
18
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
19
|
-
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
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):
|
|
20
25
|
"""
|
|
21
26
|
The set of arguments for constructing a Group resource.
|
|
22
|
-
:param pulumi.Input[str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
|
23
|
-
:param pulumi.Input[str] name: The name of the group to be created.
|
|
24
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
|
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.
|
|
25
30
|
|
|
26
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.
|
|
27
32
|
|
|
@@ -33,33 +38,33 @@ class GroupArgs:
|
|
|
33
38
|
if user_ids is not None:
|
|
34
39
|
pulumi.set(__self__, "user_ids", user_ids)
|
|
35
40
|
|
|
36
|
-
@property
|
|
41
|
+
@_builtins.property
|
|
37
42
|
@pulumi.getter(name="authenticationDomainId")
|
|
38
|
-
def authentication_domain_id(self) -> pulumi.Input[str]:
|
|
43
|
+
def authentication_domain_id(self) -> pulumi.Input[_builtins.str]:
|
|
39
44
|
"""
|
|
40
45
|
The ID of the authentication domain to which the group to be created would belong.
|
|
41
46
|
"""
|
|
42
47
|
return pulumi.get(self, "authentication_domain_id")
|
|
43
48
|
|
|
44
49
|
@authentication_domain_id.setter
|
|
45
|
-
def authentication_domain_id(self, value: pulumi.Input[str]):
|
|
50
|
+
def authentication_domain_id(self, value: pulumi.Input[_builtins.str]):
|
|
46
51
|
pulumi.set(self, "authentication_domain_id", value)
|
|
47
52
|
|
|
48
|
-
@property
|
|
53
|
+
@_builtins.property
|
|
49
54
|
@pulumi.getter
|
|
50
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
55
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
51
56
|
"""
|
|
52
57
|
The name of the group to be created.
|
|
53
58
|
"""
|
|
54
59
|
return pulumi.get(self, "name")
|
|
55
60
|
|
|
56
61
|
@name.setter
|
|
57
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
62
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
58
63
|
pulumi.set(self, "name", value)
|
|
59
64
|
|
|
60
|
-
@property
|
|
65
|
+
@_builtins.property
|
|
61
66
|
@pulumi.getter(name="userIds")
|
|
62
|
-
def user_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
67
|
+
def user_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
|
|
63
68
|
"""
|
|
64
69
|
A list of IDs of users to be included in the group to be created.
|
|
65
70
|
|
|
@@ -70,21 +75,21 @@ class GroupArgs:
|
|
|
70
75
|
return pulumi.get(self, "user_ids")
|
|
71
76
|
|
|
72
77
|
@user_ids.setter
|
|
73
|
-
def user_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
|
78
|
+
def user_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
|
|
74
79
|
pulumi.set(self, "user_ids", value)
|
|
75
80
|
|
|
76
81
|
|
|
77
82
|
@pulumi.input_type
|
|
78
83
|
class _GroupState:
|
|
79
84
|
def __init__(__self__, *,
|
|
80
|
-
authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
|
81
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
82
|
-
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None):
|
|
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):
|
|
83
88
|
"""
|
|
84
89
|
Input properties used for looking up and filtering Group resources.
|
|
85
|
-
:param pulumi.Input[str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
|
86
|
-
:param pulumi.Input[str] name: The name of the group to be created.
|
|
87
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
|
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.
|
|
88
93
|
|
|
89
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.
|
|
90
95
|
|
|
@@ -97,33 +102,33 @@ class _GroupState:
|
|
|
97
102
|
if user_ids is not None:
|
|
98
103
|
pulumi.set(__self__, "user_ids", user_ids)
|
|
99
104
|
|
|
100
|
-
@property
|
|
105
|
+
@_builtins.property
|
|
101
106
|
@pulumi.getter(name="authenticationDomainId")
|
|
102
|
-
def authentication_domain_id(self) -> Optional[pulumi.Input[str]]:
|
|
107
|
+
def authentication_domain_id(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
103
108
|
"""
|
|
104
109
|
The ID of the authentication domain to which the group to be created would belong.
|
|
105
110
|
"""
|
|
106
111
|
return pulumi.get(self, "authentication_domain_id")
|
|
107
112
|
|
|
108
113
|
@authentication_domain_id.setter
|
|
109
|
-
def authentication_domain_id(self, value: Optional[pulumi.Input[str]]):
|
|
114
|
+
def authentication_domain_id(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
110
115
|
pulumi.set(self, "authentication_domain_id", value)
|
|
111
116
|
|
|
112
|
-
@property
|
|
117
|
+
@_builtins.property
|
|
113
118
|
@pulumi.getter
|
|
114
|
-
def name(self) -> Optional[pulumi.Input[str]]:
|
|
119
|
+
def name(self) -> Optional[pulumi.Input[_builtins.str]]:
|
|
115
120
|
"""
|
|
116
121
|
The name of the group to be created.
|
|
117
122
|
"""
|
|
118
123
|
return pulumi.get(self, "name")
|
|
119
124
|
|
|
120
125
|
@name.setter
|
|
121
|
-
def name(self, value: Optional[pulumi.Input[str]]):
|
|
126
|
+
def name(self, value: Optional[pulumi.Input[_builtins.str]]):
|
|
122
127
|
pulumi.set(self, "name", value)
|
|
123
128
|
|
|
124
|
-
@property
|
|
129
|
+
@_builtins.property
|
|
125
130
|
@pulumi.getter(name="userIds")
|
|
126
|
-
def user_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]:
|
|
131
|
+
def user_ids(self) -> Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]:
|
|
127
132
|
"""
|
|
128
133
|
A list of IDs of users to be included in the group to be created.
|
|
129
134
|
|
|
@@ -134,93 +139,21 @@ class _GroupState:
|
|
|
134
139
|
return pulumi.get(self, "user_ids")
|
|
135
140
|
|
|
136
141
|
@user_ids.setter
|
|
137
|
-
def user_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]]):
|
|
142
|
+
def user_ids(self, value: Optional[pulumi.Input[Sequence[pulumi.Input[_builtins.str]]]]):
|
|
138
143
|
pulumi.set(self, "user_ids", value)
|
|
139
144
|
|
|
140
145
|
|
|
146
|
+
@pulumi.type_token("newrelic:index/group:Group")
|
|
141
147
|
class Group(pulumi.CustomResource):
|
|
142
148
|
@overload
|
|
143
149
|
def __init__(__self__,
|
|
144
150
|
resource_name: str,
|
|
145
151
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
146
|
-
authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
|
147
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
148
|
-
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = 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,
|
|
149
155
|
__props__=None):
|
|
150
156
|
"""
|
|
151
|
-
The `Group` resource facilitates creating, updating, and deleting groups in New Relic, while also enabling the addition and removal of users from these groups.
|
|
152
|
-
|
|
153
|
-
## Example Usage
|
|
154
|
-
|
|
155
|
-
<!--Start PulumiCodeChooser -->
|
|
156
|
-
```python
|
|
157
|
-
import pulumi
|
|
158
|
-
import pulumi_newrelic as newrelic
|
|
159
|
-
|
|
160
|
-
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
161
|
-
foo_group = newrelic.Group("fooGroup",
|
|
162
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
163
|
-
user_ids=[
|
|
164
|
-
"0001112222",
|
|
165
|
-
"2221110000",
|
|
166
|
-
])
|
|
167
|
-
```
|
|
168
|
-
<!--End PulumiCodeChooser -->
|
|
169
|
-
|
|
170
|
-
## Additional Examples
|
|
171
|
-
|
|
172
|
-
### Addition of New Users to a New Group
|
|
173
|
-
|
|
174
|
-
The following example illustrates the creation of a group using the `Group` resource, to which users created using the `User` resource are added.
|
|
175
|
-
|
|
176
|
-
<!--Start PulumiCodeChooser -->
|
|
177
|
-
```python
|
|
178
|
-
import pulumi
|
|
179
|
-
import pulumi_newrelic as newrelic
|
|
180
|
-
|
|
181
|
-
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
182
|
-
foo_user = newrelic.User("fooUser",
|
|
183
|
-
email_id="test_user_one@test.com",
|
|
184
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
185
|
-
user_type="CORE_USER_TIER")
|
|
186
|
-
bar = newrelic.User("bar",
|
|
187
|
-
email_id="test_user_two@test.com",
|
|
188
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
189
|
-
user_type="BASIC_USER_TIER")
|
|
190
|
-
foo_group = newrelic.Group("fooGroup",
|
|
191
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
192
|
-
user_ids=[
|
|
193
|
-
foo_user.id,
|
|
194
|
-
bar.id,
|
|
195
|
-
])
|
|
196
|
-
```
|
|
197
|
-
<!--End PulumiCodeChooser -->
|
|
198
|
-
|
|
199
|
-
### Addition of Existing Users to a New Group
|
|
200
|
-
|
|
201
|
-
The following example demonstrates the usage of the `Group` resource to create a group, wherein the `User` data source is employed to associate existing users with the newly formed group.
|
|
202
|
-
|
|
203
|
-
<!--Start PulumiCodeChooser -->
|
|
204
|
-
```python
|
|
205
|
-
import pulumi
|
|
206
|
-
import pulumi_newrelic as newrelic
|
|
207
|
-
|
|
208
|
-
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
209
|
-
foo_user = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
|
|
210
|
-
email_id="test_user_one@test.com")
|
|
211
|
-
bar = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
|
|
212
|
-
name="Test User Two")
|
|
213
|
-
foo_group = newrelic.Group("fooGroup",
|
|
214
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
215
|
-
user_ids=[
|
|
216
|
-
foo_user.id,
|
|
217
|
-
bar.id,
|
|
218
|
-
])
|
|
219
|
-
```
|
|
220
|
-
<!--End PulumiCodeChooser -->
|
|
221
|
-
|
|
222
|
-
> **NOTE** Please note that the addition of users to groups is only possible when both the group and the users to be added to it belong to the _same authentication domain_. If the group being created and the users being added to it belong to different authentication domains, an error indicating `user not found` or an equivalent error will be thrown.
|
|
223
|
-
|
|
224
157
|
## Import
|
|
225
158
|
|
|
226
159
|
A group can be imported using its ID. Example:
|
|
@@ -231,9 +164,9 @@ class Group(pulumi.CustomResource):
|
|
|
231
164
|
|
|
232
165
|
:param str resource_name: The name of the resource.
|
|
233
166
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
234
|
-
:param pulumi.Input[str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
|
235
|
-
:param pulumi.Input[str] name: The name of the group to be created.
|
|
236
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
|
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.
|
|
237
170
|
|
|
238
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.
|
|
239
172
|
|
|
@@ -246,79 +179,6 @@ class Group(pulumi.CustomResource):
|
|
|
246
179
|
args: GroupArgs,
|
|
247
180
|
opts: Optional[pulumi.ResourceOptions] = None):
|
|
248
181
|
"""
|
|
249
|
-
The `Group` resource facilitates creating, updating, and deleting groups in New Relic, while also enabling the addition and removal of users from these groups.
|
|
250
|
-
|
|
251
|
-
## Example Usage
|
|
252
|
-
|
|
253
|
-
<!--Start PulumiCodeChooser -->
|
|
254
|
-
```python
|
|
255
|
-
import pulumi
|
|
256
|
-
import pulumi_newrelic as newrelic
|
|
257
|
-
|
|
258
|
-
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
259
|
-
foo_group = newrelic.Group("fooGroup",
|
|
260
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
261
|
-
user_ids=[
|
|
262
|
-
"0001112222",
|
|
263
|
-
"2221110000",
|
|
264
|
-
])
|
|
265
|
-
```
|
|
266
|
-
<!--End PulumiCodeChooser -->
|
|
267
|
-
|
|
268
|
-
## Additional Examples
|
|
269
|
-
|
|
270
|
-
### Addition of New Users to a New Group
|
|
271
|
-
|
|
272
|
-
The following example illustrates the creation of a group using the `Group` resource, to which users created using the `User` resource are added.
|
|
273
|
-
|
|
274
|
-
<!--Start PulumiCodeChooser -->
|
|
275
|
-
```python
|
|
276
|
-
import pulumi
|
|
277
|
-
import pulumi_newrelic as newrelic
|
|
278
|
-
|
|
279
|
-
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
280
|
-
foo_user = newrelic.User("fooUser",
|
|
281
|
-
email_id="test_user_one@test.com",
|
|
282
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
283
|
-
user_type="CORE_USER_TIER")
|
|
284
|
-
bar = newrelic.User("bar",
|
|
285
|
-
email_id="test_user_two@test.com",
|
|
286
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
287
|
-
user_type="BASIC_USER_TIER")
|
|
288
|
-
foo_group = newrelic.Group("fooGroup",
|
|
289
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
290
|
-
user_ids=[
|
|
291
|
-
foo_user.id,
|
|
292
|
-
bar.id,
|
|
293
|
-
])
|
|
294
|
-
```
|
|
295
|
-
<!--End PulumiCodeChooser -->
|
|
296
|
-
|
|
297
|
-
### Addition of Existing Users to a New Group
|
|
298
|
-
|
|
299
|
-
The following example demonstrates the usage of the `Group` resource to create a group, wherein the `User` data source is employed to associate existing users with the newly formed group.
|
|
300
|
-
|
|
301
|
-
<!--Start PulumiCodeChooser -->
|
|
302
|
-
```python
|
|
303
|
-
import pulumi
|
|
304
|
-
import pulumi_newrelic as newrelic
|
|
305
|
-
|
|
306
|
-
foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
|
307
|
-
foo_user = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
|
|
308
|
-
email_id="test_user_one@test.com")
|
|
309
|
-
bar = newrelic.get_user(authentication_domain_id=foo_authentication_domain.id,
|
|
310
|
-
name="Test User Two")
|
|
311
|
-
foo_group = newrelic.Group("fooGroup",
|
|
312
|
-
authentication_domain_id=foo_authentication_domain.id,
|
|
313
|
-
user_ids=[
|
|
314
|
-
foo_user.id,
|
|
315
|
-
bar.id,
|
|
316
|
-
])
|
|
317
|
-
```
|
|
318
|
-
<!--End PulumiCodeChooser -->
|
|
319
|
-
|
|
320
|
-
> **NOTE** Please note that the addition of users to groups is only possible when both the group and the users to be added to it belong to the _same authentication domain_. If the group being created and the users being added to it belong to different authentication domains, an error indicating `user not found` or an equivalent error will be thrown.
|
|
321
|
-
|
|
322
182
|
## Import
|
|
323
183
|
|
|
324
184
|
A group can be imported using its ID. Example:
|
|
@@ -342,9 +202,9 @@ class Group(pulumi.CustomResource):
|
|
|
342
202
|
def _internal_init(__self__,
|
|
343
203
|
resource_name: str,
|
|
344
204
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
345
|
-
authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
|
346
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
347
|
-
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = 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,
|
|
348
208
|
__props__=None):
|
|
349
209
|
opts = pulumi.ResourceOptions.merge(_utilities.get_resource_opts_defaults(), opts)
|
|
350
210
|
if not isinstance(opts, pulumi.ResourceOptions):
|
|
@@ -369,9 +229,9 @@ class Group(pulumi.CustomResource):
|
|
|
369
229
|
def get(resource_name: str,
|
|
370
230
|
id: pulumi.Input[str],
|
|
371
231
|
opts: Optional[pulumi.ResourceOptions] = None,
|
|
372
|
-
authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
|
373
|
-
name: Optional[pulumi.Input[str]] = None,
|
|
374
|
-
user_ids: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None) -> 'Group':
|
|
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':
|
|
375
235
|
"""
|
|
376
236
|
Get an existing Group resource's state with the given name, id, and optional extra
|
|
377
237
|
properties used to qualify the lookup.
|
|
@@ -379,9 +239,9 @@ class Group(pulumi.CustomResource):
|
|
|
379
239
|
:param str resource_name: The unique name of the resulting resource.
|
|
380
240
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
|
381
241
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
|
382
|
-
:param pulumi.Input[str] authentication_domain_id: The ID of the authentication domain to which the group to be created would belong.
|
|
383
|
-
:param pulumi.Input[str] name: The name of the group to be created.
|
|
384
|
-
:param pulumi.Input[Sequence[pulumi.Input[str]]] user_ids: A list of IDs of users to be included in the group to be created.
|
|
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.
|
|
385
245
|
|
|
386
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.
|
|
387
247
|
|
|
@@ -396,25 +256,25 @@ class Group(pulumi.CustomResource):
|
|
|
396
256
|
__props__.__dict__["user_ids"] = user_ids
|
|
397
257
|
return Group(resource_name, opts=opts, __props__=__props__)
|
|
398
258
|
|
|
399
|
-
@property
|
|
259
|
+
@_builtins.property
|
|
400
260
|
@pulumi.getter(name="authenticationDomainId")
|
|
401
|
-
def authentication_domain_id(self) -> pulumi.Output[str]:
|
|
261
|
+
def authentication_domain_id(self) -> pulumi.Output[_builtins.str]:
|
|
402
262
|
"""
|
|
403
263
|
The ID of the authentication domain to which the group to be created would belong.
|
|
404
264
|
"""
|
|
405
265
|
return pulumi.get(self, "authentication_domain_id")
|
|
406
266
|
|
|
407
|
-
@property
|
|
267
|
+
@_builtins.property
|
|
408
268
|
@pulumi.getter
|
|
409
|
-
def name(self) -> pulumi.Output[str]:
|
|
269
|
+
def name(self) -> pulumi.Output[_builtins.str]:
|
|
410
270
|
"""
|
|
411
271
|
The name of the group to be created.
|
|
412
272
|
"""
|
|
413
273
|
return pulumi.get(self, "name")
|
|
414
274
|
|
|
415
|
-
@property
|
|
275
|
+
@_builtins.property
|
|
416
276
|
@pulumi.getter(name="userIds")
|
|
417
|
-
def user_ids(self) -> pulumi.Output[Optional[Sequence[str]]]:
|
|
277
|
+
def user_ids(self) -> pulumi.Output[Optional[Sequence[_builtins.str]]]:
|
|
418
278
|
"""
|
|
419
279
|
A list of IDs of users to be included in the group to be created.
|
|
420
280
|
|