Skip to content

client.environment_orders

View as Markdown

client.environment_orders — the environmentOrders operations.

On AsyncKindgi every method is the same, awaited.

list(
*,
limit: int | None = None,
cursor: str | None = None,
timeout: float | None = None,
) -> EnvironmentOrderPage
Signature

List the tenant's environment orders. GET /v1/environment-orders

The order a tenant runs a project through on its way to live — its environments: the tenant's own order and each org's. An order is listed when the caller can read a project in it; a project the caller can't read is named by its position alone, without its id.

get_tenant(*, timeout: float | None = None) -> EnvironmentOrder
Signature

Get the tenant's environment order. GET /v1/environment-orders/tenant

The tenant's own environment order; empty when it was never set or was cleared. A project the caller can't read is named by its position alone.

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

Set the tenant's environment order. PUT /v1/environment-orders/tenant

Replace the order with the projects given, in order; send [] to clear it. For a tenant admin. An order needs two or more projects, no project named twice, and each project live in the tenant and in no other order. A write that changes nothing is a no-op. Removing a project from the order or reordering leaves running deployments where they are; a project in no order takes builds directly, as before.

get_org(org_id: str | UUID, /, *, timeout: float | None = None) -> EnvironmentOrder
Signature

Get an org's environment order. GET /v1/environment-orders/orgs/{orgId}

An org's environment order; empty when it was never set or was cleared. A project the caller can't read is named by its position alone.

set_org(
org_id: str | UUID,
body: EnvironmentOrderSetRequest | Mapping[str, Any] | None = None,
/,
*,
idempotency_key: str | None = None,
timeout: float | None = None,
**fields: Any,
) -> EnvironmentOrder
Signature

Set an org's environment order. PUT /v1/environment-orders/orgs/{orgId}

Replace the org's order with the projects given, in order; send [] to clear it. For a tenant admin. An order needs two or more projects, no project named twice, and each project live under this org and in no other order. A write that changes nothing is a no-op. Removing a project from the order or reordering leaves running deployments where they are; a project in no order takes builds directly, as before.