Machine Pools

Create project machine pool grant

Changed on

Lets a project create machines from a machine pool, optionally with its own defaults and usage caps within the pool's limits, and returns the grant. No machines are created by this call. Idempotency keys are retained only while the grant exists. Retrying creation after the grant is revoked or deleted can recreate it and restore access, including through automatic SDK retries. A replay compares the request with the current grant, so later edits can return 409 with code idempotency_key_conflict.

post/orgs/{orgID}/projects/{projectID}/machine-pool-grants

Request

  • Base URL
    https://api.omnara.com/v1
  • Auth
    • HTTP bearer
    • or API key in cookie __Host-omnara_session and API key in header X-Omnara-Csrf

Path parameters

orgID, string required

Organization ID (org_...).

projectID, string required

Project ID (proj_...).

Headers

Idempotency-Key, string

Idempotency key for replay-safe mutating requests.

Request body

CreateProjectMachinePoolGrantRequest required
machine_pool_id, string required

Machine pool ID (mpo_...).

description, string

Free-form note stored with the grant.

default_machine_cpu, integer

Default CPU count for machines this project creates from the pool, overriding the pool's default.

default_machine_memory_mb, integer

Default memory in MB for machines this project creates from the pool, overriding the pool's default.

default_machine_env_overlay, object

Env overlay merged over the pool's default_machine_env for machines materialized through this grant; a null entry removes the key.

default_machine_secret_env_overlay, object

Secret env overlay merged over the pool's default_machine_secret_env for machines materialized through this grant; a null entry removes the key.

default_machine_provider_options_overlay, object

Provider-specific options layered over the pool's provider options for this project's machines.

default_cwd, string

Default working directory for processes on this project's machines from the pool.

max_total_machines, integer

Maximum number of live machines this project can have from the pool.

max_total_cpu, integer

Maximum total CPU across this project's live machines from the pool.

max_total_memory_mb, integer

Maximum total memory in MB across this project's live machines from the pool.

min_machine_cpu, integer

Smallest CPU count one of this project's machines can request.

min_machine_memory_mb, integer

Smallest memory in MB one of this project's machines can request.

max_machine_cpu, integer

Largest CPU count one of this project's machines can request.

max_machine_memory_mb, integer

Largest memory in MB one of this project's machines can request.

delete_after_idle_minutes, union

Idle minutes before deleting a machine created through this grant. Use 0 to disable for this grant; omit to inherit the pool default.

metadata, Metadata

Arbitrary key-value labels stored with the resource.

Response

Existing project machine pool grant returned.

ProjectMachinePoolGrant required
id, string required

Identifies the pool grant.

org_id, string required

Organization that owns the grant.

project_id, string required

Project the grant lets create machines from the pool.

machine_pool_id, string required

Pool the project may create machines from.

description, string required

Free-form note about the grant; empty if none was set.

default_machine_cpu, integer nullable required

Default vCPUs for this project's machines from the pool; null uses the pool default.

default_machine_memory_mb, integer nullable required

Default memory in MB for this project's machines from the pool; null uses the pool default.

default_machine_env_overlay, object required

Env overlay merged over the pool's default_machine_env for machines materialized through this grant; a null entry removes the key.

default_machine_secret_env_overlay, object required

Secret env overlay merged over the pool's default_machine_secret_env for machines materialized through this grant; a null entry removes the key.

default_machine_provider_options_overlay, object required

Provider options layered over the pool's for this project's machines.

default_cwd, string required

Working directory for this project's machines from the pool; empty uses the pool default.

max_total_machines, integer nullable required

Most live machines this project can have from the pool; null means only the pool limit applies.

max_total_cpu, integer nullable required

Most vCPUs across this project's live pool machines; null means only the pool limit applies.

max_total_memory_mb, integer nullable required

Most memory in MB across this project's live pool machines; null means only the pool limit applies.

min_machine_cpu, integer nullable required

Fewest vCPUs one of this project's machines can request; null uses the pool minimum.

min_machine_memory_mb, integer nullable required

Least memory in MB one of this project's machines can request; null uses the pool minimum.

max_machine_cpu, integer nullable required

Most vCPUs one of this project's machines can request; null uses the pool maximum.

max_machine_memory_mb, integer nullable required

Most memory in MB one of this project's machines can request; null uses the pool maximum.

delete_after_idle_minutes, union required

Idle minutes before deleting a machine created through this grant. Zero disables deletion for this grant; null inherits the pool default.

metadata, Metadata required

Key-value metadata attached to the grant.

created_at, string date-time required

When the grant was created.

updated_at, string date-time required

When the grant last changed.

Changes

    • info

      added the optional property current_digest to the response with the status

    • info

      added the optional property current_digest to the response with the status

    • info

      added the optional property current_digest to the response with the status

    156 more changes in this revision