pulumi-newrelic 5.22.0__py3-none-any.whl → 5.58.0a1763707205__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of pulumi-newrelic might be problematic. Click here for more details.

Files changed (92) hide show
  1. pulumi_newrelic/__init__.py +28 -1
  2. pulumi_newrelic/_inputs.py +10385 -2976
  3. pulumi_newrelic/_utilities.py +50 -10
  4. pulumi_newrelic/account_management.py +48 -42
  5. pulumi_newrelic/alert_channel.py +165 -175
  6. pulumi_newrelic/alert_condition.py +307 -319
  7. pulumi_newrelic/alert_muting_rule.py +193 -140
  8. pulumi_newrelic/alert_policy.py +121 -117
  9. pulumi_newrelic/alert_policy_channel.py +89 -79
  10. pulumi_newrelic/api_access_key.py +195 -193
  11. pulumi_newrelic/browser_application.py +120 -114
  12. pulumi_newrelic/cloud/__init__.py +3 -1
  13. pulumi_newrelic/cloud/_inputs.py +4267 -2714
  14. pulumi_newrelic/cloud/aws_govcloud_integrations.py +206 -196
  15. pulumi_newrelic/cloud/aws_govcloud_link_account.py +143 -228
  16. pulumi_newrelic/cloud/aws_integrations.py +510 -1490
  17. pulumi_newrelic/cloud/aws_link_account.py +80 -76
  18. pulumi_newrelic/cloud/azure_integrations.py +673 -587
  19. pulumi_newrelic/cloud/azure_link_account.py +121 -117
  20. pulumi_newrelic/cloud/gcp_integrations.py +428 -408
  21. pulumi_newrelic/cloud/gcp_link_account.py +65 -61
  22. pulumi_newrelic/cloud/oci_link_account.py +926 -0
  23. pulumi_newrelic/cloud/outputs.py +1678 -2321
  24. pulumi_newrelic/config/__init__.py +2 -1
  25. pulumi_newrelic/config/__init__.pyi +8 -3
  26. pulumi_newrelic/config/vars.py +22 -17
  27. pulumi_newrelic/data_partition_rule.py +119 -117
  28. pulumi_newrelic/entity_tags.py +111 -53
  29. pulumi_newrelic/events_to_metrics_rule.py +106 -102
  30. pulumi_newrelic/get_account.py +41 -33
  31. pulumi_newrelic/get_alert_channel.py +73 -28
  32. pulumi_newrelic/get_alert_policy.py +82 -33
  33. pulumi_newrelic/get_application.py +51 -43
  34. pulumi_newrelic/get_authentication_domain.py +27 -23
  35. pulumi_newrelic/get_cloud_account.py +43 -35
  36. pulumi_newrelic/get_entity.py +126 -183
  37. pulumi_newrelic/get_group.py +76 -31
  38. pulumi_newrelic/get_key_transaction.py +117 -42
  39. pulumi_newrelic/get_notification_destination.py +75 -38
  40. pulumi_newrelic/get_obfuscation_expression.py +47 -39
  41. pulumi_newrelic/get_service_level_alert_helper.py +189 -171
  42. pulumi_newrelic/get_test_grok_pattern.py +47 -36
  43. pulumi_newrelic/get_user.py +39 -31
  44. pulumi_newrelic/group.py +59 -199
  45. pulumi_newrelic/infra_alert_condition.py +399 -405
  46. pulumi_newrelic/insights/__init__.py +2 -1
  47. pulumi_newrelic/insights/_inputs.py +71 -28
  48. pulumi_newrelic/insights/event.py +54 -52
  49. pulumi_newrelic/insights/outputs.py +28 -23
  50. pulumi_newrelic/key_transaction.py +465 -0
  51. pulumi_newrelic/log_parsing_rule.py +159 -157
  52. pulumi_newrelic/monitor_downtime.py +311 -331
  53. pulumi_newrelic/notification_channel.py +534 -464
  54. pulumi_newrelic/notification_destination.py +238 -141
  55. pulumi_newrelic/nrql_alert_condition.py +820 -614
  56. pulumi_newrelic/nrql_drop_rule.py +113 -151
  57. pulumi_newrelic/obfuscation_expression.py +80 -76
  58. pulumi_newrelic/obfuscation_rule.py +115 -109
  59. pulumi_newrelic/one_dashboard.py +110 -104
  60. pulumi_newrelic/one_dashboard_json.py +69 -63
  61. pulumi_newrelic/one_dashboard_raw.py +212 -206
  62. pulumi_newrelic/outputs.py +4936 -2234
  63. pulumi_newrelic/pipeline_cloud_rule.py +335 -0
  64. pulumi_newrelic/plugins/__init__.py +2 -1
  65. pulumi_newrelic/plugins/_inputs.py +519 -89
  66. pulumi_newrelic/plugins/application_settings.py +463 -187
  67. pulumi_newrelic/plugins/outputs.py +336 -74
  68. pulumi_newrelic/plugins/workload.py +313 -189
  69. pulumi_newrelic/provider.py +156 -142
  70. pulumi_newrelic/pulumi-plugin.json +2 -1
  71. pulumi_newrelic/service_level.py +263 -263
  72. pulumi_newrelic/synthetics/__init__.py +2 -1
  73. pulumi_newrelic/synthetics/_inputs.py +265 -108
  74. pulumi_newrelic/synthetics/alert_condition.py +170 -180
  75. pulumi_newrelic/synthetics/broken_links_monitor.py +297 -249
  76. pulumi_newrelic/synthetics/cert_check_monitor.py +306 -258
  77. pulumi_newrelic/synthetics/get_private_location.py +51 -47
  78. pulumi_newrelic/synthetics/get_secure_credential.py +39 -31
  79. pulumi_newrelic/synthetics/monitor.py +658 -460
  80. pulumi_newrelic/synthetics/multi_location_alert_condition.py +211 -205
  81. pulumi_newrelic/synthetics/outputs.py +92 -87
  82. pulumi_newrelic/synthetics/private_location.py +118 -112
  83. pulumi_newrelic/synthetics/script_monitor.py +613 -373
  84. pulumi_newrelic/synthetics/secure_credential.py +97 -95
  85. pulumi_newrelic/synthetics/step_monitor.py +445 -275
  86. pulumi_newrelic/user.py +84 -80
  87. pulumi_newrelic/workflow.py +336 -322
  88. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +7 -6
  89. pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
  90. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
  91. pulumi_newrelic-5.22.0.dist-info/RECORD +0 -89
  92. {pulumi_newrelic-5.22.0.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  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, int):
