Skip to content
Ona Docs

Prebuilds

PrebuildService manages prebuilds for projects to enable faster environment startup times. Prebuilds create snapshots of environments that can be used to provision new environments quickly.

CancelPrebuild
prebuilds.cancel(PrebuildCancelParams**kwargs) -> PrebuildCancelResponse
POST/gitpod.v1.PrebuildService/CancelPrebuild
CreatePrebuild
prebuilds.create(PrebuildCreateParams**kwargs) -> PrebuildCreateResponse
POST/gitpod.v1.PrebuildService/CreatePrebuild
CreatePrebuildLogsToken
prebuilds.create_logs_token(PrebuildCreateLogsTokenParams**kwargs) -> PrebuildCreateLogsTokenResponse
POST/gitpod.v1.PrebuildService/CreatePrebuildLogsToken
CreateWarmPool
prebuilds.create_warm_pool(PrebuildCreateWarmPoolParams**kwargs) -> PrebuildCreateWarmPoolResponse
POST/gitpod.v1.PrebuildService/CreateWarmPool
DeletePrebuild
prebuilds.delete(PrebuildDeleteParams**kwargs) -> object
POST/gitpod.v1.PrebuildService/DeletePrebuild
DeleteWarmPool
prebuilds.delete_warm_pool(PrebuildDeleteWarmPoolParams**kwargs) -> object
POST/gitpod.v1.PrebuildService/DeleteWarmPool
ListPrebuilds
prebuilds.list(PrebuildListParams**kwargs) -> SyncPrebuildsPage[Prebuild]
POST/gitpod.v1.PrebuildService/ListPrebuilds
ListWarmPools
prebuilds.list_warm_pools(PrebuildListWarmPoolsParams**kwargs) -> SyncWarmPoolsPage[WarmPool]
POST/gitpod.v1.PrebuildService/ListWarmPools
GetPrebuild
prebuilds.retrieve(PrebuildRetrieveParams**kwargs) -> PrebuildRetrieveResponse
POST/gitpod.v1.PrebuildService/GetPrebuild
GetWarmPool
prebuilds.retrieve_warm_pool(PrebuildRetrieveWarmPoolParams**kwargs) -> PrebuildRetrieveWarmPoolResponse
POST/gitpod.v1.PrebuildService/GetWarmPool
UpdateWarmPool
prebuilds.update_warm_pool(PrebuildUpdateWarmPoolParams**kwargs) -> PrebuildUpdateWarmPoolResponse
POST/gitpod.v1.PrebuildService/UpdateWarmPool
ModelsExpand Collapse
class Prebuild:

Prebuild represents a prebuild for a project that creates a snapshot for faster environment startup times.

metadata contains organizational and ownership information

created_at: datetime

created_at is when the prebuild was created

formatdate-time
creator: Subject

creator is the identity of who created the prebuild. For manual prebuilds, this is the user who triggered it. For scheduled prebuilds, this is the configured executor.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
updated_at: datetime

updated_at is when the prebuild was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class used to create this prebuild. While the prebuild is created with a specific environment class, environments with different classes (e.g., smaller or larger instance sizes) can be created from the same prebuild, as long as they run on the same runner. If not specified in create requests, uses the project’s default environment class.

formatuuid
executor: Optional[Subject]

executor is the identity used to run the prebuild. The executor’s SCM credentials are used to clone the repository. If not set, the creator’s identity is used.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
organization_id: Optional[str]

organization_id is the ID of the organization that owns the prebuild

formatuuid
project_id: Optional[str]

project_id is the ID of the project this prebuild was created for

formatuuid
triggered_by: Optional[PrebuildTrigger]

trigger describes the trigger that created this prebuild.

One of the following:
"PREBUILD_TRIGGER_UNSPECIFIED"
"PREBUILD_TRIGGER_MANUAL"
"PREBUILD_TRIGGER_SCHEDULED"

spec contains the configuration used to create this prebuild

desired_phase: Optional[PrebuildPhase]

desired_phase is the desired phase of the prebuild. Used to signal cancellation or other state changes. This field is managed by the API and reconciler.

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

timeout: Optional[str]

