examples | ||
src | ||
.env | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
README.md |
Hetzner Robot API Rhai Client
This project provides a Rhai scripting client for interacting with the Hetzner Robot API. It allows users to manage their Hetzner servers, SSH keys, boot configurations, and order new servers and addons directly from Rhai scripts.
Goal
The primary goal of this project is to offer a flexible and scriptable interface to the Hetzner Robot API, enabling automation of server management tasks. By leveraging Rhai, users can write simple yet powerful scripts to interact with their Hetzner infrastructure.
Examples
The examples/
directory contains several Rhai scripts demonstrating the capabilities of this client:
examples/server_management.rhai
: Showcases basic server management operations, such as fetching server details and updating server names.examples/ssh_key_management.rhai
: Demonstrates how to list, add, update, and delete SSH keys.examples/boot_management.rhai
: Provides examples for managing server boot configurations, including rescue mode.examples/server_ordering.rhai
: Contains comprehensive examples for ordering new servers and managing server addons, including:- Getting available server products.
- Ordering new servers.
- Listing server order transactions.
- Fetching specific transaction details.
- Listing and ordering auction servers.
- Getting available server addon products.
- Listing server addon transactions.
- Ordering server addons.
- Querying specific server addon transactions.
Important Note on IPv6 Addresses
When ordering a server without an IPv4 addon, the server might be assigned an IPv6 network like 2a01:4f8:221:1fe3::/64
. It's important to note that you cannot directly SSH to this network address. Hetzner does not use SLAAC for server assignments. The actual address to SSH to will typically be the network address with 2
appended (e.g., 2a01:4f8:221:1fe3::2
).