27
- raise TypeError("Expected argument 'account_id' to be a int")
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")
@@ -42,12 +47,12 @@ class GetAlertChannelResult:
42
47
  raise TypeError("Expected argument 'type' to be a str")
43
48
  pulumi.set(__self__, "type", type)
44
49
 
45
- @property
50
+ @_builtins.property
46
51
  @pulumi.getter(name="accountId")
47
- def account_id(self) -> int:
52
+ def account_id(self) -> _builtins.str:
48
53
  return pulumi.get(self, "account_id")
49
54
 
50
- @property
55
+ @_builtins.property
51
56
  @pulumi.getter
52
57
  def config(self) -> 'outputs.GetAlertChannelConfigResult':
53
58
  """
@@ -55,30 +60,30 @@ class GetAlertChannelResult:
55
60
  """
56
61
  return pulumi.get(self, "config")
57
62
 
58
- @property
63
+ @_builtins.property
59
64
  @pulumi.getter
60
- def id(self) -> str:
65
+ def id(self) -> _builtins.str:
61
66
  """
62
67
  The provider-assigned unique ID for this managed resource.
63
68
  """
64
69
  return pulumi.get(self, "id")
65
70
 
66
- @property
71
+ @_builtins.property
67
72
  @pulumi.getter
68
- def name(self) -> str:
73
+ def name(self) -> _builtins.str:
69
74
  return pulumi.get(self, "name")
70
75
 
