We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cf66594 commit f52e32bCopy full SHA for f52e32b
1 file changed
examples/create_server.py
@@ -1,8 +1,9 @@
1
from hcloud import Client
2
from hcloud.images.domain import Image
3
+from hcloud.server_types.domain import ServerType
4
5
client = Client(token="{YOUR_API_TOKEN}") # Please paste your API token here between the quotes
-response = client.servers.create(name="my-server", server_type="cx11", image=Image(name="ubuntu-18.04"))
6
+response = client.servers.create(name="my-server", server_type=ServerType("cx11"), image=Image(name="ubuntu-18.04"))
7
server = response.server
8
print(server)
9
print("Root Passwort" + response.root_password)
0 commit comments