pulumi-newrelic 5.22.0a1711544599__py3-none-any.whl → 5.23.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/_inputs.py +183 -270
- pulumi_newrelic/account_management.py +20 -20
- pulumi_newrelic/alert_channel.py +76 -92
- pulumi_newrelic/alert_condition.py +104 -163
- pulumi_newrelic/alert_muting_rule.py +33 -35
- pulumi_newrelic/alert_policy.py +68 -43
- pulumi_newrelic/alert_policy_channel.py +12 -8
- pulumi_newrelic/cloud/_inputs.py +322 -1072
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +4 -6
- pulumi_newrelic/cloud/aws_integrations.py +13 -15
- pulumi_newrelic/cloud/aws_link_account.py +4 -6
- pulumi_newrelic/cloud/azure_integrations.py +10 -12
- pulumi_newrelic/cloud/azure_link_account.py +4 -6
- pulumi_newrelic/cloud/gcp_integrations.py +6 -6
- pulumi_newrelic/cloud/gcp_link_account.py +4 -6
- pulumi_newrelic/cloud/outputs.py +322 -1072
- pulumi_newrelic/data_partition_rule.py +0 -4
- pulumi_newrelic/entity_tags.py +13 -17
- pulumi_newrelic/events_to_metrics_rule.py +2 -4
- pulumi_newrelic/get_account.py +0 -4
- pulumi_newrelic/get_application.py +8 -10
- pulumi_newrelic/get_authentication_domain.py +4 -8
- pulumi_newrelic/get_cloud_account.py +0 -4
- pulumi_newrelic/get_entity.py +48 -33
- pulumi_newrelic/get_group.py +42 -8
- pulumi_newrelic/get_key_transaction.py +8 -10
- pulumi_newrelic/get_notification_destination.py +20 -1
- pulumi_newrelic/get_obfuscation_expression.py +2 -4
- pulumi_newrelic/get_service_level_alert_helper.py +22 -46
- pulumi_newrelic/get_test_grok_pattern.py +4 -6
- pulumi_newrelic/get_user.py +0 -4
- pulumi_newrelic/group.py +40 -42
- pulumi_newrelic/infra_alert_condition.py +154 -145
- pulumi_newrelic/insights/event.py +8 -25
- pulumi_newrelic/log_parsing_rule.py +6 -10
- pulumi_newrelic/monitor_downtime.py +174 -193
- pulumi_newrelic/notification_channel.py +124 -150
- pulumi_newrelic/notification_destination.py +95 -1
- pulumi_newrelic/nrql_alert_condition.py +38 -48
- pulumi_newrelic/nrql_drop_rule.py +34 -38
- pulumi_newrelic/obfuscation_expression.py +2 -4
- pulumi_newrelic/obfuscation_rule.py +4 -4
- pulumi_newrelic/one_dashboard.py +42 -48
- pulumi_newrelic/one_dashboard_raw.py +86 -86
- pulumi_newrelic/outputs.py +180 -270
- pulumi_newrelic/plugins/_inputs.py +16 -16
- pulumi_newrelic/plugins/application_settings.py +20 -36
- pulumi_newrelic/plugins/outputs.py +16 -16
- pulumi_newrelic/plugins/workload.py +158 -40
- pulumi_newrelic/service_level.py +38 -123
- pulumi_newrelic/synthetics/alert_condition.py +34 -78
- pulumi_newrelic/synthetics/broken_links_monitor.py +18 -20
- pulumi_newrelic/synthetics/cert_check_monitor.py +16 -18
- pulumi_newrelic/synthetics/get_private_location.py +0 -8
- pulumi_newrelic/synthetics/get_secure_credential.py +0 -12
- pulumi_newrelic/synthetics/monitor.py +48 -52
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +69 -83
- pulumi_newrelic/synthetics/private_location.py +6 -6
- pulumi_newrelic/synthetics/script_monitor.py +38 -42
- pulumi_newrelic/synthetics/secure_credential.py +25 -22
- pulumi_newrelic/synthetics/step_monitor.py +18 -20
- pulumi_newrelic/user.py +8 -10
- pulumi_newrelic/workflow.py +20 -24
- {pulumi_newrelic-5.22.0a1711544599.dist-info → pulumi_newrelic-5.23.0.dist-info}/METADATA +1 -1
- pulumi_newrelic-5.23.0.dist-info/RECORD +89 -0
- pulumi_newrelic-5.22.0a1711544599.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.22.0a1711544599.dist-info → pulumi_newrelic-5.23.0.dist-info}/WHEEL +0 -0
- {pulumi_newrelic-5.22.0a1711544599.dist-info → pulumi_newrelic-5.23.0.dist-info}/top_level.txt +0 -0
@@ -248,7 +248,6 @@ class DataPartitionRule(pulumi.CustomResource):
|
|
248
248
|
|
249
249
|
## Example Usage
|
250
250
|
|
251
|
-
<!--Start PulumiCodeChooser -->
|
252
251
|
```python
|
253
252
|
import pulumi
|
254
253
|
import pulumi_newrelic as newrelic
|
@@ -260,7 +259,6 @@ class DataPartitionRule(pulumi.CustomResource):
|
|
260
259
|
retention_policy="STANDARD",
|
261
260
|
target_data_partition="Log_name")
|
262
261
|
```
|
263
|
-
<!--End PulumiCodeChooser -->
|
264
262
|
|
265
263
|
## Additional Information
|
266
264
|
|
@@ -296,7 +294,6 @@ class DataPartitionRule(pulumi.CustomResource):
|
|
296
294
|
|
297
295
|
## Example Usage
|
298
296
|
|
299
|
-
<!--Start PulumiCodeChooser -->
|
300
297
|
```python
|
301
298
|
import pulumi
|
302
299
|
import pulumi_newrelic as newrelic
|
@@ -308,7 +305,6 @@ class DataPartitionRule(pulumi.CustomResource):
|
|
308
305
|
retention_policy="STANDARD",
|
309
306
|
target_data_partition="Log_name")
|
310
307
|
```
|
311
|
-
<!--End PulumiCodeChooser -->
|
312
308
|
|
313
309
|
## Additional Information
|
314
310
|
|
pulumi_newrelic/entity_tags.py
CHANGED
@@ -21,7 +21,7 @@ class EntityTagsArgs:
|
|
21
21
|
"""
|
22
22
|
The set of arguments for constructing a EntityTags resource.
|
23
23
|
:param pulumi.Input[str] guid: The guid of the entity to tag.
|
24
|
-
:param pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]] tags: A
|
24
|
+
:param pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]] tags: A set of key-value pairs to represent a tag. For example: Team:TeamName
|
25
25
|
"""
|
26
26
|
pulumi.set(__self__, "guid", guid)
|
27
27
|
pulumi.set(__self__, "tags", tags)
|
@@ -42,7 +42,7 @@ class EntityTagsArgs:
|
|
42
42
|
@pulumi.getter
|
43
43
|
def tags(self) -> pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]]:
|
44
44
|
"""
|
45
|
-
A
|
45
|
+
A set of key-value pairs to represent a tag. For example: Team:TeamName
|
46
46
|
"""
|
47
47
|
return pulumi.get(self, "tags")
|
48
48
|
|
@@ -59,7 +59,7 @@ class _EntityTagsState:
|
|
59
59
|
"""
|
60
60
|
Input properties used for looking up and filtering EntityTags resources.
|
61
61
|
:param pulumi.Input[str] guid: The guid of the entity to tag.
|
62
|
-
:param pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]] tags: A
|
62
|
+
:param pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]] tags: A set of key-value pairs to represent a tag. For example: Team:TeamName
|
63
63
|
"""
|
64
64
|
if guid is not None:
|
65
65
|
pulumi.set(__self__, "guid", guid)
|
@@ -82,7 +82,7 @@ class _EntityTagsState:
|
|
82
82
|
@pulumi.getter
|
83
83
|
def tags(self) -> Optional[pulumi.Input[Sequence[pulumi.Input['EntityTagsTagArgs']]]]:
|
84
84
|
"""
|
85
|
-
A
|
85
|
+
A set of key-value pairs to represent a tag. For example: Team:TeamName
|
86
86
|
"""
|
87
87
|
return pulumi.get(self, "tags")
|
88
88
|
|
@@ -104,16 +104,15 @@ class EntityTags(pulumi.CustomResource):
|
|
104
104
|
|
105
105
|
## Example Usage
|
106
106
|
|
107
|
-
<!--Start PulumiCodeChooser -->
|
108
107
|
```python
|
109
108
|
import pulumi
|
110
109
|
import pulumi_newrelic as newrelic
|
111
110
|
|
112
|
-
|
111
|
+
foo = newrelic.get_entity(name="Example application",
|
113
112
|
type="APPLICATION",
|
114
113
|
domain="APM")
|
115
|
-
foo_entity_tags = newrelic.EntityTags("
|
116
|
-
guid=
|
114
|
+
foo_entity_tags = newrelic.EntityTags("foo",
|
115
|
+
guid=foo.guid,
|
117
116
|
tags=[
|
118
117
|
newrelic.EntityTagsTagArgs(
|
119
118
|
key="my-key",
|
@@ -128,7 +127,6 @@ class EntityTags(pulumi.CustomResource):
|
|
128
127
|
),
|
129
128
|
])
|
130
129
|
```
|
131
|
-
<!--End PulumiCodeChooser -->
|
132
130
|
|
133
131
|
## Import
|
134
132
|
|
@@ -145,7 +143,7 @@ class EntityTags(pulumi.CustomResource):
|
|
145
143
|
:param str resource_name: The name of the resource.
|
146
144
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
147
145
|
:param pulumi.Input[str] guid: The guid of the entity to tag.
|
148
|
-
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A
|
146
|
+
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A set of key-value pairs to represent a tag. For example: Team:TeamName
|
149
147
|
"""
|
150
148
|
...
|
151
149
|
@overload
|
@@ -158,16 +156,15 @@ class EntityTags(pulumi.CustomResource):
|
|
158
156
|
|
159
157
|
## Example Usage
|
160
158
|
|
161
|
-
<!--Start PulumiCodeChooser -->
|
162
159
|
```python
|
163
160
|
import pulumi
|
164
161
|
import pulumi_newrelic as newrelic
|
165
162
|
|
166
|
-
|
163
|
+
foo = newrelic.get_entity(name="Example application",
|
167
164
|
type="APPLICATION",
|
168
165
|
domain="APM")
|
169
|
-
foo_entity_tags = newrelic.EntityTags("
|
170
|
-
guid=
|
166
|
+
foo_entity_tags = newrelic.EntityTags("foo",
|
167
|
+
guid=foo.guid,
|
171
168
|
tags=[
|
172
169
|
newrelic.EntityTagsTagArgs(
|
173
170
|
key="my-key",
|
@@ -182,7 +179,6 @@ class EntityTags(pulumi.CustomResource):
|
|
182
179
|
),
|
183
180
|
])
|
184
181
|
```
|
185
|
-
<!--End PulumiCodeChooser -->
|
186
182
|
|
187
183
|
## Import
|
188
184
|
|
@@ -248,7 +244,7 @@ class EntityTags(pulumi.CustomResource):
|
|
248
244
|
:param pulumi.Input[str] id: The unique provider ID of the resource to lookup.
|
249
245
|
:param pulumi.ResourceOptions opts: Options for the resource.
|
250
246
|
:param pulumi.Input[str] guid: The guid of the entity to tag.
|
251
|
-
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A
|
247
|
+
:param pulumi.Input[Sequence[pulumi.Input[pulumi.InputType['EntityTagsTagArgs']]]] tags: A set of key-value pairs to represent a tag. For example: Team:TeamName
|
252
248
|
"""
|
253
249
|
opts = pulumi.ResourceOptions.merge(opts, pulumi.ResourceOptions(id=id))
|
254
250
|
|
@@ -270,7 +266,7 @@ class EntityTags(pulumi.CustomResource):
|
|
270
266
|
@pulumi.getter
|
271
267
|
def tags(self) -> pulumi.Output[Sequence['outputs.EntityTagsTag']]:
|
272
268
|
"""
|
273
|
-
A
|
269
|
+
A set of key-value pairs to represent a tag. For example: Team:TeamName
|
274
270
|
"""
|
275
271
|
return pulumi.get(self, "tags")
|
276
272
|
|
@@ -218,17 +218,16 @@ class EventsToMetricsRule(pulumi.CustomResource):
|
|
218
218
|
|
219
219
|
## Example Usage
|
220
220
|
|
221
|
-
<!--Start PulumiCodeChooser -->
|
222
221
|
```python
|
223
222
|
import pulumi
|
224
223
|
import pulumi_newrelic as newrelic
|
225
224
|
|
226
225
|
foo = newrelic.EventsToMetricsRule("foo",
|
227
226
|
account_id=12345,
|
227
|
+
name="Example events to metrics rule",
|
228
228
|
description="Example description",
|
229
229
|
nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
|
230
230
|
```
|
231
|
-
<!--End PulumiCodeChooser -->
|
232
231
|
|
233
232
|
## Import
|
234
233
|
|
@@ -261,17 +260,16 @@ class EventsToMetricsRule(pulumi.CustomResource):
|
|
261
260
|
|
262
261
|
## Example Usage
|
263
262
|
|
264
|
-
<!--Start PulumiCodeChooser -->
|
265
263
|
```python
|
266
264
|
import pulumi
|
267
265
|
import pulumi_newrelic as newrelic
|
268
266
|
|
269
267
|
foo = newrelic.EventsToMetricsRule("foo",
|
270
268
|
account_id=12345,
|
269
|
+
name="Example events to metrics rule",
|
271
270
|
description="Example description",
|
272
271
|
nrql="SELECT uniqueCount(account_id) AS ``Transaction.account_id`` FROM Transaction FACET appName, name")
|
273
272
|
```
|
274
|
-
<!--End PulumiCodeChooser -->
|
275
273
|
|
276
274
|
## Import
|
277
275
|
|
pulumi_newrelic/get_account.py
CHANGED
@@ -82,14 +82,12 @@ def get_account(account_id: Optional[int] = None,
|
|
82
82
|
|
83
83
|
## Example Usage
|
84
84
|
|
85
|
-
<!--Start PulumiCodeChooser -->
|
86
85
|
```python
|
87
86
|
import pulumi
|
88
87
|
import pulumi_newrelic as newrelic
|
89
88
|
|
90
89
|
acc = newrelic.get_account(scope="global")
|
91
90
|
```
|
92
|
-
<!--End PulumiCodeChooser -->
|
93
91
|
|
94
92
|
|
95
93
|
:param int account_id: The account ID in New Relic.
|
@@ -122,14 +120,12 @@ def get_account_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
122
120
|
|
123
121
|
## Example Usage
|
124
122
|
|
125
|
-
<!--Start PulumiCodeChooser -->
|
126
123
|
```python
|
127
124
|
import pulumi
|
128
125
|
import pulumi_newrelic as newrelic
|
129
126
|
|
130
127
|
acc = newrelic.get_account(scope="global")
|
131
128
|
```
|
132
|
-
<!--End PulumiCodeChooser -->
|
133
129
|
|
134
130
|
|
135
131
|
:param int account_id: The account ID in New Relic.
|
@@ -86,15 +86,15 @@ def get_application(name: Optional[str] = None,
|
|
86
86
|
|
87
87
|
## Example Usage
|
88
88
|
|
89
|
-
<!--Start PulumiCodeChooser -->
|
90
89
|
```python
|
91
90
|
import pulumi
|
92
91
|
import pulumi_newrelic as newrelic
|
93
92
|
|
94
93
|
app = newrelic.get_application(name="my-app")
|
95
|
-
|
96
|
-
foo_alert_condition = newrelic.AlertCondition("
|
97
|
-
policy_id=
|
94
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
95
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
96
|
+
policy_id=foo.id,
|
97
|
+
name="foo",
|
98
98
|
type="apm_app_metric",
|
99
99
|
entities=[app.id],
|
100
100
|
metric="apdex",
|
@@ -107,7 +107,6 @@ def get_application(name: Optional[str] = None,
|
|
107
107
|
time_function="all",
|
108
108
|
)])
|
109
109
|
```
|
110
|
-
<!--End PulumiCodeChooser -->
|
111
110
|
|
112
111
|
|
113
112
|
:param str name: The name of the application in New Relic.
|
@@ -134,15 +133,15 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
|
|
134
133
|
|
135
134
|
## Example Usage
|
136
135
|
|
137
|
-
<!--Start PulumiCodeChooser -->
|
138
136
|
```python
|
139
137
|
import pulumi
|
140
138
|
import pulumi_newrelic as newrelic
|
141
139
|
|
142
140
|
app = newrelic.get_application(name="my-app")
|
143
|
-
|
144
|
-
foo_alert_condition = newrelic.AlertCondition("
|
145
|
-
policy_id=
|
141
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
142
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
143
|
+
policy_id=foo.id,
|
144
|
+
name="foo",
|
146
145
|
type="apm_app_metric",
|
147
146
|
entities=[app.id],
|
148
147
|
metric="apdex",
|
@@ -155,7 +154,6 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
|
|
155
154
|
time_function="all",
|
156
155
|
)])
|
157
156
|
```
|
158
|
-
<!--End PulumiCodeChooser -->
|
159
157
|
|
160
158
|
|
161
159
|
:param str name: The name of the application in New Relic.
|
@@ -60,15 +60,13 @@ def get_authentication_domain(name: Optional[str] = None,
|
|
60
60
|
|
61
61
|
## Example Usage
|
62
62
|
|
63
|
-
<!--Start PulumiCodeChooser -->
|
64
63
|
```python
|
65
64
|
import pulumi
|
66
65
|
import pulumi_newrelic as newrelic
|
67
66
|
|
68
|
-
|
69
|
-
pulumi.export("foo",
|
67
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
68
|
+
pulumi.export("foo", foo.id)
|
70
69
|
```
|
71
|
-
<!--End PulumiCodeChooser -->
|
72
70
|
|
73
71
|
|
74
72
|
:param str name: The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
|
@@ -91,15 +89,13 @@ def get_authentication_domain_output(name: Optional[pulumi.Input[str]] = None,
|
|
91
89
|
|
92
90
|
## Example Usage
|
93
91
|
|
94
|
-
<!--Start PulumiCodeChooser -->
|
95
92
|
```python
|
96
93
|
import pulumi
|
97
94
|
import pulumi_newrelic as newrelic
|
98
95
|
|
99
|
-
|
100
|
-
pulumi.export("foo",
|
96
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
97
|
+
pulumi.export("foo", foo.id)
|
101
98
|
```
|
102
|
-
<!--End PulumiCodeChooser -->
|
103
99
|
|
104
100
|
|
105
101
|
:param str name: The name of the authentication domain to be searched for. An error is thrown, if no authentication domain is found with the specified name.
|
@@ -81,7 +81,6 @@ def get_cloud_account(account_id: Optional[int] = None,
|
|
81
81
|
|
82
82
|
## Example Usage
|
83
83
|
|
84
|
-
<!--Start PulumiCodeChooser -->
|
85
84
|
```python
|
86
85
|
import pulumi
|
87
86
|
import pulumi_newrelic as newrelic
|
@@ -90,7 +89,6 @@ def get_cloud_account(account_id: Optional[int] = None,
|
|
90
89
|
cloud_provider="aws",
|
91
90
|
name="my aws account")
|
92
91
|
```
|
93
|
-
<!--End PulumiCodeChooser -->
|
94
92
|
|
95
93
|
|
96
94
|
:param int account_id: The account ID in New Relic.
|
@@ -122,7 +120,6 @@ def get_cloud_account_output(account_id: Optional[pulumi.Input[Optional[int]]] =
|
|
122
120
|
|
123
121
|
## Example Usage
|
124
122
|
|
125
|
-
<!--Start PulumiCodeChooser -->
|
126
123
|
```python
|
127
124
|
import pulumi
|
128
125
|
import pulumi_newrelic as newrelic
|
@@ -131,7 +128,6 @@ def get_cloud_account_output(account_id: Optional[pulumi.Input[Optional[int]]] =
|
|
131
128
|
cloud_provider="aws",
|
132
129
|
name="my aws account")
|
133
130
|
```
|
134
|
-
<!--End PulumiCodeChooser -->
|
135
131
|
|
136
132
|
|
137
133
|
:param int account_id: The account ID in New Relic.
|
pulumi_newrelic/get_entity.py
CHANGED
@@ -23,7 +23,7 @@ class GetEntityResult:
|
|
23
23
|
"""
|
24
24
|
A collection of values returned by getEntity.
|
25
25
|
"""
|
26
|
-
def __init__(__self__, account_id=None, application_id=None, domain=None, guid=None, id=None, ignore_case=None, name=None, serving_apm_application_id=None, tags=None, type=None):
|
26
|
+
def __init__(__self__, account_id=None, application_id=None, domain=None, guid=None, id=None, ignore_case=None, ignore_not_found=None, name=None, serving_apm_application_id=None, tags=None, type=None):
|
27
27
|
if account_id and not isinstance(account_id, int):
|
28
28
|
raise TypeError("Expected argument 'account_id' to be a int")
|
29
29
|
pulumi.set(__self__, "account_id", account_id)
|
@@ -42,6 +42,9 @@ class GetEntityResult:
|
|
42
42
|
if ignore_case and not isinstance(ignore_case, bool):
|
43
43
|
raise TypeError("Expected argument 'ignore_case' to be a bool")
|
44
44
|
pulumi.set(__self__, "ignore_case", ignore_case)
|
45
|
+
if ignore_not_found and not isinstance(ignore_not_found, bool):
|
46
|
+
raise TypeError("Expected argument 'ignore_not_found' to be a bool")
|
47
|
+
pulumi.set(__self__, "ignore_not_found", ignore_not_found)
|
45
48
|
if name and not isinstance(name, str):
|
46
49
|
raise TypeError("Expected argument 'name' to be a str")
|
47
50
|
pulumi.set(__self__, "name", name)
|
@@ -94,6 +97,11 @@ class GetEntityResult:
|
|
94
97
|
def ignore_case(self) -> Optional[bool]:
|
95
98
|
return pulumi.get(self, "ignore_case")
|
96
99
|
|
100
|
+
@property
|
101
|
+
@pulumi.getter(name="ignoreNotFound")
|
102
|
+
def ignore_not_found(self) -> Optional[bool]:
|
103
|
+
return pulumi.get(self, "ignore_not_found")
|
104
|
+
|
97
105
|
@property
|
98
106
|
@pulumi.getter
|
99
107
|
def name(self) -> str:
|
@@ -130,6 +138,7 @@ class AwaitableGetEntityResult(GetEntityResult):
|
|
130
138
|
guid=self.guid,
|
131
139
|
id=self.id,
|
132
140
|
ignore_case=self.ignore_case,
|
141
|
+
ignore_not_found=self.ignore_not_found,
|
133
142
|
name=self.name,
|
134
143
|
serving_apm_application_id=self.serving_apm_application_id,
|
135
144
|
tags=self.tags,
|
@@ -139,6 +148,7 @@ class AwaitableGetEntityResult(GetEntityResult):
|
|
139
148
|
def get_entity(account_id: Optional[int] = None,
|
140
149
|
domain: Optional[str] = None,
|
141
150
|
ignore_case: Optional[bool] = None,
|
151
|
+
ignore_not_found: Optional[bool] = None,
|
142
152
|
name: Optional[str] = None,
|
143
153
|
tags: Optional[Sequence[pulumi.InputType['GetEntityTagArgs']]] = None,
|
144
154
|
type: Optional[str] = None,
|
@@ -152,51 +162,50 @@ def get_entity(account_id: Optional[int] = None,
|
|
152
162
|
|
153
163
|
This would mean, if no entity with the specified search parameters is found associated with the account ID in the configuration of the provider, i.e. `NEW_RELIC_ACCOUNT_ID`, an error is thrown, stating that no matching entity has been found.
|
154
164
|
|
155
|
-
<!--Start PulumiCodeChooser -->
|
156
165
|
```python
|
157
166
|
import pulumi
|
158
167
|
import pulumi_newrelic as newrelic
|
159
168
|
|
160
|
-
|
161
|
-
|
169
|
+
# The entity returned by this configuration would have to
|
170
|
+
# belong to the account_id specified in the provider
|
171
|
+
# configuration, i.e. NEW_RELIC_ACCOUNT_ID.
|
172
|
+
app = newrelic.get_entity(name="my-app",
|
173
|
+
domain="APM",
|
162
174
|
type="APPLICATION")
|
163
175
|
```
|
164
|
-
<!--End PulumiCodeChooser -->
|
165
176
|
However, in order to cater to scenarios in which it could be necessary to retrieve an entity belonging to a subaccount using the account ID and API Key of the parent account (for instance, when entities with identical names are present in both the parent account and subaccounts, since matching entities from subaccounts too are returned by NerdGraph), the `account_id` attribute of this data source may be availed. This ensures that the account ID in the configuration of the provider, used to filter entities returned by the API is now overridden by the `account_id` specified in the configuration; i.e., in the below example, the data source would now return an entity matching the specified `name`, belonging to the account with the ID `account_id`.
|
166
|
-
<!--Start PulumiCodeChooser -->
|
167
177
|
```python
|
168
178
|
import pulumi
|
169
179
|
import pulumi_newrelic as newrelic
|
170
180
|
|
171
|
-
|
181
|
+
# The entity returned by this configuration, unlike in
|
182
|
+
# the above example, would have to belong to the account_id
|
183
|
+
# specified in the configuration below, i.e. 654321.
|
184
|
+
app = newrelic.get_entity(name="my-app",
|
185
|
+
account_id=654321,
|
172
186
|
domain="APM",
|
173
|
-
name="my-app",
|
174
187
|
type="APPLICATION")
|
175
188
|
```
|
176
|
-
<!--End PulumiCodeChooser -->
|
177
189
|
The following example explains a use case along the lines of the aforementioned; using the `account_id` argument in the data source to allow the filtering criteria to be the `account_id` specified (of the subaccount), and not the account ID in the provider configuration.
|
178
190
|
|
179
191
|
In simpler terms, when entities are queried from the parent account, entities with matching names are returned from subaccounts too, hence, specifying the `account_id` of the subaccount in the configuration allows the entity returned to belong to the subaccount with `account_id`.
|
180
192
|
### Query for an OTEL entity
|
181
193
|
|
182
|
-
<!--Start PulumiCodeChooser -->
|
183
194
|
```python
|
184
195
|
import pulumi
|
185
196
|
import pulumi_newrelic as newrelic
|
186
197
|
|
187
|
-
app = newrelic.get_entity(
|
188
|
-
|
198
|
+
app = newrelic.get_entity(name="my-otel-app",
|
199
|
+
domain="EXT",
|
200
|
+
type="SERVICE",
|
189
201
|
tags=[newrelic.GetEntityTagArgs(
|
190
202
|
key="accountID",
|
191
203
|
value="12345",
|
192
|
-
)]
|
193
|
-
type="SERVICE")
|
204
|
+
)])
|
194
205
|
```
|
195
|
-
<!--End PulumiCodeChooser -->
|
196
206
|
|
197
207
|
### Query for an entity by type (AWS Lambda entity in this example)
|
198
208
|
|
199
|
-
<!--Start PulumiCodeChooser -->
|
200
209
|
```python
|
201
210
|
import pulumi
|
202
211
|
import pulumi_newrelic as newrelic
|
@@ -204,12 +213,14 @@ def get_entity(account_id: Optional[int] = None,
|
|
204
213
|
app = newrelic.get_entity(name="my_lambda_trace",
|
205
214
|
type="AWSLAMBDAFUNCTION")
|
206
215
|
```
|
207
|
-
<!--End PulumiCodeChooser -->
|
208
216
|
|
209
217
|
|
210
218
|
:param int account_id: The New Relic account ID the entity to be returned would be associated with, i.e. if specified, the data source would filter matching entities received by `account_id` and return the first match. If not, matching entities are filtered by the account ID specified in the configuration of the provider. See the **Example: Filter By Account ID** section above for more details.
|
211
219
|
:param str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
|
212
220
|
:param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
|
221
|
+
:param bool ignore_not_found: A boolean argument that, when set to true, prevents an error from being thrown when the queried entity is not found. Instead, a warning is displayed. Defaults to `false`.
|
222
|
+
|
223
|
+
> **WARNING:** Setting the `ignore_not_found` argument to `true` will display an 'entity not found' warning instead of throwing an error. This can lead to downstream errors if the values of attributes exported by this data source are used elsewhere, as all of these values would be null. Please use this argument at your own risk.
|
213
224
|
:param str name: The name of the entity in New Relic One. The first entity matching this name for the given search parameters will be returned.
|
214
225
|
:param Sequence[pulumi.InputType['GetEntityTagArgs']] tags: A tag applied to the entity. See Nested tag blocks below for details.
|
215
226
|
:param str type: The entity's type. Valid values are APPLICATION, DASHBOARD, HOST, MONITOR, WORKLOAD, AWSLAMBDAFUNCTION, SERVICE_LEVEL, and KEY_TRANSACTION. Note: Other entity types may also be queryable as the list of entity types may fluctuate over time.
|
@@ -218,6 +229,7 @@ def get_entity(account_id: Optional[int] = None,
|
|
218
229
|
__args__['accountId'] = account_id
|
219
230
|
__args__['domain'] = domain
|
220
231
|
__args__['ignoreCase'] = ignore_case
|
232
|
+
__args__['ignoreNotFound'] = ignore_not_found
|
221
233
|
__args__['name'] = name
|
222
234
|
__args__['tags'] = tags
|
223
235
|
__args__['type'] = type
|
@@ -231,6 +243,7 @@ def get_entity(account_id: Optional[int] = None,
|
|
231
243
|
guid=pulumi.get(__ret__, 'guid'),
|
232
244
|
id=pulumi.get(__ret__, 'id'),
|
233
245
|
ignore_case=pulumi.get(__ret__, 'ignore_case'),
|
246
|
+
ignore_not_found=pulumi.get(__ret__, 'ignore_not_found'),
|
234
247
|
name=pulumi.get(__ret__, 'name'),
|
235
248
|
serving_apm_application_id=pulumi.get(__ret__, 'serving_apm_application_id'),
|
236
249
|
tags=pulumi.get(__ret__, 'tags'),
|
@@ -241,6 +254,7 @@ def get_entity(account_id: Optional[int] = None,
|
|
241
254
|
def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
242
255
|
domain: Optional[pulumi.Input[Optional[str]]] = None,
|
243
256
|
ignore_case: Optional[pulumi.Input[Optional[bool]]] = None,
|
257
|
+
ignore_not_found: Optional[pulumi.Input[Optional[bool]]] = None,
|
244
258
|
name: Optional[pulumi.Input[str]] = None,
|
245
259
|
tags: Optional[pulumi.Input[Optional[Sequence[pulumi.InputType['GetEntityTagArgs']]]]] = None,
|
246
260
|
type: Optional[pulumi.Input[Optional[str]]] = None,
|
@@ -254,51 +268,50 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
254
268
|
|
255
269
|
This would mean, if no entity with the specified search parameters is found associated with the account ID in the configuration of the provider, i.e. `NEW_RELIC_ACCOUNT_ID`, an error is thrown, stating that no matching entity has been found.
|
256
270
|
|
257
|
-
<!--Start PulumiCodeChooser -->
|
258
271
|
```python
|
259
272
|
import pulumi
|
260
273
|
import pulumi_newrelic as newrelic
|
261
274
|
|
262
|
-
|
263
|
-
|
275
|
+
# The entity returned by this configuration would have to
|
276
|
+
# belong to the account_id specified in the provider
|
277
|
+
# configuration, i.e. NEW_RELIC_ACCOUNT_ID.
|
278
|
+
app = newrelic.get_entity(name="my-app",
|
279
|
+
domain="APM",
|
264
280
|
type="APPLICATION")
|
265
281
|
```
|
266
|
-
<!--End PulumiCodeChooser -->
|
267
282
|
However, in order to cater to scenarios in which it could be necessary to retrieve an entity belonging to a subaccount using the account ID and API Key of the parent account (for instance, when entities with identical names are present in both the parent account and subaccounts, since matching entities from subaccounts too are returned by NerdGraph), the `account_id` attribute of this data source may be availed. This ensures that the account ID in the configuration of the provider, used to filter entities returned by the API is now overridden by the `account_id` specified in the configuration; i.e., in the below example, the data source would now return an entity matching the specified `name`, belonging to the account with the ID `account_id`.
|
268
|
-
<!--Start PulumiCodeChooser -->
|
269
283
|
```python
|
270
284
|
import pulumi
|
271
285
|
import pulumi_newrelic as newrelic
|
272
286
|
|
273
|
-
|
287
|
+
# The entity returned by this configuration, unlike in
|
288
|
+
# the above example, would have to belong to the account_id
|
289
|
+
# specified in the configuration below, i.e. 654321.
|
290
|
+
app = newrelic.get_entity(name="my-app",
|
291
|
+
account_id=654321,
|
274
292
|
domain="APM",
|
275
|
-
name="my-app",
|
276
293
|
type="APPLICATION")
|
277
294
|
```
|
278
|
-
<!--End PulumiCodeChooser -->
|
279
295
|
The following example explains a use case along the lines of the aforementioned; using the `account_id` argument in the data source to allow the filtering criteria to be the `account_id` specified (of the subaccount), and not the account ID in the provider configuration.
|
280
296
|
|
281
297
|
In simpler terms, when entities are queried from the parent account, entities with matching names are returned from subaccounts too, hence, specifying the `account_id` of the subaccount in the configuration allows the entity returned to belong to the subaccount with `account_id`.
|
282
298
|
### Query for an OTEL entity
|
283
299
|
|
284
|
-
<!--Start PulumiCodeChooser -->
|
285
300
|
```python
|
286
301
|
import pulumi
|
287
302
|
import pulumi_newrelic as newrelic
|
288
303
|
|
289
|
-
app = newrelic.get_entity(
|
290
|
-
|
304
|
+
app = newrelic.get_entity(name="my-otel-app",
|
305
|
+
domain="EXT",
|
306
|
+
type="SERVICE",
|
291
307
|
tags=[newrelic.GetEntityTagArgs(
|
292
308
|
key="accountID",
|
293
309
|
value="12345",
|
294
|
-
)]
|
295
|
-
type="SERVICE")
|
310
|
+
)])
|
296
311
|
```
|
297
|
-
<!--End PulumiCodeChooser -->
|
298
312
|
|
299
313
|
### Query for an entity by type (AWS Lambda entity in this example)
|
300
314
|
|
301
|
-
<!--Start PulumiCodeChooser -->
|
302
315
|
```python
|
303
316
|
import pulumi
|
304
317
|
import pulumi_newrelic as newrelic
|
@@ -306,12 +319,14 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
306
319
|
app = newrelic.get_entity(name="my_lambda_trace",
|
307
320
|
type="AWSLAMBDAFUNCTION")
|
308
321
|
```
|
309
|
-
<!--End PulumiCodeChooser -->
|
310
322
|
|
311
323
|
|
312
324
|
:param int account_id: The New Relic account ID the entity to be returned would be associated with, i.e. if specified, the data source would filter matching entities received by `account_id` and return the first match. If not, matching entities are filtered by the account ID specified in the configuration of the provider. See the **Example: Filter By Account ID** section above for more details.
|
313
325
|
:param str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
|
314
326
|
:param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
|
327
|
+
:param bool ignore_not_found: A boolean argument that, when set to true, prevents an error from being thrown when the queried entity is not found. Instead, a warning is displayed. Defaults to `false`.
|
328
|
+
|
329
|
+
> **WARNING:** Setting the `ignore_not_found` argument to `true` will display an 'entity not found' warning instead of throwing an error. This can lead to downstream errors if the values of attributes exported by this data source are used elsewhere, as all of these values would be null. Please use this argument at your own risk.
|
315
330
|
:param str name: The name of the entity in New Relic One. The first entity matching this name for the given search parameters will be returned.
|
316
331
|
:param Sequence[pulumi.InputType['GetEntityTagArgs']] tags: A tag applied to the entity. See Nested tag blocks below for details.
|
317
332
|
:param str type: The entity's type. Valid values are APPLICATION, DASHBOARD, HOST, MONITOR, WORKLOAD, AWSLAMBDAFUNCTION, SERVICE_LEVEL, and KEY_TRANSACTION. Note: Other entity types may also be queryable as the list of entity types may fluctuate over time.
|
pulumi_newrelic/get_group.py
CHANGED
@@ -84,16 +84,33 @@ def get_group(authentication_domain_id: Optional[str] = None,
|
|
84
84
|
|
85
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
86
|
|
87
|
-
<!--Start PulumiCodeChooser -->
|
88
87
|
```python
|
89
88
|
import pulumi
|
90
89
|
import pulumi_newrelic as newrelic
|
91
90
|
|
92
|
-
|
93
|
-
|
91
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
92
|
+
foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
|
94
93
|
name="Test Group")
|
95
94
|
```
|
96
|
-
|
95
|
+
|
96
|
+
## Additional Examples
|
97
|
+
|
98
|
+
The following example demonstrates utilizing attributes exported by this data source.
|
99
|
+
|
100
|
+
In order to directly reference the attributes `id` and `user_ids` from this data source, you can use the syntax `data.newrelic_group.foo.id` and `data.newrelic_group.foo.user_ids`, respectively. However, if you need to assign these values to local variables and perform further processing (such as conditionally formatting the `user_ids` attribute as shown in the example below), consider using the provided configuration. These variables can then be accessed elsewhere using the syntax `local.id` and `local.user_id`, respectively.
|
101
|
+
|
102
|
+
```python
|
103
|
+
import pulumi
|
104
|
+
import pulumi_newrelic as newrelic
|
105
|
+
import pulumi_std as std
|
106
|
+
|
107
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
108
|
+
foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
|
109
|
+
name="Test Group")
|
110
|
+
id = foo_get_group.id
|
111
|
+
user_ids = std.join(separator=", ",
|
112
|
+
input=foo_get_group.user_ids).result if len(foo_get_group.user_ids) > 0 else ""
|
113
|
+
```
|
97
114
|
|
98
115
|
|
99
116
|
:param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
|
@@ -125,16 +142,33 @@ def get_group_output(authentication_domain_id: Optional[pulumi.Input[str]] = Non
|
|
125
142
|
|
126
143
|
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
144
|
|
128
|
-
<!--Start PulumiCodeChooser -->
|
129
145
|
```python
|
130
146
|
import pulumi
|
131
147
|
import pulumi_newrelic as newrelic
|
132
148
|
|
133
|
-
|
134
|
-
|
149
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
150
|
+
foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
|
151
|
+
name="Test Group")
|
152
|
+
```
|
153
|
+
|
154
|
+
## Additional Examples
|
155
|
+
|
156
|
+
The following example demonstrates utilizing attributes exported by this data source.
|
157
|
+
|
158
|
+
In order to directly reference the attributes `id` and `user_ids` from this data source, you can use the syntax `data.newrelic_group.foo.id` and `data.newrelic_group.foo.user_ids`, respectively. However, if you need to assign these values to local variables and perform further processing (such as conditionally formatting the `user_ids` attribute as shown in the example below), consider using the provided configuration. These variables can then be accessed elsewhere using the syntax `local.id` and `local.user_id`, respectively.
|
159
|
+
|
160
|
+
```python
|
161
|
+
import pulumi
|
162
|
+
import pulumi_newrelic as newrelic
|
163
|
+
import pulumi_std as std
|
164
|
+
|
165
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
166
|
+
foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
|
135
167
|
name="Test Group")
|
168
|
+
id = foo_get_group.id
|
169
|
+
user_ids = std.join(separator=", ",
|
170
|
+
input=foo_get_group.user_ids).result if len(foo_get_group.user_ids) > 0 else ""
|
136
171
|
```
|
137
|
-
<!--End PulumiCodeChooser -->
|
138
172
|
|
139
173
|
|
140
174
|
:param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
|