# client.environment_orders

> client.environment_orders — the environmentOrders operations.

`client.environment_orders` — the `environmentOrders` operations.

On `AsyncKindgi` every method is the same, awaited.

## `client.environment_orders.list()`

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

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.

## `client.environment_orders.get_tenant()`

```python signature
get_tenant(*, timeout: float | None = None) -> EnvironmentOrder
```

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.

## `client.environment_orders.set_tenant()`

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

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.

## `client.environment_orders.get_org()`

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

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.

## `client.environment_orders.set_org()`

```python signature
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
```

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.