timeout is the maximum time allowed for the prebuild to complete. Defaults to 60 minutes if not specified. Maximum allowed timeout is 2 hours.

formatregex

status contains the current status and progress of the prebuild

phase is the current phase of the prebuild lifecycle

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
completion_time: Optional[datetime]

completion_time is when the prebuild completed (successfully or with failure)

formatdate-time
environment_id: Optional[str]

environment_id is the ID of the environment used to create this prebuild. This field is set when the prebuild environment is created.

formatuuid
failure_message: Optional[str]

failure_message contains details about why the prebuild failed

log_url: Optional[str]

log_url provides access to prebuild logs. During prebuild execution, this references the environment logs. After completion, this may reference archived logs.

formaturi
snapshot_completion_percentage: Optional[int]

snapshot_completion_percentage is the progress of snapshot creation (0-100). Only populated when phase is SNAPSHOTTING and progress is available from the cloud provider. This value may update infrequently or remain at 0 depending on the provider.

formatint32
maximum100
snapshot_size_bytes: Optional[str]

snapshot_size_bytes is the size of the snapshot in bytes. Only populated when the snapshot is available (phase is COMPLETED).

status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

warning_message: Optional[str]

warning_message contains warnings from the prebuild environment that indicate something went wrong but the prebuild could still complete. For example, the devcontainer failed to build but the environment is still usable. These warnings will likely affect any environment started from this prebuild.

id: Optional[str]

id is the unique identifier for the prebuild

formatuuid
class PrebuildMetadata:

PrebuildMetadata contains metadata about the prebuild

created_at: datetime

created_at is when the prebuild was created

formatdate-time
creator: Subject

creator is the identity of who created the prebuild. For manual prebuilds, this is the user who triggered it. For scheduled prebuilds, this is the configured executor.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
updated_at: datetime

updated_at is when the prebuild was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class used to create this prebuild. While the prebuild is created with a specific environment class, environments with different classes (e.g., smaller or larger instance sizes) can be created from the same prebuild, as long as they run on the same runner. If not specified in create requests, uses the project’s default environment class.

formatuuid
executor: Optional[Subject]

executor is the identity used to run the prebuild. The executor’s SCM credentials are used to clone the repository. If not set, the creator’s identity is used.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
organization_id: Optional[str]

organization_id is the ID of the organization that owns the prebuild

formatuuid
project_id: Optional[str]

project_id is the ID of the project this prebuild was created for

formatuuid
triggered_by: Optional[PrebuildTrigger]

trigger describes the trigger that created this prebuild.

One of the following:
"PREBUILD_TRIGGER_UNSPECIFIED"
"PREBUILD_TRIGGER_MANUAL"
"PREBUILD_TRIGGER_SCHEDULED"
Literal["PREBUILD_PHASE_UNSPECIFIED", "PREBUILD_PHASE_PENDING", "PREBUILD_PHASE_STARTING", 9 more]

PrebuildPhase represents the lifecycle phase of a prebuild

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
class PrebuildSpec:

PrebuildSpec contains the configuration used to create a prebuild

desired_phase: Optional[PrebuildPhase]

desired_phase is the desired phase of the prebuild. Used to signal cancellation or other state changes. This field is managed by the API and reconciler.

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

timeout: Optional[str]

timeout is the maximum time allowed for the prebuild to complete. Defaults to 60 minutes if not specified. Maximum allowed timeout is 2 hours.

formatregex
class PrebuildStatus:

PrebuildStatus contains the current status and progress of a prebuild

phase is the current phase of the prebuild lifecycle

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
completion_time: Optional[datetime]

completion_time is when the prebuild completed (successfully or with failure)

formatdate-time
environment_id: Optional[str]

environment_id is the ID of the environment used to create this prebuild. This field is set when the prebuild environment is created.

formatuuid
failure_message: Optional[str]

failure_message contains details about why the prebuild failed

log_url: Optional[str]

log_url provides access to prebuild logs. During prebuild execution, this references the environment logs. After completion, this may reference archived logs.

formaturi
snapshot_completion_percentage: Optional[int]

snapshot_completion_percentage is the progress of snapshot creation (0-100). Only populated when phase is SNAPSHOTTING and progress is available from the cloud provider. This value may update infrequently or remain at 0 depending on the provider.

