pulumi-cloudamqp 3.21.0a1743571485__py3-none-any.whl → 3.22.0__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-cloudamqp might be problematic. Click here for more details.

Files changed (51) hide show
  1. pulumi_cloudamqp/__init__.py +12 -0
  2. pulumi_cloudamqp/_inputs.py +92 -72
  3. pulumi_cloudamqp/account_action.py +42 -31
  4. pulumi_cloudamqp/alarm.py +232 -168
  5. pulumi_cloudamqp/config/__init__.py +1 -0
  6. pulumi_cloudamqp/config/__init__.pyi +1 -0
  7. pulumi_cloudamqp/config/vars.py +1 -0
  8. pulumi_cloudamqp/custom_domain.py +84 -38
  9. pulumi_cloudamqp/extra_disk_size.py +175 -155
  10. pulumi_cloudamqp/get_account.py +10 -3
  11. pulumi_cloudamqp/get_account_vpcs.py +15 -41
  12. pulumi_cloudamqp/get_alarm.py +74 -67
  13. pulumi_cloudamqp/get_alarms.py +165 -0
  14. pulumi_cloudamqp/get_credentials.py +19 -26
  15. pulumi_cloudamqp/get_instance.py +75 -25
  16. pulumi_cloudamqp/get_nodes.py +10 -56
  17. pulumi_cloudamqp/get_notification.py +39 -41
  18. pulumi_cloudamqp/get_notifications.py +135 -0
  19. pulumi_cloudamqp/get_plugins.py +28 -54
  20. pulumi_cloudamqp/get_plugins_community.py +29 -52
  21. pulumi_cloudamqp/get_upgradable_versions.py +19 -24
  22. pulumi_cloudamqp/get_vpc_gcp_info.py +44 -138
  23. pulumi_cloudamqp/get_vpc_info.py +34 -127
  24. pulumi_cloudamqp/instance.py +560 -333
  25. pulumi_cloudamqp/integration_aws_eventbridge.py +185 -117
  26. pulumi_cloudamqp/integration_log.py +491 -402
  27. pulumi_cloudamqp/integration_metric.py +348 -296
  28. pulumi_cloudamqp/maintenance_window.py +519 -0
  29. pulumi_cloudamqp/node_actions.py +85 -59
  30. pulumi_cloudamqp/notification.py +177 -92
  31. pulumi_cloudamqp/outputs.py +419 -125
  32. pulumi_cloudamqp/plugin.py +173 -105
  33. pulumi_cloudamqp/plugin_community.py +171 -107
  34. pulumi_cloudamqp/privatelink_aws.py +143 -347
  35. pulumi_cloudamqp/privatelink_azure.py +145 -345
  36. pulumi_cloudamqp/provider.py +25 -21
  37. pulumi_cloudamqp/pulumi-plugin.json +1 -1
  38. pulumi_cloudamqp/rabbit_configuration.py +337 -210
  39. pulumi_cloudamqp/security_firewall.py +114 -57
  40. pulumi_cloudamqp/upgrade_lavinmq.py +32 -102
  41. pulumi_cloudamqp/upgrade_rabbitmq.py +56 -299
  42. pulumi_cloudamqp/vpc.py +115 -79
  43. pulumi_cloudamqp/vpc_connect.py +222 -606
  44. pulumi_cloudamqp/vpc_gcp_peering.py +230 -591
  45. pulumi_cloudamqp/vpc_peering.py +123 -105
  46. pulumi_cloudamqp/webhook.py +146 -103
  47. {pulumi_cloudamqp-3.21.0a1743571485.dist-info → pulumi_cloudamqp-3.22.0.dist-info}/METADATA +1 -1
  48. pulumi_cloudamqp-3.22.0.dist-info/RECORD +52 -0
  49. {pulumi_cloudamqp-3.21.0a1743571485.dist-info → pulumi_cloudamqp-3.22.0.dist-info}/WHEEL +1 -1
  50. pulumi_cloudamqp-3.21.0a1743571485.dist-info/RECORD +0 -49
  51. {pulumi_cloudamqp-3.21.0a1743571485.dist-info → pulumi_cloudamqp-3.22.0.dist-info}/top_level.txt +0 -0
@@ -2,6 +2,7 @@
2
2
  # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
