pulumi-newrelic 5.23.0a1713333809__py3-none-any.whl → 5.23.0a1713975814__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 +110 -270
- pulumi_newrelic/account_management.py +20 -20
- pulumi_newrelic/alert_channel.py +76 -92
- pulumi_newrelic/alert_condition.py +104 -149
- 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 +28 -32
- pulumi_newrelic/get_group.py +42 -8
- pulumi_newrelic/get_key_transaction.py +8 -10
- 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 -131
- 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/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 +110 -270
- pulumi_newrelic/plugins/_inputs.py +16 -16
- pulumi_newrelic/plugins/application_settings.py +6 -8
- 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 -64
- 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.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/METADATA +1 -1
- pulumi_newrelic-5.23.0a1713975814.dist-info/RECORD +89 -0
- pulumi_newrelic-5.23.0a1713333809.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.dist-info}/WHEEL +0 -0
- {pulumi_newrelic-5.23.0a1713333809.dist-info → pulumi_newrelic-5.23.0a1713975814.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
@@ -162,51 +162,50 @@ def get_entity(account_id: Optional[int] = None,
|
|
162
162
|
|
163
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.
|
164
164
|
|
165
|
-
<!--Start PulumiCodeChooser -->
|
166
165
|
```python
|
167
166
|
import pulumi
|
168
167
|
import pulumi_newrelic as newrelic
|
169
168
|
|
170
|
-
|
171
|
-
|
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",
|
172
174
|
type="APPLICATION")
|
173
175
|
```
|
174
|
-
<!--End PulumiCodeChooser -->
|
175
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`.
|
176
|
-
<!--Start PulumiCodeChooser -->
|
177
177
|
```python
|
178
178
|
import pulumi
|
179
179
|
import pulumi_newrelic as newrelic
|
180
180
|
|
181
|
-
|
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,
|
182
186
|
domain="APM",
|
183
|
-
name="my-app",
|
184
187
|
type="APPLICATION")
|
185
188
|
```
|
186
|
-
<!--End PulumiCodeChooser -->
|
187
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.
|
188
190
|
|
189
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`.
|
190
192
|
### Query for an OTEL entity
|
191
193
|
|
192
|
-
<!--Start PulumiCodeChooser -->
|
193
194
|
```python
|
194
195
|
import pulumi
|
195
196
|
import pulumi_newrelic as newrelic
|
196
197
|
|
197
|
-
app = newrelic.get_entity(
|
198
|
-
|
198
|
+
app = newrelic.get_entity(name="my-otel-app",
|
199
|
+
domain="EXT",
|
200
|
+
type="SERVICE",
|
199
201
|
tags=[newrelic.GetEntityTagArgs(
|
200
202
|
key="accountID",
|
201
203
|
value="12345",
|
202
|
-
)]
|
203
|
-
type="SERVICE")
|
204
|
+
)])
|
204
205
|
```
|
205
|
-
<!--End PulumiCodeChooser -->
|
206
206
|
|
207
207
|
### Query for an entity by type (AWS Lambda entity in this example)
|
208
208
|
|
209
|
-
<!--Start PulumiCodeChooser -->
|
210
209
|
```python
|
211
210
|
import pulumi
|
212
211
|
import pulumi_newrelic as newrelic
|
@@ -214,7 +213,6 @@ def get_entity(account_id: Optional[int] = None,
|
|
214
213
|
app = newrelic.get_entity(name="my_lambda_trace",
|
215
214
|
type="AWSLAMBDAFUNCTION")
|
216
215
|
```
|
217
|
-
<!--End PulumiCodeChooser -->
|
218
216
|
|
219
217
|
|
220
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.
|
@@ -270,51 +268,50 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
270
268
|
|
271
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.
|
272
270
|
|
273
|
-
<!--Start PulumiCodeChooser -->
|
274
271
|
```python
|
275
272
|
import pulumi
|
276
273
|
import pulumi_newrelic as newrelic
|
277
274
|
|
278
|
-
|
279
|
-
|
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",
|
280
280
|
type="APPLICATION")
|
281
281
|
```
|
282
|
-
<!--End PulumiCodeChooser -->
|
283
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`.
|
284
|
-
<!--Start PulumiCodeChooser -->
|
285
283
|
```python
|
286
284
|
import pulumi
|
287
285
|
import pulumi_newrelic as newrelic
|
288
286
|
|
289
|
-
|
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,
|
290
292
|
domain="APM",
|
291
|
-
name="my-app",
|
292
293
|
type="APPLICATION")
|
293
294
|
```
|
294
|
-
<!--End PulumiCodeChooser -->
|
295
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.
|
296
296
|
|
297
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`.
|
298
298
|
### Query for an OTEL entity
|
299
299
|
|
300
|
-
<!--Start PulumiCodeChooser -->
|
301
300
|
```python
|
302
301
|
import pulumi
|
303
302
|
import pulumi_newrelic as newrelic
|
304
303
|
|
305
|
-
app = newrelic.get_entity(
|
306
|
-
|
304
|
+
app = newrelic.get_entity(name="my-otel-app",
|
305
|
+
domain="EXT",
|
306
|
+
type="SERVICE",
|
307
307
|
tags=[newrelic.GetEntityTagArgs(
|
308
308
|
key="accountID",
|
309
309
|
value="12345",
|
310
|
-
)]
|
311
|
-
type="SERVICE")
|
310
|
+
)])
|
312
311
|
```
|
313
|
-
<!--End PulumiCodeChooser -->
|
314
312
|
|
315
313
|
### Query for an entity by type (AWS Lambda entity in this example)
|
316
314
|
|
317
|
-
<!--Start PulumiCodeChooser -->
|
318
315
|
```python
|
319
316
|
import pulumi
|
320
317
|
import pulumi_newrelic as newrelic
|
@@ -322,7 +319,6 @@ def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
322
319
|
app = newrelic.get_entity(name="my_lambda_trace",
|
323
320
|
type="AWSLAMBDAFUNCTION")
|
324
321
|
```
|
325
|
-
<!--End PulumiCodeChooser -->
|
326
322
|
|
327
323
|
|
328
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.
|
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.
|
@@ -60,15 +60,15 @@ def get_key_transaction(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
67
|
txn = newrelic.get_key_transaction(name="txn")
|
69
|
-
|
70
|
-
foo_alert_condition = newrelic.AlertCondition("
|
71
|
-
policy_id=
|
68
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
69
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
70
|
+
policy_id=foo.id,
|
71
|
+
name="foo",
|
72
72
|
type="apm_kt_metric",
|
73
73
|
entities=[txn.id],
|
74
74
|
metric="error_percentage",
|
@@ -81,7 +81,6 @@ def get_key_transaction(name: Optional[str] = None,
|
|
81
81
|
time_function="all",
|
82
82
|
)])
|
83
83
|
```
|
84
|
-
<!--End PulumiCodeChooser -->
|
85
84
|
|
86
85
|
|
87
86
|
:param str name: The name of the key transaction in New Relic.
|
@@ -104,15 +103,15 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
|
|
104
103
|
|
105
104
|
## Example Usage
|
106
105
|
|
107
|
-
<!--Start PulumiCodeChooser -->
|
108
106
|
```python
|
109
107
|
import pulumi
|
110
108
|
import pulumi_newrelic as newrelic
|
111
109
|
|
112
110
|
txn = newrelic.get_key_transaction(name="txn")
|
113
|
-
|
114
|
-
foo_alert_condition = newrelic.AlertCondition("
|
115
|
-
policy_id=
|
111
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
112
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
113
|
+
policy_id=foo.id,
|
114
|
+
name="foo",
|
116
115
|
type="apm_kt_metric",
|
117
116
|
entities=[txn.id],
|
118
117
|
metric="error_percentage",
|
@@ -125,7 +124,6 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
|
|
125
124
|
time_function="all",
|
126
125
|
)])
|
127
126
|
```
|
128
|
-
<!--End PulumiCodeChooser -->
|
129
127
|
|
130
128
|
|
131
129
|
:param str name: The name of the key transaction in New Relic.
|
@@ -70,7 +70,6 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
|
|
70
70
|
|
71
71
|
## Example Usage
|
72
72
|
|
73
|
-
<!--Start PulumiCodeChooser -->
|
74
73
|
```python
|
75
74
|
import pulumi
|
76
75
|
import pulumi_newrelic as newrelic
|
@@ -78,6 +77,7 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
|
|
78
77
|
expression = newrelic.get_obfuscation_expression(account_id=123456,
|
79
78
|
name="The expression")
|
80
79
|
rule = newrelic.ObfuscationRule("rule",
|
80
|
+
name="ruleName",
|
81
81
|
description="description of the rule",
|
82
82
|
filter="hostStatus=running",
|
83
83
|
enabled=True,
|
@@ -87,7 +87,6 @@ def get_obfuscation_expression(account_id: Optional[int] = None,
|
|
87
87
|
method="MASK",
|
88
88
|
)])
|
89
89
|
```
|
90
|
-
<!--End PulumiCodeChooser -->
|
91
90
|
|
92
91
|
|
93
92
|
:param int account_id: The account id associated with the obfuscation expression. If left empty will default to account ID specified in provider level configuration.
|
@@ -114,7 +113,6 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
|
|
114
113
|
|
115
114
|
## Example Usage
|
116
115
|
|
117
|
-
<!--Start PulumiCodeChooser -->
|
118
116
|
```python
|
119
117
|
import pulumi
|
120
118
|
import pulumi_newrelic as newrelic
|
@@ -122,6 +120,7 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
|
|
122
120
|
expression = newrelic.get_obfuscation_expression(account_id=123456,
|
123
121
|
name="The expression")
|
124
122
|
rule = newrelic.ObfuscationRule("rule",
|
123
|
+
name="ruleName",
|
125
124
|
description="description of the rule",
|
126
125
|
filter="hostStatus=running",
|
127
126
|
enabled=True,
|
@@ -131,7 +130,6 @@ def get_obfuscation_expression_output(account_id: Optional[pulumi.Input[Optional
|
|
131
130
|
method="MASK",
|
132
131
|
)])
|
133
132
|
```
|
134
|
-
<!--End PulumiCodeChooser -->
|
135
133
|
|
136
134
|
|
137
135
|
:param int account_id: The account id associated with the obfuscation expression. If left empty will default to account ID specified in provider level configuration.
|