NAME

WWW::Hetzner::Cloud::API::PrimaryIPs - Hetzner Cloud Primary IPs API

VERSION

version 0.001

SYNOPSIS

my $cloud = WWW::Hetzner::Cloud->new(token => $token);

# List primary IPs
my $pips = $cloud->primary_ips->list;

# Create primary IP
my $pip = $cloud->primary_ips->create(
    name          => 'my-primary-ip',
    type          => 'ipv4',
    assignee_type => 'server',
    datacenter    => 'fsn1-dc14',
);

# Assign to server
$cloud->primary_ips->assign($pip->id, $server_id, 'server');

# Unassign
$cloud->primary_ips->unassign($pip->id);

# Delete
$cloud->primary_ips->delete($pip->id);

NAME

WWW::Hetzner::Cloud::API::PrimaryIPs - Hetzner Cloud Primary IPs API

METHODS

list(%params)

Returns arrayref of PrimaryIP objects.

get($id)

Returns PrimaryIP object.

create(%params)

Creates primary IP. Required: name, type, assignee_type, datacenter. Optional: assignee_id, auto_delete, labels.

update($id, %params)

Updates primary IP. Params: name, auto_delete, labels.

delete($id)

Deletes primary IP.

assign($id, $assignee_id, $assignee_type)

Assign primary IP to resource.

unassign($id)

Unassign primary IP from resource.

change_dns_ptr($id, $ip, $dns_ptr)

Change reverse DNS pointer.

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.