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.
- pulumi_hcloud/__init__.py +2 -0
- pulumi_hcloud/_inputs.py +247 -15
- pulumi_hcloud/_utilities.py +41 -5
- pulumi_hcloud/certificate.py +15 -10
- pulumi_hcloud/config/__init__.pyi +5 -0
- pulumi_hcloud/config/vars.py +5 -0
- pulumi_hcloud/firewall.py +77 -70
- pulumi_hcloud/firewall_attachment.py +27 -26
- pulumi_hcloud/floating_ip.py +39 -36
- pulumi_hcloud/floating_ip_assignment.py +11 -8
- pulumi_hcloud/get_certificate.py +25 -10
- pulumi_hcloud/get_certificates.py +14 -9
- pulumi_hcloud/get_datacenter.py +38 -27
- pulumi_hcloud/get_datacenters.py +28 -53
- pulumi_hcloud/get_firewall.py +38 -23
- pulumi_hcloud/get_firewalls.py +16 -9
- pulumi_hcloud/get_floating_ip.py +37 -17
- pulumi_hcloud/get_floating_ips.py +14 -9
- pulumi_hcloud/get_image.py +37 -13
- pulumi_hcloud/get_images.py +22 -9
- pulumi_hcloud/get_load_balancer.py +30 -11
- pulumi_hcloud/get_load_balancer_type.py +202 -0
- pulumi_hcloud/get_load_balancer_types.py +100 -0
- pulumi_hcloud/get_load_balancers.py +14 -9
- pulumi_hcloud/get_location.py +42 -29
- pulumi_hcloud/get_locations.py +28 -53
- pulumi_hcloud/get_network.py +28 -15
- pulumi_hcloud/get_networks.py +14 -9
- pulumi_hcloud/get_placement_group.py +31 -17
- pulumi_hcloud/get_placement_groups.py +16 -9
- pulumi_hcloud/get_primary_ip.py +42 -22
- pulumi_hcloud/get_primary_ips.py +14 -9
- pulumi_hcloud/get_server.py +43 -15
- pulumi_hcloud/get_server_type.py +75 -53
- pulumi_hcloud/get_server_types.py +39 -23
- pulumi_hcloud/get_servers.py +16 -9
- pulumi_hcloud/get_ssh_key.py +58 -36
- pulumi_hcloud/get_ssh_keys.py +35 -24
- pulumi_hcloud/get_volume.py +33 -16
- pulumi_hcloud/get_volumes.py +18 -11
- pulumi_hcloud/load_balancer.py +63 -64
- pulumi_hcloud/load_balancer_network.py +26 -17
- pulumi_hcloud/load_balancer_service.py +57 -54
- pulumi_hcloud/load_balancer_target.py +23 -18
- pulumi_hcloud/managed_certificate.py +57 -20
- pulumi_hcloud/network.py +27 -22
- pulumi_hcloud/network_route.py +13 -8
- pulumi_hcloud/network_subnet.py +13 -8
- pulumi_hcloud/outputs.py +265 -46
- pulumi_hcloud/placement_group.py +27 -22
- pulumi_hcloud/primary_ip.py +66 -47
- pulumi_hcloud/provider.py +5 -0
- pulumi_hcloud/pulumi-plugin.json +2 -1
- pulumi_hcloud/rdns.py +41 -40
- pulumi_hcloud/server.py +123 -176
- pulumi_hcloud/server_network.py +24 -17
- pulumi_hcloud/snapshot.py +25 -22
- pulumi_hcloud/ssh_key.py +52 -51
- pulumi_hcloud/uploaded_certificate.py +73 -20
- pulumi_hcloud/volume.py +37 -32
- pulumi_hcloud/volume_attachment.py +11 -8
- {pulumi_hcloud-1.18.0a1710156455.dist-info → pulumi_hcloud-1.22.0a1736849475.dist-info}/METADATA +7 -6
- pulumi_hcloud-1.22.0a1736849475.dist-info/RECORD +67 -0
- {pulumi_hcloud-1.18.0a1710156455.dist-info → pulumi_hcloud-1.22.0a1736849475.dist-info}/WHEEL +1 -1
- pulumi_hcloud-1.18.0a1710156455.dist-info/RECORD +0 -65
- {pulumi_hcloud-1.18.0a1710156455.dist-info → pulumi_hcloud-1.22.0a1736849475.dist-info}/top_level.txt +0 -0
pulumi_hcloud/get_primary_ip.py
CHANGED
|
@@ -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,
|
|
133
|
+
def labels(self) -> Mapping[str, str]:
|
|
129
134
|
"""
|
|
130
|
-
(
|
|
135
|
+
(map) User-defined labels (key-value pairs).
|
|
131
136
|
"""
|
|
132
137
|
return pulumi.get(self, "labels")
|
|
133
138
|
|
|
@@ -198,7 +203,6 @@ def get_primary_ip(assignee_id: Optional[int] = None,
|
|
|
198
203
|
|
|
199
204
|
### Additional Examples
|
|
200
205
|
|
|
201
|
-
<!--Start PulumiCodeChooser -->
|
|
202
206
|
```python
|
|
203
207
|
import pulumi
|
|
204
208
|
import pulumi_hcloud as hcloud
|
|
@@ -207,18 +211,18 @@ def get_primary_ip(assignee_id: Optional[int] = None,
|
|
|
207
211
|
ip2 = hcloud.get_primary_ip(name="primary_ip_1")
|
|
208
212
|
ip3 = hcloud.get_primary_ip(with_selector="key=value")
|
|
209
213
|
# Link a server to an existing primary IP
|
|
210
|
-
server_test = hcloud.Server("
|
|
214
|
+
server_test = hcloud.Server("server_test",
|
|
215
|
+
name="test-server",
|
|
211
216
|
image="ubuntu-20.04",
|
|
212
|
-
server_type="
|
|
217
|
+
server_type="cx22",
|
|
213
218
|
datacenter="fsn1-dc14",
|
|
214
219
|
labels={
|
|
215
220
|
"test": "tessst1",
|
|
216
221
|
},
|
|
217
|
-
public_nets=[
|
|
218
|
-
ipv4
|
|
219
|
-
|
|
222
|
+
public_nets=[{
|
|
223
|
+
"ipv4": ip1_hcloud_primary_ip["id"],
|
|
224
|
+
}])
|
|
220
225
|
```
|
|
221
|
-
<!--End PulumiCodeChooser -->
|
|
222
226
|
|
|
223
227
|
|
|
224
228
|
:param int assignee_id: (int) ID of the assigned resource.
|
|
@@ -249,15 +253,12 @@ def get_primary_ip(assignee_id: Optional[int] = None,
|
|
|
249
253
|
name=pulumi.get(__ret__, 'name'),
|
|
250
254
|
type=pulumi.get(__ret__, 'type'),
|
|
251
255
|
with_selector=pulumi.get(__ret__, 'with_selector'))
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
@_utilities.lift_output_func(get_primary_ip)
|
|
255
256
|
def get_primary_ip_output(assignee_id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
256
257
|
id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
257
258
|
ip_address: Optional[pulumi.Input[Optional[str]]] = None,
|
|
258
259
|
name: Optional[pulumi.Input[Optional[str]]] = None,
|
|
259
260
|
with_selector: Optional[pulumi.Input[Optional[str]]] = None,
|
|
260
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPrimaryIpResult]:
|
|
261
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPrimaryIpResult]:
|
|
261
262
|
"""
|
|
262
263
|
Provides details about a Hetzner Cloud Primary IP.
|
|
263
264
|
|
|
@@ -277,7 +278,6 @@ def get_primary_ip_output(assignee_id: Optional[pulumi.Input[Optional[int]]] = N
|
|
|
277
278
|
|
|
278
279
|
### Additional Examples
|
|
279
280
|
|
|
280
|
-
<!--Start PulumiCodeChooser -->
|
|
281
281
|
```python
|
|
282
282
|
import pulumi
|
|
283
283
|
import pulumi_hcloud as hcloud
|
|
@@ -286,18 +286,18 @@ def get_primary_ip_output(assignee_id: Optional[pulumi.Input[Optional[int]]] = N
|
|
|
286
286
|
ip2 = hcloud.get_primary_ip(name="primary_ip_1")
|
|
287
287
|
ip3 = hcloud.get_primary_ip(with_selector="key=value")
|
|
288
288
|
# Link a server to an existing primary IP
|
|
289
|
-
server_test = hcloud.Server("
|
|
289
|
+
server_test = hcloud.Server("server_test",
|
|
290
|
+
name="test-server",
|
|
290
291
|
image="ubuntu-20.04",
|
|
291
|
-
server_type="
|
|
292
|
+
server_type="cx22",
|
|
292
293
|
datacenter="fsn1-dc14",
|
|
293
294
|
labels={
|
|
294
295
|
"test": "tessst1",
|
|
295
296
|
},
|
|
296
|
-
public_nets=[
|
|
297
|
-
ipv4
|
|
298
|
-
|
|
297
|
+
public_nets=[{
|
|
298
|
+
"ipv4": ip1_hcloud_primary_ip["id"],
|
|
299
|
+
}])
|
|
299
300
|
```
|
|
300
|
-
<!--End PulumiCodeChooser -->
|
|
301
301
|
|
|
302
302
|
|
|
303
303
|
:param int assignee_id: (int) ID of the assigned resource.
|
|
@@ -306,4 +306,24 @@ def get_primary_ip_output(assignee_id: Optional[pulumi.Input[Optional[int]]] = N
|
|
|
306
306
|
:param str name: Name of the Primary IP.
|
|
307
307
|
:param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
|
|
308
308
|
"""
|
|
309
|
-
|
|
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')))
|
pulumi_hcloud/get_primary_ips.py
CHANGED
|
@@ -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,14 +78,12 @@ def get_primary_ips(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
|
|
80
84
|
|
|
81
85
|
ip2 = hcloud.get_primary_ips(with_selector="key=value")
|
|
82
86
|
```
|
|
83
|
-
<!--End PulumiCodeChooser -->
|
|
84
87
|
|
|
85
88
|
|
|
86
89
|
:param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
|
|
@@ -94,26 +97,28 @@ def get_primary_ips(with_selector: Optional[str] = None,
|
|
|
94
97
|
id=pulumi.get(__ret__, 'id'),
|
|
95
98
|
primary_ips=pulumi.get(__ret__, 'primary_ips'),
|
|
96
99
|
with_selector=pulumi.get(__ret__, 'with_selector'))
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
@_utilities.lift_output_func(get_primary_ips)
|
|
100
100
|
def get_primary_ips_output(with_selector: Optional[pulumi.Input[Optional[str]]] = None,
|
|
101
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetPrimaryIpsResult]:
|
|
101
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetPrimaryIpsResult]:
|
|
102
102
|
"""
|
|
103
103
|
Provides details about multiple Hetzner Cloud Primary IPs.
|
|
104
104
|
|
|
105
105
|
## Example Usage
|
|
106
106
|
|
|
107
|
-
<!--Start PulumiCodeChooser -->
|
|
108
107
|
```python
|
|
109
108
|
import pulumi
|
|
110
109
|
import pulumi_hcloud as hcloud
|
|
111
110
|
|
|
112
111
|
ip2 = hcloud.get_primary_ips(with_selector="key=value")
|
|
113
112
|
```
|
|
114
|
-
<!--End PulumiCodeChooser -->
|
|
115
113
|
|
|
116
114
|
|
|
117
115
|
:param str with_selector: [Label selector](https://docs.hetzner.cloud/#overview-label-selector)
|
|
118
116
|
"""
|
|
119
|
-
|
|
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')))
|
pulumi_hcloud/get_server.py
CHANGED
|
@@ -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,
|
|
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
|
|
@@ -309,7 +312,6 @@ def get_server(id: Optional[int] = None,
|
|
|
309
312
|
"""
|
|
310
313
|
## Example Usage
|
|
311
314
|
|
|
312
|
-
<!--Start PulumiCodeChooser -->
|
|
313
315
|
```python
|
|
314
316
|
import pulumi
|
|
315
317
|
import pulumi_hcloud as hcloud
|
|
@@ -318,7 +320,6 @@ def get_server(id: Optional[int] = None,
|
|
|
318
320
|
s2 = hcloud.get_server(id=123)
|
|
319
321
|
s3 = hcloud.get_server(with_selector="key=value")
|
|
320
322
|
```
|
|
321
|
-
<!--End PulumiCodeChooser -->
|
|
322
323
|
|
|
323
324
|
|
|
324
325
|
:param int id: ID of the server.
|
|
@@ -361,20 +362,16 @@ def get_server(id: Optional[int] = None,
|
|
|
361
362
|
status=pulumi.get(__ret__, 'status'),
|
|
362
363
|
with_selector=pulumi.get(__ret__, 'with_selector'),
|
|
363
364
|
with_statuses=pulumi.get(__ret__, 'with_statuses'))
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
@_utilities.lift_output_func(get_server)
|
|
367
365
|
def get_server_output(id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
368
366
|
name: Optional[pulumi.Input[Optional[str]]] = None,
|
|
369
367
|
placement_group_id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
370
368
|
selector: Optional[pulumi.Input[Optional[str]]] = None,
|
|
371
369
|
with_selector: Optional[pulumi.Input[Optional[str]]] = None,
|
|
372
370
|
with_statuses: Optional[pulumi.Input[Optional[Sequence[str]]]] = None,
|
|
373
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServerResult]:
|
|
371
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServerResult]:
|
|
374
372
|
"""
|
|
375
373
|
## Example Usage
|
|
376
374
|
|
|
377
|
-
<!--Start PulumiCodeChooser -->
|
|
378
375
|
```python
|
|
379
376
|
import pulumi
|
|
380
377
|
import pulumi_hcloud as hcloud
|
|
@@ -383,7 +380,6 @@ def get_server_output(id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
|
383
380
|
s2 = hcloud.get_server(id=123)
|
|
384
381
|
s3 = hcloud.get_server(with_selector="key=value")
|
|
385
382
|
```
|
|
386
|
-
<!--End PulumiCodeChooser -->
|
|
387
383
|
|
|
388
384
|
|
|
389
385
|
:param int id: ID of the server.
|
|
@@ -392,4 +388,36 @@ def get_server_output(id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
|
392
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).
|
|
393
389
|
:param Sequence[str] with_statuses: List only servers with the specified status, could contain `initializing`, `starting`, `running`, `stopping`, `off`, `deleting`, `rebuilding`, `migrating`, `unknown`.
|
|
394
390
|
"""
|
|
395
|
-
|
|
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')))
|
pulumi_hcloud/get_server_type.py
CHANGED
|
@@ -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,
|
|
29
|
-
raise TypeError("Expected argument 'cores' to be a
|
|
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,
|
|
41
|
-
raise TypeError("Expected argument 'disk' to be a
|
|
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,
|
|
53
|
-
raise TypeError("Expected argument 'memory' to be a
|
|
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
|
-
|
|
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) ->
|
|
80
|
+
def cores(self) -> float:
|
|
76
81
|
"""
|
|
77
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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) ->
|
|
112
|
+
def disk(self) -> float:
|
|
105
113
|
"""
|
|
106
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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) ->
|
|
142
|
+
def memory(self) -> float:
|
|
137
143
|
"""
|
|
138
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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,38 +191,36 @@ class AwaitableGetServerTypeResult(GetServerTypeResult):
|
|
|
182
191
|
unavailable_after=self.unavailable_after)
|
|
183
192
|
|
|
184
193
|
|
|
185
|
-
def get_server_type(
|
|
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
|
|
195
203
|
|
|
196
|
-
<!--Start PulumiCodeChooser -->
|
|
197
204
|
```python
|
|
198
205
|
import pulumi
|
|
199
206
|
import pulumi_hcloud as hcloud
|
|
200
207
|
|
|
201
|
-
|
|
202
|
-
|
|
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)
|
|
203
215
|
```
|
|
204
|
-
<!--End PulumiCodeChooser -->
|
|
205
216
|
|
|
206
217
|
|
|
207
|
-
:param
|
|
208
|
-
:param
|
|
209
|
-
:param str name: Name of the server_type.
|
|
210
|
-
: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.
|
|
211
220
|
"""
|
|
212
221
|
__args__ = dict()
|
|
213
|
-
__args__['deprecationAnnounced'] = deprecation_announced
|
|
214
222
|
__args__['id'] = id
|
|
215
223
|
__args__['name'] = name
|
|
216
|
-
__args__['unavailableAfter'] = unavailable_after
|
|
217
224
|
opts = pulumi.InvokeOptions.merge(_utilities.get_invoke_opts_defaults(), opts)
|
|
218
225
|
__ret__ = pulumi.runtime.invoke('hcloud:index/getServerType:getServerType', __args__, opts=opts, typ=GetServerTypeResult).value
|
|
219
226
|
|
|
@@ -231,34 +238,49 @@ def get_server_type(deprecation_announced: Optional[str] = None,
|
|
|
231
238
|
name=pulumi.get(__ret__, 'name'),
|
|
232
239
|
storage_type=pulumi.get(__ret__, 'storage_type'),
|
|
233
240
|
unavailable_after=pulumi.get(__ret__, 'unavailable_after'))
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
@_utilities.lift_output_func(get_server_type)
|
|
237
|
-
def get_server_type_output(deprecation_announced: Optional[pulumi.Input[Optional[str]]] = None,
|
|
238
|
-
id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
241
|
+
def get_server_type_output(id: Optional[pulumi.Input[Optional[int]]] = None,
|
|
239
242
|
name: Optional[pulumi.Input[Optional[str]]] = None,
|
|
240
|
-
|
|
241
|
-
opts: Optional[pulumi.InvokeOptions] = None) -> pulumi.Output[GetServerTypeResult]:
|
|
243
|
+
opts: Optional[Union[pulumi.InvokeOptions, pulumi.InvokeOutputOptions]] = None) -> pulumi.Output[GetServerTypeResult]:
|
|
242
244
|
"""
|
|
243
245
|
Provides details about a specific Hetzner Cloud Server Type.
|
|
246
|
+
|
|
244
247
|
Use this resource to get detailed information about specific Server Type.
|
|
245
248
|
|
|
246
249
|
## Example Usage
|
|
247
250
|
|
|
248
|
-
<!--Start PulumiCodeChooser -->
|
|
249
251
|
```python
|
|
250
252
|
import pulumi
|
|
251
253
|
import pulumi_hcloud as hcloud
|
|
252
254
|
|
|
253
|
-
|
|
254
|
-
|
|
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)
|
|
255
262
|
```
|
|
256
|
-
<!--End PulumiCodeChooser -->
|
|
257
263
|
|
|
258
264
|
|
|
259
|
-
:param
|
|
260
|
-
:param
|
|
261
|
-
:param str name: Name of the server_type.
|
|
262
|
-
: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.
|
|
263
267
|
"""
|
|
264
|
-
|
|
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')))
|