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
apis— one module per API area (apis::servers_api,apis::databases_api, …); every operation is a free async function taking&Configurationas its first argument.models— request and response types.apis::configuration::Configuration— connection settings and credentials; build it withauthenticated.apis::Error— the error type returned by every API call.TimewebClient— the same operations with retries under a configurableRetryPolicy.paginate— offset pagination as a stream of items.ErrorDetails— the uniform error envelope carried by every error response body.
Modules§
- apis
- Generated API client modules, one per Timeweb Cloud API area.
- models
- Generated request and response types.
Structs§
- Error
Details - The error envelope every Timeweb Cloud error response shares.
- Page
Stream - Stream created by
paginate; yieldsResult<T, Error<E>>items. - Retry
Policy - When and how often a failed operation is retried.
- Timeweb
Client - High-level entry point: an authenticated configuration plus retries.
Enums§
- Error
Message - An error body’s
messagefield: the API sends a string or a list.
Constants§
- DEFAULT_
BASE_ URL - Default base URL of the Timeweb Cloud API.
Functions§
- authenticated
- Builds a
Configurationauthenticated with a Timeweb Cloud JWT token. - authenticated_
with_ base_ url - Builds an authenticated
Configurationtargeting a custom base URL. - paginate
- Streams every item of a paginated collection.