+ import builtins
5
6
  import copy
6
7
  import warnings
7
8
  import sys
@@ -37,7 +38,7 @@ class GetAccountResult:
37
38
 
38
39
  @property
39
40
  @pulumi.getter
40
- def id(self) -> str:
41
+ def id(self) -> builtins.str:
41
42
  """
42
43
  The provider-assigned unique ID for this managed resource.
43
44
  """
@@ -46,6 +47,10 @@ class GetAccountResult:
46
47
  @property
47
48
  @pulumi.getter
48
49
  def instances(self) -> Sequence['outputs.GetAccountInstanceResult']:
50
+ """
51
+ An array of instances. Each `instances` block consists of the fields documented
52
+ below.
53
+ """
49
54
  return pulumi.get(self, "instances")
50
55
 
51
56
 
@@ -61,7 +66,8 @@ class AwaitableGetAccountResult(GetAccountResult):
61
66
 
62
67
  def get_account(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAccountResult:
63
68
  """
64
- Use this data source to retrieve basic information about all instances available for an account. Uses the included apikey in provider configuration, to determine which account to read from.
69
+ Use this data source to retrieve basic information about all instances available for an account.
70
+ Uses the included apikey in provider configuration, to determine which account to read from.
65
71
  """
66
72
  __args__ = dict()
67
73
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -72,7 +78,8 @@ def get_account(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAcco
72
78
  instances=pulumi.get(__ret__, 'instances'))
73
79
  def get_account_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAccountResult]:
74
80
  """
75
- Use this data source to retrieve basic information about all instances available for an account. Uses the included apikey in provider configuration, to determine which account to read from.
81
+ Use this data source to retrieve basic information about all instances available for an account.
82
+ Uses the included apikey in provider configuration, to determine which account to read from.
76
83
  """
77
84
  __args__ = dict()
78
85
  opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
@@ -2,6 +2,7 @@
2
2
  # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
+ import builtins
5
6
  import copy
6
7
  import warnings
7
8
  import sys
@@ -37,7 +38,7 @@ class GetAccountVpcsResult:
37
38
 
38
39
  @property
39
40
  @pulumi.getter
40
- def id(self) -> str:
41
+ def id(self) -> builtins.str:
41
42
  """
42
43
  The provider-assigned unique ID for this managed resource.
43
44
  """
@@ -46,6 +47,9 @@ class GetAccountVpcsResult:
46
47
  @property
47
48
  @pulumi.getter
48
49
  def vpcs(self) -> Sequence['outputs.GetAccountVpcsVpcResult']:
50
+ """
51
+ An array of VPCs. Each `vpcs` block consists of the fields documented below.
52
+ """
49
53
  return pulumi.get(self, "vpcs")
50
54
 
51
55
 
@@ -61,11 +65,14 @@ class AwaitableGetAccountVpcsResult(GetAccountVpcsResult):
61
65
 
