NAME

WWW::Hetzner::Cloud::PrimaryIP - Hetzner Cloud Primary IP object

VERSION

version 0.001

SYNOPSIS

my $pip = $cloud->primary_ips->get($id);

# Read attributes
print $pip->ip, "\n";
print $pip->type, "\n";  # ipv4 or ipv6

# Assign to server
$pip->assign($server_id, 'server');
$pip->unassign;

# Update
$pip->name('new-name');
$pip->auto_delete(1);
$pip->update;

# Delete
$pip->delete;

NAME

WWW::Hetzner::Cloud::PrimaryIP - Hetzner Cloud Primary IP object

ATTRIBUTES

id, name, ip, type, assignee_id, assignee_type, datacenter, dns_ptr, auto_delete, labels, created

Standard primary IP attributes.

METHODS

is_assigned

Returns true if assigned to a resource.

datacenter_name

Returns datacenter name.

assign($assignee_id, $assignee_type)

Assign to a resource.

unassign

Unassign from current resource.

change_dns_ptr($ip, $ptr)

Change reverse DNS pointer.

update

Saves changes to name, auto_delete, and labels.

delete

Deletes the primary IP.

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.