NAME
WWW::Hetzner::Cloud::API::ServerTypes - Hetzner Cloud Server Types API
VERSION
version 0.101
SYNOPSIS
use WWW::Hetzner::Cloud;
my $cloud = WWW::Hetzner::Cloud->new(token => $ENV{HETZNER_API_TOKEN});
# List all server types
my $types = $cloud->server_types->list_all;
# Get by ID
my $type = $cloud->server_types->get(22);
# Get by name
my $cx23 = $cloud->server_types->get_by_name('cx23');
printf "CX23: %d cores, %d GB RAM\n", $cx23->cores, $cx23->memory;
DESCRIPTION
This module provides access to Hetzner Cloud server types. Server types define the available CPU, memory, and disk configurations for cloud servers. All methods return WWW::Hetzner::Cloud::ServerType objects.
list
my $types = $cloud->server_types->list;
Returns an arrayref of WWW::Hetzner::Cloud::ServerType objects.
list_all
my $entities = $controller->list_all(per_page => 50, %filters);
Returns a combined arrayref. Inherited from "list_all" in WWW::Hetzner::Role::Pagination. Unlike "list", which fetches one page, it follows every subsequent page starting at page 1 or the supplied page. It carries per_page, filters, and sort values to every request.
get
my $type = $cloud->server_types->get($id);
Returns a WWW::Hetzner::Cloud::ServerType object.
get_by_name
my $type = $cloud->server_types->get_by_name('cx23');
Returns a WWW::Hetzner::Cloud::ServerType object. Returns undef if not found.
SEE ALSO
WWW::Hetzner::Cloud - Main Cloud API client
WWW::Hetzner::Cloud::ServerType - ServerType entity class
WWW::Hetzner::CLI::Cmd::Servertype - ServerType CLI commands
WWW::Hetzner - Main umbrella module
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 <torsten@raudssus.de> https://raudssus.de/.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.