formatint32
maximum100
snapshot_size_bytes: Optional[str]

snapshot_size_bytes is the size of the snapshot in bytes. Only populated when the snapshot is available (phase is COMPLETED).

status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

warning_message: Optional[str]

warning_message contains warnings from the prebuild environment that indicate something went wrong but the prebuild could still complete. For example, the devcontainer failed to build but the environment is still usable. These warnings will likely affect any environment started from this prebuild.

Literal["PREBUILD_TRIGGER_UNSPECIFIED", "PREBUILD_TRIGGER_MANUAL", "PREBUILD_TRIGGER_SCHEDULED"]

PrebuildTrigger indicates how the prebuild was triggered

One of the following:
"PREBUILD_TRIGGER_UNSPECIFIED"
"PREBUILD_TRIGGER_MANUAL"
"PREBUILD_TRIGGER_SCHEDULED"
class WarmPool:

WarmPool maintains pre-created environment instances from a prebuild snapshot for near-instant environment startup. One warm pool exists per <project, environment_class> pair.

metadata contains organizational and ownership information

created_at: datetime

created_at is when the warm pool was created

formatdate-time
updated_at: datetime

updated_at is when the warm pool was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class whose instances are warmed

formatuuid
organization_id: Optional[str]

organization_id is the ID of the organization that owns the warm pool

formatuuid
project_id: Optional[str]

project_id is the ID of the project this warm pool belongs to

formatuuid
runner_id: Optional[str]

runner_id is the runner that manages this warm pool. Derived from the environment class.

formatuuid

spec contains the desired configuration for this warm pool

desired_phase: Optional[WarmPoolPhase]

desired_phase is the intended lifecycle phase for this warm pool. Managed by the API and reconciler.

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
Deprecateddesired_size: Optional[int]

desired_size is the number of warm instances to maintain. Deprecated: Use min_size and max_size instead for dynamic scaling. Existing pools will be migrated to min_size=max_size=desired_size.

formatint32
maximum20
minimum1
max_size: Optional[int]

max_size is the maximum number of warm instances to maintain. The pool will never scale above this value. Must be >= min_size and <= 20.

formatint32
maximum20
minimum1
min_size: Optional[int]

min_size is the minimum number of warm instances to maintain. The pool will never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow full scale-down.

formatint32
maximum20
snapshot_id: Optional[str]

snapshot_id is the prebuild snapshot to warm up in the pool. Updated by the reconciler when a new prebuild completes for this project and environment class. Empty when no completed prebuild exists yet.

formatuuid
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

status contains the current status reported by the runner

phase is the current phase of the warm pool lifecycle

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
desired_size: Optional[int]

desired_size is the current target number of instances the autoscaler has decided on. Unlike running_instances, this value is stable and does not fluctuate as instances are claimed and backfilled.

formatint32
failure_message: Optional[str]

failure_message contains details about why the warm pool is degraded or failed

running_instances: Optional[int]

running_instances is the number of running warm instances in the pool, ready to be claimed for near-instant environment startup.

formatint32
status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

stopped_instances: Optional[int]

stopped_instances is the number of pre-provisioned but stopped instances in the pool. When a running instance is claimed, stopped instances are used to backfill the running pool faster than provisioning from scratch. Stopped instances only incur storage costs, allowing a larger total pool at lower cost than keeping all instances running.

formatint32
id: Optional[str]

id is the unique identifier for the warm pool

formatuuid
class WarmPoolMetadata:

WarmPoolMetadata contains metadata about the warm pool

created_at: datetime

created_at is when the warm pool was created

formatdate-time
updated_at: datetime

updated_at is when the warm pool was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class whose instances are warmed

formatuuid
organization_id: Optional[str]

organization_id is the ID of the organization that owns the warm pool

formatuuid
project_id: Optional[str]

project_id is the ID of the project this warm pool belongs to

formatuuid
runner_id: Optional[str]

runner_id is the runner that manages this warm pool. Derived from the environment class.

formatuuid
Literal["WARM_POOL_PHASE_UNSPECIFIED", "WARM_POOL_PHASE_PENDING", "WARM_POOL_PHASE_READY", 3 more]

