Skip to content

client.tenant

View as Markdown

client.tenant — the tenant operations.

On AsyncKindgi every method is the same, awaited.

get(*, timeout: float | None = None) -> Tenant
Signature

Fetch the caller's workspace. GET /v1/tenant

Returns the workspace the bearer token authenticates as. There is no /v1/tenants collection — workspaces are the sovereignty boundary, not a listable resource under a workspace. A runtime that gates production adds productionAllowed (and productionNext while it's false), one that sets limits adds the workspace's limits, one that counts files adds storage (what they take, to compare with limits.storageMiB), and a deployment that publishes where its calls come from adds egress.

update(
body: TenantPatch | Mapping[str, Any] | None = None,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> None
Signature

Rename the caller's workspace. PATCH /v1/tenant

Changes its name, its slug, or both; a field left out stays as it is. Its id stays, so whatever names it by its id keeps working. The console's addresses carry the slug: after a new one, links with the old one stop opening the workspace, and another workspace may take the old one. The same values again change nothing. Takes admin on the workspace. A runtime whose tenant-hierarchy binding can't rename workspaces doesn't serve this route.