pulumi-hcloud 1.18.0a1709364097__py3-none-any.whl → 1.22.0a1736833581__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.
Files changed (66) hide show
  1. pulumi_hcloud/__init__.py +2 -0
  2. pulumi_hcloud/_inputs.py +247 -15
  3. pulumi_hcloud/_utilities.py +41 -5
  4. pulumi_hcloud/certificate.py +15 -10
  5. pulumi_hcloud/config/__init__.pyi +5 -0
  6. pulumi_hcloud/config/vars.py +5 -0
  7. pulumi_hcloud/firewall.py +77 -66
  8. pulumi_hcloud/firewall_attachment.py +31 -18
  9. pulumi_hcloud/floating_ip.py +39 -32
  10. pulumi_hcloud/floating_ip_assignment.py +11 -4
  11. pulumi_hcloud/get_certificate.py +25 -6
  12. pulumi_hcloud/get_certificates.py +14 -5
  13. pulumi_hcloud/get_datacenter.py +38 -23
  14. pulumi_hcloud/get_datacenters.py +28 -53
  15. pulumi_hcloud/get_firewall.py +38 -19
  16. pulumi_hcloud/get_firewalls.py +16 -5
  17. pulumi_hcloud/get_floating_ip.py +39 -13
  18. pulumi_hcloud/get_floating_ips.py +14 -5
  19. pulumi_hcloud/get_image.py +37 -9
  20. pulumi_hcloud/get_images.py +22 -5
  21. pulumi_hcloud/get_load_balancer.py +30 -7
  22. pulumi_hcloud/get_load_balancer_type.py +202 -0
  23. pulumi_hcloud/get_load_balancer_types.py +100 -0
  24. pulumi_hcloud/get_load_balancers.py +14 -5
  25. pulumi_hcloud/get_location.py +42 -25
  26. pulumi_hcloud/get_locations.py +28 -53
  27. pulumi_hcloud/get_network.py +28 -11
  28. pulumi_hcloud/get_networks.py +14 -5
  29. pulumi_hcloud/get_placement_group.py +31 -13
  30. pulumi_hcloud/get_placement_groups.py +16 -5
  31. pulumi_hcloud/get_primary_ip.py +44 -18
  32. pulumi_hcloud/get_primary_ips.py +14 -5
  33. pulumi_hcloud/get_server.py +43 -11
  34. pulumi_hcloud/get_server_type.py +75 -49
  35. pulumi_hcloud/get_server_types.py +39 -23
  36. pulumi_hcloud/get_servers.py +16 -5
  37. pulumi_hcloud/get_ssh_key.py +58 -32
  38. pulumi_hcloud/get_ssh_keys.py +35 -20
  39. pulumi_hcloud/get_volume.py +33 -12
  40. pulumi_hcloud/get_volumes.py +18 -7
  41. pulumi_hcloud/load_balancer.py +63 -60
  42. pulumi_hcloud/load_balancer_network.py +28 -15
  43. pulumi_hcloud/load_balancer_service.py +59 -52
  44. pulumi_hcloud/load_balancer_target.py +33 -24
  45. pulumi_hcloud/managed_certificate.py +57 -20
  46. pulumi_hcloud/network.py +27 -18
  47. pulumi_hcloud/network_route.py +15 -6
  48. pulumi_hcloud/network_subnet.py +15 -6
  49. pulumi_hcloud/outputs.py +265 -46
  50. pulumi_hcloud/placement_group.py +27 -18
  51. pulumi_hcloud/primary_ip.py +66 -43
  52. pulumi_hcloud/provider.py +5 -0
  53. pulumi_hcloud/pulumi-plugin.json +2 -1
  54. pulumi_hcloud/rdns.py +51 -34
  55. pulumi_hcloud/server.py +185 -130
  56. pulumi_hcloud/server_network.py +26 -15
  57. pulumi_hcloud/snapshot.py +25 -18
  58. pulumi_hcloud/ssh_key.py +52 -47
  59. pulumi_hcloud/uploaded_certificate.py +73 -20
  60. pulumi_hcloud/volume.py +37 -28
  61. pulumi_hcloud/volume_attachment.py +11 -4
  62. {pulumi_hcloud-1.18.0a1709364097.dist-info → pulumi_hcloud-1.22.0a1736833581.dist-info}/METADATA +7 -6
  63. pulumi_hcloud-1.22.0a1736833581.dist-info/RECORD +67 -0
  64. {pulumi_hcloud-1.18.0a1709364097.dist-info → pulumi_hcloud-1.22.0a1736833581.dist-info}/WHEEL +1 -1
  65. pulumi_hcloud-1.18.0a1709364097.dist-info/RECORD +0 -65
  66. {pulumi_hcloud-1.18.0a1709364097.dist-info → pulumi_hcloud-1.22.0a1736833581.dist-info}/top_level.txt +0 -0
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
 