WarmPoolPhase represents the lifecycle phase of a warm pool

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
class WarmPoolSpec:

WarmPoolSpec contains the desired configuration for a warm pool

desired_phase: Optional[WarmPoolPhase]

desired_phase is the intended lifecycle phase for this warm pool. Managed by the API and reconciler.

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
Deprecateddesired_size: Optional[int]

desired_size is the number of warm instances to maintain. Deprecated: Use min_size and max_size instead for dynamic scaling. Existing pools will be migrated to min_size=max_size=desired_size.

formatint32
maximum20
minimum1
max_size: Optional[int]

max_size is the maximum number of warm instances to maintain. The pool will never scale above this value. Must be >= min_size and <= 20.

formatint32
maximum20
minimum1
min_size: Optional[int]

min_size is the minimum number of warm instances to maintain. The pool will never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow full scale-down.

formatint32
maximum20
snapshot_id: Optional[str]

snapshot_id is the prebuild snapshot to warm up in the pool. Updated by the reconciler when a new prebuild completes for this project and environment class. Empty when no completed prebuild exists yet.

formatuuid
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

class WarmPoolStatus:

WarmPoolStatus contains the current status of a warm pool as reported by the runner

phase is the current phase of the warm pool lifecycle

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
desired_size: Optional[int]

desired_size is the current target number of instances the autoscaler has decided on. Unlike running_instances, this value is stable and does not fluctuate as instances are claimed and backfilled.

formatint32
failure_message: Optional[str]

failure_message contains details about why the warm pool is degraded or failed

running_instances: Optional[int]

running_instances is the number of running warm instances in the pool, ready to be claimed for near-instant environment startup.

formatint32
status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

stopped_instances: Optional[int]

stopped_instances is the number of pre-provisioned but stopped instances in the pool. When a running instance is claimed, stopped instances are used to backfill the running pool faster than provisioning from scratch. Stopped instances only incur storage costs, allowing a larger total pool at lower cost than keeping all instances running.

formatint32
class PrebuildCancelResponse:
prebuild: Prebuild

Prebuild represents a prebuild for a project that creates a snapshot for faster environment startup times.

metadata contains organizational and ownership information

created_at: datetime

created_at is when the prebuild was created

formatdate-time
creator: Subject

creator is the identity of who created the prebuild. For manual prebuilds, this is the user who triggered it. For scheduled prebuilds, this is the configured executor.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
updated_at: datetime

updated_at is when the prebuild was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class used to create this prebuild. While the prebuild is created with a specific environment class, environments with different classes (e.g., smaller or larger instance sizes) can be created from the same prebuild, as long as they run on the same runner. If not specified in create requests, uses the project’s default environment class.

formatuuid
executor: Optional[Subject]

executor is the identity used to run the prebuild. The executor’s SCM credentials are used to clone the repository. If not set, the creator’s identity is used.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
organization_id: Optional[str]

organization_id is the ID of the organization that owns the prebuild

formatuuid
project_id: Optional[str]

project_id is the ID of the project this prebuild was created for

formatuuid
triggered_by: Optional[PrebuildTrigger]

trigger describes the trigger that created this prebuild.

One of the following:
"PREBUILD_TRIGGER_UNSPECIFIED"
"PREBUILD_TRIGGER_MANUAL"
"PREBUILD_TRIGGER_SCHEDULED"

spec contains the configuration used to create this prebuild

desired_phase: Optional[PrebuildPhase]

desired_phase is the desired phase of the prebuild. Used to signal cancellation or other state changes. This field is managed by the API and reconciler.

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

timeout: Optional[str]

timeout is the maximum time allowed for the prebuild to complete. Defaults to 60 minutes if not specified. Maximum allowed timeout is 2 hours.

formatregex

status contains the current status and progress of the prebuild

phase is the current phase of the prebuild lifecycle

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
completion_time: Optional[datetime]

completion_time is when the prebuild completed (successfully or with failure)

formatdate-time
environment_id: Optional[str]

environment_id is the ID of the environment used to create this prebuild. This field is set when the prebuild environment is created.

formatuuid
failure_message: Optional[str]

failure_message contains details about why the prebuild failed

log_url: Optional[str]

