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
 
12
17
  __all__ = [
@@ -35,27 +40,27 @@ class GetGroupResult:
35
40
  raise TypeError("Expected argument 'user_ids' to be a list")
36
41
  pulumi.set(__self__, "user_ids", user_ids)
37
42
 
38
- @property
43
+ @_builtins.property
39
44
  @pulumi.getter(name="authenticationDomainId")
40
- def authentication_domain_id(self) -> str:
45
+ def authentication_domain_id(self) -> _builtins.str:
41
46
  return pulumi.get(self, "authentication_domain_id")
42
47
 
43
- @property
48
+ @_builtins.property
44
49
  @pulumi.getter
45
- def id(self) -> str:
50
+ def id(self) -> _builtins.str:
46
51
  """
47
52
  The ID of the fetched matching group.
48
53
  """
49
54
  return pulumi.get(self, "id")
50
55
 
51
- @property
56
+ @_builtins.property
52
57
  @pulumi.getter
53
- def name(self) -> str:
58
+ def name(self) -> _builtins.str:
54
59
  return pulumi.get(self, "name")
55
60
 
56
- @property
61
+ @_builtins.property
57
62
  @pulumi.getter(name="userIds")
58
- def user_ids(self) -> Sequence[str]:
63
+ def user_ids(self) -> Sequence[_builtins.str]:
59
64
  """
60
65
  IDs of users who belong to the group. In the absence of any users in the group, the value of this attribute would be an empty list.
61
66
  """
@@ -74,8 +79,8 @@ class AwaitableGetGroupResult(GetGroupResult):
74
79
  user_ids=self.user_ids)
75
80
 
76
81
 
