NAME

WWW::Hetzner::Cloud::API::Networks - Hetzner Cloud Networks API

VERSION

version 0.001

SYNOPSIS

my $cloud = WWW::Hetzner::Cloud->new(token => $token);

# List networks
my $networks = $cloud->networks->list;

# Create network
my $network = $cloud->networks->create(
    name     => 'my-network',
    ip_range => '10.0.0.0/8',
);

# Add subnet
$cloud->networks->add_subnet($network->id,
    ip_range     => '10.0.1.0/24',
    network_zone => 'eu-central',
    type         => 'cloud',
);

# Add route
$cloud->networks->add_route($network->id,
    destination => '10.100.1.0/24',
    gateway     => '10.0.0.1',
);

# Delete
$cloud->networks->delete($network->id);

NAME

WWW::Hetzner::Cloud::API::Networks - Hetzner Cloud Networks API

METHODS

list(%params)

Returns arrayref of Network objects.

get($id)

Returns Network object.

create(%params)

Creates network. Required: name, ip_range. Optional: labels, subnets, routes.

update($id, %params)

Updates network. Params: name, labels.

delete($id)

Deletes network.

add_subnet($id, %opts)

Add a subnet. Required: ip_range, network_zone, type.

delete_subnet($id, $ip_range)

Delete a subnet.

add_route($id, %opts)

Add a route. Required: destination, gateway.

delete_route($id, %opts)

Delete a route. Required: destination, gateway.

SUPPORT

Source Code

The code is open to the world, and available for you to hack on. Please feel free to browse it and play with it, or whatever. If you want to contribute patches, please send me a diff or prod me to pull from your repository :)

https://github.com/Getty/p5-www-hetzner

git clone https://github.com/Getty/p5-www-hetzner.git

AUTHOR

Torsten Raudssus <torsten@raudssus.de>

COPYRIGHT AND LICENSE

This software is copyright (c) 2026 by Torsten Raudssus.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.