NAME
WWW::Hetzner::Cloud::API::FloatingIPs - Hetzner Cloud Floating IPs API
VERSION
version 0.002
SYNOPSIS
my $cloud = WWW::Hetzner::Cloud->new(token => $token);
# List floating IPs
my $fips = $cloud->floating_ips->list;
# Create floating IP
my $fip = $cloud->floating_ips->create(
type => 'ipv4',
home_location => 'fsn1',
name => 'my-floating-ip',
);
# Assign to server
$cloud->floating_ips->assign($fip->id, $server_id);
# Unassign
$cloud->floating_ips->unassign($fip->id);
# Delete
$cloud->floating_ips->delete($fip->id);
DESCRIPTION
This module provides the API for managing Hetzner Cloud floating IPs. All methods return WWW::Hetzner::Cloud::FloatingIP objects.
list
my $fips = $cloud->floating_ips->list;
my $fips = $cloud->floating_ips->list(label_selector => 'env=prod');
Returns arrayref of WWW::Hetzner::Cloud::FloatingIP objects.
get
my $fip = $cloud->floating_ips->get($id);
Returns WWW::Hetzner::Cloud::FloatingIP object.
create
my $fip = $cloud->floating_ips->create(
type => 'ipv4', # required (ipv4 or ipv6)
home_location => 'fsn1', # required
name => 'my-ip', # optional
description => '...', # optional
server => $server_id, # optional
labels => { ... }, # optional
);
Creates floating IP. Returns WWW::Hetzner::Cloud::FloatingIP object.
update
$cloud->floating_ips->update($id,
name => 'new-name',
description => 'new description',
labels => { ... },
);
Updates floating IP. Returns WWW::Hetzner::Cloud::FloatingIP object.
delete
$cloud->floating_ips->delete($id);
Deletes floating IP.
assign
$cloud->floating_ips->assign($id, $server_id);
Assign floating IP to server.
unassign
$cloud->floating_ips->unassign($id);
Unassign floating IP from server.
change_dns_ptr
$cloud->floating_ips->change_dns_ptr($id, $ip, $dns_ptr);
Change reverse DNS pointer for the floating IP.
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.