NAME
WWW::Hetzner::Cloud::Zone - Hetzner Cloud DNS Zone object
VERSION
version 0.001
SYNOPSIS
my $zone = $cloud->zones->get($id);
# Read attributes
print $zone->id, "\n";
print $zone->name, "\n";
print $zone->status, "\n";
print $zone->ttl, "\n";
# Update
$zone->name('newdomain.com');
$zone->labels({ env => 'prod' });
$zone->update;
# Access RRSets (DNS records)
my $rrsets = $zone->rrsets;
my $records = $rrsets->list;
$rrsets->add_a('www', '1.2.3.4');
# Export as zone file
my $zonefile = $zone->export;
# Delete
$zone->delete;
DESCRIPTION
This class represents a Hetzner Cloud DNS zone. Objects are returned by WWW::Hetzner::Cloud::API::Zones methods.
NAME
WWW::Hetzner::Cloud::Zone - Hetzner Cloud DNS Zone object
ATTRIBUTES
id
Zone ID (read-only).
name
Zone name / domain (read-write).
status
Zone status: verified, pending, failed (read-only).
ttl
Default TTL for records (read-write).
created
Creation timestamp (read-only).
ns
Nameservers arrayref (read-only).
records_count
Number of records in the zone (read-only).
is_secondary_dns
Whether this is a secondary DNS zone (read-only).
labels
Labels hash (read-write).
METHODS
update
$zone->name('newdomain.com');
$zone->update;
Saves changes to name and labels back to the API.
delete
$zone->delete;
Deletes the zone and all its records.
rrsets
my $rrsets = $zone->rrsets;
Returns a WWW::Hetzner::Cloud::API::RRSets object for managing DNS records.
export
my $zonefile = $zone->export;
Exports the zone as a standard zone file format.
data
my $hashref = $zone->data;
Returns all zone data as a hashref (for JSON serialization).
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.