GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cloud-sdk/docs/HETZNER_CLIENT.md at main · valkyoth/cloud-sdk

Expand file tree

/

HETZNER_CLIENT.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
120 lines (98 loc) · 6.03 KB
/

HETZNER_CLIENT.md

Copy path

File metadata and controls

120 lines (98 loc) · 6.03 KB
Raw
Copy raw file
Download raw file
Outline
Edit and raw actions

Hetzner Client Foundation

cloud_sdk_hetzner::client binds one authenticated transport to one Hetzner service and one endpoint trust class. It adds no runtime, executor, queue, clock, retry policy, filesystem access, or implicit allocation to the default graph.

Official Construction

Use the service-specific constructors:

  • HetznerClient::cloud(transport);
  • HetznerClient::dns(transport);
  • HetznerClient::security(transport);
  • HetznerClient::storage(transport).

Cloud, DNS, and security require the exact normalized https://api.hetzner.cloud/v1 identity. Console Storage requires https://api.hetzner.com/v1. Construction fails before any request when the scheme, host, effective port, or base path differs.

The aliases CloudClient, DnsClient, SecurityClient, and StorageClient make stored client types concise. Each client exposes its compile-time service ID and immutable bound transport. Its Debug output does not expose endpoint or credential data.

Custom Endpoint Trust

Custom constructors have conspicuous names such as HetznerClient::cloud_with_custom_endpoint. They require CustomEndpointAcknowledgement::trusted_operator_configuration() and reject non-HTTPS identities. The configured host is a credential destination and must never come from a tenant, request body, webhook, or other attacker- controlled input.

Custom clients carry the separate CustomEndpointTrust type marker. v0.70 does not expose execution methods on that marker: existing Hetzner operations remain source-locked to official endpoint identities. This avoids presenting a custom client that appears usable but only fails after request preparation. Custom execution requires a future explicit operation-policy binding; it will not silently loosen official policies.

Named Client Methods

With the serde feature, the official Cloud client exposes named methods for all 140 active Cloud operations. Each read operation has blocking, Send async, and local-async methods. Mutation, destructive, and cost-bearing operations have a named cleanup-owning preparation method plus three execution methods that accept only the operation's matching AssociatedPermitAttempt.

The official DNS client applies the same contract to all 24 active DNS operations: eight read-only, nine mutation, and seven destructive methods. The four list operations retain numbered-pagination policy, action endpoints decode through the checked action models, and zonefile or TSIG-bearing preparation stays in caller-owned cleanup-guarded storage.

The official Security client covers all 14 certificate and SSH-key operations: seven read-only, five mutation, and two destructive methods. Its four list operations retain numbered pagination. Uploaded certificate private keys are serialized into cleanup-owning preparation storage and marked as a sensitive request body. Exact canonical plan and retry fingerprints reject that marker with SensitiveBodyRequiresDigest; use digest construction with Sha256PlanHasher instead. Canonical scratch is transient and clears immediately after hashing, while only the 32-byte digest remains for the permit lifetime. Private keys remain redacted from diagnostics and are cleared with the complete target, body, and scratch buffers. Caller-owned source material remains the caller's cleanup responsibility.

SSH-key rotation is intentionally an explicit sequence, not one synthetic operation: create the replacement key under a mutation permit, verify its returned identity and deployment, then prepare deletion of the old key under a separate destructive permit. A failure in either step never authorizes the other step, and the client performs no rollback or implicit retry. Certificate retry is likewise an explicit mutation-permit operation. Bearer-token rotation continues to use the transport credential-generation APIs documented in the security recipes.

The official Console Storage client covers all 31 active Storage Box operations: 12 read-only, nine mutation, eight destructive, and two cost-authorized methods. Its four numbered lists retain pagination metadata; boxes, types, snapshots, folders, subaccounts, and actions decode through the source-complete checked models. Create and password-reset bodies are marked sensitive, require digest plan fingerprints, and remain inside cleanup-owning storage. Large responses use the bounded incremental decoder through the same caller-owned workspace contract.

The split is intentional: preparation creates no authority. The caller must review the exact prepared request, build an AssociatedPlanConfirmation, fingerprint it, create the required mutation/destructive/cost permit, and begin one attempt before the client can send the request. The client never creates a permit or retries an attempt implicitly.

Every call:

  1. consumes one caller-owned ClientWorkspaceLease;
  2. clears all four complete workspace regions;
  3. prepares and endpoint-verifies exactly one associated operation;
  4. sends exactly one authenticated attempt;
  5. applies success or provider-error response policy;
  6. decodes an owned typed CheckedHetznerResponse;
  7. clears storage and releases the lease on return or cancellation.

The client is borrowed through &self, so a Sync transport supports caller- bounded concurrency without holding a mutex across .await. The SDK creates no tasks and performs no automatic retries.

Workspace Profiles

ClientCapacityProfile::EMBEDDED, DEFAULT, and LARGE define complete target, request-body, response-body, and response-header capacities. Use ClientWorkspace::for_profile with caller-owned storage. With alloc, OwnedClientWorkspace::try_for_profile fallibly allocates the same exact bounded layout and wipes all four allocations on drop.

CLOUD_CLIENT_METHODS, DNS_CLIENT_METHODS, SECURITY_CLIENT_METHODS, and STORAGE_CLIENT_METHODS expose the exhaustive operation descriptors behind the named surfaces for auditing and tooling. Their 140, 24, 14, and 31 rows cover all 209 active operations and are generated from the source-locked operation association manifest with exact permit and pagination classifications.

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.