log_url provides access to prebuild logs. During prebuild execution, this references the environment logs. After completion, this may reference archived logs.

formaturi
snapshot_completion_percentage: Optional[int]

snapshot_completion_percentage is the progress of snapshot creation (0-100). Only populated when phase is SNAPSHOTTING and progress is available from the cloud provider. This value may update infrequently or remain at 0 depending on the provider.

formatint32
maximum100
snapshot_size_bytes: Optional[str]

snapshot_size_bytes is the size of the snapshot in bytes. Only populated when the snapshot is available (phase is COMPLETED).

status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

warning_message: Optional[str]

warning_message contains warnings from the prebuild environment that indicate something went wrong but the prebuild could still complete. For example, the devcontainer failed to build but the environment is still usable. These warnings will likely affect any environment started from this prebuild.

id: Optional[str]

id is the unique identifier for the prebuild

formatuuid
class PrebuildCreateResponse:
prebuild: Prebuild

Prebuild represents a prebuild for a project that creates a snapshot for faster environment startup times.

metadata contains organizational and ownership information

created_at: datetime

created_at is when the prebuild was created

formatdate-time
creator: Subject

creator is the identity of who created the prebuild. For manual prebuilds, this is the user who triggered it. For scheduled prebuilds, this is the configured executor.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
updated_at: datetime

updated_at is when the prebuild was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class used to create this prebuild. While the prebuild is created with a specific environment class, environments with different classes (e.g., smaller or larger instance sizes) can be created from the same prebuild, as long as they run on the same runner. If not specified in create requests, uses the project’s default environment class.

formatuuid
executor: Optional[Subject]

executor is the identity used to run the prebuild. The executor’s SCM credentials are used to clone the repository. If not set, the creator’s identity is used.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
organization_id: Optional[str]

organization_id is the ID of the organization that owns the prebuild

formatuuid
project_id: Optional[str]

project_id is the ID of the project this prebuild was created for

formatuuid
triggered_by: Optional[PrebuildTrigger]

trigger describes the trigger that created this prebuild.

One of the following:
"PREBUILD_TRIGGER_UNSPECIFIED"
"PREBUILD_TRIGGER_MANUAL"
"PREBUILD_TRIGGER_SCHEDULED"

spec contains the configuration used to create this prebuild

desired_phase: Optional[PrebuildPhase]

desired_phase is the desired phase of the prebuild. Used to signal cancellation or other state changes. This field is managed by the API and reconciler.

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

timeout: Optional[str]

timeout is the maximum time allowed for the prebuild to complete. Defaults to 60 minutes if not specified. Maximum allowed timeout is 2 hours.

formatregex

status contains the current status and progress of the prebuild

phase is the current phase of the prebuild lifecycle

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
completion_time: Optional[datetime]

completion_time is when the prebuild completed (successfully or with failure)

formatdate-time
environment_id: Optional[str]

environment_id is the ID of the environment used to create this prebuild. This field is set when the prebuild environment is created.

formatuuid
failure_message: Optional[str]

failure_message contains details about why the prebuild failed

log_url: Optional[str]

log_url provides access to prebuild logs. During prebuild execution, this references the environment logs. After completion, this may reference archived logs.

formaturi
snapshot_completion_percentage: Optional[int]

snapshot_completion_percentage is the progress of snapshot creation (0-100). Only populated when phase is SNAPSHOTTING and progress is available from the cloud provider. This value may update infrequently or remain at 0 depending on the provider.

formatint32
maximum100
snapshot_size_bytes: Optional[str]

snapshot_size_bytes is the size of the snapshot in bytes. Only populated when the snapshot is available (phase is COMPLETED).

status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

warning_message: Optional[str]

warning_message contains warnings from the prebuild environment that indicate something went wrong but the prebuild could still complete. For example, the devcontainer failed to build but the environment is still usable. These warnings will likely affect any environment started from this prebuild.

id: Optional[str]

id is the unique identifier for the prebuild

formatuuid
class PrebuildCreateLogsTokenResponse:
access_token: str

access_token is the token that can be used to access the logs of the prebuild

class PrebuildCreateWarmPoolResponse:
warm_pool: WarmPool

