hetzner/networks

Procs

proc deleteNetworksId(client: HetznerClient; id: int64): Future[AsyncResponse] {.
    ...stackTrace: false, raises: [Exception, ValueError, HttpRequestError,
                                LibraryError, SslError, OSError, IOError,
                                ProtocolError, KeyError],
    tags: [RootEffect, ReadIOEffect, TimeEffect], forbids: [].}

Deletes a network. If there are Servers attached they will be detached in the background.

Note: if the network object changes during the request, the response will be a “conflict” error.

proc getNetworks(client: HetznerClient; name: string = default(string);
                 labelSelector: string = default(string)): Future[
    GetNetworksResponse] {....stackTrace: false, raises: [Exception, ValueError,
    KeyError, HttpRequestError, LibraryError, SslError, OSError, IOError,
    ProtocolError, OpenParserJsonError, HetznerClientError],
                           tags: [RootEffect, ReadIOEffect, TimeEffect],
                           forbids: [].}
Gets all existing networks that you have available.
proc getNetworksId(client: HetznerClient; id: int64): Future[
    GetNetworksIdResponse] {....stackTrace: false, raises: [Exception, ValueError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    KeyError, OpenParserJsonError, HetznerClientError],
                             tags: [RootEffect, ReadIOEffect, TimeEffect],
                             forbids: [].}
Gets a specific network object.
proc postNetworks(client: HetznerClient; body: PostNetworksRequest): Future[
    PostNetworksResponse] {....stackTrace: false, raises: [Exception, ValueError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    KeyError, OpenParserJsonError, HetznerClientError],
                            tags: [RootEffect, ReadIOEffect, TimeEffect],
                            forbids: [].}

Creates a network with the specified ip_range.

You may specify one or more subnets. You can also add more Subnets later by using the add subnet action. If you do not specify an ip_range in the subnet we will automatically pick the first available /24 range for you.

You may specify one or more routes in routes. You can also add more routes later by using the add route action.

proc putNetworksId(client: HetznerClient; id: int64; body: PutNetworksIdRequest): Future[
    PutNetworksIdResponse] {....stackTrace: false, raises: [Exception, ValueError,
    HttpRequestError, LibraryError, SslError, OSError, IOError, ProtocolError,
    KeyError, OpenParserJsonError, HetznerClientError],
                             tags: [RootEffect, ReadIOEffect, TimeEffect],
                             forbids: [].}

Updates the network properties.

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

Note: if the network object changes during the request, the response will be a “conflict” error.