Unofficial Rust crate for accessing the Hetzner Cloud API
The hcloud
crate can be used for managing the endpoints provided by the Hetzner Cloud API in your Rust project.
The API client code of this crate has been auto-generated from the Unofficial OpenAPI Description for the Hetzner Cloud API using OpenAPI Generator.
actions
, datacenters
, floating_ips
, images
, isos
, locations
, networks
, pricing
, server_types
, servers
, ssh_keys
, volumes
async
/await
is not supported yet: The crate currently uses the blocking version 0.9 of the reqwest
crate for underlying HTTP access and is therefore not asynchronous. This is planned to be implemented after the new OpenAPI Generator version 5.x has been released, in which generating asynchronous Rust client code is supported.A very basic example for listing all existing servers:
```rust use hcloud::apis::client::APIClient; use hcloud::apis::configuration::Configuration;
// set up basic configuration using API token let mut configuration = Configuration::new(); configuration.beareraccesstoken = Some("YOURHCLOUDAPITOKEN".tostring());
// create API client handle from configuration let api_client = APIClient::new(configuration);
// get list of all existing servers from servers API let servers = apiclient .serversapi() .list_servers(None, None, None, None)? .servers;
// handle server data for server in servers { println!("{:?}", server); } ```
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.