Types
GetServersIdActionsActionIdResponse = object
GetServersIdActionsResponse = object
PostServersIdActionsPoweroffResponse = object
PostServersIdActionsPoweronResponse = object
PostServersIdActionsRebootResponse = object
PostServersIdActionsRebuildResponse = object
PostServersIdActionsResetResponse = object
PostServersIdActionsShutdownResponse = object
ServerActionSortOption = enum sortId = "id", sortIdAsc = "id:asc", sortIdDesc = "id:desc", sortCommand = "command", sortCommandAsc = "command:asc", sortCommandDesc = "command:desc", sortStatus = "status", sortStatusAsc = "status:asc", sortStatusDesc = "status:desc", sortProgress = "progress", sortProgressAsc = "progress:asc", sortProgressDesc = "progress:desc", sortStarted = "started", sortStartedAsc = "started:asc", sortStartedDesc = "started:desc", sortFinished = "finished", sortFinishedAsc = "finished:asc", sortFinishedDesc = "finished:desc"
ServerActionStatusOption = enum statusRunning = "running", statusSuccess = "success", statusError = "error"
Procs
proc getServersIdActions(client: HetznerClient; id: int64; sort: set[ServerActionSortOption] = {}; status: set[ServerActionStatusOption] = {}): Future[ GetServersIdActionsResponse] {....stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, HetznerClientError], tags: [ RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Returns all Action objects for a Server. You can sort the results by using the sort URI parameter, and filter them with the status parameter.
proc getServersIdActionsActionId(client: HetznerClient; id: int64; actionId: int64): Future[ GetServersIdActionsActionIdResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Returns a specific Action object for a Server.
proc postServersIdActionsAddToPlacementGroup(client: HetznerClient; id: int64; body: PostServersIdActionsAddToPlacementGroupRequest): Future[ PostServersIdActionsAddToPlacementGroupResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Adds a Server to a Placement Group. Server must be powered off for this command to succeed. #### Call specific error codes | Code | Description | |-------------------------------|----------------------------------------------- -----------------------| | `server_not_stopped` | The action requires a stopped server |
proc postServersIdActionsAttachIso(client: HetznerClient; id: int64; body: PostServersIdActionsAttachIsoRequest): Future[ PostServersIdActionsAttachIsoResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Attaches an ISO to a Server. The Server will immediately see it as a new disk. An already attached ISO will automatically be detached before the new ISO is attached.
Servers with attached ISOs have a modified boot order: They will try to boot from the ISO first before falling back to hard disk.
proc postServersIdActionsAttachToNetwork(client: HetznerClient; id: int64; body: PostServersIdActionsAttachToNetworkRequest): Future[ PostServersIdActionsAttachToNetworkResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Attaches a Server to a network. This will complement the fixed public Server interface by adding an additional ethernet interface to the Server which is connected to the specified network. The Server will get an IP auto assigned from a subnet of type `server` in the same `network_zone`. Using the `alias_ips` attribute you can also define one or more additional IPs to the Servers. Please note that you will have to configure these IPs by hand on your Server since only the primary IP will be given out by DHCP. **Call specific error codes** | Code | Description | |----------------------------------|-------------------------------------------- ---------------------------| | `server_already_attached` | The server is already attached to the network | | `ip_not_available` | The provided Network IP is not available | | `no_subnet_available` | No Subnet or IP is available for the Server within the network | | `networks_overlap` | The network IP range overlaps with one of the server networks |
proc postServersIdActionsChangeAliasIps(client: HetznerClient; id: int64; body: PostServersIdActionsChangeAliasIpsRequest): Future[ PostServersIdActionsChangeAliasIpsResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Changes the alias IPs of an already attached Network. Note that the existing aliases for the specified Network will be replaced with these provided in the request body. So if you want to add an alias IP, you have to provide the existing ones from the Network plus the new alias IP in the request body.
proc postServersIdActionsChangeDnsPtr(client: HetznerClient; id: int64; body: PostServersIdActionsChangeDnsPtrRequest): Future[ PostServersIdActionsChangeDnsPtrResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Changes the hostname that will appear when getting the hostname belonging to the primary IPs (IPv4 and IPv6) of this Server.
Floating IPs assigned to the Server are not affected by this.
proc postServersIdActionsChangeProtection(client: HetznerClient; id: int64; body: PostServersIdActionsChangeProtectionRequest): Future[ PostServersIdActionsChangeProtectionResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Changes the protection configuration of the Server.
proc postServersIdActionsChangeType(client: HetznerClient; id: int64; body: PostServersIdActionsChangeTypeRequest): Future[ PostServersIdActionsChangeTypeResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Changes the type (Cores, RAM and disk sizes) of a Server. Server must be powered off for this command to succeed. This copies the content of its disk, and starts it again. You can only migrate to Server types with the same `storage_type` and equal or bigger disks. Shrinking disks is not possible as it might destroy data. If the disk gets upgraded, the Server type can not be downgraded any more. If you plan to downgrade the Server type, set `upgrade_disk` to `false`. #### Call specific error codes | Code | Description | |-------------------------------|----------------------------------------------- -----------------------| | `invalid_server_type` | The server type does not fit for the given server or is deprecated | | `server_not_stopped` | The action requires a stopped server |
proc postServersIdActionsCreateImage(client: HetznerClient; id: int64; body: PostServersIdActionsCreateImageRequest): Future[ PostServersIdActionsCreateImageResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Creates an Image (snapshot) from a Server by copying the contents of its disks. This creates a snapshot of the current state of the disk and copies it into an Image. If the Server is currently running you must make sure that its disk content is consistent. Otherwise, the created Image may not be readable.
To make sure disk content is consistent, we recommend to shut down the Server prior to creating an Image.
You can either create a backup Image that is bound to the Server and therefore will be deleted when the Server is deleted, or you can create an snapshot Image which is completely independent of the Server it was created from and will survive Server deletion. Backup Images are only available when the backup option is enabled for the Server. Snapshot Images are billed on a per GB basis.
proc postServersIdActionsDetachFromNetwork(client: HetznerClient; id: int64; body: PostServersIdActionsDetachFromNetworkRequest): Future[ PostServersIdActionsDetachFromNetworkResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Detaches a Server from a network. The interface for this network will vanish.
proc postServersIdActionsDetachIso(client: HetznerClient; id: int64): Future[ PostServersIdActionsDetachIsoResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Detaches an ISO from a Server. In case no ISO Image is attached to the Server, the status of the returned Action is immediately set to success
proc postServersIdActionsDisableBackup(client: HetznerClient; id: int64): Future[ PostServersIdActionsDisableBackupResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Disables the automatic backup option and deletes all existing Backups for a Server. No more additional charges for backups will be made.
Caution: This immediately removes all existing backups for the Server!
proc postServersIdActionsDisableRescue(client: HetznerClient; id: int64): Future[ PostServersIdActionsDisableRescueResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Disables the Hetzner Rescue System for a Server. This makes a Server start from its disks on next reboot.
Rescue Mode is automatically disabled when you first boot into it or if you do not use it for 60 minutes.
Disabling rescue mode will not reboot your Server โ you will have to do this yourself.
proc postServersIdActionsEnableBackup(client: HetznerClient; id: int64): Future[ PostServersIdActionsEnableBackupResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Enables and configures the automatic daily backup option for the Server. Enabling automatic backups will increase the price of the Server by 20%. In return, you will get seven slots where Images of type backup can be stored.
Backups are automatically created daily.
proc postServersIdActionsEnableRescue(client: HetznerClient; id: int64; body: PostServersIdActionsEnableRescueRequest): Future[ PostServersIdActionsEnableRescueResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Enable the Hetzner Rescue System for this Server. The next time a Server with enabled rescue mode boots it will start a special minimal Linux distribution designed for repair and reinstall.
In case a Server cannot boot on its own you can use this to access a Serverโs disks.
Rescue Mode is automatically disabled when you first boot into it or if you do not use it for 60 minutes.
Enabling rescue mode will not reboot your Server โ you will have to do this yourself.
proc postServersIdActionsPoweroff(client: HetznerClient; id: int64): Future[ PostServersIdActionsPoweroffResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Cuts power to the Server. This forcefully stops it without giving the Server operating system time to gracefully stop. May lead to data loss, equivalent to pulling the power cord. Power off should only be used when shutdown does not work.
proc postServersIdActionsPoweron(client: HetznerClient; id: int64): Future[ PostServersIdActionsPoweronResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Starts a Server by turning its power on.
proc postServersIdActionsReboot(client: HetznerClient; id: int64): Future[ PostServersIdActionsRebootResponse] {....stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Reboots a Server gracefully by sending an ACPI request. The Server operating system must support ACPI and react to the request, otherwise the Server will not reboot.
proc postServersIdActionsRebuild(client: HetznerClient; id: int64; body: PostServersIdActionsRebuildRequest): Future[ PostServersIdActionsRebuildResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Rebuilds a Server overwriting its disk with the content of an Image, thereby destroying all data on the target Server
The Image can either be one you have created earlier (backup or snapshot Image) or it can be a completely fresh system Image provided by us. You can get a list of all available Images with GET /images.
Your Server will automatically be powered off before the rebuild command executes.
proc postServersIdActionsRemoveFromPlacementGroup(client: HetznerClient; id: int64): Future[PostServersIdActionsRemoveFromPlacementGroupResponse] {. ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Removes a Server from a Placement Group.
proc postServersIdActionsRequestConsole(client: HetznerClient; id: int64): Future[ PostServersIdActionsRequestConsoleResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Requests credentials for remote access via VNC over websocket to keyboard, monitor, and mouse for a Server. The provided URL is valid for 1 minute, after this period a new url needs to be created to connect to the Server. How long the connection is open after the initial connect is not subject to this timeout.
proc postServersIdActionsReset(client: HetznerClient; id: int64): Future[ PostServersIdActionsResetResponse] {....stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Cuts power to a Server and starts it again. This forcefully stops it without giving the Server operating system time to gracefully stop. This may lead to data loss, itโs equivalent to pulling the power cord and plugging it in again. Reset should only be used when reboot does not work.
proc postServersIdActionsResetPassword(client: HetznerClient; id: int64): Future[ PostServersIdActionsResetPasswordResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Resets the root password. Only works for Linux systems that are running the qemu guest agent. Server must be powered on (status running) in order for this operation to succeed.
This will generate a new password for this Server and return it.
If this does not succeed you can use the rescue system to netboot the Server and manually change your Server password by hand.
proc postServersIdActionsShutdown(client: HetznerClient; id: int64): Future[ PostServersIdActionsShutdownResponse] {....stackTrace: false, raises: [ Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Shuts down a Server gracefully by sending an ACPI shutdown request. The Server operating system must support ACPI and react to the request, otherwise the Server will not shut down.