@@ -106,12 +111,9 @@ def get_placement_groups(most_recent: Optional[bool] = None,
106
111
  most_recent=pulumi.get(__ret__, 'most_recent'),
107
112
  placement_groups=pulumi.get(__ret__, 'placement_groups'),
108
113
  with_selector=pulumi.get(__ret__, 'with_selector'))
109
-
110
-
111
- @_utilities.lift_output_func(get_placement_groups)
112
114
  def get_placement_groups_output(most_recent: Optional[pulumi.Input[Optional[bool]]] = None,
113
115
  with_selector: Optional[pulumi.Input[Optional[str]]] = None,
114
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPlacementGroupsResult]:
116
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPlacementGroupsResult]:
115
117
  """
116
118
  Provides details about multiple Hetzner Cloud Placement Groups.
117
119
 
@@ -129,4 +131,13 @@ def get_placement_groups_output(most_recent: Optional[pulumi.Input[Optional[bool
129
131
  :param bool most_recent: Sorts list by date.
130
132
  :param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
131
133
  """
132
- ...
134
+ __args__ = dict()
135
+ __args__['mostRecent'] = most_recent
136
+ __args__['withSelector'] = with_selector
137
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
138
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getPlacementGroups:getPlacementGroups', __args__, opts=opts, typ=GetPlacementGroupsResult)
139
+ return __ret__.apply(lambda __response__: GetPlacementGroupsResult(
140
+ id=pulumi.get(__response__, 'id'),
141
+ most_recent=pulumi.get(__response__, 'most_recent'),
142
+ placement_groups=pulumi.get(__response__, 'placement_groups'),
143
+ with_selector=pulumi.get(__response__, 'with_selector')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = [
@@ -87,7 +92,7 @@ class GetPrimaryIpResult:
87
92
  @pulumi.getter
88
93
  def datacenter(self) -> str:
89
94
  """
90
- (string) The datacenter name of the Primary IP.
95
+ (string) The datacenter name of the Primary IP. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-datacenters-are-there) for more details about datacenters.
91
96
  """
92
97
  return pulumi.get(self, "datacenter")
93
98
 
@@ -125,9 +130,9 @@ class GetPrimaryIpResult:
125
130
 
126
131
  @property
127
132
  @pulumi.getter
128
- def labels(self) -> Mapping[str, Any]:
133
+ def labels(self) -> Mapping[str, str]:
129
134
  """
130
- (string) Description of the Primary IP.
135
+ (map) User-defined labels (key-value pairs).
131
136
  """
132
137
  return pulumi.get(self, "labels")
133
138
 
@@ -195,6 +200,7 @@ def get_primary_ip(assignee_id: Optional[int] = None,
195
200
 
196
201
  Provides details about a Hetzner Cloud Primary IP.
197
202
  This resource can be useful when you need to determine a Primary IP ID based on the IP address.
203
+
198
204
  ### Additional Examples
199
205
 
200
206
  ```python
@@ -205,16 +211,17 @@ def get_primary_ip(assignee_id: Optional[int] = None,
205
211
  ip2 = hcloud.get_primary_ip(name="primary_ip_1")
206
212
  ip3 = hcloud.get_primary_ip(with_selector="key=value")
207
213
  # Link a server to an existing primary IP
208
- server_test = hcloud.Server("serverTest",
214
+ server_test = hcloud.Server("server_test",
215
+ name="test-server",
209
216
  image="ubuntu-20.04",
210
- server_type="cx11",
217
+ server_type="cx22",
211
218
  datacenter="fsn1-dc14",
212
219
  labels={
213
220
  "test": "tessst1",
214
221
  },
215
- public_nets=[hcloud.ServerPublicNetArgs(
216
- ipv4=hcloud_primary_ip["ip_1"]["id"],
217
- )])
222
+ public_nets=[{
223
+ "ipv4": ip1_hcloud_primary_ip["id"],
224
+ }])
218
225
  ```
219
226
 
220
227
 
@@ -246,15 +253,12 @@ def get_primary_ip(assignee_id: Optional[int] = None,
246
253
  name=pulumi.get(__ret__, 'name'),
247
254
  type=pulumi.get(__ret__, 'type'),
248
255
  with_selector=pulumi.get(__ret__, 'with_selector'))
249
-
250
-
251
- @_utilities.lift_output_func(get_primary_ip)
252
256
  def get_primary_ip_output(assignee_id: Optional[pulumi.Input[Optional[int]]] = None,
253
257
  id: Optional[pulumi.Input[Optional[int]]] = None,
254
258
  ip_address: Optional[pulumi.Input[Optional[str]]] = None,
255
259
  name: Optional[pulumi.Input[Optional[str]]] = None,
256
260
  with_selector: Optional[pulumi.Input[Optional[str]]] = None,
257
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPrimaryIpResult]:
261
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPrimaryIpResult]:
258
262
  """
259
263
  Provides details about a Hetzner Cloud Primary IP.
260
264
 
@@ -271,6 +275,7 @@ def get_primary_ip_output(assignee_id: Optional[pulumi.Input[Optional[int]]] = N
271
275
 
272
276
  Provides details about a Hetzner Cloud Primary IP.
273
277
  This resource can be useful when you need to determine a Primary IP ID based on the IP address.
278
+
274
279
  ### Additional Examples
275
280
 
276
281
  ```python
@@ -281,16 +286,17 @@ def get_primary_ip_output(assignee_id: Optional[pulumi.Input[Optional[int]]] = N
281
286
  ip2 = hcloud.get_primary_ip(name="primary_ip_1")
282
287
  ip3 = hcloud.get_primary_ip(with_selector="key=value")
283
288
  # Link a server to an existing primary IP
284
- server_test = hcloud.Server("serverTest",
289
+ server_test = hcloud.Server("server_test",
290
+ name="test-server",
285
291
  image="ubuntu-20.04",
286
- server_type="cx11",
292
+ server_type="cx22",
287
293
  datacenter="fsn1-dc14",
288
294
  labels={
289
295
  "test": "tessst1",
290
296
  },
291
- public_nets=[hcloud.ServerPublicNetArgs(
292
- ipv4=hcloud_primary_ip["ip_1"]["id"],
293
- )])
297
+ public_nets=[{
298
+ "ipv4": ip1_hcloud_primary_ip["id"],
299
+ }])
294
300
  ```
295
301
 
296
302
 
@@ -300,4 +306,24 @@ def get_primary_ip_output(assignee_id: Optional[pulumi.Input[Optional[int]]] = N
300
306
  :param str name: Name of the Primary IP.
301
307
  :param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
302
308
  """
303
- ...
309
+ __args__ = dict()
310
+ __args__['assigneeId'] = assignee_id
311
+ __args__['id'] = id
312
+ __args__['ipAddress'] = ip_address
313
+ __args__['name'] = name
314
+ __args__['withSelector'] = with_selector
315
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
316
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getPrimaryIp:getPrimaryIp', __args__, opts=opts, typ=GetPrimaryIpResult)
317
+ return __ret__.apply(lambda __response__: GetPrimaryIpResult(
318
+ assignee_id=pulumi.get(__response__, 'assignee_id'),
319
+ assignee_type=pulumi.get(__response__, 'assignee_type'),
320
+ auto_delete=pulumi.get(__response__, 'auto_delete'),
321
+ datacenter=pulumi.get(__response__, 'datacenter'),
322
+ delete_protection=pulumi.get(__response__, 'delete_protection'),
323
+ id=pulumi.get(__response__, 'id'),
324
+ ip_address=pulumi.get(__response__, 'ip_address'),
325
+ ip_network=pulumi.get(__response__, 'ip_network'),
326
+ labels=pulumi.get(__response__, 'labels'),
327
+ name=pulumi.get(__response__, 'name'),
328
+ type=pulumi.get(__response__, 'type'),
329
+ with_selector=pulumi.get(__response__, 'with_selector')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
  from . import outputs
12
17
 
@@ -92,11 +97,8 @@ def get_primary_ips(with_selector: Optional[str] = None,
92
97
  id=pulumi.get(__ret__, 'id'),
93
98
  primary_ips=pulumi.get(__ret__, 'primary_ips'),
94
99
  with_selector=pulumi.get(__ret__, 'with_selector'))
95
-
96
-
97
- @_utilities.lift_output_func(get_primary_ips)
98
100
  def get_primary_ips_output(with_selector: Optional[pulumi.Input[Optional[str]]] = None,
99
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPrimaryIpsResult]:
101
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPrimaryIpsResult]:
100
102
  """
101
103
  Provides details about multiple Hetzner Cloud Primary IPs.
102
104
 
@@ -112,4 +114,11 @@ def get_primary_ips_output(with_selector: Optional[pulumi.Input[Optional[str]]]
112
114
 
113
115
  :param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
114
116
  """
115
- ...
117
+ __args__ = dict()
118
+ __args__['withSelector'] = with_selector
119
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
120
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getPrimaryIps:getPrimaryIps', __args__, opts=opts, typ=GetPrimaryIpsResult)
121
+ return __ret__.apply(lambda __response__: GetPrimaryIpsResult(
122
+ id=pulumi.get(__response__, 'id'),
123
+ primary_ips=pulumi.get(__response__, 'primary_ips'),
124
+ with_selector=pulumi.get(__response__, 'with_selector')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = [
@@ -112,7 +117,7 @@ class GetServerResult:
112
117
  @pulumi.getter
113
118
  def datacenter(self) -> str:
114
119
  """
115
- (string) The datacenter name.
120
+ (string) The datacenter name. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-datacenters-are-there) for more details about datacenters.
116
121
  """
117
122
  return pulumi.get(self, "datacenter")
118
123
 
@@ -182,7 +187,7 @@ class GetServerResult:
182
187
 
183
188
  @property
184
189
  @pulumi.getter
185
- def labels(self) -> Mapping[str, Any]:
190
+ def labels(self) -> Mapping[str, str]:
186
191
  """
187
192
  (map) User-defined labels (key-value pairs)
188
193
  """
@@ -192,7 +197,7 @@ class GetServerResult:
192
197
  @pulumi.getter
193
198
  def location(self) -> str:
194
199
  """
195
- (string) The location name.
200
+ (string) The location name. See the [Hetzner Docs](https://docs.hetzner.com/cloud/general/locations/#what-locations-are-there) for more details about locations.
196
201
  """
197
202
  return pulumi.get(self, "location")
198
203
 
@@ -235,10 +240,8 @@ class GetServerResult:
235
240
 
236
241
  @property
237
242
  @pulumi.getter
243
+ @_utilities.deprecated("""Please use the with_selector property instead.""")
238
244
  def selector(self) -> Optional[str]:
239
- warnings.warn("""Please use the with_selector property instead.""", DeprecationWarning)
240
- pulumi.log.warn("""selector is deprecated: Please use the with_selector property instead.""")
241
-
242
245
  return pulumi.get(self, "selector")
243
246
 
244
247
  @property
@@ -359,16 +362,13 @@ def get_server(id: Optional[int] = None,
359
362
  status=pulumi.get(__ret__, 'status'),
360
363
  with_selector=pulumi.get(__ret__, 'with_selector'),
361
364
  with_statuses=pulumi.get(__ret__, 'with_statuses'))
362
-
363
-
364
- @_utilities.lift_output_func(get_server)
365
365
  def get_server_output(id: Optional[pulumi.Input[Optional[int]]] = None,
366
366
  name: Optional[pulumi.Input[Optional[str]]] = None,
367
367
  placement_group_id: Optional[pulumi.Input[Optional[int]]] = None,
368
368
  selector: Optional[pulumi.Input[Optional[str]]] = None,
369
369
  with_selector: Optional[pulumi.Input[Optional[str]]] = None,
370
370
  with_statuses: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
371
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServerResult]:
371
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServerResult]:
372
372
  """
373
373
  ## Example Usage
374
374
 
@@ -388,4 +388,36 @@ def get_server_output(id: Optional[pulumi.Input[Optional[int]]] = None,
388
388
  :param str with_selector: Label Selector. For more information about possible values, visit the [Hetzner Cloud Documentation](https://docs.hetzner.cloud/#overview-label-selector).
389
389
  :param Sequence[str] with_statuses: List only servers with the specified status, could contain `initializing`, `starting`, `running`, `stopping`, `off`, `deleting`, `rebuilding`, `migrating`, `unknown`.
390
390
  """
391
- ...
391
+ __args__ = dict()
392
+ __args__['id'] = id
393
+ __args__['name'] = name
394
+ __args__['placementGroupId'] = placement_group_id
395
+ __args__['selector'] = selector
396
+ __args__['withSelector'] = with_selector
397
+ __args__['withStatuses'] = with_statuses
398
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
399
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getServer:getServer', __args__, opts=opts, typ=GetServerResult)
400
+ return __ret__.apply(lambda __response__: GetServerResult(
401
+ backup_window=pulumi.get(__response__, 'backup_window'),
402
+ backups=pulumi.get(__response__, 'backups'),
403
+ datacenter=pulumi.get(__response__, 'datacenter'),
404
+ delete_protection=pulumi.get(__response__, 'delete_protection'),
405
+ firewall_ids=pulumi.get(__response__, 'firewall_ids'),
406
+ id=pulumi.get(__response__, 'id'),
407
+ image=pulumi.get(__response__, 'image'),
408
+ ipv4_address=pulumi.get(__response__, 'ipv4_address'),
409
+ ipv6_address=pulumi.get(__response__, 'ipv6_address'),
410
+ ipv6_network=pulumi.get(__response__, 'ipv6_network'),
411
+ iso=pulumi.get(__response__, 'iso'),
412
+ labels=pulumi.get(__response__, 'labels'),
413
+ location=pulumi.get(__response__, 'location'),
414
+ name=pulumi.get(__response__, 'name'),
415
+ placement_group_id=pulumi.get(__response__, 'placement_group_id'),
416
+ primary_disk_size=pulumi.get(__response__, 'primary_disk_size'),
417
+ rebuild_protection=pulumi.get(__response__, 'rebuild_protection'),
418
+ rescue=pulumi.get(__response__, 'rescue'),
419
+ selector=pulumi.get(__response__, 'selector'),
420
+ server_type=pulumi.get(__response__, 'server_type'),
421
+ status=pulumi.get(__response__, 'status'),
422
+ with_selector=pulumi.get(__response__, 'with_selector'),
423
+ with_statuses=pulumi.get(__response__, 'with_statuses')))
@@ -4,9 +4,14 @@
4
4
 
5
5
  import copy
6
6
  import warnings
7
+ import sys
7
8
  import pulumi
8
9
  import pulumi.runtime
9
10
  from typing import Any, Mapping, Optional, Sequence, Union, overload
11
+ if sys.version_info >= (3, 11):
12
+ from typing import NotRequired, TypedDict, TypeAlias
13
+ else:
14
+ from typing_extensions import NotRequired, TypedDict, TypeAlias
10
15
  from . import _utilities
11
16
 
12
17
  __all__ = [
@@ -25,8 +30,8 @@ class GetServerTypeResult:
25
30
  if architecture and not isinstance(architecture, str):
26
31
  raise TypeError("Expected argument 'architecture' to be a str")
27
32
  pulumi.set(__self__, "architecture", architecture)
28
- if cores and not isinstance(cores, int):
29
- raise TypeError("Expected argument 'cores' to be a int")
33
+ if cores and not isinstance(cores, float):
34
+ raise TypeError("Expected argument 'cores' to be a float")
30
35
  pulumi.set(__self__, "cores", cores)
31
36
  if cpu_type and not isinstance(cpu_type, str):
32
37
  raise TypeError("Expected argument 'cpu_type' to be a str")
@@ -37,8 +42,8 @@ class GetServerTypeResult:
37
42
  if description and not isinstance(description, str):
38
43
  raise TypeError("Expected argument 'description' to be a str")
39
44
  pulumi.set(__self__, "description", description)
40
- if disk and not isinstance(disk, int):
41
- raise TypeError("Expected argument 'disk' to be a int")
45
+ if disk and not isinstance(disk, float):
46
+ raise TypeError("Expected argument 'disk' to be a float")
42
47
  pulumi.set(__self__, "disk", disk)
43
48
  if id and not isinstance(id, int):
44
49
  raise TypeError("Expected argument 'id' to be a int")
@@ -49,8 +54,8 @@ class GetServerTypeResult:
49
54
  if is_deprecated and not isinstance(is_deprecated, bool):
50
55
  raise TypeError("Expected argument 'is_deprecated' to be a bool")
51
56
  pulumi.set(__self__, "is_deprecated", is_deprecated)
52
- if memory and not isinstance(memory, int):
53
- raise TypeError("Expected argument 'memory' to be a int")
57
+ if memory and not isinstance(memory, float):
58
+ raise TypeError("Expected argument 'memory' to be a float")
54
59
  pulumi.set(__self__, "memory", memory)
55
60
  if name and not isinstance(name, str):
56
61
  raise TypeError("Expected argument 'name' to be a str")
@@ -66,28 +71,31 @@ class GetServerTypeResult:
66
71
  @pulumi.getter
67
72
  def architecture(self) -> str:
68
73
  """
69
- (string) Architecture of the server_type.
74
+ Architecture of the cpu for a Server of this type.
70
75
  """
71
76
  return pulumi.get(self, "architecture")
72
77
 
73
78
  @property
74
79
  @pulumi.getter
75
- def cores(self) -> int:
80
+ def cores(self) -> float:
76
81
  """
77
- (int) Number of cpu cores a Server of this type will have.
82
+ Number of cpu cores for a Server of this type.
78
83
  """
79
84
  return pulumi.get(self, "cores")
80
85
 
81
86
  @property
82
87
  @pulumi.getter(name="cpuType")
83
88
  def cpu_type(self) -> str:
89
+ """
90
+ Type of cpu for a Server of this type.
91
+ """
84
92
  return pulumi.get(self, "cpu_type")
85
93
 
86
94
  @property
87
95
  @pulumi.getter(name="deprecationAnnounced")
88
96
  def deprecation_announced(self) -> str:
89
97
  """
90
- (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
98
+ Date of the Server Type deprecation announcement.
91
99
  """
92
100
  return pulumi.get(self, "deprecation_announced")
93
101
 
@@ -95,68 +103,69 @@ class GetServerTypeResult:
95
103
  @pulumi.getter
96
104
  def description(self) -> str:
97
105
  """
98
- (string) Description of the server_type.
106
+ Description of the Server Type.
99
107
  """
100
108
  return pulumi.get(self, "description")
101
109
 
102
110
  @property
103
111
  @pulumi.getter
104
- def disk(self) -> int:
112
+ def disk(self) -> float:
105
113
  """
106
- (int) Disk size a Server of this type will have in GB.
114
+ Disk size in GB for a Server of this type.
107
115
  """
108
116
  return pulumi.get(self, "disk")
109
117
 
110
118
  @property
111
119
  @pulumi.getter
112
- def id(self) -> int:
120
+ def id(self) -> Optional[int]:
113
121
  """
114
- (int) Unique ID of the server_type.
122
+ ID of the Server Type.
115
123
  """
116
124
  return pulumi.get(self, "id")
117
125
 
118
126
  @property
119
127
  @pulumi.getter(name="includedTraffic")
128
+ @_utilities.deprecated("""The field is deprecated and will always report 0 after 2024-08-05.""")
120
129
  def included_traffic(self) -> int:
121
- """
122
- (int) Free traffic per month in bytes.
123
- """
124
130
  return pulumi.get(self, "included_traffic")
125
131
 
126
132
  @property
127
133
  @pulumi.getter(name="isDeprecated")
128
134
  def is_deprecated(self) -> bool:
129
135
  """
130
- (bool) Deprecation status of server type.
136
+ Whether the Server Type is deprecated.
131
137
  """
132
138
  return pulumi.get(self, "is_deprecated")
133
139
 
134
140
  @property
135
141
  @pulumi.getter
136
- def memory(self) -> int:
142
+ def memory(self) -> float:
137
143
  """
138
- (int) Memory a Server of this type will have in GB.
144
+ Memory in GB for a Server of this type.
139
145
  """
140
146
  return pulumi.get(self, "memory")
141
147
 
142
148
  @property
143
149
  @pulumi.getter
144
- def name(self) -> str:
150
+ def name(self) -> Optional[str]:
145
151
  """
146
- (string) Name of the server_type.
152
+ Name of the Server Type.
147
153
  """
148
154
  return pulumi.get(self, "name")
149
155
 
150
156
  @property
151
157
  @pulumi.getter(name="storageType")
152
158
  def storage_type(self) -> str:
159
+ """
160
+ Type of boot drive for a Server of this type.
161
+ """
153
162
  return pulumi.get(self, "storage_type")
154
163
 
155
164
  @property
156
165
  @pulumi.getter(name="unavailableAfter")
157
166
  def unavailable_after(self) -> str:
158
167
  """
159
- (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
168
+ Date of the Server Type removal. After this date, the Server Type cannot be used anymore.
160
169
  """
161
170
  return pulumi.get(self, "unavailable_after")
162
171
 
@@ -182,13 +191,12 @@ class AwaitableGetServerTypeResult(GetServerTypeResult):
182
191
  unavailable_after=self.unavailable_after)
183
192
 
184
193
 
185
- def get_server_type(deprecation_announced: Optional[str] = None,
186
- id: Optional[int] = None,
194
+ def get_server_type(id: Optional[int] = None,
187
195
  name: Optional[str] = None,
188
- unavailable_after: Optional[str] = None,
189
196
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetServerTypeResult:
190
197
  """
191
198
  Provides details about a specific Hetzner Cloud Server Type.
199
+
192
200
  Use this resource to get detailed information about specific Server Type.
193
201
 
194
202
  ## Example Usage
@@ -197,21 +205,22 @@ def get_server_type(deprecation_announced: Optional[str] = None,
197
205
  import pulumi
198
206
  import pulumi_hcloud as hcloud
199
207
 
200
- ds1 = hcloud.get_server_type(name="cx11")
201
- ds2 = hcloud.get_server_type(id=1)
208
+ by_id = hcloud.get_server_type(id=22)
209
+ by_name = hcloud.get_server_type(name="cx22")
210
+ main = hcloud.Server("main",
211
+ name="my-server",
212
+ location="fsn1",
213
+ image="debian-12",
214
+ server_type=by_name.name)
202
215
  ```
203
216
 
204
217
 
205
- :param str deprecation_announced: (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
206
- :param int id: ID of the server_type.
207
- :param str name: Name of the server_type.
208
- :param str unavailable_after: (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
218
+ :param int id: ID of the Server Type.
219
+ :param str name: Name of the Server Type.
209
220
  """
210
221
  __args__ = dict()
211
- __args__['deprecationAnnounced'] = deprecation_announced
212
222
  __args__['id'] = id
213
223
  __args__['name'] = name
214
- __args__['unavailableAfter'] = unavailable_after
215
224
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
216
225
  __ret__ = pulumi.runtime.invoke('hcloud:index/getServerType:getServerType', __args__, opts=opts, typ=GetServerTypeResult).value
217
226
 
@@ -229,16 +238,12 @@ def get_server_type(deprecation_announced: Optional[str] = None,
229
238
  name=pulumi.get(__ret__, 'name'),
230
239
  storage_type=pulumi.get(__ret__, 'storage_type'),
231
240
  unavailable_after=pulumi.get(__ret__, 'unavailable_after'))
232
-
233
-
234
- @_utilities.lift_output_func(get_server_type)
235
- def get_server_type_output(deprecation_announced: Optional[pulumi.Input[Optional[str]]] = None,
236
- id: Optional[pulumi.Input[Optional[int]]] = None,
241
+ def get_server_type_output(id: Optional[pulumi.Input[Optional[int]]] = None,
237
242
  name: Optional[pulumi.Input[Optional[str]]] = None,
238
- unavailable_after: Optional[pulumi.Input[Optional[str]]] = None,
239
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServerTypeResult]:
243
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServerTypeResult]:
240
244
  """
241
245
  Provides details about a specific Hetzner Cloud Server Type.
246
+
242
247
  Use this resource to get detailed information about specific Server Type.
243
248
 
244
249
  ## Example Usage
@@ -247,14 +252,35 @@ def get_server_type_output(deprecation_announced: Optional[pulumi.Input[Optional
247
252
  import pulumi
248
253
  import pulumi_hcloud as hcloud
249
254
 
250
- ds1 = hcloud.get_server_type(name="cx11")
251
- ds2 = hcloud.get_server_type(id=1)
255
+ by_id = hcloud.get_server_type(id=22)
256
+ by_name = hcloud.get_server_type(name="cx22")
257
+ main = hcloud.Server("main",
258
+ name="my-server",
259
+ location="fsn1",
260
+ image="debian-12",
261
+ server_type=by_name.name)
252
262
  ```
253
263
 
254
264
 
255
- :param str deprecation_announced: (Optional, string) Date when the deprecation of the server type was announced. Only set when the server type is deprecated.
256
- :param int id: ID of the server_type.
257
- :param str name: Name of the server_type.
258
- :param str unavailable_after: (Optional, string) Date when the server type will not be available for new servers. Only set when the server type is deprecated.
265
+ :param int id: ID of the Server Type.
266
+ :param str name: Name of the Server Type.
259
267
  """
260
- ...
268
+ __args__ = dict()
269
+ __args__['id'] = id
270
+ __args__['name'] = name
271
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
272
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getServerType:getServerType', __args__, opts=opts, typ=GetServerTypeResult)
273
+ return __ret__.apply(lambda __response__: GetServerTypeResult(
274
+ architecture=pulumi.get(__response__, 'architecture'),
275
+ cores=pulumi.get(__response__, 'cores'),
276
+ cpu_type=pulumi.get(__response__, 'cpu_type'),
277
+ deprecation_announced=pulumi.get(__response__, 'deprecation_announced'),
278
+ description=pulumi.get(__response__, 'description'),
279
+ disk=pulumi.get(__response__, 'disk'),
280
+ id=pulumi.get(__response__, 'id'),
281
+ included_traffic=pulumi.get(__response__, 'included_traffic'),
282
+ is_deprecated=pulumi.get(__response__, 'is_deprecated'),
283
+ memory=pulumi.get(__response__, 'memory'),
284
+ name=pulumi.get(__response__, 'name'),
285
+ storage_type=pulumi.get(__response__, 'storage_type'),
286
+ unavailable_after=pulumi.get(__response__, 'unavailable_after')))