hetzner/images

Types

ImageSortOption = 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"
ImageStatusOption = enum
  statusAvailable = "available", statusCreating = "creating"
ImageTypeOption = enum
  typeSystem = "system", typeSnapshot = "snapshot", typeBackup = "backup",
  typeApp = "app"

Procs

proc deleteImagesId(client: HetznerClient; id: int64): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Deletes an Image. Only Images of type snapshot and backup can be deleted.
proc getImages(client: HetznerClient; sort: set[ImageSortOption] = {};
               type: set[ImageTypeOption] = {};
               status: set[ImageStatusOption] = {};
               boundTo: string = default(string);
               includeDeprecated: bool = default(bool);
               name: string = default(string);
               labelSelector: string = default(string)): Future[
    GetImagesResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError, OpenParserJsonError, HetznerClientError],
                         tags: [RootEffect, ReadIOEffect, TimeEffect],
                         forbids: [].}
Returns all Image objects. You can select specific Image types only and sort the results by using URI parameters.
proc getImagesId(client: HetznerClient; id: int64): Future[GetImagesIdResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError, OpenParserJsonError,
                                HetznerClientError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}
Returns a specific Image object.
proc putImagesId(client: HetznerClient; id: int64; body: PutImagesIdRequest): Future[
    PutImagesIdResponse] {....stackTrace: false, raises: [Exception, ValueError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    KeyError, OpenParserJsonError, HetznerClientError],
                           tags: [RootEffect, ReadIOEffect, TimeEffect],
                           forbids: [].}

Updates the Image. You may change the description, convert a Backup Image to a Snapshot Image or change the Image labels. Only Images of type snapshot and backup can be updated.

Note that when updating labels, the 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.