WarmPool maintains pre-created environment instances from a prebuild snapshot for near-instant environment startup. One warm pool exists per <project, environment_class> pair.

metadata contains organizational and ownership information

created_at: datetime

created_at is when the warm pool was created

formatdate-time
updated_at: datetime

updated_at is when the warm pool was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class whose instances are warmed

formatuuid
organization_id: Optional[str]

organization_id is the ID of the organization that owns the warm pool

formatuuid
project_id: Optional[str]

project_id is the ID of the project this warm pool belongs to

formatuuid
runner_id: Optional[str]

runner_id is the runner that manages this warm pool. Derived from the environment class.

formatuuid

spec contains the desired configuration for this warm pool

desired_phase: Optional[WarmPoolPhase]

desired_phase is the intended lifecycle phase for this warm pool. Managed by the API and reconciler.

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
Deprecateddesired_size: Optional[int]

desired_size is the number of warm instances to maintain. Deprecated: Use min_size and max_size instead for dynamic scaling. Existing pools will be migrated to min_size=max_size=desired_size.

formatint32
maximum20
minimum1
max_size: Optional[int]

max_size is the maximum number of warm instances to maintain. The pool will never scale above this value. Must be >= min_size and <= 20.

formatint32
maximum20
minimum1
min_size: Optional[int]

min_size is the minimum number of warm instances to maintain. The pool will never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow full scale-down.

formatint32
maximum20
snapshot_id: Optional[str]

snapshot_id is the prebuild snapshot to warm up in the pool. Updated by the reconciler when a new prebuild completes for this project and environment class. Empty when no completed prebuild exists yet.

formatuuid
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

status contains the current status reported by the runner

phase is the current phase of the warm pool lifecycle

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
desired_size: Optional[int]

desired_size is the current target number of instances the autoscaler has decided on. Unlike running_instances, this value is stable and does not fluctuate as instances are claimed and backfilled.

formatint32
failure_message: Optional[str]

failure_message contains details about why the warm pool is degraded or failed

running_instances: Optional[int]

running_instances is the number of running warm instances in the pool, ready to be claimed for near-instant environment startup.

formatint32
status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

stopped_instances: Optional[int]

stopped_instances is the number of pre-provisioned but stopped instances in the pool. When a running instance is claimed, stopped instances are used to backfill the running pool faster than provisioning from scratch. Stopped instances only incur storage costs, allowing a larger total pool at lower cost than keeping all instances running.

formatint32
id: Optional[str]

id is the unique identifier for the warm pool

formatuuid
class PrebuildRetrieveResponse:
prebuild: Prebuild

Prebuild represents a prebuild for a project that creates a snapshot for faster environment startup times.

metadata contains organizational and ownership information

created_at: datetime

created_at is when the prebuild was created

formatdate-time
creator: Subject

creator is the identity of who created the prebuild. For manual prebuilds, this is the user who triggered it. For scheduled prebuilds, this is the configured executor.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
updated_at: datetime

updated_at is when the prebuild was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class used to create this prebuild. While the prebuild is created with a specific environment class, environments with different classes (e.g., smaller or larger instance sizes) can be created from the same prebuild, as long as they run on the same runner. If not specified in create requests, uses the project’s default environment class.

formatuuid
executor: Optional[Subject]

executor is the identity used to run the prebuild. The executor’s SCM credentials are used to clone the repository. If not set, the creator’s identity is used.

id: Optional[str]

id is the UUID of the subject

formatuuid
principal: Optional[Principal]

Principal is the principal of the subject

One of the following:
"PRINCIPAL_UNSPECIFIED"
"PRINCIPAL_ACCOUNT"
"PRINCIPAL_USER"
"PRINCIPAL_RUNNER"
"PRINCIPAL_ENVIRONMENT"
"PRINCIPAL_SERVICE_ACCOUNT"
"PRINCIPAL_RUNNER_MANAGER"
organization_id: Optional[str]

organization_id is the ID of the organization that owns the prebuild

formatuuid
project_id: Optional[str]

project_id is the ID of the project this prebuild was created for

formatuuid
triggered_by: Optional[PrebuildTrigger]

trigger describes the trigger that created this prebuild.

