Skip to main content

Crate leeca_proxmox

Crate leeca_proxmox 

Source
Expand description

A safe and ergonomic Rust client for the Proxmox VE API.

This crate provides a strongly-typed interface for interacting with Proxmox Virtual Environment. Validation rules (like password strength, DNS resolution) are opt-in via a ValidationConfig. By default, only basic format checks are performed to ensure the values can be used in HTTP requests.

§Example

use leeca_proxmox::{ProxmoxClient, ProxmoxResult};

#[tokio::main]
async fn main() -> ProxmoxResult<()> {
    let mut client = ProxmoxClient::builder()
        .host("192.168.1.182")
        .port(8006)
        .secure(false) // HTTP for local development
        .accept_invalid_certs(true) // Testing & Self signed certs
        .enable_password_strength(3) // Optional validation
        .block_reserved_usernames() // Optional validation
        .build()
        .await?;

    client.login().await?;
    println!("Authenticated: {}", client.is_authenticated().await);
    Ok(())
}

Structs§

BalloonInfo
Balloon device information.
CreateVmParams
Parameters for creating a new VM.
MemoryInfo
Memory usage information.
NodeDnsConfig
DNS configuration for a Proxmox node.
NodeListItem
A node in the Proxmox cluster.
NodeStatus
Detailed status information for a Proxmox node.
ProxmoxClient
A strongly-typed client for the Proxmox VE API.
ProxmoxClientBuilder
Builder for ProxmoxClient.
RateLimitConfig
Configuration for rate limiting.
ValidationConfig
Configuration for validating client inputs.
VmConfig
VM configuration from /nodes/{node}/qemu/{vmid}/config.
VmListItem
A virtual machine as returned by the /nodes/{node}/qemu endpoint.
VmStatusCurrent
Detailed runtime status of a VM from /nodes/{node}/qemu/{vmid}/status/current.

Enums§

ClusterResource
A resource discovered in the Proxmox cluster.
ProxmoxError
Enumeration of possible errors.
ValidationError
Validation-specific errors.

Type Aliases§

ProxmoxResult
Result type alias for Proxmox operations.