NAME

WWW::Hetzner::Cloud::API::Datacenters - Hetzner Cloud Datacenters API

VERSION

version 0.002

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.

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

Issues

Please report bugs and feature requests on GitHub at https://github.com/Getty/p5-www-hetzner/issues.

IRC

Join #kubernetes on irc.perl.org or message Getty directly.

CONTRIBUTING

Contributions are welcome! Please fork the repository and submit a pull request.

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.