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
@@ -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
|
|
@@ -23,8 +28,8 @@ class GetAlertChannelResult:
|
|
23
28
|
A collection of values returned by getAlertChannel.
|
24
29
|
"""
|
25
30
|
def __init__(__self__, account_id=None, config=None, id=None, name=None, policy_ids=None, type=None):
|
26
|
-
if account_id and not isinstance(account_id,
|
27
|
-
raise TypeError("Expected argument 'account_id' to be a
|
31
|
+
if account_id and not isinstance(account_id, str):
|
32
|
+
raise TypeError("Expected argument 'account_id' to be a str")
|
28
33
|
pulumi.set(__self__, "account_id", account_id)
|
29
34
|
if config and not isinstance(config, dict):
|
30
35
|
raise TypeError("Expected argument 'config' to be a dict")
|
@@ -44,7 +49,7 @@ class GetAlertChannelResult:
|
|
44
49
|
|
45
50
|
@property
|
46
51
|
@pulumi.getter(name="accountId")
|
47
|
-
def account_id(self) ->
|
52
|
+
def account_id(self) -> str:
|
48
53
|
return pulumi.get(self, "account_id")
|
49
54
|
|
50
55
|
@property
|
@@ -70,7 +75,7 @@ class GetAlertChannelResult:
|
|
70
75
|
|
71
76
|
@property
|
72
77
|
@pulumi.getter(name="policyIds")
|
73
|
-
def policy_ids(self) -> Sequence[
|
78
|
+
def policy_ids(self) -> Sequence[str]:
|
74
79
|
"""
|
75
80
|
A list of policy IDs associated with the alert channel.
|
76
81
|
"""
|
@@ -99,7 +104,7 @@ class AwaitableGetAlertChannelResult(GetAlertChannelResult):
|
|
99
104
|
type=self.type)
|
100
105
|
|
101
106
|
|
102
|
-
def get_alert_channel(account_id: Optional[
|
107
|
+
def get_alert_channel(account_id: Optional[str] = None,
|
103
108
|
name: Optional[str] = None,
|
104
109
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlertChannelResult:
|
105
110
|
"""
|
@@ -108,7 +113,7 @@ def get_alert_channel(account_id: Optional[int] = None,
|
|
108
113
|
> **WARNING:** The `AlertChannel` data source is deprecated and will be removed in the next major release.
|
109
114
|
|
110
115
|
|
111
|
-
:param
|
116
|
+
:param str account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
112
117
|
:param str name: The name of the alert channel in New Relic.
|
113
118
|
"""
|
114
119
|
__args__ = dict()
|
@@ -124,19 +129,27 @@ def get_alert_channel(account_id: Optional[int] = None,
|
|
124
129
|
name=pulumi.get(__ret__, 'name'),
|
125
130
|
policy_ids=pulumi.get(__ret__, 'policy_ids'),
|
126
131
|
type=pulumi.get(__ret__, 'type'))
|
127
|
-
|
128
|
-
|
129
|
-
@_utilities.lift_output_func(get_alert_channel)
|
130
|
-
def get_alert_channel_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
132
|
+
def get_alert_channel_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
|
131
133
|
name: Optional[pulumi.Input[str]] = None,
|
132
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAlertChannelResult]:
|
134
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlertChannelResult]:
|
133
135
|
"""
|
134
136
|
Use this data source to get information about a specific alert channel in New Relic that already exists.
|
135
137
|
|
136
138
|
> **WARNING:** The `AlertChannel` data source is deprecated and will be removed in the next major release.
|
137
139
|
|
138
140
|
|
139
|
-
:param
|
141
|
+
:param str account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
140
142
|
:param str name: The name of the alert channel in New Relic.
|
141
143
|
"""
|
142
|
-
|
144
|
+
__args__ = dict()
|
145
|
+
__args__['accountId'] = account_id
|
146
|
+
__args__['name'] = name
|
147
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
148
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getAlertChannel:getAlertChannel', __args__, opts=opts, typ=GetAlertChannelResult)
|
149
|
+
return __ret__.apply(lambda __response__: GetAlertChannelResult(
|
150
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
151
|
+
config=pulumi.get(__response__, 'config'),
|
152
|
+
id=pulumi.get(__response__, 'id'),
|
153
|
+
name=pulumi.get(__response__, 'name'),
|
154
|
+
policy_ids=pulumi.get(__response__, 'policy_ids'),
|
155
|
+
type=pulumi.get(__response__, 'type')))
|
@@ -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__ = [
|
@@ -22,8 +27,8 @@ class GetAlertPolicyResult:
|
|
22
27
|
A collection of values returned by getAlertPolicy.
|
23
28
|
"""
|
24
29
|
def __init__(__self__, account_id=None, created_at=None, id=None, incident_preference=None, name=None, updated_at=None):
|
25
|
-
if account_id and not isinstance(account_id,
|
26
|
-
raise TypeError("Expected argument 'account_id' to be a
|
30
|
+
if account_id and not isinstance(account_id, str):
|
31
|
+
raise TypeError("Expected argument 'account_id' to be a str")
|
27
32
|
pulumi.set(__self__, "account_id", account_id)
|
28
33
|
if created_at and not isinstance(created_at, str):
|
29
34
|
raise TypeError("Expected argument 'created_at' to be a str")
|
@@ -43,7 +48,7 @@ class GetAlertPolicyResult:
|
|
43
48
|
|
44
49
|
@property
|
45
50
|
@pulumi.getter(name="accountId")
|
46
|
-
def account_id(self) ->
|
51
|
+
def account_id(self) -> str:
|
47
52
|
return pulumi.get(self, "account_id")
|
48
53
|
|
49
54
|
@property
|
@@ -67,6 +72,9 @@ class GetAlertPolicyResult:
|
|
67
72
|
def incident_preference(self) -> Optional[str]:
|
68
73
|
"""
|
69
74
|
The rollup strategy for the policy, which can have one of the following values:
|
75
|
+
* `PER_POLICY` - Represents the incident grouping preference **One issue per policy**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-policy) for more details on this incident grouping preference.
|
76
|
+
* `PER_CONDITION` - Represents the incident grouping preference **One issue per condition**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-condition) for more details on this incident grouping preference.
|
77
|
+
* `PER_CONDITION_AND_TARGET` - Represents the incident grouping preference **One issue per condition and signal**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-signal) for more details on this incident grouping preference.
|
70
78
|
"""
|
71
79
|
return pulumi.get(self, "incident_preference")
|
72
80
|
|
@@ -98,7 +106,7 @@ class AwaitableGetAlertPolicyResult(GetAlertPolicyResult):
|
|
98
106
|
updated_at=self.updated_at)
|
99
107
|
|
100
108
|
|
101
|
-
def get_alert_policy(account_id: Optional[
|
109
|
+
def get_alert_policy(account_id: Optional[str] = None,
|
102
110
|
incident_preference: Optional[str] = None,
|
103
111
|
name: Optional[str] = None,
|
104
112
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlertPolicyResult:
|
@@ -106,8 +114,11 @@ def get_alert_policy(account_id: Optional[int] = None,
|
|
106
114
|
Use this data source to get information about a specific alert policy in New Relic that already exists.
|
107
115
|
|
108
116
|
|
109
|
-
:param
|
117
|
+
:param str account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
110
118
|
:param str incident_preference: The rollup strategy for the policy, which can have one of the following values:
|
119
|
+
* `PER_POLICY` - Represents the incident grouping preference **One issue per policy**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-policy) for more details on this incident grouping preference.
|
120
|
+
* `PER_CONDITION` - Represents the incident grouping preference **One issue per condition**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-condition) for more details on this incident grouping preference.
|
121
|
+
* `PER_CONDITION_AND_TARGET` - Represents the incident grouping preference **One issue per condition and signal**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-signal) for more details on this incident grouping preference.
|
111
122
|
:param str name: The name of the alert policy in New Relic.
|
112
123
|
"""
|
113
124
|
__args__ = dict()
|
@@ -124,19 +135,31 @@ def get_alert_policy(account_id: Optional[int] = None,
|
|
124
135
|
incident_preference=pulumi.get(__ret__, 'incident_preference'),
|
125
136
|
name=pulumi.get(__ret__, 'name'),
|
126
137
|
updated_at=pulumi.get(__ret__, 'updated_at'))
|
127
|
-
|
128
|
-
|
129
|
-
@_utilities.lift_output_func(get_alert_policy)
|
130
|
-
def get_alert_policy_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
138
|
+
def get_alert_policy_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
|
131
139
|
incident_preference: Optional[pulumi.Input[Optional[str]]] = None,
|
132
140
|
name: Optional[pulumi.Input[str]] = None,
|
133
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAlertPolicyResult]:
|
141
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlertPolicyResult]:
|
134
142
|
"""
|
135
143
|
Use this data source to get information about a specific alert policy in New Relic that already exists.
|
136
144
|
|
137
145
|
|
138
|
-
:param
|
146
|
+
:param str account_id: The New Relic account ID to operate on. This allows you to override the `account_id` attribute set on the provider. Defaults to the environment variable `NEW_RELIC_ACCOUNT_ID`.
|
139
147
|
:param str incident_preference: The rollup strategy for the policy, which can have one of the following values:
|
148
|
+
* `PER_POLICY` - Represents the incident grouping preference **One issue per policy**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-policy) for more details on this incident grouping preference.
|
149
|
+
* `PER_CONDITION` - Represents the incident grouping preference **One issue per condition**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-condition) for more details on this incident grouping preference.
|
150
|
+
* `PER_CONDITION_AND_TARGET` - Represents the incident grouping preference **One issue per condition and signal**. Refer to [this page](https://docs.newrelic.com/docs/alerts-applied-intelligence/new-relic-alerts/alert-policies/specify-when-alerts-create-incidents/#preference-signal) for more details on this incident grouping preference.
|
140
151
|
:param str name: The name of the alert policy in New Relic.
|
141
152
|
"""
|
142
|
-
|
153
|
+
__args__ = dict()
|
154
|
+
__args__['accountId'] = account_id
|
155
|
+
__args__['incidentPreference'] = incident_preference
|
156
|
+
__args__['name'] = name
|
157
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
158
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getAlertPolicy:getAlertPolicy', __args__, opts=opts, typ=GetAlertPolicyResult)
|
159
|
+
return __ret__.apply(lambda __response__: GetAlertPolicyResult(
|
160
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
161
|
+
created_at=pulumi.get(__response__, 'created_at'),
|
162
|
+
id=pulumi.get(__response__, 'id'),
|
163
|
+
incident_preference=pulumi.get(__response__, 'incident_preference'),
|
164
|
+
name=pulumi.get(__response__, 'name'),
|
165
|
+
updated_at=pulumi.get(__response__, 'updated_at')))
|
@@ -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__ = [
|
@@ -37,7 +42,7 @@ class GetApplicationResult:
|
|
37
42
|
|
38
43
|
@property
|
39
44
|
@pulumi.getter(name="hostIds")
|
40
|
-
def host_ids(self) -> Sequence[
|
45
|
+
def host_ids(self) -> Sequence[str]:
|
41
46
|
"""
|
42
47
|
A list of host IDs associated with the application.
|
43
48
|
"""
|
@@ -53,7 +58,7 @@ class GetApplicationResult:
|
|
53
58
|
|
54
59
|
@property
|
55
60
|
@pulumi.getter(name="instanceIds")
|
56
|
-
def instance_ids(self) -> Sequence[
|
61
|
+
def instance_ids(self) -> Sequence[str]:
|
57
62
|
"""
|
58
63
|
A list of instance IDs associated with the application.
|
59
64
|
"""
|
@@ -91,20 +96,21 @@ def get_application(name: Optional[str] = None,
|
|
91
96
|
import pulumi_newrelic as newrelic
|
92
97
|
|
93
98
|
app = newrelic.get_application(name="my-app")
|
94
|
-
|
95
|
-
foo_alert_condition = newrelic.AlertCondition("
|
96
|
-
policy_id=
|
99
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
100
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
101
|
+
policy_id=foo.id,
|
102
|
+
name="foo",
|
97
103
|
type="apm_app_metric",
|
98
104
|
entities=[app.id],
|
99
105
|
metric="apdex",
|
100
106
|
runbook_url="https://www.example.com",
|
101
|
-
terms=[
|
102
|
-
duration
|
103
|
-
operator
|
104
|
-
priority
|
105
|
-
threshold
|
106
|
-
time_function
|
107
|
-
|
107
|
+
terms=[{
|
108
|
+
"duration": 5,
|
109
|
+
"operator": "below",
|
110
|
+
"priority": "critical",
|
111
|
+
"threshold": 0.75,
|
112
|
+
"time_function": "all",
|
113
|
+
}])
|
108
114
|
```
|
109
115
|
|
110
116
|
|
@@ -120,11 +126,8 @@ def get_application(name: Optional[str] = None,
|
|
120
126
|
id=pulumi.get(__ret__, 'id'),
|
121
127
|
instance_ids=pulumi.get(__ret__, 'instance_ids'),
|
122
128
|
name=pulumi.get(__ret__, 'name'))
|
123
|
-
|
124
|
-
|
125
|
-
@_utilities.lift_output_func(get_application)
|
126
129
|
def get_application_output(name: Optional[pulumi.Input[str]] = None,
|
127
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetApplicationResult]:
|
130
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetApplicationResult]:
|
128
131
|
"""
|
129
132
|
#### DEPRECATED! Use at your own risk. Use the `get_entity` data source instead. This feature may be removed in the next major release
|
130
133
|
|
@@ -137,23 +140,32 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
|
|
137
140
|
import pulumi_newrelic as newrelic
|
138
141
|
|
139
142
|
app = newrelic.get_application(name="my-app")
|
140
|
-
|
141
|
-
foo_alert_condition = newrelic.AlertCondition("
|
142
|
-
policy_id=
|
143
|
+
foo = newrelic.AlertPolicy("foo", name="foo")
|
144
|
+
foo_alert_condition = newrelic.AlertCondition("foo",
|
145
|
+
policy_id=foo.id,
|
146
|
+
name="foo",
|
143
147
|
type="apm_app_metric",
|
144
148
|
entities=[app.id],
|
145
149
|
metric="apdex",
|
146
150
|
runbook_url="https://www.example.com",
|
147
|
-
terms=[
|
148
|
-
duration
|
149
|
-
operator
|
150
|
-
priority
|
151
|
-
threshold
|
152
|
-
time_function
|
153
|
-
|
151
|
+
terms=[{
|
152
|
+
"duration": 5,
|
153
|
+
"operator": "below",
|
154
|
+
"priority": "critical",
|
155
|
+
"threshold": 0.75,
|
156
|
+
"time_function": "all",
|
157
|
+
}])
|
154
158
|
```
|
155
159
|
|
156
160
|
|
157
161
|
:param str name: The name of the application in New Relic.
|
158
162
|
"""
|
159
|
-
|
163
|
+
__args__ = dict()
|
164
|
+
__args__['name'] = name
|
165
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
166
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getApplication:getApplication', __args__, opts=opts, typ=GetApplicationResult)
|
167
|
+
return __ret__.apply(lambda __response__: GetApplicationResult(
|
168
|
+
host_ids=pulumi.get(__response__, 'host_ids'),
|
169
|
+
id=pulumi.get(__response__, 'id'),
|
170
|
+
instance_ids=pulumi.get(__response__, 'instance_ids'),
|
171
|
+
name=pulumi.get(__response__, 'name')))
|
@@ -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__ = [
|
@@ -64,8 +69,8 @@ def get_authentication_domain(name: Optional[str] = None,
|
|
64
69
|
import pulumi
|
65
70
|
import pulumi_newrelic as newrelic
|
66
71
|
|
67
|
-
|
68
|
-
pulumi.export("foo",
|
72
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
73
|
+
pulumi.export("foo", foo.id)
|
69
74
|
```
|
70
75
|
|
71
76
|
|
@@ -79,11 +84,8 @@ def get_authentication_domain(name: Optional[str] = None,
|
|
79
84
|
return AwaitableGetAuthenticationDomainResult(
|
80
85
|
id=pulumi.get(__ret__, 'id'),
|
81
86
|
name=pulumi.get(__ret__, 'name'))
|
82
|
-
|
83
|
-
|
84
|
-
@_utilities.lift_output_func(get_authentication_domain)
|
85
87
|
def get_authentication_domain_output(name: Optional[pulumi.Input[str]] = None,
|
86
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAuthenticationDomainResult]:
|
88
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAuthenticationDomainResult]:
|
87
89
|
"""
|
88
90
|
Use this data source to fetch the ID of an authentication domain belonging to your account, matching the specified name.
|
89
91
|
|
@@ -93,11 +95,17 @@ def get_authentication_domain_output(name: Optional[pulumi.Input[str]] = None,
|
|
93
95
|
import pulumi
|
94
96
|
import pulumi_newrelic as newrelic
|
95
97
|
|
96
|
-
|
97
|
-
pulumi.export("foo",
|
98
|
+
foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
|
99
|
+
pulumi.export("foo", foo.id)
|
98
100
|
```
|
99
101
|
|
100
102
|
|
101
103
|
: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.
|
102
104
|
"""
|
103
|
-
|
105
|
+
__args__ = dict()
|
106
|
+
__args__['name'] = name
|
107
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
108
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getAuthenticationDomain:getAuthenticationDomain', __args__, opts=opts, typ=GetAuthenticationDomainResult)
|
109
|
+
return __ret__.apply(lambda __response__: GetAuthenticationDomainResult(
|
110
|
+
id=pulumi.get(__response__, 'id'),
|
111
|
+
name=pulumi.get(__response__, 'name')))
|
@@ -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__ = [
|
@@ -22,8 +27,8 @@ class GetCloudAccountResult:
|
|
22
27
|
A collection of values returned by getCloudAccount.
|
23
28
|
"""
|
24
29
|
def __init__(__self__, account_id=None, cloud_provider=None, id=None, name=None):
|
25
|
-
if account_id and not isinstance(account_id,
|
26
|
-
raise TypeError("Expected argument 'account_id' to be a
|
30
|
+
if account_id and not isinstance(account_id, str):
|
31
|
+
raise TypeError("Expected argument 'account_id' to be a str")
|
27
32
|
pulumi.set(__self__, "account_id", account_id)
|
28
33
|
if cloud_provider and not isinstance(cloud_provider, str):
|
29
34
|
raise TypeError("Expected argument 'cloud_provider' to be a str")
|
@@ -37,7 +42,7 @@ class GetCloudAccountResult:
|
|
37
42
|
|
38
43
|
@property
|
39
44
|
@pulumi.getter(name="accountId")
|
40
|
-
def account_id(self) -> Optional[
|
45
|
+
def account_id(self) -> Optional[str]:
|
41
46
|
return pulumi.get(self, "account_id")
|
42
47
|
|
43
48
|
@property
|
@@ -71,7 +76,7 @@ class AwaitableGetCloudAccountResult(GetCloudAccountResult):
|
|
71
76
|
name=self.name)
|
72
77
|
|
73
78
|
|
74
|
-
def get_cloud_account(account_id: Optional[
|
79
|
+
def get_cloud_account(account_id: Optional[str] = None,
|
75
80
|
cloud_provider: Optional[str] = None,
|
76
81
|
name: Optional[str] = None,
|
77
82
|
opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetCloudAccountResult:
|
@@ -85,13 +90,13 @@ def get_cloud_account(account_id: Optional[int] = None,
|
|
85
90
|
import pulumi
|
86
91
|
import pulumi_newrelic as newrelic
|
87
92
|
|
88
|
-
account = newrelic.get_cloud_account(account_id=12345,
|
93
|
+
account = newrelic.get_cloud_account(account_id="12345",
|
89
94
|
cloud_provider="aws",
|
90
95
|
name="my aws account")
|
91
96
|
```
|
92
97
|
|
93
98
|
|
94
|
-
:param
|
99
|
+
:param str account_id: The account ID in New Relic.
|
95
100
|
:param str cloud_provider: The cloud provider of the account (aws, gcp, azure, etc)
|
96
101
|
:param str name: The cloud account name in New Relic.
|
97
102
|
"""
|
@@ -107,13 +112,10 @@ def get_cloud_account(account_id: Optional[int] = None,
|
|
107
112
|
cloud_provider=pulumi.get(__ret__, 'cloud_provider'),
|
108
113
|
id=pulumi.get(__ret__, 'id'),
|
109
114
|
name=pulumi.get(__ret__, 'name'))
|
110
|
-
|
111
|
-
|
112
|
-
@_utilities.lift_output_func(get_cloud_account)
|
113
|
-
def get_cloud_account_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
|
115
|
+
def get_cloud_account_output(account_id: Optional[pulumi.Input[Optional[str]]] = None,
|
114
116
|
cloud_provider: Optional[pulumi.Input[str]] = None,
|
115
117
|
name: Optional[pulumi.Input[str]] = None,
|
116
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetCloudAccountResult]:
|
118
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetCloudAccountResult]:
|
117
119
|
"""
|
118
120
|
Use this data source to get information about a specific cloud account linked to New Relic.
|
119
121
|
Accounts can be located by a combination of New Relic Account ID, name and cloud provider (aws, gcp, azure, etc). Name and cloud provider are required attributes. If no account_id is specified on the resource the provider level account_id will be used.
|
@@ -124,14 +126,24 @@ def get_cloud_account_output(account_id: Optional[pulumi.Input[Optional[int]]] =
|
|
124
126
|
import pulumi
|
125
127
|
import pulumi_newrelic as newrelic
|
126
128
|
|
127
|
-
account = newrelic.get_cloud_account(account_id=12345,
|
129
|
+
account = newrelic.get_cloud_account(account_id="12345",
|
128
130
|
cloud_provider="aws",
|
129
131
|
name="my aws account")
|
130
132
|
```
|
131
133
|
|
132
134
|
|
133
|
-
:param
|
135
|
+
:param str account_id: The account ID in New Relic.
|
134
136
|
:param str cloud_provider: The cloud provider of the account (aws, gcp, azure, etc)
|
135
137
|
:param str name: The cloud account name in New Relic.
|
136
138
|
"""
|
137
|
-
|
139
|
+
__args__ = dict()
|
140
|
+
__args__['accountId'] = account_id
|
141
|
+
__args__['cloudProvider'] = cloud_provider
|
142
|
+
__args__['name'] = name
|
143
|
+
opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
144
|
+
__ret__ = pulumi.runtime.invoke_output('newrelic:index/getCloudAccount:getCloudAccount', __args__, opts=opts, typ=GetCloudAccountResult)
|
145
|
+
return __ret__.apply(lambda __response__: GetCloudAccountResult(
|
146
|
+
account_id=pulumi.get(__response__, 'account_id'),
|
147
|
+
cloud_provider=pulumi.get(__response__, 'cloud_provider'),
|
148
|
+
id=pulumi.get(__response__, 'id'),
|
149
|
+
name=pulumi.get(__response__, 'name')))
|