Types
DeleteServersIdResponse = object
GetServersIdMetricsResponse = object
GetServersIdResponse = object
GetServersResponse = object
PostServersResponse = object
PutServersIdResponse = object
ServerSortOption = enum sortId = "id", sortIdAsc = "id:asc", sortIdDesc = "id:desc", sortName = "name", sortNameAsc = "name:asc", sortNameDesc = "name:desc", sortCreated = "created", sortCreatedAsc = "created:asc", sortCreatedDesc = "created:desc"
ServerStatusOption = enum statusInitializing = "initializing", statusStarting = "starting", statusRunning = "running", statusStopping = "stopping", statusOff = "off", statusDeleting = "deleting", statusRebuilding = "rebuilding", statusMigrating = "migrating", statusUnknown = "unknown"
ServerTypeOption = enum typeCpu = "cpu", typeDisk = "disk", typeNetwork = "network"
Procs
proc deleteServersId(client: HetznerClient; id: int64): Future[ DeleteServersIdResponse] {....stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Deletes a Server. This immediately removes the Server from your account, and it is no longer accessible.
proc getServers(client: HetznerClient; name: string = default(string); labelSelector: string = default(string); sort: set[ServerSortOption] = {}; status: set[ServerStatusOption] = {}): Future[GetServersResponse] {. ...stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Returns all existing Server objects
proc getServersId(client: HetznerClient; id: int64): Future[GetServersIdResponse] {. ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Returns a specific Server object. The Server must exist inside the Project
proc getServersIdMetrics(client: HetznerClient; id: int64; type: set[ServerTypeOption] = {}; start: string; end: string; step: string = default(string)): Future[ GetServersIdMetricsResponse] {....stackTrace: false, raises: [Exception, ValueError, KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, OpenParserJsonError, HetznerClientError], tags: [ RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
-
Get Metrics for specified Server. You must specify the type of metric to get: cpu, disk or network. You can also specify more than one type by comma separation, e.g. cpu,disk. Depending on the type you will get different time series data | Type | Timeseries | Unit | Description | |---------|-------------------------|-----------|------------------------------- -----------------------| | cpu | cpu | percent | Percent CPU usage | | disk | disk.0.iops.read | iop/s | Number of read IO operations per second | | | disk.0.iops.write | iop/s | Number of write IO operations per second | | | disk.0.bandwidth.read | bytes/s | Bytes read per second | | | disk.0.bandwidth.write | bytes/s | Bytes written per second | | network | network.0.pps.in | packets/s | Public Network interface packets per second received | | | network.0.pps.out | packets/s | Public Network interface packets per second sent | | | network.0.bandwidth.in | bytes/s | Public Network interface bytes/s received | | | network.0.bandwidth.out | bytes/s | Public Network interface bytes/s sent | Metrics are available for the last 30 days only. If you do not provide the step argument we will automatically adjust it so that a maximum of 200 samples are returned. We limit the number of samples returned to a maximum of 500 and will adjust the step parameter accordingly.
proc postServers(client: HetznerClient; body: PostServersRequest): Future[ PostServersResponse] {....stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Creates a new Server. Returns preliminary information about the Server as well as an Action that covers progress of creation.
proc putServersId(client: HetznerClient; id: int64; body: PutServersIdRequest): Future[ PutServersIdResponse] {....stackTrace: false, raises: [Exception, ValueError, HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError, KeyError, OpenParserJsonError, HetznerClientError], tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
- Updates a Server. You can update a Server’s name and a Server’s labels. Please note that Server names must be unique per Project and valid hostnames as per RFC 1123 (i.e. may only contain letters, digits, periods, and dashes). Also note that when updating labels, the Server’s current set of labels will be replaced with the labels provided in the request body. So, for example, if you want to add a new label, you have to provide all existing labels plus the new label in the request body.