62
66
  def get_account_vpcs(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAccountVpcsResult:
63
67
  """
64
- Use this data source to retrieve basic information about all standalone VPCs available for an account. Uses the included apikey in provider configuration to determine which account to read from.
68
+ Use this data source to retrieve basic information about all standalone VPCs available for an
69
+ account. Uses the included apikey in provider configuration to determine which account to read from.
65
70
 
66
71
  ## Example Usage
67
72
 
68
- Can be used in other resources/data sources when the VPC identifier is unknown, while other attributes are known. E.g. find correct VPC using the `name` you gave your VPC. Then iterate over VPCs to find the matching one and extract the VPC identifier.
73
+ Can be used in other resources/data sources when the VPC identifier is unknown, while other
74
+ attributes are known. E.g. find correct VPC using the `name` you gave your VPC. Then iterate over
75
+ VPCs to find the matching one and extract the VPC identifier.
69
76
 
70
77
  ```python
71
78
  import pulumi
@@ -76,24 +83,6 @@ def get_account_vpcs(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGe
76
83
  pulumi.export("vpcId", [vpc for vpc in vpc_list.vpcs if vpc.name == my_vpc_name][0].id)
77
84
  ```
78
85
 
79
- ## Attributes reference
80
-
81
- All attributes reference are computed
82
-
83
- * `id` - The identifier for this data source. Set to `na` since there is no unique identifier.
84
- * `vpcs` - An array of VPCs. Each `vpcs` block consists of the fields documented below.
85
-
86
- ***
87
-
88
- The `vpcs` block consist of
89
-
90
- * `id` - The VPC identifier.
91
- * `name` - The VPC instance name.
92
- * `region` - The region the VPC is hosted in.
93
- * `subnet` - The VPC subnet.
94
- * `tags` - Optional tags set for the VPC.
95
- * `vpc_name` - VPC name given when hosted at the cloud provider.
96
-
97
86
  ## Dependency
98
87
 
99
88
  This data source depends on apikey set in the provider configuration.
@@ -107,11 +96,14 @@ def get_account_vpcs(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGe
107
96
  vpcs=pulumi.get(__ret__, 'vpcs'))
108
97
  def get_account_vpcs_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAccountVpcsResult]:
109
98
  """
110
- Use this data source to retrieve basic information about all standalone VPCs available for an account. Uses the included apikey in provider configuration to determine which account to read from.
99
+ Use this data source to retrieve basic information about all standalone VPCs available for an
100
+ account. Uses the included apikey in provider configuration to determine which account to read from.
111
101
 
112
102
  ## Example Usage
113
103
 
114
- Can be used in other resources/data sources when the VPC identifier is unknown, while other attributes are known. E.g. find correct VPC using the `name` you gave your VPC. Then iterate over VPCs to find the matching one and extract the VPC identifier.
104
+ Can be used in other resources/data sources when the VPC identifier is unknown, while other
105
+ attributes are known. E.g. find correct VPC using the `name` you gave your VPC. Then iterate over
106
+ VPCs to find the matching one and extract the VPC identifier.
115
107
 
116
108
  ```python
117
109
  import pulumi
@@ -122,24 +114,6 @@ def get_account_vpcs_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.In
122
114
  pulumi.export("vpcId", [vpc for vpc in vpc_list.vpcs if vpc.name == my_vpc_name][0].id)
123
115
  ```
124
116
 
125
- ## Attributes reference
126
-
127
- All attributes reference are computed
128
-
129
- * `id` - The identifier for this data source. Set to `na` since there is no unique identifier.
130
- * `vpcs` - An array of VPCs. Each `vpcs` block consists of the fields documented below.
131
-
132
- ***
133
-
134
- The `vpcs` block consist of
135
-
136
- * `id` - The VPC identifier.
137
- * `name` - The VPC instance name.
138
- * `region` - The region the VPC is hosted in.
139
- * `subnet` - The VPC subnet.
140
- * `tags` - Optional tags set for the VPC.
141
- * `vpc_name` - VPC name given when hosted at the cloud provider.
142
-
143
117
  ## Dependency
144
118
 
145
119
  This data source depends on apikey set in the provider configuration.
@@ -2,6 +2,7 @@
2
2
  # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
3
  # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
4
 
5
+ import builtins
5
6
  import copy
6
7
  import warnings
7
8
  import sys
@@ -69,17 +70,20 @@ class GetAlarmResult:
69
70
 
70
71
  @property
71
72
  @pulumi.getter(name="alarmId")
72
- def alarm_id(self) -> Optional[int]:
73
+ def alarm_id(self) -> Optional[builtins.int]:
73
74
  return pulumi.get(self, "alarm_id")
74
75
 
75
76
  @property
76
77
  @pulumi.getter
77
- def enabled(self) -> bool:
78
+ def enabled(self) -> builtins.bool:
79
+ """
80
+ Enable/disable status of the alarm.
81
+ """
78
82
  return pulumi.get(self, "enabled")
79
83
 
80
84
  @property
81
85
  @pulumi.getter
82
- def id(self) -> str:
86
+ def id(self) -> builtins.str:
83
87
  """
84
88
  The provider-assigned unique ID for this managed resource.
85
89
  """
@@ -87,52 +91,79 @@ class GetAlarmResult:
87
91
 
88
92
  @property
89
93
  @pulumi.getter(name="instanceId")
90
- def instance_id(self) -> int:
94
+ def instance_id(self) -> builtins.int:
91
95
  return pulumi.get(self, "instance_id")
92
96
 
93
97
  @property
94
98
  @pulumi.getter(name="messageType")
95
- def message_type(self) -> str:
99
+ def message_type(self) -> builtins.str:
100
+ """
101
+ Message type `(total, unacked, ready)` used by queue alarm type.
102
+ """
96
103
  return pulumi.get(self, "message_type")
97
104
 
98
105
  @property
99
106
  @pulumi.getter(name="queueRegex")
100
- def queue_regex(self) -> str:
107
+ def queue_regex(self) -> builtins.str:
108
+ """
109
+ Regular expression for which queue to check.
110
+ """
101
111
  return pulumi.get(self, "queue_regex")
102
112
 
103
113
  @property
104
114
  @pulumi.getter
105
- def recipients(self) -> Sequence[int]:
115
+ def recipients(self) -> Sequence[builtins.int]:
116
+ """
117
+ Identifier for recipient to be notified.
118
+ """
106
119
  return pulumi.get(self, "recipients")
107
120
 
108
121
  @property
109
122
  @pulumi.getter(name="reminderInterval")
110
- def reminder_interval(self) -> int:
123
+ def reminder_interval(self) -> builtins.int:
124
+ """
125
+ The reminder interval (in seconds) to resend the alarm if not resolved.
126
+ Set to 0 for no reminders.
127
+ """
111
128
  return pulumi.get(self, "reminder_interval")
112
129
 
113
130
  @property
114
131
  @pulumi.getter(name="timeThreshold")
115
- def time_threshold(self) -> int:
132
+ def time_threshold(self) -> builtins.int:
133
+ """
134
+ The time interval (in seconds) the `value_threshold` should be active
135
+ before trigger an alarm.
136
+ """
116
137
  return pulumi.get(self, "time_threshold")
117
138
 
118
139
  @property
119
140
  @pulumi.getter
120
- def type(self) -> Optional[str]:
141
+ def type(self) -> Optional[builtins.str]:
121
142
  return pulumi.get(self, "type")
122
143
 
123
144
  @property
124
145
  @pulumi.getter(name="valueCalculation")
125
- def value_calculation(self) -> Optional[str]:
146
+ def value_calculation(self) -> Optional[builtins.str]:
147
+ """
148
+ Disk value threshold calculation, `(fixed, percentage)` of disk space
149
+ remaining.
150
+ """
126
151
  return pulumi.get(self, "value_calculation")
127
152
 
128
153
  @property
129
154
  @pulumi.getter(name="valueThreshold")
130
- def value_threshold(self) -> int:
155
+ def value_threshold(self) -> builtins.int:
156
+ """
157
+ The value threshold that triggers the alarm.
158
+ """
131
159
  return pulumi.get(self, "value_threshold")
132
160
 
133
161
  @property
134
162
  @pulumi.getter(name="vhostRegex")
135
- def vhost_regex(self) -> str:
163
+ def vhost_regex(self) -> builtins.str:
164
+ """
165
+ Regular expression for which vhost to check
166
+ """
136
167
  return pulumi.get(self, "vhost_regex")
137
168
 
138
169
 
@@ -157,13 +188,14 @@ class AwaitableGetAlarmResult(GetAlarmResult):
157
188
  vhost_regex=self.vhost_regex)
