pulumi-hcloud 1.18.0a1710156455__py3-none-any.whl → 1.22.0a1736849475__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 -70
  8. pulumi_hcloud/firewall_attachment.py +27 -26
  9. pulumi_hcloud/floating_ip.py +39 -36
  10. pulumi_hcloud/floating_ip_assignment.py +11 -8
  11. pulumi_hcloud/get_certificate.py +25 -10
  12. pulumi_hcloud/get_certificates.py +14 -9
  13. pulumi_hcloud/get_datacenter.py +38 -27
  14. pulumi_hcloud/get_datacenters.py +28 -53
  15. pulumi_hcloud/get_firewall.py +38 -23
  16. pulumi_hcloud/get_firewalls.py +16 -9
  17. pulumi_hcloud/get_floating_ip.py +37 -17
  18. pulumi_hcloud/get_floating_ips.py +14 -9
  19. pulumi_hcloud/get_image.py +37 -13
  20. pulumi_hcloud/get_images.py +22 -9
  21. pulumi_hcloud/get_load_balancer.py +30 -11
  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 -9
  25. pulumi_hcloud/get_location.py +42 -29
  26. pulumi_hcloud/get_locations.py +28 -53
  27. pulumi_hcloud/get_network.py +28 -15
  28. pulumi_hcloud/get_networks.py +14 -9
  29. pulumi_hcloud/get_placement_group.py +31 -17
  30. pulumi_hcloud/get_placement_groups.py +16 -9
  31. pulumi_hcloud/get_primary_ip.py +42 -22
  32. pulumi_hcloud/get_primary_ips.py +14 -9
  33. pulumi_hcloud/get_server.py +43 -15
  34. pulumi_hcloud/get_server_type.py +75 -53
  35. pulumi_hcloud/get_server_types.py +39 -23
  36. pulumi_hcloud/get_servers.py +16 -9
  37. pulumi_hcloud/get_ssh_key.py +58 -36
  38. pulumi_hcloud/get_ssh_keys.py +35 -24
  39. pulumi_hcloud/get_volume.py +33 -16
  40. pulumi_hcloud/get_volumes.py +18 -11
  41. pulumi_hcloud/load_balancer.py +63 -64
  42. pulumi_hcloud/load_balancer_network.py +26 -17
  43. pulumi_hcloud/load_balancer_service.py +57 -54
  44. pulumi_hcloud/load_balancer_target.py +23 -18
  45. pulumi_hcloud/managed_certificate.py +57 -20
  46. pulumi_hcloud/network.py +27 -22
  47. pulumi_hcloud/network_route.py +13 -8
  48. pulumi_hcloud/network_subnet.py +13 -8
  49. pulumi_hcloud/outputs.py +265 -46
  50. pulumi_hcloud/placement_group.py +27 -22
  51. pulumi_hcloud/primary_ip.py +66 -47
  52. pulumi_hcloud/provider.py +5 -0
  53. pulumi_hcloud/pulumi-plugin.json +2 -1
  54. pulumi_hcloud/rdns.py +41 -40
  55. pulumi_hcloud/server.py +123 -176
  56. pulumi_hcloud/server_network.py +24 -17
  57. pulumi_hcloud/snapshot.py +25 -22
  58. pulumi_hcloud/ssh_key.py +52 -51
  59. pulumi_hcloud/uploaded_certificate.py +73 -20
  60. pulumi_hcloud/volume.py +37 -32
  61. pulumi_hcloud/volume_attachment.py +11 -8
  62. {pulumi_hcloud-1.18.0a1710156455.dist-info → pulumi_hcloud-1.22.0a1736849475.dist-info}/METADATA +7 -6
  63. pulumi_hcloud-1.22.0a1736849475.dist-info/RECORD +67 -0
  64. {pulumi_hcloud-1.18.0a1710156455.dist-info → pulumi_hcloud-1.22.0a1736849475.dist-info}/WHEEL +1 -1
  65. pulumi_hcloud-1.18.0a1710156455.dist-info/RECORD +0 -65
  66. {pulumi_hcloud-1.18.0a1710156455.dist-info → pulumi_hcloud-1.22.0a1736849475.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
 
12
17
  __all__ = [
@@ -51,7 +56,7 @@ class GetLocationResult:
51
56
  @pulumi.getter
52
57
  def city(self) -> str:
53
58
  """
54
- (string) City of the location.
59
+ Name of the closest city to the Location. City name and optionally state in short form.
55
60
  """
56
61
  return pulumi.get(self, "city")
57
62
 
@@ -59,7 +64,7 @@ class GetLocationResult:
59
64
  @pulumi.getter
60
65
  def country(self) -> str:
61
66
  """
62
- (string) Country of the location.
67
+ Country the Location resides in. ISO 3166-1 alpha-2 code of the country.
63
68
  """
64
69
  return pulumi.get(self, "country")
65
70
 
@@ -67,15 +72,15 @@ class GetLocationResult:
67
72
  @pulumi.getter
68
73
  def description(self) -> str:
69
74
  """
70
- (string) Description of the location.
75
+ Description of the Location.
71
76
  """
72
77
  return pulumi.get(self, "description")
73
78
 
74
79
  @property
75
80
  @pulumi.getter
76
- def id(self) -> int:
81
+ def id(self) -> Optional[int]:
77
82
  """
78
- (int) Unique ID of the location.
83
+ ID of the Location.
79
84
  """
80
85
  return pulumi.get(self, "id")
81
86
 
@@ -83,7 +88,7 @@ class GetLocationResult:
83
88
  @pulumi.getter
84
89
  def latitude(self) -> float:
85
90
  """
86
- (float) Latitude of the city.
91
+ Latitude of the city closest to the Location.
87
92
  """
88
93
  return pulumi.get(self, "latitude")
89
94
 
@@ -91,15 +96,15 @@ class GetLocationResult:
91
96
  @pulumi.getter
92
97
  def longitude(self) -> float:
93
98
  """
94
- (float) Longitude of the city.
99
+ Longitude of the city closest to the Location.
95
100
  """
96
101
  return pulumi.get(self, "longitude")
97
102
 
98
103
  @property
99
104
  @pulumi.getter
100
- def name(self) -> str:
105
+ def name(self) -> Optional[str]:
101
106
  """
102
- (string) Name of the location.
107
+ Name of the Location.
103
108
  """
104
109
  return pulumi.get(self, "name")
105
110
 
@@ -107,7 +112,7 @@ class GetLocationResult:
107
112
  @pulumi.getter(name="networkZone")
108
113
  def network_zone(self) -> str:
109
114
  """
110
- (string) Network Zone of the location.
115
+ Name of the Network Zone this Location resides in.
111
116
  """
112
117
  return pulumi.get(self, "network_zone")
113
118
 
@@ -133,23 +138,22 @@ def get_location(id: Optional[int] = None,
133
138
  opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLocationResult:
134
139
  """
135
140
  Provides details about a specific Hetzner Cloud Location.
136
- Use this resource to get detailed information about specific location.
141
+
142
+ Use this resource to get detailed information about a specific Location.
137
143
 
138
144
  ## Example Usage
139
145
 
140
- <!--Start PulumiCodeChooser -->
141
146
  ```python
142
147
  import pulumi
143
148
  import pulumi_hcloud as hcloud
144
149
 
145
- l1 = hcloud.get_location(name="fsn1")
146
- l2 = hcloud.get_location(id=1)
150
+ by_id = hcloud.get_location(id=1)
151
+ by_name = hcloud.get_location(name="fsn1")
147
152
  ```
148
- <!--End PulumiCodeChooser -->
149
153
 
150
154
 
151
- :param int id: ID of the location.
152
- :param str name: Name of the location.
155
+ :param int id: ID of the Location.
156
+ :param str name: Name of the Location.
153
157
  """
154
158
  __args__ = dict()
155
159
  __args__['id'] = id
@@ -166,30 +170,39 @@ def get_location(id: Optional[int] = None,
166
170
  longitude=pulumi.get(__ret__, 'longitude'),
167
171
  name=pulumi.get(__ret__, 'name'),
168
172
  network_zone=pulumi.get(__ret__, 'network_zone'))
169
-
170
-
171
- @_utilities.lift_output_func(get_location)
172
173
  def get_location_output(id: Optional[pulumi.Input[Optional[int]]] = None,
173
174
  name: Optional[pulumi.Input[Optional[str]]] = None,
174
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetLocationResult]:
175
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetLocationResult]:
175
176
  """
176
177
  Provides details about a specific Hetzner Cloud Location.
177
- Use this resource to get detailed information about specific location.
178
+
179
+ Use this resource to get detailed information about a specific Location.
178
180
 
179
181
  ## Example Usage
180
182
 
181
- <!--Start PulumiCodeChooser -->
182
183
  ```python
183
184
  import pulumi
184
185
  import pulumi_hcloud as hcloud
185
186
 
186
- l1 = hcloud.get_location(name="fsn1")
187
- l2 = hcloud.get_location(id=1)
187
+ by_id = hcloud.get_location(id=1)
188
+ by_name = hcloud.get_location(name="fsn1")
188
189
  ```
189
- <!--End PulumiCodeChooser -->
190
190
 
191
191
 
192
- :param int id: ID of the location.
193
- :param str name: Name of the location.
192
+ :param int id: ID of the Location.
193
+ :param str name: Name of the Location.
194
194
  """
195
- ...
195
+ __args__ = dict()
196
+ __args__['id'] = id
197
+ __args__['name'] = name
198
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
199
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getLocation:getLocation', __args__, opts=opts, typ=GetLocationResult)
200
+ return __ret__.apply(lambda __response__: GetLocationResult(
201
+ city=pulumi.get(__response__, 'city'),
202
+ country=pulumi.get(__response__, 'country'),
203
+ description=pulumi.get(__response__, 'description'),
204
+ id=pulumi.get(__response__, 'id'),
205
+ latitude=pulumi.get(__response__, 'latitude'),
206
+ longitude=pulumi.get(__response__, 'longitude'),
207
+ name=pulumi.get(__response__, 'name'),
208
+ network_zone=pulumi.get(__response__, 'network_zone')))
@@ -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
 
@@ -41,48 +46,33 @@ class GetLocationsResult:
41
46
 
42
47
  @property
43
48
  @pulumi.getter
44
- def descriptions(self) -> Optional[Sequence[str]]:
45
- """
46
- (list) List of all location descriptions. **Deprecated**: Use `locations` attribute instead.
47
- """
48
- warnings.warn("""Use locations list instead""", DeprecationWarning)
49
- pulumi.log.warn("""descriptions is deprecated: Use locations list instead""")
50
-
49
+ @_utilities.deprecated("""Use locations list instead""")
50
+ def descriptions(self) -> Sequence[str]:
51
51
  return pulumi.get(self, "descriptions")
52
52
 
53
53
  @property
54
54
  @pulumi.getter
55
- def id(self) -> Optional[str]:
55
+ def id(self) -> str:
56
+ """
57
+ The ID of this resource.
58
+ """
56
59
  return pulumi.get(self, "id")
57
60
 
58
61
  @property
59
62
  @pulumi.getter(name="locationIds")
60
- def location_ids(self) -> Optional[Sequence[str]]:
61
- """
62
- (list) List of unique location identifiers. **Deprecated**: Use `locations` attribute instead.
63
- """
64
- warnings.warn("""Use locations list instead""", DeprecationWarning)
65
- pulumi.log.warn("""location_ids is deprecated: Use locations list instead""")
66
-
63
+ @_utilities.deprecated("""Use locations list instead""")
64
+ def location_ids(self) -> Sequence[str]:
67
65
  return pulumi.get(self, "location_ids")
68
66
 
69
67
  @property
70
68
  @pulumi.getter
71
69
  def locations(self) -> Sequence['outputs.GetLocationsLocationResult']:
72
- """
73
- (list) List of all locations. See `data.hcloud_location` for schema.
74
- """
75
70
  return pulumi.get(self, "locations")
76
71
 
77
72
  @property
78
73
  @pulumi.getter
79
- def names(self) -> Optional[Sequence[str]]:
80
- """
81
- (list) List of location names. **Deprecated**: Use `locations` attribute instead.
82
- """
83
- warnings.warn("""Use locations list instead""", DeprecationWarning)
84
- pulumi.log.warn("""names is deprecated: Use locations list instead""")
85
-
74
+ @_utilities.deprecated("""Use locations list instead""")
75
+ def names(self) -> Sequence[str]:
86
76
  return pulumi.get(self, "names")
87
77
 
88
78
 
@@ -99,25 +89,13 @@ class AwaitableGetLocationsResult(GetLocationsResult):
99
89
  names=self.names)
100
90
 
101
91
 
102
- def get_locations(descriptions: Optional[Sequence[str]] = None,
103
- id: Optional[str] = None,
104
- location_ids: Optional[Sequence[str]] = None,
105
- names: Optional[Sequence[str]] = None,
106
- opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLocationsResult:
92
+ def get_locations(opts: Optional[pulumi.InvokeOptions] = None) -> AwaitableGetLocationsResult:
107
93
  """
108
94
  Provides a list of available Hetzner Cloud Locations.
109
- This resource may be useful to create highly available infrastructure, distributed across several locations.
110
95
 
111
-
112
- :param Sequence[str] descriptions: (list) List of all location descriptions. **Deprecated**: Use `locations` attribute instead.
113
- :param Sequence[str] location_ids: (list) List of unique location identifiers. **Deprecated**: Use `locations` attribute instead.
114
- :param Sequence[str] names: (list) List of location names. **Deprecated**: Use `locations` attribute instead.
96
+ This resource may be useful to create highly available infrastructure, distributed across several locations.
115
97
  """
116
98
  __args__ = dict()
117
- __args__['descriptions'] = descriptions
118
- __args__['id'] = id
119
- __args__['locationIds'] = location_ids
120
- __args__['names'] = names
121
99
  opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
122
100
  __ret__ = pulumi.runtime.invoke('hcloud:index/getLocations:getLocations', __args__, opts=opts, typ=GetLocationsResult).value
123
101
 
@@ -127,21 +105,18 @@ def get_locations(descriptions: Optional[Sequence[str]] = None,
127
105
  location_ids=pulumi.get(__ret__, 'location_ids'),
128
106
  locations=pulumi.get(__ret__, 'locations'),
129
107
  names=pulumi.get(__ret__, 'names'))
130
-
131
-
132
- @_utilities.lift_output_func(get_locations)
133
- def get_locations_output(descriptions: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
134
- id: Optional[pulumi.Input[Optional[str]]] = None,
135
- location_ids: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
136
- names: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
137
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetLocationsResult]:
108
+ def get_locations_output(opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetLocationsResult]:
138
109
  """
139
110
  Provides a list of available Hetzner Cloud Locations.
140
- This resource may be useful to create highly available infrastructure, distributed across several locations.
141
-
142
111
 
143
- :param Sequence[str] descriptions: (list) List of all location descriptions. **Deprecated**: Use `locations` attribute instead.
144
- :param Sequence[str] location_ids: (list) List of unique location identifiers. **Deprecated**: Use `locations` attribute instead.
145
- :param Sequence[str] names: (list) List of location names. **Deprecated**: Use `locations` attribute instead.
112
+ This resource may be useful to create highly available infrastructure, distributed across several locations.
146
113
  """
147
- ...
114
+ __args__ = dict()
115
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
116
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getLocations:getLocations', __args__, opts=opts, typ=GetLocationsResult)
117
+ return __ret__.apply(lambda __response__: GetLocationsResult(
118
+ descriptions=pulumi.get(__response__, 'descriptions'),
119
+ id=pulumi.get(__response__, 'id'),
120
+ location_ids=pulumi.get(__response__, 'location_ids'),
121
+ locations=pulumi.get(__response__, 'locations'),
122
+ names=pulumi.get(__response__, 'names')))
@@ -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__ = [
@@ -81,15 +86,13 @@ class GetNetworkResult:
81
86
 
82
87
  @property
83
88
  @pulumi.getter
84
- def labels(self) -> Mapping[str, Any]:
89
+ def labels(self) -> Mapping[str, str]:
85
90
  return pulumi.get(self, "labels")
86
91
 
87
92
  @property
88
93
  @pulumi.getter(name="mostRecent")
94
+ @_utilities.deprecated("""This attribute has no purpose.""")
89
95
  def most_recent(self) -> Optional[bool]:
90
- warnings.warn("""This attribute has no purpose.""", DeprecationWarning)
91
- pulumi.log.warn("""most_recent is deprecated: This attribute has no purpose.""")
92
-
93
96
  return pulumi.get(self, "most_recent")
94
97
 
95
98
  @property
@@ -124,7 +127,7 @@ class AwaitableGetNetworkResult(GetNetworkResult):
124
127
 
125
128
  def get_network(id: Optional[int] = None,
126
129
  ip_range: Optional[str] = None,
127
- labels: Optional[Mapping[str, Any]] = None,
130
+ labels: Optional[Mapping[str, str]] = None,
128
131
  most_recent: Optional[bool] = None,
129
132
  name: Optional[str] = None,
130
133
  with_selector: Optional[str] = None,
@@ -132,7 +135,6 @@ def get_network(id: Optional[int] = None,
132
135
  """
133
136
  ## Example Usage
134
137
 
135
- <!--Start PulumiCodeChooser -->
136
138
  ```python
137
139
  import pulumi
138
140
  import pulumi_hcloud as hcloud
@@ -141,7 +143,6 @@ def get_network(id: Optional[int] = None,
141
143
  network2 = hcloud.get_network(name="my-network")
142
144
  network3 = hcloud.get_network(with_selector="key=value")
143
145
  ```
144
- <!--End PulumiCodeChooser -->
145
146
 
146
147
 
147
148
  :param int id: ID of the Network.
@@ -168,20 +169,16 @@ def get_network(id: Optional[int] = None,
168
169
  most_recent=pulumi.get(__ret__, 'most_recent'),
169
170
  name=pulumi.get(__ret__, 'name'),
170
171
  with_selector=pulumi.get(__ret__, 'with_selector'))
171
-
172
-
173
- @_utilities.lift_output_func(get_network)
174
172
  def get_network_output(id: Optional[pulumi.Input[Optional[int]]] = None,
175
173
  ip_range: Optional[pulumi.Input[Optional[str]]] = None,
176
- labels: Optional[pulumi.Input[Optional[Mapping[str, Any]]]] = None,
174
+ labels: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
177
175
  most_recent: Optional[pulumi.Input[Optional[bool]]] = None,
178
176
  name: Optional[pulumi.Input[Optional[str]]] = None,
179
177
  with_selector: Optional[pulumi.Input[Optional[str]]] = None,
180
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworkResult]:
178
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNetworkResult]:
181
179
  """
182
180
  ## Example Usage
183
181
 
184
- <!--Start PulumiCodeChooser -->
185
182
  ```python
186
183
  import pulumi
187
184
  import pulumi_hcloud as hcloud
@@ -190,7 +187,6 @@ def get_network_output(id: Optional[pulumi.Input[Optional[int]]] = None,
190
187
  network2 = hcloud.get_network(name="my-network")
191
188
  network3 = hcloud.get_network(with_selector="key=value")
192
189
  ```
193
- <!--End PulumiCodeChooser -->
194
190
 
195
191
 
196
192
  :param int id: ID of the Network.
@@ -198,4 +194,21 @@ def get_network_output(id: Optional[pulumi.Input[Optional[int]]] = None,
198
194
  :param str name: Name of the Network.
199
195
  :param str with_selector: Label Selector. For more information about possible values, visit the [Hetzner Cloud Documentation](https://docs.hetzner.cloud/#overview-label-selector).
200
196
  """
201
- ...
197
+ __args__ = dict()
198
+ __args__['id'] = id
199
+ __args__['ipRange'] = ip_range
200
+ __args__['labels'] = labels
201
+ __args__['mostRecent'] = most_recent
202
+ __args__['name'] = name
203
+ __args__['withSelector'] = with_selector
204
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
205
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getNetwork:getNetwork', __args__, opts=opts, typ=GetNetworkResult)
206
+ return __ret__.apply(lambda __response__: GetNetworkResult(
207
+ delete_protection=pulumi.get(__response__, 'delete_protection'),
208
+ expose_routes_to_vswitch=pulumi.get(__response__, 'expose_routes_to_vswitch'),
209
+ id=pulumi.get(__response__, 'id'),
210
+ ip_range=pulumi.get(__response__, 'ip_range'),
211
+ labels=pulumi.get(__response__, 'labels'),
212
+ most_recent=pulumi.get(__response__, 'most_recent'),
213
+ name=pulumi.get(__response__, 'name'),
214
+ 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
 
@@ -73,7 +78,6 @@ def get_networks(with_selector: Optional[str] = None,
73
78
 
74
79
  ## Example Usage
75
80
 
76
- <!--Start PulumiCodeChooser -->
77
81
  ```python
78
82
  import pulumi
79
83
  import pulumi_hcloud as hcloud
@@ -81,7 +85,6 @@ def get_networks(with_selector: Optional[str] = None,
81
85
  network2 = hcloud.get_network()
82
86
  network3 = hcloud.get_network(with_selector="key=value")
83
87
  ```
84
- <!--End PulumiCodeChooser -->
85
88
 
86
89
 
87
90
  :param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
@@ -95,17 +98,13 @@ def get_networks(with_selector: Optional[str] = None,
95
98
  id=pulumi.get(__ret__, 'id'),
96
99
  networks=pulumi.get(__ret__, 'networks'),
97
100
  with_selector=pulumi.get(__ret__, 'with_selector'))
98
-
99
-
100
- @_utilities.lift_output_func(get_networks)
101
101
  def get_networks_output(with_selector: Optional[pulumi.Input[Optional[str]]] = None,
102
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetNetworksResult]:
102
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetNetworksResult]:
103
103
  """
104
104
  Provides details about multiple Hetzner Cloud Networks.
105
105
 
106
106
  ## Example Usage
107
107
 
108
- <!--Start PulumiCodeChooser -->
109
108
  ```python
110
109
  import pulumi
111
110
  import pulumi_hcloud as hcloud
@@ -113,9 +112,15 @@ def get_networks_output(with_selector: Optional[pulumi.Input[Optional[str]]] = N
113
112
  network2 = hcloud.get_network()
114
113
  network3 = hcloud.get_network(with_selector="key=value")
115
114
  ```
116
- <!--End PulumiCodeChooser -->
117
115
 
118
116
 
119
117
  :param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
120
118
  """
121
- ...
119
+ __args__ = dict()
120
+ __args__['withSelector'] = with_selector
121
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
122
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getNetworks:getNetworks', __args__, opts=opts, typ=GetNetworksResult)
123
+ return __ret__.apply(lambda __response__: GetNetworksResult(
124
+ id=pulumi.get(__response__, 'id'),
125
+ networks=pulumi.get(__response__, 'networks'),
126
+ 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__ = [
@@ -54,7 +59,7 @@ class GetPlacementGroupResult:
54
59
 
55
60
  @property
56
61
  @pulumi.getter
57
- def labels(self) -> Mapping[str, Any]:
62
+ def labels(self) -> Mapping[str, str]:
58
63
  """
59
64
  (map) User-defined labels (key-value pairs)
60
65
  """
@@ -82,7 +87,7 @@ class GetPlacementGroupResult:
82
87
  @pulumi.getter
83
88
  def type(self) -> str:
84
89
  """
85
- (string) Type of the Placement Group.
90
+ (string) Type of the Placement Group.
86
91
  """
87
92
  return pulumi.get(self, "type")
88
93
 
@@ -108,7 +113,7 @@ class AwaitableGetPlacementGroupResult(GetPlacementGroupResult):
108
113
 
109
114
 
110
115
  def get_placement_group(id: Optional[int] = None,
111
- labels: Optional[Mapping[str, Any]] = None,
116
+ labels: Optional[Mapping[str, str]] = None,
112
117
  most_recent: Optional[bool] = None,
113
118
  name: Optional[str] = None,
114
119
  type: Optional[str] = None,
@@ -117,7 +122,6 @@ def get_placement_group(id: Optional[int] = None,
117
122
  """
118
123
  Provides details about a specific Hetzner Cloud Placement Group.
119
124
 
120
- <!--Start PulumiCodeChooser -->
121
125
  ```python
122
126
  import pulumi
123
127
  import pulumi_hcloud as hcloud
@@ -125,14 +129,13 @@ def get_placement_group(id: Optional[int] = None,
125
129
  sample_placement_group1 = hcloud.get_placement_group(name="sample-placement-group-1")
126
130
  sample_placement_group2 = hcloud.get_placement_group(id=4711)
127
131
  ```
128
- <!--End PulumiCodeChooser -->
129
132
 
130
133
 
131
134
  :param int id: ID of the placement group.
132
- :param Mapping[str, Any] labels: (map) User-defined labels (key-value pairs)
135
+ :param Mapping[str, str] labels: (map) User-defined labels (key-value pairs)
133
136
  :param bool most_recent: Return most recent placement group if multiple are found.
134
137
  :param str name: Name of the placement group.
135
- :param str type: (string) Type of the Placement Group.
138
+ :param str type: (string) Type of the Placement Group.
136
139
  :param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
137
140
  """
138
141
  __args__ = dict()
@@ -153,20 +156,16 @@ def get_placement_group(id: Optional[int] = None,
153
156
  servers=pulumi.get(__ret__, 'servers'),
154
157
  type=pulumi.get(__ret__, 'type'),
155
158
  with_selector=pulumi.get(__ret__, 'with_selector'))
156
-
157
-
158
- @_utilities.lift_output_func(get_placement_group)
159
159
  def get_placement_group_output(id: Optional[pulumi.Input[Optional[int]]] = None,
160
- labels: Optional[pulumi.Input[Optional[Mapping[str, Any]]]] = None,
160
+ labels: Optional[pulumi.Input[Optional[Mapping[str, str]]]] = None,
161
161
  most_recent: Optional[pulumi.Input[Optional[bool]]] = None,
162
162
  name: Optional[pulumi.Input[Optional[str]]] = None,
163
163
  type: Optional[pulumi.Input[Optional[str]]] = None,
164
164
  with_selector: Optional[pulumi.Input[Optional[str]]] = None,
165
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPlacementGroupResult]:
165
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPlacementGroupResult]:
166
166
  """
167
167
  Provides details about a specific Hetzner Cloud Placement Group.
168
168
 
169
- <!--Start PulumiCodeChooser -->
170
169
  ```python
171
170
  import pulumi
172
171
  import pulumi_hcloud as hcloud
@@ -174,14 +173,29 @@ def get_placement_group_output(id: Optional[pulumi.Input[Optional[int]]] = None,
174
173
  sample_placement_group1 = hcloud.get_placement_group(name="sample-placement-group-1")
175
174
  sample_placement_group2 = hcloud.get_placement_group(id=4711)
176
175
  ```
177
- <!--End PulumiCodeChooser -->
178
176
 
179
177
 
180
178
  :param int id: ID of the placement group.
181
- :param Mapping[str, Any] labels: (map) User-defined labels (key-value pairs)
179
+ :param Mapping[str, str] labels: (map) User-defined labels (key-value pairs)
182
180
  :param bool most_recent: Return most recent placement group if multiple are found.
183
181
  :param str name: Name of the placement group.
184
- :param str type: (string) Type of the Placement Group.
182
+ :param str type: (string) Type of the Placement Group.
185
183
  :param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
186
184
  """
187
- ...
185
+ __args__ = dict()
186
+ __args__['id'] = id
187
+ __args__['labels'] = labels
188
+ __args__['mostRecent'] = most_recent
189
+ __args__['name'] = name
190
+ __args__['type'] = type
191
+ __args__['withSelector'] = with_selector
192
+ opts = pulumi.InvokeOutputOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
193
+ __ret__ = pulumi.runtime.invoke_output('hcloud:index/getPlacementGroup:getPlacementGroup', __args__, opts=opts, typ=GetPlacementGroupResult)
194
+ return __ret__.apply(lambda __response__: GetPlacementGroupResult(
195
+ id=pulumi.get(__response__, 'id'),
196
+ labels=pulumi.get(__response__, 'labels'),
197
+ most_recent=pulumi.get(__response__, 'most_recent'),
198
+ name=pulumi.get(__response__, 'name'),
199
+ servers=pulumi.get(__response__, 'servers'),
200
+ type=pulumi.get(__response__, 'type'),
201
+ 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
 
@@ -83,7 +88,6 @@ def get_placement_groups(most_recent: Optional[bool] = None,
83
88
 
84
89
  ## Example Usage
85
90
 
86
- <!--Start PulumiCodeChooser -->
87
91
  ```python
88
92
  import pulumi
89
93
  import pulumi_hcloud as hcloud
@@ -91,7 +95,6 @@ def get_placement_groups(most_recent: Optional[bool] = None,
91
95
  sample_placement_group1 = hcloud.get_placement_groups()
92
96
  sample_placement_group2 = hcloud.get_placement_groups(with_selector="key=value")
93
97
  ```
94
- <!--End PulumiCodeChooser -->
95
98
 
96
99
 
97
100
  :param bool most_recent: Sorts list by date.
@@ -108,18 +111,14 @@ def get_placement_groups(most_recent: Optional[bool] = None,
108
111
  most_recent=pulumi.get(__ret__, 'most_recent'),
109
112
  placement_groups=pulumi.get(__ret__, 'placement_groups'),
110
113
  with_selector=pulumi.get(__ret__, 'with_selector'))
111
-
112
-
113
- @_utilities.lift_output_func(get_placement_groups)
114
114
  def get_placement_groups_output(most_recent: Optional[pulumi.Input[Optional[bool]]] = None,
115
115
  with_selector: Optional[pulumi.Input[Optional[str]]] = None,
116
- opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPlacementGroupsResult]:
116
+ opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPlacementGroupsResult]:
117
117
  """
118
118
  Provides details about multiple Hetzner Cloud Placement Groups.
119
119
 
120
120
  ## Example Usage
121
121
 
122
- <!--Start PulumiCodeChooser -->
123
122
  ```python
124
123
  import pulumi
125
124
  import pulumi_hcloud as hcloud
@@ -127,10 +126,18 @@ def get_placement_groups_output(most_recent: Optional[pulumi.Input[Optional[bool
127
126
  sample_placement_group1 = hcloud.get_placement_groups()
128
127
  sample_placement_group2 = hcloud.get_placement_groups(with_selector="key=value")
129
128
  ```
130
- <!--End PulumiCodeChooser -->
131
129
 
132
130
 
133
131
  :param bool most_recent: Sorts list by date.
134
132
  :param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
135
133
  """
136
- ...
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')))