pulumi-newrelic 5.20.0a1709643785__py3-none-any.whl → 5.39.0a1736834464__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- pulumi_newrelic/__init__.py +9 -0
- pulumi_newrelic/_inputs.py +7153 -461
- pulumi_newrelic/_utilities.py +41 -5
- pulumi_newrelic/account_management.py +13 -4
- pulumi_newrelic/alert_channel.py +122 -101
- pulumi_newrelic/alert_condition.py +120 -109
- pulumi_newrelic/alert_muting_rule.py +130 -74
- pulumi_newrelic/alert_policy.py +88 -67
- pulumi_newrelic/alert_policy_channel.py +81 -68
- pulumi_newrelic/api_access_key.py +49 -52
- pulumi_newrelic/browser_application.py +79 -76
- pulumi_newrelic/cloud/_inputs.py +2527 -1082
- pulumi_newrelic/cloud/aws_govcloud_integrations.py +135 -130
- pulumi_newrelic/cloud/aws_govcloud_link_account.py +25 -18
- pulumi_newrelic/cloud/aws_integrations.py +300 -1324
- pulumi_newrelic/cloud/aws_link_account.py +25 -18
- pulumi_newrelic/cloud/azure_integrations.py +523 -481
- pulumi_newrelic/cloud/azure_link_account.py +36 -29
- pulumi_newrelic/cloud/gcp_integrations.py +343 -320
- pulumi_newrelic/cloud/gcp_link_account.py +25 -18
- pulumi_newrelic/cloud/outputs.py +327 -1072
- pulumi_newrelic/config/__init__.pyi +6 -1
- pulumi_newrelic/config/vars.py +7 -2
- pulumi_newrelic/data_partition_rule.py +23 -16
- pulumi_newrelic/entity_tags.py +36 -31
- pulumi_newrelic/events_to_metrics_rule.py +27 -20
- pulumi_newrelic/get_account.py +24 -12
- pulumi_newrelic/get_alert_channel.py +26 -13
- pulumi_newrelic/get_alert_policy.py +35 -12
- pulumi_newrelic/get_application.py +39 -27
- pulumi_newrelic/get_authentication_domain.py +17 -9
- pulumi_newrelic/get_cloud_account.py +26 -14
- pulumi_newrelic/get_entity.py +90 -85
- pulumi_newrelic/get_group.py +58 -9
- pulumi_newrelic/get_key_transaction.py +109 -30
- pulumi_newrelic/get_notification_destination.py +64 -14
- pulumi_newrelic/get_obfuscation_expression.py +36 -24
- pulumi_newrelic/get_service_level_alert_helper.py +135 -105
- pulumi_newrelic/get_test_grok_pattern.py +29 -14
- pulumi_newrelic/get_user.py +17 -5
- pulumi_newrelic/group.py +5 -132
- pulumi_newrelic/infra_alert_condition.py +157 -140
- pulumi_newrelic/insights/_inputs.py +43 -0
- pulumi_newrelic/insights/event.py +50 -43
- pulumi_newrelic/insights/outputs.py +5 -0
- pulumi_newrelic/key_transaction.py +464 -0
- pulumi_newrelic/log_parsing_rule.py +29 -18
- pulumi_newrelic/monitor_downtime.py +215 -203
- pulumi_newrelic/notification_channel.py +387 -326
- pulumi_newrelic/notification_destination.py +248 -118
- pulumi_newrelic/nrql_alert_condition.py +353 -246
- pulumi_newrelic/nrql_drop_rule.py +57 -30
- pulumi_newrelic/obfuscation_expression.py +25 -18
- pulumi_newrelic/obfuscation_rule.py +40 -31
- pulumi_newrelic/one_dashboard.py +31 -26
- pulumi_newrelic/one_dashboard_json.py +21 -16
- pulumi_newrelic/one_dashboard_raw.py +112 -101
- pulumi_newrelic/outputs.py +2446 -245
- pulumi_newrelic/plugins/_inputs.py +145 -10
- pulumi_newrelic/plugins/application_settings.py +29 -20
- pulumi_newrelic/plugins/outputs.py +15 -10
- pulumi_newrelic/plugins/workload.py +285 -54
- pulumi_newrelic/provider.py +27 -33
- pulumi_newrelic/pulumi-plugin.json +2 -1
- pulumi_newrelic/service_level.py +193 -180
- pulumi_newrelic/synthetics/_inputs.py +159 -2
- pulumi_newrelic/synthetics/alert_condition.py +91 -78
- pulumi_newrelic/synthetics/broken_links_monitor.py +220 -93
- pulumi_newrelic/synthetics/cert_check_monitor.py +223 -94
- pulumi_newrelic/synthetics/get_private_location.py +34 -22
- pulumi_newrelic/synthetics/get_secure_credential.py +24 -12
- pulumi_newrelic/synthetics/monitor.py +352 -179
- pulumi_newrelic/synthetics/multi_location_alert_condition.py +109 -96
- pulumi_newrelic/synthetics/outputs.py +7 -2
- pulumi_newrelic/synthetics/private_location.py +27 -18
- pulumi_newrelic/synthetics/script_monitor.py +321 -168
- pulumi_newrelic/synthetics/secure_credential.py +25 -20
- pulumi_newrelic/synthetics/step_monitor.py +409 -98
- pulumi_newrelic/user.py +13 -6
- pulumi_newrelic/workflow.py +215 -184
- {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/METADATA +7 -6
- pulumi_newrelic-5.39.0a1736834464.dist-info/RECORD +90 -0
- {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/WHEEL +1 -1
- pulumi_newrelic-5.20.0a1709643785.dist-info/RECORD +0 -89
- {pulumi_newrelic-5.20.0a1709643785.dist-info → pulumi_newrelic-5.39.0a1736834464.dist-info}/top_level.txt +0 -0
pulumi_newrelic/get_entity.py
CHANGED
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
6
6
|
import warnings
|
7
|
+
import sys
|
7
8
|
import pulumi
|
8
9
|
import pulumi.runtime
|
9
10
|
from typing import Any, Mapping, Optional, Sequence, Union, overload
|
11
|
+
if sys.version_info >= (3, 11):
|
12
|
+
from typing import NotRequired, TypedDict, TypeAlias
|
13
|
+
else:
|
14
|
+
from typing_extensions import NotRequired, TypedDict, TypeAlias
|
10
15
|
from . import _utilities
|
11
16
|
from . import outputs
|
12
17
|
from ._inputs import *
|
@@ -23,16 +28,19 @@ class GetEntityResult:
|
|
23
28
|
"""
|
24
29
|
A collection of values returned by getEntity.
|
25
30
|
"""
|
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):
|
27
|
-
if account_id and not isinstance(account_id,
|
28
|
-
raise TypeError("Expected argument 'account_id' to be a
|
31
|
+
def __init__(__self__, account_id=None, application_id=None, domain=None, entity_tags=None, guid=None, id=None, ignore_case=None, ignore_not_found=None, name=None, serving_apm_application_id=None, tags=None, type=None):
|
32
|
+
if account_id and not isinstance(account_id, str):
|
33
|
+
raise TypeError("Expected argument 'account_id' to be a str")
|
29
34
|
pulumi.set(__self__, "account_id", account_id)
|
30
|
-
if application_id and not isinstance(application_id,
|
31
|
-
raise TypeError("Expected argument 'application_id' to be a
|
35
|
+
if application_id and not isinstance(application_id, str):
|
36
|
+
raise TypeError("Expected argument 'application_id' to be a str")
|
32
37
|
pulumi.set(__self__, "application_id", application_id)
|
33
38
|
if domain and not isinstance(domain, str):
|
34
39
|
raise TypeError("Expected argument 'domain' to be a str")
|
35
40
|
pulumi.set(__self__, "domain", domain)
|
41
|
+
if entity_tags and not isinstance(entity_tags, str):
|
42
|
+
raise TypeError("Expected argument 'entity_tags' to be a str")
|
43
|
+
pulumi.set(__self__, "entity_tags", entity_tags)
|
36
44
|
if guid and not isinstance(guid, str):
|
37
45
|
raise TypeError("Expected argument 'guid' to be a str")
|
38
46
|
pulumi.set(__self__, "guid", guid)
|
@@ -42,11 +50,14 @@ class GetEntityResult:
|
|
42
50
|
if ignore_case and not isinstance(ignore_case, bool):
|
43
51
|
raise TypeError("Expected argument 'ignore_case' to be a bool")
|
44
52
|
pulumi.set(__self__, "ignore_case", ignore_case)
|
53
|
+
if ignore_not_found and not isinstance(ignore_not_found, bool):
|
54
|
+
raise TypeError("Expected argument 'ignore_not_found' to be a bool")
|
55
|
+
pulumi.set(__self__, "ignore_not_found", ignore_not_found)
|
45
56
|
if name and not isinstance(name, str):
|
46
57
|
raise TypeError("Expected argument 'name' to be a str")
|
47
58
|
pulumi.set(__self__, "name", name)
|
48
|
-
if serving_apm_application_id and not isinstance(serving_apm_application_id,
|
49
|
-
raise TypeError("Expected argument 'serving_apm_application_id' to be a
|
59
|
+
if serving_apm_application_id and not isinstance(serving_apm_application_id, str):
|
60
|
+
raise TypeError("Expected argument 'serving_apm_application_id' to be a str")
|
50
61
|
pulumi.set(__self__, "serving_apm_application_id", serving_apm_application_id)
|
51
62
|
if tags and not isinstance(tags, list):
|
52
63
|
raise TypeError("Expected argument 'tags' to be a list")
|
@@ -57,12 +68,12 @@ class GetEntityResult:
|
|
57
68
|
|
58
69
|
@property
|
59
70
|
@pulumi.getter(name="accountId")
|
60
|
-
def account_id(self) ->
|
71
|
+
def account_id(self) -> str:
|
61
72
|
return pulumi.get(self, "account_id")
|
62
73
|
|
63
74
|
@property
|
64
75
|
@pulumi.getter(name="applicationId")
|
65
|
-
def application_id(self) ->
|
76
|
+
def application_id(self) -> str:
|
66
77
|
"""
|
67
78
|
The domain-specific application ID of the entity. Only returned for APM and Browser applications.
|
68
79
|
"""
|
@@ -73,6 +84,15 @@ class GetEntityResult:
|
|
73
84
|
def domain(self) -> str:
|
74
85
|
return pulumi.get(self, "domain")
|
75
86
|
|
87
|
+
@property
|
88
|
+
@pulumi.getter(name="entityTags")
|
89
|
+
def entity_tags(self) -> str:
|
90
|
+
"""
|
91
|
+
A JSON-encoded string, comprising tags associated with the entity fetched.
|
92
|
+
* See the **Additional Examples** section below, for an illustration depicting the usage of `jsondecode` with the attribute `entity_tags`, to get the tags associated with the entity fetched.
|
93
|
+
"""
|
94
|
+
return pulumi.get(self, "entity_tags")
|
95
|
+
|
76
96
|
@property
|
77
97
|
@pulumi.getter
|
78
98
|
def guid(self) -> str:
|
@@ -94,6 +114,11 @@ class GetEntityResult:
|
|
94
114
|
def ignore_case(self) -> Optional[bool]:
|
95
115
|
return pulumi.get(self, "ignore_case")
|
96
116
|
|
117
|
+
@property
|
118
|
+
@pulumi.getter(name="ignoreNotFound")
|
119
|
+
def ignore_not_found(self) -> Optional[bool]:
|
120
|
+
return pulumi.get(self, "ignore_not_found")
|
121
|
+
|
97
122
|
@property
|
98
123
|
@pulumi.getter
|
99
124
|
def name(self) -> str:
|
@@ -101,7 +126,7 @@ class GetEntityResult:
|
|
101
126
|
|
102
127
|
@property
|
103
128
|
@pulumi.getter(name="servingApmApplicationId")
|
104
|
-
def serving_apm_application_id(self) ->
|
129
|
+
def serving_apm_application_id(self) -> str:
|
105
130
|
"""
|
106
131
|
The browser-specific ID of the backing APM entity. Only returned for Browser applications.
|
107
132
|
"""
|
@@ -127,66 +152,47 @@ class AwaitableGetEntityResult(GetEntityResult):
|
|
127
152
|
account_id=self.account_id,
|
128
153
|
application_id=self.application_id,
|
129
154
|
domain=self.domain,
|
155
|
+
entity_tags=self.entity_tags,
|
130
156
|
guid=self.guid,
|
131
157
|
id=self.id,
|
132
158
|
ignore_case=self.ignore_case,
|
159
|
+
ignore_not_found=self.ignore_not_found,
|
133
160
|
name=self.name,
|
134
161
|
serving_apm_application_id=self.serving_apm_application_id,
|
135
162
|
tags=self.tags,
|
136
163
|
type=self.type)
|
137
164
|
|
138
165
|
|
139
|
-
def get_entity(account_id: Optional[
|
166
|
+
def get_entity(account_id: Optional[str] = None,
|
140
167
|
domain: Optional[str] = None,
|
168
|
+
entity_tags: Optional[str] = None,
|
141
169
|
ignore_case: Optional[bool] = None,
|
170
|
+
ignore_not_found: Optional[bool] = None,
|
142
171
|
name: Optional[str] = None,
|
143
|
-
tags: Optional[Sequence[
|
172
|
+
tags: Optional[Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']]] = None,
|
144
173
|
type: Optional[str] = None,
|
145
174
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetEntityResult:
|
146
175
|
"""
|
147
|
-
Use this data source to
|
148
|
-
|
149
|
-
## Additional Examples
|
150
|
-
|
151
|
-
> If the entities are not found please try again without providing the `type` field.
|
152
|
-
|
153
|
-
### Query for an OTEL entity
|
176
|
+
Use this data source to access information about an existing resource.
|
154
177
|
|
155
|
-
|
156
|
-
import pulumi
|
157
|
-
import pulumi_newrelic as newrelic
|
158
|
-
|
159
|
-
app = newrelic.get_entity(domain="EXT",
|
160
|
-
name="my-otel-app",
|
161
|
-
tags=[newrelic.GetEntityTagArgs(
|
162
|
-
key="accountID",
|
163
|
-
value="12345",
|
164
|
-
)],
|
165
|
-
type="SERVICE")
|
166
|
-
```
|
167
|
-
|
168
|
-
### Query for an entity by type (AWS Lambda entity in this example)
|
169
|
-
|
170
|
-
```python
|
171
|
-
import pulumi
|
172
|
-
import pulumi_newrelic as newrelic
|
173
|
-
|
174
|
-
app = newrelic.get_entity(name="my_lambda_trace",
|
175
|
-
type="AWSLAMBDAFUNCTION")
|
176
|
-
```
|
177
|
-
|
178
|
-
|
179
|
-
: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.
|
178
|
+
:param str 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.
|
180
179
|
:param str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
|
180
|
+
:param str entity_tags: A JSON-encoded string, comprising tags associated with the entity fetched.
|
181
|
+
* See the **Additional Examples** section below, for an illustration depicting the usage of `jsondecode` with the attribute `entity_tags`, to get the tags associated with the entity fetched.
|
181
182
|
:param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
|
183
|
+
: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`.
|
184
|
+
|
185
|
+
> **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.
|
182
186
|
: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.
|
183
|
-
:param Sequence[
|
187
|
+
:param Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']] tags: A tag applied to the entity. See Nested tag blocks below for details.
|
184
188
|
: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.
|
185
189
|
"""
|
186
190
|
__args__ = dict()
|
187
191
|
__args__['accountId'] = account_id
|
188
192
|
__args__['domain'] = domain
|
193
|
+
__args__['entityTags'] = entity_tags
|
189
194
|
__args__['ignoreCase'] = ignore_case
|
195
|
+
__args__['ignoreNotFound'] = ignore_not_found
|
190
196
|
__args__['name'] = name
|
191
197
|
__args__['tags'] = tags
|
192
198
|
__args__['type'] = type
|
@@ -197,61 +203,60 @@ def get_entity(account_id: Optional[int] = None,
|
|
197
203
|
account_id=pulumi.get(__ret__, 'account_id'),
|
198
204
|
application_id=pulumi.get(__ret__, 'application_id'),
|
199
205
|
domain=pulumi.get(__ret__, 'domain'),
|
206
|
+
entity_tags=pulumi.get(__ret__, 'entity_tags'),
|
200
207
|
guid=pulumi.get(__ret__, 'guid'),
|
201
208
|
id=pulumi.get(__ret__, 'id'),
|
202
209
|
ignore_case=pulumi.get(__ret__, 'ignore_case'),
|
210
|
+
ignore_not_found=pulumi.get(__ret__, 'ignore_not_found'),
|
203
211
|
name=pulumi.get(__ret__, 'name'),
|
204
212
|
serving_apm_application_id=pulumi.get(__ret__, 'serving_apm_application_id'),
|
205
213
|
tags=pulumi.get(__ret__, 'tags'),
|
206
214
|
type=pulumi.get(__ret__, 'type'))
|
207
|
-
|
208
|
-
|
209
|
-
@_utilities.lift_output_func(get_entity)
|
210
|
-
def get_entity_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
215
|
+
def get_entity_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
|
211
216
|
domain: Optional[pulumi.Input[Optional[str]]] = None,
|
217
|
+
entity_tags: Optional[pulumi.Input[Optional[str]]] = None,
|
212
218
|
ignore_case: Optional[pulumi.Input[Optional[bool]]] = None,
|
219
|
+
ignore_not_found: Optional[pulumi.Input[Optional[bool]]] = None,
|
213
220
|
name: Optional[pulumi.Input[str]] = None,
|
214
|
-
tags: Optional[pulumi.Input[Optional[Sequence[
|
221
|
+
tags: Optional[pulumi.Input[Optional[Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']]]]] = None,
|
215
222
|
type: Optional[pulumi.Input[Optional[str]]] = None,
|
216
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetEntityResult]:
|
223
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetEntityResult]:
|
217
224
|
"""
|
218
|
-
Use this data source to
|
225
|
+
Use this data source to access information about an existing resource.
|
219
226
|
|
220
|
-
|
221
|
-
|
222
|
-
> If the entities are not found please try again without providing the `type` field.
|
223
|
-
|
224
|
-
### Query for an OTEL entity
|
225
|
-
|
226
|
-
```python
|
227
|
-
import pulumi
|
228
|
-
import pulumi_newrelic as newrelic
|
229
|
-
|
230
|
-
app = newrelic.get_entity(domain="EXT",
|
231
|
-
name="my-otel-app",
|
232
|
-
tags=[newrelic.GetEntityTagArgs(
|
233
|
-
key="accountID",
|
234
|
-
value="12345",
|
235
|
-
)],
|
236
|
-
type="SERVICE")
|
237
|
-
```
|
238
|
-
|
239
|
-
### Query for an entity by type (AWS Lambda entity in this example)
|
240
|
-
|
241
|
-
```python
|
242
|
-
import pulumi
|
243
|
-
import pulumi_newrelic as newrelic
|
244
|
-
|
245
|
-
app = newrelic.get_entity(name="my_lambda_trace",
|
246
|
-
type="AWSLAMBDAFUNCTION")
|
247
|
-
```
|
248
|
-
|
249
|
-
|
250
|
-
: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.
|
227
|
+
:param str 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.
|
251
228
|
:param str domain: The entity's domain. Valid values are APM, BROWSER, INFRA, MOBILE, SYNTH, and EXT. If not specified, all domains are searched.
|
229
|
+
:param str entity_tags: A JSON-encoded string, comprising tags associated with the entity fetched.
|
230
|
+
* See the **Additional Examples** section below, for an illustration depicting the usage of `jsondecode` with the attribute `entity_tags`, to get the tags associated with the entity fetched.
|
252
231
|
:param bool ignore_case: Ignore case of the `name` when searching for the entity. Defaults to false.
|
232
|
+
: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`.
|
233
|
+
|
234
|
+
> **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.
|
253
235
|
: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.
|
254
|
-
:param Sequence[
|
236
|
+
:param Sequence[Union['GetEntityTagArgs', 'GetEntityTagArgsDict']] tags: A tag applied to the entity. See Nested tag blocks below for details.
|
255
237
|
: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.
|
256
238
|
"""
|
257
|
-
|
239
|
+
__args__ = dict()
|
240
|
+
__args__['accountId'] = account_id
|
241
|
+
__args__['domain'] = domain
|
242
|
+
__args__['entityTags'] = entity_tags
|
243
|
+
__args__['ignoreCase'] = ignore_case
|
244
|
+
__args__['ignoreNotFound'] = ignore_not_found
|
245
|
+
__args__['name'] = name
|
246
|
+
__args__['tags'] = tags
|
247
|
+
__args__['type'] = type
|
248
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
249
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getEntity:getEntity', __args__, opts=opts, typ=GetEntityResult)
|
250
|
+
return __ret__.apply(lambda __response__: GetEntityResult(
|
251
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
252
|
+
application_id=pulumi.get(__response__, 'application_id'),
|
253
|
+
domain=pulumi.get(__response__, 'domain'),
|
254
|
+
entity_tags=pulumi.get(__response__, 'entity_tags'),
|
255
|
+
guid=pulumi.get(__response__, 'guid'),
|
256
|
+
id=pulumi.get(__response__, 'id'),
|
257
|
+
ignore_case=pulumi.get(__response__, 'ignore_case'),
|
258
|
+
ignore_not_found=pulumi.get(__response__, 'ignore_not_found'),
|
259
|
+
name=pulumi.get(__response__, 'name'),
|
260
|
+
serving_apm_application_id=pulumi.get(__response__, 'serving_apm_application_id'),
|
261
|
+
tags=pulumi.get(__response__, 'tags'),
|
262
|
+
type=pulumi.get(__response__, 'type')))
|
pulumi_newrelic/get_group.py
CHANGED
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
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__ = [
|
@@ -88,11 +93,30 @@ def get_group(authentication_domain_id: Optional[str] = None,
|
|
88
93
|
import pulumi
|
89
94
|
import pulumi_newrelic as newrelic
|
90
95
|
|
91
|
-
|
92
|
-
|
96
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
97
|
+
foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
|
93
98
|
name="Test Group")
|
94
99
|
```
|
95
100
|
|
101
|
+
## Additional Examples
|
102
|
+
|
103
|
+
The following example demonstrates utilizing attributes exported by this data source.
|
104
|
+
|
105
|
+
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.
|
106
|
+
|
107
|
+
```python
|
108
|
+
import pulumi
|
109
|
+
import pulumi_newrelic as newrelic
|
110
|
+
import pulumi_std as std
|
111
|
+
|
112
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
113
|
+
foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
|
114
|
+
name="Test Group")
|
115
|
+
id = foo_get_group.id
|
116
|
+
user_ids = std.join(separator=", ",
|
117
|
+
input=foo_get_group.user_ids).result if len(foo_get_group.user_ids) > 0 else ""
|
118
|
+
```
|
119
|
+
|
96
120
|
|
97
121
|
:param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
|
98
122
|
:param str name: The name of the group to search for.
|
@@ -110,12 +134,9 @@ def get_group(authentication_domain_id: Optional[str] = None,
|
|
110
134
|
id=pulumi.get(__ret__, 'id'),
|
111
135
|
name=pulumi.get(__ret__, 'name'),
|
112
136
|
user_ids=pulumi.get(__ret__, 'user_ids'))
|
113
|
-
|
114
|
-
|
115
|
-
@_utilities.lift_output_func(get_group)
|
116
137
|
def get_group_output(authentication_domain_id: Optional[pulumi.Input[str]] = None,
|
117
138
|
name: Optional[pulumi.Input[str]] = None,
|
118
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGroupResult]:
|
139
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGroupResult]:
|
119
140
|
"""
|
120
141
|
The `Group` data source helps search for a group by its name and retrieve the ID of the matching group and other associated attributes.
|
121
142
|
|
@@ -127,15 +148,43 @@ def get_group_output(authentication_domain_id: Optional[pulumi.Input[str]] = Non
|
|
127
148
|
import pulumi
|
128
149
|
import pulumi_newrelic as newrelic
|
129
150
|
|
130
|
-
|
131
|
-
|
151
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
152
|
+
foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
|
132
153
|
name="Test Group")
|
133
154
|
```
|
134
155
|
|
156
|
+
## Additional Examples
|
157
|
+
|
158
|
+
The following example demonstrates utilizing attributes exported by this data source.
|
159
|
+
|
160
|
+
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.
|
161
|
+
|
162
|
+
```python
|
163
|
+
import pulumi
|
164
|
+
import pulumi_newrelic as newrelic
|
165
|
+
import pulumi_std as std
|
166
|
+
|
167
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
168
|
+
foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
|
169
|
+
name="Test Group")
|
170
|
+
id = foo_get_group.id
|
171
|
+
user_ids = std.join(separator=", ",
|
172
|
+
input=foo_get_group.user_ids).result if len(foo_get_group.user_ids) > 0 else ""
|
173
|
+
```
|
174
|
+
|
135
175
|
|
136
176
|
:param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
|
137
177
|
:param str name: The name of the group to search for.
|
138
178
|
|
139
179
|
> **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.
|
140
180
|
"""
|
141
|
-
|
181
|
+
__args__ = dict()
|
182
|
+
__args__['authenticationDomainId'] = authentication_domain_id
|
183
|
+
__args__['name'] = name
|
184
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
185
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult)
|
186
|
+
return __ret__.apply(lambda __response__: GetGroupResult(
|
187
|
+
authentication_domain_id=pulumi.get(__response__, 'authentication_domain_id'),
|
188
|
+
id=pulumi.get(__response__, 'id'),
|
189
|
+
name=pulumi.get(__response__, 'name'),
|
190
|
+
user_ids=pulumi.get(__response__, 'user_ids')))
|
@@ -4,9 +4,14 @@
|
|
4
4
|
|
5
5
|
import copy
|
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__ = [
|
@@ -21,13 +26,46 @@ class GetKeyTransactionResult:
|
|
21
26
|
"""
|
22
27
|
A collection of values returned by getKeyTransaction.
|
23
28
|
"""
|
24
|
-
def __init__(__self__, id=None, name=None):
|
29
|
+
def __init__(__self__, account_id=None, domain=None, guid=None, id=None, name=None, type=None):
|
30
|
+
if account_id and not isinstance(account_id, str):
|
31
|
+
raise TypeError("Expected argument 'account_id' to be a str")
|
32
|
+
pulumi.set(__self__, "account_id", account_id)
|
33
|
+
if domain and not isinstance(domain, str):
|
34
|
+
raise TypeError("Expected argument 'domain' to be a str")
|
35
|
+
pulumi.set(__self__, "domain", domain)
|
36
|
+
if guid and not isinstance(guid, str):
|
37
|
+
raise TypeError("Expected argument 'guid' to be a str")
|
38
|
+
pulumi.set(__self__, "guid", guid)
|
25
39
|
if id and not isinstance(id, str):
|
26
40
|
raise TypeError("Expected argument 'id' to be a str")
|
27
41
|
pulumi.set(__self__, "id", id)
|
28
42
|
if name and not isinstance(name, str):
|
29
43
|
raise TypeError("Expected argument 'name' to be a str")
|
30
44
|
pulumi.set(__self__, "name", name)
|
45
|
+
if type and not isinstance(type, str):
|
46
|
+
raise TypeError("Expected argument 'type' to be a str")
|
47
|
+
pulumi.set(__self__, "type", type)
|
48
|
+
|
49
|
+
@property
|
50
|
+
@pulumi.getter(name="accountId")
|
51
|
+
def account_id(self) -> str:
|
52
|
+
return pulumi.get(self, "account_id")
|
53
|
+
|
54
|
+
@property
|
55
|
+
@pulumi.getter
|
56
|
+
def domain(self) -> str:
|
57
|
+
"""
|
58
|
+
Domain of the key transaction in New Relic.
|
59
|
+
"""
|
60
|
+
return pulumi.get(self, "domain")
|
61
|
+
|
62
|
+
@property
|
63
|
+
@pulumi.getter
|
64
|
+
def guid(self) -> str:
|
65
|
+
"""
|
66
|
+
GUID of the key transaction in New Relic.
|
67
|
+
"""
|
68
|
+
return pulumi.get(self, "guid")
|
31
69
|
|
32
70
|
@property
|
33
71
|
@pulumi.getter
|
@@ -42,6 +80,14 @@ class GetKeyTransactionResult:
|
|
42
80
|
def name(self) -> str:
|
43
81
|
return pulumi.get(self, "name")
|
44
82
|
|
83
|
+
@property
|
84
|
+
@pulumi.getter
|
85
|
+
def type(self) -> str:
|
86
|
+
"""
|
87
|
+
Type of the key transaction in New Relic.
|
88
|
+
"""
|
89
|
+
return pulumi.get(self, "type")
|
90
|
+
|
45
91
|
|
46
92
|
class AwaitableGetKeyTransactionResult(GetKeyTransactionResult):
|
47
93
|
# pylint: disable=using-constant-test
|
@@ -49,11 +95,17 @@ class AwaitableGetKeyTransactionResult(GetKeyTransactionResult):
|
|
49
95
|
if False:
|
50
96
|
yield self
|
51
97
|
return GetKeyTransactionResult(
|
98
|
+
account_id=self.account_id,
|
99
|
+
domain=self.domain,
|
100
|
+
guid=self.guid,
|
52
101
|
id=self.id,
|
53
|
-
name=self.name
|
102
|
+
name=self.name,
|
103
|
+
type=self.type)
|
54
104
|
|
55
105
|
|
56
|
-
def get_key_transaction(
|
106
|
+
def get_key_transaction(account_id: Optional[str] = None,
|
107
|
+
guid: Optional[str] = None,
|
108
|
+
name: Optional[str] = None,
|
57
109
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetKeyTransactionResult:
|
58
110
|
"""
|
59
111
|
Use this data source to get information about a specific key transaction in New Relic that already exists.
|
@@ -65,38 +117,48 @@ def get_key_transaction(name: Optional[str] = None,
|
|
65
117
|
import pulumi_newrelic as newrelic
|
66
118
|
|
67
119
|
txn = newrelic.get_key_transaction(name="txn")
|
68
|
-
|
69
|
-
foo_alert_condition = newrelic.AlertCondition("
|
70
|
-
policy_id=
|
120
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
121
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
122
|
+
policy_id=foo.id,
|
123
|
+
name="foo",
|
71
124
|
type="apm_kt_metric",
|
72
125
|
entities=[txn.id],
|
73
126
|
metric="error_percentage",
|
74
127
|
runbook_url="https://www.example.com",
|
75
|
-
terms=[
|
76
|
-
duration
|
77
|
-
operator
|
78
|
-
priority
|
79
|
-
threshold
|
80
|
-
time_function
|
81
|
-
|
128
|
+
terms=[{
|
129
|
+
"duration": 5,
|
130
|
+
"operator": "below",
|
131
|
+
"priority": "critical",
|
132
|
+
"threshold": 0.75,
|
133
|
+
"time_function": "all",
|
134
|
+
}])
|
82
135
|
```
|
83
136
|
|
84
137
|
|
138
|
+
:param str account_id: The account ID you would like to search for key transactions in. Defaults to `account_id` in the `provider{}` (or `NEW_RELIC_ACCOUNT_ID` in your environment) if not specified.
|
139
|
+
|
140
|
+
> **NOTE** If the `name` specified in the configuration matches the names of multiple key transactions in the account, the data source will return the first match from the list of all matching key transactions retrieved from the API. However, when using the `guid` argument as the search criterion, only the key transaction with that particular GUID is returned, as each key transaction has a unique GUID.
|
141
|
+
:param str guid: GUID of the key transaction in New Relic.
|
85
142
|
:param str name: The name of the key transaction in New Relic.
|
86
143
|
"""
|
87
144
|
__args__ = dict()
|
145
|
+
__args__['accountId'] = account_id
|
146
|
+
__args__['guid'] = guid
|
88
147
|
__args__['name'] = name
|
89
148
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
90
149
|
__ret__ = pulumi.runtime.invoke('newrelic:index/getKeyTransaction:getKeyTransaction', __args__, opts=opts, typ=GetKeyTransactionResult).value
|
91
150
|
|
92
151
|
return AwaitableGetKeyTransactionResult(
|
152
|
+
account_id=pulumi.get(__ret__, 'account_id'),
|
153
|
+
domain=pulumi.get(__ret__, 'domain'),
|
154
|
+
guid=pulumi.get(__ret__, 'guid'),
|
93
155
|
id=pulumi.get(__ret__, 'id'),
|
94
|
-
name=pulumi.get(__ret__, 'name')
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetKeyTransactionResult]:
|
156
|
+
name=pulumi.get(__ret__, 'name'),
|
157
|
+
type=pulumi.get(__ret__, 'type'))
|
158
|
+
def get_key_transaction_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
|
159
|
+
guid: Optional[pulumi.Input[Optional[str]]] = None,
|
160
|
+
name: Optional[pulumi.Input[str]] = None,
|
161
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetKeyTransactionResult]:
|
100
162
|
"""
|
101
163
|
Use this data source to get information about a specific key transaction in New Relic that already exists.
|
102
164
|
|
@@ -107,23 +169,40 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
|
|
107
169
|
import pulumi_newrelic as newrelic
|
108
170
|
|
109
171
|
txn = newrelic.get_key_transaction(name="txn")
|
110
|
-
|
111
|
-
foo_alert_condition = newrelic.AlertCondition("
|
112
|
-
policy_id=
|
172
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
173
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
174
|
+
policy_id=foo.id,
|
175
|
+
name="foo",
|
113
176
|
type="apm_kt_metric",
|
114
177
|
entities=[txn.id],
|
115
178
|
metric="error_percentage",
|
116
179
|
runbook_url="https://www.example.com",
|
117
|
-
terms=[
|
118
|
-
duration
|
119
|
-
operator
|
120
|
-
priority
|
121
|
-
threshold
|
122
|
-
time_function
|
123
|
-
|
180
|
+
terms=[{
|
181
|
+
"duration": 5,
|
182
|
+
"operator": "below",
|
183
|
+
"priority": "critical",
|
184
|
+
"threshold": 0.75,
|
185
|
+
"time_function": "all",
|
186
|
+
}])
|
124
187
|
```
|
125
188
|
|
126
189
|
|
190
|
+
:param str account_id: The account ID you would like to search for key transactions in. Defaults to `account_id` in the `provider{}` (or `NEW_RELIC_ACCOUNT_ID` in your environment) if not specified.
|
191
|
+
|
192
|
+
> **NOTE** If the `name` specified in the configuration matches the names of multiple key transactions in the account, the data source will return the first match from the list of all matching key transactions retrieved from the API. However, when using the `guid` argument as the search criterion, only the key transaction with that particular GUID is returned, as each key transaction has a unique GUID.
|
193
|
+
:param str guid: GUID of the key transaction in New Relic.
|
127
194
|
:param str name: The name of the key transaction in New Relic.
|
128
195
|
"""
|
129
|
-
|
196
|
+
__args__ = dict()
|
197
|
+
__args__['accountId'] = account_id
|
198
|
+
__args__['guid'] = guid
|
199
|
+
__args__['name'] = name
|
200
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
201
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getKeyTransaction:getKeyTransaction', __args__, opts=opts, typ=GetKeyTransactionResult)
|
202
|
+
return __ret__.apply(lambda __response__: GetKeyTransactionResult(
|
203
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
204
|
+
domain=pulumi.get(__response__, 'domain'),
|
205
|
+
guid=pulumi.get(__response__, 'guid'),
|
206
|
+
id=pulumi.get(__response__, 'id'),
|
207
|
+
name=pulumi.get(__response__, 'name'),
|
208
|
+
type=pulumi.get(__response__, 'type')))
|