NAME
WWW::Hetzner::Cloud::API::Datacenters - Hetzner Cloud Datacenters API
VERSION
version 0.001
SYNOPSIS
use WWW::Hetzner::Cloud;
my $cloud = WWW::Hetzner::Cloud->new(token => $ENV{HETZNER_API_TOKEN});
# List all datacenters
my $datacenters = $cloud->datacenters->list;
# Get by name
my $dc = $cloud->datacenters->get_by_name('fsn1-dc14');
printf "Datacenter: %s at %s\n", $dc->name, $dc->location;
DESCRIPTION
This module provides access to Hetzner Cloud datacenters. Datacenters are virtual subdivisions of locations with specific server type availability. All methods return WWW::Hetzner::Cloud::Datacenter objects.
NAME
WWW::Hetzner::Cloud::API::Datacenters - Hetzner Cloud Datacenters API
METHODS
list
my $datacenters = $cloud->datacenters->list;
Returns an arrayref of WWW::Hetzner::Cloud::Datacenter objects.
get
my $datacenter = $cloud->datacenters->get($id);
Returns a WWW::Hetzner::Cloud::Datacenter object.
get_by_name
my $datacenter = $cloud->datacenters->get_by_name('fsn1-dc14');
Returns a WWW::Hetzner::Cloud::Datacenter object. Returns undef if not found.
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.