pulumi-newrelic 5.16.0a1698964311__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 +58 -1
  2. pulumi_newrelic/_inputs.py +10772 -2775
  3. pulumi_newrelic/_utilities.py +92 -11
  4. pulumi_newrelic/account_management.py +56 -42
  5. pulumi_newrelic/alert_channel.py +177 -151
  6. pulumi_newrelic/alert_condition.py +313 -301
  7. pulumi_newrelic/alert_muting_rule.py +195 -138
  8. pulumi_newrelic/alert_policy.py +157 -109
  9. pulumi_newrelic/alert_policy_channel.py +95 -81
  10. pulumi_newrelic/api_access_key.py +191 -209
  11. pulumi_newrelic/browser_application.py +161 -153
  12. pulumi_newrelic/cloud/__init__.py +3 -1
  13. pulumi_newrelic/cloud/_inputs.py +4267 -2710
  14. pulumi_newrelic/cloud/aws_govcloud_integrations.py +238 -200
  15. pulumi_newrelic/cloud/aws_govcloud_link_account.py +159 -212
  16. pulumi_newrelic/cloud/aws_integrations.py +518 -1490
  17. pulumi_newrelic/cloud/aws_link_account.py +88 -76
  18. pulumi_newrelic/cloud/azure_integrations.py +681 -587
  19. pulumi_newrelic/cloud/azure_link_account.py +129 -117
  20. pulumi_newrelic/cloud/gcp_integrations.py +436 -408
  21. pulumi_newrelic/cloud/gcp_link_account.py +71 -59
  22. pulumi_newrelic/cloud/oci_link_account.py +926 -0
  23. pulumi_newrelic/cloud/outputs.py +1678 -2317
  24. pulumi_newrelic/config/__init__.py +2 -1
  25. pulumi_newrelic/config/__init__.pyi +45 -0
  26. pulumi_newrelic/config/vars.py +22 -17
  27. pulumi_newrelic/data_partition_rule.py +129 -117
  28. pulumi_newrelic/entity_tags.py +153 -31
  29. pulumi_newrelic/events_to_metrics_rule.py +114 -102
  30. pulumi_newrelic/get_account.py +41 -29
  31. pulumi_newrelic/get_alert_channel.py +73 -28
  32. pulumi_newrelic/get_alert_policy.py +83 -34
  33. pulumi_newrelic/get_application.py +51 -39
  34. pulumi_newrelic/get_authentication_domain.py +111 -0
  35. pulumi_newrelic/get_cloud_account.py +43 -31
  36. pulumi_newrelic/get_entity.py +126 -121
  37. pulumi_newrelic/get_group.py +190 -0
  38. pulumi_newrelic/get_key_transaction.py +117 -38
  39. pulumi_newrelic/get_notification_destination.py +86 -36
  40. pulumi_newrelic/get_obfuscation_expression.py +47 -35
  41. pulumi_newrelic/get_service_level_alert_helper.py +237 -137
  42. pulumi_newrelic/get_test_grok_pattern.py +47 -32
  43. pulumi_newrelic/get_user.py +165 -0
  44. pulumi_newrelic/group.py +286 -0
  45. pulumi_newrelic/infra_alert_condition.py +400 -382
  46. pulumi_newrelic/insights/__init__.py +2 -1
  47. pulumi_newrelic/insights/_inputs.py +94 -23
  48. pulumi_newrelic/insights/event.py +56 -48
  49. pulumi_newrelic/insights/outputs.py +51 -18
  50. pulumi_newrelic/key_transaction.py +465 -0
  51. pulumi_newrelic/log_parsing_rule.py +169 -153
  52. pulumi_newrelic/monitor_downtime.py +914 -0
  53. pulumi_newrelic/notification_channel.py +560 -418
  54. pulumi_newrelic/notification_destination.py +379 -124
  55. pulumi_newrelic/nrql_alert_condition.py +945 -513
  56. pulumi_newrelic/nrql_drop_rule.py +121 -129
  57. pulumi_newrelic/obfuscation_expression.py +88 -76
  58. pulumi_newrelic/obfuscation_rule.py +123 -109
  59. pulumi_newrelic/one_dashboard.py +118 -108
  60. pulumi_newrelic/one_dashboard_json.py +77 -67
  61. pulumi_newrelic/one_dashboard_raw.py +214 -202
  62. pulumi_newrelic/outputs.py +5491 -2141
  63. pulumi_newrelic/pipeline_cloud_rule.py +335 -0
  64. pulumi_newrelic/plugins/__init__.py +2 -1
  65. pulumi_newrelic/plugins/_inputs.py +520 -90
  66. pulumi_newrelic/plugins/application_settings.py +463 -167
  67. pulumi_newrelic/plugins/outputs.py +337 -75
  68. pulumi_newrelic/plugins/workload.py +387 -151
  69. pulumi_newrelic/provider.py +156 -142
  70. pulumi_newrelic/pulumi-plugin.json +2 -1
  71. pulumi_newrelic/service_level.py +277 -255
  72. pulumi_newrelic/synthetics/__init__.py +2 -1
  73. pulumi_newrelic/synthetics/_inputs.py +275 -106
  74. pulumi_newrelic/synthetics/alert_condition.py +174 -160
  75. pulumi_newrelic/synthetics/broken_links_monitor.py +367 -207
  76. pulumi_newrelic/synthetics/cert_check_monitor.py +380 -218
  77. pulumi_newrelic/synthetics/get_private_location.py +51 -39
  78. pulumi_newrelic/synthetics/get_secure_credential.py +39 -27
  79. pulumi_newrelic/synthetics/monitor.py +668 -462
  80. pulumi_newrelic/synthetics/multi_location_alert_condition.py +219 -201
  81. pulumi_newrelic/synthetics/outputs.py +102 -85
  82. pulumi_newrelic/synthetics/private_location.py +120 -110
  83. pulumi_newrelic/synthetics/script_monitor.py +623 -375
  84. pulumi_newrelic/synthetics/secure_credential.py +99 -93
  85. pulumi_newrelic/synthetics/step_monitor.py +545 -201
  86. pulumi_newrelic/user.py +366 -0
  87. pulumi_newrelic/workflow.py +348 -312
  88. {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/METADATA +8 -7
  89. pulumi_newrelic-5.58.0a1763707205.dist-info/RECORD +92 -0
  90. {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/WHEEL +1 -1
  91. pulumi_newrelic-5.16.0a1698964311.dist-info/RECORD +0 -82
  92. {pulumi_newrelic-5.16.0a1698964311.dist-info → pulumi_newrelic-5.58.0a1763707205.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,190 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by pulumi-language-python. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins as _builtins
6
+ import warnings
7
+ import sys
8
+ import pulumi
9
+ import pulumi.runtime
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
15
+ from . import _utilities
16
+
17
+ __all__ = [
18
+ 'GetGroupResult',
19
+ 'AwaitableGetGroupResult',
20
+ 'get_group',
21
+ 'get_group_output',
22
+ ]
23
+
24
+ @pulumi.output_type
25
+ class GetGroupResult:
26
+ """
27
+ A collection of values returned by getGroup.
28
+ """
29
+ def __init__(__self__, authentication_domain_id=None, id=None, name=None, user_ids=None):
30
+ if authentication_domain_id and not isinstance(authentication_domain_id, str):
31
+ raise TypeError("Expected argument 'authentication_domain_id' to be a str")
32
+ pulumi.set(__self__, "authentication_domain_id", authentication_domain_id)
33
+ if id and not isinstance(id, str):
34
+ raise TypeError("Expected argument 'id' to be a str")
35
+ pulumi.set(__self__, "id", id)
36
+ if name and not isinstance(name, str):
37
+ raise TypeError("Expected argument 'name' to be a str")
38
+ pulumi.set(__self__, "name", name)
39
+ if user_ids and not isinstance(user_ids, list):
40
+ raise TypeError("Expected argument 'user_ids' to be a list")
41
+ pulumi.set(__self__, "user_ids", user_ids)
42
+
43
+ @_builtins.property
44
+ @pulumi.getter(name="authenticationDomainId")
45
+ def authentication_domain_id(self) -> _builtins.str:
46
+ return pulumi.get(self, "authentication_domain_id")
47
+
48
+ @_builtins.property
49
+ @pulumi.getter
50
+ def id(self) -> _builtins.str:
51
+ """
52
+ The ID of the fetched matching group.
53
+ """
54
+ return pulumi.get(self, "id")
55
+
56
+ @_builtins.property
57
+ @pulumi.getter
58
+ def name(self) -> _builtins.str:
59
+ return pulumi.get(self, "name")
60
+
61
+ @_builtins.property
62
+ @pulumi.getter(name="userIds")
63
+ def user_ids(self) -> Sequence[_builtins.str]:
64
+ """
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.
66
+ """
67
+ return pulumi.get(self, "user_ids")
68
+
69
+
70
+ class AwaitableGetGroupResult(GetGroupResult):
71
+ # pylint: disable=using-constant-test
72
+ def __await__(self):
73
+ if False:
74
+ yield self
75
+ return GetGroupResult(
76
+ authentication_domain_id=self.authentication_domain_id,
77
+ id=self.id,
78
+ name=self.name,
79
+ user_ids=self.user_ids)
80
+
81
+
82
+ def get_group(authentication_domain_id: Optional[_builtins.str] = None,
83
+ name: Optional[_builtins.str] = None,
84
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetGroupResult:
85
+ """
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.
87
+
88
+ ## Example Usage
89
+
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.
91
+
92
+ ```python
93
+ import pulumi
94
+ import pulumi_newrelic as newrelic
95
+
96
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
97
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
98
+ name="Test Group")
99
+ ```
100
+
101
+ ## Additional Examples
102
+
103
+ The following example demonstrates utilizing attributes exported by this data source.
104
+
105
+ In order to directly reference the attributes `id` and `user_ids` from this data source, you can use the syntax `data.newrelic_group.foo.id` and `data.newrelic_group.foo.user_ids`, respectively. However, if you need to assign these values to local variables and perform further processing (such as conditionally formatting the `user_ids` attribute as shown in the example below), consider using the provided configuration. These variables can then be accessed elsewhere using the syntax `local.id` and `local.user_id`, respectively.
106
+
107
+ ```python
108
+ import pulumi
109
+ import pulumi_newrelic as newrelic
110
+ import pulumi_std as std
111
+
112
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
113
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
114
+ name="Test Group")
115
+ id = foo_get_group.id
116
+ user_ids = 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.
123
+
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.
125
+ """
126
+ __args__ = dict()
127
+ __args__['authenticationDomainId'] = authentication_domain_id
128
+ __args__['name'] = name
129
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
130
+ __ret__ = pulumi.runtime.invoke('newrelic:index/getGroup:getGroup', __args__, opts=opts, typ=GetGroupResult).value
131
+
132
+ return AwaitableGetGroupResult(
133
+ authentication_domain_id=pulumi.get(__ret__, 'authentication_domain_id'),
134
+ id=pulumi.get(__ret__, 'id'),
135
+ name=pulumi.get(__ret__, 'name'),
136
+ user_ids=pulumi.get(__ret__, 'user_ids'))
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]:
140
+ """
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.
142
+
143
+ ## Example Usage
144
+
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.
146
+
147
+ ```python
148
+ import pulumi
149
+ import pulumi_newrelic as newrelic
150
+
151
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
152
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
153
+ name="Test Group")
154
+ ```
155
+
156
+ ## Additional Examples
157
+
158
+ The following example demonstrates utilizing attributes exported by this data source.
159
+
160
+ In order to directly reference the attributes `id` and `user_ids` from this data source, you can use the syntax `data.newrelic_group.foo.id` and `data.newrelic_group.foo.user_ids`, respectively. However, if you need to assign these values to local variables and perform further processing (such as conditionally formatting the `user_ids` attribute as shown in the example below), consider using the provided configuration. These variables can then be accessed elsewhere using the syntax `local.id` and `local.user_id`, respectively.
161
+
162
+ ```python
163
+ import pulumi
164
+ import pulumi_newrelic as newrelic
165
+ import pulumi_std as std
166
+
167
+ foo = newrelic.get_authentication_domain(name="Test Authentication Domain")
168
+ foo_get_group = newrelic.get_group(authentication_domain_id=foo.id,
169
+ name="Test Group")
170
+ id = foo_get_group.id
171
+ user_ids = 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.
178
+
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.
180
+ """
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,11 +95,17 @@ class AwaitableGetKeyTransactionResult(GetKeyTransactionResult):
49
95
  if False:
50
96
  yield self
51
97
  return GetKeyTransactionResult(
98
+ account_id=self.account_id,
99
+ domain=self.domain,
100
+ guid=self.guid,
52
101
  id=self.id,
53
- name=self.name)
102
+ name=self.name,
103
+ type=self.type)
54
104
 
55
105
 
56
- def get_key_transaction(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.
@@ -65,38 +117,48 @@ def get_key_transaction(name: Optional[str] = None,
65
117
  import pulumi_newrelic as newrelic
66
118
 
67
119
  txn = newrelic.get_key_transaction(name="txn")
68
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
69
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
70
- 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",
71
124
  type="apm_kt_metric",
72
125
  entities=[txn.id],
73
126
  metric="error_percentage",
74
127
  runbook_url="https://www.example.com",
75
- terms=[newrelic.AlertConditionTermArgs(
76
- duration=5,
77
- operator="below",
78
- priority="critical",
79
- threshold=0.75,
80
- time_function="all",
81
- )])
128
+ terms=[{
129
+ "duration": 5,
130
+ "operator": "below",
131
+ "priority": "critical",
132
+ "threshold": 0.75,
133
+ "time_function": "all",
134
+ }])
82
135
  ```
83
136
 
84
137
 
85
- :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.
86
143
  """
87
144
  __args__ = dict()
145
+ __args__['accountId'] = account_id
146
+ __args__['guid'] = guid
88
147
  __args__['name'] = name
89
148
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
90
149
  __ret__ = pulumi.runtime.invoke('newrelic:index/getKeyTransaction:getKeyTransaction', __args__, opts=opts, typ=GetKeyTransactionResult).value
91
150
 
92
151
  return AwaitableGetKeyTransactionResult(
152
+ account_id=pulumi.get(__ret__, 'account_id'),
153
+ domain=pulumi.get(__ret__, 'domain'),
154
+ guid=pulumi.get(__ret__, 'guid'),
93
155
  id=pulumi.get(__ret__, 'id'),
94
- name=pulumi.get(__ret__, 'name'))
95
-
96
-
97
- @_utilities.lift_output_func(get_key_transaction)
98
- def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
99
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetKeyTransactionResult]:
156
+ name=pulumi.get(__ret__, 'name'),
157
+ type=pulumi.get(__ret__, 'type'))
158
+ def get_key_transaction_output(account_id: Optional[pulumi.Input[Optional[_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]:
100
162
  """
101
163
  Use this data source to get information about a specific key transaction in New Relic that already exists.
102
164
 
@@ -107,23 +169,40 @@ def get_key_transaction_output(name: Optional[pulumi.Input[str]] = None,
107
169
  import pulumi_newrelic as newrelic
108
170
 
109
171
  txn = newrelic.get_key_transaction(name="txn")
110
- foo_alert_policy = newrelic.AlertPolicy("fooAlertPolicy")
111
- foo_alert_condition = newrelic.AlertCondition("fooAlertCondition",
112
- 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",
113
176
  type="apm_kt_metric",
114
177
  entities=[txn.id],
115
178
  metric="error_percentage",
116
179
  runbook_url="https://www.example.com",
117
- terms=[newrelic.AlertConditionTermArgs(
118
- duration=5,
119
- operator="below",
120
- priority="critical",
121
- threshold=0.75,
122
- time_function="all",
123
- )])
180
+ terms=[{
181
+ "duration": 5,
182
+ "operator": "below",
183
+ "priority": "critical",
184
+ "threshold": 0.75,
185
+ "time_function": "all",
186
+ }])
124
187
  ```
125
188
 
126
189
 
127
- :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.
128
195
  """
129
- ...
196
+ __args__ = dict()
197
+ __args__['accountId'] = account_id
198
+ __args__['guid'] = guid
199
+ __args__['name'] = name
200
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
201
+ __ret__ = pulumi.runtime.invoke_output('newrelic:index/getKeyTransaction:getKeyTransaction', __args__, opts=opts, typ=GetKeyTransactionResult)
202
+ return __ret__.apply(lambda __response__: GetKeyTransactionResult(
203
+ account_id=pulumi.get(__response__, 'account_id'),
204
+ domain=pulumi.get(__response__, 'domain'),
205
+ guid=pulumi.get(__response__, 'guid'),
206
+ id=pulumi.get(__response__, 'id'),
207
+ name=pulumi.get(__response__, 'name'),
208
+ type=pulumi.get(__response__, 'type')))
@@ -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,13 +28,16 @@ class GetNotificationDestinationResult:
22
28
  """
23
29
  A collection of values returned by getNotificationDestination.
24
30
  """
25
- def __init__(__self__, account_id=None, active=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")
31
37
  pulumi.set(__self__, "active", active)
38
+ if guid and not isinstance(guid, str):
39
+ raise TypeError("Expected argument 'guid' to be a str")
40
+ pulumi.set(__self__, "guid", guid)
32
41
  if id and not isinstance(id, str):
33
42
  raise TypeError("Expected argument 'id' to be a str")
34
43
  pulumi.set(__self__, "id", id)
@@ -38,6 +47,9 @@ class GetNotificationDestinationResult:
38
47
  if properties and not isinstance(properties, list):
39
48
  raise TypeError("Expected argument 'properties' to be a list")
40
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)
41
53
  if status and not isinstance(status, str):
42
54
  raise TypeError("Expected argument 'status' to be a str")
43
55
  pulumi.set(__self__, "status", status)
@@ -45,33 +57,41 @@ class GetNotificationDestinationResult:
45
57
  raise TypeError("Expected argument 'type' to be a str")
46
58
  pulumi.set(__self__, "type", type)
47
59
 
48
- @property
60
+ @_builtins.property
49
61
  @pulumi.getter(name="accountId")
50
- def account_id(self) -> int:
62
+ def account_id(self) -> _builtins.str:
51
63
  return pulumi.get(self, "account_id")
52
64
 
53
- @property
65
+ @_builtins.property
54
66
  @pulumi.getter
55
- def active(self) -> bool:
67
+ def active(self) -> _builtins.bool:
56
68
  """
57
69
  An indication whether the notification destination is active or not.
58
70
  """
59
71
  return pulumi.get(self, "active")
60
72
 
61
- @property
73
+ @_builtins.property
62
74
  @pulumi.getter
63
- def id(self) -> Optional[str]:
75
+ def guid(self) -> _builtins.str:
76
+ """
77
+ The unique entity identifier of the destination in New Relic.
78
+ """
79
+ return pulumi.get(self, "guid")
80
+
81
+ @_builtins.property
82
+ @pulumi.getter
83
+ def id(self) -> Optional[_builtins.str]:
64
84
  return pulumi.get(self, "id")
65
85
 
66
- @property
86
+ @_builtins.property
67
87
  @pulumi.getter
68
- def name(self) -> Optional[str]:
88
+ def name(self) -> Optional[_builtins.str]:
69
89
  """
70
90
  The name of the notification destination.
71
91
  """
72
92
  return pulumi.get(self, "name")
73
93
 
74
- @property
94
+ @_builtins.property
75
95
  @pulumi.getter
76
96
  def properties(self) -> Sequence['outputs.GetNotificationDestinationPropertyResult']:
77
97
  """
@@ -79,19 +99,27 @@ class GetNotificationDestinationResult:
79
99
  """
80
100
  return pulumi.get(self, "properties")
81
101
 
82
- @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
83
111
  @pulumi.getter
84
- def status(self) -> str:
112
+ def status(self) -> _builtins.str:
85
113
  """
86
114
  The status of the notification destination.
87
115
  """
88
116
  return pulumi.get(self, "status")
89
117
 
90
- @property
118
+ @_builtins.property
91
119
  @pulumi.getter
92
- def type(self) -> str:
120
+ def type(self) -> _builtins.str:
93
121
  """
94
- 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`.
95
123
  """
96
124
  return pulumi.get(self, "type")
97
125
 
@@ -104,55 +132,77 @@ class AwaitableGetNotificationDestinationResult(GetNotificationDestinationResult
104
132
  return GetNotificationDestinationResult(
105
133
  account_id=self.account_id,
106
134
  active=self.active,
135
+ guid=self.guid,
107
136
  id=self.id,
108
137
  name=self.name,
109
138
  properties=self.properties,
139
+ secure_urls=self.secure_urls,
110
140
  status=self.status,
111
141
  type=self.type)
112
142
 
113
143
 
114
- def get_notification_destination(account_id: Optional[int] = None,
115
- id: Optional[str] = None,
116
- 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,
117
148
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetNotificationDestinationResult:
118
149
  """
119
150
  Use this data source to access information about an existing resource.
120
151
 
121
- :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`.
122
- :param str id: The id of the notification destination in New Relic.
123
- :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.
124
155
 
125
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.
126
158
  """
127
159
  __args__ = dict()
128
160
  __args__['accountId'] = account_id
129
161
  __args__['id'] = id
130
162
  __args__['name'] = name
163
+ __args__['secureUrls'] = secure_urls
131
164
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
132
165
  __ret__ = pulumi.runtime.invoke('newrelic:index/getNotificationDestination:getNotificationDestination', __args__, opts=opts, typ=GetNotificationDestinationResult).value
133
166
 
134
167
  return AwaitableGetNotificationDestinationResult(
135
168
  account_id=pulumi.get(__ret__, 'account_id'),
136
169
  active=pulumi.get(__ret__, 'active'),
170
+ guid=pulumi.get(__ret__, 'guid'),
137
171
  id=pulumi.get(__ret__, 'id'),
138
172
  name=pulumi.get(__ret__, 'name'),
139
173
  properties=pulumi.get(__ret__, 'properties'),
174
+ secure_urls=pulumi.get(__ret__, 'secure_urls'),
140
175
  status=pulumi.get(__ret__, 'status'),
141
176
  type=pulumi.get(__ret__, 'type'))
142
-
143
-
144
- @_utilities.lift_output_func(get_notification_destination)
145
- def get_notification_destination_output(account_id: Optional[pulumi.Input[Optional[int]]] = None,
146
- id: Optional[pulumi.Input[Optional[str]]] = None,
147
- name: Optional[pulumi.Input[Optional[str]]] = None,
148
- 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]:
149
182
  """
150
183
  Use this data source to access information about an existing resource.
151
184
 
152
- :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`.
153
- :param str id: The id of the notification destination in New Relic.
154
- :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.
155
188
 
156
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.
157
191
  """
158
- ...
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')))