158
189
 
159
190
 
160
- def get_alarm(alarm_id: Optional[int] = None,
161
- instance_id: Optional[int] = None,
162
- type: Optional[str] = None,
163
- value_calculation: Optional[str] = None,
191
+ def get_alarm(alarm_id: Optional[builtins.int] = None,
192
+ instance_id: Optional[builtins.int] = None,
193
+ type: Optional[builtins.str] = None,
194
+ value_calculation: Optional[builtins.str] = None,
164
195
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlarmResult:
165
196
  """
166
- Use this data source to retrieve information about default or created alarms. Either use `alarm_id` or `type` to retrieve the alarm.
197
+ Use this data source to retrieve information about default or created alarms. Either use `alarm_id`
198
+ or `type` to retrieve the alarm.
167
199
 
168
200
  ## Example Usage
169
201
 
@@ -175,36 +207,23 @@ def get_alarm(alarm_id: Optional[int] = None,
175
207
  type="cpu")
176
208
  ```
177
209
 
178
- ## Attributes reference
179
-
180
- All attributes reference are computed
181
-
182
- * `id` - The identifier for this resource.
183
- * `enabled` - Enable/disable status of the alarm.
184
- * `value_threshold` - The value threshold that triggers the alarm.
185
- * `reminder_interval` - The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders.
186
- * `time_threshold` - The time interval (in seconds) the `value_threshold` should be active before trigger an alarm.
187
- * `queue_regex` - Regular expression for which queue to check.
188
- * `vhost_regex` - Regular expression for which vhost to check
189
- * `recipients` - Identifier for recipient to be notified.
190
- * `message_type` - Message type `(total, unacked, ready)` used by queue alarm type.
191
-
192
- Specific attribute for `disk` alarm
193
-
194
- * `value_calculation` - Disk value threshold calculation, `(fixed, percentage)` of disk space remaining.
195
-
196
210
  ## Dependency
197
211
 
198
212
  This data source depends on CloudAMQP instance identifier, `cloudamqp_instance.instance.id`.
199
213
 
200
- ## Alarm types
214
+ ## Alarm Types
201
215
 
202
216
  `cpu, memory, disk, queue, connection, flow, consumer, netsplit, server_unreachable, notice`
203
217
 
204
218
 
205
- :param int alarm_id: The alarm identifier. Either use this or `type` to give `Alarm` necessary information to retrieve the alarm.
206
- :param int instance_id: The CloudAMQP instance identifier.
207
- :param str type: The alarm type. Either use this or `alarm_id` to give `Alarm` necessary information when retrieve the alarm. Supported alarm types
219
+ :param builtins.int alarm_id: The alarm identifier. Either use this or `type` to give
220
+ `Alarm` necessary information to retrieve the alarm.
221
+ :param builtins.int instance_id: The CloudAMQP instance identifier.
222
+ :param builtins.str type: The alarm type. Either use this or `alarm_id` to give `Alarm`
223
+ necessary information when retrieve the alarm. Supported
224
+ alarm types.
225
+ :param builtins.str value_calculation: Disk value threshold calculation, `(fixed, percentage)` of disk space
226
+ remaining.
208
227
  """
209
228
  __args__ = dict()
210
229
  __args__['alarmId'] = alarm_id
@@ -228,13 +247,14 @@ def get_alarm(alarm_id: Optional[int] = None,
228
247
  value_calculation=pulumi.get(__ret__, 'value_calculation'),
229
248
  value_threshold=pulumi.get(__ret__, 'value_threshold'),
230
249
  vhost_regex=pulumi.get(__ret__, 'vhost_regex'))
231
- def get_alarm_output(alarm_id: Optional[pulumi.Input[Optional[int]]] = None,
232
- instance_id: Optional[pulumi.Input[int]] = None,
233
- type: Optional[pulumi.Input[Optional[str]]] = None,
234
- value_calculation: Optional[pulumi.Input[Optional[str]]] = None,
250
+ def get_alarm_output(alarm_id: Optional[pulumi.Input[Optional[builtins.int]]] = None,
251
+ instance_id: Optional[pulumi.Input[builtins.int]] = None,
252
+ type: Optional[pulumi.Input[Optional[builtins.str]]] = None,
253
+ value_calculation: Optional[pulumi.Input[Optional[builtins.str]]] = None,
235
254
  opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlarmResult]:
236
255
  """
237
- Use this data source to retrieve information about default or created alarms. Either use `alarm_id` or `type` to retrieve the alarm.
256
+ Use this data source to retrieve information about default or created alarms. Either use `alarm_id`
257
+ or `type` to retrieve the alarm.
238
258
 
239
259
  ## Example Usage
240
260
 
@@ -246,36 +266,23 @@ def get_alarm_output(alarm_id: Optional[pulumi.Input[Optional[int]]] = None,
246
266
  type="cpu")
247
267
  ```
248
268
 
249
- ## Attributes reference
250
-
251
- All attributes reference are computed
252
-
253
- * `id` - The identifier for this resource.
254
- * `enabled` - Enable/disable status of the alarm.
255
- * `value_threshold` - The value threshold that triggers the alarm.
256
- * `reminder_interval` - The reminder interval (in seconds) to resend the alarm if not resolved. Set to 0 for no reminders.
257
- * `time_threshold` - The time interval (in seconds) the `value_threshold` should be active before trigger an alarm.
258
- * `queue_regex` - Regular expression for which queue to check.
259
- * `vhost_regex` - Regular expression for which vhost to check
260
- * `recipients` - Identifier for recipient to be notified.
261
- * `message_type` - Message type `(total, unacked, ready)` used by queue alarm type.
262
-
263
- Specific attribute for `disk` alarm
264
-
265
- * `value_calculation` - Disk value threshold calculation, `(fixed, percentage)` of disk space remaining.
266
-
267
269
  ## Dependency
268
270
 
269
271
  This data source depends on CloudAMQP instance identifier, `cloudamqp_instance.instance.id`.
270
272
 
271
- ## Alarm types
273
+ ## Alarm Types
272
274
 
273
275
  `cpu, memory, disk, queue, connection, flow, consumer, netsplit, server_unreachable, notice`
274
276
 
275
277
 
276
- :param int alarm_id: The alarm identifier. Either use this or `type` to give `Alarm` necessary information to retrieve the alarm.
277
- :param int instance_id: The CloudAMQP instance identifier.
278
- :param str type: The alarm type. Either use this or `alarm_id` to give `Alarm` necessary information when retrieve the alarm. Supported alarm types
278
+ :param builtins.int alarm_id: The alarm identifier. Either use this or `type` to give
279
+ `Alarm` necessary information to retrieve the alarm.
280
+ :param builtins.int instance_id: The CloudAMQP instance identifier.
281
+ :param builtins.str type: The alarm type. Either use this or `alarm_id` to give `Alarm`
282
+ necessary information when retrieve the alarm. Supported
283
+ alarm types.
284
+ :param builtins.str value_calculation: Disk value threshold calculation, `(fixed, percentage)` of disk space
285
+ remaining.
279
286
  """
280
287
  __args__ = dict()
281
288
  __args__['alarmId'] = alarm_id
@@ -0,0 +1,165 @@
1
+ # coding=utf-8
2
+ # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
3
+ # *** Do not edit by hand unless you're certain you know what you are doing! ***
4
+
5
+ import builtins
6
+ import copy
7
+ import warnings
8
+ import sys
9
+ import pulumi
10
+ import pulumi.runtime
11
+ from typing import Any, Mapping, Optional, Sequence, Union, overload
12
+ if sys.version_info >= (3, 11):
13
+ from typing import NotRequired, TypedDict, TypeAlias
14
+ else:
15
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
16
+ from . import _utilities
17
+ from . import outputs
18
+
19
+ __all__ = [
20
+ 'GetAlarmsResult',
21
+ 'AwaitableGetAlarmsResult',
22
+ 'get_alarms',
23
+ 'get_alarms_output',
24
+ ]
25
+
26
+ @pulumi.output_type
27
+ class GetAlarmsResult:
28
+ """
29
+ A collection of values returned by getAlarms.
30
+ """
31
+ def __init__(__self__, alarms=None, id=None, instance_id=None, type=None):
32
+ if alarms and not isinstance(alarms, list):
33
+ raise TypeError("Expected argument 'alarms' to be a list")
34
+ pulumi.set(__self__, "alarms", alarms)
35
+ if id and not isinstance(id, str):
36
+ raise TypeError("Expected argument 'id' to be a str")
37
+ pulumi.set(__self__, "id", id)
38
+ if instance_id and not isinstance(instance_id, int):
39
+ raise TypeError("Expected argument 'instance_id' to be a int")
40
+ pulumi.set(__self__, "instance_id", instance_id)
41
+ if type and not isinstance(type, str):
42
+ raise TypeError("Expected argument 'type' to be a str")
43
+ pulumi.set(__self__, "type", type)
44
+
45
+ @property
46
+ @pulumi.getter
47
+ def alarms(self) -> Sequence['outputs.GetAlarmsAlarmResult']:
48
+ """
49
+ List of alarms (see below for nested schema)
50
+ """
51
+ return pulumi.get(self, "alarms")
52
+
53
+ @property
54
+ @pulumi.getter
55
+ def id(self) -> builtins.str:
56
+ """
57
+ The provider-assigned unique ID for this managed resource.
58
+ """
59
+ return pulumi.get(self, "id")
60
+
61
+ @property
62
+ @pulumi.getter(name="instanceId")
63
+ def instance_id(self) -> builtins.int:
64
+ return pulumi.get(self, "instance_id")
65
+
66
+ @property
67
+ @pulumi.getter
68
+ def type(self) -> Optional[builtins.str]:
69
+ """
70
+ The type of the alarm.
71
+ """
72
+ return pulumi.get(self, "type")
73
+
74
+
75
+ class AwaitableGetAlarmsResult(GetAlarmsResult):
76
+ # pylint: disable=using-constant-test
77
+ def __await__(self):
78
+ if False:
79
+ yield self
80
+ return GetAlarmsResult(
81
+ alarms=self.alarms,
82
+ id=self.id,
83
+ instance_id=self.instance_id,
84
+ type=self.type)
85
+
86
+
87
+ def get_alarms(instance_id: Optional[builtins.int] = None,
88
+ type: Optional[builtins.str] = None,
89
+ opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetAlarmsResult:
90
+ """
91
+ Use this data source to retrieve a list of default or created alarms.
92
+
93
+ ## Example Usage
94
+
95
+ ```python
96
+ import pulumi
97
+ import pulumi_cloudamqp as cloudamqp
98
+
99
+ queue_alarms = cloudamqp.get_alarms(instance_id=instance["id"],
100
+ type="queue")
101
+ ```
102
+
103
+ ## Dependency
104
+
105
+ This data source depends on CloudAMQP instance identifier, `cloudamqp_instance.instance.id`.
106
+
107
+ ## Alarm Types
108
+
109
+ `cpu, memory, disk, queue, connection, flow, consumer, netsplit, server_unreachable, notice`
110
+
111
+
112
+ :param builtins.int instance_id: The CloudAMQP instance identifier.
113
+ :param builtins.str type: The alarm type to filter for. Supported
114
+ alarm types.
115
+ """
116
+ __args__ = dict()
117
+ __args__['instanceId'] = instance_id
118
+ __args__['type'] = type
119
+ opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
120
+ __ret__ = pulumi.runtime.invoke('cloudamqp:index/getAlarms:getAlarms', __args__, opts=opts, typ=GetAlarmsResult).value
121
+
122
+ return AwaitableGetAlarmsResult(
123
+ alarms=pulumi.get(__ret__, 'alarms'),
124
+ id=pulumi.get(__ret__, 'id'),
125
+ instance_id=pulumi.get(__ret__, 'instance_id'),
126
+ type=pulumi.get(__ret__, 'type'))
127
+ def get_alarms_output(instance_id: Optional[pulumi.Input[builtins.int]] = None,
128
+ type: Optional[pulumi.Input[Optional[builtins.str]]] = None,
129
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetAlarmsResult]:
130
+ """
131
+ Use this data source to retrieve a list of default or created alarms.
132
+
133
+ ## Example Usage
134
+
135
+ ```python
136
+ import pulumi
137
+ import pulumi_cloudamqp as cloudamqp
138
+
139
+ queue_alarms = cloudamqp.get_alarms(instance_id=instance["id"],
140
+ type="queue")
141
+ ```
142
+
143
+ ## Dependency
144
+
145
+ This data source depends on CloudAMQP instance identifier, `cloudamqp_instance.instance.id`.
146
+
147
+ ## Alarm Types
148
+
149
+ `cpu, memory, disk, queue, connection, flow, consumer, netsplit, server_unreachable, notice`
150
+
151
+
152
+ :param builtins.int instance_id: The CloudAMQP instance identifier.
153
+ :param builtins.str type: The alarm type to filter for. Supported
154
+ alarm types.
155
+ """
156
+ __args__ = dict()
157
+ __args__['instanceId'] = instance_id
158
+ __args__['type'] = type
159
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
160
+ __ret__ = pulumi.runtime.invoke_output('cloudamqp:index/getAlarms:getAlarms', __args__, opts=opts, typ=GetAlarmsResult)
161
+ return __ret__.apply(lambda __response__: GetAlarmsResult(
162
+ alarms=pulumi.get(__response__, 'alarms'),
163
+ id=pulumi.get(__response__, 'id'),
164
+ instance_id=pulumi.get(__response__, 'instance_id'),
165
+ type=pulumi.get(__response__, 'type')))