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 tenant. GET /v1/tenant

Returns the tenant the bearer token authenticates as. There is no /v1/tenants collection — tenants are the sovereignty boundary, not a listable resource under a tenant. A runtime that gates production adds productionAllowed (and productionNext while it's false), one that sets limits adds the tenant's limits, 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 tenant. 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 tenant, and another tenant may take the old one. The same values again change nothing. Takes admin on the tenant. A runtime whose tenant-hierarchy binding can't rename tenants doesn't serve this route.