One of the following:
"PREBUILD_TRIGGER_UNSPECIFIED"
"PREBUILD_TRIGGER_MANUAL"
"PREBUILD_TRIGGER_SCHEDULED"

spec contains the configuration used to create this prebuild

desired_phase: Optional[PrebuildPhase]

desired_phase is the desired phase of the prebuild. Used to signal cancellation or other state changes. This field is managed by the API and reconciler.

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

timeout: Optional[str]

timeout is the maximum time allowed for the prebuild to complete. Defaults to 60 minutes if not specified. Maximum allowed timeout is 2 hours.

formatregex

status contains the current status and progress of the prebuild

phase is the current phase of the prebuild lifecycle

One of the following:
"PREBUILD_PHASE_UNSPECIFIED"
"PREBUILD_PHASE_PENDING"
"PREBUILD_PHASE_STARTING"
"PREBUILD_PHASE_RUNNING"
"PREBUILD_PHASE_STOPPING"
"PREBUILD_PHASE_SNAPSHOTTING"
"PREBUILD_PHASE_COMPLETED"
"PREBUILD_PHASE_FAILED"
"PREBUILD_PHASE_CANCELLING"
"PREBUILD_PHASE_CANCELLED"
"PREBUILD_PHASE_DELETING"
"PREBUILD_PHASE_DELETED"
completion_time: Optional[datetime]

completion_time is when the prebuild completed (successfully or with failure)

formatdate-time
environment_id: Optional[str]

environment_id is the ID of the environment used to create this prebuild. This field is set when the prebuild environment is created.

formatuuid
failure_message: Optional[str]

failure_message contains details about why the prebuild failed

log_url: Optional[str]

log_url provides access to prebuild logs. During prebuild execution, this references the environment logs. After completion, this may reference archived logs.

formaturi
snapshot_completion_percentage: Optional[int]

snapshot_completion_percentage is the progress of snapshot creation (0-100). Only populated when phase is SNAPSHOTTING and progress is available from the cloud provider. This value may update infrequently or remain at 0 depending on the provider.

formatint32
maximum100
snapshot_size_bytes: Optional[str]

snapshot_size_bytes is the size of the snapshot in bytes. Only populated when the snapshot is available (phase is COMPLETED).

status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

warning_message: Optional[str]

warning_message contains warnings from the prebuild environment that indicate something went wrong but the prebuild could still complete. For example, the devcontainer failed to build but the environment is still usable. These warnings will likely affect any environment started from this prebuild.

id: Optional[str]

id is the unique identifier for the prebuild

formatuuid
class PrebuildRetrieveWarmPoolResponse:
warm_pool: WarmPool

WarmPool maintains pre-created environment instances from a prebuild snapshot for near-instant environment startup. One warm pool exists per <project, environment_class> pair.

metadata contains organizational and ownership information

created_at: datetime

created_at is when the warm pool was created

formatdate-time
updated_at: datetime

updated_at is when the warm pool was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class whose instances are warmed

formatuuid
organization_id: Optional[str]

organization_id is the ID of the organization that owns the warm pool

formatuuid
project_id: Optional[str]

project_id is the ID of the project this warm pool belongs to

formatuuid
runner_id: Optional[str]

runner_id is the runner that manages this warm pool. Derived from the environment class.

formatuuid

spec contains the desired configuration for this warm pool

desired_phase: Optional[WarmPoolPhase]

desired_phase is the intended lifecycle phase for this warm pool. Managed by the API and reconciler.

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
Deprecateddesired_size: Optional[int]

desired_size is the number of warm instances to maintain. Deprecated: Use min_size and max_size instead for dynamic scaling. Existing pools will be migrated to min_size=max_size=desired_size.

formatint32
maximum20
minimum1
max_size: Optional[int]

max_size is the maximum number of warm instances to maintain. The pool will never scale above this value. Must be >= min_size and <= 20.

formatint32
maximum20
minimum1
min_size: Optional[int]

min_size is the minimum number of warm instances to maintain. The pool will never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow full scale-down.

formatint32
maximum20
snapshot_id: Optional[str]

snapshot_id is the prebuild snapshot to warm up in the pool. Updated by the reconciler when a new prebuild completes for this project and environment class. Empty when no completed prebuild exists yet.

