Skip to main content

Crate timeweb_rs

Crate timeweb_rs 

Source
Expand description

§timeweb-rs

Async Rust SDK for the Timeweb Cloud API.

The apis and models modules are generated from the official Timeweb Cloud OpenAPI specification, so the SDK covers the full public API surface: cloud servers, managed databases, Kubernetes, projects, domains, S3 storage, load balancers, firewalls, mail, AI agents and everything else exposed by the control panel.

§Authentication

Timeweb Cloud authenticates requests with a JWT token issued in the control panel (section “API и Terraform”). Build an authenticated configuration with authenticated and pass it to any function in apis:

use timeweb_rs::apis::servers_api;

let config = timeweb_rs::authenticated("your-jwt-token");
let servers = servers_api::get_servers(&config, None, None).await?;
println!("{servers:#?}");

§Layout

Modules§

apis
Generated API client modules, one per Timeweb Cloud API area.
models
Generated request and response types.

Constants§

DEFAULT_BASE_URL
Default base URL of the Timeweb Cloud API.

Functions§

authenticated
Builds a Configuration authenticated with a Timeweb Cloud JWT token.
authenticated_with_base_url
Builds an authenticated Configuration targeting a custom base URL.