71
- @property
76
+ @_builtins.property
72
77
  @pulumi.getter(name="policyIds")
73
- def policy_ids(self) -> Sequence[int]:
78
+ def policy_ids(self) -> Sequence[_builtins.str]:
74
79
  """
75
80
  A list of policy IDs associated with the alert channel.
76
81
  """
77
82
  return pulumi.get(self, "policy_ids")
78
83
 
79
- @property
84
+ @_builtins.property
80
85
  @pulumi.getter
81
- def type(self) -> str:
86
+ def type(self) -> _builtins.str:
82
87
  """
83
88
  Alert channel type, either: `email`, `opsgenie`, `pagerduty`, `slack`, `victorops`, or `webhook`.
84
89
  """
@@ -99,17 +104,33 @@ class AwaitableGetAlertChannelResult(GetAlertChannelResult):
99
104
  type=self.type)
100
105
 
101
106
 
102
- def get_alert_channel(account_id: Optional[int] = None,
103
- name: Optional[str] = None,
107
+ def get_alert_channel(account_id: Optional[_builtins.str] = None,
108
+ name: Optional[_builtins.str] = None,
104
109
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlertChannelResult:
105
110
  """
106
111
  Use this data source to get information about a specific alert channel in New Relic that already exists.
107
112
 
108
113
  > **WARNING:** The `AlertChannel` data source is deprecated and will be removed in the next major release.
109
114
 
115
+ ## Example Usage
110
116
 
111
- :param int 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
- :param str name: The name of the alert channel in New Relic.
117
+ ```python
118
+ import pulumi
119
+ import pulumi_newrelic as newrelic
120
+
121
+ # Data source
122
+ foo = newrelic.get_alert_channel(name="foo@example.com")
123
+ # Resource
124
+ foo_alert_policy = newrelic.AlertPolicy("foo", name="foo")
125
+ # Using the data source and resource together
126
+ foo_alert_policy_channel = newrelic.AlertPolicyChannel("foo",
127
+ policy_id=foo_alert_policy.id,
128
+ channel_id=foo.id)
129
+ ```
130
+
131
+
132
+ :param _builtins.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`.
133
+ :param _builtins.str name: The name of the alert channel in New Relic.
113
134
  """
114
135
  __args__ = dict()
115
136
  __args__['accountId'] = account_id
@@ -124,19 +145,43 @@ def get_alert_channel(account_id: Optional[int] = None,
124
145
  name=pulumi.get(__ret__, 'name'),
125
146
  policy_ids=pulumi.get(__ret__, 'policy_ids'),
126
147
  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,
131
- name: Optional[pulumi.Input[str]] = None,
132
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAlertChannelResult]:
148
+ def get_alert_channel_output(account_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
149
+ name: Optional[pulumi.Input[_builtins.str]] = None,
150
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlertChannelResult]:
133
151
  """
134
152
  Use this data source to get information about a specific alert channel in New Relic that already exists.
135
153
 
136
154
  > **WARNING:** The `AlertChannel` data source is deprecated and will be removed in the next major release.
137
155
 
156
+ ## Example Usage
157
+
158
+ ```python
159
+ import pulumi
160
+ import pulumi_newrelic as newrelic
138
161
 
139
- :param int 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
- :param str name: The name of the alert channel in New Relic.
162
+ # Data source
163
+ foo = newrelic.get_alert_channel(name="foo@example.com")
164
+ # Resource
165
+ foo_alert_policy = newrelic.AlertPolicy("foo", name="foo")
166
+ # Using the data source and resource together
167
+ foo_alert_policy_channel = newrelic.AlertPolicyChannel("foo",
168
+ policy_id=foo_alert_policy.id,
169
+ channel_id=foo.id)
170
+ ```
171
+
172
+
173
+ :param _builtins.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`.
174
+ :param _builtins.str name: The name of the alert channel in New Relic.
141
175
  """
142
- ...
176
+ __args__ = dict()
177
+ __args__['accountId'] = account_id
178
+ __args__['name'] = name
179
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
180
+ __ret__ = pulumi.runtime.invoke_output('newrelic:index/getAlertChannel:getAlertChannel', __args__, opts=opts, typ=GetAlertChannelResult)
181
+ return __ret__.apply(lambda __response__: GetAlertChannelResult(
182
+ account_id=pulumi.get(__response__, 'account_id'),
183
+ config=pulumi.get(__response__, 'config'),
184
+ id=pulumi.get(__response__, 'id'),
185
+ name=pulumi.get(__response__, 'name'),
186
+ policy_ids=pulumi.get(__response__, 'policy_ids'),
187
+ type=pulumi.get(__response__, 'type')))
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = [
@@ -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, int):
26
- raise TypeError("Expected argument 'account_id' to be a int")
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")
@@ -41,43 +46,46 @@ class GetAlertPolicyResult:
41
46
  raise TypeError("Expected argument 'updated_at' to be a str")
42
47
  pulumi.set(__self__, "updated_at", updated_at)
43
48
 
44
- @property
49
+ @_builtins.property
45
50
  @pulumi.getter(name="accountId")
46
- def account_id(self) -> int:
51
+ def account_id(self) -> _builtins.str:
47
52
  return pulumi.get(self, "account_id")
48
53
 
49
- @property
54
+ @_builtins.property
50
55
  @pulumi.getter(name="createdAt")
51
- def created_at(self) -> str:
56
+ def created_at(self) -> _builtins.str:
52
57
  """
53
58
  The time the policy was created.
54
59
  """
55
60
  return pulumi.get(self, "created_at")
56
61
 
57
- @property
62
+ @_builtins.property
58
63
  @pulumi.getter
59
- def id(self) -> str:
64
+ def id(self) -> _builtins.str:
60
65
  """
61
66
  The provider-assigned unique ID for this managed resource.
62
67
  """
63
68
  return pulumi.get(self, "id")
64
69
 
65
- @property
70
+ @_builtins.property
66
71
  @pulumi.getter(name="incidentPreference")
67
- def incident_preference(self) -> Optional[str]:
72
+ def incident_preference(self) -> Optional[_builtins.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
 
73
- @property
81
+ @_builtins.property
74
82
  @pulumi.getter
75
- def name(self) -> str:
83
+ def name(self) -> _builtins.str:
76
84
  return pulumi.get(self, "name")
77
85
 
78
- @property
86
+ @_builtins.property
79
87
  @pulumi.getter(name="updatedAt")
80
- def updated_at(self) -> str:
88
+ def updated_at(self) -> _builtins.str:
81
89
  """
82
90
  The time the policy was last updated.
83
91
  """
@@ -98,17 +106,33 @@ class AwaitableGetAlertPolicyResult(GetAlertPolicyResult):
98
106
  updated_at=self.updated_at)
99
107
 
100
108
 
101
- def get_alert_policy(account_id: Optional[int] = None,
102
- incident_preference: Optional[str] = None,
103
- name: Optional[str] = None,
109
+ def get_alert_policy(account_id: Optional[_builtins.str] = None,
110
+ incident_preference: Optional[_builtins.str] = None,
111
+ name: Optional[_builtins.str] = None,
104
112
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlertPolicyResult:
105
113
  """
106
114
  Use this data source to get information about a specific alert policy in New Relic that already exists.
107
115
 
116
+ ## Example Usage
108
117
 
109
- :param int 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
- :param str incident_preference: The rollup strategy for the policy, which can have one of the following values:
111
- :param str name: The name of the alert policy in New Relic.
118
+ ```python
119
+ import pulumi
120
+ import pulumi_newrelic as newrelic
121
+
122
+ foo = newrelic.get_alert_channel(name="foo@example.com")
123
+ foo_get_alert_policy = newrelic.get_alert_policy(name="foo policy")
124
+ foo_alert_policy_channel = newrelic.AlertPolicyChannel("foo",
125
+ policy_id=foo_get_alert_policy.id,
126
+ channel_id=foo.id)
127
+ ```
128
+
129
+
130
+ :param _builtins.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`.
131
+ :param _builtins.str incident_preference: The rollup strategy for the policy, which can have one of the following values:
132
+ * `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.
133
+ * `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.
134
+ * `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.
135
+ :param _builtins.str name: The name of the alert policy in New Relic.
112
136
  """
113
137
  __args__ = dict()
114
138
  __args__['accountId'] = account_id
@@ -124,19 +148,44 @@ def get_alert_policy(account_id: Optional[int] = None,
124
148
  incident_preference=pulumi.get(__ret__, 'incident_preference'),
125
149
  name=pulumi.get(__ret__, 'name'),
126
150
  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,
131
- incident_preference: Optional[pulumi.Input[Optional[str]]] = None,
132
- name: Optional[pulumi.Input[str]] = None,
133
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAlertPolicyResult]:
151
+ def get_alert_policy_output(account_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
152
+ incident_preference: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
153
+ name: Optional[pulumi.Input[_builtins.str]] = None,
154
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlertPolicyResult]:
134
155
  """
135
156
  Use this data source to get information about a specific alert policy in New Relic that already exists.
136
157
 
158
+ ## Example Usage
159
+
160
+ ```python
161
+ import pulumi
162
+ import pulumi_newrelic as newrelic
137
163
 
138
- :param int 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
- :param str incident_preference: The rollup strategy for the policy, which can have one of the following values:
140
- :param str name: The name of the alert policy in New Relic.
164
+ foo = newrelic.get_alert_channel(name="foo@example.com")
165
+ foo_get_alert_policy = newrelic.get_alert_policy(name="foo policy")
166
+ foo_alert_policy_channel = newrelic.AlertPolicyChannel("foo",
167
+ policy_id=foo_get_alert_policy.id,
168
+ channel_id=foo.id)
169
+ ```
170
+
171
+
172
+ :param _builtins.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`.
173
+ :param _builtins.str incident_preference: The rollup strategy for the policy, which can have one of the following values:
174
+ * `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.
175
+ * `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.
176
+ * `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.
177
+ :param _builtins.str name: The name of the alert policy in New Relic.
141
178
  """
142
- ...
179
+ __args__ = dict()
180
+ __args__['accountId'] = account_id
181
+ __args__['incidentPreference'] = incident_preference
182
+ __args__['name'] = name
183
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
184
+ __ret__ = pulumi.runtime.invoke_output('newrelic:index/getAlertPolicy:getAlertPolicy', __args__, opts=opts, typ=GetAlertPolicyResult)
185
+ return __ret__.apply(lambda __response__: GetAlertPolicyResult(
186
+ account_id=pulumi.get(__response__, 'account_id'),
187
+ created_at=pulumi.get(__response__, 'created_at'),
188
+ id=pulumi.get(__response__, 'id'),
189
+ incident_preference=pulumi.get(__response__, 'incident_preference'),
190
+ name=pulumi.get(__response__, 'name'),
191
+ updated_at=pulumi.get(__response__, 'updated_at')))
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = [
@@ -35,33 +40,33 @@ class GetApplicationResult:
35
40
  raise TypeError("Expected argument 'name' to be a str")
36
41
  pulumi.set(__self__, "name", name)
37
42
 
38
- @property
43
+ @_builtins.property
39
44
  @pulumi.getter(name="hostIds")
40
- def host_ids(self) -> Sequence[int]:
45
+ def host_ids(self) -> Sequence[_builtins.str]:
41
46
  """
42
47
  A list of host IDs associated with the application.
43
48
  """
44
49
  return pulumi.get(self, "host_ids")
45
50
 
46
- @property
51
+ @_builtins.property
47
52
  @pulumi.getter
48
- def id(self) -> str:
53
+ def id(self) -> _builtins.str:
49
54
  """
50
55
  The provider-assigned unique ID for this managed resource.
51
56
  """
52
57
  return pulumi.get(self, "id")
53
58
 
54
- @property
59
+ @_builtins.property
55
60
  @pulumi.getter(name="instanceIds")
56
- def instance_ids(self) -> Sequence[int]:
61
+ def instance_ids(self) -> Sequence[_builtins.str]:
57
62
  """
58
63
  A list of instance IDs associated with the application.
59
64
  """
60
65
  return pulumi.get(self, "instance_ids")
61
66
 
62
- @property
67
+ @_builtins.property
63
68
  @pulumi.getter
64
- def name(self) -> str:
69
+ def name(self) -> _builtins.str:
65
70
  return pulumi.get(self, "name")
66
71
 
67
72
 
@@ -77,7 +82,7 @@ class AwaitableGetApplicationResult(GetApplicationResult):
77
82
  name=self.name)
78
83
 
79
84
 
80
- def get_application(name: Optional[str] = None,
85
+ def get_application(name: Optional[_builtins.str] = None,
81
86
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetApplicationResult:
82
87
  """
83
88
  #### DEPRECATED! Use at your own risk. Use the `get_entity` data source instead. This feature may be removed in the next major release
@@ -86,31 +91,30 @@ def get_application(name: Optional[str] = None,
86
91
 
87
92
  ## Example Usage
88
93
 
89
- <!--Start PulumiCodeChooser -->
90
94
  ```python
91
95
  import pulumi
92
96
  import pulumi_newrelic as newrelic
93
97
 
94
98
  app = newrelic.get_application(name="my-app")
95
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
96
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
97
- policy_id=foo_alert_policy.id,
99
+ foo = newrelic.AlertPolicy("foo", name="foo")
100
+ foo_alert_condition = newrelic.AlertCondition("foo",
101
+ policy_id=foo.id,
102
+ name="foo",
98
103
  type="apm_app_metric",
99
104
  entities=[app.id],
100
105
  metric="apdex",
101
106
  runbook_url="https://www.example.com",
102
- terms=[newrelic.AlertConditionTermArgs(
103
- duration=5,
104
- operator="below",
105
- priority="critical",
106
- threshold=0.75,
107
- time_function="all",
108
- )])
107
+ terms=[{
108
+ "duration": 5,
109
+ "operator": "below",
110
+ "priority": "critical",
111
+ "threshold": 0.75,
112
+ "time_function": "all",
113
+ }])
109
114
  ```
110
- <!--End PulumiCodeChooser -->
111
115
 
112
116
 
113
- :param str name: The name of the application in New Relic.
117
+ :param _builtins.str name: The name of the application in New Relic.
114
118
  """
115
119
  __args__ = dict()
116
120
  __args__['name'] = name
@@ -122,11 +126,8 @@ def get_application(name: Optional[str] = None,
122
126
  id=pulumi.get(__ret__, 'id'),
123
127
  instance_ids=pulumi.get(__ret__, 'instance_ids'),
124
128
  name=pulumi.get(__ret__, 'name'))
125
-
126
-
127
- @_utilities.lift_output_func(get_application)
128
- def get_application_output(name: Optional[pulumi.Input[str]] = None,
129
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetApplicationResult]:
129
+ def get_application_output(name: Optional[pulumi.Input[_builtins.str]] = None,
130
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetApplicationResult]:
130
131
  """
131
132
  #### DEPRECATED! Use at your own risk. Use the `get_entity` data source instead. This feature may be removed in the next major release
132
133
 
@@ -134,30 +135,37 @@ def get_application_output(name: Optional[pulumi.Input[str]] = None,
134
135
 
135
136
  ## Example Usage
136
137
 
137
- <!--Start PulumiCodeChooser -->
138
138
  ```python
139
139
  import pulumi
140
140
  import pulumi_newrelic as newrelic
141
141
 
142
142
  app = newrelic.get_application(name="my-app")
143
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
144
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
145
- policy_id=foo_alert_policy.id,
143
+ foo = newrelic.AlertPolicy("foo", name="foo")
144
+ foo_alert_condition = newrelic.AlertCondition("foo",
145
+ policy_id=foo.id,
146
+ name="foo",
146
147
  type="apm_app_metric",
147
148
  entities=[app.id],
148
149
  metric="apdex",
149
150
  runbook_url="https://www.example.com",
150
- terms=[newrelic.AlertConditionTermArgs(
151
- duration=5,
152
- operator="below",
153
- priority="critical",
154
- threshold=0.75,
155
- time_function="all",
156
- )])
151
+ terms=[{
152
+ "duration": 5,
153
+ "operator": "below",
154
+ "priority": "critical",
155
+ "threshold": 0.75,
156
+ "time_function": "all",
157
+ }])
157
158
  ```
158
- <!--End PulumiCodeChooser -->
159
159
 
160
160
 
161
- :param str name: The name of the application in New Relic.
161
+ :param _builtins.str name: The name of the application in New Relic.
162
162
  """
163
- ...
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')))
@@ -1,12 +1,17 @@
1
1
  # coding=utf-8
2
- # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
- import copy
5
+ import builtins as _builtins
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = [
@@ -29,17 +34,17 @@ class GetAuthenticationDomainResult:
29
34
  raise TypeError("Expected argument 'name' to be a str")
30
35
  pulumi.set(__self__, "name", name)
31
36
 
32
- @property
37
+ @_builtins.property
33
38
  @pulumi.getter
34
- def id(self) -> str:
39
+ def id(self) -> _builtins.str:
35
40
  """
36
41
  The ID of the matching authentication domain fetched.
37
42
  """
38
43
  return pulumi.get(self, "id")
39
44
 
40
- @property
45
+ @_builtins.property
41
46
  @pulumi.getter
42
- def name(self) -> str:
47
+ def name(self) -> _builtins.str:
43
48
  return pulumi.get(self, "name")
44
49
 
45
50
 
@@ -53,25 +58,23 @@ class AwaitableGetAuthenticationDomainResult(GetAuthenticationDomainResult):
53
58
  name=self.name)
54
59
 
55
60
 
56
- def get_authentication_domain(name: Optional[str] = None,
61
+ def get_authentication_domain(name: Optional[_builtins.str] = None,
57
62
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAuthenticationDomainResult:
58
63
  """
59
64
  Use this data source to fetch the ID of an authentication domain belonging to your account, matching the specified name.
60
65
 
61
66
  ## Example Usage
62
67
 
63
- <!--Start PulumiCodeChooser -->
64
68
  ```python
65
69
  import pulumi
66
70
  import pulumi_newrelic as newrelic
67
71
 
68
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
69
- pulumi.export("foo", foo_authentication_domain.id)
72
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
73
+ pulumi.export("foo", foo.id)
70
74
  ```
71
- <!--End PulumiCodeChooser -->
72
75
 
73
76
 
74
- :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.
77
+ :param _builtins.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.
75
78
  """
76
79
  __args__ = dict()
77
80
  __args__['name'] = name
@@ -81,27 +84,28 @@ def get_authentication_domain(name: Optional[str] = None,
81
84
  return AwaitableGetAuthenticationDomainResult(
82
85
  id=pulumi.get(__ret__, 'id'),
83
86
  name=pulumi.get(__ret__, 'name'))
84
-
85
-
86
- @_utilities.lift_output_func(get_authentication_domain)
87
- def get_authentication_domain_output(name: Optional[pulumi.Input[str]] = None,
88
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetAuthenticationDomainResult]:
87
+ def get_authentication_domain_output(name: Optional[pulumi.Input[_builtins.str]] = None,
88
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAuthenticationDomainResult]:
89
89
  """
90
90
  Use this data source to fetch the ID of an authentication domain belonging to your account, matching the specified name.
91
91
 
92
92
  ## Example Usage
93
93
 
94
- <!--Start PulumiCodeChooser -->
95
94
  ```python
96
95
  import pulumi
97
96
  import pulumi_newrelic as newrelic
98
97
 
99
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
100
- pulumi.export("foo", foo_authentication_domain.id)
98
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
99
+ pulumi.export("foo", foo.id)
101
100
  ```
102
- <!--End PulumiCodeChooser -->
103
101
 
104
102
 
105
- :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.
103
+ :param _builtins.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.
106
104
  """
107
- ...
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')))