formatuuid
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

status contains the current status reported by the runner

phase is the current phase of the warm pool lifecycle

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
desired_size: Optional[int]

desired_size is the current target number of instances the autoscaler has decided on. Unlike running_instances, this value is stable and does not fluctuate as instances are claimed and backfilled.

formatint32
failure_message: Optional[str]

failure_message contains details about why the warm pool is degraded or failed

running_instances: Optional[int]

running_instances is the number of running warm instances in the pool, ready to be claimed for near-instant environment startup.

formatint32
status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

stopped_instances: Optional[int]

stopped_instances is the number of pre-provisioned but stopped instances in the pool. When a running instance is claimed, stopped instances are used to backfill the running pool faster than provisioning from scratch. Stopped instances only incur storage costs, allowing a larger total pool at lower cost than keeping all instances running.

formatint32
id: Optional[str]

id is the unique identifier for the warm pool

formatuuid
class PrebuildUpdateWarmPoolResponse:
warm_pool: WarmPool

WarmPool maintains pre-created environment instances from a prebuild snapshot for near-instant environment startup. One warm pool exists per <project, environment_class> pair.

metadata contains organizational and ownership information

created_at: datetime

created_at is when the warm pool was created

formatdate-time
updated_at: datetime

updated_at is when the warm pool was last updated

formatdate-time
environment_class_id: Optional[str]

environment_class_id is the environment class whose instances are warmed

formatuuid
organization_id: Optional[str]

organization_id is the ID of the organization that owns the warm pool

formatuuid
project_id: Optional[str]

project_id is the ID of the project this warm pool belongs to

formatuuid
runner_id: Optional[str]

runner_id is the runner that manages this warm pool. Derived from the environment class.

formatuuid

spec contains the desired configuration for this warm pool

desired_phase: Optional[WarmPoolPhase]

desired_phase is the intended lifecycle phase for this warm pool. Managed by the API and reconciler.

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
Deprecateddesired_size: Optional[int]

desired_size is the number of warm instances to maintain. Deprecated: Use min_size and max_size instead for dynamic scaling. Existing pools will be migrated to min_size=max_size=desired_size.

formatint32
maximum20
minimum1
max_size: Optional[int]

max_size is the maximum number of warm instances to maintain. The pool will never scale above this value. Must be >= min_size and <= 20.

formatint32
maximum20
minimum1
min_size: Optional[int]

min_size is the minimum number of warm instances to maintain. The pool will never scale below this value. Must be >= 0 and <= max_size. Set to 0 to allow full scale-down.

formatint32
maximum20
snapshot_id: Optional[str]

snapshot_id is the prebuild snapshot to warm up in the pool. Updated by the reconciler when a new prebuild completes for this project and environment class. Empty when no completed prebuild exists yet.

formatuuid
spec_version: Optional[str]

spec_version is incremented each time the spec is updated. Used for optimistic concurrency control.

status contains the current status reported by the runner

phase is the current phase of the warm pool lifecycle

One of the following:
"WARM_POOL_PHASE_UNSPECIFIED"
"WARM_POOL_PHASE_PENDING"
"WARM_POOL_PHASE_READY"
"WARM_POOL_PHASE_DEGRADED"
"WARM_POOL_PHASE_DELETING"
"WARM_POOL_PHASE_DELETED"
desired_size: Optional[int]

desired_size is the current target number of instances the autoscaler has decided on. Unlike running_instances, this value is stable and does not fluctuate as instances are claimed and backfilled.

formatint32
failure_message: Optional[str]

failure_message contains details about why the warm pool is degraded or failed

running_instances: Optional[int]

running_instances is the number of running warm instances in the pool, ready to be claimed for near-instant environment startup.

formatint32
status_version: Optional[str]

status_version is incremented each time the status is updated. Used for optimistic concurrency control.

stopped_instances: Optional[int]

stopped_instances is the number of pre-provisioned but stopped instances in the pool. When a running instance is claimed, stopped instances are used to backfill the running pool faster than provisioning from scratch. Stopped instances only incur storage costs, allowing a larger total pool at lower cost than keeping all instances running.

formatint32
id: Optional[str]

id is the unique identifier for the warm pool

formatuuid