NAME

WWW::Hetzner::Cloud::SSHKey - Hetzner Cloud SSHKey object

VERSION

version 0.001

SYNOPSIS

my $key = $cloud->ssh_keys->get($id);

# Read attributes
print $key->id, "\n";
print $key->name, "\n";
print $key->fingerprint, "\n";
print $key->public_key, "\n";

# Update
$key->name('renamed-key');
$key->labels({ env => 'prod' });
$key->update;

# Delete
$key->delete;

DESCRIPTION

This class represents a Hetzner Cloud SSH key. Objects are returned by WWW::Hetzner::Cloud::API::SSHKeys methods.

NAME

WWW::Hetzner::Cloud::SSHKey - Hetzner Cloud SSH Key object

ATTRIBUTES

id

SSH key ID (read-only).

name

SSH key name (read-write).

public_key

The public key content (read-only).

fingerprint

SSH key fingerprint (read-only).

created

Creation timestamp (read-only).

labels

Labels hash (read-write).

METHODS

update

$key->name('new-name');
$key->update;

Saves changes to name and labels back to the API.

delete

$key->delete;

Deletes the SSH key.

data

my $hashref = $key->data;

Returns all SSH key 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.