77
- def get_group(authentication_domain_id: Optional[str] = None,
78
- name: Optional[str] = None,
82
+ def get_group(authentication_domain_id: Optional[_builtins.str] = None,
83
+ name: Optional[_builtins.str] = None,
79
84
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGroupResult:
80
85
  """
81
86
  The `Group` data source helps search for a group by its name and retrieve the ID of the matching group and other associated attributes.
@@ -84,20 +89,37 @@ def get_group(authentication_domain_id: Optional[str] = None,
84
89
 
85
90
  The below example illustrates fetching the ID of a group (and IDs of users who belong to the group, if any) using the required arguments.
86
91
 
87
- <!--Start PulumiCodeChooser -->
88
92
  ```python
89
93
  import pulumi
90
94
  import pulumi_newrelic as newrelic
91
95
 
92
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
93
- foo_group = newrelic.get_group(authentication_domain_id=foo_authentication_domain.id,
96
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
97
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
94
98
  name="Test Group")
95
99
  ```
96
- <!--End PulumiCodeChooser -->
97
100
 
101
+ ## Additional Examples
98
102
 
99
- :param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
100
- :param str name: The name of the group to search for.
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 = len(foo_get_group.user_ids).apply(lambda length: std.join(separator=", ",
117
+ input=foo_get_group.user_ids).result if length > 0 else "")
118
+ ```
119
+
120
+
121
+ :param _builtins.str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
122
+ :param _builtins.str name: The name of the group to search for.
101
123
 
102
124
  > **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.
103
125
  """
@@ -112,12 +134,9 @@ def get_group(authentication_domain_id: Optional[str] = None,
112
134
  id=pulumi.get(__ret__, 'id'),
113
135
  name=pulumi.get(__ret__, 'name'),
114
136
  user_ids=pulumi.get(__ret__, 'user_ids'))
115
-
116
-
117
- @_utilities.lift_output_func(get_group)
118
- def get_group_output(authentication_domain_id: Optional[pulumi.Input[str]] = None,
119
- name: Optional[pulumi.Input[str]] = None,
120
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetGroupResult]:
137
+ def get_group_output(authentication_domain_id: Optional[pulumi.Input[_builtins.str]] = None,
138
+ name: Optional[pulumi.Input[_builtins.str]] = None,
139
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetGroupResult]:
121
140
  """
122
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.
123
142
 
@@ -125,21 +144,47 @@ def get_group_output(authentication_domain_id: Optional[pulumi.Input[str]] = Non
125
144
 
126
145
  The below example illustrates fetching the ID of a group (and IDs of users who belong to the group, if any) using the required arguments.
127
146
 
128
- <!--Start PulumiCodeChooser -->
129
147
  ```python
130
148
  import pulumi
131
149
  import pulumi_newrelic as newrelic
132
150
 
133
- foo_authentication_domain = newrelic.get_authentication_domain(name="Test Authentication Domain")
134
- foo_group = newrelic.get_group(authentication_domain_id=foo_authentication_domain.id,
151
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
152
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
135
153
  name="Test Group")
136
154
  ```
137
- <!--End PulumiCodeChooser -->
138
155
 
156
+ ## Additional Examples
157
+
158
+ The following example demonstrates utilizing attributes exported by this data source.
139
159
 
140
- :param str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
141
- :param str name: The name of the group to search for.
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 = len(foo_get_group.user_ids).apply(lambda length: std.join(separator=", ",
172
+ input=foo_get_group.user_ids).result if length > 0 else "")
173
+ ```
174
+
175
+
176
+ :param _builtins.str authentication_domain_id: The ID of the authentication domain the group to be searched for belongs to.
177
+ :param _builtins.str name: The name of the group to search for.
142
178
 
143
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.
144
180
  """
145
- ...
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')))
@@ -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__ = [
@@ -21,27 +26,68 @@ 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)
31
48
 
32
- @property
49
+ @_builtins.property
50
+ @pulumi.getter(name="accountId")
51
+ def account_id(self) -> _builtins.str:
52
+ return pulumi.get(self, "account_id")
53
+
54
+ @_builtins.property
55
+ @pulumi.getter
56
+ def domain(self) -> _builtins.str:
57
+ """
58
+ Domain of the key transaction in New Relic.
59
+ """
60
+ return pulumi.get(self, "domain")
61
+
62
+ @_builtins.property
63
+ @pulumi.getter
64
+ def guid(self) -> _builtins.str:
65
+ """
66
+ GUID of the key transaction in New Relic.
67
+ """
68
+ return pulumi.get(self, "guid")
69
+
70
+ @_builtins.property
33
71
  @pulumi.getter
34
- def id(self) -> str:
72
+ def id(self) -> _builtins.str:
35
73
  """
36
74
  The provider-assigned unique ID for this managed resource.
37
75
  """
38
76
  return pulumi.get(self, "id")
39
77
 
40
- @property
78
+ @_builtins.property
41
79
  @pulumi.getter
42
- def name(self) -> str:
80
+ def name(self) -> _builtins.str:
43
81
  return pulumi.get(self, "name")
44
82
 
83
+ @_builtins.property
84
+ @pulumi.getter
85
+ def type(self) -> _builtins.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,85 +95,114 @@ 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(name: Optional[str] = None,
106
+ def get_key_transaction(account_id: Optional[_builtins.str] = None,
107
+ guid: Optional[_builtins.str] = None,
108
+ name: Optional[_builtins.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.
60
112
 
61
113
  ## Example Usage
62
114
 
63
- <!--Start PulumiCodeChooser -->
64
115
  ```python
65
116
  import pulumi
66
117
  import pulumi_newrelic as newrelic
67
118
 
68
119
  txn = newrelic.get_key_transaction(name="txn")
69
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
70
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
71
- policy_id=foo_alert_policy.id,
120
+ foo = newrelic.AlertPolicy("foo", name="foo")
121
+ foo_alert_condition = newrelic.AlertCondition("foo",
122
+ policy_id=foo.id,
123
+ name="foo",
72
124
  type="apm_kt_metric",
73
125
  entities=[txn.id],
74
126
  metric="error_percentage",
75
127
  runbook_url="https://www.example.com",
76
- terms=[newrelic.AlertConditionTermArgs(
77
- duration=5,
78
- operator="below",
79
- priority="critical",
80
- threshold=0.75,
81
- time_function="all",
82
- )])
128
+ terms=[{
129
+ "duration": 5,
130
+ "operator": "below",
131
+ "priority": "critical",
132
+ "threshold": 0.75,
133
+ "time_function": "all",
134
+ }])
83
135
  ```
84
- <!--End PulumiCodeChooser -->
85
136
 
86
137
 
87
- :param str name: The name of the key transaction in New Relic.
138
+ :param _builtins.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 _builtins.str guid: GUID of the key transaction in New Relic.
142
+ :param _builtins.str name: The name of the key transaction in New Relic.
88
143
  """
89
144
  __args__ = dict()
145
+ __args__['accountId'] = account_id
146
+ __args__['guid'] = guid
90
147
  __args__['name'] = name
91
148
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
92
149
  __ret__ = pulumi.runtime.invoke('newrelic:index/getKeyTransaction:getKeyTransaction', __args__, opts=opts, typ=GetKeyTransactionResult).value
93
150
 
94
151
  return AwaitableGetKeyTransactionResult(
152
+ account_id=pulumi.get(__ret__, 'account_id'),
153
+ domain=pulumi.get(__ret__, 'domain'),
154
+ guid=pulumi.get(__ret__, 'guid'),
95
155
  id=pulumi.get(__ret__, 'id'),
96
- name=pulumi.get(__ret__, 'name'))
97
-
98
-
99
- @_utilities.lift_output_func(get_key_transaction)
100
- def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
101
- 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[_builtins.str]]] = None,
159
+ guid: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
160
+ name: Optional[pulumi.Input[_builtins.str]] = None,
161
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetKeyTransactionResult]:
102
162
  """
103
163
  Use this data source to get information about a specific key transaction in New Relic that already exists.
104
164
 
105
165
  ## Example Usage
106
166
 
107
- <!--Start PulumiCodeChooser -->
108
167
  ```python
109
168
  import pulumi
110
169
  import pulumi_newrelic as newrelic
111
170
 
112
171
  txn = newrelic.get_key_transaction(name="txn")
113
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
114
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
115
- policy_id=foo_alert_policy.id,
172
+ foo = newrelic.AlertPolicy("foo", name="foo")
173
+ foo_alert_condition = newrelic.AlertCondition("foo",
174
+ policy_id=foo.id,
175
+ name="foo",
116
176
  type="apm_kt_metric",
117
177
  entities=[txn.id],
118
178
  metric="error_percentage",
119
179
  runbook_url="https://www.example.com",
120
- terms=[newrelic.AlertConditionTermArgs(
121
- duration=5,
122
- operator="below",
123
- priority="critical",
124
- threshold=0.75,
125
- time_function="all",
126
- )])
180
+ terms=[{
181
+ "duration": 5,
182
+ "operator": "below",
183
+ "priority": "critical",
184
+ "threshold": 0.75,
185
+ "time_function": "all",
186
+ }])
127
187
  ```
128
- <!--End PulumiCodeChooser -->
129
188
 
130
189
 
131
- :param str name: The name of the key transaction in New Relic.
190
+ :param _builtins.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 _builtins.str guid: GUID of the key transaction in New Relic.
194
+ :param _builtins.str name: The name of the key transaction in New Relic.
132
195
  """
133
- ...
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')))
@@ -1,14 +1,20 @@
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
17
+ from ._inputs import *
12
18
 
13
19
  __all__ = [
14
20
  'GetNotificationDestinationResult',
@@ -22,9 +28,9 @@ class GetNotificationDestinationResult:
22
28
  """
23
29
  A collection of values returned by getNotificationDestination.
24
30
  """
25
- def __init__(__self__, account_id=None, active=None, guid=None, id=None, name=None, properties=None, status=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
+ def __init__(__self__, account_id=None, active=None, guid=None, id=None, name=None, properties=None, secure_urls=None, status=None, type=None):
32
+ if account_id and not isinstance(account_id, str):
33
+ raise TypeError("Expected argument 'account_id' to be a str")
28
34
  pulumi.set(__self__, "account_id", account_id)
29
35
  if active and not isinstance(active, bool):
30
36
  raise TypeError("Expected argument 'active' to be a bool")
@@ -41,6 +47,9 @@ class GetNotificationDestinationResult:
41
47
  if properties and not isinstance(properties, list):
42
48
  raise TypeError("Expected argument 'properties' to be a list")
43
49
  pulumi.set(__self__, "properties", properties)
50
+ if secure_urls and not isinstance(secure_urls, list):
51
+ raise TypeError("Expected argument 'secure_urls' to be a list")
52
+ pulumi.set(__self__, "secure_urls", secure_urls)
44
53
  if status and not isinstance(status, str):
45
54
  raise TypeError("Expected argument 'status' to be a str")
46
55
  pulumi.set(__self__, "status", status)
@@ -48,41 +57,41 @@ class GetNotificationDestinationResult:
48
57
  raise TypeError("Expected argument 'type' to be a str")
49
58
  pulumi.set(__self__, "type", type)
50
59
 
51
- @property
60
+ @_builtins.property
52
61
  @pulumi.getter(name="accountId")
53
- def account_id(self) -> int:
62
+ def account_id(self) -> _builtins.str:
54
63
  return pulumi.get(self, "account_id")
55
64
 
56
- @property
65
+ @_builtins.property
57
66
  @pulumi.getter
58
- def active(self) -> bool:
67
+ def active(self) -> _builtins.bool:
59
68
  """
60
69
  An indication whether the notification destination is active or not.
61
70
  """
62
71
  return pulumi.get(self, "active")
63
72
 
64
- @property
73
+ @_builtins.property
65
74
  @pulumi.getter
66
- def guid(self) -> str:
75
+ def guid(self) -> _builtins.str:
67
76
  """
68
77
  The unique entity identifier of the destination in New Relic.
69
78
  """
70
79
  return pulumi.get(self, "guid")
71
80
 
72
- @property
81
+ @_builtins.property
73
82
  @pulumi.getter
74
- def id(self) -> Optional[str]:
83
+ def id(self) -> Optional[_builtins.str]:
75
84
  return pulumi.get(self, "id")
76
85
 
77
- @property
86
+ @_builtins.property
78
87
  @pulumi.getter
79
- def name(self) -> Optional[str]:
88
+ def name(self) -> Optional[_builtins.str]:
80
89
  """
81
90
  The name of the notification destination.
82
91
  """
83
92
  return pulumi.get(self, "name")
84
93
 
85
- @property
94
+ @_builtins.property
86
95
  @pulumi.getter
87
96
  def properties(self) -> Sequence['outputs.GetNotificationDestinationPropertyResult']:
88
97
  """
@@ -90,19 +99,27 @@ class GetNotificationDestinationResult:
90
99
  """
91
100
  return pulumi.get(self, "properties")
92
101
 
93
- @property
102
+ @_builtins.property
103
+ @pulumi.getter(name="secureUrls")
104
+ def secure_urls(self) -> Sequence['outputs.GetNotificationDestinationSecureUrlResult']:
105
+ """
106
+ The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
107
+ """
108
+ return pulumi.get(self, "secure_urls")
109
+
110
+ @_builtins.property
94
111
  @pulumi.getter
95
- def status(self) -> str:
112
+ def status(self) -> _builtins.str:
96
113
  """
97
114
  The status of the notification destination.
98
115
  """
99
116
  return pulumi.get(self, "status")
100
117
 
101
- @property
118
+ @_builtins.property
102
119
  @pulumi.getter
103
- def type(self) -> str:
120
+ def type(self) -> _builtins.str:
104
121
  """
105
- The notification destination type, either: `EMAIL`, `SERVICE_NOW`, `WEBHOOK`, `JIRA`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`, `SLACK` and `SLACK_COLLABORATION`.
122
+ The notification destination type, either: `EMAIL`, `SERVICE_NOW`, `SERVICE_NOW_APP`, `WEBHOOK`, `JIRA`, `MOBILE_PUSH`, `EVENT_BRIDGE`, `PAGERDUTY_ACCOUNT_INTEGRATION` or `PAGERDUTY_SERVICE_INTEGRATION`, `SLACK`, `SLACK_COLLABORATION`, `MICROSOFT_TEAMS` and `WORKFLOW_AUTOMATION`.
106
123
  """
107
124
  return pulumi.get(self, "type")
108
125
 
@@ -119,27 +136,31 @@ class AwaitableGetNotificationDestinationResult(GetNotificationDestinationResult
119
136
  id=self.id,
120
137
  name=self.name,
121
138
  properties=self.properties,
139
+ secure_urls=self.secure_urls,
122
140
  status=self.status,
123
141
  type=self.type)
124
142
 
125
143
 
126
- def get_notification_destination(account_id: Optional[int] = None,
127
- id: Optional[str] = None,
128
- name: Optional[str] = None,
144
+ def get_notification_destination(account_id: Optional[_builtins.str] = None,
145
+ id: Optional[_builtins.str] = None,
146
+ name: Optional[_builtins.str] = None,
147
+ secure_urls: Optional[Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']]] = None,
129
148
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNotificationDestinationResult:
130
149
  """
131
150
  Use this data source to access information about an existing resource.
132
151
 
133
- :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`.
134
- :param str id: The id of the notification destination in New Relic.
135
- :param str name: The name of the notification destination.
152
+ :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`.
153
+ :param _builtins.str id: The id of the notification destination in New Relic.
154
+ :param _builtins.str name: The name of the notification destination.
136
155
 
137
156
  Optional:
157
+ :param Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']] secure_urls: The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
138
158
  """
139
159
  __args__ = dict()
140
160
  __args__['accountId'] = account_id
141
161
  __args__['id'] = id
142
162
  __args__['name'] = name
163
+ __args__['secureUrls'] = secure_urls
143
164
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
144
165
  __ret__ = pulumi.runtime.invoke('newrelic:index/getNotificationDestination:getNotificationDestination', __args__, opts=opts, typ=GetNotificationDestinationResult).value
145
166
 
@@ -150,22 +171,38 @@ def get_notification_destination(account_id: Optional[int] = None,
150
171
  id=pulumi.get(__ret__, 'id'),
151
172
  name=pulumi.get(__ret__, 'name'),
152
173
  properties=pulumi.get(__ret__, 'properties'),
174
+ secure_urls=pulumi.get(__ret__, 'secure_urls'),
153
175
  status=pulumi.get(__ret__, 'status'),
154
176
  type=pulumi.get(__ret__, 'type'))
155
-
156
-
157
- @_utilities.lift_output_func(get_notification_destination)
158
- def get_notification_destination_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
159
- id: Optional[pulumi.Input[Optional[str]]] = None,
160
- name: Optional[pulumi.Input[Optional[str]]] = None,
161
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNotificationDestinationResult]:
177
+ def get_notification_destination_output(account_id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
178
+ id: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
179
+ name: Optional[pulumi.Input[Optional[_builtins.str]]] = None,
180
+ secure_urls: Optional[pulumi.Input[Optional[Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']]]]] = None,
181
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNotificationDestinationResult]:
162
182
  """
163
183
  Use this data source to access information about an existing resource.
164
184
 
165
- :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`.
166
- :param str id: The id of the notification destination in New Relic.
167
- :param str name: The name of the notification destination.
185
+ :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`.
186
+ :param _builtins.str id: The id of the notification destination in New Relic.
187
+ :param _builtins.str name: The name of the notification destination.
168
188
 
169
189
  Optional:
190
+ :param Sequence[Union['GetNotificationDestinationSecureUrlArgs', 'GetNotificationDestinationSecureUrlArgsDict']] secure_urls: The URL in secure format, showing only the `prefix`, as the `secure_suffix` is a secret.
170
191
  """
171
- ...
192
+ __args__ = dict()
193
+ __args__['accountId'] = account_id
194
+ __args__['id'] = id
195
+ __args__['name'] = name
196
+ __args__['secureUrls'] = secure_urls
197
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
198
+ __ret__ = pulumi.runtime.invoke_output('newrelic:index/getNotificationDestination:getNotificationDestination', __args__, opts=opts, typ=GetNotificationDestinationResult)
199
+ return __ret__.apply(lambda __response__: GetNotificationDestinationResult(
200
+ account_id=pulumi.get(__response__, 'account_id'),
201
+ active=pulumi.get(__response__, 'active'),
202
+ guid=pulumi.get(__response__, 'guid'),
203
+ id=pulumi.get(__response__, 'id'),
204
+ name=pulumi.get(__response__, 'name'),
205
+ properties=pulumi.get(__response__, 'properties'),
206
+ secure_urls=pulumi.get(__response__, 'secure_urls'),
207
+ status=pulumi.get(__response__, 'status'),
208
+ type=pulumi.get(__response__, 'type')))